Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
MuGuiLin
uni-app
提交
07fc68b7
U
uni-app
项目概览
MuGuiLin
/
uni-app
与 Fork 源项目一致
Fork自
DCloud / uni-app
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
U
uni-app
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
07fc68b7
编写于
5月 31, 2022
作者:
Q
qiang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
chore: build
上级
2830a507
变更
14
隐藏空白更改
内联
并排
Showing
14 changed file
with
350 addition
and
320 deletion
+350
-320
packages/uni-app-plus/dist/index.js
packages/uni-app-plus/dist/index.js
+1
-1
packages/uni-app-plus/dist/index.v3.js
packages/uni-app-plus/dist/index.v3.js
+25
-25
packages/uni-app-plus/dist/view.umd.min.js
packages/uni-app-plus/dist/view.umd.min.js
+2
-2
packages/uni-h5/dist/index.umd.min.js
packages/uni-h5/dist/index.umd.min.js
+1
-1
packages/uni-mp-alipay/dist/index.js
packages/uni-mp-alipay/dist/index.js
+29
-29
packages/uni-mp-baidu/dist/index.js
packages/uni-mp-baidu/dist/index.js
+29
-29
packages/uni-mp-jd/dist/index.js
packages/uni-mp-jd/dist/index.js
+28
-28
packages/uni-mp-kuaishou/dist/index.js
packages/uni-mp-kuaishou/dist/index.js
+29
-29
packages/uni-mp-lark/dist/index.js
packages/uni-mp-lark/dist/index.js
+29
-18
packages/uni-mp-qq/dist/index.js
packages/uni-mp-qq/dist/index.js
+29
-29
packages/uni-mp-toutiao/dist/index.js
packages/uni-mp-toutiao/dist/index.js
+29
-18
packages/uni-mp-weixin/dist/index.js
packages/uni-mp-weixin/dist/index.js
+63
-55
packages/uni-mp-xhs/dist/index.js
packages/uni-mp-xhs/dist/index.js
+28
-28
packages/uni-quickapp-webview/dist/index.js
packages/uni-quickapp-webview/dist/index.js
+28
-28
未找到文件。
packages/uni-app-plus/dist/index.js
浏览文件 @
07fc68b7
...
...
@@ -98,7 +98,7 @@ function hasOwn (obj, key) {
return
hasOwnProperty
.
call
(
obj
,
key
)
}
function
noop
()
{}
function
noop
()
{
}
/**
* Create a cached version of a pure function.
...
...
packages/uni-app-plus/dist/index.v3.js
浏览文件 @
07fc68b7
...
...
@@ -414,7 +414,7 @@ var serviceContext = (function () {
return hasOwnProperty.call(obj, key)
}
function noop () {}
function noop () {
}
function toRawType (val) {
return _toString.call(val).slice(8, -1)
...
...
@@ -494,6 +494,16 @@ var serviceContext = (function () {
} else {
return false
}
}
function sortObject (obj) {
const sortObj = {};
if (isPlainObject(obj)) {
Object.keys(obj).sort().forEach(key => {
sortObj[key] = obj[key];
});
}
return !Object.keys(sortObj) ? obj : sortObj
}
const encodeReserveRE = /[!'()*]/g;
...
...
@@ -6535,16 +6545,16 @@ var serviceContext = (function () {
const _osName = osName.toLowerCase();
return {
brand,
deviceBrand: brand,
deviceModel,
devicePixelRatio: plus.screen.scale,
deviceId: deviceId$1(),
deviceOrientation,
deviceType,
brand,
model: deviceModel,
system: `${_osName === 'ios' ? 'iOS' : 'Android'} ${osVersion}`
,
platform: _osName
platform: _osName
,
system: `${_osName === 'ios' ? 'iOS' : 'Android'} ${osVersion}`
}
}
...
...
@@ -6563,23 +6573,23 @@ var serviceContext = (function () {
: hostLanguage;
return {
SDKVersion: '',
hostSDKVersion: '',
enableDebug: false,
appId,
appName,
appVersion,
appVersionCode,
appLanguage,
version: plus.runtime.innerVersion,
language: osLanguage,
theme: '',
enableDebug: false,
hostSDKVersion: undefined,
hostPackageName,
hostName,
hostVersion,
hostLanguage,
hostTheme,
hostFontSizeSetting: undefined
hostFontSizeSetting: undefined,
language: osLanguage,
SDKVersion: '',
theme: undefined,
version: plus.runtime.innerVersion
}
}
...
...
@@ -6596,24 +6606,14 @@ var serviceContext = (function () {
const appBaseInfo = getAppBaseInfo();
_initSystemInfo = true;
const { osName, osLanguage, osVersion } = systemInfo;
const _osName = osName.toLowerCase();
const osLanguageSplit = osLanguage.split('-');
const osLanguageSplitLast = osLanguageSplit[osLanguageSplit.length - 1];
const _osLanguage = `${osLanguageSplit[0]}${osLanguageSplitLast ? '-' + osLanguageSplitLast : ''}`;
const extraData = {
errMsg: 'getSystemInfo:ok',
fontSizeSetting: appBaseInfo.hostFontSizeSetting,
uniCompileVersion: __uniConfig.compilerVersion,
uniRuntimeVersion: __uniConfig.compilerVersion,
osLanguage: _osLanguage,
osName: _osName
osName: systemInfo.osName.toLowerCase()
};
if (_osName === 'ios') {
extraData.romName = _osName;
extraData.romVersion = osVersion;
if (systemInfo.hostName) {
extraData.hostSDKVersion = systemInfo.uniRuntimeVersion;
}
const _systemInfo = Object.assign(
...
...
@@ -6629,7 +6629,7 @@ var serviceContext = (function () {
delete _systemInfo.enableDebug;
delete _systemInfo.theme;
return
_systemInfo
return
sortObject(_systemInfo)
}
function vibrateLong () {
...
...
packages/uni-app-plus/dist/view.umd.min.js
浏览文件 @
07fc68b7
因为 它太大了无法显示 source diff 。你可以改为
查看blob
。
packages/uni-h5/dist/index.umd.min.js
浏览文件 @
07fc68b7
因为 它太大了无法显示 source diff 。你可以改为
查看blob
。
packages/uni-mp-alipay/dist/index.js
浏览文件 @
07fc68b7
...
...
@@ -98,7 +98,7 @@ function hasOwn (obj, key) {
return
hasOwnProperty
.
call
(
obj
,
key
)
}
function
noop
()
{}
function
noop
()
{
}
/**
* Create a cached version of a pure function.
...
...
@@ -763,12 +763,6 @@ function removeStorageSync (key) {
})
}
function
_getDeviceBrand
(
model
)
{
if
(
/iphone/gi
.
test
(
model
)
||
/ipad/gi
.
test
(
model
)
||
/mac/gi
.
test
(
model
))
{
return
'
apple
'
}
if
(
/windows/gi
.
test
(
model
))
{
return
'
microsoft
'
}
return
''
}
function
addSafeAreaInsets
(
result
)
{
if
(
result
.
safeArea
)
{
const
safeArea
=
result
.
safeArea
;
...
...
@@ -785,11 +779,10 @@ function populateParameters (result) {
const
{
brand
=
''
,
model
=
''
,
system
=
''
,
language
=
''
,
theme
,
version
,
hostName
,
platform
,
fontSizeSetting
,
SDKVersion
,
pixelRatio
,
deviceOrientation
,
environment
platform
,
fontSizeSetting
,
SDKVersion
,
pixelRatio
,
deviceOrientation
}
=
result
;
const
isQuickApp
=
"
mp-alipay
"
.
indexOf
(
'
quickapp-webview
'
)
!==
-
1
;
// const isQuickApp = "mp-alipay".indexOf('quickapp-webview') !== -1
// osName osVersion
let
osName
=
''
;
...
...
@@ -804,12 +797,10 @@ function populateParameters (result) {
const
deviceType
=
getGetDeviceType
(
result
,
model
);
// deviceModel
const
deviceBrand
=
getDeviceBrand
(
brand
,
model
,
isQuickApp
);
const
deviceBrand
=
getDeviceBrand
(
brand
);
// hostName
const
_platform
=
"
mp-alipay
"
.
split
(
'
-
'
)[
1
];
let
_hostName
=
hostName
||
_platform
;
// mp-jd
_hostName
=
result
.
app
;
const
_hostName
=
getHostName
(
result
);
// deviceOrientation
let
_deviceOrientation
=
deviceOrientation
;
// 仅 微信 百度 支持
...
...
@@ -821,6 +812,9 @@ function populateParameters (result) {
let
_SDKVersion
=
SDKVersion
;
{
_SDKVersion
=
my
.
SDKVersion
;
}
// hostLanguage
const
hostLanguage
=
language
.
replace
(
/_/g
,
'
-
'
);
// wx.getAccountInfoSync
const
parameters
=
{
...
...
@@ -828,6 +822,7 @@ function populateParameters (result) {
appName
:
process
.
env
.
UNI_APP_NAME
,
appVersion
:
process
.
env
.
UNI_APP_VERSION_NAME
,
appVersionCode
:
process
.
env
.
UNI_APP_VERSION_CODE
,
appLanguage
:
getAppLanguage
(
hostLanguage
),
uniCompileVersion
:
process
.
env
.
UNI_COMPILER_VERSION
,
uniRuntimeVersion
:
process
.
env
.
UNI_COMPILER_VERSION
,
uniPlatform
:
process
.
env
.
UNI_SUB_PLATFORM
||
process
.
env
.
UNI_PLATFORM
,
...
...
@@ -840,7 +835,7 @@ function populateParameters (result) {
osVersion
,
hostTheme
:
theme
,
hostVersion
,
hostLanguage
:
language
.
replace
(
'
_
'
,
'
-
'
)
,
hostLanguage
,
hostName
:
_hostName
,
hostSDKVersion
:
_SDKVersion
,
hostFontSizeSetting
:
fontSizeSetting
,
...
...
@@ -852,7 +847,7 @@ function populateParameters (result) {
ua
:
undefined
,
hostPackageName
:
undefined
,
browserName
:
undefined
,
browseVersion
:
undefined
browse
r
Version
:
undefined
};
Object
.
assign
(
result
,
parameters
);
...
...
@@ -879,23 +874,28 @@ function getGetDeviceType (result, model) {
return
deviceType
}
function
getDeviceBrand
(
brand
,
model
,
isQuickApp
=
false
)
{
let
deviceBrand
=
model
.
split
(
'
'
)[
0
].
toLocaleLowerCase
();
if
(
isQuickApp
)
{
function
getDeviceBrand
(
brand
)
{
let
deviceBrand
=
brand
;
if
(
deviceBrand
)
{
deviceBrand
=
brand
.
toLocaleLowerCase
();
}
else
{
deviceBrand
=
_getDeviceBrand
(
deviceBrand
);
}
return
deviceBrand
}
function
getAppLanguage
(
defaultLanguage
)
{
return
getLocale$1
?
getLocale$1
()
:
defaultLanguage
}
function
getHostName
(
result
)
{
const
_platform
=
"
mp-alipay
"
.
split
(
'
-
'
)[
1
];
let
_hostName
=
result
.
hostName
||
_platform
;
// mp-jd
_hostName
=
result
.
app
;
return
_hostName
}
const
UUID_KEY
=
'
__DC_STAT_UUID
'
;
let
deviceId
;
function
addUuid
(
result
)
{
...
...
packages/uni-mp-baidu/dist/index.js
浏览文件 @
07fc68b7
...
...
@@ -98,7 +98,7 @@ function hasOwn (obj, key) {
return
hasOwnProperty
.
call
(
obj
,
key
)
}
function
noop
()
{}
function
noop
()
{
}
/**
* Create a cached version of a pure function.
...
...
@@ -778,12 +778,6 @@ var previewImage = {
}
};
function
_getDeviceBrand
(
model
)
{
if
(
/iphone/gi
.
test
(
model
)
||
/ipad/gi
.
test
(
model
)
||
/mac/gi
.
test
(
model
))
{
return
'
apple
'
}
if
(
/windows/gi
.
test
(
model
))
{
return
'
microsoft
'
}
return
''
}
const
UUID_KEY
=
'
__DC_STAT_UUID
'
;
let
deviceId
;
function
useDeviceId
(
result
)
{
...
...
@@ -814,11 +808,10 @@ function populateParameters (result) {
const
{
brand
=
''
,
model
=
''
,
system
=
''
,
language
=
''
,
theme
,
version
,
hostName
,
platform
,
fontSizeSetting
,
SDKVersion
,
pixelRatio
,
deviceOrientation
,
environment
platform
,
fontSizeSetting
,
SDKVersion
,
pixelRatio
,
deviceOrientation
}
=
result
;
const
isQuickApp
=
"
mp-baidu
"
.
indexOf
(
'
quickapp-webview
'
)
!==
-
1
;
// const isQuickApp = "mp-baidu".indexOf('quickapp-webview') !== -1
// osName osVersion
let
osName
=
''
;
...
...
@@ -837,12 +830,10 @@ function populateParameters (result) {
const
deviceType
=
getGetDeviceType
(
result
);
// deviceModel
const
deviceBrand
=
getDeviceBrand
(
brand
,
model
,
isQuickApp
);
const
deviceBrand
=
getDeviceBrand
(
brand
);
// hostName
const
_platform
=
"
mp-baidu
"
.
split
(
'
-
'
)[
1
];
let
_hostName
=
hostName
||
_platform
;
// mp-jd
{
_hostName
=
result
.
host
;
}
const
_hostName
=
getHostName
(
result
);
// deviceOrientation
let
_deviceOrientation
=
deviceOrientation
;
// 仅 微信 百度 支持
...
...
@@ -855,6 +846,9 @@ function populateParameters (result) {
// SDKVersion
let
_SDKVersion
=
SDKVersion
;
// hostLanguage
const
hostLanguage
=
language
.
replace
(
/_/g
,
'
-
'
);
// wx.getAccountInfoSync
const
parameters
=
{
...
...
@@ -862,6 +856,7 @@ function populateParameters (result) {
appName
:
process
.
env
.
UNI_APP_NAME
,
appVersion
:
process
.
env
.
UNI_APP_VERSION_NAME
,
appVersionCode
:
process
.
env
.
UNI_APP_VERSION_CODE
,
appLanguage
:
getAppLanguage
(
hostLanguage
),
uniCompileVersion
:
process
.
env
.
UNI_COMPILER_VERSION
,
uniRuntimeVersion
:
process
.
env
.
UNI_COMPILER_VERSION
,
uniPlatform
:
process
.
env
.
UNI_SUB_PLATFORM
||
process
.
env
.
UNI_PLATFORM
,
...
...
@@ -874,7 +869,7 @@ function populateParameters (result) {
osVersion
,
hostTheme
:
theme
,
hostVersion
,
hostLanguage
:
language
.
replace
(
'
_
'
,
'
-
'
)
,
hostLanguage
,
hostName
:
_hostName
,
hostSDKVersion
:
_SDKVersion
,
hostFontSizeSetting
:
fontSizeSetting
,
...
...
@@ -886,7 +881,7 @@ function populateParameters (result) {
ua
:
undefined
,
hostPackageName
:
undefined
,
browserName
:
undefined
,
browseVersion
:
undefined
browse
r
Version
:
undefined
};
Object
.
assign
(
result
,
parameters
);
...
...
@@ -897,23 +892,28 @@ function getGetDeviceType (result, model) {
return
deviceType
}
function
getDeviceBrand
(
brand
,
model
,
isQuickApp
=
false
)
{
let
deviceBrand
=
model
.
split
(
'
'
)[
0
].
toLocaleLowerCase
();
if
(
isQuickApp
)
{
function
getDeviceBrand
(
brand
)
{
let
deviceBrand
=
brand
;
if
(
deviceBrand
)
{
deviceBrand
=
brand
.
toLocaleLowerCase
();
}
else
{
deviceBrand
=
_getDeviceBrand
(
deviceBrand
);
}
return
deviceBrand
}
function
getAppLanguage
(
defaultLanguage
)
{
return
getLocale$1
?
getLocale$1
()
:
defaultLanguage
}
function
getHostName
(
result
)
{
const
_platform
=
"
mp-baidu
"
.
split
(
'
-
'
)[
1
];
let
_hostName
=
result
.
hostName
||
_platform
;
// mp-jd
{
_hostName
=
result
.
host
;
}
return
_hostName
}
var
getSystemInfo
=
{
returnValue
:
function
(
result
)
{
useDeviceId
(
result
);
...
...
packages/uni-mp-jd/dist/index.js
浏览文件 @
07fc68b7
...
...
@@ -98,7 +98,7 @@ function hasOwn (obj, key) {
return
hasOwnProperty
.
call
(
obj
,
key
)
}
function
noop
()
{}
function
noop
()
{
}
/**
* Create a cached version of a pure function.
...
...
@@ -607,12 +607,6 @@ var baseApi = /*#__PURE__*/Object.freeze({
interceptors
:
interceptors
});
function
_getDeviceBrand
(
model
)
{
if
(
/iphone/gi
.
test
(
model
)
||
/ipad/gi
.
test
(
model
)
||
/mac/gi
.
test
(
model
))
{
return
'
apple
'
}
if
(
/windows/gi
.
test
(
model
))
{
return
'
microsoft
'
}
return
''
}
const
UUID_KEY
=
'
__DC_STAT_UUID
'
;
let
deviceId
;
function
useDeviceId
(
result
)
{
...
...
@@ -643,11 +637,10 @@ function populateParameters (result) {
const
{
brand
=
''
,
model
=
''
,
system
=
''
,
language
=
''
,
theme
,
version
,
hostName
,
platform
,
fontSizeSetting
,
SDKVersion
,
pixelRatio
,
deviceOrientation
,
environment
platform
,
fontSizeSetting
,
SDKVersion
,
pixelRatio
,
deviceOrientation
}
=
result
;
const
isQuickApp
=
"
mp-jd
"
.
indexOf
(
'
quickapp-webview
'
)
!==
-
1
;
// const isQuickApp = "mp-jd".indexOf('quickapp-webview') !== -1
// osName osVersion
let
osName
=
''
;
...
...
@@ -665,11 +658,10 @@ function populateParameters (result) {
const
deviceType
=
getGetDeviceType
(
result
,
model
);
// deviceModel
const
deviceBrand
=
getDeviceBrand
(
brand
,
model
,
isQuickApp
);
const
deviceBrand
=
getDeviceBrand
(
brand
);
// hostName
const
_platform
=
"
mp-jd
"
.
split
(
'
-
'
)[
1
];
let
_hostName
=
hostName
||
_platform
;
// mp-jd
const
_hostName
=
getHostName
(
result
);
// deviceOrientation
let
_deviceOrientation
=
deviceOrientation
;
// 仅 微信 百度 支持
...
...
@@ -680,6 +672,9 @@ function populateParameters (result) {
// SDKVersion
let
_SDKVersion
=
SDKVersion
;
// hostLanguage
const
hostLanguage
=
language
.
replace
(
/_/g
,
'
-
'
);
// wx.getAccountInfoSync
const
parameters
=
{
...
...
@@ -687,6 +682,7 @@ function populateParameters (result) {
appName
:
process
.
env
.
UNI_APP_NAME
,
appVersion
:
process
.
env
.
UNI_APP_VERSION_NAME
,
appVersionCode
:
process
.
env
.
UNI_APP_VERSION_CODE
,
appLanguage
:
getAppLanguage
(
hostLanguage
),
uniCompileVersion
:
process
.
env
.
UNI_COMPILER_VERSION
,
uniRuntimeVersion
:
process
.
env
.
UNI_COMPILER_VERSION
,
uniPlatform
:
process
.
env
.
UNI_SUB_PLATFORM
||
process
.
env
.
UNI_PLATFORM
,
...
...
@@ -699,7 +695,7 @@ function populateParameters (result) {
osVersion
,
hostTheme
:
theme
,
hostVersion
,
hostLanguage
:
language
.
replace
(
'
_
'
,
'
-
'
)
,
hostLanguage
,
hostName
:
_hostName
,
hostSDKVersion
:
_SDKVersion
,
hostFontSizeSetting
:
fontSizeSetting
,
...
...
@@ -711,7 +707,7 @@ function populateParameters (result) {
ua
:
undefined
,
hostPackageName
:
undefined
,
browserName
:
undefined
,
browseVersion
:
undefined
browse
r
Version
:
undefined
};
Object
.
assign
(
result
,
parameters
);
...
...
@@ -738,23 +734,27 @@ function getGetDeviceType (result, model) {
return
deviceType
}
function
getDeviceBrand
(
brand
,
model
,
isQuickApp
=
false
)
{
let
deviceBrand
=
model
.
split
(
'
'
)[
0
].
toLocaleLowerCase
();
if
(
isQuickApp
)
{
function
getDeviceBrand
(
brand
)
{
let
deviceBrand
=
brand
;
if
(
deviceBrand
)
{
deviceBrand
=
brand
.
toLocaleLowerCase
();
}
else
{
deviceBrand
=
_getDeviceBrand
(
deviceBrand
);
}
return
deviceBrand
}
function
getAppLanguage
(
defaultLanguage
)
{
return
getLocale$1
?
getLocale$1
()
:
defaultLanguage
}
function
getHostName
(
result
)
{
const
_platform
=
"
mp-jd
"
.
split
(
'
-
'
)[
1
];
let
_hostName
=
result
.
hostName
||
_platform
;
// mp-jd
return
_hostName
}
var
getSystemInfo
=
{
returnValue
:
function
(
result
)
{
useDeviceId
(
result
);
...
...
packages/uni-mp-kuaishou/dist/index.js
浏览文件 @
07fc68b7
...
...
@@ -98,7 +98,7 @@ function hasOwn (obj, key) {
return
hasOwnProperty
.
call
(
obj
,
key
)
}
function
noop
()
{}
function
noop
()
{
}
/**
* Create a cached version of a pure function.
...
...
@@ -778,12 +778,6 @@ var previewImage = {
}
};
function
_getDeviceBrand
(
model
)
{
if
(
/iphone/gi
.
test
(
model
)
||
/ipad/gi
.
test
(
model
)
||
/mac/gi
.
test
(
model
))
{
return
'
apple
'
}
if
(
/windows/gi
.
test
(
model
))
{
return
'
microsoft
'
}
return
''
}
const
UUID_KEY
=
'
__DC_STAT_UUID
'
;
let
deviceId
;
function
useDeviceId
(
result
)
{
...
...
@@ -814,11 +808,10 @@ function populateParameters (result) {
const
{
brand
=
''
,
model
=
''
,
system
=
''
,
language
=
''
,
theme
,
version
,
hostName
,
platform
,
fontSizeSetting
,
SDKVersion
,
pixelRatio
,
deviceOrientation
,
environment
platform
,
fontSizeSetting
,
SDKVersion
,
pixelRatio
,
deviceOrientation
}
=
result
;
const
isQuickApp
=
"
mp-kuaishou
"
.
indexOf
(
'
quickapp-webview
'
)
!==
-
1
;
// const isQuickApp = "mp-kuaishou".indexOf('quickapp-webview') !== -1
// osName osVersion
let
osName
=
''
;
...
...
@@ -833,12 +826,10 @@ function populateParameters (result) {
const
deviceType
=
getGetDeviceType
(
result
,
model
);
// deviceModel
const
deviceBrand
=
getDeviceBrand
(
brand
,
model
,
isQuickApp
);
const
deviceBrand
=
getDeviceBrand
(
brand
);
// hostName
const
_platform
=
"
mp-kuaishou
"
.
split
(
'
-
'
)[
1
];
let
_hostName
=
hostName
||
_platform
;
// mp-jd
{
_hostName
=
result
.
host
;
}
const
_hostName
=
getHostName
(
result
);
// deviceOrientation
let
_deviceOrientation
=
deviceOrientation
;
// 仅 微信 百度 支持
...
...
@@ -849,6 +840,9 @@ function populateParameters (result) {
// SDKVersion
let
_SDKVersion
=
SDKVersion
;
// hostLanguage
const
hostLanguage
=
language
.
replace
(
/_/g
,
'
-
'
);
// wx.getAccountInfoSync
const
parameters
=
{
...
...
@@ -856,6 +850,7 @@ function populateParameters (result) {
appName
:
process
.
env
.
UNI_APP_NAME
,
appVersion
:
process
.
env
.
UNI_APP_VERSION_NAME
,
appVersionCode
:
process
.
env
.
UNI_APP_VERSION_CODE
,
appLanguage
:
getAppLanguage
(
hostLanguage
),
uniCompileVersion
:
process
.
env
.
UNI_COMPILER_VERSION
,
uniRuntimeVersion
:
process
.
env
.
UNI_COMPILER_VERSION
,
uniPlatform
:
process
.
env
.
UNI_SUB_PLATFORM
||
process
.
env
.
UNI_PLATFORM
,
...
...
@@ -868,7 +863,7 @@ function populateParameters (result) {
osVersion
,
hostTheme
:
theme
,
hostVersion
,
hostLanguage
:
language
.
replace
(
'
_
'
,
'
-
'
)
,
hostLanguage
,
hostName
:
_hostName
,
hostSDKVersion
:
_SDKVersion
,
hostFontSizeSetting
:
fontSizeSetting
,
...
...
@@ -880,7 +875,7 @@ function populateParameters (result) {
ua
:
undefined
,
hostPackageName
:
undefined
,
browserName
:
undefined
,
browseVersion
:
undefined
browse
r
Version
:
undefined
};
Object
.
assign
(
result
,
parameters
);
...
...
@@ -907,23 +902,28 @@ function getGetDeviceType (result, model) {
return
deviceType
}
function
getDeviceBrand
(
brand
,
model
,
isQuickApp
=
false
)
{
let
deviceBrand
=
model
.
split
(
'
'
)[
0
].
toLocaleLowerCase
();
if
(
isQuickApp
)
{
function
getDeviceBrand
(
brand
)
{
let
deviceBrand
=
brand
;
if
(
deviceBrand
)
{
deviceBrand
=
brand
.
toLocaleLowerCase
();
}
else
{
deviceBrand
=
_getDeviceBrand
(
deviceBrand
);
}
return
deviceBrand
}
function
getAppLanguage
(
defaultLanguage
)
{
return
getLocale$1
?
getLocale$1
()
:
defaultLanguage
}
function
getHostName
(
result
)
{
const
_platform
=
"
mp-kuaishou
"
.
split
(
'
-
'
)[
1
];
let
_hostName
=
result
.
hostName
||
_platform
;
// mp-jd
{
_hostName
=
result
.
host
;
}
return
_hostName
}
var
getSystemInfo
=
{
returnValue
:
function
(
result
)
{
useDeviceId
(
result
);
...
...
packages/uni-mp-lark/dist/index.js
浏览文件 @
07fc68b7
...
...
@@ -98,7 +98,7 @@ function hasOwn (obj, key) {
return
hasOwnProperty
.
call
(
obj
,
key
)
}
function
noop
()
{}
function
noop
()
{
}
/**
* Create a cached version of a pure function.
...
...
@@ -808,11 +808,10 @@ function populateParameters (result) {
const
{
brand
=
''
,
model
=
''
,
system
=
''
,
language
=
''
,
theme
,
version
,
hostName
,
platform
,
fontSizeSetting
,
SDKVersion
,
pixelRatio
,
deviceOrientation
,
environment
platform
,
fontSizeSetting
,
SDKVersion
,
pixelRatio
,
deviceOrientation
}
=
result
;
const
isQuickApp
=
"
mp-lark
"
.
indexOf
(
'
quickapp-webview
'
)
!==
-
1
;
// const isQuickApp = "mp-lark".indexOf('quickapp-webview') !== -1
// osName osVersion
let
osName
=
''
;
...
...
@@ -827,12 +826,10 @@ function populateParameters (result) {
const
deviceType
=
getGetDeviceType
(
result
,
model
);
// deviceModel
const
deviceBrand
=
getDeviceBrand
(
brand
,
model
,
isQuickApp
);
const
deviceBrand
=
getDeviceBrand
(
brand
);
// hostName
const
_platform
=
"
mp-lark
"
.
split
(
'
-
'
)[
1
];
let
_hostName
=
hostName
||
_platform
;
// mp-jd
{
_hostName
=
result
.
appName
;
}
const
_hostName
=
getHostName
(
result
);
// deviceOrientation
let
_deviceOrientation
=
deviceOrientation
;
// 仅 微信 百度 支持
...
...
@@ -843,6 +840,9 @@ function populateParameters (result) {
// SDKVersion
let
_SDKVersion
=
SDKVersion
;
// hostLanguage
const
hostLanguage
=
language
.
replace
(
/_/g
,
'
-
'
);
// wx.getAccountInfoSync
const
parameters
=
{
...
...
@@ -850,6 +850,7 @@ function populateParameters (result) {
appName
:
process
.
env
.
UNI_APP_NAME
,
appVersion
:
process
.
env
.
UNI_APP_VERSION_NAME
,
appVersionCode
:
process
.
env
.
UNI_APP_VERSION_CODE
,
appLanguage
:
getAppLanguage
(
hostLanguage
),
uniCompileVersion
:
process
.
env
.
UNI_COMPILER_VERSION
,
uniRuntimeVersion
:
process
.
env
.
UNI_COMPILER_VERSION
,
uniPlatform
:
process
.
env
.
UNI_SUB_PLATFORM
||
process
.
env
.
UNI_PLATFORM
,
...
...
@@ -862,7 +863,7 @@ function populateParameters (result) {
osVersion
,
hostTheme
:
theme
,
hostVersion
,
hostLanguage
:
language
.
replace
(
'
_
'
,
'
-
'
)
,
hostLanguage
,
hostName
:
_hostName
,
hostSDKVersion
:
_SDKVersion
,
hostFontSizeSetting
:
fontSizeSetting
,
...
...
@@ -874,7 +875,7 @@ function populateParameters (result) {
ua
:
undefined
,
hostPackageName
:
undefined
,
browserName
:
undefined
,
browseVersion
:
undefined
browse
r
Version
:
undefined
};
Object
.
assign
(
result
,
parameters
);
...
...
@@ -901,18 +902,28 @@ function getGetDeviceType (result, model) {
return
deviceType
}
function
getDeviceBrand
(
brand
,
model
,
isQuickApp
=
false
)
{
let
deviceBrand
=
model
.
split
(
'
'
)[
0
].
toLocaleLowerCase
();
{
function
getDeviceBrand
(
brand
)
{
let
deviceBrand
=
brand
;
if
(
deviceBrand
)
{
deviceBrand
=
brand
.
toLocaleLowerCase
();
}
return
deviceBrand
}
function
getAppLanguage
(
defaultLanguage
)
{
return
getLocale$1
?
getLocale$1
()
:
defaultLanguage
}
function
getHostName
(
result
)
{
const
_platform
=
"
mp-lark
"
.
split
(
'
-
'
)[
1
];
let
_hostName
=
result
.
hostName
||
_platform
;
// mp-jd
{
_hostName
=
result
.
appName
;
}
return
_hostName
}
var
getSystemInfo
=
{
returnValue
:
function
(
result
)
{
useDeviceId
(
result
);
...
...
packages/uni-mp-qq/dist/index.js
浏览文件 @
07fc68b7
...
...
@@ -98,7 +98,7 @@ function hasOwn (obj, key) {
return
hasOwnProperty
.
call
(
obj
,
key
)
}
function
noop
()
{}
function
noop
()
{
}
/**
* Create a cached version of a pure function.
...
...
@@ -778,12 +778,6 @@ var previewImage = {
}
};
function
_getDeviceBrand
(
model
)
{
if
(
/iphone/gi
.
test
(
model
)
||
/ipad/gi
.
test
(
model
)
||
/mac/gi
.
test
(
model
))
{
return
'
apple
'
}
if
(
/windows/gi
.
test
(
model
))
{
return
'
microsoft
'
}
return
''
}
const
UUID_KEY
=
'
__DC_STAT_UUID
'
;
let
deviceId
;
function
useDeviceId
(
result
)
{
...
...
@@ -814,11 +808,10 @@ function populateParameters (result) {
const
{
brand
=
''
,
model
=
''
,
system
=
''
,
language
=
''
,
theme
,
version
,
hostName
,
platform
,
fontSizeSetting
,
SDKVersion
,
pixelRatio
,
deviceOrientation
,
environment
platform
,
fontSizeSetting
,
SDKVersion
,
pixelRatio
,
deviceOrientation
}
=
result
;
const
isQuickApp
=
"
mp-qq
"
.
indexOf
(
'
quickapp-webview
'
)
!==
-
1
;
// const isQuickApp = "mp-qq".indexOf('quickapp-webview') !== -1
// osName osVersion
let
osName
=
''
;
...
...
@@ -833,12 +826,10 @@ function populateParameters (result) {
const
deviceType
=
getGetDeviceType
(
result
,
model
);
// deviceModel
const
deviceBrand
=
getDeviceBrand
(
brand
,
model
,
isQuickApp
);
const
deviceBrand
=
getDeviceBrand
(
brand
);
// hostName
const
_platform
=
"
mp-qq
"
.
split
(
'
-
'
)[
1
];
let
_hostName
=
hostName
||
_platform
;
// mp-jd
_hostName
=
result
.
AppPlatform
;
const
_hostName
=
getHostName
(
result
);
// deviceOrientation
let
_deviceOrientation
=
deviceOrientation
;
// 仅 微信 百度 支持
...
...
@@ -849,6 +840,9 @@ function populateParameters (result) {
// SDKVersion
let
_SDKVersion
=
SDKVersion
;
// hostLanguage
const
hostLanguage
=
language
.
replace
(
/_/g
,
'
-
'
);
// wx.getAccountInfoSync
const
parameters
=
{
...
...
@@ -856,6 +850,7 @@ function populateParameters (result) {
appName
:
process
.
env
.
UNI_APP_NAME
,
appVersion
:
process
.
env
.
UNI_APP_VERSION_NAME
,
appVersionCode
:
process
.
env
.
UNI_APP_VERSION_CODE
,
appLanguage
:
getAppLanguage
(
hostLanguage
),
uniCompileVersion
:
process
.
env
.
UNI_COMPILER_VERSION
,
uniRuntimeVersion
:
process
.
env
.
UNI_COMPILER_VERSION
,
uniPlatform
:
process
.
env
.
UNI_SUB_PLATFORM
||
process
.
env
.
UNI_PLATFORM
,
...
...
@@ -868,7 +863,7 @@ function populateParameters (result) {
osVersion
,
hostTheme
:
theme
,
hostVersion
,
hostLanguage
:
language
.
replace
(
'
_
'
,
'
-
'
)
,
hostLanguage
,
hostName
:
_hostName
,
hostSDKVersion
:
_SDKVersion
,
hostFontSizeSetting
:
fontSizeSetting
,
...
...
@@ -880,7 +875,7 @@ function populateParameters (result) {
ua
:
undefined
,
hostPackageName
:
undefined
,
browserName
:
undefined
,
browseVersion
:
undefined
browse
r
Version
:
undefined
};
Object
.
assign
(
result
,
parameters
);
...
...
@@ -907,23 +902,28 @@ function getGetDeviceType (result, model) {
return
deviceType
}
function
getDeviceBrand
(
brand
,
model
,
isQuickApp
=
false
)
{
let
deviceBrand
=
model
.
split
(
'
'
)[
0
].
toLocaleLowerCase
();
if
(
isQuickApp
)
{
function
getDeviceBrand
(
brand
)
{
let
deviceBrand
=
brand
;
if
(
deviceBrand
)
{
deviceBrand
=
brand
.
toLocaleLowerCase
();
}
else
{
deviceBrand
=
_getDeviceBrand
(
deviceBrand
);
}
return
deviceBrand
}
function
getAppLanguage
(
defaultLanguage
)
{
return
getLocale$1
?
getLocale$1
()
:
defaultLanguage
}
function
getHostName
(
result
)
{
const
_platform
=
"
mp-qq
"
.
split
(
'
-
'
)[
1
];
let
_hostName
=
result
.
hostName
||
_platform
;
// mp-jd
_hostName
=
result
.
AppPlatform
;
return
_hostName
}
var
getSystemInfo
=
{
returnValue
:
function
(
result
)
{
useDeviceId
(
result
);
...
...
packages/uni-mp-toutiao/dist/index.js
浏览文件 @
07fc68b7
...
...
@@ -98,7 +98,7 @@ function hasOwn (obj, key) {
return
hasOwnProperty
.
call
(
obj
,
key
)
}
function
noop
()
{}
function
noop
()
{
}
/**
* Create a cached version of a pure function.
...
...
@@ -808,11 +808,10 @@ function populateParameters (result) {
const
{
brand
=
''
,
model
=
''
,
system
=
''
,
language
=
''
,
theme
,
version
,
hostName
,
platform
,
fontSizeSetting
,
SDKVersion
,
pixelRatio
,
deviceOrientation
,
environment
platform
,
fontSizeSetting
,
SDKVersion
,
pixelRatio
,
deviceOrientation
}
=
result
;
const
isQuickApp
=
"
mp-toutiao
"
.
indexOf
(
'
quickapp-webview
'
)
!==
-
1
;
// const isQuickApp = "mp-toutiao".indexOf('quickapp-webview') !== -1
// osName osVersion
let
osName
=
''
;
...
...
@@ -827,12 +826,10 @@ function populateParameters (result) {
const
deviceType
=
getGetDeviceType
(
result
,
model
);
// deviceModel
const
deviceBrand
=
getDeviceBrand
(
brand
,
model
,
isQuickApp
);
const
deviceBrand
=
getDeviceBrand
(
brand
);
// hostName
const
_platform
=
"
mp-toutiao
"
.
split
(
'
-
'
)[
1
];
let
_hostName
=
hostName
||
_platform
;
// mp-jd
{
_hostName
=
result
.
appName
;
}
const
_hostName
=
getHostName
(
result
);
// deviceOrientation
let
_deviceOrientation
=
deviceOrientation
;
// 仅 微信 百度 支持
...
...
@@ -843,6 +840,9 @@ function populateParameters (result) {
// SDKVersion
let
_SDKVersion
=
SDKVersion
;
// hostLanguage
const
hostLanguage
=
language
.
replace
(
/_/g
,
'
-
'
);
// wx.getAccountInfoSync
const
parameters
=
{
...
...
@@ -850,6 +850,7 @@ function populateParameters (result) {
appName
:
process
.
env
.
UNI_APP_NAME
,
appVersion
:
process
.
env
.
UNI_APP_VERSION_NAME
,
appVersionCode
:
process
.
env
.
UNI_APP_VERSION_CODE
,
appLanguage
:
getAppLanguage
(
hostLanguage
),
uniCompileVersion
:
process
.
env
.
UNI_COMPILER_VERSION
,
uniRuntimeVersion
:
process
.
env
.
UNI_COMPILER_VERSION
,
uniPlatform
:
process
.
env
.
UNI_SUB_PLATFORM
||
process
.
env
.
UNI_PLATFORM
,
...
...
@@ -862,7 +863,7 @@ function populateParameters (result) {
osVersion
,
hostTheme
:
theme
,
hostVersion
,
hostLanguage
:
language
.
replace
(
'
_
'
,
'
-
'
)
,
hostLanguage
,
hostName
:
_hostName
,
hostSDKVersion
:
_SDKVersion
,
hostFontSizeSetting
:
fontSizeSetting
,
...
...
@@ -874,7 +875,7 @@ function populateParameters (result) {
ua
:
undefined
,
hostPackageName
:
undefined
,
browserName
:
undefined
,
browseVersion
:
undefined
browse
r
Version
:
undefined
};
Object
.
assign
(
result
,
parameters
);
...
...
@@ -901,18 +902,28 @@ function getGetDeviceType (result, model) {
return
deviceType
}
function
getDeviceBrand
(
brand
,
model
,
isQuickApp
=
false
)
{
let
deviceBrand
=
model
.
split
(
'
'
)[
0
].
toLocaleLowerCase
();
{
function
getDeviceBrand
(
brand
)
{
let
deviceBrand
=
brand
;
if
(
deviceBrand
)
{
deviceBrand
=
brand
.
toLocaleLowerCase
();
}
return
deviceBrand
}
function
getAppLanguage
(
defaultLanguage
)
{
return
getLocale$1
?
getLocale$1
()
:
defaultLanguage
}
function
getHostName
(
result
)
{
const
_platform
=
"
mp-toutiao
"
.
split
(
'
-
'
)[
1
];
let
_hostName
=
result
.
hostName
||
_platform
;
// mp-jd
{
_hostName
=
result
.
appName
;
}
return
_hostName
}
var
getSystemInfo
=
{
returnValue
:
function
(
result
)
{
useDeviceId
(
result
);
...
...
packages/uni-mp-weixin/dist/index.js
浏览文件 @
07fc68b7
...
...
@@ -98,7 +98,7 @@ function hasOwn (obj, key) {
return
hasOwnProperty
.
call
(
obj
,
key
)
}
function
noop
()
{}
function
noop
()
{
}
/**
* Create a cached version of a pure function.
...
...
@@ -117,7 +117,17 @@ function cached (fn) {
const
camelizeRE
=
/-
(\w)
/g
;
const
camelize
=
cached
((
str
)
=>
{
return
str
.
replace
(
camelizeRE
,
(
_
,
c
)
=>
c
?
c
.
toUpperCase
()
:
''
)
});
});
function
sortObject
(
obj
)
{
const
sortObj
=
{};
if
(
isPlainObject
(
obj
))
{
Object
.
keys
(
obj
).
sort
().
forEach
(
key
=>
{
sortObj
[
key
]
=
obj
[
key
];
});
}
return
!
Object
.
keys
(
sortObj
)
?
obj
:
sortObj
}
const
HOOKS
=
[
'
invoke
'
,
...
...
@@ -673,12 +683,6 @@ var previewImage = {
}
};
function
_getDeviceBrand
(
model
)
{
if
(
/iphone/gi
.
test
(
model
)
||
/ipad/gi
.
test
(
model
)
||
/mac/gi
.
test
(
model
))
{
return
'
apple
'
}
if
(
/windows/gi
.
test
(
model
))
{
return
'
microsoft
'
}
return
''
}
const
UUID_KEY
=
'
__DC_STAT_UUID
'
;
let
deviceId
;
function
useDeviceId
(
result
)
{
...
...
@@ -709,11 +713,10 @@ function populateParameters (result) {
const
{
brand
=
''
,
model
=
''
,
system
=
''
,
language
=
''
,
theme
,
version
,
hostName
,
platform
,
fontSizeSetting
,
SDKVersion
,
pixelRatio
,
deviceOrientation
,
environment
platform
,
fontSizeSetting
,
SDKVersion
,
pixelRatio
,
deviceOrientation
}
=
result
;
const
isQuickApp
=
"
mp-weixin
"
.
indexOf
(
'
quickapp-webview
'
)
!==
-
1
;
// const isQuickApp = "mp-weixin".indexOf('quickapp-webview') !== -1
// osName osVersion
let
osName
=
''
;
...
...
@@ -728,18 +731,10 @@ function populateParameters (result) {
const
deviceType
=
getGetDeviceType
(
result
,
model
);
// deviceModel
const
deviceBrand
=
getDeviceBrand
(
brand
,
model
,
isQuickApp
);
const
deviceBrand
=
getDeviceBrand
(
brand
);
// hostName
const
_platform
=
'
WeChat
'
;
let
_hostName
=
hostName
||
_platform
;
// mp-jd
{
if
(
environment
)
{
_hostName
=
environment
;
}
else
if
(
result
.
host
&&
result
.
host
.
env
)
{
_hostName
=
result
.
host
.
env
;
}
}
const
_hostName
=
getHostName
(
result
);
// deviceOrientation
let
_deviceOrientation
=
deviceOrientation
;
// 仅 微信 百度 支持
...
...
@@ -750,6 +745,9 @@ function populateParameters (result) {
// SDKVersion
let
_SDKVersion
=
SDKVersion
;
// hostLanguage
const
hostLanguage
=
language
.
replace
(
/_/g
,
'
-
'
);
// wx.getAccountInfoSync
const
parameters
=
{
...
...
@@ -757,6 +755,7 @@ function populateParameters (result) {
appName
:
process
.
env
.
UNI_APP_NAME
,
appVersion
:
process
.
env
.
UNI_APP_VERSION_NAME
,
appVersionCode
:
process
.
env
.
UNI_APP_VERSION_CODE
,
appLanguage
:
getAppLanguage
(
hostLanguage
),
uniCompileVersion
:
process
.
env
.
UNI_COMPILER_VERSION
,
uniRuntimeVersion
:
process
.
env
.
UNI_COMPILER_VERSION
,
uniPlatform
:
process
.
env
.
UNI_SUB_PLATFORM
||
process
.
env
.
UNI_PLATFORM
,
...
...
@@ -769,7 +768,7 @@ function populateParameters (result) {
osVersion
,
hostTheme
:
theme
,
hostVersion
,
hostLanguage
:
language
.
replace
(
'
_
'
,
'
-
'
)
,
hostLanguage
,
hostName
:
_hostName
,
hostSDKVersion
:
_SDKVersion
,
hostFontSizeSetting
:
fontSizeSetting
,
...
...
@@ -781,7 +780,7 @@ function populateParameters (result) {
ua
:
undefined
,
hostPackageName
:
undefined
,
browserName
:
undefined
,
browseVersion
:
undefined
browse
r
Version
:
undefined
};
Object
.
assign
(
result
,
parameters
);
...
...
@@ -808,23 +807,34 @@ function getGetDeviceType (result, model) {
return
deviceType
}
function
getDeviceBrand
(
brand
,
model
,
isQuickApp
=
false
)
{
let
deviceBrand
=
model
.
split
(
'
'
)[
0
].
toLocaleLowerCase
();
if
(
isQuickApp
)
{
function
getDeviceBrand
(
brand
)
{
let
deviceBrand
=
brand
;
if
(
deviceBrand
)
{
deviceBrand
=
brand
.
toLocaleLowerCase
();
}
else
{
deviceBrand
=
_getDeviceBrand
(
deviceBrand
);
}
return
deviceBrand
}
function
getAppLanguage
(
defaultLanguage
)
{
return
getLocale$1
?
getLocale$1
()
:
defaultLanguage
}
function
getHostName
(
result
)
{
const
_platform
=
'
WeChat
'
;
let
_hostName
=
result
.
hostName
||
_platform
;
// mp-jd
{
if
(
result
.
environment
)
{
_hostName
=
result
.
environment
;
}
else
if
(
result
.
host
&&
result
.
host
.
env
)
{
_hostName
=
result
.
host
.
env
;
}
}
return
_hostName
}
var
getSystemInfo
=
{
returnValue
:
function
(
result
)
{
useDeviceId
(
result
);
...
...
@@ -845,24 +855,22 @@ var getAppBaseInfo = {
returnValue
:
function
(
result
)
{
const
{
version
,
language
,
SDKVersion
,
theme
}
=
result
;
let
_hostName
=
"
mp-weixin
"
.
split
(
'
-
'
)[
1
];
// mp-jd
{
if
(
result
.
host
&&
result
.
host
.
env
)
{
_hostName
=
result
.
host
.
env
;
}
}
const
_hostName
=
getHostName
(
result
);
Object
.
assign
(
result
,
{
hostVersion
:
version
,
hostLanguage
:
language
.
replace
(
'
_
'
,
'
-
'
),
hostName
:
_hostName
,
hostSDKVersion
:
SDKVersion
,
hostTheme
:
theme
,
const
hostLanguage
=
language
.
replace
(
'
_
'
,
'
-
'
);
result
=
sortObject
(
Object
.
assign
(
result
,
{
appId
:
process
.
env
.
UNI_APP_ID
,
appName
:
process
.
env
.
UNI_APP_NAME
,
appVersion
:
process
.
env
.
UNI_APP_VERSION_NAME
,
appVersionCode
:
process
.
env
.
UNI_APP_VERSION_CODE
});
appVersionCode
:
process
.
env
.
UNI_APP_VERSION_CODE
,
appLanguage
:
getAppLanguage
(
hostLanguage
),
hostVersion
:
version
,
hostLanguage
,
hostName
:
_hostName
,
hostSDKVersion
:
SDKVersion
,
hostTheme
:
theme
}));
}
};
...
...
@@ -870,14 +878,14 @@ var getDeviceInfo = {
returnValue
:
function
(
result
)
{
const
{
brand
,
model
}
=
result
;
const
deviceType
=
getGetDeviceType
(
result
,
model
);
const
deviceBrand
=
getDeviceBrand
(
brand
,
model
);
const
deviceBrand
=
getDeviceBrand
(
brand
);
useDeviceId
(
result
);
Object
.
assign
(
result
,
{
result
=
sortObject
(
Object
.
assign
(
result
,
{
deviceType
,
deviceBrand
,
deviceModel
:
model
});
})
)
;
}
};
...
...
@@ -885,10 +893,10 @@ var getWindowInfo = {
returnValue
:
function
(
result
)
{
addSafeAreaInsets
(
result
);
Object
.
assign
(
result
,
{
result
=
sortObject
(
Object
.
assign
(
result
,
{
windowTop
:
0
,
windowBottom
:
0
});
})
)
;
}
};
...
...
packages/uni-mp-xhs/dist/index.js
浏览文件 @
07fc68b7
...
...
@@ -98,7 +98,7 @@ function hasOwn (obj, key) {
return
hasOwnProperty
.
call
(
obj
,
key
)
}
function
noop
()
{}
function
noop
()
{
}
/**
* Create a cached version of a pure function.
...
...
@@ -607,12 +607,6 @@ var baseApi = /*#__PURE__*/Object.freeze({
interceptors
:
interceptors
});
function
_getDeviceBrand
(
model
)
{
if
(
/iphone/gi
.
test
(
model
)
||
/ipad/gi
.
test
(
model
)
||
/mac/gi
.
test
(
model
))
{
return
'
apple
'
}
if
(
/windows/gi
.
test
(
model
))
{
return
'
microsoft
'
}
return
''
}
const
UUID_KEY
=
'
__DC_STAT_UUID
'
;
let
deviceId
;
function
useDeviceId
(
result
)
{
...
...
@@ -643,11 +637,10 @@ function populateParameters (result) {
const
{
brand
=
''
,
model
=
''
,
system
=
''
,
language
=
''
,
theme
,
version
,
hostName
,
platform
,
fontSizeSetting
,
SDKVersion
,
pixelRatio
,
deviceOrientation
,
environment
platform
,
fontSizeSetting
,
SDKVersion
,
pixelRatio
,
deviceOrientation
}
=
result
;
const
isQuickApp
=
"
mp-xhs
"
.
indexOf
(
'
quickapp-webview
'
)
!==
-
1
;
// const isQuickApp = "mp-xhs".indexOf('quickapp-webview') !== -1
// osName osVersion
let
osName
=
''
;
...
...
@@ -662,11 +655,10 @@ function populateParameters (result) {
const
deviceType
=
getGetDeviceType
(
result
,
model
);
// deviceModel
const
deviceBrand
=
getDeviceBrand
(
brand
,
model
,
isQuickApp
);
const
deviceBrand
=
getDeviceBrand
(
brand
);
// hostName
const
_platform
=
"
mp-xhs
"
.
split
(
'
-
'
)[
1
];
let
_hostName
=
hostName
||
_platform
;
// mp-jd
const
_hostName
=
getHostName
(
result
);
// deviceOrientation
let
_deviceOrientation
=
deviceOrientation
;
// 仅 微信 百度 支持
...
...
@@ -677,6 +669,9 @@ function populateParameters (result) {
// SDKVersion
let
_SDKVersion
=
SDKVersion
;
// hostLanguage
const
hostLanguage
=
language
.
replace
(
/_/g
,
'
-
'
);
// wx.getAccountInfoSync
const
parameters
=
{
...
...
@@ -684,6 +679,7 @@ function populateParameters (result) {
appName
:
process
.
env
.
UNI_APP_NAME
,
appVersion
:
process
.
env
.
UNI_APP_VERSION_NAME
,
appVersionCode
:
process
.
env
.
UNI_APP_VERSION_CODE
,
appLanguage
:
getAppLanguage
(
hostLanguage
),
uniCompileVersion
:
process
.
env
.
UNI_COMPILER_VERSION
,
uniRuntimeVersion
:
process
.
env
.
UNI_COMPILER_VERSION
,
uniPlatform
:
process
.
env
.
UNI_SUB_PLATFORM
||
process
.
env
.
UNI_PLATFORM
,
...
...
@@ -696,7 +692,7 @@ function populateParameters (result) {
osVersion
,
hostTheme
:
theme
,
hostVersion
,
hostLanguage
:
language
.
replace
(
'
_
'
,
'
-
'
)
,
hostLanguage
,
hostName
:
_hostName
,
hostSDKVersion
:
_SDKVersion
,
hostFontSizeSetting
:
fontSizeSetting
,
...
...
@@ -708,7 +704,7 @@ function populateParameters (result) {
ua
:
undefined
,
hostPackageName
:
undefined
,
browserName
:
undefined
,
browseVersion
:
undefined
browse
r
Version
:
undefined
};
Object
.
assign
(
result
,
parameters
);
...
...
@@ -735,23 +731,27 @@ function getGetDeviceType (result, model) {
return
deviceType
}
function
getDeviceBrand
(
brand
,
model
,
isQuickApp
=
false
)
{
let
deviceBrand
=
model
.
split
(
'
'
)[
0
].
toLocaleLowerCase
();
if
(
isQuickApp
)
{
function
getDeviceBrand
(
brand
)
{
let
deviceBrand
=
brand
;
if
(
deviceBrand
)
{
deviceBrand
=
brand
.
toLocaleLowerCase
();
}
else
{
deviceBrand
=
_getDeviceBrand
(
deviceBrand
);
}
return
deviceBrand
}
function
getAppLanguage
(
defaultLanguage
)
{
return
getLocale$1
?
getLocale$1
()
:
defaultLanguage
}
function
getHostName
(
result
)
{
const
_platform
=
"
mp-xhs
"
.
split
(
'
-
'
)[
1
];
let
_hostName
=
result
.
hostName
||
_platform
;
// mp-jd
return
_hostName
}
var
getSystemInfo
=
{
returnValue
:
function
(
result
)
{
useDeviceId
(
result
);
...
...
packages/uni-quickapp-webview/dist/index.js
浏览文件 @
07fc68b7
...
...
@@ -98,7 +98,7 @@ function hasOwn (obj, key) {
return
hasOwnProperty
.
call
(
obj
,
key
)
}
function
noop
()
{}
function
noop
()
{
}
/**
* Create a cached version of a pure function.
...
...
@@ -778,12 +778,6 @@ var previewImage = {
}
};
function
_getDeviceBrand
(
model
)
{
if
(
/iphone/gi
.
test
(
model
)
||
/ipad/gi
.
test
(
model
)
||
/mac/gi
.
test
(
model
))
{
return
'
apple
'
}
if
(
/windows/gi
.
test
(
model
))
{
return
'
microsoft
'
}
return
''
}
const
UUID_KEY
=
'
__DC_STAT_UUID
'
;
let
deviceId
;
function
useDeviceId
(
result
)
{
...
...
@@ -814,11 +808,10 @@ function populateParameters (result) {
const
{
brand
=
''
,
model
=
''
,
system
=
''
,
language
=
''
,
theme
,
version
,
hostName
,
platform
,
fontSizeSetting
,
SDKVersion
,
pixelRatio
,
deviceOrientation
,
environment
platform
,
fontSizeSetting
,
SDKVersion
,
pixelRatio
,
deviceOrientation
}
=
result
;
const
isQuickApp
=
"
quickapp-webview
"
.
indexOf
(
'
quickapp-webview
'
)
!==
-
1
;
// const isQuickApp = "quickapp-webview".indexOf('quickapp-webview') !== -1
// osName osVersion
let
osName
=
''
;
...
...
@@ -833,11 +826,10 @@ function populateParameters (result) {
const
deviceType
=
getGetDeviceType
(
result
,
model
);
// deviceModel
const
deviceBrand
=
getDeviceBrand
(
brand
,
model
,
isQuickApp
);
const
deviceBrand
=
getDeviceBrand
(
brand
);
// hostName
const
_platform
=
"
quickapp-webview
"
.
split
(
'
-
'
)[
1
];
let
_hostName
=
hostName
||
_platform
;
// mp-jd
const
_hostName
=
getHostName
(
result
);
// deviceOrientation
let
_deviceOrientation
=
deviceOrientation
;
// 仅 微信 百度 支持
...
...
@@ -848,6 +840,9 @@ function populateParameters (result) {
// SDKVersion
let
_SDKVersion
=
SDKVersion
;
// hostLanguage
const
hostLanguage
=
language
.
replace
(
/_/g
,
'
-
'
);
// wx.getAccountInfoSync
const
parameters
=
{
...
...
@@ -855,6 +850,7 @@ function populateParameters (result) {
appName
:
process
.
env
.
UNI_APP_NAME
,
appVersion
:
process
.
env
.
UNI_APP_VERSION_NAME
,
appVersionCode
:
process
.
env
.
UNI_APP_VERSION_CODE
,
appLanguage
:
getAppLanguage
(
hostLanguage
),
uniCompileVersion
:
process
.
env
.
UNI_COMPILER_VERSION
,
uniRuntimeVersion
:
process
.
env
.
UNI_COMPILER_VERSION
,
uniPlatform
:
process
.
env
.
UNI_SUB_PLATFORM
||
process
.
env
.
UNI_PLATFORM
,
...
...
@@ -867,7 +863,7 @@ function populateParameters (result) {
osVersion
,
hostTheme
:
theme
,
hostVersion
,
hostLanguage
:
language
.
replace
(
'
_
'
,
'
-
'
)
,
hostLanguage
,
hostName
:
_hostName
,
hostSDKVersion
:
_SDKVersion
,
hostFontSizeSetting
:
fontSizeSetting
,
...
...
@@ -879,7 +875,7 @@ function populateParameters (result) {
ua
:
undefined
,
hostPackageName
:
undefined
,
browserName
:
undefined
,
browseVersion
:
undefined
browse
r
Version
:
undefined
};
Object
.
assign
(
result
,
parameters
);
...
...
@@ -906,23 +902,27 @@ function getGetDeviceType (result, model) {
return
deviceType
}
function
getDeviceBrand
(
brand
,
model
,
isQuickApp
=
false
)
{
let
deviceBrand
=
model
.
split
(
'
'
)[
0
].
toLocaleLowerCase
();
if
(
isQuickApp
)
{
function
getDeviceBrand
(
brand
)
{
let
deviceBrand
=
brand
;
if
(
deviceBrand
)
{
deviceBrand
=
brand
.
toLocaleLowerCase
();
}
else
{
deviceBrand
=
_getDeviceBrand
(
deviceBrand
);
}
return
deviceBrand
}
function
getAppLanguage
(
defaultLanguage
)
{
return
getLocale$1
?
getLocale$1
()
:
defaultLanguage
}
function
getHostName
(
result
)
{
const
_platform
=
"
quickapp-webview
"
.
split
(
'
-
'
)[
1
];
let
_hostName
=
result
.
hostName
||
_platform
;
// mp-jd
return
_hostName
}
var
getSystemInfo
=
{
returnValue
:
function
(
result
)
{
useDeviceId
(
result
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录