diff --git a/pages/home/index.vue b/pages/home/index.vue index cde3e57..9286a2b 100644 --- a/pages/home/index.vue +++ b/pages/home/index.vue @@ -1397,6 +1397,12 @@ export default { this.$yrouter.push('/pages/home/newZone') }, goExperienceCoupon() { + if (this.hasUnusedExperienceCoupon === 0) { + uni.navigateTo({ + url: '/pages/order/MyOrder/index?type=3&tabIndex=1' + }) + return + } this.$yrouter.push('/pkg_product/views/experienceCoupon') }, init() { diff --git a/pages/order/MyOrder/index.vue b/pages/order/MyOrder/index.vue index 7e3d45e..ab9b4b4 100644 --- a/pages/order/MyOrder/index.vue +++ b/pages/order/MyOrder/index.vue @@ -642,7 +642,11 @@ export default { }, onLoad() { this.type = this.type || parseInt(this.$yroute.query.type) || 0 - this.changeType(this.type) + this.orderTypeTabIndex = parseInt(this.$yroute.query.tabIndex) || 0 + this.orderTypeTabChange({ + ...this.orderTypeTabList[this.orderTypeTabIndex], + index: this.orderTypeTabIndex + }) }, onShareAppMessage() { uni.updateShareMenu({ @@ -957,7 +961,7 @@ export default { this.orderTypeTabIndex = item.index this.orderType = item.orderType this.updateTabListByOrderType() - this.changeType() + this.changeType(this.type) }, updateTabListByOrderType() { if (this.orderType === 'travel') {