$route(to, from) {
if (from.name == 'addExchangeActionList' || from.name == 'addRedeemCode') {
if (Object.keys(from.query).length > 0) {
if (this.activeName == 0) {
this.getRedeemList()
this.$parent.childPageOptions[0].name = '兑换码'
} else {
this.getExchangeActionList()
this.$parent.childPageOptions[0].name = '提取码'
}
} else {
this.formData.page = 1
this.formData.name = ''
this.formData.type = 0
if (this.activeName == 0) {
this.getRedeemList()
this.$parent.childPageOptions[0].name = '兑换码'
} else {
this.getExchangeActionList()
this.$parent.childPageOptions[0].name = '提取码'
}
}
} else if (from.name == 'editExchangeActionList' || from.name == 'editRedeemCode') {
if (this.activeName == 0) {
this.getRedeemList()
this.$parent.childPageOptions[0].name = '兑换码'
} else {
this.getExchangeActionList()
this.$parent.childPageOptions[0].name = '提取码'
}
}
}
$route(to, from)路由监听来去
最新推荐文章于 2023-03-01 15:12:54 发布