@dcloudio/uni-quickapp-webview 2.0.2-5020620260917001 → 2.0.2-5030320261023001
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 +14 -12
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -828,17 +828,17 @@ function addSafeAreaInsets (result) {
|
|
|
828
828
|
}
|
|
829
829
|
}
|
|
830
830
|
|
|
831
|
-
function getOSInfo (system, platform) {
|
|
831
|
+
function getOSInfo (system = '', platform = '') {
|
|
832
832
|
/**
|
|
833
833
|
* system 枚举值说明:
|
|
834
834
|
*
|
|
835
835
|
* weixin: 操作系统及版本
|
|
836
836
|
* qq: 操作系统及版本
|
|
837
837
|
* kuaishou: 操作系统及版本
|
|
838
|
+
* toutiao/douyin: 操作系统及版本
|
|
838
839
|
*
|
|
839
840
|
* alipay、dingding: 系统版本
|
|
840
841
|
* baidu: 操作系统版本
|
|
841
|
-
* toutiao/douyin: 操作系统版本
|
|
842
842
|
* jd: 操作系统版本
|
|
843
843
|
* harmony: 操作系统版本
|
|
844
844
|
*
|
|
@@ -883,9 +883,9 @@ function getOSInfo (system, platform) {
|
|
|
883
883
|
}
|
|
884
884
|
|
|
885
885
|
return {
|
|
886
|
-
osName,
|
|
887
|
-
osVersion,
|
|
888
|
-
system
|
|
886
|
+
osName: osName.trim(),
|
|
887
|
+
osVersion: osVersion.trim(),
|
|
888
|
+
system: system.trim()
|
|
889
889
|
}
|
|
890
890
|
}
|
|
891
891
|
|
|
@@ -922,10 +922,10 @@ function getPlatform (platform) {
|
|
|
922
922
|
}
|
|
923
923
|
|
|
924
924
|
function populateParameters (result) {
|
|
925
|
-
|
|
925
|
+
let {
|
|
926
926
|
brand = '', model = '', system = '',
|
|
927
|
-
language = '', theme, version,
|
|
928
|
-
platform, fontSizeSetting,
|
|
927
|
+
language = '', theme, version = '',
|
|
928
|
+
platform = '', fontSizeSetting,
|
|
929
929
|
SDKVersion, pixelRatio, deviceOrientation
|
|
930
930
|
} = result;
|
|
931
931
|
// const isQuickApp = "quickapp-webview".indexOf('quickapp-webview') !== -1
|
|
@@ -999,7 +999,7 @@ function populateParameters (result) {
|
|
|
999
999
|
Object.assign(result, parameters, extraParam);
|
|
1000
1000
|
}
|
|
1001
1001
|
|
|
1002
|
-
function getGetDeviceType (result, model) {
|
|
1002
|
+
function getGetDeviceType (result, model = '') {
|
|
1003
1003
|
const platform = result.platform || '';
|
|
1004
1004
|
let deviceType = result.deviceType || 'phone';
|
|
1005
1005
|
{
|
|
@@ -1138,12 +1138,14 @@ function wrapper (methodName, method) {
|
|
|
1138
1138
|
if (typeof arg2 !== 'undefined') {
|
|
1139
1139
|
args.push(arg2);
|
|
1140
1140
|
}
|
|
1141
|
+
// methodName 保留公开 API 名,仅使用 apiName 调用平台 API
|
|
1142
|
+
let apiName = methodName;
|
|
1141
1143
|
if (isFn(options.name)) {
|
|
1142
|
-
|
|
1144
|
+
apiName = options.name(arg1);
|
|
1143
1145
|
} else if (isStr(options.name)) {
|
|
1144
|
-
|
|
1146
|
+
apiName = options.name;
|
|
1145
1147
|
}
|
|
1146
|
-
const returnValue = qa[
|
|
1148
|
+
const returnValue = qa[apiName].apply(qa, args);
|
|
1147
1149
|
if (isSyncApi(methodName)) { // 同步 api
|
|
1148
1150
|
return processReturnValue(methodName, returnValue, options.returnValue, isContextApi(methodName))
|
|
1149
1151
|
}
|
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-5030320261023001",
|
|
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": "9ceaf935c6a49c2d47e6af758da67b5cd98ca8e0"
|
|
21
21
|
}
|