diff --git a/pages/index/index.vue b/pages/index/index.vue index 80d2656..b6a4fc5 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -722,6 +722,7 @@ currentIndex: 0, isTabBarVisible: true, pendingTabIndex: null, + pendingDeliveryRuleConfirm: false, pendingShareTargetPath: '', width: 0, dataTabList: [{ @@ -900,6 +901,9 @@ this.pendingTabIndex = tabIndex } } + if (option && option.deliveryRuleEdited == 1) { + this.pendingDeliveryRuleConfirm = true + } const shareTargetPath = resolveHomeShareTarget(option) if (shareTargetPath) { this.pendingShareTargetPath = shareTargetPath @@ -911,10 +915,15 @@ if (this.openShareTargetIfNeeded()) return if (this.pendingTabIndex !== null) { const tabIndex = this.pendingTabIndex + const shouldShowDeliveryRuleConfirm = this.pendingDeliveryRuleConfirm && tabIndex == 1 this.pendingTabIndex = null + this.pendingDeliveryRuleConfirm = false this.$nextTick(() => { Promise.resolve(this.refreshTabCounts()).then(() => { this.changeIndex(tabIndex) + if (shouldShowDeliveryRuleConfirm) { + this.showDeliveryRuleEditedConfirm() + } }) }) } else { @@ -923,6 +932,10 @@ if (this.currentIndex == 4 && this.$refs.myCenterPage) { this.$refs.myCenterPage.init() } + if (this.pendingDeliveryRuleConfirm && this.currentIndex == 1) { + this.pendingDeliveryRuleConfirm = false + this.showDeliveryRuleEditedConfirm() + } }) }) } @@ -953,6 +966,15 @@ } return Promise.resolve() }, + showDeliveryRuleEditedConfirm() { + this.$nextTick(() => { + setTimeout(() => { + if (this.$refs.deLiveryPage && this.$refs.deLiveryPage.showRuleEditedConfirm) { + this.$refs.deLiveryPage.showRuleEditedConfirm() + } + }, 300) + }) + }, runHomeInit() { // 保证首页数据实时:每次显示首页都重新初始化数据。 this.indexInit()