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() }) } },