From 0d398baf6e689b53d970627d5e5ca2bb26e7109a Mon Sep 17 00:00:00 2001 From: wxd <1627315083@qq.com> Date: Thu, 12 Sep 2024 20:28:52 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=A7=BB=E5=8A=A8=E7=AB=AFip?= =?UTF-8?q?ad=E6=97=A0=E6=B3=95=E6=94=AF=E4=BB=98=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/component/HomePage/UpgradePlan.vue | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/src/component/HomePage/UpgradePlan.vue b/src/component/HomePage/UpgradePlan.vue index 15b5e879..9b34a2ad 100644 --- a/src/component/HomePage/UpgradePlan.vue +++ b/src/component/HomePage/UpgradePlan.vue @@ -254,7 +254,6 @@ export default defineComponent({ }else{ httpsUrl = Https.httpUrls.payAlipayHK+`/${this.modeOfPaymentDetail}/${this.price.num}` } - Https.axiosPost(httpsUrl).then( (rv: any) => { var width = 800; @@ -262,18 +261,27 @@ export default defineComponent({ var left = (screen.width - width) / 2; var top = (screen.height - height) / 2; this.newWindow = window.open("", "_blank", "width=" + width + ", height=" + height + ", left=" + left + ", top=" + top); + let herf if(this.modeOfPayment == 'paypal'){ // 在新窗口中写入内容 - this.newWindow.location.href = rv.approve; + herf = rv.approve; + // this.newWindow.location.href = rv.approve; }else if(this.modeOfPayment == 'stripe'){ - this.newWindow.location.href = rv + herf = rv + // this.newWindow.location.href = rv }else{ let data = JSON.parse(rv) - let herf = `${data.url}?${data.alipay_order_string}` - this.newWindow.location.href = herf; - // this.newWindow.document.write(herf); + herf = `${data.url}?${data.alipay_order_string}` + // this.newWindow.location.href = herf; + } + console.log(herf); + + if(this.newWindow){ + this.newWindow.location.href = herf + }else{ + // window.open(herf, '_blank'); + window.location.href=herf; } - this.isShowMark = true // this.isShowMark = true } ).catch(res=>{