From 9b8bade59768e8bdde7cc70862a3b4d543992bf0 Mon Sep 17 00:00:00 2001 From: liugongyu <290219706@qq.com> Date: Wed, 22 Jun 2022 17:24:02 +0800 Subject: [PATCH] 商户券 有效期 --- pages/moneyRecharge/moneyRecharge.vue | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/pages/moneyRecharge/moneyRecharge.vue b/pages/moneyRecharge/moneyRecharge.vue index e0767ca..82a258f 100644 --- a/pages/moneyRecharge/moneyRecharge.vue +++ b/pages/moneyRecharge/moneyRecharge.vue @@ -61,7 +61,7 @@ export default { }, onLoad() { uni.setStorageSync("wxCode", '') - this.getCode(); + this.recharge(); this.rechargeList(); }, @@ -70,12 +70,15 @@ export default { onShow() { }, methods: { + getCode() { + let that = this uni.login({ provider: 'weixin', success: function (loginRes) { console.log('获取微信code-loginRes.code: ' + loginRes.code); uni.setStorageSync("wxCode", loginRes.code) + that.getOpenID() } }); }, @@ -159,7 +162,8 @@ export default { }, payClick() { let that = this; - that.getOpenID() + this.getCode(); + }, wxPayOrder() { let that = this; -- libgit2 0.21.4