暂无数据
This commit is contained in:
@@ -7,7 +7,7 @@
|
|||||||
<!-- <div v-for="(item, index) in tabList" :key="index" @click="changeTab(item.id)" v-if="index < 5" :class="currId == item.id ? 'tab-item active-item' : 'tab-item'">{{item.name}}<span class="active-line" v-if="currId == item.id"></span></div> -->
|
<!-- <div v-for="(item, index) in tabList" :key="index" @click="changeTab(item.id)" v-if="index < 5" :class="currId == item.id ? 'tab-item active-item' : 'tab-item'">{{item.name}}<span class="active-line" v-if="currId == item.id"></span></div> -->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="news-list" v-if="newsList.length">
|
<div class="news-list" v-if="tabList.length">
|
||||||
<!-- <div class="item" hover-class="bg-hover" v-for="(item, index) in newsList" :key="index" @click="toDetail(item)">
|
<!-- <div class="item" hover-class="bg-hover" v-for="(item, index) in newsList" :key="index" @click="toDetail(item)">
|
||||||
<div class="item-wrapper solid" style="display: flex">
|
<div class="item-wrapper solid" style="display: flex">
|
||||||
<div class="item-left flex1">
|
<div class="item-left flex1">
|
||||||
@@ -28,17 +28,18 @@
|
|||||||
</div>
|
</div>
|
||||||
</div> -->
|
</div> -->
|
||||||
|
|
||||||
<div class="item" v-for="(item,index) in newsList" :key="index">
|
<div class="item" v-for="(item,index) in newsList" :key="index" v-if="newsList.length">
|
||||||
<div class="left">
|
<div class="left">
|
||||||
<h2>{{ item.title }}</h2>
|
<h2>{{ item.title }}</h2>
|
||||||
<p><span>通知公告</span>{{ item.createTime }}</p>
|
<p><span>通知公告</span>{{ item.createTime }}</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="right">
|
<div class="right" v-if="item.pictureUrl.length">
|
||||||
<img :src="item.pictureUrl" alt="">
|
<img :src="item.pictureUrl" alt="">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<AiEmpty description="暂无数据" v-if="!newsList.length" style="background: #f3f4f5;"/>
|
||||||
</div>
|
</div>
|
||||||
<AiEmpty v-if="!newsList.length && isShowEmpty"/>
|
<AiEmpty description="暂无数据" v-else/>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -68,6 +69,8 @@
|
|||||||
this.parentName = params.parentName
|
this.parentName = params.parentName
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
|
document.title = this.parentName
|
||||||
|
this.getList()
|
||||||
if(uni.getStorageSync('newTypeIndex')) {
|
if(uni.getStorageSync('newTypeIndex')) {
|
||||||
this.currIndex = uni.getStorageSync('newTypeIndex')
|
this.currIndex = uni.getStorageSync('newTypeIndex')
|
||||||
this.getListInit()
|
this.getListInit()
|
||||||
@@ -75,8 +78,6 @@
|
|||||||
// uni.$on('update',()=>{
|
// uni.$on('update',()=>{
|
||||||
// this.getListInit()
|
// this.getListInit()
|
||||||
// })
|
// })
|
||||||
document.title = this.parentName
|
|
||||||
this.getList()
|
|
||||||
this.getListInit()
|
this.getListInit()
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -86,8 +87,9 @@
|
|||||||
uni.navigateTo({url: `./select?parentId=${this.parentId}&index=${this.currIndex}`})
|
uni.navigateTo({url: `./select?parentId=${this.parentId}&index=${this.currIndex}`})
|
||||||
},
|
},
|
||||||
changeTab(index) {
|
changeTab(index) {
|
||||||
|
this.newsList = []
|
||||||
this.currIndex = index
|
this.currIndex = index
|
||||||
// this.newsList = []
|
this.current = 1
|
||||||
this.getListInit()
|
this.getListInit()
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -130,13 +132,6 @@
|
|||||||
},
|
},
|
||||||
// 获取新闻列表
|
// 获取新闻列表
|
||||||
getNewsList() {
|
getNewsList() {
|
||||||
// if (this.isMore || this.isLoading) return
|
|
||||||
// var type = this.currIndex
|
|
||||||
// if(this.currIndex == 0) {
|
|
||||||
// type = ''
|
|
||||||
// }
|
|
||||||
// this.isLoading = true
|
|
||||||
|
|
||||||
this.$http.post(`/app/apppublicityinfo/list?`, null, {
|
this.$http.post(`/app/apppublicityinfo/list?`, null, {
|
||||||
params: {
|
params: {
|
||||||
current: this.current,
|
current: this.current,
|
||||||
@@ -145,35 +140,14 @@
|
|||||||
}
|
}
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
console.log(res);
|
console.log(res);
|
||||||
|
|
||||||
if (res.code === 0) {
|
if (res.code === 0) {
|
||||||
this.isShowEmpty = true
|
|
||||||
|
|
||||||
if (this.current === 0) {
|
|
||||||
this.newsList = []
|
|
||||||
}
|
|
||||||
if (!res.data.records.length) {
|
|
||||||
this.isMore = true
|
|
||||||
this.isLoading = false
|
|
||||||
|
|
||||||
this.$nextTick(() => {
|
|
||||||
this.pageShow = true
|
|
||||||
})
|
|
||||||
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
const data = res.data.records
|
const data = res.data.records
|
||||||
this.newsList.push(...data)
|
this.newsList.push(...data)
|
||||||
this.current = this.current
|
this.current = this.current
|
||||||
this.isLoading = false
|
}
|
||||||
|
}).catch((err) => {
|
||||||
this.$nextTick(() => {
|
console.log(err);
|
||||||
this.pageShow = true
|
|
||||||
})
|
|
||||||
} else {}
|
|
||||||
}).catch(() => {
|
|
||||||
this.isShowEmpty = true
|
|
||||||
this.isLoading = false
|
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
toDetail(item) {
|
toDetail(item) {
|
||||||
@@ -185,9 +159,10 @@
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
// onReachBottom () {
|
onReachBottom () {
|
||||||
// this.getNewsList(this.areaId)
|
this.current ++,
|
||||||
// }
|
this.getNewsList()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@@ -254,12 +229,16 @@
|
|||||||
margin-top: 30px;
|
margin-top: 30px;
|
||||||
font-size: 22px;
|
font-size: 22px;
|
||||||
color: #999999;
|
color: #999999;
|
||||||
|
span {
|
||||||
|
margin-right: 15px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
.right {
|
.right {
|
||||||
width: 224px;
|
width: 224px;
|
||||||
height: 140px;
|
height: 140px;
|
||||||
|
margin-left: 40px;
|
||||||
img {
|
img {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
|||||||
Reference in New Issue
Block a user