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=>{