Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
wzj-java
uni-app
提交
a5f0a378
U
uni-app
项目概览
wzj-java
/
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,发现更多精彩内容 >>
提交
a5f0a378
编写于
5月 26, 2022
作者:
fxy060608
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
chore: build
上级
697894dc
变更
26
展开全部
隐藏空白更改
内联
并排
Showing
26 changed file
with
5071 addition
and
4564 deletion
+5071
-4564
packages/playground/uts/nativeplugins/test-uniplugin/android/src/test.uts
...und/uts/nativeplugins/test-uniplugin/android/src/test.uts
+4
-0
packages/playground/uts/unpackage/nativeplugins/test-uniplugin/android/src/io/dcloud/uniplugin/TestModule.kt
...t-uniplugin/android/src/io/dcloud/uniplugin/TestModule.kt
+1
-1
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
...npackage/nativeplugins/test-uniplugin/android/src/test.kt
+5
-0
packages/playground/uts/unpackage/nativeplugins/test-uniplugin/android/src/test.kt.map
...kage/nativeplugins/test-uniplugin/android/src/test.kt.map
+1
-0
packages/uni-api/src/service/plugin/push.ts
packages/uni-api/src/service/plugin/push.ts
+4
-19
packages/uni-app-plus/dist/uni.runtime.esm.js
packages/uni-app-plus/dist/uni.runtime.esm.js
+96
-47
packages/uni-h5-vue/dist/vue.runtime.cjs.js
packages/uni-h5-vue/dist/vue.runtime.cjs.js
+1828
-1746
packages/uni-h5-vue/dist/vue.runtime.esm.js
packages/uni-h5-vue/dist/vue.runtime.esm.js
+2517
-2439
packages/uni-h5-vue/package.json
packages/uni-h5-vue/package.json
+4
-1
packages/uni-h5/dist/uni-h5.cjs.js
packages/uni-h5/dist/uni-h5.cjs.js
+239
-0
packages/uni-h5/dist/uni-h5.es.js
packages/uni-h5/dist/uni-h5.es.js
+134
-69
packages/uni-mp-alipay/dist/uni.api.esm.js
packages/uni-mp-alipay/dist/uni.api.esm.js
+28
-29
packages/uni-mp-baidu/dist/uni.api.esm.js
packages/uni-mp-baidu/dist/uni.api.esm.js
+35
-31
packages/uni-mp-kuaishou/dist/uni.api.esm.js
packages/uni-mp-kuaishou/dist/uni.api.esm.js
+28
-30
packages/uni-mp-lark/dist/uni.api.esm.js
packages/uni-mp-lark/dist/uni.api.esm.js
+28
-30
packages/uni-mp-qq/dist/uni.api.esm.js
packages/uni-mp-qq/dist/uni.api.esm.js
+25
-29
packages/uni-mp-toutiao/dist/uni.api.esm.js
packages/uni-mp-toutiao/dist/uni.api.esm.js
+28
-30
packages/uni-mp-weixin/dist/uni.api.esm.js
packages/uni-mp-weixin/dist/uni.api.esm.js
+33
-30
packages/uni-push/dist/uni-push.plus.es.js
packages/uni-push/dist/uni-push.plus.es.js
+1
-0
packages/uni-push/src/plus.ts
packages/uni-push/src/plus.ts
+1
-0
packages/uni-quickapp-webview/dist/uni.api.esm.js
packages/uni-quickapp-webview/dist/uni.api.esm.js
+25
-29
packages/uts-darwin-arm64/uts.darwin-arm64.node
packages/uts-darwin-arm64/uts.darwin-arm64.node
+0
-0
packages/uts-darwin-x64/uts.darwin-x64.node
packages/uts-darwin-x64/uts.darwin-x64.node
+0
-0
pnpm-lock.yaml
pnpm-lock.yaml
+4
-2
未找到文件。
packages/playground/uts/nativeplugins/test-uniplugin/android/src/test.uts
0 → 100644
浏览文件 @
a5f0a378
import Log from "android.util.Log";
export default function log(tag: string, msg: string) {
Log.e(tag, msg);
}
packages/playground/uts/unpackage/nativeplugins/test-uniplugin/android/src/io/dcloud/uniplugin/TestModule.kt
浏览文件 @
a5f0a378
...
...
@@ -22,7 +22,7 @@ open class TestModule : UniModule() {
data
[
"code"
]
=
"success456"
;
return
data
;
}
override
open
fun
onActivityResult
(
requestCode
:
Int
,
resultCode
:
Int
,
data
:
Intent
)
{
override
fun
onActivityResult
(
requestCode
:
Int
,
resultCode
:
Int
,
data
:
Intent
)
{
if
(
requestCode
==
TestModule
.
REQUEST_CODE
&&
data
.
hasExtra
(
"respond"
))
{
log
(
this
.
TAG
,
"原生页面返回----"
+
data
.
getStringExtra
(
"respond"
));
}
...
...
packages/playground/uts/unpackage/nativeplugins/test-uniplugin/android/src/io/dcloud/uniplugin/TestModule.kt.map
浏览文件 @
a5f0a378
{"version":3,"sources":["/Users/fxy/Documents/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,kBAASI,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/Documents/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
浏览文件 @
a5f0a378
{"version":3,"sources":["/Users/fxy/Documents/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,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/Documents/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
0 → 100644
浏览文件 @
a5f0a378
package
test;
import
android.util.Log;
fun
log
(
tag
:
String
,
msg
:
String
)
{
Log
.
e
(
tag
,
msg
);
}
packages/playground/uts/unpackage/nativeplugins/test-uniplugin/android/src/test.kt.map
0 → 100644
浏览文件 @
a5f0a378
{"version":3,"sources":["/Users/fxy/Documents/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-api/src/service/plugin/push.ts
浏览文件 @
a5f0a378
...
...
@@ -24,24 +24,9 @@ interface OnPushClickCallback {
let
cid
:
string
|
undefined
let
cidErrMsg
:
string
|
undefined
function
normalizePushMessage
(
type
:
'
receive
'
|
'
click
'
,
message
:
unknown
)
{
function
normalizePushMessage
(
message
:
unknown
)
{
try
{
const
res
=
JSON
.
parse
(
message
as
string
)
as
Record
<
string
,
any
>
if
(
type
===
'
receive
'
)
{
if
(
res
.
payload
)
{
if
(
res
.
aps
)
{
res
.
payload
.
aps
=
res
.
aps
}
return
res
.
payload
}
}
else
if
(
type
===
'
click
'
)
{
delete
res
.
type
delete
res
.
__UUID__
delete
res
.
appid
if
(
res
.
aps
&&
res
.
aps
.
alert
)
{
res
.
title
=
res
.
aps
.
alert
.
title
}
}
return
JSON
.
parse
(
message
as
string
)
as
Record
<
string
,
any
>
}
catch
(
e
:
any
)
{}
return
message
}
...
...
@@ -64,14 +49,14 @@ export function invokePushCallback(
onPushMessageCallbacks
.
forEach
((
callback
)
=>
{
callback
({
type
:
'
receive
'
,
data
:
normalizePushMessage
(
'
receive
'
,
args
.
message
),
data
:
normalizePushMessage
(
args
.
message
),
})
})
}
else
if
(
args
.
type
===
'
click
'
)
{
onPushMessageCallbacks
.
forEach
((
callback
)
=>
{
callback
({
type
:
'
click
'
,
data
:
normalizePushMessage
(
'
click
'
,
args
.
message
),
data
:
normalizePushMessage
(
args
.
message
),
})
})
}
...
...
packages/uni-app-plus/dist/uni.runtime.esm.js
浏览文件 @
a5f0a378
...
...
@@ -11057,25 +11057,9 @@ const getLaunchOptionsSync = defineSyncApi(API_GET_LAUNCH_OPTIONS_SYNC, () => {
let cid;
let cidErrMsg;
function normalizePushMessage(
type,
message) {
function normalizePushMessage(message) {
try {
const res = JSON.parse(message);
if (type === 'receive') {
if (res.payload) {
if (res.aps) {
res.payload.aps = res.aps;
}
return res.payload;
}
}
else if (type === 'click') {
delete res.type;
delete res.__UUID__;
delete res.appid;
if (res.aps && res.aps.alert) {
res.title = res.aps.alert.title;
}
}
return JSON.parse(message);
}
catch (e) { }
return message;
...
...
@@ -11094,7 +11078,7 @@ function invokePushCallback(args) {
onPushMessageCallbacks.forEach((callback) => {
callback({
type: 'receive',
data: normalizePushMessage(
'receive',
args.message),
data: normalizePushMessage(args.message),
});
});
}
...
...
@@ -11102,7 +11086,7 @@ function invokePushCallback(args) {
onPushMessageCallbacks.forEach((callback) => {
callback({
type: 'click',
data: normalizePushMessage(
'click',
args.message),
data: normalizePushMessage(args.message),
});
});
}
...
...
@@ -13020,6 +13004,12 @@ const canIUse = defineSyncApi(API_CAN_I_USE, (schema) => {
return false;
}, CanIUseProtocol);
let deviceId;
function deviceId$1 () {
deviceId = deviceId || plus.device.uuid;
return deviceId;
}
const isIOS = plus.os.name === 'iOS';
let config;
/**
...
...
@@ -13282,12 +13272,6 @@ function getStatusBarStyle() {
return style;
}
let deviceId;
function deviceId$1 () {
deviceId = deviceId || plus.device.uuid;
return deviceId;
}
function getScreenInfo() {
// 好像开发时刷新,偶发的 plus.screen.getCurrentSize 为 undefined
const { resolutionWidth, resolutionHeight } = plus.screen.getCurrentSize() || {
...
...
@@ -13299,13 +13283,8 @@ function getScreenInfo() {
screenHeight: Math.round(resolutionHeight),
};
}
const getSystemInfoSync = defineSyncApi('getSystemInfoSync', () => {
const { getSystemInfoSync } = weex.requireModule('plus');
const info = getSystemInfoSync();
const { deviceBrand, deviceModel, osName, osVersion, osLanguage } = info;
const brand = deviceBrand.toLowerCase();
const _osName = osName.toLowerCase();
const ios = _osName === 'ios';
const getWindowInfo = defineSyncApi('getWindowInfo', () => {
const ios = plus.os.name.toLowerCase() === 'ios';
const { screenWidth, screenHeight } = getScreenInfo();
const statusBarHeight = getStatusbarHeight();
let safeAreaInsets;
...
...
@@ -13365,22 +13344,13 @@ const getSystemInfoSync = defineSyncApi('getSystemInfoSync', () => {
width: windowWidth - safeAreaInsets.left - safeAreaInsets.right,
height: windowHeightReal - safeAreaInsets.top - safeAreaInsets.bottom,
};
return extend({
brand: brand,
model: deviceModel,
return {
pixelRatio: plus.screen.scale,
screenWidth,
screenHeight,
windowWidth,
windowHeight,
statusBarHeight,
language: osLanguage,
system: `${osName} ${osVersion}`,
version: plus.runtime.innerVersion,
platform: _osName,
SDKVersion: '',
windowTop,
windowBottom,
safeArea,
safeAreaInsets: {
top: safeAreaInsets.top,
...
...
@@ -13388,11 +13358,87 @@ const getSystemInfoSync = defineSyncApi('getSystemInfoSync', () => {
bottom: safeAreaInsets.bottom,
left: safeAreaInsets.left,
},
deviceId: deviceId$1(),
}, info, {
windowTop,
windowBottom,
screenTop: screenHeight - windowHeight,
};
});
let systemInfo;
let _initSystemInfo = true;
function weexGetSystemInfoSync() {
if (!_initSystemInfo)
return;
const { getSystemInfoSync } = weex.requireModule('plus');
systemInfo = getSystemInfoSync();
}
const getDeviceInfo = defineSyncApi('getDeviceInfo', () => {
weexGetSystemInfoSync();
const { deviceBrand, deviceModel, osName, osVersion } = systemInfo;
const brand = deviceBrand.toLowerCase();
return {
deviceBrand: brand,
osName: _osName,
});
deviceModel,
brand,
model: deviceModel,
system: `${osName === 'ios' ? 'iOS' : 'Android'} ${osVersion}`,
platform: osName,
};
});
const getAppBaseInfo = defineSyncApi('getAppBaseInfo', () => {
weexGetSystemInfoSync();
const { hostPackageName, hostName, osLanguage, hostVersion, hostLanguage, hostTheme, appId, appName, appVersion, appVersionCode, } = systemInfo;
return {
SDKVersion: '',
hostSDKVersion: '',
enableDebug: false,
appId,
appName,
appVersion,
appVersionCode,
appLanguage: uni.getLocale(),
version: plus.runtime.innerVersion,
language: osLanguage,
theme: '',
hostPackageName,
hostName,
hostVersion,
hostLanguage,
hostTheme,
hostFontSizeSetting: undefined,
};
});
const getSystemInfoSync = defineSyncApi('getSystemInfoSync', () => {
_initSystemInfo = true;
weexGetSystemInfoSync();
_initSystemInfo = false;
const windowInfo = getWindowInfo();
const deviceInfo = getDeviceInfo();
const appBaseInfo = getAppBaseInfo();
_initSystemInfo = true;
const { osName, osLanguage, osVersion } = systemInfo;
const { pixelRatio } = windowInfo;
const osLanguageSplit = osLanguage.split('-');
const osLanguageSplitLast = osLanguageSplit[osLanguageSplit.length - 1];
let _osLanguage = `${osLanguageSplit[0]}${osLanguageSplitLast ? '-' + osLanguageSplitLast : ''}`;
let extraData = {
errMsg: 'getSystemInfo:ok',
fontSizeSetting: appBaseInfo.hostFontSizeSetting,
devicePixelRatio: pixelRatio,
deviceId: deviceId$1(),
uniCompileVersion: __uniConfig.compilerVersion,
uniRuntimeVersion: __uniConfig.compilerVersion,
osLanguage: _osLanguage,
};
if (osName === 'ios') {
extraData.romName = osName;
extraData.romVersion = osVersion;
}
const _systemInfo = extend(windowInfo, systemInfo, deviceInfo, appBaseInfo, extraData);
delete _systemInfo.screenTop;
delete _systemInfo.enableDebug;
delete _systemInfo.theme;
return _systemInfo;
});
const getSystemInfo = defineAsyncApi('getSystemInfo', (_, { resolve }) => {
return resolve(getSystemInfoSync());
...
...
@@ -19039,6 +19085,8 @@ var uni$1 = {
removeSavedFile: removeSavedFile,
openDocument: openDocument,
canIUse: canIUse,
getDeviceInfo: getDeviceInfo,
getAppBaseInfo: getAppBaseInfo,
getSystemInfoSync: getSystemInfoSync,
getSystemInfo: getSystemInfo,
onCompassChange: onCompassChange,
...
...
@@ -19091,6 +19139,7 @@ var uni$1 = {
getScreenBrightness: getScreenBrightness,
setScreenBrightness: setScreenBrightness,
setKeepScreenOn: setKeepScreenOn,
getWindowInfo: getWindowInfo,
getImageInfo: getImageInfo,
getVideoInfo: getVideoInfo,
previewImage: previewImage,
...
...
packages/uni-h5-vue/dist/vue.runtime.cjs.js
浏览文件 @
a5f0a378
此差异已折叠。
点击以展开。
packages/uni-h5-vue/dist/vue.runtime.esm.js
浏览文件 @
a5f0a378
此差异已折叠。
点击以展开。
packages/uni-h5-vue/package.json
浏览文件 @
a5f0a378
...
...
@@ -17,5 +17,8 @@
"bugs"
:
{
"url"
:
"https://github.com/dcloudio/uni-app/issues"
},
"gitHead"
:
"33e807d66e1fe47e2ee08ad9c59247e37b8884da"
"gitHead"
:
"33e807d66e1fe47e2ee08ad9c59247e37b8884da"
,
"dependencies"
:
{
"@dcloudio/uni-shared"
:
"3.0.0-alpha-3041020220516004"
}
}
packages/uni-h5/dist/uni-h5.cjs.js
浏览文件 @
a5f0a378
...
...
@@ -905,6 +905,13 @@ function getRealPath(filePath) {
}
return
filePath
;
}
const
ua
=
navigator
.
userAgent
;
const
isAndroid
=
/* @__PURE__ */
/android/i
.
test
(
ua
);
const
isIOS
=
/* @__PURE__ */
/iphone|ipad|ipod/i
.
test
(
ua
);
const
isWindows
=
/* @__PURE__ */
ua
.
match
(
/Windows NT
([\d
|
\d
.
\d]
*
)
/i
);
const
isMac
=
/* @__PURE__ */
/Macintosh|Mac/i
.
test
(
ua
);
const
isLinux
=
/* @__PURE__ */
/Linux|X11/i
.
test
(
ua
);
const
isIPadOS
=
isMac
&&
navigator
.
maxTouchPoints
>
0
;
const
HTTP_METHODS
=
[
"
GET
"
,
"
OPTIONS
"
,
...
...
@@ -10021,6 +10028,234 @@ const getStorageInfoSync = /* @__PURE__ */ defineSyncApi("getStorageInfoSync", (
const
getStorageInfo
=
/* @__PURE__ */
defineAsyncApi
(
"
getStorageInfo
"
,
(
_
,
{
resolve
})
=>
{
resolve
(
getStorageInfoSync
());
});
function
IEVersion
()
{
const
userAgent
=
navigator
.
userAgent
;
const
isIE
=
userAgent
.
indexOf
(
"
compatible
"
)
>
-
1
&&
userAgent
.
indexOf
(
"
MSIE
"
)
>
-
1
;
const
isEdge
=
userAgent
.
indexOf
(
"
Edge
"
)
>
-
1
&&
!
isIE
;
const
isIE11
=
userAgent
.
indexOf
(
"
Trident
"
)
>
-
1
&&
userAgent
.
indexOf
(
"
rv:11.0
"
)
>
-
1
;
if
(
isIE
)
{
const
reIE
=
new
RegExp
(
"
MSIE (
\\
d+
\\
.
\\
d+);
"
);
reIE
.
test
(
userAgent
);
const
fIEVersion
=
parseFloat
(
RegExp
.
$1
);
if
(
fIEVersion
>
6
)
{
return
fIEVersion
;
}
else
{
return
6
;
}
}
else
if
(
isEdge
)
{
return
-
1
;
}
else
if
(
isIE11
)
{
return
11
;
}
else
{
return
-
1
;
}
}
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
"
;
}
}
function
getBrowserInfo
()
{
let
osname
;
let
osversion
=
"
0
"
;
let
model
=
""
;
let
deviceType
=
"
phone
"
;
const
language
=
navigator
.
language
;
if
(
isIOS
)
{
osname
=
"
iOS
"
;
const
osversionFind
=
ua
.
match
(
/OS
\s([\w
_
]
+
)\s
like/
);
if
(
osversionFind
)
{
osversion
=
osversionFind
[
1
].
replace
(
/_/g
,
"
.
"
);
}
const
modelFind
=
ua
.
match
(
/
\(([
a-zA-Z
]
+
)
;/
);
if
(
modelFind
)
{
model
=
modelFind
[
1
];
}
}
else
if
(
isAndroid
)
{
osname
=
"
Android
"
;
const
osversionFind
=
ua
.
match
(
/Android
[\s/]([\w\.]
+
)[
;
\s]
/
);
if
(
osversionFind
)
{
osversion
=
osversionFind
[
1
];
}
const
infoFind
=
ua
.
match
(
/
\((
.+
?)\)
/
);
const
infos
=
infoFind
?
infoFind
[
1
].
split
(
"
;
"
)
:
ua
.
split
(
"
"
);
const
otherInfo
=
[
/
\b
Android
\b
/i
,
/
\b
Linux
\b
/i
,
/
\b
U
\b
/i
,
/^
\s?[
a-z
][
a-z
]
$/i
,
/^
\s?[
a-z
][
a-z
]
-
[
a-z
][
a-z
]
$/i
,
/
\b
wv
\b
/i
,
/
\/[\d\.
,
]
+$/
,
/^
\s?[\d\.
,
]
+$/
,
/
\b
Browser
\b
/i
,
/
\b
Mobile
\b
/i
];
for
(
let
i
=
0
;
i
<
infos
.
length
;
i
++
)
{
const
info
=
infos
[
i
];
if
(
info
.
indexOf
(
"
Build
"
)
>
0
)
{
model
=
info
.
split
(
"
Build
"
)[
0
].
trim
();
break
;
}
let
other
;
for
(
let
o
=
0
;
o
<
otherInfo
.
length
;
o
++
)
{
if
(
otherInfo
[
o
].
test
(
info
))
{
other
=
true
;
break
;
}
}
if
(
!
other
)
{
model
=
info
.
trim
();
break
;
}
}
}
else
if
(
isIPadOS
)
{
model
=
"
iPad
"
;
osname
=
"
iOS
"
;
deviceType
=
"
pad
"
;
osversion
=
typeof
window
.
BigInt
===
"
function
"
?
"
14.0
"
:
"
13.0
"
;
}
else
if
(
isWindows
||
isMac
||
isLinux
)
{
model
=
"
PC
"
;
osname
=
"
PC
"
;
deviceType
=
"
pc
"
;
osversion
=
"
0
"
;
let
osversionFind
=
ua
.
match
(
/
\((
.+
?)\)
/
)[
1
];
if
(
isWindows
)
{
osname
=
"
Windows
"
;
switch
(
isWindows
[
1
])
{
case
"
5.1
"
:
osversion
=
"
XP
"
;
break
;
case
"
6.0
"
:
osversion
=
"
Vista
"
;
break
;
case
"
6.1
"
:
osversion
=
"
7
"
;
break
;
case
"
6.2
"
:
osversion
=
"
8
"
;
break
;
case
"
6.3
"
:
osversion
=
"
8.1
"
;
break
;
case
"
10.0
"
:
osversion
=
"
10
"
;
break
;
}
const
framework
=
osversionFind
&&
osversionFind
.
match
(
/
[
Win|WOW
]([\d]
+
)
/
);
if
(
framework
)
{
osversion
+=
` x
${
framework
[
1
]}
`
;
}
}
else
if
(
isMac
)
{
osname
=
"
Mac
"
;
const
_osversion
=
osversionFind
&&
osversionFind
.
match
(
/Mac OS X
(
.+
)
/
)
||
""
;
if
(
osversion
)
{
osversion
=
_osversion
[
1
].
replace
(
/_/g
,
"
.
"
);
if
(
osversion
.
indexOf
(
"
;
"
)
!==
-
1
)
{
osversion
=
osversion
.
split
(
"
;
"
)[
0
];
}
}
}
else
if
(
isLinux
)
{
osname
=
"
Linux
"
;
const
_osversion
=
osversionFind
&&
osversionFind
.
match
(
/Linux
(
.*
)
/
)
||
""
;
if
(
_osversion
)
{
osversion
=
_osversion
[
1
];
if
(
osversion
.
indexOf
(
"
;
"
)
!==
-
1
)
{
osversion
=
osversion
.
split
(
"
;
"
)[
0
];
}
}
}
}
else
{
osname
=
"
Other
"
;
osversion
=
"
0
"
;
deviceType
=
"
other
"
;
}
const
system
=
`
${
osname
}
${
osversion
}
`
;
const
platform
=
osname
.
toLocaleLowerCase
();
let
browserName
=
""
;
let
browseVersion
=
String
(
IEVersion
());
if
(
browseVersion
!==
"
-1
"
)
{
browserName
=
"
IE
"
;
}
else
{
const
browseVendors
=
[
"
Version
"
,
"
Firefox
"
,
"
Chrome
"
,
"
Edge{0,1}
"
];
const
vendors
=
[
"
Safari
"
,
"
Firefox
"
,
"
Chrome
"
,
"
Edge
"
];
for
(
let
index2
=
0
;
index2
<
browseVendors
.
length
;
index2
++
)
{
const
vendor
=
browseVendors
[
index2
];
const
reg
=
new
RegExp
(
`(
${
vendor
}
)/(\\S*)\\b`
);
if
(
reg
.
test
(
ua
))
{
browserName
=
vendors
[
index2
];
browseVersion
=
ua
.
match
(
reg
)[
2
];
}
}
}
let
deviceBrand
=
""
;
if
(
model
)
{
const
_model
=
model
.
toLocaleLowerCase
();
deviceBrand
=
getDeviceBrand
(
_model
)
||
getDeviceBrand
(
osname
.
toLocaleLowerCase
())
||
_model
.
split
(
"
"
)[
0
];
}
let
deviceOrientation
=
"
portrait
"
;
const
orientation
=
typeof
window
.
screen
.
orientation
===
"
undefined
"
?
window
.
orientation
:
window
.
screen
.
orientation
.
angle
;
deviceOrientation
=
Math
.
abs
(
orientation
)
===
90
?
"
landscape
"
:
"
portrait
"
;
return
{
deviceBrand
,
deviceModel
:
model
,
deviceOrientation
,
brand
:
deviceBrand
,
model
,
system
,
platform
,
browserName
:
browserName
.
toLocaleLowerCase
(),
browseVersion
,
language
,
deviceType
,
ua
,
osname
,
osversion
,
theme
:
""
};
}
let
browserInfo
;
function
initBrowserInfo
()
{
browserInfo
=
getBrowserInfo
();
}
const
getDeviceInfo
=
/* @__PURE__ */
defineSyncApi
(
"
getDeviceInfo
"
,
()
=>
{
initBrowserInfo
();
const
{
deviceBrand
,
deviceModel
,
brand
,
model
,
platform
,
system
}
=
browserInfo
;
return
{
deviceBrand
,
deviceModel
,
brand
,
model
,
system
,
platform
};
});
const
getAppBaseInfo
=
/* @__PURE__ */
defineSyncApi
(
"
getAppBaseInfo
"
,
()
=>
{
initBrowserInfo
();
const
{
theme
,
browserName
,
browseVersion
,
language
}
=
browserInfo
;
return
{
SDKVersion
:
""
,
hostSDKVersion
:
""
,
enableDebug
:
false
,
hostPackageName
:
""
,
hostFontSizeSetting
:
void
0
,
language
,
hostName
:
browserName
,
hostVersion
:
browseVersion
,
hostTheme
:
theme
,
hostLanguage
:
language
,
theme
,
appId
:
__uniConfig
.
appId
,
appName
:
__uniConfig
.
appName
,
appVersion
:
__uniConfig
.
appVersion
,
appVersionCode
:
__uniConfig
.
appVersionCode
,
appLanguage
:
uni
.
getLocale
(),
version
:
__uniConfig
.
appVersion
};
});
const
getSystemInfoSync
=
/* @__PURE__ */
defineSyncApi
(
"
getSystemInfoSync
"
,
()
=>
{
{
return
{
...
...
@@ -10096,6 +10331,8 @@ var api = /* @__PURE__ */ Object.defineProperty({
clearStorage
,
getStorageInfoSync
,
getStorageInfo
,
getDeviceInfo
,
getAppBaseInfo
,
getSystemInfoSync
},
Symbol
.
toStringTag
,
{
value
:
"
Module
"
});
const
uni$1
=
api
;
...
...
@@ -11212,7 +11449,9 @@ exports.WebView = index$d;
exports
.
clearStorage
=
clearStorage
;
exports
.
clearStorageSync
=
clearStorageSync
;
exports
.
getApp
=
getApp$1
;
exports
.
getAppBaseInfo
=
getAppBaseInfo
;
exports
.
getCurrentPages
=
getCurrentPages$1
;
exports
.
getDeviceInfo
=
getDeviceInfo
;
exports
.
getRealPath
=
getRealPath
;
exports
.
getStorage
=
getStorage
;
exports
.
getStorageInfo
=
getStorageInfo
;
...
...
packages/uni-h5/dist/uni-h5.es.js
浏览文件 @
a5f0a378
...
...
@@ -4564,24 +4564,9 @@ const getLaunchOptionsSync = /* @__PURE__ */ defineSyncApi(API_GET_LAUNCH_OPTION
});
let cid;
let cidErrMsg;
function normalizePushMessage(
type,
message) {
function normalizePushMessage(message) {
try {
const res = JSON.parse(message);
if (type === "receive") {
if (res.payload) {
if (res.aps) {
res.payload.aps = res.aps;
}
return res.payload;
}
} else if (type === "click") {
delete res.type;
delete res.__UUID__;
delete res.appid;
if (res.aps && res.aps.alert) {
res.title = res.aps.alert.title;
}
}
return JSON.parse(message);
} catch (e2) {
}
return message;
...
...
@@ -4595,14 +4580,14 @@ function invokePushCallback(args) {
onPushMessageCallbacks.forEach((callback) => {
callback({
type: "receive",
data: normalizePushMessage(
"receive",
args.message)
data: normalizePushMessage(args.message)
});
});
} else if (args.type === "click") {
onPushMessageCallbacks.forEach((callback) => {
callback({
type: "click",
data: normalizePushMessage(
"click",
args.message)
data: normalizePushMessage(args.message)
});
});
}
...
...
@@ -16340,20 +16325,12 @@ function getDeviceBrand(model) {
return "microsoft";
}
}
const getSystemInfoSync = /* @__PURE__ */ defineSyncApi("getSystemInfoSync", () => {
const pixelRatio2 = window.devicePixelRatio;
const screenFix = getScreenFix();
const landscape = isLandscape(screenFix);
const screenWidth = getScreenWidth(screenFix, landscape);
const screenHeight = getScreenHeight(screenFix, landscape);
const windowWidth = getWindowWidth(screenWidth);
let windowHeight = window.innerHeight;
const language = navigator.language;
const statusBarHeight = out.top;
function getBrowserInfo() {
let osname;
let osversion;
let osversion
= "0"
;
let model = "";
let deviceType = "phone";
const language = navigator.language;
if (isIOS$1) {
osname = "iOS";
const osversionFind = ua.match(/OS\s([\w_]+)\slike/);
...
...
@@ -16441,18 +16418,18 @@ const getSystemInfoSync = /* @__PURE__ */ defineSyncApi("getSystemInfoSync", ()
}
} else if (isMac) {
osname = "Mac";
osversion = osversionFind && osversionFind.match(/Mac OS X (.+)/) || "";
const _
osversion = osversionFind && osversionFind.match(/Mac OS X (.+)/) || "";
if (osversion) {
osversion = osversion[1].replace(/_/g, ".");
osversion =
_
osversion[1].replace(/_/g, ".");
if (osversion.indexOf(";") !== -1) {
osversion = osversion.split(";")[0];
}
}
} else if (isLinux) {
osname = "Linux";
osversion = osversionFind && osversionFind.match(/Linux (.*)/) || "";
if (osversion) {
osversion = osversion[1];
const _
osversion = osversionFind && osversionFind.match(/Linux (.*)/) || "";
if (
_
osversion) {
osversion =
_
osversion[1];
if (osversion.indexOf(";") !== -1) {
osversion = osversion.split(";")[0];
}
...
...
@@ -16465,17 +16442,6 @@ const getSystemInfoSync = /* @__PURE__ */ defineSyncApi("getSystemInfoSync", ()
}
const system = `${osname} ${osversion}`;
const platform = osname.toLocaleLowerCase();
const safeArea = {
left: out.left,
right: windowWidth - out.right,
top: out.top,
bottom: windowHeight - out.bottom,
width: windowWidth - out.left - out.right,
height: windowHeight - out.top - out.bottom
};
const { top: windowTop, bottom: windowBottom } = getWindowOffset();
windowHeight -= windowTop;
windowHeight -= windowBottom;
let browserName = "";
let browseVersion = String(IEVersion());
if (browseVersion !== "-1") {
...
...
@@ -16497,6 +16463,47 @@ const getSystemInfoSync = /* @__PURE__ */ defineSyncApi("getSystemInfoSync", ()
const _model = model.toLocaleLowerCase();
deviceBrand = getDeviceBrand(_model) || getDeviceBrand(osname.toLocaleLowerCase()) || _model.split(" ")[0];
}
let deviceOrientation = "portrait";
const orientation = typeof window.screen.orientation === "undefined" ? window.orientation : window.screen.orientation.angle;
deviceOrientation = Math.abs(orientation) === 90 ? "landscape" : "portrait";
return {
deviceBrand,
deviceModel: model,
deviceOrientation,
brand: deviceBrand,
model,
system,
platform,
browserName: browserName.toLocaleLowerCase(),
browseVersion,
language,
deviceType,
ua,
osname,
osversion,
theme: ""
};
}
const getWindowInfo = /* @__PURE__ */ defineSyncApi("getWindowInfo", () => {
const pixelRatio2 = window.devicePixelRatio;
const screenFix = getScreenFix();
const landscape = isLandscape(screenFix);
const screenWidth = getScreenWidth(screenFix, landscape);
const screenHeight = getScreenHeight(screenFix, landscape);
const windowWidth = getWindowWidth(screenWidth);
let windowHeight = window.innerHeight;
const statusBarHeight = out.top;
const safeArea = {
left: out.left,
right: windowWidth - out.right,
top: out.top,
bottom: windowHeight - out.bottom,
width: windowWidth - out.left - out.right,
height: windowHeight - out.top - out.bottom
};
const { top: windowTop, bottom: windowBottom } = getWindowOffset();
windowHeight -= windowTop;
windowHeight -= windowBottom;
return {
windowTop,
windowBottom,
...
...
@@ -16505,13 +16512,7 @@ const getSystemInfoSync = /* @__PURE__ */ defineSyncApi("getSystemInfoSync", ()
pixelRatio: pixelRatio2,
screenWidth,
screenHeight,
language,
statusBarHeight,
system,
platform,
deviceBrand,
deviceType,
model,
safeArea,
safeAreaInsets: {
top: out.top,
...
...
@@ -16519,30 +16520,91 @@ const getSystemInfoSync = /* @__PURE__ */ defineSyncApi("getSystemInfoSync", ()
bottom: out.bottom,
left: out.left
},
version: __uniConfig.appVersion,
screenTop: screenHeight - windowHeight
};
});
let browserInfo;
let _initBrowserInfo = true;
function initBrowserInfo() {
if (!_initBrowserInfo)
return;
browserInfo = getBrowserInfo();
}
const getDeviceInfo = /* @__PURE__ */ defineSyncApi("getDeviceInfo", () => {
initBrowserInfo();
const { deviceBrand, deviceModel, brand, model, platform, system } = browserInfo;
return {
deviceBrand,
deviceModel,
brand,
model,
system,
platform
};
});
const getAppBaseInfo = /* @__PURE__ */ defineSyncApi("getAppBaseInfo", () => {
initBrowserInfo();
const { theme, browserName, browseVersion, language } = browserInfo;
return {
SDKVersion: "",
deviceId: deviceId$1()
,
ua
,
uniPlatform: "web
",
browserName
,
browseVersion
,
osLanguage: languag
e,
osName: osname.toLocaleLowerCase()
,
osVersion: osversion
,
hostSDKVersion: ""
,
enableDebug: false
,
hostPackageName: "
",
hostFontSizeSetting: void 0
,
language
,
hostName: browserNam
e,
hostVersion: browseVersion
,
hostTheme: theme
,
hostLanguage: language,
uniCompileVersion: __uniConfig.compilerVersion,
uniRuntimeVersion: __uniConfig.compilerVersion,
theme,
appId: __uniConfig.appId,
appName: __uniConfig.appName,
appVersion: __uniConfig.appVersion,
appVersionCode: __uniConfig.appVersionCode,
hostName: browserName,
hostVersion: browseVersion,
osTheme: "",
hostTheme: "",
hostPackageName: ""
appLanguage: uni.getLocale(),
version: __uniConfig.appVersion
};
});
const getSystemInfoSync = /* @__PURE__ */ defineSyncApi("getSystemInfoSync", () => {
_initBrowserInfo = true;
initBrowserInfo();
_initBrowserInfo = false;
const windowInfo = getWindowInfo();
const deviceInfo = getDeviceInfo();
const appBaseInfo = getAppBaseInfo();
_initBrowserInfo = true;
const {
ua: ua2,
deviceType,
browserName,
browseVersion,
osname,
osversion,
deviceOrientation
} = browserInfo;
const { pixelRatio: pixelRatio2 } = windowInfo;
const systemInfo = extend(windowInfo, deviceInfo, appBaseInfo, {
ua: ua2,
deviceType,
browserName,
browseVersion,
deviceId: deviceId$1(),
devicePixelRatio: pixelRatio2,
deviceOrientation,
uniPlatform: "web",
uniCompileVersion: __uniConfig.compilerVersion,
uniRuntimeVersion: __uniConfig.compilerVersion,
fontSizeSetting: appBaseInfo.hostFontSizeSetting,
osName: osname.toLocaleLowerCase(),
osVersion: osversion,
osLanguage: void 0,
osTheme: void 0
});
delete systemInfo.screenTop;
delete systemInfo.enableDebug;
delete systemInfo.theme;
return systemInfo;
});
const getSystemInfo = /* @__PURE__ */ defineAsyncApi("getSystemInfo", (_args, { resolve }) => {
return resolve(getSystemInfoSync());
});
...
...
@@ -20242,6 +20304,8 @@ var api = /* @__PURE__ */ Object.defineProperty({
createInnerAudioContext,
makePhoneCall,
getSystemInfo,
getDeviceInfo,
getAppBaseInfo,
getSystemInfoSync,
onNetworkStatusChange,
offNetworkStatusChange,
...
...
@@ -20258,6 +20322,7 @@ var api = /* @__PURE__ */ Object.defineProperty({
vibrateLong,
getClipboardData,
setClipboardData,
getWindowInfo,
setStorageSync,
setStorage,
getStorageSync,
...
...
@@ -22463,4 +22528,4 @@ var index = /* @__PURE__ */ defineSystemComponent({
return openBlock(), createBlock("div", clazz, [loadingVNode]);
}
});
export { $emit, $off, $on, $once, index$8 as Ad, index$7 as AdContentPage, index$6 as AdDraw, index$1 as AsyncErrorComponent, index as AsyncLoadingComponent, index$y as Button, index$5 as Camera, index$w as Canvas, index$u as Checkbox, index$v as CheckboxGroup, index$a as CoverImage, index$b as CoverView, index$t as Editor, index$A as Form, index$s as Icon, index$r as Image, Input, index$z as Label, LayoutComponent, index$4 as LivePlayer, index$3 as LivePusher, Map$1 as Map, MovableArea, MovableView, index$q as Navigator, index$2 as PageComponent, index$9 as Picker, PickerView, PickerViewColumn, index$p as Progress, index$n as Radio, index$o as RadioGroup, ResizeSensor, index$m as RichText, ScrollView, index$l as Slider, Swiper, SwiperItem, index$k as Switch, index$j as Text, index$i as Textarea, UniServiceJSBridge$1 as UniServiceJSBridge, UniViewJSBridge$1 as UniViewJSBridge, index$e as Video, index$h as View, index$d as WebView, addInterceptor, addPhoneContact, arrayBufferToBase64, base64ToArrayBuffer, canIUse, canvasGetImageData, canvasPutImageData, canvasToTempFilePath, chooseFile, chooseImage, chooseLocation, chooseVideo, clearStorage, clearStorageSync, closePreviewImage, closeSocket, connectSocket, createAnimation$1 as createAnimation, createCameraContext, createCanvasContext, createInnerAudioContext, createIntersectionObserver, createLivePlayerContext, createMapContext, createMediaQueryObserver, createSelectorQuery, createVideoContext, cssBackdropFilter, cssConstant, cssEnv, cssVar, downloadFile, getApp$1 as getApp, get
ClipboardData, getCurrentPages$1 as getCurrentPages, getEnterOptionsSync, getFileInfo, getImageInfo, getLaunchOptionsSync, getLeftWindowStyle, getLocale, getLocation, getNetworkType, getProvider, getPushCid, getRealPath, getRecorderManager, getRightWindowStyle, getSavedFileInfo, getSavedFileList, getScreenBrightness, getSelectedTextRange$1 as getSelectedTextRange, getStorage, getStorageInfo, getStorageInfoSync, getStorageSync, getSystemInfo, getSystemInfoSync, getTopWindowStyle, getVideo
Info, hideKeyboard, hideLeftWindow, hideLoading, hideNavigationBarLoading, hideRightWindow, hideTabBar, hideTabBarRedDot, hideToast, hideTopWindow, interceptors, invokePushCallback, loadFontFace, login, makePhoneCall, navigateBack, navigateTo, offAccelerometerChange, offAppHide, offAppShow, offCompassChange, offError, offNetworkStatusChange, offPageNotFound, offPushMessage, offUnhandledRejection, offWindowResize, onAccelerometerChange, onAppHide, onAppShow, onCompassChange, onError, onGyroscopeChange, onLocaleChange, onMemoryWarning, onNetworkStatusChange, onPageNotFound, onPushMessage, onSocketClose, onSocketError, onSocketMessage, onSocketOpen, onTabBarMidButtonTap, onUnhandledRejection, onUserCaptureScreen, onWindowResize, openDocument, openLocation, pageScrollTo, index$f as plugin, preloadPage, previewImage, reLaunch, redirectTo, removeInterceptor, removeSavedFileInfo, removeStorage, removeStorageSync, removeTabBarBadge, request, saveFile, saveImageToPhotosAlbum, saveVideoToPhotosAlbum, scanCode, sendSocketMessage, setClipboardData, setKeepScreenOn, setLeftWindowStyle, setLocale, setNavigationBarColor, setNavigationBarTitle, setPageMeta, setRightWindowStyle, setScreenBrightness, setStorage, setStorageSync, setTabBarBadge, setTabBarItem, setTabBarStyle, setTopWindowStyle, setupApp, setupPage, setupWindow, showActionSheet, showLeftWindow, showLoading, showModal, showNavigationBarLoading, showRightWindow, showTabBar, showTabBarRedDot, showToast, showTopWindow, startAccelerometer, startCompass, startGyroscope, startPullDownRefresh, stopAccelerometer, stopCompass, stopGyroscope, stopPullDownRefresh, switchTab, uni$1 as uni, uploadFile, upx2px, useI18n, useTabBar, vibrateLong, vibrateShort };
export { $emit, $off, $on, $once, index$8 as Ad, index$7 as AdContentPage, index$6 as AdDraw, index$1 as AsyncErrorComponent, index as AsyncLoadingComponent, index$y as Button, index$5 as Camera, index$w as Canvas, index$u as Checkbox, index$v as CheckboxGroup, index$a as CoverImage, index$b as CoverView, index$t as Editor, index$A as Form, index$s as Icon, index$r as Image, Input, index$z as Label, LayoutComponent, index$4 as LivePlayer, index$3 as LivePusher, Map$1 as Map, MovableArea, MovableView, index$q as Navigator, index$2 as PageComponent, index$9 as Picker, PickerView, PickerViewColumn, index$p as Progress, index$n as Radio, index$o as RadioGroup, ResizeSensor, index$m as RichText, ScrollView, index$l as Slider, Swiper, SwiperItem, index$k as Switch, index$j as Text, index$i as Textarea, UniServiceJSBridge$1 as UniServiceJSBridge, UniViewJSBridge$1 as UniViewJSBridge, index$e as Video, index$h as View, index$d as WebView, addInterceptor, addPhoneContact, arrayBufferToBase64, base64ToArrayBuffer, canIUse, canvasGetImageData, canvasPutImageData, canvasToTempFilePath, chooseFile, chooseImage, chooseLocation, chooseVideo, clearStorage, clearStorageSync, closePreviewImage, closeSocket, connectSocket, createAnimation$1 as createAnimation, createCameraContext, createCanvasContext, createInnerAudioContext, createIntersectionObserver, createLivePlayerContext, createMapContext, createMediaQueryObserver, createSelectorQuery, createVideoContext, cssBackdropFilter, cssConstant, cssEnv, cssVar, downloadFile, getApp$1 as getApp, get
AppBaseInfo, getClipboardData, getCurrentPages$1 as getCurrentPages, getDeviceInfo, getEnterOptionsSync, getFileInfo, getImageInfo, getLaunchOptionsSync, getLeftWindowStyle, getLocale, getLocation, getNetworkType, getProvider, getPushCid, getRealPath, getRecorderManager, getRightWindowStyle, getSavedFileInfo, getSavedFileList, getScreenBrightness, getSelectedTextRange$1 as getSelectedTextRange, getStorage, getStorageInfo, getStorageInfoSync, getStorageSync, getSystemInfo, getSystemInfoSync, getTopWindowStyle, getVideoInfo, getWindow
Info, hideKeyboard, hideLeftWindow, hideLoading, hideNavigationBarLoading, hideRightWindow, hideTabBar, hideTabBarRedDot, hideToast, hideTopWindow, interceptors, invokePushCallback, loadFontFace, login, makePhoneCall, navigateBack, navigateTo, offAccelerometerChange, offAppHide, offAppShow, offCompassChange, offError, offNetworkStatusChange, offPageNotFound, offPushMessage, offUnhandledRejection, offWindowResize, onAccelerometerChange, onAppHide, onAppShow, onCompassChange, onError, onGyroscopeChange, onLocaleChange, onMemoryWarning, onNetworkStatusChange, onPageNotFound, onPushMessage, onSocketClose, onSocketError, onSocketMessage, onSocketOpen, onTabBarMidButtonTap, onUnhandledRejection, onUserCaptureScreen, onWindowResize, openDocument, openLocation, pageScrollTo, index$f as plugin, preloadPage, previewImage, reLaunch, redirectTo, removeInterceptor, removeSavedFileInfo, removeStorage, removeStorageSync, removeTabBarBadge, request, saveFile, saveImageToPhotosAlbum, saveVideoToPhotosAlbum, scanCode, sendSocketMessage, setClipboardData, setKeepScreenOn, setLeftWindowStyle, setLocale, setNavigationBarColor, setNavigationBarTitle, setPageMeta, setRightWindowStyle, setScreenBrightness, setStorage, setStorageSync, setTabBarBadge, setTabBarItem, setTabBarStyle, setTopWindowStyle, setupApp, setupPage, setupWindow, showActionSheet, showLeftWindow, showLoading, showModal, showNavigationBarLoading, showRightWindow, showTabBar, showTabBarRedDot, showToast, showTopWindow, startAccelerometer, startCompass, startGyroscope, startPullDownRefresh, stopAccelerometer, stopCompass, stopGyroscope, stopPullDownRefresh, switchTab, uni$1 as uni, uploadFile, upx2px, useI18n, useTabBar, vibrateLong, vibrateShort };
packages/uni-mp-alipay/dist/uni.api.esm.js
浏览文件 @
a5f0a378
...
...
@@ -540,25 +540,9 @@ const $emit = defineSyncApi(API_EMIT, (name, ...args) => {
let
cid
;
let
cidErrMsg
;
function
normalizePushMessage
(
type
,
message
)
{
function
normalizePushMessage
(
message
)
{
try
{
const
res
=
JSON
.
parse
(
message
);
if
(
type
===
'
receive
'
)
{
if
(
res
.
payload
)
{
if
(
res
.
aps
)
{
res
.
payload
.
aps
=
res
.
aps
;
}
return
res
.
payload
;
}
}
else
if
(
type
===
'
click
'
)
{
delete
res
.
type
;
delete
res
.
__UUID__
;
delete
res
.
appid
;
if
(
res
.
aps
&&
res
.
aps
.
alert
)
{
res
.
title
=
res
.
aps
.
alert
.
title
;
}
}
return
JSON
.
parse
(
message
);
}
catch
(
e
)
{
}
return
message
;
...
...
@@ -577,7 +561,7 @@ function invokePushCallback(args) {
onPushMessageCallbacks
.
forEach
((
callback
)
=>
{
callback
({
type
:
'
receive
'
,
data
:
normalizePushMessage
(
'
receive
'
,
args
.
message
),
data
:
normalizePushMessage
(
args
.
message
),
});
});
}
...
...
@@ -585,7 +569,7 @@ function invokePushCallback(args) {
onPushMessageCallbacks
.
forEach
((
callback
)
=>
{
callback
({
type
:
'
click
'
,
data
:
normalizePushMessage
(
'
click
'
,
args
.
message
),
data
:
normalizePushMessage
(
args
.
message
),
});
});
}
...
...
@@ -911,7 +895,7 @@ function addSafeAreaInsets(fromRes, toRes) {
}
}
function
populateParameters
(
fromRes
,
toRes
)
{
const
{
brand
,
model
,
system
,
language
,
theme
,
version
,
hostName
=
''
,
platform
,
}
=
fromRes
;
const
{
brand
,
model
,
system
,
language
,
theme
,
version
,
hostName
,
platform
,
fontSizeSetting
,
SDKVersion
,
pixelRatio
,
deviceOrientation
,
environment
,
}
=
fromRes
;
const
isQuickApp
=
"
mp-alipay
"
.
indexOf
(
'
quickapp-webview
'
)
!==
-
1
;
// osName osVersion
let
osName
=
''
;
...
...
@@ -948,8 +932,17 @@ function populateParameters(fromRes, toRes) {
deviceBrand
=
getDeviceBrand
(
deviceBrand
);
}
// hostName
let
_hostName
=
hostName
;
// mp-jd
let
_hostName
=
hostName
||
"
mp-alipay
"
.
split
(
'
-
'
)[
1
]
;
// mp-jd
_hostName
=
fromRes
.
app
;
// deviceOrientation
let
_deviceOrientation
=
deviceOrientation
;
// 仅 微信 百度 支持
// devicePixelRatio
let
_devicePixelRatio
=
pixelRatio
;
// SDKVersion
let
_SDKVersion
=
SDKVersion
;
{
_SDKVersion
=
my
.
SDKVersion
;
}
// wx.getAccountInfoSync
const
parameters
=
{
appId
:
process
.
env
.
UNI_APP_ID
,
...
...
@@ -962,19 +955,25 @@ function populateParameters(fromRes, toRes) {
deviceBrand
,
deviceModel
:
model
,
deviceType
,
devicePixelRatio
:
_devicePixelRatio
,
deviceOrientation
:
_deviceOrientation
,
osName
:
osName
.
toLocaleLowerCase
(),
osVersion
,
osLanguage
:
language
,
osTheme
:
theme
,
hostTheme
:
theme
,
hostVersion
,
hostLanguage
:
language
,
hostLanguage
:
language
.
split
(
'
_
'
,
'
-
'
)
,
hostName
:
_hostName
,
hostSDKVersion
:
_SDKVersion
,
hostFontSizeSetting
:
fontSizeSetting
,
windowTop
:
0
,
windowBottom
:
0
,
// TODO
ua
:
''
,
hostPackageName
:
''
,
browserName
:
''
,
browseVersion
:
''
,
osLanguage
:
undefined
,
osTheme
:
undefined
,
ua
:
undefined
,
hostPackageName
:
undefined
,
browserName
:
undefined
,
browseVersion
:
undefined
,
};
extend
(
toRes
,
parameters
);
}
...
...
packages/uni-mp-baidu/dist/uni.api.esm.js
浏览文件 @
a5f0a378
此差异已折叠。
点击以展开。
packages/uni-mp-kuaishou/dist/uni.api.esm.js
浏览文件 @
a5f0a378
此差异已折叠。
点击以展开。
packages/uni-mp-lark/dist/uni.api.esm.js
浏览文件 @
a5f0a378
此差异已折叠。
点击以展开。
packages/uni-mp-qq/dist/uni.api.esm.js
浏览文件 @
a5f0a378
此差异已折叠。
点击以展开。
packages/uni-mp-toutiao/dist/uni.api.esm.js
浏览文件 @
a5f0a378
此差异已折叠。
点击以展开。
packages/uni-mp-weixin/dist/uni.api.esm.js
浏览文件 @
a5f0a378
此差异已折叠。
点击以展开。
packages/uni-push/dist/uni-push.plus.es.js
浏览文件 @
a5f0a378
Promise
.
resolve
().
then
(()
=>
{
plus
.
push
.
setAutoNotification
&&
plus
.
push
.
setAutoNotification
(
false
);
const
info
=
plus
.
push
.
getClientInfo
();
if
(
info
.
clientid
)
{
// @ts-expect-error
...
...
packages/uni-push/src/plus.ts
浏览文件 @
a5f0a378
Promise
.
resolve
().
then
(()
=>
{
plus
.
push
.
setAutoNotification
&&
plus
.
push
.
setAutoNotification
(
false
)
const
info
=
plus
.
push
.
getClientInfo
()
if
(
info
.
clientid
)
{
// @ts-expect-error
...
...
packages/uni-quickapp-webview/dist/uni.api.esm.js
浏览文件 @
a5f0a378
此差异已折叠。
点击以展开。
packages/uts-darwin-arm64/uts.darwin-arm64.node
浏览文件 @
a5f0a378
无法预览此类型文件
packages/uts-darwin-x64/uts.darwin-x64.node
浏览文件 @
a5f0a378
无法预览此类型文件
pnpm-lock.yaml
浏览文件 @
a5f0a378
此差异已折叠。
点击以展开。
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录