wangfukang 1 month ago
parent
commit
77dded83a5
  1. 22
      pages/index/index.vue

22
pages/index/index.vue

@ -722,6 +722,7 @@
currentIndex: 0, currentIndex: 0,
isTabBarVisible: true, isTabBarVisible: true,
pendingTabIndex: null, pendingTabIndex: null,
pendingDeliveryRuleConfirm: false,
pendingShareTargetPath: '', pendingShareTargetPath: '',
width: 0, width: 0,
dataTabList: [{ dataTabList: [{
@ -900,6 +901,9 @@
this.pendingTabIndex = tabIndex this.pendingTabIndex = tabIndex
} }
} }
if (option && option.deliveryRuleEdited == 1) {
this.pendingDeliveryRuleConfirm = true
}
const shareTargetPath = resolveHomeShareTarget(option) const shareTargetPath = resolveHomeShareTarget(option)
if (shareTargetPath) { if (shareTargetPath) {
this.pendingShareTargetPath = shareTargetPath this.pendingShareTargetPath = shareTargetPath
@ -911,10 +915,15 @@
if (this.openShareTargetIfNeeded()) return if (this.openShareTargetIfNeeded()) return
if (this.pendingTabIndex !== null) { if (this.pendingTabIndex !== null) {
const tabIndex = this.pendingTabIndex const tabIndex = this.pendingTabIndex
const shouldShowDeliveryRuleConfirm = this.pendingDeliveryRuleConfirm && tabIndex == 1
this.pendingTabIndex = null this.pendingTabIndex = null
this.pendingDeliveryRuleConfirm = false
this.$nextTick(() => { this.$nextTick(() => {
Promise.resolve(this.refreshTabCounts()).then(() => { Promise.resolve(this.refreshTabCounts()).then(() => {
this.changeIndex(tabIndex) this.changeIndex(tabIndex)
if (shouldShowDeliveryRuleConfirm) {
this.showDeliveryRuleEditedConfirm()
}
}) })
}) })
} else { } else {
@ -923,6 +932,10 @@
if (this.currentIndex == 4 && this.$refs.myCenterPage) { if (this.currentIndex == 4 && this.$refs.myCenterPage) {
this.$refs.myCenterPage.init() this.$refs.myCenterPage.init()
} }
if (this.pendingDeliveryRuleConfirm && this.currentIndex == 1) {
this.pendingDeliveryRuleConfirm = false
this.showDeliveryRuleEditedConfirm()
}
}) })
}) })
} }
@ -953,6 +966,15 @@
} }
return Promise.resolve() return Promise.resolve()
}, },
showDeliveryRuleEditedConfirm() {
this.$nextTick(() => {
setTimeout(() => {
if (this.$refs.deLiveryPage && this.$refs.deLiveryPage.showRuleEditedConfirm) {
this.$refs.deLiveryPage.showRuleEditedConfirm()
}
}, 300)
})
},
runHomeInit() { runHomeInit() {
// //
this.indexInit() this.indexInit()

Loading…
Cancel
Save