Commit c69c178f authored by westzmg's avatar westzmg

修改native的判断

parent ac5607b9
...@@ -9,7 +9,7 @@ export const isNative = () => { ...@@ -9,7 +9,7 @@ export const isNative = () => {
if(!window) return false; if(!window) return false;
const userAgent = window.navigator.userAgent; const userAgent = window.navigator.userAgent;
if(userAgent.indexOf('QB/NATIVE')>-1) return true; if(userAgent.indexOf('QB/NATIVE')>-1) return true;
if(userAgent.toLocaleLowerCase().indexOf('native')) return true; if(userAgent.toLocaleLowerCase().indexOf('native')>-1) return true;
return false; return false;
}; };
......
...@@ -16,7 +16,7 @@ export var isNative = function isNative() { ...@@ -16,7 +16,7 @@ export var isNative = function isNative() {
if (!window) return false; if (!window) return false;
var userAgent = window.navigator.userAgent; var userAgent = window.navigator.userAgent;
if (userAgent.indexOf('QB/NATIVE') > -1) return true; if (userAgent.indexOf('QB/NATIVE') > -1) return true;
if (userAgent.toLocaleLowerCase().indexOf('native')) return true; if (userAgent.toLocaleLowerCase().indexOf('native') > -1) return true;
return false; return false;
}; };
/* /*
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment