我的帖子

This commit is contained in:
liuye
2023-03-17 13:50:36 +08:00
parent 29a03f52a3
commit 235f4127be

View File

@@ -129,7 +129,8 @@
data () { data () {
return { return {
currIndex: 2 currIndex: 2,
totalInfo: {}
} }
}, },
@@ -138,10 +139,28 @@
}, },
methods: { methods: {
getTotal() {
this.$instance.post(`/app/appneighborhoodassistance/wechatInfo`).then(res => {
if (res.code === 0 && res.data) {
const list = this.current > 1 ? [...this.list, ...res.data.records] : res.data.records
this.pages = Math.ceil(res.data.total / 10)
this.list = list
}
})
}, },
onShow() { getList() {
this.$instance.post(`/app/appneighborhoodassistancetheme/list&current=${this.current}&size=20`).then(res => {
if (res.code === 0 && res.data) {
const list = this.current > 1 ? [...this.list, ...res.data.records] : res.data.records
this.pages = Math.ceil(res.data.total / 10)
this.list = list
}
})
}
},
onLoad() {
this.getTotal()
this.getList()
}, },
} }
</script> </script>