浏览代码

支付弹窗

zhangdehua 1 年之前
父节点
当前提交
02acad7331
共有 2 个文件被更改,包括 11 次插入8 次删除
  1. 8 5
      app/index/view/cart/shoppingCart.html
  2. 3 3
      app/index/view/user/orderDetails.html

+ 8 - 5
app/index/view/cart/shoppingCart.html

@@ -494,7 +494,7 @@
                             showToast("Successful")
                             window.location.href = '../cart/shoppingCart';
                         } else if (obj.status === 401 || obj.status === '401') {
-                            window.location.replace('../passport/logIn.html')
+                            window.location.replace('/index/passport/login.html');
                         } else {
                             showToast(obj.message)
                         }
@@ -530,7 +530,7 @@
                             //showToast("Successful")
                             window.location.href = '../cart/shoppingCart';
                         } else if (obj.status === 401 || obj.status === '401') {
-                            window.location.replace('../passport/logIn.html')
+                            window.location.replace('/index/passport/login.html');
                         } else {
                             showToast(obj.message)
                         }
@@ -564,12 +564,15 @@
             const res = await orderPayment(params)
             const {status, message, data} = res || {}
             if (status === 200 || status === "200") {
-                window.open(data.payment.approval_link, "_blank");
+                //window.open(data.payment.approval_link, "_blank");
+                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'
+            );
                 var interId = setInterval(function () {
                     fetchOrder(data.orderId, interId);
                 }, 3000)
             } else if (status === 401 || status === "401") {
-                window.location.replace('../passport/logIn.html')
+                window.location.replace('/index/passport/login.html');
             } else {
                 showToast(message)
                 $("#loadingModel").hide(0)
@@ -612,7 +615,7 @@
             } else if (status === 401 || status === "401") {
                 showToast('Login first!')
                 setTimeout(function () {
-                    window.location.replace('../passport/logIn.html')
+                    window.location.replace('/index/passport/login.html');
                 }, 3000)
                 //window.location.replace('../passport/logIn.html')
             } else {

+ 3 - 3
app/index/view/user/orderDetails.html

@@ -441,7 +441,7 @@
                     fetchOrder(interId);
                 }, 3000)
             } else if (status === 401 || status === "401") {
-                window.location.replace('../passport/logIn.html')
+                window.location.replace('/index/passport/login.html');
             } else {
                 showToast(message)
             }
@@ -467,7 +467,7 @@
                             }
                             , 3000)
                     } else if (obj.status === 401 || obj.status === '401') {
-                        window.location.replace('../passport/logIn.html')
+                        window.location.replace('/index/passport/login.html');
                     } else {
                         showToast('Something wrong,please try again later')
                     }
@@ -594,7 +594,7 @@
                         $("#evaluateModal").hide(0)
                         goodsId = null
                     } else if (obj.status === 401 || obj.status === '401') {
-                        window.location.replace('../passport/logIn.html')
+                        window.location.replace('/index/passport/login.html');
                     } else {
                         showToast('Something wrong,please try again later')
                     }