From dcd819a32bc08ced2e74921e0720a373a8f38625 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=88=98=E4=BB=95=E4=BC=9F?= <499672082@qq.com>
Date: Sun, 26 Jun 2022 11:56:47 +0800
Subject: [PATCH] =?UTF-8?q?=E7=BE=A4=E4=BF=A1=E6=81=AF=E5=88=86=E9=A1=B5?=
=?UTF-8?q?=E6=9F=A5=E8=AF=A2?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/apps/AppDataScreening/userDetail.vue | 33 ++++++++++++++++++++----
1 file changed, 28 insertions(+), 5 deletions(-)
diff --git a/src/apps/AppDataScreening/userDetail.vue b/src/apps/AppDataScreening/userDetail.vue
index 2611f372..0778acac 100644
--- a/src/apps/AppDataScreening/userDetail.vue
+++ b/src/apps/AppDataScreening/userDetail.vue
@@ -3,13 +3,13 @@
@@ -35,6 +35,7 @@ export default {
data() {
return {
areaId: '',
+ current: 1,
areaName: '',
groupName: '',
list: []
@@ -44,7 +45,7 @@ export default {
created() {
this.areaId = this.user.areaId
this.areaName = this.user.areaName
- this.getList()
+ this.getListInit()
},
onShow() {
document.title = '居民群详情'
@@ -52,16 +53,38 @@ export default {
methods: {
handerClear() {
this.groupName = ''
+ this.getListInit()
+ },
+ getListInit() {
+ this.list = []
+ this.current = 1
this.getList()
},
getList() {
- this.$http.post(`/app/wxcp/wxgroup/allGroupInfo?areaId=${this.areaId}&groupName=${this.groupName}`).then(res => {
+ this.$http.post(`/app/wxcp/wxgroup/allGroupInfo`, null, {
+ areaId: this.areaId,
+ groupName: this.groupName,
+ current: this.current,
+ size: 10
+ }).then(res => {
if (res?.code == 0) {
- this.list = res.data
+ if (this.current > 1) {
+ this.list = [...this.list, ...res.data.records]
+ } else {
+ this.list = res.data.records
+ }
+ } else {
+ uni.hideLoading()
}
+ }).catch(() => {
+ uni.hideLoading()
})
}
},
+ onReachBottom() {
+ this.current ++
+ this.getList()
+ }
}