From 78c466e6a0d21261663e1ccfe6110432ce721961 Mon Sep 17 00:00:00 2001 From: hejianxian <531601727@qq.com> Date: Wed, 11 Dec 2019 12:57:11 +0800 Subject: [PATCH] chore: verison 1.3.1 --- lib/@w6s/cordova-import-es.js | 7 +++++-- lib/@w6s/cordova-import.js | 4 ++-- lib/@w6s/cordova-import.mjs | 7 +++++-- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/lib/@w6s/cordova-import-es.js b/lib/@w6s/cordova-import-es.js index 5230b9d..0e9cb2f 100644 --- a/lib/@w6s/cordova-import-es.js +++ b/lib/@w6s/cordova-import-es.js @@ -1,5 +1,5 @@ /*! - * @w6s/cordova-import.js v1.3.0 + * @w6s/cordova-import.js v1.3.1 * (c) 2019 WorkPlusFE */ @@ -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]); }; @@ -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; } }, { diff --git a/lib/@w6s/cordova-import.js b/lib/@w6s/cordova-import.js index a2df78f..a14dacb 100644 --- a/lib/@w6s/cordova-import.js +++ b/lib/@w6s/cordova-import.js @@ -1,5 +1,5 @@ /*! - * @w6s/cordova-import.js v1.3.0 + * @w6s/cordova-import.js v1.3.1 * (c) 2019 WorkPlusFE */ -!function(t){"function"==typeof define&&define.amd?define(t):t()}(function(){"use strict";var o=function(t,e,r,n,o,i,a,u){if(!t){var c;if(void 0===e)c=Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var f=[r,n,o,i,a,u],s=0;(c=Error(e.replace(/%s/g,function(){return f[s++]}))).name="Invariant Violation"}throw c.framesToPop=1,c}};function i(t,e){for(var r=0;r -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]); }; @@ -115,7 +118,7 @@ function () { 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; } }, {