From 282dc521489986add10c9f5339781a80bc25c4fc Mon Sep 17 00:00:00 2001 From: shijingjing <1789544664@qq.com> Date: Tue, 28 Feb 2023 14:58:47 +0800 Subject: [PATCH] =?UTF-8?q?=E8=BF=87=E6=BB=A4=E6=95=B0=E6=8D=AE=E6=85=A2?= =?UTF-8?q?=EF=BC=8C=E6=B7=BB=E5=8A=A0loading=E6=95=88=E6=9E=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../selectGridMember.vue | 5 +++++ .../AppCooperationPropaganda/sendScoped.vue | 18 +++++++++++++++--- 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/src/project/huizhili/AppCooperationPropaganda/selectGridMember.vue b/src/project/huizhili/AppCooperationPropaganda/selectGridMember.vue index 75cd01b5..26fd3c4c 100644 --- a/src/project/huizhili/AppCooperationPropaganda/selectGridMember.vue +++ b/src/project/huizhili/AppCooperationPropaganda/selectGridMember.vue @@ -55,12 +55,17 @@ export default { }, methods: { getAllGrids() { + uni.showLoading({title: '加载中'}) this.$http.post('/app/appgirdinfo/listByInfo').then((res) => { if (res?.data) { let parents = res.data.map(e => e.parentGirdId) this.allData = res.data.map(e => ({...e, hasChildren: parents.includes(e.id)})) this.gridInit() } + }).then(()=> { + uni.hideLoading() + }).finally(()=> { + uni.hideLoading() }) }, gridInit() { diff --git a/src/project/huizhili/AppCooperationPropaganda/sendScoped.vue b/src/project/huizhili/AppCooperationPropaganda/sendScoped.vue index 95f5a0b4..1dc47fe1 100644 --- a/src/project/huizhili/AppCooperationPropaganda/sendScoped.vue +++ b/src/project/huizhili/AppCooperationPropaganda/sendScoped.vue @@ -55,30 +55,37 @@ export default { uni.setStorageSync('sendScope', this.sendScope) }, submit() { + this.$loading() if(this.sendType == 'ResidentsGroup') { this.getWxGroups() } else if(this.sendType == 'Residents' || this.sendType == 'CircleOfFriends') { this.getSendScope() } uni.setStorageSync('sendScope', this.sendScope) - setTimeout(() => { - uni.navigateBack() - }, 600) + }, // 群发居民群 getWxGroups() { + uni.showLoading({title: '加载中'}) this.$http.post(`/app/appmasssendingtask/queryWxGroups?sendScope=${this.sendScope}`, { filterCriteria: this.girdListIds.join(',') || this.deptListIds.join(',') || '' }).then(res => { if (res.code === 0) { this.wxGroups = res.data + uni.hideLoading() uni.setStorageSync('wxGroupsUser', this.wxGroups) } + }).then(()=> { + uni.hideLoading() + uni.navigateBack() + }).finally(()=> { + uni.hideLoading() }) }, // 群发朋友圈、居民 getSendScope() { + uni.showLoading({title: '加载中'}) let formData = {} if(this.sendScope == 0) { formData = { @@ -106,6 +113,11 @@ export default { } uni.setStorageSync('wxGroupsUser', this.wxGroups) } + }).then(()=> { + uni.hideLoading() + uni.navigateBack() + }).finally(()=> { + uni.hideLoading() }) } },