Browse Source

支付弹窗

zhangdehua 1 year ago
parent
commit
1c20c5f539
1 changed files with 2 additions and 1 deletions
  1. 2 1
      app/index/view/cart/shoppingCart.html

+ 2 - 1
app/index/view/cart/shoppingCart.html

@@ -565,8 +565,9 @@
             const {status, message, data} = res || {}
             if (status === 200 || status === "200") {
                 //window.open(data.payment.approval_link, "_blank");
+                let left = (window.innerWidth - 600) / 2;
                 window.open(data.payment.approval_link, "PayPal",
-                'height=300,width=600,top=300,left=200,toolbar=no,menubar=no, scrollbars=no,resizable=no,location=no, status=no'
+                'height=300,width=600,top=300,left='+left+',toolbar=no,menubar=no, scrollbars=no,resizable=no,location=no, status=no'
             );
                 var interId = setInterval(function () {
                     fetchOrder(data.orderId, interId);