wangfukang 1 month ago
parent
commit
627dadb39c
  1. 17
      pages/index/index.vue

17
pages/index/index.vue

@ -915,8 +915,18 @@
const tabIndex = this.pendingTabIndex const tabIndex = this.pendingTabIndex
this.pendingTabIndex = null this.pendingTabIndex = null
this.$nextTick(() => { this.$nextTick(() => {
Promise.resolve(this.refreshTabCounts()).then(() => {
this.changeIndex(tabIndex) this.changeIndex(tabIndex)
}) })
})
} else {
this.$nextTick(() => {
Promise.resolve(this.refreshTabCounts()).then(() => {
if (this.currentIndex == 4 && this.$refs.myCenterPage) {
this.$refs.myCenterPage.init()
}
})
})
} }
}, },
onReady() { onReady() {
@ -926,6 +936,12 @@
}, 500); }, 500);
}, },
methods: { methods: {
refreshTabCounts() {
if (this.$refs.tabBar && this.$refs.tabBar.getWorkerCounts) {
return this.$refs.tabBar.getWorkerCounts()
}
return Promise.resolve()
},
runHomeInit() { runHomeInit() {
// //
this.indexInit() this.indexInit()
@ -1013,7 +1029,6 @@
this.searchForm.kuaidiData = []; this.searchForm.kuaidiData = [];
this.getDelivery(); this.getDelivery();
this.getShopArea(); this.getShopArea();
this.$refs.tabBar.getWorkerCounts()
} }
// sticky offsetstatusBarHeight + 40px // sticky offsetstatusBarHeight + 40px
const info = uni.getSystemInfoSync(); const info = uni.getSystemInfoSync();

Loading…
Cancel
Save