|
|
|
@ -243,7 +243,7 @@ |
|
|
|
<de-livery ref="deLiveryPage" @tabbar-visible-change="setTabBarVisible"></de-livery> |
|
|
|
</view> |
|
|
|
<view class="swiper-page" v-show="currentIndex == 2"> |
|
|
|
<my-center ref="myCenter"></my-center> |
|
|
|
<my-center ref="myCenterPage"></my-center> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<!-- 弹出区域选择 --> |
|
|
|
@ -500,33 +500,35 @@ |
|
|
|
} |
|
|
|
}, |
|
|
|
onShow() { |
|
|
|
this.indexInit() |
|
|
|
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) |
|
|
|
let that = this; |
|
|
|
that.indexInit() |
|
|
|
if (that.pendingTabIndex !== null) { |
|
|
|
const tabIndex = that.pendingTabIndex |
|
|
|
const shouldShowDeliveryRuleConfirm = that.pendingDeliveryRuleConfirm && tabIndex == 1 |
|
|
|
that.pendingTabIndex = null |
|
|
|
that.pendingDeliveryRuleConfirm = false |
|
|
|
that.$nextTick(() => { |
|
|
|
Promise.resolve(that.refreshTabCounts()).then(() => { |
|
|
|
that.changeIndex(tabIndex) |
|
|
|
if (shouldShowDeliveryRuleConfirm) { |
|
|
|
this.showDeliveryRuleEditedConfirm() |
|
|
|
that.showDeliveryRuleEditedConfirm() |
|
|
|
} |
|
|
|
}) |
|
|
|
}) |
|
|
|
} else { |
|
|
|
this.$nextTick(() => { |
|
|
|
Promise.resolve(this.refreshTabCounts()).then(() => { |
|
|
|
if (this.currentIndex == 4 && this.$refs.myCenterPage) { |
|
|
|
this.$refs.myCenterPage.init() |
|
|
|
that.$nextTick(() => { |
|
|
|
Promise.resolve(that.refreshTabCounts()).then(() => { |
|
|
|
if (that.currentIndex == 4 && that.$refs.myCenterPage) { |
|
|
|
that.$refs.myCenterPage.init() |
|
|
|
} |
|
|
|
if (this.pendingDeliveryRuleConfirm && this.currentIndex == 1) { |
|
|
|
this.pendingDeliveryRuleConfirm = false |
|
|
|
this.showDeliveryRuleEditedConfirm() |
|
|
|
if (that.pendingDeliveryRuleConfirm && that.currentIndex == 1) { |
|
|
|
that.pendingDeliveryRuleConfirm = false |
|
|
|
that.showDeliveryRuleEditedConfirm() |
|
|
|
} |
|
|
|
}) |
|
|
|
}) |
|
|
|
} |
|
|
|
that.$refs.myCenterPage.init() |
|
|
|
}, |
|
|
|
onHide() { |
|
|
|
this.closeProductPopup() |
|
|
|
@ -549,10 +551,11 @@ |
|
|
|
return Promise.resolve() |
|
|
|
}, |
|
|
|
showDeliveryRuleEditedConfirm() { |
|
|
|
let that = this; |
|
|
|
this.$nextTick(() => { |
|
|
|
setTimeout(() => { |
|
|
|
if (this.$refs.deLiveryPage && this.$refs.deLiveryPage.showRuleEditedConfirm) { |
|
|
|
this.$refs.deLiveryPage.showRuleEditedConfirm() |
|
|
|
if (that.$refs.deLiveryPage && that.$refs.deLiveryPage.showRuleEditedConfirm) { |
|
|
|
that.$refs.deLiveryPage.showRuleEditedConfirm() |
|
|
|
} |
|
|
|
}, 300) |
|
|
|
}) |
|
|
|
@ -1053,17 +1056,17 @@ |
|
|
|
//底部tab切换组件状态改变 |
|
|
|
changeIndex(index, type) { |
|
|
|
let that = this; |
|
|
|
this.lastIndex = this.currentIndex |
|
|
|
this.currentIndex = index |
|
|
|
that.lastIndex = that.currentIndex |
|
|
|
that.currentIndex = index |
|
|
|
switch (index) { |
|
|
|
case 0: |
|
|
|
this.indexInit() |
|
|
|
that.indexInit() |
|
|
|
break; |
|
|
|
case 1: |
|
|
|
that.$refs.deLiveryPage.init(type) |
|
|
|
break; |
|
|
|
case 2: |
|
|
|
that.$refs.myCenter.init() |
|
|
|
that.$refs.myCenterPage.init() |
|
|
|
break; |
|
|
|
} |
|
|
|
|
|
|
|
|