Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
DCloud
uni-app
提交
f117b2b4
U
uni-app
项目概览
DCloud
/
uni-app
2 个月 前同步成功
通知
717
Star
38705
Fork
3642
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
7
列表
看板
标记
里程碑
合并请求
1
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
U
uni-app
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
7
Issue
7
列表
看板
标记
里程碑
合并请求
1
合并请求
1
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
f117b2b4
编写于
1月 23, 2021
作者:
fxy060608
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
build:runtime
上级
a2be5da5
变更
10
展开全部
显示空白变更内容
内联
并排
Showing
10 changed file
with
227 addition
and
104 deletion
+227
-104
packages/uni-app-plus/dist/index.js
packages/uni-app-plus/dist/index.js
+1
-1
packages/uni-mp-alipay/dist/index.js
packages/uni-mp-alipay/dist/index.js
+73
-72
packages/uni-mp-baidu/dist/index.js
packages/uni-mp-baidu/dist/index.js
+37
-6
packages/uni-mp-kuaishou/dist/index.js
packages/uni-mp-kuaishou/dist/index.js
+38
-2
packages/uni-mp-qq/dist/index.js
packages/uni-mp-qq/dist/index.js
+1
-1
packages/uni-mp-toutiao/dist/index.js
packages/uni-mp-toutiao/dist/index.js
+37
-1
packages/uni-mp-weixin/dist/index.js
packages/uni-mp-weixin/dist/index.js
+37
-18
packages/uni-quickapp-native/dist/vue.dev.js
packages/uni-quickapp-native/dist/vue.dev.js
+1
-1
packages/uni-quickapp-native/dist/vue.prod.js
packages/uni-quickapp-native/dist/vue.prod.js
+1
-1
packages/uni-quickapp-webview/dist/index.js
packages/uni-quickapp-webview/dist/index.js
+1
-1
未找到文件。
packages/uni-app-plus/dist/index.js
浏览文件 @
f117b2b4
...
@@ -231,7 +231,7 @@ const promiseInterceptor = {
...
@@ -231,7 +231,7 @@ const promiseInterceptor = {
};
};
const
SYNC_API_RE
=
const
SYNC_API_RE
=
/^
\$
|sendNativeEvent|restoreGlobal|getCurrentSubNVue|getMenuButtonBoundingClientRect|^report|interceptors|Interceptor$|getSubNVueById|requireNativePlugin|upx2px|hideKeyboard|canIUse|^create|Sync$|Manager$|base64ToArrayBuffer|arrayBufferToBase64/
;
/^
\$
|
Window$|WindowStyle$|
sendNativeEvent|restoreGlobal|getCurrentSubNVue|getMenuButtonBoundingClientRect|^report|interceptors|Interceptor$|getSubNVueById|requireNativePlugin|upx2px|hideKeyboard|canIUse|^create|Sync$|Manager$|base64ToArrayBuffer|arrayBufferToBase64/
;
const
CONTEXT_API_RE
=
/^create|Manager$/
;
const
CONTEXT_API_RE
=
/^create|Manager$/
;
...
...
packages/uni-mp-alipay/dist/index.js
浏览文件 @
f117b2b4
import
{
v4
}
from
'
uuid
'
;
import
Vue
from
'
vue
'
;
import
Vue
from
'
vue
'
;
const
_toString
=
Object
.
prototype
.
toString
;
const
_toString
=
Object
.
prototype
.
toString
;
...
@@ -231,7 +232,7 @@ const promiseInterceptor = {
...
@@ -231,7 +232,7 @@ const promiseInterceptor = {
};
};
const
SYNC_API_RE
=
const
SYNC_API_RE
=
/^
\$
|sendNativeEvent|restoreGlobal|getCurrentSubNVue|getMenuButtonBoundingClientRect|^report|interceptors|Interceptor$|getSubNVueById|requireNativePlugin|upx2px|hideKeyboard|canIUse|^create|Sync$|Manager$|base64ToArrayBuffer|arrayBufferToBase64/
;
/^
\$
|
Window$|WindowStyle$|
sendNativeEvent|restoreGlobal|getCurrentSubNVue|getMenuButtonBoundingClientRect|^report|interceptors|Interceptor$|getSubNVueById|requireNativePlugin|upx2px|hideKeyboard|canIUse|^create|Sync$|Manager$|base64ToArrayBuffer|arrayBufferToBase64/
;
const
CONTEXT_API_RE
=
/^create|Manager$/
;
const
CONTEXT_API_RE
=
/^create|Manager$/
;
...
@@ -493,6 +494,67 @@ var redirectTo = {
...
@@ -493,6 +494,67 @@ var redirectTo = {
}
}
};
};
function
setStorageSync
(
key
,
data
)
{
return
my
.
setStorageSync
({
key
,
data
})
}
function
getStorageSync
(
key
)
{
const
result
=
my
.
getStorageSync
({
key
});
// 支付宝平台会返回一个 success 值,但是目前测试的结果这个始终是 true。当没有存储数据的时候,其它平台会返回空字符串。
return
result
.
data
!==
null
?
result
.
data
:
''
}
function
removeStorageSync
(
key
)
{
return
my
.
removeStorageSync
({
key
})
}
const
UUID_KEY
=
'
__DC_UUID
'
;
let
uuid
;
function
addUuid
(
result
)
{
uuid
=
uuid
||
getStorageSync
(
UUID_KEY
);
if
(
!
uuid
)
{
uuid
=
v4
();
my
.
setStorage
({
key
:
UUID_KEY
,
data
:
uuid
});
}
result
.
uuid
=
uuid
;
}
function
addSafeAreaInsets
(
result
)
{
if
(
result
.
safeArea
)
{
const
safeArea
=
result
.
safeArea
;
result
.
safeAreaInsets
=
{
top
:
safeArea
.
top
,
left
:
safeArea
.
left
,
right
:
result
.
windowWidth
-
safeArea
.
right
,
bottom
:
result
.
windowHeight
-
safeArea
.
bottom
};
}
}
function
normalizePlatform
(
result
)
{
let
platform
=
result
.
platform
?
result
.
platform
.
toLowerCase
()
:
'
devtools
'
;
if
(
!~
[
'
android
'
,
'
ios
'
].
indexOf
(
platform
))
{
platform
=
'
devtools
'
;
}
result
.
platform
=
platform
;
}
var
getSystemInfo
=
{
returnValue
:
function
(
result
)
{
addUuid
(
result
);
addSafeAreaInsets
(
result
);
normalizePlatform
(
result
);
}
};
// 不支持的 API 列表
// 不支持的 API 列表
const
todos
=
[
const
todos
=
[
'
preloadPage
'
,
'
preloadPage
'
,
...
@@ -562,14 +624,6 @@ function _handleNetworkInfo (result) {
...
@@ -562,14 +624,6 @@ function _handleNetworkInfo (result) {
return
{}
return
{}
}
}
function
_handleSystemInfo
(
result
)
{
let
platform
=
result
.
platform
?
result
.
platform
.
toLowerCase
()
:
'
devtools
'
;
if
(
!~
[
'
android
'
,
'
ios
'
].
indexOf
(
platform
))
{
platform
=
'
devtools
'
;
}
result
.
platform
=
platform
;
}
const
protocols
=
{
// 需要做转换的 API 列表
const
protocols
=
{
// 需要做转换的 API 列表
navigateTo
,
navigateTo
,
redirectTo
,
redirectTo
,
...
@@ -915,12 +969,8 @@ const protocols = { // 需要做转换的 API 列表
...
@@ -915,12 +969,8 @@ const protocols = { // 需要做转换的 API 列表
stopGyroscope
:
{
stopGyroscope
:
{
name
:
'
offGyroscopeChange
'
name
:
'
offGyroscopeChange
'
},
},
getSystemInfo
:
{
getSystemInfo
:
getSystemInfo
,
returnValue
:
_handleSystemInfo
getSystemInfoSync
:
getSystemInfo
,
},
getSystemInfoSync
:
{
returnValue
:
_handleSystemInfo
},
// 文档没提到,但是实测可用。
// 文档没提到,但是实测可用。
canvasToTempFilePath
:
{
canvasToTempFilePath
:
{
returnValue
(
result
)
{
returnValue
(
result
)
{
...
@@ -1245,25 +1295,6 @@ function createMediaQueryObserver () {
...
@@ -1245,25 +1295,6 @@ function createMediaQueryObserver () {
return
mediaQueryObserver
return
mediaQueryObserver
}
}
function
setStorageSync
(
key
,
data
)
{
return
my
.
setStorageSync
({
key
,
data
})
}
function
getStorageSync
(
key
)
{
const
result
=
my
.
getStorageSync
({
key
});
// 支付宝平台会返回一个 success 值,但是目前测试的结果这个始终是 true。当没有存储数据的时候,其它平台会返回空字符串。
return
result
.
data
!==
null
?
result
.
data
:
''
}
function
removeStorageSync
(
key
)
{
return
my
.
removeStorageSync
({
key
})
}
function
startGyroscope
(
params
)
{
function
startGyroscope
(
params
)
{
if
(
hasOwn
(
params
,
'
interval
'
))
{
if
(
hasOwn
(
params
,
'
interval
'
))
{
console
.
warn
(
'
支付宝小程序 startGyroscope暂不支持interval
'
);
console
.
warn
(
'
支付宝小程序 startGyroscope暂不支持interval
'
);
...
@@ -1349,13 +1380,13 @@ function createIntersectionObserver (component, options) {
...
@@ -1349,13 +1380,13 @@ function createIntersectionObserver (component, options) {
var
api
=
/*#__PURE__*/
Object
.
freeze
({
var
api
=
/*#__PURE__*/
Object
.
freeze
({
__proto__
:
null
,
__proto__
:
null
,
setStorageSync
:
setStorageSync
,
getStorageSync
:
getStorageSync
,
removeStorageSync
:
removeStorageSync
,
startGyroscope
:
startGyroscope
,
startGyroscope
:
startGyroscope
,
createSelectorQuery
:
createSelectorQuery
,
createSelectorQuery
:
createSelectorQuery
,
createIntersectionObserver
:
createIntersectionObserver
,
createIntersectionObserver
:
createIntersectionObserver
,
createMediaQueryObserver
:
createMediaQueryObserver
createMediaQueryObserver
:
createMediaQueryObserver
,
setStorageSync
:
setStorageSync
,
getStorageSync
:
getStorageSync
,
removeStorageSync
:
removeStorageSync
});
});
const
PAGE_EVENT_HOOKS
=
[
const
PAGE_EVENT_HOOKS
=
[
...
@@ -1518,25 +1549,9 @@ function initBehaviors (vueOptions, initBehavior) {
...
@@ -1518,25 +1549,9 @@ function initBehaviors (vueOptions, initBehavior) {
}
}
});
});
}
}
if
(
isPlainObject
(
vueExtends
)
&&
vueExtends
.
props
)
{
{
// alipay 重复定义props会报错,下边的代码对于其他平台也没有意义,保险起见,仅对alipay做处理
behaviors
.
push
(
return
initBehavior
({
properties
:
initProperties
(
vueExtends
.
props
,
true
)
})
);
}
if
(
Array
.
isArray
(
vueMixins
))
{
vueMixins
.
forEach
(
vueMixin
=>
{
if
(
isPlainObject
(
vueMixin
)
&&
vueMixin
.
props
)
{
behaviors
.
push
(
initBehavior
({
properties
:
initProperties
(
vueMixin
.
props
,
true
)
})
);
}
});
}
}
return
behaviors
}
}
function
parsePropType
(
key
,
type
,
defaultValue
,
file
)
{
function
parsePropType
(
key
,
type
,
defaultValue
,
file
)
{
...
@@ -2069,20 +2084,6 @@ function initRefs () {
...
@@ -2069,20 +2084,6 @@ function initRefs () {
}
}
function
initBehavior
({
properties
})
{
const
props
=
{};
Object
.
keys
(
properties
).
forEach
(
key
=>
{
props
[
key
]
=
properties
[
key
].
value
;
});
return
{
props
}
}
function
initRelation
(
detail
)
{
function
initRelation
(
detail
)
{
this
.
props
.
onVueInit
(
detail
);
this
.
props
.
onVueInit
(
detail
);
}
}
...
@@ -2393,7 +2394,7 @@ function parsePage (vuePageOptions) {
...
@@ -2393,7 +2394,7 @@ function parsePage (vuePageOptions) {
const
[
VueComponent
,
vueOptions
]
=
initVueComponent
(
Vue
,
vuePageOptions
);
const
[
VueComponent
,
vueOptions
]
=
initVueComponent
(
Vue
,
vuePageOptions
);
const
pageOptions
=
{
const
pageOptions
=
{
mixins
:
initBehaviors
(
vueOptions
,
initBehavior
),
mixins
:
initBehaviors
(
vueOptions
),
data
:
initData
(
vueOptions
,
Vue
.
prototype
),
data
:
initData
(
vueOptions
,
Vue
.
prototype
),
onLoad
(
query
)
{
onLoad
(
query
)
{
const
properties
=
this
.
props
;
const
properties
=
this
.
props
;
...
@@ -2531,7 +2532,7 @@ function parseComponent (vueComponentOptions) {
...
@@ -2531,7 +2532,7 @@ function parseComponent (vueComponentOptions) {
});
});
const
componentOptions
=
{
const
componentOptions
=
{
mixins
:
initBehaviors
(
vueOptions
,
initBehavior
),
mixins
:
initBehaviors
(
vueOptions
),
data
:
initData
(
vueOptions
,
Vue
.
prototype
),
data
:
initData
(
vueOptions
,
Vue
.
prototype
),
props
,
props
,
didMount
()
{
didMount
()
{
...
...
packages/uni-mp-baidu/dist/index.js
浏览文件 @
f117b2b4
import
{
v4
}
from
'
uuid
'
;
import
Vue
from
'
vue
'
;
import
Vue
from
'
vue
'
;
const
_toString
=
Object
.
prototype
.
toString
;
const
_toString
=
Object
.
prototype
.
toString
;
...
@@ -231,7 +232,7 @@ const promiseInterceptor = {
...
@@ -231,7 +232,7 @@ const promiseInterceptor = {
};
};
const
SYNC_API_RE
=
const
SYNC_API_RE
=
/^
\$
|sendNativeEvent|restoreGlobal|getCurrentSubNVue|getMenuButtonBoundingClientRect|^report|interceptors|Interceptor$|getSubNVueById|requireNativePlugin|upx2px|hideKeyboard|canIUse|^create|Sync$|Manager$|base64ToArrayBuffer|arrayBufferToBase64/
;
/^
\$
|
Window$|WindowStyle$|
sendNativeEvent|restoreGlobal|getCurrentSubNVue|getMenuButtonBoundingClientRect|^report|interceptors|Interceptor$|getSubNVueById|requireNativePlugin|upx2px|hideKeyboard|canIUse|^create|Sync$|Manager$|base64ToArrayBuffer|arrayBufferToBase64/
;
const
CONTEXT_API_RE
=
/^create|Manager$/
;
const
CONTEXT_API_RE
=
/^create|Manager$/
;
...
@@ -527,6 +528,39 @@ var previewImage = {
...
@@ -527,6 +528,39 @@ var previewImage = {
}
}
};
};
const
UUID_KEY
=
'
__DC_UUID
'
;
let
uuid
;
function
addUuid
(
result
)
{
uuid
=
uuid
||
swan
.
getStorageSync
(
UUID_KEY
);
if
(
!
uuid
)
{
uuid
=
v4
();
swan
.
setStorage
({
key
:
UUID_KEY
,
data
:
uuid
});
}
result
.
uuid
=
uuid
;
}
function
addSafeAreaInsets
(
result
)
{
if
(
result
.
safeArea
)
{
const
safeArea
=
result
.
safeArea
;
result
.
safeAreaInsets
=
{
top
:
safeArea
.
top
,
left
:
safeArea
.
left
,
right
:
result
.
windowWidth
-
safeArea
.
right
,
bottom
:
result
.
windowHeight
-
safeArea
.
bottom
};
}
}
var
getSystemInfo
=
{
returnValue
:
function
(
result
)
{
addUuid
(
result
);
addSafeAreaInsets
(
result
);
}
};
// 不支持的 API 列表
// 不支持的 API 列表
const
todos
=
[
const
todos
=
[
'
preloadPage
'
,
'
preloadPage
'
,
...
@@ -611,6 +645,8 @@ const protocols = {
...
@@ -611,6 +645,8 @@ const protocols = {
navigateTo
,
navigateTo
,
redirectTo
,
redirectTo
,
previewImage
,
previewImage
,
getSystemInfo
,
getSystemInfoSync
:
getSystemInfo
,
getRecorderManager
:
{
getRecorderManager
:
{
returnValue
(
fromRet
)
{
returnValue
(
fromRet
)
{
fromRet
.
onFrameRecorded
=
createTodoMethod
(
'
RecorderManager
'
,
'
onFrameRecorded
'
);
fromRet
.
onFrameRecorded
=
createTodoMethod
(
'
RecorderManager
'
,
'
onFrameRecorded
'
);
...
@@ -1995,11 +2031,6 @@ function parsePage (vuePageOptions) {
...
@@ -1995,11 +2031,6 @@ function parsePage (vuePageOptions) {
initRelation
initRelation
});
});
const
onInit
=
(
vuePageOptions
.
default
||
vuePageOptions
).
onInit
;
if
(
onInit
)
{
pageOptions
.
methods
.
onInit
=
onInit
;
}
// 纠正百度小程序生命周期methods:onShow在methods:onLoad之前触发的问题
// 纠正百度小程序生命周期methods:onShow在methods:onLoad之前触发的问题
pageOptions
.
methods
.
onShow
=
function
onShow
()
{
pageOptions
.
methods
.
onShow
=
function
onShow
()
{
if
(
this
.
$vm
&&
this
.
$vm
.
$mp
.
query
)
{
if
(
this
.
$vm
&&
this
.
$vm
.
$mp
.
query
)
{
...
...
packages/uni-mp-kuaishou/dist/index.js
浏览文件 @
f117b2b4
import
{
v4
}
from
'
uuid
'
;
import
Vue
from
'
vue
'
;
import
Vue
from
'
vue
'
;
const
_toString
=
Object
.
prototype
.
toString
;
const
_toString
=
Object
.
prototype
.
toString
;
...
@@ -231,7 +232,7 @@ const promiseInterceptor = {
...
@@ -231,7 +232,7 @@ const promiseInterceptor = {
};
};
const
SYNC_API_RE
=
const
SYNC_API_RE
=
/^
\$
|sendNativeEvent|restoreGlobal|getCurrentSubNVue|getMenuButtonBoundingClientRect|^report|interceptors|Interceptor$|getSubNVueById|requireNativePlugin|upx2px|hideKeyboard|canIUse|^create|Sync$|Manager$|base64ToArrayBuffer|arrayBufferToBase64/
;
/^
\$
|
Window$|WindowStyle$|
sendNativeEvent|restoreGlobal|getCurrentSubNVue|getMenuButtonBoundingClientRect|^report|interceptors|Interceptor$|getSubNVueById|requireNativePlugin|upx2px|hideKeyboard|canIUse|^create|Sync$|Manager$|base64ToArrayBuffer|arrayBufferToBase64/
;
const
CONTEXT_API_RE
=
/^create|Manager$/
;
const
CONTEXT_API_RE
=
/^create|Manager$/
;
...
@@ -527,10 +528,45 @@ var previewImage = {
...
@@ -527,10 +528,45 @@ var previewImage = {
}
}
};
};
const
UUID_KEY
=
'
__DC_UUID
'
;
let
uuid
;
function
addUuid
(
result
)
{
uuid
=
uuid
||
ks
.
getStorageSync
(
UUID_KEY
);
if
(
!
uuid
)
{
uuid
=
v4
();
ks
.
setStorage
({
key
:
UUID_KEY
,
data
:
uuid
});
}
result
.
uuid
=
uuid
;
}
function
addSafeAreaInsets
(
result
)
{
if
(
result
.
safeArea
)
{
const
safeArea
=
result
.
safeArea
;
result
.
safeAreaInsets
=
{
top
:
safeArea
.
top
,
left
:
safeArea
.
left
,
right
:
result
.
windowWidth
-
safeArea
.
right
,
bottom
:
result
.
windowHeight
-
safeArea
.
bottom
};
}
}
var
getSystemInfo
=
{
returnValue
:
function
(
result
)
{
addUuid
(
result
);
addSafeAreaInsets
(
result
);
}
};
const
protocols
=
{
const
protocols
=
{
navigateTo
,
navigateTo
,
redirectTo
,
redirectTo
,
previewImage
previewImage
,
getSystemInfo
,
getSystemInfoSync
:
getSystemInfo
};
};
const
todos
=
[
const
todos
=
[
'
vibrate
'
'
vibrate
'
...
...
packages/uni-mp-qq/dist/index.js
浏览文件 @
f117b2b4
...
@@ -232,7 +232,7 @@ const promiseInterceptor = {
...
@@ -232,7 +232,7 @@ const promiseInterceptor = {
};
};
const
SYNC_API_RE
=
const
SYNC_API_RE
=
/^
\$
|sendNativeEvent|restoreGlobal|getCurrentSubNVue|getMenuButtonBoundingClientRect|^report|interceptors|Interceptor$|getSubNVueById|requireNativePlugin|upx2px|hideKeyboard|canIUse|^create|Sync$|Manager$|base64ToArrayBuffer|arrayBufferToBase64/
;
/^
\$
|
Window$|WindowStyle$|
sendNativeEvent|restoreGlobal|getCurrentSubNVue|getMenuButtonBoundingClientRect|^report|interceptors|Interceptor$|getSubNVueById|requireNativePlugin|upx2px|hideKeyboard|canIUse|^create|Sync$|Manager$|base64ToArrayBuffer|arrayBufferToBase64/
;
const
CONTEXT_API_RE
=
/^create|Manager$/
;
const
CONTEXT_API_RE
=
/^create|Manager$/
;
...
...
packages/uni-mp-toutiao/dist/index.js
浏览文件 @
f117b2b4
import
{
v4
}
from
'
uuid
'
;
import
Vue
from
'
vue
'
;
import
Vue
from
'
vue
'
;
const
_toString
=
Object
.
prototype
.
toString
;
const
_toString
=
Object
.
prototype
.
toString
;
...
@@ -231,7 +232,7 @@ const promiseInterceptor = {
...
@@ -231,7 +232,7 @@ const promiseInterceptor = {
};
};
const
SYNC_API_RE
=
const
SYNC_API_RE
=
/^
\$
|sendNativeEvent|restoreGlobal|getCurrentSubNVue|getMenuButtonBoundingClientRect|^report|interceptors|Interceptor$|getSubNVueById|requireNativePlugin|upx2px|hideKeyboard|canIUse|^create|Sync$|Manager$|base64ToArrayBuffer|arrayBufferToBase64/
;
/^
\$
|
Window$|WindowStyle$|
sendNativeEvent|restoreGlobal|getCurrentSubNVue|getMenuButtonBoundingClientRect|^report|interceptors|Interceptor$|getSubNVueById|requireNativePlugin|upx2px|hideKeyboard|canIUse|^create|Sync$|Manager$|base64ToArrayBuffer|arrayBufferToBase64/
;
const
CONTEXT_API_RE
=
/^create|Manager$/
;
const
CONTEXT_API_RE
=
/^create|Manager$/
;
...
@@ -527,6 +528,39 @@ var previewImage = {
...
@@ -527,6 +528,39 @@ var previewImage = {
}
}
};
};
const
UUID_KEY
=
'
__DC_UUID
'
;
let
uuid
;
function
addUuid
(
result
)
{
uuid
=
uuid
||
tt
.
getStorageSync
(
UUID_KEY
);
if
(
!
uuid
)
{
uuid
=
v4
();
tt
.
setStorage
({
key
:
UUID_KEY
,
data
:
uuid
});
}
result
.
uuid
=
uuid
;
}
function
addSafeAreaInsets
(
result
)
{
if
(
result
.
safeArea
)
{
const
safeArea
=
result
.
safeArea
;
result
.
safeAreaInsets
=
{
top
:
safeArea
.
top
,
left
:
safeArea
.
left
,
right
:
result
.
windowWidth
-
safeArea
.
right
,
bottom
:
result
.
windowHeight
-
safeArea
.
bottom
};
}
}
var
getSystemInfo
=
{
returnValue
:
function
(
result
)
{
addUuid
(
result
);
addSafeAreaInsets
(
result
);
}
};
// 不支持的 API 列表
// 不支持的 API 列表
const
todos
=
[
const
todos
=
[
'
preloadPage
'
,
'
preloadPage
'
,
...
@@ -629,6 +663,8 @@ const protocols = {
...
@@ -629,6 +663,8 @@ const protocols = {
navigateTo
,
navigateTo
,
redirectTo
,
redirectTo
,
previewImage
,
previewImage
,
getSystemInfo
,
getSystemInfoSync
:
getSystemInfo
,
connectSocket
:
{
connectSocket
:
{
args
:
{
args
:
{
method
:
false
method
:
false
...
...
packages/uni-mp-weixin/dist/index.js
浏览文件 @
f117b2b4
import
{
v4
}
from
'
uuid
'
;
import
Vue
from
'
vue
'
;
import
Vue
from
'
vue
'
;
const
_toString
=
Object
.
prototype
.
toString
;
const
_toString
=
Object
.
prototype
.
toString
;
...
@@ -231,7 +232,7 @@ const promiseInterceptor = {
...
@@ -231,7 +232,7 @@ const promiseInterceptor = {
};
};
const
SYNC_API_RE
=
const
SYNC_API_RE
=
/^
\$
|sendNativeEvent|restoreGlobal|getCurrentSubNVue|getMenuButtonBoundingClientRect|^report|interceptors|Interceptor$|getSubNVueById|requireNativePlugin|upx2px|hideKeyboard|canIUse|^create|Sync$|Manager$|base64ToArrayBuffer|arrayBufferToBase64/
;
/^
\$
|
Window$|WindowStyle$|
sendNativeEvent|restoreGlobal|getCurrentSubNVue|getMenuButtonBoundingClientRect|^report|interceptors|Interceptor$|getSubNVueById|requireNativePlugin|upx2px|hideKeyboard|canIUse|^create|Sync$|Manager$|base64ToArrayBuffer|arrayBufferToBase64/
;
const
CONTEXT_API_RE
=
/^create|Manager$/
;
const
CONTEXT_API_RE
=
/^create|Manager$/
;
...
@@ -422,7 +423,19 @@ var previewImage = {
...
@@ -422,7 +423,19 @@ var previewImage = {
}
}
};
};
// import navigateTo from 'uni-helpers/navigate-to'
const
UUID_KEY
=
'
__DC_UUID
'
;
let
uuid
;
function
addUuid
(
result
)
{
uuid
=
uuid
||
wx
.
getStorageSync
(
UUID_KEY
);
if
(
!
uuid
)
{
uuid
=
v4
();
wx
.
setStorage
({
key
:
UUID_KEY
,
data
:
uuid
});
}
result
.
uuid
=
uuid
;
}
function
addSafeAreaInsets
(
result
)
{
function
addSafeAreaInsets
(
result
)
{
if
(
result
.
safeArea
)
{
if
(
result
.
safeArea
)
{
...
@@ -435,16 +448,22 @@ function addSafeAreaInsets (result) {
...
@@ -435,16 +448,22 @@ function addSafeAreaInsets (result) {
};
};
}
}
}
}
var
getSystemInfo
=
{
returnValue
:
function
(
result
)
{
addUuid
(
result
);
addSafeAreaInsets
(
result
);
}
};
// import navigateTo from 'uni-helpers/navigate-to'
const
protocols
=
{
const
protocols
=
{
redirectTo
,
redirectTo
,
// navigateTo, // 由于在微信开发者工具的页面参数,会显示__id__参数,因此暂时关闭mp-weixin对于navigateTo的AOP
// navigateTo, // 由于在微信开发者工具的页面参数,会显示__id__参数,因此暂时关闭mp-weixin对于navigateTo的AOP
previewImage
,
previewImage
,
getSystemInfo
:
{
getSystemInfo
,
returnValue
:
addSafeAreaInsets
getSystemInfoSync
:
getSystemInfo
},
getSystemInfoSync
:
{
returnValue
:
addSafeAreaInsets
}
};
};
const
todos
=
[
const
todos
=
[
'
vibrate
'
,
'
vibrate
'
,
...
...
packages/uni-quickapp-native/dist/vue.dev.js
浏览文件 @
f117b2b4
此差异已折叠。
点击以展开。
packages/uni-quickapp-native/dist/vue.prod.js
浏览文件 @
f117b2b4
此差异已折叠。
点击以展开。
packages/uni-quickapp-webview/dist/index.js
浏览文件 @
f117b2b4
...
@@ -231,7 +231,7 @@ const promiseInterceptor = {
...
@@ -231,7 +231,7 @@ const promiseInterceptor = {
};
};
const
SYNC_API_RE
=
const
SYNC_API_RE
=
/^
\$
|sendNativeEvent|restoreGlobal|getCurrentSubNVue|getMenuButtonBoundingClientRect|^report|interceptors|Interceptor$|getSubNVueById|requireNativePlugin|upx2px|hideKeyboard|canIUse|^create|Sync$|Manager$|base64ToArrayBuffer|arrayBufferToBase64/
;
/^
\$
|
Window$|WindowStyle$|
sendNativeEvent|restoreGlobal|getCurrentSubNVue|getMenuButtonBoundingClientRect|^report|interceptors|Interceptor$|getSubNVueById|requireNativePlugin|upx2px|hideKeyboard|canIUse|^create|Sync$|Manager$|base64ToArrayBuffer|arrayBufferToBase64/
;
const
CONTEXT_API_RE
=
/^create|Manager$/
;
const
CONTEXT_API_RE
=
/^create|Manager$/
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录