@dcloudio/uni-quickapp-webview 2.0.2-4050720250324001 → 2.0.2-4060420250429001
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +43 -7
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -821,6 +821,46 @@ function addSafeAreaInsets (result) {
|
|
|
821
821
|
}
|
|
822
822
|
}
|
|
823
823
|
|
|
824
|
+
function getOSInfo (system, platform) {
|
|
825
|
+
let osName = '';
|
|
826
|
+
let osVersion = '';
|
|
827
|
+
|
|
828
|
+
if (
|
|
829
|
+
platform &&
|
|
830
|
+
( "quickapp-webview" === 'mp-baidu')
|
|
831
|
+
) {
|
|
832
|
+
osName = platform;
|
|
833
|
+
osVersion = system;
|
|
834
|
+
} else {
|
|
835
|
+
osName = system.split(' ')[0] || platform;
|
|
836
|
+
osVersion = system.split(' ')[1] || '';
|
|
837
|
+
}
|
|
838
|
+
|
|
839
|
+
osName = osName.toLocaleLowerCase();
|
|
840
|
+
switch (osName) {
|
|
841
|
+
case 'harmony': // alipay
|
|
842
|
+
case 'ohos': // weixin
|
|
843
|
+
case 'openharmony': // feishu
|
|
844
|
+
osName = 'harmonyos';
|
|
845
|
+
break
|
|
846
|
+
case 'iphone os': // alipay
|
|
847
|
+
osName = 'ios';
|
|
848
|
+
break
|
|
849
|
+
case 'mac': // weixin qq
|
|
850
|
+
case 'darwin': // feishu
|
|
851
|
+
osName = 'macos';
|
|
852
|
+
break
|
|
853
|
+
case 'windows_nt': // feishu
|
|
854
|
+
osName = 'windows';
|
|
855
|
+
break
|
|
856
|
+
}
|
|
857
|
+
|
|
858
|
+
return {
|
|
859
|
+
osName,
|
|
860
|
+
osVersion
|
|
861
|
+
}
|
|
862
|
+
}
|
|
863
|
+
|
|
824
864
|
function populateParameters (result) {
|
|
825
865
|
const {
|
|
826
866
|
brand = '', model = '', system = '',
|
|
@@ -833,12 +873,7 @@ function populateParameters (result) {
|
|
|
833
873
|
const extraParam = {};
|
|
834
874
|
|
|
835
875
|
// osName osVersion
|
|
836
|
-
|
|
837
|
-
let osVersion = '';
|
|
838
|
-
{
|
|
839
|
-
osName = system.split(' ')[0] || '';
|
|
840
|
-
osVersion = system.split(' ')[1] || '';
|
|
841
|
-
}
|
|
876
|
+
const { osName, osVersion } = getOSInfo(system, platform);
|
|
842
877
|
let hostVersion = version;
|
|
843
878
|
|
|
844
879
|
// deviceType
|
|
@@ -938,7 +973,8 @@ function getAppLanguage (defaultLanguage) {
|
|
|
938
973
|
}
|
|
939
974
|
|
|
940
975
|
function getHostName (result) {
|
|
941
|
-
const _platform =
|
|
976
|
+
const _platform =
|
|
977
|
+
"quickapp-webview".split('-')[1];
|
|
942
978
|
let _hostName = result.hostName || _platform; // mp-jd
|
|
943
979
|
|
|
944
980
|
return _hostName
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dcloudio/uni-quickapp-webview",
|
|
3
|
-
"version": "2.0.2-
|
|
3
|
+
"version": "2.0.2-4060420250429001",
|
|
4
4
|
"description": "uni-app quickapp-webview",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"repository": {
|
|
@@ -17,5 +17,5 @@
|
|
|
17
17
|
"name": "quickapp-webview",
|
|
18
18
|
"title": "快应用(Webview)版"
|
|
19
19
|
},
|
|
20
|
-
"gitHead": "
|
|
20
|
+
"gitHead": "33d0bb4eae4ee96b3b4efb5c8e10b7594e42b195"
|
|
21
21
|
}
|