修复移动端ipad无法支付问题

This commit is contained in:
wxd
2024-09-12 20:28:52 +08:00
parent 254f509604
commit 0d398baf6e

View File

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