tangning 3 месяцев назад
Родитель
Сommit
91f4539337
1 измененных файлов с 11 добавлено и 2 удалено
  1. 11 2
      src/views/pc/index.vue

+ 11 - 2
src/views/pc/index.vue

@@ -32,7 +32,7 @@ const response = ref({
   src: ''
 })
 onMounted(() => {
-  getDetial()
+  // getDetial()
 })
 
 function inverRequest() {
@@ -73,11 +73,18 @@ async function handleQueryOrderStatus() {
 function getDetial() {
   getOrderInfo(orderSn.value).then((res) => {
     orderDetal.value = res
+    if (isEur.value) {
+      selectedPayType.value = orderDetal.value.payType == 5 ? 'paypal' : 'stripe'
+    }
     getCode()
   })
 }
+getDetial()
 function handlePay() {
   if (orderDetal.value.payType == 5 || orderDetal.value.payType == 6) {
+    //打开一个不被拦截的新窗口
+    var win = window.open();
+    win.document.body.innerHTML="正在拼命加载中......";
     openPay({
       orderSn: orderSn.value,
       payType: paysidtype[selectedPayType.value],
@@ -85,7 +92,9 @@ function handlePay() {
       openId: ''
     }).then((res) => {
       qrCodeUrl.value = res.qrCodeUrl || res.redirect
-      window.open(qrCodeUrl.value)
+      // window.open('javascript:;', '<script>console.log(window.name)<\/script>')
+      win.location.href = qrCodeUrl.value;
+      // window.open(qrCodeUrl.value)
       // inverRequest()
     })
   } else {