huangxiaojing преди 3 години
родител
ревизия
ff202f0d04
променени са 2 файла, в които са добавени 15 реда и са изтрити 15 реда
  1. 14 14
      screenAndroid/WXtrialInterface.html
  2. 1 1
      screenIos/WXtrialInterface.html

+ 14 - 14
screenAndroid/WXtrialInterface.html

@@ -35,16 +35,14 @@
   <link rel="stylesheet" href="https://cdn.bootcss.com/weui/1.1.3/style/weui.min.css" />
   <link rel="stylesheet" href="https://cdn.bootcss.com/jquery-weui/1.2.1/css/jquery-weui.min.css" />
   <style>
-    .try-use-wrap,
-    .buy-phone-wrap,
-    .look-wrap {
-      width: 100%;
-      height: 100%;
-      position: fixed;
-      top: 0;
-      left: 0;
-      z-index: 9999;
-      background: rgba(0, 0, 0, 0.5);
+    .try-use-wrap, .buy-phone-wrap, .look-wrap{
+        width: 100%;
+        height: 100%;
+        position: fixed;
+        top: 0;
+        left: 0;
+        z-index: 9999;
+        background: rgba(0, 0, 0, 0.5);
       display: none;
     }
 
@@ -441,7 +439,7 @@
       });
     }
 
-    var hidden, visibilityChange;
+    var hidden, visibilityChange; 
     if (typeof document.hidden !== "undefined") { // Opera 12.10 and Firefox 18 and later support 
       hidden = "hidden";
       visibilityChange = "visibilitychange";
@@ -466,9 +464,11 @@
             url: '/pages/home/home'
           })
         } else {
-          uni.navigateTo({
-            url: '/pages/index/index'
-          });
+          document.addEventListener('UniAppJSBridgeReady', function () {
+            uni.webView.navigateTo({
+              url: '/pages/index/index'
+            });
+          })
         }
       }
     }, false);

+ 1 - 1
screenIos/WXtrialInterface.html

@@ -1159,7 +1159,7 @@
             url: '/pages/home/home'
           })
         } else {
-          uni.navigateTo({
+          uni.webView.navigateTo({
             url: '/pages/index/index'
           });
         }