xiongzhu il y a 4 ans
Parent
commit
b6be622e67
1 fichiers modifiés avec 4 ajouts et 7 suppressions
  1. 4 7
      src/main/nine-space/src/router/index.js

+ 4 - 7
src/main/nine-space/src/router/index.js

@@ -6,11 +6,8 @@ import http from '../plugins/http';
 
 jsapiSign();
 function jsapiSign() {
-    setTimeout(() => {
-        if (/micromessenger/i.test(navigator.userAgent)) {
-            if (/localhost|(192\.168)/i.test(location.host)) {
-                return;
-            }
+    if (/micromessenger/i.test(navigator.userAgent) && !/localhost|(192\.168)/i.test(location.host)) {
+        setTimeout(() => {
             let isIOS = /iphone|ipad/i.test(navigator.userAgent);
             http.http
                 .get('/wx/jsapiSign', { url: isIOS ? store.state.firstUrl : location.origin + location.href })
@@ -48,8 +45,8 @@ function jsapiSign() {
                     });
                 })
                 .catch(e => {});
-        }
-    }, 200);
+        }, 200);
+    }
 }
 jsapiSign();
 const routes = [