|
@@ -101,6 +101,13 @@ export default class Pay extends Vue {
|
|
|
|
|
|
beforeRouteLeave (to, from, next) {
|
|
|
clearInterval(this.checkPaySuccessTimer)
|
|
|
+
|
|
|
+ // app端(不跳出vue程序) --- 支付返回订单详情
|
|
|
+ // (由于微信端使用location.href跳转,故此处监听不到,不会执行)
|
|
|
+ const arr = ['buy', 'detail']
|
|
|
+ if (arr.includes(to.name) && from.name === 'pay') {
|
|
|
+ next({ path: `/order/detail/${this.orderInfo.ordercode}` })
|
|
|
+ }
|
|
|
next()
|
|
|
}
|
|
|
|
|
@@ -245,7 +252,7 @@ export default class Pay extends Vue {
|
|
|
}
|
|
|
|
|
|
appPayCancelCallBack () {
|
|
|
- this.$router.replace({ path: `/order/detail/${this.orderInfo.ordercode}` })
|
|
|
+ this.$router.back()
|
|
|
}
|
|
|
|
|
|
// 开启定时任务,3s查询一次是否支付成功
|