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,