Commit 9b8bade59768e8bdde7cc70862a3b4d543992bf0
1 parent
74df59a8
商户券 有效期
Showing
1 changed file
with
6 additions
and
2 deletions
pages/moneyRecharge/moneyRecharge.vue
@@ -61,7 +61,7 @@ export default { | @@ -61,7 +61,7 @@ export default { | ||
61 | }, | 61 | }, |
62 | onLoad() { | 62 | onLoad() { |
63 | uni.setStorageSync("wxCode", '') | 63 | uni.setStorageSync("wxCode", '') |
64 | - this.getCode(); | 64 | + |
65 | this.recharge(); | 65 | this.recharge(); |
66 | this.rechargeList(); | 66 | this.rechargeList(); |
67 | }, | 67 | }, |
@@ -70,12 +70,15 @@ export default { | @@ -70,12 +70,15 @@ export default { | ||
70 | onShow() { | 70 | onShow() { |
71 | }, | 71 | }, |
72 | methods: { | 72 | methods: { |
73 | + | ||
73 | getCode() { | 74 | getCode() { |
75 | + let that = this | ||
74 | uni.login({ | 76 | uni.login({ |
75 | provider: 'weixin', | 77 | provider: 'weixin', |
76 | success: function (loginRes) { | 78 | success: function (loginRes) { |
77 | console.log('获取微信code-loginRes.code: ' + loginRes.code); | 79 | console.log('获取微信code-loginRes.code: ' + loginRes.code); |
78 | uni.setStorageSync("wxCode", loginRes.code) | 80 | uni.setStorageSync("wxCode", loginRes.code) |
81 | + that.getOpenID() | ||
79 | } | 82 | } |
80 | }); | 83 | }); |
81 | }, | 84 | }, |
@@ -159,7 +162,8 @@ export default { | @@ -159,7 +162,8 @@ export default { | ||
159 | }, | 162 | }, |
160 | payClick() { | 163 | payClick() { |
161 | let that = this; | 164 | let that = this; |
162 | - that.getOpenID() | 165 | + this.getCode(); |
166 | + | ||
163 | }, | 167 | }, |
164 | wxPayOrder() { | 168 | wxPayOrder() { |
165 | let that = this; | 169 | let that = this; |