rabin 2 years ago
parent
commit
d60e180207
1 changed files with 13 additions and 3 deletions
  1. 13 3
      data/payback/active.html

+ 13 - 3
data/payback/active.html

@@ -81,12 +81,20 @@ src="https://wx.gtimg.com/pay_h5/goldplan/js/jgoldplan-1.0.0.js"></script>
       var jump = 'https://daili.churenyiliao.com/?act';
       var back = 'https://www.churenyiliao.com/learn/active/?l=api.getDesc';
   }
-  function jumpOut() {
+  
+  if (!order_id) {
+      $('#msg').html('购买失败!<br />请耐心等待并关注活动变动');
+      function jumpOut() {
+        location.href = jump;
+    }
+  } else {
+    function jumpOut() {
       var mchData = {action: 'jumpOut', jumpOutUrl: jump}
       var postData = JSON.stringify(mchData)
       parent.postMessage(postData, 'https://payapp.weixin.qq.com')
   }
-  $.ajax({
+
+    $.ajax({
     type: "GET",
     url: back,
     data: {
@@ -107,6 +115,8 @@ src="https://wx.gtimg.com/pay_h5/goldplan/js/jgoldplan-1.0.0.js"></script>
         }
 
     }
-});
+  });
+  }
+  
 </script>
 </html>