diff --git a/README.md b/README.md index d6d616d..173d5bb 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ @@ -192,4 +192,5 @@ fix ## v1.0.20 `2023.2.25` fix -- 修复 调起微信支付异常的问题 \ No newline at end of file +- 修复 调起微信支付异常的问题 +- 修复 获取imei异常的问题 \ No newline at end of file diff --git a/src/views/package-home/index.vue b/src/views/package-home/index.vue index 87622d8..f341d25 100644 --- a/src/views/package-home/index.vue +++ b/src/views/package-home/index.vue @@ -1,7 +1,7 @@ @@ -46,7 +46,7 @@ export default { let timeStamp = new Date().getTime(); let code = url.split("&")[0]; if (isNotNull(code)) { - this.$store.commit("wxAuthCode", `${code}`); + this.$store.commit("wxAuthCode", code); /* this.getOpenId(); */ } } else { diff --git a/src/views/package-list/index.vue b/src/views/package-list/index.vue index 2d9e066..43cea5b 100644 --- a/src/views/package-list/index.vue +++ b/src/views/package-list/index.vue @@ -1,7 +1,7 @@ @@ -119,12 +119,17 @@ export default { // 根据code获取openId getOpenId() { let code = this.$store.getters.wxAuthCode; - APIPay.getOpenId(code).then(res => { - let data= res.data; - if(data.code === 20000) { - this.$store.commit("openId", data.data.openId); - } - }) + let openId = this.$store.getters.openId; + if(isNotNull(openId)) { + console.log("已经存在openId"); + } else { + APIPay.getOpenId(code).then(res => { + let data= res.data; + if(data.code === 20000) { + this.$store.commit("openId", data.data.openId); + } + }) + } }, // 获取b端接口的token getAuth() { @@ -298,7 +303,7 @@ export default { rechargeUrl: data.rechargeUrl, iccid: that.params.iccid, isAdmin: that.$route.query.isAdmin || false, - serialNo: that.$route.query.serialNo, + serialNo: that.params.imei, issue: data.packageIssue } }); @@ -367,9 +372,9 @@ export default { outTradeNo: that.outTradeNo, price: that.price, alipayForm: alipayForm, - iccid: that.$route.query.iccid, + iccid: that.params.iccid, isAdmin: that.$route.query.isAdmin || false, - serialNo: that.$route.query.serialNo, + serialNo: that.params.imei, alipayUserId: alipayUserId, productId: data.productId }