26838
This commit is contained in:
		| @@ -61,9 +61,9 @@ | ||||
|  | ||||
|     <div class="currentTabBar1" v-if="currentTabBar == 1"> | ||||
|       <AiTopFixed> | ||||
|         <u-search placeholder="请输入昵称、姓名" :show-action="false" search-icon-color="#ccc" v-model="search.name" @search=";(page.current = 1), getList()" /> | ||||
|         <u-search placeholder="请输入昵称、姓名" :show-action="false" search-icon-color="#ccc" v-model="search.name" @search=";(page1.current = 1), getList()" /> | ||||
|         <AiCell> | ||||
|           <b slot="label" class="title">共<i v-html="page.total || 0" />个居民</b> | ||||
|           <b slot="label" class="title">共<i v-html="page1.total || 0" />个居民</b> | ||||
|         </AiCell> | ||||
|       </AiTopFixed> | ||||
|  | ||||
| @@ -83,9 +83,9 @@ | ||||
|  | ||||
|     <div class="currentTabBar2" v-if="currentTabBar == 2"> | ||||
|       <AiTopFixed> | ||||
|         <u-search placeholder="请输入群名、群主名" :show-action="false" search-icon-color="#ccc" v-model="search.name" @search=";(page.current = 1), getList()" /> | ||||
|         <u-search placeholder="请输入群名、群主名" :show-action="false" search-icon-color="#ccc" v-model="search.name" @search=";(page2.current = 1), getList()" /> | ||||
|         <AiCell> | ||||
|           <b slot="label" class="title">共<i v-html="page.total || 0" />个居民群</b> | ||||
|           <b slot="label" class="title">共<i v-html="page2.total || 0" />个居民群</b> | ||||
|         </AiCell> | ||||
|       </AiTopFixed> | ||||
|  | ||||
| @@ -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() | ||||
|     } | ||||
|   }, | ||||
| } | ||||
| </script> | ||||
|   | ||||
		Reference in New Issue
	
	Block a user