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