ソースを参照

支付在本页面显示

zhangdehua 11 ヶ月 前
コミット
3be4ba14f7
2 ファイル変更14 行追加31 行削除
  1. 3 12
      app/index/view/cart/shoppingCart.html
  2. 11 19
      app/index/view/user/orderDetails.html

+ 3 - 12
app/index/view/cart/shoppingCart.html

@@ -540,6 +540,8 @@
                 // const res = await addAddress()
                 // addressId = res
             }
+
+            //popup new window to paypal
             //let left = (window.innerWidth - 600) / 2;
             // var importantStuff = window.open('', '_blank',
             //         'height=500,width=600,top=300,left=' + left + ',toolbar=no,menubar=no, scrollbars=no,resizable=no,location=no, status=no');
@@ -548,7 +550,6 @@
 
             window.document.write('Preparing payment...');
 
-
             const params = {
                 //"cartIds": "10002",
                 "delivery": 10,
@@ -557,20 +558,10 @@
             const res = await orderPayment(params)
             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=' + left + ',toolbar=no,menubar=no, scrollbars=no,resizable=no,location=no, status=no');
-*/
                 window.location.replace(data.payment.approval_link);
-
+                //popup new window to paypal
                 //importantStuff.location.href = data.payment.approval_link;
 
-                // let uri = data.payment.approval_link;
-                // let id = "paypal"
-                // createSuperLabel(uri, id)
-
                 var interId = setInterval(function () {
                     fetchOrder(data.orderId, interId);
                 }, 3000)

+ 11 - 19
app/index/view/user/orderDetails.html

@@ -430,30 +430,22 @@
 
         //支付按钮点击
         $("#continuePayBtn").on(tap, async function () {
-            let left = (window.innerWidth - 600) / 2;
-            var importantStuff = window.open('', '_blank',
-                'height=500,width=600,top=300,left=' + left + ',toolbar=no,menubar=no, scrollbars=no,resizable=no,location=no, status=no');
-            importantStuff.document.write('Preparing payment...');
-
-            loadingModelEle.show(0)
+            //popup new window to paypal
+            // let left = (window.innerWidth - 600) / 2;
+            // var importantStuff = window.open('', '_blank',
+            //     'height=500,width=600,top=300,left=' + left + ',toolbar=no,menubar=no, scrollbars=no,resizable=no,location=no, status=no');
+            // importantStuff.document.write('Preparing payment...');
+            //
+            // loadingModelEle.show(0)
+            window.document.write('Preparing payment...');
 
             const params = {}
             const res = await orderPayment(params)
             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='+left+',toolbar=no,menubar=no, scrollbars=no,resizable=no,location=no, status=no');
-*/
-                importantStuff.location.href = data.payment.approval_link;
-
-
-                /*                let uri = data.payment.approval_link;
-                                let id = "paypal"
-                                createSuperLabel(uri, id)*/
-
+                //popup new window to paypal
+                //importantStuff.location.href = data.payment.approval_link;
+                window.location.replace(data.payment.approval_link);
                 var interId = setInterval(function () {
                     fetchOrder(interId);
                 }, 3000)