Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
genary
uni-app
提交
3cd8fec1
U
uni-app
项目概览
genary
/
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,发现更多精彩内容 >>
提交
3cd8fec1
编写于
6月 06, 2022
作者:
fxy060608
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
chore: build
上级
44c3840e
变更
14
展开全部
隐藏空白更改
内联
并排
Showing
14 changed file
with
3438 addition
and
3409 deletion
+3438
-3409
packages/playground/uts/unpackage/nativeplugins/test-uniplugin/android/src/io/dcloud/uniplugin/TestModule.kt.map
...iplugin/android/src/io/dcloud/uniplugin/TestModule.kt.map
+1
-1
packages/playground/uts/unpackage/nativeplugins/test-uniplugin/android/src/io/dcloud/uniplugin/log.kt.map
...test-uniplugin/android/src/io/dcloud/uniplugin/log.kt.map
+1
-1
packages/playground/uts/unpackage/nativeplugins/test-uniplugin/android/src/test.kt.map
...kage/nativeplugins/test-uniplugin/android/src/test.kt.map
+1
-1
packages/uni-app-plus/dist/uni.runtime.esm.js
packages/uni-app-plus/dist/uni.runtime.esm.js
+14
-24
packages/uni-mp-alipay/dist/uni.api.esm.js
packages/uni-mp-alipay/dist/uni.api.esm.js
+23
-25
packages/uni-mp-baidu/dist/uni.api.esm.js
packages/uni-mp-baidu/dist/uni.api.esm.js
+25
-27
packages/uni-mp-kuaishou/dist/uni.api.esm.js
packages/uni-mp-kuaishou/dist/uni.api.esm.js
+25
-27
packages/uni-mp-lark/dist/uni.api.esm.js
packages/uni-mp-lark/dist/uni.api.esm.js
+25
-15
packages/uni-mp-qq/dist/uni.api.esm.js
packages/uni-mp-qq/dist/uni.api.esm.js
+23
-25
packages/uni-mp-toutiao/dist/uni.api.esm.js
packages/uni-mp-toutiao/dist/uni.api.esm.js
+25
-15
packages/uni-mp-vue/dist/vue.runtime.esm.js
packages/uni-mp-vue/dist/vue.runtime.esm.js
+1606
-1589
packages/uni-mp-vue/lib/vue.runtime.esm.js
packages/uni-mp-vue/lib/vue.runtime.esm.js
+1606
-1589
packages/uni-mp-weixin/dist/uni.api.esm.js
packages/uni-mp-weixin/dist/uni.api.esm.js
+41
-46
packages/uni-quickapp-webview/dist/uni.api.esm.js
packages/uni-quickapp-webview/dist/uni.api.esm.js
+22
-24
未找到文件。
packages/playground/uts/unpackage/nativeplugins/test-uniplugin/android/src/io/dcloud/uniplugin/TestModule.kt.map
浏览文件 @
3cd8fec1
{"version":3,"sources":["/Users/guoshengqiang/Documents/uni-app-next/packages/playground/uts/nativeplugins/test-uniplugin/android/src/io/dcloud/uniplugin/TestModule.uts"],"names":["TestModule","UniModule","TAG","UniJSMethod","uiThread","testAsyncFunc","options","callback","log","data","JSONObject","invoke","testSyncFunc","onActivityResult","requestCode","resultCode","REQUEST_CODE","hasExtra","getStringExtra"],"mappings":"AAAA;AAAA,OAAmB,sBAAwB,CAAC;AAC5C,OAAuB,+BAAiC,CAAC;AACzD,OAAsB,yCAA2C,CAAC;AAClE,OAAwB,+CAAiD,CAAC;AAC1E,OAA0B,6CAA+C,CAAC;AAC1E,OAAgB,2BAAO,CAAC;AACT,WAAMA,UAAU,GAASC,SAAS,EAAE;IACjDC,SAAAA,GAAG,GAAG,YAAY,CAAC;IAGnB,CAACC,WAAW,CAAC,CAAEC,QAAQ,GAAE,IAAI,CAAE,CAAC;IAAA,SAChCC,aAAa,CAACC,OAAmB,EAAV,UAAU,EAAEC,QAAwB,EAAb,aAAa,CAAA,EAAE;QAC3DC,GAAG,CAAC,IAAI,CAACN,GAAG,EAAE,yBAAyB,CAAC,CAAC;QACzC,IAAIK,QAAQ,IAAI,IAAI,EAAE;YACpB,IAAME,IAAI,GAAG,AAAIC,UAAU,EAAE,AAAC;YAC9BD,IAAI,CAAC,MAAM,CAAC,GAAG,cAAc,CAAC;YAC9BF,QAAQ,CAACI,MAAM,CAACF,IAAI,CAAC,CAAC;;;IAI1B,CAACN,WAAW,CAAC,CAAEC,QAAQ,GAAE,KAAK,CAAE,CAAC;IAAA,SACjCQ,YAAY,CAACN,OAAmB,EAAV,UAAU,GAAG,UAAU,CAAC;QAC5C,IAAMG,IAAI,GAAG,AAAIC,UAAU,EAAE,AAAC;QAC9BD,IAAI,CAAC,MAAM,CAAC,GAAG,YAAY,CAAC;QAC5B,OAAOA,IAAI,CAAC;;IAEd,aAASI,gBAAgB,CAACC,WAAgB,EAAH,GAAG,EAAEC,UAAe,EAAH,GAAG,EAAEN,IAAY,EAAN,MAAM,EAAE;QACzE,IAAIK,WAAW,IAAId,UAAU,CAACgB,YAAY,IAAIP,IAAI,CAACQ,QAAQ,CAAC,SAAS,CAAC,EAAE;YACtET,GAAG,CAAC,IAAI,CAACN,GAAG,EAAE,wBAAY,GAAGO,IAAI,CAACS,cAAc,CAAC,SAAS,CAAC,CAAC,CAAC;;QAC9D,MAAM;YACL,KAAK,CAACL,gBAAgB,CAACC,WAAW,EAAEC,UAAU,EAAEN,IAAI,CAAC,CAAC;;;;QAtB1D,IAAOO,YAAY,GAAG,IAAI,CAAC;;CAyB5B"}
\ No newline at end of file
{"version":3,"sources":["/Users/fxy/Projects/GitHub/uni-app/uni-app-next/packages/playground/uts/nativeplugins/test-uniplugin/android/src/io/dcloud/uniplugin/TestModule.uts"],"names":["TestModule","UniModule","TAG","UniJSMethod","uiThread","testAsyncFunc","options","callback","log","data","JSONObject","invoke","testSyncFunc","onActivityResult","requestCode","resultCode","REQUEST_CODE","hasExtra","getStringExtra"],"mappings":"AAAA;AAAA,OAAmB,sBAAwB,CAAC;AAC5C,OAAuB,+BAAiC,CAAC;AACzD,OAAsB,yCAA2C,CAAC;AAClE,OAAwB,+CAAiD,CAAC;AAC1E,OAA0B,6CAA+C,CAAC;AAC1E,OAAgB,2BAAO,CAAC;AACT,WAAMA,UAAU,GAASC,SAAS,EAAE;IACjDC,SAAAA,GAAG,GAAG,YAAY,CAAC;IAGnB,CAACC,WAAW,CAAC,CAAEC,QAAQ,GAAE,IAAI,CAAE,CAAC;IAAA,SAChCC,aAAa,CAACC,OAAmB,EAAV,UAAU,EAAEC,QAAwB,EAAb,aAAa,CAAA,EAAE;QAC3DC,GAAG,CAAC,IAAI,CAACN,GAAG,EAAE,yBAAyB,CAAC,CAAC;QACzC,IAAIK,QAAQ,IAAI,IAAI,EAAE;YACpB,IAAME,IAAI,GAAG,AAAIC,UAAU,EAAE,AAAC;YAC9BD,IAAI,CAAC,MAAM,CAAC,GAAG,cAAc,CAAC;YAC9BF,QAAQ,CAACI,MAAM,CAACF,IAAI,CAAC,CAAC;;;IAI1B,CAACN,WAAW,CAAC,CAAEC,QAAQ,GAAE,KAAK,CAAE,CAAC;IAAA,SACjCQ,YAAY,CAACN,OAAmB,EAAV,UAAU,GAAG,UAAU,CAAC;QAC5C,IAAMG,IAAI,GAAG,AAAIC,UAAU,EAAE,AAAC;QAC9BD,IAAI,CAAC,MAAM,CAAC,GAAG,YAAY,CAAC;QAC5B,OAAOA,IAAI,CAAC;;IAEd,aAASI,gBAAgB,CAACC,WAAgB,EAAH,GAAG,EAAEC,UAAe,EAAH,GAAG,EAAEN,IAAY,EAAN,MAAM,EAAE;QACzE,IAAIK,WAAW,IAAId,UAAU,CAACgB,YAAY,IAAIP,IAAI,CAACQ,QAAQ,CAAC,SAAS,CAAC,EAAE;YACtET,GAAG,CAAC,IAAI,CAACN,GAAG,EAAE,wBAAY,GAAGO,IAAI,CAACS,cAAc,CAAC,SAAS,CAAC,CAAC,CAAC;;QAC9D,MAAM;YACL,KAAK,CAACL,gBAAgB,CAACC,WAAW,EAAEC,UAAU,EAAEN,IAAI,CAAC,CAAC;;;;QAtB1D,IAAOO,YAAY,GAAG,IAAI,CAAC;;CAyB5B"}
\ No newline at end of file
packages/playground/uts/unpackage/nativeplugins/test-uniplugin/android/src/io/dcloud/uniplugin/log.kt.map
浏览文件 @
3cd8fec1
{"version":3,"sources":["/Users/guoshengqiang/Documents/uni-app-next/packages/playground/uts/nativeplugins/test-uniplugin/android/src/io/dcloud/uniplugin/log.uts"],"names":["log","tag","msg","Log","e"],"mappings":"AAAA;AAAA,OAAgB,gBAAkB,CAAC;AACpB,IAASA,GAAG,CAACC,GAAW,EAAN,MAAM,EAAEC,GAAW,EAAN,MAAM,EAAE;IACpDC,GAAG,CAACC,CAAC,CAACH,GAAG,EAAEC,GAAG,CAAC,CAAC"}
\ No newline at end of file
{"version":3,"sources":["/Users/fxy/Projects/GitHub/uni-app/uni-app-next/packages/playground/uts/nativeplugins/test-uniplugin/android/src/io/dcloud/uniplugin/log.uts"],"names":["log","tag","msg","Log","e"],"mappings":"AAAA;AAAA,OAAgB,gBAAkB,CAAC;AACpB,IAASA,GAAG,CAACC,GAAW,EAAN,MAAM,EAAEC,GAAW,EAAN,MAAM,EAAE;IACpDC,GAAG,CAACC,CAAC,CAACH,GAAG,EAAEC,GAAG,CAAC,CAAC"}
\ No newline at end of file
packages/playground/uts/unpackage/nativeplugins/test-uniplugin/android/src/test.kt.map
浏览文件 @
3cd8fec1
{"version":3,"sources":["/Users/guoshengqiang/Documents/uni-app-next/packages/playground/uts/nativeplugins/test-uniplugin/android/src/test.uts"],"names":["log","tag","msg","Log","e"],"mappings":";AAAA,OAAgB,gBAAkB,CAAC;AACpB,IAASA,GAAG,CAACC,GAAW,EAAN,MAAM,EAAEC,GAAW,EAAN,MAAM,EAAE;IACpDC,GAAG,CAACC,CAAC,CAACH,GAAG,EAAEC,GAAG,CAAC,CAAC"}
\ No newline at end of file
{"version":3,"sources":["/Users/fxy/Projects/GitHub/uni-app/uni-app-next/packages/playground/uts/nativeplugins/test-uniplugin/android/src/test.uts"],"names":["log","tag","msg","Log","e"],"mappings":";AAAA,OAAgB,gBAAkB,CAAC;AACpB,IAASA,GAAG,CAACC,GAAW,EAAN,MAAM,EAAEC,GAAW,EAAN,MAAM,EAAE;IACpDC,GAAG,CAACC,CAAC,CAACH,GAAG,EAAEC,GAAG,CAAC,CAAC"}
\ No newline at end of file
packages/uni-app-plus/dist/uni.runtime.esm.js
浏览文件 @
3cd8fec1
import { isArray as isArray$1, hasOwn as hasOwn$1, isString, isPlainObject, isObject as isObject$1, toRawType, capitalize, makeMap, isFunction, isPromise, extend, remove, toTypeString } from '@vue/shared';
import { LINEFEED, parseNVueDataset, once, I18N_JSON_DELIMITERS, Emitter, addLeadingSlash, resolveComponentInstance, invokeArrayFns, ON_RESIZE, ON_APP_ENTER_FOREGROUND, ON_APP_ENTER_BACKGROUND, ON_SHOW, ON_HIDE, ON_PAGE_SCROLL, ON_REACH_BOTTOM, SCHEME_RE, DATA_RE, cacheStringFunction, parseQuery, ON_ERROR, callOptions, ON_UNHANDLE_REJECTION, ON_PAGE_NOT_FOUND, PRIMARY_COLOR, removeLeadingSlash, getLen, formatLog, TABBAR_HEIGHT, NAVBAR_HEIGHT, ON_THEME_CHANGE, ON_KEYBOARD_HEIGHT_CHANGE, BACKGROUND_COLOR, ON_NAVIGATION_BAR_BUTTON_TAP, stringifyQuery as stringifyQuery$1, debounce, ON_PULL_DOWN_REFRESH, ON_NAVIGATION_BAR_SEARCH_INPUT_CHANGED, ON_NAVIGATION_BAR_SEARCH_INPUT_CONFIRMED, ON_NAVIGATION_BAR_SEARCH_INPUT_CLICKED, ON_NAVIGATION_BAR_SEARCH_INPUT_FOCUS_CHANGED, ON_BACK_PRESS, UniNode, NODE_TYPE_PAGE, ACTION_TYPE_PAGE_CREATE, ACTION_TYPE_PAGE_CREATED, ACTION_TYPE_PAGE_SCROLL, ACTION_TYPE_INSERT, ACTION_TYPE_CREATE, ACTION_TYPE_REMOVE, ACTION_TYPE_ADD_EVENT, ACTION_TYPE_ADD_WXS_EVENT, ACTION_TYPE_REMOVE_EVENT, ACTION_TYPE_SET_ATTRIBUTE, ACTION_TYPE_REMOVE_ATTRIBUTE, ACTION_TYPE_SET_TEXT, ON_READY, ON_UNLOAD, EventChannel, ON_REACH_BOTTOM_DISTANCE, parseUrl, onCreateVueApp, ON_TAB_ITEM_TAP, ON_LAUNCH, ACTION_TYPE_EVENT, createUniEvent, ON_WXS_INVOKE_CALL_METHOD, WEB_INVOKE_APPSERVICE } from '@dcloudio/uni-shared';
import { LINEFEED, parseNVueDataset, once, I18N_JSON_DELIMITERS, Emitter, addLeadingSlash, resolveComponentInstance, invokeArrayFns, ON_RESIZE, ON_APP_ENTER_FOREGROUND, ON_APP_ENTER_BACKGROUND, ON_SHOW, ON_HIDE, ON_PAGE_SCROLL, ON_REACH_BOTTOM, SCHEME_RE, DATA_RE, cacheStringFunction, parseQuery, ON_ERROR, callOptions, ON_UNHANDLE_REJECTION, ON_PAGE_NOT_FOUND, PRIMARY_COLOR, removeLeadingSlash, getLen, formatLog, TABBAR_HEIGHT, NAVBAR_HEIGHT,
sortObject,
ON_THEME_CHANGE, ON_KEYBOARD_HEIGHT_CHANGE, BACKGROUND_COLOR, ON_NAVIGATION_BAR_BUTTON_TAP, stringifyQuery as stringifyQuery$1, debounce, ON_PULL_DOWN_REFRESH, ON_NAVIGATION_BAR_SEARCH_INPUT_CHANGED, ON_NAVIGATION_BAR_SEARCH_INPUT_CONFIRMED, ON_NAVIGATION_BAR_SEARCH_INPUT_CLICKED, ON_NAVIGATION_BAR_SEARCH_INPUT_FOCUS_CHANGED, ON_BACK_PRESS, UniNode, NODE_TYPE_PAGE, ACTION_TYPE_PAGE_CREATE, ACTION_TYPE_PAGE_CREATED, ACTION_TYPE_PAGE_SCROLL, ACTION_TYPE_INSERT, ACTION_TYPE_CREATE, ACTION_TYPE_REMOVE, ACTION_TYPE_ADD_EVENT, ACTION_TYPE_ADD_WXS_EVENT, ACTION_TYPE_REMOVE_EVENT, ACTION_TYPE_SET_ATTRIBUTE, ACTION_TYPE_REMOVE_ATTRIBUTE, ACTION_TYPE_SET_TEXT, ON_READY, ON_UNLOAD, EventChannel, ON_REACH_BOTTOM_DISTANCE, parseUrl, onCreateVueApp, ON_TAB_ITEM_TAP, ON_LAUNCH, ACTION_TYPE_EVENT, createUniEvent, ON_WXS_INVOKE_CALL_METHOD, WEB_INVOKE_APPSERVICE } from '@dcloudio/uni-shared';
import { ref, injectHook, createVNode, render, queuePostFlushCb, getCurrentInstance, onMounted, nextTick, onBeforeUnmount } from 'vue';
/*
...
...
@@ -13378,39 +13378,39 @@ const getDeviceInfo = defineSyncApi('getDeviceInfo', () => {
const brand = deviceBrand.toLowerCase();
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,
system: `${_osName === 'ios' ? 'iOS' : 'Android'} ${osVersion}`,
};
});
const getAppBaseInfo = defineSyncApi('getAppBaseInfo', () => {
weexGetSystemInfoSync();
const { hostPackageName, hostName, hostVersion, hostLanguage, osLanguage, hostTheme, appId, appName, appVersion, appVersionCode, } = systemInfo;
return {
SDKVersion: '',
hostSDKVersion: '',
enableDebug: false,
appId,
appName,
appVersion,
appVersionCode,
appLanguage: getLocale ? getLocale() : osLanguage,
version: plus.runtime.innerVersion,
language: osLanguage,
theme: '',
enableDebug: false,
hostPackageName,
hostName,
hostVersion,
hostLanguage,
hostTheme,
hostFontSizeSetting: undefined,
hostSDKVersion: undefined,
language: osLanguage,
SDKVersion: '',
theme: undefined,
version: plus.runtime.innerVersion,
};
});
const getSystemInfoSync = defineSyncApi('getSystemInfoSync', () => {
...
...
@@ -13421,28 +13421,18 @@ const getSystemInfoSync = defineSyncApi('getSystemInfoSync', () => {
const deviceInfo = getDeviceInfo();
const appBaseInfo = getAppBaseInfo();
_initSystemInfo = true;
const { osName, osLanguage, osVersion } = systemInfo;
const _osName = osName.toLowerCase();
const osLanguageSplit = osLanguage.split('-');
const osLanguageSplitLast = osLanguageSplit[osLanguageSplit.length - 1];
let _osLanguage = `${osLanguageSplit[0]}${osLanguageSplitLast ? '-' + osLanguageSplitLast : ''}`;
let extraData = {
errMsg: 'getSystemInfo:ok',
const extraData = {
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 = extend(systemInfo, windowInfo, deviceInfo, appBaseInfo, extraData);
delete _systemInfo.screenTop;
delete _systemInfo.enableDebug;
delete _systemInfo.theme;
return
_systemInfo
;
return
sortObject(_systemInfo)
;
});
const getSystemInfo = defineAsyncApi('getSystemInfo', (_, { resolve }) => {
return resolve(getSystemInfoSync());
...
...
packages/uni-mp-alipay/dist/uni.api.esm.js
浏览文件 @
3cd8fec1
import
{
isArray
,
hasOwn
,
isString
,
isPlainObject
,
isObject
,
capitalize
,
toRawType
,
makeMap
,
isFunction
,
isPromise
,
remove
,
extend
}
from
'
@vue/shared
'
;
import
{
Emitter
,
onCreateVueApp
,
invokeCreateVueAppHook
}
from
'
@dcloudio/uni-shared
'
;
import
{
normalizeLocale
,
LOCALE_EN
}
from
'
@dcloudio/uni-i18n
'
;
import
{
Emitter
,
onCreateVueApp
,
invokeCreateVueAppHook
}
from
'
@dcloudio/uni-shared
'
;
const
eventChannels
=
{};
const
eventChannelStack
=
[];
...
...
@@ -861,15 +861,6 @@ function initGetProvider(providers) {
};
}
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
(
global
=
my
)
{
...
...
@@ -897,8 +888,8 @@ function addSafeAreaInsets(fromRes, toRes) {
}
}
function
populateParameters
(
fromRes
,
toRes
)
{
const
{
brand
=
''
,
model
=
''
,
system
=
''
,
language
=
''
,
theme
,
version
,
hostName
,
platform
,
fontSizeSetting
,
SDKVersion
,
pixelRatio
,
deviceOrientation
,
environment
,
}
=
fromRes
;
const
isQuickApp
=
"
mp-alipay
"
.
indexOf
(
'
quickapp-webview
'
)
!==
-
1
;
const
{
brand
=
''
,
model
=
''
,
system
=
''
,
language
=
''
,
theme
,
version
,
platform
,
fontSizeSetting
,
SDKVersion
,
pixelRatio
,
deviceOrientation
,
}
=
fromRes
;
// const isQuickApp = "mp-alipay".indexOf('quickapp-webview') !== -1
// osName osVersion
let
osName
=
''
;
let
osVersion
=
''
;
...
...
@@ -910,11 +901,9 @@ function populateParameters(fromRes, toRes) {
// deviceType
let
deviceType
=
getGetDeviceType
(
fromRes
,
model
);
// deviceModel
let
deviceBrand
=
getDeviceBrand
(
brand
,
model
,
isQuickApp
);
let
deviceBrand
=
getDeviceBrand
(
brand
);
// hostName
const
_platform
=
"
mp-alipay
"
.
split
(
'
-
'
)[
1
];
let
_hostName
=
hostName
||
_platform
;
// mp-jd
_hostName
=
fromRes
.
app
;
let
_hostName
=
getHostName
(
fromRes
);
// deviceOrientation
let
_deviceOrientation
=
deviceOrientation
;
// 仅 微信 百度 支持
// devicePixelRatio
...
...
@@ -924,12 +913,15 @@ function populateParameters(fromRes, toRes) {
{
_SDKVersion
=
my
.
SDKVersion
;
}
// hostLanguage
const
hostLanguage
=
language
.
replace
(
/_/g
,
'
-
'
);
// wx.getAccountInfoSync
const
parameters
=
{
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
,
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
,
...
...
@@ -942,7 +934,7 @@ function populateParameters(fromRes, toRes) {
osVersion
,
hostTheme
:
theme
,
hostVersion
,
hostLanguage
:
language
.
replace
(
'
_
'
,
'
-
'
)
,
hostLanguage
,
hostName
:
_hostName
,
hostSDKVersion
:
_SDKVersion
,
hostFontSizeSetting
:
fontSizeSetting
,
...
...
@@ -954,7 +946,7 @@ function populateParameters(fromRes, toRes) {
ua
:
undefined
,
hostPackageName
:
undefined
,
browserName
:
undefined
,
browseVersion
:
undefined
,
browse
r
Version
:
undefined
,
};
extend
(
toRes
,
parameters
);
}
...
...
@@ -979,16 +971,22 @@ function getGetDeviceType(fromRes, model) {
}
return
deviceType
;
}
function
getDeviceBrand
(
brand
,
model
,
isQuickApp
=
false
)
{
function
getDeviceBrand
(
brand
)
{
// deviceModel
let
deviceBrand
=
model
.
split
(
'
'
)[
0
].
toLocaleLowerCase
();
if
(
isQuickApp
)
{
deviceBrand
=
brand
.
toLocaleLowerCase
();
}
else
{
deviceBrand
=
_getDeviceBrand
(
deviceBrand
);
let
deviceBrand
=
brand
;
if
(
deviceBrand
)
{
deviceBrand
=
deviceBrand
.
toLocaleLowerCase
();
}
return
deviceBrand
;
}
function
getAppLanguage
(
defaultLanguage
)
{
return
getLocale
?
getLocale
()
:
defaultLanguage
;
}
function
getHostName
(
fromRes
)
{
const
_platform
=
"
mp-alipay
"
.
split
(
'
-
'
)[
1
];
let
_hostName
=
fromRes
.
hostName
||
_platform
;
// mp-jd
_hostName
=
fromRes
.
app
;
return
_hostName
;
}
const
redirectTo
=
{};
...
...
packages/uni-mp-baidu/dist/uni.api.esm.js
浏览文件 @
3cd8fec1
import
{
isArray
,
hasOwn
,
isString
,
isPlainObject
,
isObject
,
capitalize
,
toRawType
,
makeMap
,
isFunction
,
isPromise
,
remove
,
extend
}
from
'
@vue/shared
'
;
import
{
Emitter
,
onCreateVueApp
,
invokeCreateVueAppHook
}
from
'
@dcloudio/uni-shared
'
;
import
{
normalizeLocale
,
LOCALE_EN
}
from
'
@dcloudio/uni-i18n
'
;
import
{
Emitter
,
onCreateVueApp
,
invokeCreateVueAppHook
}
from
'
@dcloudio/uni-shared
'
;
const
eventChannels
=
{};
const
eventChannelStack
=
[];
...
...
@@ -861,15 +861,6 @@ function initGetProvider(providers) {
};
}
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
(
global
=
swan
)
{
...
...
@@ -897,8 +888,8 @@ function addSafeAreaInsets(fromRes, toRes) {
}
}
function
populateParameters
(
fromRes
,
toRes
)
{
const
{
brand
=
''
,
model
=
''
,
system
=
''
,
language
=
''
,
theme
,
version
,
hostName
,
platform
,
fontSizeSetting
,
SDKVersion
,
pixelRatio
,
deviceOrientation
,
environment
,
}
=
fromRes
;
const
isQuickApp
=
"
mp-baidu
"
.
indexOf
(
'
quickapp-webview
'
)
!==
-
1
;
const
{
brand
=
''
,
model
=
''
,
system
=
''
,
language
=
''
,
theme
,
version
,
platform
,
fontSizeSetting
,
SDKVersion
,
pixelRatio
,
deviceOrientation
,
}
=
fromRes
;
// const isQuickApp = "mp-baidu".indexOf('quickapp-webview') !== -1
// osName osVersion
let
osName
=
''
;
let
osVersion
=
''
;
...
...
@@ -914,13 +905,9 @@ function populateParameters(fromRes, toRes) {
// deviceType
let
deviceType
=
getGetDeviceType
(
fromRes
);
// deviceModel
let
deviceBrand
=
getDeviceBrand
(
brand
,
model
,
isQuickApp
);
let
deviceBrand
=
getDeviceBrand
(
brand
);
// hostName
const
_platform
=
"
mp-baidu
"
.
split
(
'
-
'
)[
1
];
let
_hostName
=
hostName
||
_platform
;
// mp-jd
{
_hostName
=
fromRes
.
host
;
}
let
_hostName
=
getHostName
(
fromRes
);
// deviceOrientation
let
_deviceOrientation
=
deviceOrientation
;
// 仅 微信 百度 支持
{
...
...
@@ -933,12 +920,15 @@ function populateParameters(fromRes, toRes) {
}
// SDKVersion
let
_SDKVersion
=
SDKVersion
;
// hostLanguage
const
hostLanguage
=
language
.
replace
(
/_/g
,
'
-
'
);
// wx.getAccountInfoSync
const
parameters
=
{
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
,
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
,
...
...
@@ -951,7 +941,7 @@ function populateParameters(fromRes, toRes) {
osVersion
,
hostTheme
:
theme
,
hostVersion
,
hostLanguage
:
language
.
replace
(
'
_
'
,
'
-
'
)
,
hostLanguage
,
hostName
:
_hostName
,
hostSDKVersion
:
_SDKVersion
,
hostFontSizeSetting
:
fontSizeSetting
,
...
...
@@ -963,7 +953,7 @@ function populateParameters(fromRes, toRes) {
ua
:
undefined
,
hostPackageName
:
undefined
,
browserName
:
undefined
,
browseVersion
:
undefined
,
browse
r
Version
:
undefined
,
};
extend
(
toRes
,
parameters
);
}
...
...
@@ -972,16 +962,24 @@ function getGetDeviceType(fromRes, model) {
let
deviceType
=
fromRes
.
deviceType
||
'
phone
'
;
return
deviceType
;
}
function
getDeviceBrand
(
brand
,
model
,
isQuickApp
=
false
)
{
function
getDeviceBrand
(
brand
)
{
// deviceModel
let
deviceBrand
=
model
.
split
(
'
'
)[
0
].
toLocaleLowerCase
();
if
(
isQuickApp
)
{
deviceBrand
=
brand
.
toLocaleLowerCase
();
}
else
{
deviceBrand
=
_getDeviceBrand
(
deviceBrand
);
let
deviceBrand
=
brand
;
if
(
deviceBrand
)
{
deviceBrand
=
deviceBrand
.
toLocaleLowerCase
();
}
return
deviceBrand
;
}
function
getAppLanguage
(
defaultLanguage
)
{
return
getLocale
?
getLocale
()
:
defaultLanguage
;
}
function
getHostName
(
fromRes
)
{
const
_platform
=
"
mp-baidu
"
.
split
(
'
-
'
)[
1
];
let
_hostName
=
fromRes
.
hostName
||
_platform
;
// mp-jd
{
_hostName
=
fromRes
.
host
;
}
return
_hostName
;
}
const
getSystemInfo
=
{
...
...
packages/uni-mp-kuaishou/dist/uni.api.esm.js
浏览文件 @
3cd8fec1
import
{
isArray
,
hasOwn
,
isString
,
isPlainObject
,
isObject
,
capitalize
,
toRawType
,
makeMap
,
isFunction
,
isPromise
,
remove
,
extend
}
from
'
@vue/shared
'
;
import
{
Emitter
,
onCreateVueApp
,
invokeCreateVueAppHook
}
from
'
@dcloudio/uni-shared
'
;
import
{
normalizeLocale
,
LOCALE_EN
}
from
'
@dcloudio/uni-i18n
'
;
import
{
Emitter
,
onCreateVueApp
,
invokeCreateVueAppHook
}
from
'
@dcloudio/uni-shared
'
;
const
eventChannels
=
{};
const
eventChannelStack
=
[];
...
...
@@ -861,15 +861,6 @@ function initGetProvider(providers) {
};
}
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
(
global
=
ks
)
{
...
...
@@ -897,8 +888,8 @@ function addSafeAreaInsets(fromRes, toRes) {
}
}
function
populateParameters
(
fromRes
,
toRes
)
{
const
{
brand
=
''
,
model
=
''
,
system
=
''
,
language
=
''
,
theme
,
version
,
hostName
,
platform
,
fontSizeSetting
,
SDKVersion
,
pixelRatio
,
deviceOrientation
,
environment
,
}
=
fromRes
;
const
isQuickApp
=
"
mp-kuaishou
"
.
indexOf
(
'
quickapp-webview
'
)
!==
-
1
;
const
{
brand
=
''
,
model
=
''
,
system
=
''
,
language
=
''
,
theme
,
version
,
platform
,
fontSizeSetting
,
SDKVersion
,
pixelRatio
,
deviceOrientation
,
}
=
fromRes
;
// const isQuickApp = "mp-kuaishou".indexOf('quickapp-webview') !== -1
// osName osVersion
let
osName
=
''
;
let
osVersion
=
''
;
...
...
@@ -910,25 +901,24 @@ function populateParameters(fromRes, toRes) {
// deviceType
let
deviceType
=
getGetDeviceType
(
fromRes
,
model
);
// deviceModel
let
deviceBrand
=
getDeviceBrand
(
brand
,
model
,
isQuickApp
);
let
deviceBrand
=
getDeviceBrand
(
brand
);
// hostName
const
_platform
=
"
mp-kuaishou
"
.
split
(
'
-
'
)[
1
];
let
_hostName
=
hostName
||
_platform
;
// mp-jd
{
_hostName
=
fromRes
.
host
;
}
let
_hostName
=
getHostName
(
fromRes
);
// deviceOrientation
let
_deviceOrientation
=
deviceOrientation
;
// 仅 微信 百度 支持
// devicePixelRatio
let
_devicePixelRatio
=
pixelRatio
;
// SDKVersion
let
_SDKVersion
=
SDKVersion
;
// hostLanguage
const
hostLanguage
=
language
.
replace
(
/_/g
,
'
-
'
);
// wx.getAccountInfoSync
const
parameters
=
{
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
,
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
,
...
...
@@ -941,7 +931,7 @@ function populateParameters(fromRes, toRes) {
osVersion
,
hostTheme
:
theme
,
hostVersion
,
hostLanguage
:
language
.
replace
(
'
_
'
,
'
-
'
)
,
hostLanguage
,
hostName
:
_hostName
,
hostSDKVersion
:
_SDKVersion
,
hostFontSizeSetting
:
fontSizeSetting
,
...
...
@@ -953,7 +943,7 @@ function populateParameters(fromRes, toRes) {
ua
:
undefined
,
hostPackageName
:
undefined
,
browserName
:
undefined
,
browseVersion
:
undefined
,
browse
r
Version
:
undefined
,
};
extend
(
toRes
,
parameters
);
}
...
...
@@ -978,16 +968,24 @@ function getGetDeviceType(fromRes, model) {
}
return
deviceType
;
}
function
getDeviceBrand
(
brand
,
model
,
isQuickApp
=
false
)
{
function
getDeviceBrand
(
brand
)
{
// deviceModel
let
deviceBrand
=
model
.
split
(
'
'
)[
0
].
toLocaleLowerCase
();
if
(
isQuickApp
)
{
deviceBrand
=
brand
.
toLocaleLowerCase
();
}
else
{
deviceBrand
=
_getDeviceBrand
(
deviceBrand
);
let
deviceBrand
=
brand
;
if
(
deviceBrand
)
{
deviceBrand
=
deviceBrand
.
toLocaleLowerCase
();
}
return
deviceBrand
;
}
function
getAppLanguage
(
defaultLanguage
)
{
return
getLocale
?
getLocale
()
:
defaultLanguage
;
}
function
getHostName
(
fromRes
)
{
const
_platform
=
"
mp-kuaishou
"
.
split
(
'
-
'
)[
1
];
let
_hostName
=
fromRes
.
hostName
||
_platform
;
// mp-jd
{
_hostName
=
fromRes
.
host
;
}
return
_hostName
;
}
const
getSystemInfo
=
{
...
...
packages/uni-mp-lark/dist/uni.api.esm.js
浏览文件 @
3cd8fec1
import
{
isArray
,
hasOwn
,
isString
,
isPlainObject
,
isObject
,
capitalize
,
toRawType
,
makeMap
,
isFunction
,
isPromise
,
remove
,
extend
}
from
'
@vue/shared
'
;
import
{
Emitter
,
onCreateVueApp
,
invokeCreateVueAppHook
}
from
'
@dcloudio/uni-shared
'
;
import
{
normalizeLocale
,
LOCALE_EN
}
from
'
@dcloudio/uni-i18n
'
;
import
{
Emitter
,
onCreateVueApp
,
invokeCreateVueAppHook
}
from
'
@dcloudio/uni-shared
'
;
const
eventChannels
=
{};
const
eventChannelStack
=
[];
...
...
@@ -888,8 +888,8 @@ function addSafeAreaInsets(fromRes, toRes) {
}
}
function
populateParameters
(
fromRes
,
toRes
)
{
const
{
brand
=
''
,
model
=
''
,
system
=
''
,
language
=
''
,
theme
,
version
,
hostName
,
platform
,
fontSizeSetting
,
SDKVersion
,
pixelRatio
,
deviceOrientation
,
environment
,
}
=
fromRes
;
const
isQuickApp
=
"
mp-lark
"
.
indexOf
(
'
quickapp-webview
'
)
!==
-
1
;
const
{
brand
=
''
,
model
=
''
,
system
=
''
,
language
=
''
,
theme
,
version
,
platform
,
fontSizeSetting
,
SDKVersion
,
pixelRatio
,
deviceOrientation
,
}
=
fromRes
;
// const isQuickApp = "mp-lark".indexOf('quickapp-webview') !== -1
// osName osVersion
let
osName
=
''
;
let
osVersion
=
''
;
...
...
@@ -901,25 +901,24 @@ function populateParameters(fromRes, toRes) {
// deviceType
let
deviceType
=
getGetDeviceType
(
fromRes
,
model
);
// deviceModel
let
deviceBrand
=
getDeviceBrand
(
brand
,
model
,
isQuickApp
);
let
deviceBrand
=
getDeviceBrand
(
brand
);
// hostName
const
_platform
=
"
mp-lark
"
.
split
(
'
-
'
)[
1
];
let
_hostName
=
hostName
||
_platform
;
// mp-jd
{
_hostName
=
fromRes
.
appName
;
}
let
_hostName
=
getHostName
(
fromRes
);
// deviceOrientation
let
_deviceOrientation
=
deviceOrientation
;
// 仅 微信 百度 支持
// devicePixelRatio
let
_devicePixelRatio
=
pixelRatio
;
// SDKVersion
let
_SDKVersion
=
SDKVersion
;
// hostLanguage
const
hostLanguage
=
language
.
replace
(
/_/g
,
'
-
'
);
// wx.getAccountInfoSync
const
parameters
=
{
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
,
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
,
...
...
@@ -932,7 +931,7 @@ function populateParameters(fromRes, toRes) {
osVersion
,
hostTheme
:
theme
,
hostVersion
,
hostLanguage
:
language
.
replace
(
'
_
'
,
'
-
'
)
,
hostLanguage
,
hostName
:
_hostName
,
hostSDKVersion
:
_SDKVersion
,
hostFontSizeSetting
:
fontSizeSetting
,
...
...
@@ -944,7 +943,7 @@ function populateParameters(fromRes, toRes) {
ua
:
undefined
,
hostPackageName
:
undefined
,
browserName
:
undefined
,
browseVersion
:
undefined
,
browse
r
Version
:
undefined
,
};
extend
(
toRes
,
parameters
);
}
...
...
@@ -969,13 +968,24 @@ function getGetDeviceType(fromRes, model) {
}
return
deviceType
;
}
function
getDeviceBrand
(
brand
,
model
,
isQuickApp
=
false
)
{
function
getDeviceBrand
(
brand
)
{
// deviceModel
let
deviceBrand
=
model
.
split
(
'
'
)[
0
].
toLocaleLowerCase
()
;
{
deviceBrand
=
b
rand
.
toLocaleLowerCase
();
let
deviceBrand
=
brand
;
if
(
deviceBrand
)
{
deviceBrand
=
deviceB
rand
.
toLocaleLowerCase
();
}
return
deviceBrand
;
}
function
getAppLanguage
(
defaultLanguage
)
{
return
getLocale
?
getLocale
()
:
defaultLanguage
;
}
function
getHostName
(
fromRes
)
{
const
_platform
=
"
mp-lark
"
.
split
(
'
-
'
)[
1
];
let
_hostName
=
fromRes
.
hostName
||
_platform
;
// mp-jd
{
_hostName
=
fromRes
.
appName
;
}
return
_hostName
;
}
const
getSystemInfo
=
{
...
...
packages/uni-mp-qq/dist/uni.api.esm.js
浏览文件 @
3cd8fec1
import
{
isArray
,
hasOwn
,
isString
,
isPlainObject
,
isObject
,
capitalize
,
toRawType
,
makeMap
,
isFunction
,
isPromise
,
remove
,
extend
}
from
'
@vue/shared
'
;
import
{
Emitter
,
onCreateVueApp
,
invokeCreateVueAppHook
}
from
'
@dcloudio/uni-shared
'
;
import
{
normalizeLocale
,
LOCALE_EN
}
from
'
@dcloudio/uni-i18n
'
;
import
{
Emitter
,
onCreateVueApp
,
invokeCreateVueAppHook
}
from
'
@dcloudio/uni-shared
'
;
const
eventChannels
=
{};
const
eventChannelStack
=
[];
...
...
@@ -861,15 +861,6 @@ function initGetProvider(providers) {
};
}
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
(
global
=
qq
)
{
...
...
@@ -897,8 +888,8 @@ function addSafeAreaInsets(fromRes, toRes) {
}
}
function
populateParameters
(
fromRes
,
toRes
)
{
const
{
brand
=
''
,
model
=
''
,
system
=
''
,
language
=
''
,
theme
,
version
,
hostName
,
platform
,
fontSizeSetting
,
SDKVersion
,
pixelRatio
,
deviceOrientation
,
environment
,
}
=
fromRes
;
const
isQuickApp
=
"
mp-qq
"
.
indexOf
(
'
quickapp-webview
'
)
!==
-
1
;
const
{
brand
=
''
,
model
=
''
,
system
=
''
,
language
=
''
,
theme
,
version
,
platform
,
fontSizeSetting
,
SDKVersion
,
pixelRatio
,
deviceOrientation
,
}
=
fromRes
;
// const isQuickApp = "mp-qq".indexOf('quickapp-webview') !== -1
// osName osVersion
let
osName
=
''
;
let
osVersion
=
''
;
...
...
@@ -910,23 +901,24 @@ function populateParameters(fromRes, toRes) {
// deviceType
let
deviceType
=
getGetDeviceType
(
fromRes
,
model
);
// deviceModel
let
deviceBrand
=
getDeviceBrand
(
brand
,
model
,
isQuickApp
);
let
deviceBrand
=
getDeviceBrand
(
brand
);
// hostName
const
_platform
=
"
mp-qq
"
.
split
(
'
-
'
)[
1
];
let
_hostName
=
hostName
||
_platform
;
// mp-jd
_hostName
=
fromRes
.
AppPlatform
;
let
_hostName
=
getHostName
(
fromRes
);
// deviceOrientation
let
_deviceOrientation
=
deviceOrientation
;
// 仅 微信 百度 支持
// devicePixelRatio
let
_devicePixelRatio
=
pixelRatio
;
// SDKVersion
let
_SDKVersion
=
SDKVersion
;
// hostLanguage
const
hostLanguage
=
language
.
replace
(
/_/g
,
'
-
'
);
// wx.getAccountInfoSync
const
parameters
=
{
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
,
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
,
...
...
@@ -939,7 +931,7 @@ function populateParameters(fromRes, toRes) {
osVersion
,
hostTheme
:
theme
,
hostVersion
,
hostLanguage
:
language
.
replace
(
'
_
'
,
'
-
'
)
,
hostLanguage
,
hostName
:
_hostName
,
hostSDKVersion
:
_SDKVersion
,
hostFontSizeSetting
:
fontSizeSetting
,
...
...
@@ -951,7 +943,7 @@ function populateParameters(fromRes, toRes) {
ua
:
undefined
,
hostPackageName
:
undefined
,
browserName
:
undefined
,
browseVersion
:
undefined
,
browse
r
Version
:
undefined
,
};
extend
(
toRes
,
parameters
);
}
...
...
@@ -976,16 +968,22 @@ function getGetDeviceType(fromRes, model) {
}
return
deviceType
;
}
function
getDeviceBrand
(
brand
,
model
,
isQuickApp
=
false
)
{
function
getDeviceBrand
(
brand
)
{
// deviceModel
let
deviceBrand
=
model
.
split
(
'
'
)[
0
].
toLocaleLowerCase
();
if
(
isQuickApp
)
{
deviceBrand
=
brand
.
toLocaleLowerCase
();
}
else
{
deviceBrand
=
_getDeviceBrand
(
deviceBrand
);
let
deviceBrand
=
brand
;
if
(
deviceBrand
)
{
deviceBrand
=
deviceBrand
.
toLocaleLowerCase
();
}
return
deviceBrand
;
}
function
getAppLanguage
(
defaultLanguage
)
{
return
getLocale
?
getLocale
()
:
defaultLanguage
;
}
function
getHostName
(
fromRes
)
{
const
_platform
=
"
mp-qq
"
.
split
(
'
-
'
)[
1
];
let
_hostName
=
fromRes
.
hostName
||
_platform
;
// mp-jd
_hostName
=
fromRes
.
AppPlatform
;
return
_hostName
;
}
const
getSystemInfo
=
{
...
...
packages/uni-mp-toutiao/dist/uni.api.esm.js
浏览文件 @
3cd8fec1
import
{
isArray
,
hasOwn
,
isString
,
isPlainObject
,
isObject
,
capitalize
,
toRawType
,
makeMap
,
isFunction
,
isPromise
,
remove
,
extend
}
from
'
@vue/shared
'
;
import
{
Emitter
,
onCreateVueApp
,
invokeCreateVueAppHook
}
from
'
@dcloudio/uni-shared
'
;
import
{
normalizeLocale
,
LOCALE_EN
}
from
'
@dcloudio/uni-i18n
'
;
import
{
Emitter
,
onCreateVueApp
,
invokeCreateVueAppHook
}
from
'
@dcloudio/uni-shared
'
;
const
eventChannels
=
{};
const
eventChannelStack
=
[];
...
...
@@ -888,8 +888,8 @@ function addSafeAreaInsets(fromRes, toRes) {
}
}
function
populateParameters
(
fromRes
,
toRes
)
{
const
{
brand
=
''
,
model
=
''
,
system
=
''
,
language
=
''
,
theme
,
version
,
hostName
,
platform
,
fontSizeSetting
,
SDKVersion
,
pixelRatio
,
deviceOrientation
,
environment
,
}
=
fromRes
;
const
isQuickApp
=
"
mp-toutiao
"
.
indexOf
(
'
quickapp-webview
'
)
!==
-
1
;
const
{
brand
=
''
,
model
=
''
,
system
=
''
,
language
=
''
,
theme
,
version
,
platform
,
fontSizeSetting
,
SDKVersion
,
pixelRatio
,
deviceOrientation
,
}
=
fromRes
;
// const isQuickApp = "mp-toutiao".indexOf('quickapp-webview') !== -1
// osName osVersion
let
osName
=
''
;
let
osVersion
=
''
;
...
...
@@ -901,25 +901,24 @@ function populateParameters(fromRes, toRes) {
// deviceType
let
deviceType
=
getGetDeviceType
(
fromRes
,
model
);
// deviceModel
let
deviceBrand
=
getDeviceBrand
(
brand
,
model
,
isQuickApp
);
let
deviceBrand
=
getDeviceBrand
(
brand
);
// hostName
const
_platform
=
"
mp-toutiao
"
.
split
(
'
-
'
)[
1
];
let
_hostName
=
hostName
||
_platform
;
// mp-jd
{
_hostName
=
fromRes
.
appName
;
}
let
_hostName
=
getHostName
(
fromRes
);
// deviceOrientation
let
_deviceOrientation
=
deviceOrientation
;
// 仅 微信 百度 支持
// devicePixelRatio
let
_devicePixelRatio
=
pixelRatio
;
// SDKVersion
let
_SDKVersion
=
SDKVersion
;
// hostLanguage
const
hostLanguage
=
language
.
replace
(
/_/g
,
'
-
'
);
// wx.getAccountInfoSync
const
parameters
=
{
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
,
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
,
...
...
@@ -932,7 +931,7 @@ function populateParameters(fromRes, toRes) {
osVersion
,
hostTheme
:
theme
,
hostVersion
,
hostLanguage
:
language
.
replace
(
'
_
'
,
'
-
'
)
,
hostLanguage
,
hostName
:
_hostName
,
hostSDKVersion
:
_SDKVersion
,
hostFontSizeSetting
:
fontSizeSetting
,
...
...
@@ -944,7 +943,7 @@ function populateParameters(fromRes, toRes) {
ua
:
undefined
,
hostPackageName
:
undefined
,
browserName
:
undefined
,
browseVersion
:
undefined
,
browse
r
Version
:
undefined
,
};
extend
(
toRes
,
parameters
);
}
...
...
@@ -969,13 +968,24 @@ function getGetDeviceType(fromRes, model) {
}
return
deviceType
;
}
function
getDeviceBrand
(
brand
,
model
,
isQuickApp
=
false
)
{
function
getDeviceBrand
(
brand
)
{
// deviceModel
let
deviceBrand
=
model
.
split
(
'
'
)[
0
].
toLocaleLowerCase
()
;
{
deviceBrand
=
b
rand
.
toLocaleLowerCase
();
let
deviceBrand
=
brand
;
if
(
deviceBrand
)
{
deviceBrand
=
deviceB
rand
.
toLocaleLowerCase
();
}
return
deviceBrand
;
}
function
getAppLanguage
(
defaultLanguage
)
{
return
getLocale
?
getLocale
()
:
defaultLanguage
;
}
function
getHostName
(
fromRes
)
{
const
_platform
=
"
mp-toutiao
"
.
split
(
'
-
'
)[
1
];
let
_hostName
=
fromRes
.
hostName
||
_platform
;
// mp-jd
{
_hostName
=
fromRes
.
appName
;
}
return
_hostName
;
}
const
getSystemInfo
=
{
...
...
packages/uni-mp-vue/dist/vue.runtime.esm.js
浏览文件 @
3cd8fec1
此差异已折叠。
点击以展开。
packages/uni-mp-vue/lib/vue.runtime.esm.js
浏览文件 @
3cd8fec1
此差异已折叠。
点击以展开。
packages/uni-mp-weixin/dist/uni.api.esm.js
浏览文件 @
3cd8fec1
import
{
isArray
,
hasOwn
,
isString
,
isPlainObject
,
isObject
,
capitalize
,
toRawType
,
makeMap
,
isFunction
,
isPromise
,
remove
,
extend
}
from
'
@vue/shared
'
;
import
{
Emitter
,
onCreateVueApp
,
invokeCreateVueAppHook
}
from
'
@dcloudio/uni-shared
'
;
import
{
normalizeLocale
,
LOCALE_EN
}
from
'
@dcloudio/uni-i18n
'
;
import
{
Emitter
,
onCreateVueApp
,
invokeCreateVueAppHook
,
sortObject
}
from
'
@dcloudio/uni-shared
'
;
function
getBaseSystemInfo
()
{
return
wx
.
getSystemInfoSync
()
...
...
@@ -825,15 +825,6 @@ function initGetProvider(providers) {
};
}
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
(
global
=
wx
)
{
...
...
@@ -861,8 +852,8 @@ function addSafeAreaInsets(fromRes, toRes) {
}
}
function
populateParameters
(
fromRes
,
toRes
)
{
const
{
brand
=
''
,
model
=
''
,
system
=
''
,
language
=
''
,
theme
,
version
,
hostName
,
platform
,
fontSizeSetting
,
SDKVersion
,
pixelRatio
,
deviceOrientation
,
environment
,
}
=
fromRes
;
const
isQuickApp
=
"
mp-weixin
"
.
indexOf
(
'
quickapp-webview
'
)
!==
-
1
;
const
{
brand
=
''
,
model
=
''
,
system
=
''
,
language
=
''
,
theme
,
version
,
platform
,
fontSizeSetting
,
SDKVersion
,
pixelRatio
,
deviceOrientation
,
}
=
fromRes
;
// const isQuickApp = "mp-weixin".indexOf('quickapp-webview') !== -1
// osName osVersion
let
osName
=
''
;
let
osVersion
=
''
;
...
...
@@ -874,30 +865,24 @@ function populateParameters(fromRes, toRes) {
// deviceType
let
deviceType
=
getGetDeviceType
(
fromRes
,
model
);
// deviceModel
let
deviceBrand
=
getDeviceBrand
(
brand
,
model
,
isQuickApp
);
let
deviceBrand
=
getDeviceBrand
(
brand
);
// hostName
const
_platform
=
'
WeChat
'
;
let
_hostName
=
hostName
||
_platform
;
// mp-jd
{
if
(
environment
)
{
_hostName
=
environment
;
}
else
if
(
fromRes
.
host
&&
fromRes
.
host
.
env
)
{
_hostName
=
fromRes
.
host
.
env
;
}
}
let
_hostName
=
getHostName
(
fromRes
);
// deviceOrientation
let
_deviceOrientation
=
deviceOrientation
;
// 仅 微信 百度 支持
// devicePixelRatio
let
_devicePixelRatio
=
pixelRatio
;
// SDKVersion
let
_SDKVersion
=
SDKVersion
;
// hostLanguage
const
hostLanguage
=
language
.
replace
(
/_/g
,
'
-
'
);
// wx.getAccountInfoSync
const
parameters
=
{
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
,
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
,
...
...
@@ -910,7 +895,7 @@ function populateParameters(fromRes, toRes) {
osVersion
,
hostTheme
:
theme
,
hostVersion
,
hostLanguage
:
language
.
replace
(
'
_
'
,
'
-
'
)
,
hostLanguage
,
hostName
:
_hostName
,
hostSDKVersion
:
_SDKVersion
,
hostFontSizeSetting
:
fontSizeSetting
,
...
...
@@ -922,7 +907,7 @@ function populateParameters(fromRes, toRes) {
ua
:
undefined
,
hostPackageName
:
undefined
,
browserName
:
undefined
,
browseVersion
:
undefined
,
browse
r
Version
:
undefined
,
};
extend
(
toRes
,
parameters
);
}
...
...
@@ -947,16 +932,29 @@ function getGetDeviceType(fromRes, model) {
}
return
deviceType
;
}
function
getDeviceBrand
(
brand
,
model
,
isQuickApp
=
false
)
{
function
getDeviceBrand
(
brand
)
{
// deviceModel
let
deviceBrand
=
model
.
split
(
'
'
)[
0
].
toLocaleLowerCase
();
if
(
isQuickApp
)
{
deviceBrand
=
brand
.
toLocaleLowerCase
();
}
else
{
deviceBrand
=
_getDeviceBrand
(
deviceBrand
);
let
deviceBrand
=
brand
;
if
(
deviceBrand
)
{
deviceBrand
=
deviceBrand
.
toLocaleLowerCase
();
}
return
deviceBrand
;
}
function
getAppLanguage
(
defaultLanguage
)
{
return
getLocale
?
getLocale
()
:
defaultLanguage
;
}
function
getHostName
(
fromRes
)
{
const
_platform
=
'
WeChat
'
;
let
_hostName
=
fromRes
.
hostName
||
_platform
;
// mp-jd
{
if
(
fromRes
.
environment
)
{
_hostName
=
fromRes
.
environment
;
}
else
if
(
fromRes
.
host
&&
fromRes
.
host
.
env
)
{
_hostName
=
fromRes
.
host
.
env
;
}
}
return
_hostName
;
}
const
getSystemInfo
=
{
...
...
@@ -1015,28 +1013,24 @@ const getDeviceInfo = {
returnValue
:
(
fromRes
,
toRes
)
=>
{
const
{
brand
,
model
}
=
fromRes
;
let
deviceType
=
getGetDeviceType
(
fromRes
,
model
);
let
deviceBrand
=
getDeviceBrand
(
brand
,
model
);
let
deviceBrand
=
getDeviceBrand
(
brand
);
useDeviceId
()(
fromRes
,
toRes
);
extend
(
toRes
,
{
toRes
=
sortObject
(
extend
(
toRes
,
{
deviceType
,
deviceBrand
,
deviceModel
:
model
,
});
})
)
;
},
};
const
getAppBaseInfo
=
{
returnValue
:
(
fromRes
,
toRes
)
=>
{
const
{
version
,
language
,
SDKVersion
,
theme
}
=
fromRes
;
let
_hostName
=
"
mp-weixin
"
.
split
(
'
-
'
)[
1
];
// mp-jd
{
if
(
fromRes
.
host
&&
fromRes
.
host
.
env
)
{
_hostName
=
fromRes
.
host
.
env
;
}
}
extend
(
toRes
,
{
let
_hostName
=
getHostName
(
fromRes
);
let
hostLanguage
=
language
.
replace
(
/_/g
,
'
-
'
);
toRes
=
sortObject
(
extend
(
toRes
,
{
hostVersion
:
version
,
hostLanguage
:
language
.
replace
(
'
_
'
,
'
-
'
)
,
hostLanguage
,
hostName
:
_hostName
,
hostSDKVersion
:
SDKVersion
,
hostTheme
:
theme
,
...
...
@@ -1044,17 +1038,18 @@ const getAppBaseInfo = {
appName
:
process
.
env
.
UNI_APP_NAME
,
appVersion
:
process
.
env
.
UNI_APP_VERSION_NAME
,
appVersionCode
:
process
.
env
.
UNI_APP_VERSION_CODE
,
});
appLanguage
:
getAppLanguage
(
hostLanguage
),
}));
},
};
const
getWindowInfo
=
{
returnValue
:
(
fromRes
,
toRes
)
=>
{
addSafeAreaInsets
(
fromRes
,
toRes
);
extend
(
toRes
,
{
toRes
=
sortObject
(
extend
(
toRes
,
{
windowTop
:
0
,
windowBottom
:
0
,
});
})
)
;
},
};
...
...
packages/uni-quickapp-webview/dist/uni.api.esm.js
浏览文件 @
3cd8fec1
import
{
isArray
,
hasOwn
,
isString
,
isPlainObject
,
isObject
,
capitalize
,
toRawType
,
makeMap
,
isFunction
,
isPromise
,
remove
,
extend
}
from
'
@vue/shared
'
;
import
{
Emitter
,
onCreateVueApp
,
invokeCreateVueAppHook
}
from
'
@dcloudio/uni-shared
'
;
import
{
normalizeLocale
,
LOCALE_EN
}
from
'
@dcloudio/uni-i18n
'
;
import
{
Emitter
,
onCreateVueApp
,
invokeCreateVueAppHook
}
from
'
@dcloudio/uni-shared
'
;
const
eventChannels
=
{};
const
eventChannelStack
=
[];
...
...
@@ -861,15 +861,6 @@ function initGetProvider(providers) {
};
}
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
(
global
=
qa
)
{
...
...
@@ -897,8 +888,8 @@ function addSafeAreaInsets(fromRes, toRes) {
}
}
function
populateParameters
(
fromRes
,
toRes
)
{
const
{
brand
=
''
,
model
=
''
,
system
=
''
,
language
=
''
,
theme
,
version
,
hostName
,
platform
,
fontSizeSetting
,
SDKVersion
,
pixelRatio
,
deviceOrientation
,
environment
,
}
=
fromRes
;
const
isQuickApp
=
"
quickapp-webview
"
.
indexOf
(
'
quickapp-webview
'
)
!==
-
1
;
const
{
brand
=
''
,
model
=
''
,
system
=
''
,
language
=
''
,
theme
,
version
,
platform
,
fontSizeSetting
,
SDKVersion
,
pixelRatio
,
deviceOrientation
,
}
=
fromRes
;
// const isQuickApp = "quickapp-webview".indexOf('quickapp-webview') !== -1
// osName osVersion
let
osName
=
''
;
let
osVersion
=
''
;
...
...
@@ -910,22 +901,24 @@ function populateParameters(fromRes, toRes) {
// deviceType
let
deviceType
=
getGetDeviceType
(
fromRes
,
model
);
// deviceModel
let
deviceBrand
=
getDeviceBrand
(
brand
,
model
,
isQuickApp
);
let
deviceBrand
=
getDeviceBrand
(
brand
);
// hostName
const
_platform
=
"
quickapp-webview
"
.
split
(
'
-
'
)[
1
];
let
_hostName
=
hostName
||
_platform
;
// mp-jd
let
_hostName
=
getHostName
(
fromRes
);
// deviceOrientation
let
_deviceOrientation
=
deviceOrientation
;
// 仅 微信 百度 支持
// devicePixelRatio
let
_devicePixelRatio
=
pixelRatio
;
// SDKVersion
let
_SDKVersion
=
SDKVersion
;
// hostLanguage
const
hostLanguage
=
language
.
replace
(
/_/g
,
'
-
'
);
// wx.getAccountInfoSync
const
parameters
=
{
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
,
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
,
...
...
@@ -938,7 +931,7 @@ function populateParameters(fromRes, toRes) {
osVersion
,
hostTheme
:
theme
,
hostVersion
,
hostLanguage
:
language
.
replace
(
'
_
'
,
'
-
'
)
,
hostLanguage
,
hostName
:
_hostName
,
hostSDKVersion
:
_SDKVersion
,
hostFontSizeSetting
:
fontSizeSetting
,
...
...
@@ -950,7 +943,7 @@ function populateParameters(fromRes, toRes) {
ua
:
undefined
,
hostPackageName
:
undefined
,
browserName
:
undefined
,
browseVersion
:
undefined
,
browse
r
Version
:
undefined
,
};
extend
(
toRes
,
parameters
);
}
...
...
@@ -975,16 +968,21 @@ function getGetDeviceType(fromRes, model) {
}
return
deviceType
;
}
function
getDeviceBrand
(
brand
,
model
,
isQuickApp
=
false
)
{
function
getDeviceBrand
(
brand
)
{
// deviceModel
let
deviceBrand
=
model
.
split
(
'
'
)[
0
].
toLocaleLowerCase
();
if
(
isQuickApp
)
{
deviceBrand
=
brand
.
toLocaleLowerCase
();
}
else
{
deviceBrand
=
_getDeviceBrand
(
deviceBrand
);
let
deviceBrand
=
brand
;
if
(
deviceBrand
)
{
deviceBrand
=
deviceBrand
.
toLocaleLowerCase
();
}
return
deviceBrand
;
}
function
getAppLanguage
(
defaultLanguage
)
{
return
getLocale
?
getLocale
()
:
defaultLanguage
;
}
function
getHostName
(
fromRes
)
{
const
_platform
=
"
quickapp-webview
"
.
split
(
'
-
'
)[
1
];
let
_hostName
=
fromRes
.
hostName
||
_platform
;
// mp-jd
return
_hostName
;
}
const
getSystemInfo
=
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录