群信息分页查询
This commit is contained in:
@@ -3,13 +3,13 @@
|
|||||||
<AiTopFixed>
|
<AiTopFixed>
|
||||||
<div class="currentLeft-top">
|
<div class="currentLeft-top">
|
||||||
<div class="left">
|
<div class="left">
|
||||||
<AiAreaPicker v-model="areaId" :areaId="user.areaId" @select="getList" :name.sync="areaName" selectRoot>
|
<AiAreaPicker v-model="areaId" :areaId="user.areaId" @select="getListInit" :name.sync="areaName" selectRoot>
|
||||||
<span class="label" v-if="areaName">{{ areaName }}</span>
|
<span class="label" v-if="areaName">{{ areaName }}</span>
|
||||||
<span v-else>请选择</span>
|
<span v-else>请选择</span>
|
||||||
<u-icon name="arrow-down" color="#666" size="24" style="margin-left: 4px" />
|
<u-icon name="arrow-down" color="#666" size="24" style="margin-left: 4px" />
|
||||||
</AiAreaPicker>
|
</AiAreaPicker>
|
||||||
</div>
|
</div>
|
||||||
<u-search v-model="groupName" :clearabled="true" placeholder="请输入群昵称" :show-action="false" bg-color="#F5F5F5" search-icon-color="#ccc" color="#666" height="58" @search="getList" @clear="handerClear"></u-search>
|
<u-search v-model="groupName" :clearabled="true" placeholder="请输入群昵称" :show-action="false" bg-color="#F5F5F5" search-icon-color="#ccc" color="#666" height="58" @search="getListInit" @clear="handerClear"></u-search>
|
||||||
</div>
|
</div>
|
||||||
</AiTopFixed>
|
</AiTopFixed>
|
||||||
<div class="list">
|
<div class="list">
|
||||||
@@ -35,6 +35,7 @@ export default {
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
areaId: '',
|
areaId: '',
|
||||||
|
current: 1,
|
||||||
areaName: '',
|
areaName: '',
|
||||||
groupName: '',
|
groupName: '',
|
||||||
list: []
|
list: []
|
||||||
@@ -44,7 +45,7 @@ export default {
|
|||||||
created() {
|
created() {
|
||||||
this.areaId = this.user.areaId
|
this.areaId = this.user.areaId
|
||||||
this.areaName = this.user.areaName
|
this.areaName = this.user.areaName
|
||||||
this.getList()
|
this.getListInit()
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
document.title = '居民群详情'
|
document.title = '居民群详情'
|
||||||
@@ -52,16 +53,38 @@ export default {
|
|||||||
methods: {
|
methods: {
|
||||||
handerClear() {
|
handerClear() {
|
||||||
this.groupName = ''
|
this.groupName = ''
|
||||||
|
this.getListInit()
|
||||||
|
},
|
||||||
|
getListInit() {
|
||||||
|
this.list = []
|
||||||
|
this.current = 1
|
||||||
this.getList()
|
this.getList()
|
||||||
},
|
},
|
||||||
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) {
|
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()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user