Skip to content

Commit

Permalink
chore: verison 1.3.1
Browse files Browse the repository at this point in the history
  • Loading branch information
hejianxian committed Dec 11, 2019
1 parent 8bf3491 commit 78c466e
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
7 changes: 5 additions & 2 deletions lib/@w6s/cordova-import-es.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* @w6s/cordova-import.js v1.3.0
* @w6s/cordova-import.js v1.3.1
* (c) 2019 WorkPlusFE
*/

Expand Down Expand Up @@ -62,6 +62,9 @@
var isAndroidPlatform = function isAndroidPlatform(userAgent) {
return userAgent.indexOf('android') > -1;
};
var isX5Webview = function isX5Webview(userAgent) {
return /x5webkit|mqqbrowser|tbs/.test(userAgent);
};
var getCordovaJsUriByPlatform = function getCordovaJsUriByPlatform(config, platform) {
return "".concat(config.SDK_HOST).concat(config.cordovajs[platform]);
};
Expand Down Expand Up @@ -121,7 +124,7 @@
key: "mustUseHttpModel",
value: function mustUseHttpModel() {
if (inIframe()) return true;
if (isHttpsProtocol() && isAndroidPlatform(this.userAgent)) return true;
if (isHttpsProtocol() && isAndroidPlatform(this.userAgent) && !isX5Webview()) return true;
return false;
}
}, {
Expand Down
Loading

0 comments on commit 78c466e

Please sign in to comment.