曲靖首页新闻分页
This commit is contained in:
@@ -102,6 +102,7 @@ export default {
|
||||
background: 'url(https://cdn.cunwuyun.cn/qujing/home-top-nav.png) no-repeat',
|
||||
backgroundSize: '100% 100%',
|
||||
},
|
||||
newCurrent: 1
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@@ -147,14 +148,16 @@ export default {
|
||||
tabChange(idx) {
|
||||
this.index = idx
|
||||
this.search.categoryId = this.categorys[idx]['id']
|
||||
this.newCurrent = 1
|
||||
this.getCategoryList()
|
||||
},
|
||||
getCategoryList() {
|
||||
this.$instance.post("/app/appcontentinfo/list", null, {
|
||||
params: {...this.search, size: 100}
|
||||
params: {...this.search, size: 5, current: this.newCurrent}
|
||||
}).then(res => {
|
||||
if (res?.data) {
|
||||
this.categoryList = res.data.records;
|
||||
// this.categoryList = res.data.records;
|
||||
this.categoryList = this.newCurrent==1? res.data.records: [...this.categoryList,...res.data.records]
|
||||
}
|
||||
})
|
||||
},
|
||||
@@ -267,6 +270,10 @@ export default {
|
||||
path: `/pages/AppHome/AppHome`
|
||||
}
|
||||
},
|
||||
onReachBottom() {
|
||||
this.newCurrent ++
|
||||
this.getCategoryList()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user