|
|
@@ -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 = [
|