goldzhang814 преди 1 година
родител
ревизия
5396f8066b
променени са 1 файла, в които са добавени 18 реда и са изтрити 0 реда
  1. 18 0
      app/index/view/user/orderDetails.html

+ 18 - 0
app/index/view/user/orderDetails.html

@@ -441,6 +441,13 @@
         </div>
     </div>
 </section>
+
+<div id="loadingModel">
+    <div class="loadingBox">
+        <img src="/assets/index/asstes/icon/loading.gif" alt="Jumping to paypal.">
+    </div>
+</div>
+
 </body>
 <script src="/assets/index/js/jquery-1.12.0.js"></script>
 <script src="/assets/index/js/flexible.js"></script>
@@ -549,6 +556,17 @@
             }
         });
 
+        function fetchOrder(orderId, interId) {
+            $.get('/index/order/detail?orderId=' + orderId, function (res) {
+                console.log(res.data.order.pay_status);
+                if (res.status == 200 && res.data.order.pay_status == 20) {
+                    clearInterval(interId);
+                    $("#loadingModel").hide(0);
+                    window.location.replace('/index/user/orderDetails.html?orderId=' + orderId)
+                }
+            })
+        }
+
         $(".orderNavItem").on(tap, function () {
             const type = $(this).attr('data-type');
             window.location.replace(`/index/user/order.html?orderType=${type}`)