-
+
- 共个居民群
+ 共个居民群
@@ -166,7 +166,6 @@ export default {
current: 1,
keyword: '',
data: [],
- page: { current: 1, size: 10, total: 0 },
search: { name: '' },
list: [],
weekList: [],
@@ -194,6 +193,7 @@ export default {
this.Echarts1 = echarts.init(document.getElementById('echarts1'))
},
methods: {
+ // 居民列表
getList() {
this.$http
.post('/app/wxcp/wxcustomer/list', null, {
@@ -201,20 +201,20 @@ export default {
})
.then((res) => {
if (res?.data) {
- if (this.page.current > 1) {
+ if (this.page1.current > 1) {
this.data = [...this.data, ...res.data.records]
} else this.data = res.data.records
- this.page.total = res.data.total
+ this.page1.total = res.data.total
}
})
},
- reachBottom() {
- if (this.page.total > this.list.length) {
- this.page.current++
- this.getList()
- }
- },
+ // reachBottom() {
+ // if (this.page1.total > this.list.length) {
+ // this.page1.current++
+ // this.getList()
+ // }
+ // },
showResident({ id }) {
id &&
@@ -223,6 +223,7 @@ export default {
})
},
+ // 居民群列表
getList2() {
this.$http
.post('/app/wxcp/wxgroup/list', null, {
@@ -234,20 +235,20 @@ export default {
...e,
avatar: e?.avatar || this.$cdn + 'groupAvatar.png',
}))
- if (this.page.current > 1) {
+ if (this.page2.current > 1) {
this.list = [...this.list, ...meta]
} else this.list = meta
- this.page.total = res.data.total
+ this.page2.total = res.data.total
}
})
},
- reachBottom() {
- if (this.page.total > this.list.length) {
- this.page.current = this.page.current + 1
- this.getList2()
- }
- },
+ // reachBottom() {
+ // if (this.page2.total > this.list.length) {
+ // this.page2.current = this.page2.current + 1
+ // this.getList2()
+ // }
+ // },
toGroupList(item) {
uni.navigateTo({
@@ -495,9 +496,11 @@ export default {
})
}
if (this.currentTabBar == 1) {
+ this.page1.current == 1
this.getList()
}
if (this.currentTabBar == 2) {
+ this.page2.current == 1
this.getList2()
}
},
@@ -516,8 +519,14 @@ export default {
},
},
onReachBottom() {
- this.current = this.current + 1
- this.getList()
+ if (this.currentTabBar == 1) {
+ this.page1.current++
+ this.getList()
+ }
+ if (this.currentTabBar == 2) {
+ this.page2.current++
+ this.getList2()
+ }
},
}