|
|
|
@ -915,8 +915,18 @@ |
|
|
|
const tabIndex = this.pendingTabIndex |
|
|
|
this.pendingTabIndex = null |
|
|
|
this.$nextTick(() => { |
|
|
|
Promise.resolve(this.refreshTabCounts()).then(() => { |
|
|
|
this.changeIndex(tabIndex) |
|
|
|
}) |
|
|
|
}) |
|
|
|
} else { |
|
|
|
this.$nextTick(() => { |
|
|
|
Promise.resolve(this.refreshTabCounts()).then(() => { |
|
|
|
if (this.currentIndex == 4 && this.$refs.myCenterPage) { |
|
|
|
this.$refs.myCenterPage.init() |
|
|
|
} |
|
|
|
}) |
|
|
|
}) |
|
|
|
} |
|
|
|
}, |
|
|
|
onReady() { |
|
|
|
@ -926,6 +936,12 @@ |
|
|
|
}, 500); |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
refreshTabCounts() { |
|
|
|
if (this.$refs.tabBar && this.$refs.tabBar.getWorkerCounts) { |
|
|
|
return this.$refs.tabBar.getWorkerCounts() |
|
|
|
} |
|
|
|
return Promise.resolve() |
|
|
|
}, |
|
|
|
runHomeInit() { |
|
|
|
// 保证首页数据实时:每次显示首页都重新初始化数据。 |
|
|
|
this.indexInit() |
|
|
|
@ -1013,7 +1029,6 @@ |
|
|
|
this.searchForm.kuaidiData = []; |
|
|
|
this.getDelivery(); |
|
|
|
this.getShopArea(); |
|
|
|
this.$refs.tabBar.getWorkerCounts() |
|
|
|
} |
|
|
|
// 计算导航栏高度用于sticky offset:statusBarHeight + 40px内容区 |
|
|
|
const info = uni.getSystemInfoSync(); |
|
|
|
|