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 | 61 | }, |
62 | 62 | onLoad() { |
63 | 63 | uni.setStorageSync("wxCode", '') |
64 | - this.getCode(); | |
64 | + | |
65 | 65 | this.recharge(); |
66 | 66 | this.rechargeList(); |
67 | 67 | }, |
... | ... | @@ -70,12 +70,15 @@ export default { |
70 | 70 | onShow() { |
71 | 71 | }, |
72 | 72 | methods: { |
73 | + | |
73 | 74 | getCode() { |
75 | + let that = this | |
74 | 76 | uni.login({ |
75 | 77 | provider: 'weixin', |
76 | 78 | success: function (loginRes) { |
77 | 79 | console.log('获取微信code-loginRes.code: ' + loginRes.code); |
78 | 80 | uni.setStorageSync("wxCode", loginRes.code) |
81 | + that.getOpenID() | |
79 | 82 | } |
80 | 83 | }); |
81 | 84 | }, |
... | ... | @@ -159,7 +162,8 @@ export default { |
159 | 162 | }, |
160 | 163 | payClick() { |
161 | 164 | let that = this; |
162 | - that.getOpenID() | |
165 | + this.getCode(); | |
166 | + | |
163 | 167 | }, |
164 | 168 | wxPayOrder() { |
165 | 169 | let that = this; | ... | ... |