Showing
1 changed file
with
14 additions
and
14 deletions
@@ -33,23 +33,10 @@ export default { | @@ -33,23 +33,10 @@ export default { | ||
33 | mounted() { | 33 | mounted() { |
34 | }, | 34 | }, |
35 | activated() { | 35 | activated() { |
36 | - this.check().catch((result) => { | ||
37 | - this.init(); | ||
38 | - if (result?.data?.statusDetail?.leftTime < 60) { | ||
39 | - this.count = result?.data?.statusDetail?.leftTime; | ||
40 | - } | ||
41 | - }); | ||
42 | - }, | ||
43 | - init() { | ||
44 | - if (this.payParams) { | ||
45 | - this.openPay(); | ||
46 | - } | ||
47 | - | ||
48 | - this.setCount(); | ||
49 | - | ||
50 | if (this.extra) { | 36 | if (this.extra) { |
51 | this.page = JSON.parse(this.extra || '{}'); | 37 | this.page = JSON.parse(this.extra || '{}'); |
52 | } | 38 | } |
39 | + this.init(); | ||
53 | }, | 40 | }, |
54 | beforeRouteLeave(to, from, next) { | 41 | beforeRouteLeave(to, from, next) { |
55 | if (this.timer) { | 42 | if (this.timer) { |
@@ -60,6 +47,19 @@ export default { | @@ -60,6 +47,19 @@ export default { | ||
60 | }, | 47 | }, |
61 | methods: { | 48 | methods: { |
62 | ...mapOrderAction(['fetchOrderStatus']), | 49 | ...mapOrderAction(['fetchOrderStatus']), |
50 | + init() { | ||
51 | + this.check().catch((result) => { | ||
52 | + if (result?.data?.statusDetail?.leftTime < 60) { | ||
53 | + this.count = result?.data?.statusDetail?.leftTime; | ||
54 | + } | ||
55 | + | ||
56 | + if (this.payParams) { | ||
57 | + this.openPay(); | ||
58 | + } | ||
59 | + | ||
60 | + this.setCount(); | ||
61 | + }); | ||
62 | + }, | ||
63 | openPay() { | 63 | openPay() { |
64 | if (this.$xianyu.isAliApp) { | 64 | if (this.$xianyu.isAliApp) { |
65 | this.$xianyu.setXianyuPay({ | 65 | this.$xianyu.setXianyuPay({ |
-
Please register or login to post a comment