From 08c2a2aff9243bb5e9130efc8f48805c55e8b776 Mon Sep 17 00:00:00 2001 From: JinxChen <2183691628@qq.com> Date: Wed, 1 Mar 2023 17:53:08 +0800 Subject: [PATCH] =?UTF-8?q?feature=20-=20=E4=BF=AE=E5=A4=8D=20=E5=B7=B2?= =?UTF-8?q?=E8=B4=AD=E4=B9=B0=E6=9C=AA=E6=BF=80=E6=B4=BB=E6=9C=AA=E8=B7=B3?= =?UTF-8?q?=E8=BD=AC=E5=AE=B9=E9=94=99=E9=A1=B5=E9=9D=A2=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 5 +++-- src/views/package-home/index.vue | 17 +++++++++++------ src/views/package-list/index.vue | 6 +++--- 3 files changed, 17 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 9c97d02..cdec73c 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ @@ -239,4 +239,5 @@ update ## v1.0.27 `2023.3.1` feature -- 增加 已购买未激活容错页面 \ No newline at end of file +- 增加 已购买未激活容错页面 +- 修复 已购买未激活未跳转容错页面的问题 \ No newline at end of file diff --git a/src/views/package-home/index.vue b/src/views/package-home/index.vue index 88faf75..814af95 100644 --- a/src/views/package-home/index.vue +++ b/src/views/package-home/index.vue @@ -1,7 +1,7 @@ @@ -31,7 +31,7 @@ export default { this.checkImei(); }, mounted() { - this.checkBrowser(); + //this.checkBrowser(); }, methods: { checkImei() { @@ -45,7 +45,8 @@ export default { if(data) { this.isRecharge = data.isRecharge; console.log("是否已经支付", this.isRecharge); - } + }; + this.checkBrowser(); }).catch(e => { console.log("e", e.message); }) @@ -114,9 +115,13 @@ export default { let commonUrl = process.env.VUE_APP_BASE_API; if(this.isRecharge) { // 如果是已经支付,但未激活,跳转激活界面 - let redUrl = encodeURIComponent(`${commonUrl}/h5-frontendweb/#/cardActive?imei=${params.imei}&appId=${params.appId}&iccid=${params.iccid}`); - let url = `https://open.weixin.qq.com/connect/oauth2/authorize?appid=${params.appId}&redirect_uri=${redUrl}&response_type=code&scope=snsapi_base&state=STATE#wechat_redirect`; - window.location.href = url; + this.$router.replace({ + name: 'cardActive', + query: { + imei: params.imei, + iccid: params.iccid + } + }) } else { let redUrl = encodeURIComponent(`${commonUrl}/h5-frontendweb/#/${params.routerName}?imei=${params.imei}&appId=${params.appId}&iccid=${params.iccid}`); let url = `https://open.weixin.qq.com/connect/oauth2/authorize?appid=${params.appId}&redirect_uri=${redUrl}&response_type=code&scope=snsapi_base&state=STATE#wechat_redirect`; diff --git a/src/views/package-list/index.vue b/src/views/package-list/index.vue index d0ddcf2..01f8d19 100644 --- a/src/views/package-list/index.vue +++ b/src/views/package-list/index.vue @@ -1,7 +1,7 @@ @@ -315,9 +315,9 @@ export default { packageIssue: 12, //分期 packagePrice: process.env.NODE_ENV === "production" ? data.packagePrice * 100 : 1 //总金额单位为分,测试环境写死 }; + this.$toast.clear(); APICore.payLiveBaseDevice(reqBody) .then(res => { - this.$toast.clear(); if (res.data.code === 104 || res.data.code === 106) { this.getAuth(); setTimeout(() => { @@ -354,7 +354,7 @@ export default { paySign: wxData.paySign, // 支付签名 success: function(res) { // 支付成功后的回调函数 - that.$router.push({ + that.$router.replace({ name: "payResult", query: { outTradeNo: that.outTradeNo,