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

+ 8 - 3
data/payback/active.html

@@ -89,9 +89,14 @@ src="https://wx.gtimg.com/pay_h5/goldplan/js/jgoldplan-1.0.0.js"></script>
       }
   } else {
     function jumpOut() {
-      var mchData = {action: 'jumpOut', jumpOutUrl: jump}
-      var postData = JSON.stringify(mchData)
-      parent.postMessage(postData, 'https://payapp.weixin.qq.com')
+      if (self.frameElement && self.frameElement.tagName == "IFRAME") {
+          var mchData = {action: 'jumpOut', jumpOutUrl: jump}
+          var postData = JSON.stringify(mchData)
+          parent.postMessage(postData, 'https://payapp.weixin.qq.com')
+      } else {
+          location.href = jump;
+      }
+      
   }
 
     $.ajax({