Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
m0_68066342
uni-app
提交
cf148611
U
uni-app
项目概览
m0_68066342
/
uni-app
与 Fork 源项目一致
Fork自
DCloud / uni-app
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
U
uni-app
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
cf148611
编写于
12月 24, 2019
作者:
fxy060608
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat(v3): hot reload
上级
78c79a17
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
148 addition
and
122 deletion
+148
-122
packages/uni-app-plus/dist/index.v3.js
packages/uni-app-plus/dist/index.v3.js
+76
-102
packages/webpack-uni-pages-loader/lib/platforms/app-plus/index.v3.js
...bpack-uni-pages-loader/lib/platforms/app-plus/index.v3.js
+19
-5
src/platforms/app-plus/service/api/route/navigate-back.js
src/platforms/app-plus/service/api/route/navigate-back.js
+5
-5
src/platforms/app-plus/service/framework/app.js
src/platforms/app-plus/service/framework/app.js
+31
-2
src/platforms/app-plus/service/framework/page.js
src/platforms/app-plus/service/framework/page.js
+7
-2
src/platforms/app-plus/service/framework/webview/parser/webview-style-parser.js
.../service/framework/webview/parser/webview-style-parser.js
+8
-4
src/platforms/mp-alipay/runtime/wrapper/page-parser.js
src/platforms/mp-alipay/runtime/wrapper/page-parser.js
+2
-2
未找到文件。
packages/uni-app-plus/dist/index.v3.js
浏览文件 @
cf148611
...
...
@@ -670,7 +670,6 @@ var serviceContext = (function () {
}];
var
require_context_module_0_0
=
/*#__PURE__*/
Object
.
freeze
({
__proto__
:
null
,
base64ToArrayBuffer
:
base64ToArrayBuffer
,
arrayBufferToBase64
:
arrayBufferToBase64
});
...
...
@@ -682,7 +681,6 @@ var serviceContext = (function () {
}];
var
require_context_module_0_1
=
/*#__PURE__*/
Object
.
freeze
({
__proto__
:
null
,
canIUse
:
canIUse
});
...
...
@@ -713,7 +711,6 @@ var serviceContext = (function () {
}];
var
require_context_module_0_2
=
/*#__PURE__*/
Object
.
freeze
({
__proto__
:
null
,
$on
:
$on
,
$once
:
$once
,
$off
:
$off
,
...
...
@@ -728,7 +725,6 @@ var serviceContext = (function () {
const
removeInterceptor$1
=
addInterceptor$1
;
var
require_context_module_0_3
=
/*#__PURE__*/
Object
.
freeze
({
__proto__
:
null
,
addInterceptor
:
addInterceptor$1
,
removeInterceptor
:
removeInterceptor$1
});
...
...
@@ -740,7 +736,6 @@ var serviceContext = (function () {
}];
var
require_context_module_0_4
=
/*#__PURE__*/
Object
.
freeze
({
__proto__
:
null
,
upx2px
:
upx2px
});
...
...
@@ -877,7 +872,6 @@ var serviceContext = (function () {
};
var
require_context_module_0_5
=
/*#__PURE__*/
Object
.
freeze
({
__proto__
:
null
,
canvasGetImageData
:
canvasGetImageData
,
canvasPutImageData
:
canvasPutImageData
,
canvasToTempFilePath
:
canvasToTempFilePath
,
...
...
@@ -903,7 +897,6 @@ var serviceContext = (function () {
}];
var
require_context_module_0_6
=
/*#__PURE__*/
Object
.
freeze
({
__proto__
:
null
,
createAudioContext
:
createAudioContext
,
createVideoContext
:
createVideoContext
,
createMapContext
:
createMapContext
,
...
...
@@ -923,7 +916,6 @@ var serviceContext = (function () {
};
var
require_context_module_0_7
=
/*#__PURE__*/
Object
.
freeze
({
__proto__
:
null
,
makePhoneCall
:
makePhoneCall
});
...
...
@@ -938,7 +930,6 @@ var serviceContext = (function () {
};
var
require_context_module_0_8
=
/*#__PURE__*/
Object
.
freeze
({
__proto__
:
null
,
setClipboardData
:
setClipboardData
});
...
...
@@ -953,7 +944,6 @@ var serviceContext = (function () {
};
var
require_context_module_0_9
=
/*#__PURE__*/
Object
.
freeze
({
__proto__
:
null
,
openDocument
:
openDocument
});
...
...
@@ -964,7 +954,6 @@ var serviceContext = (function () {
};
var
require_context_module_0_10
=
/*#__PURE__*/
Object
.
freeze
({
__proto__
:
null
,
chooseLocation
:
chooseLocation
});
...
...
@@ -988,7 +977,6 @@ var serviceContext = (function () {
};
var
require_context_module_0_11
=
/*#__PURE__*/
Object
.
freeze
({
__proto__
:
null
,
getLocation
:
getLocation
});
...
...
@@ -1018,7 +1006,6 @@ var serviceContext = (function () {
};
var
require_context_module_0_12
=
/*#__PURE__*/
Object
.
freeze
({
__proto__
:
null
,
openLocation
:
openLocation
});
...
...
@@ -1080,7 +1067,6 @@ var serviceContext = (function () {
};
var
require_context_module_0_13
=
/*#__PURE__*/
Object
.
freeze
({
__proto__
:
null
,
chooseImage
:
chooseImage
});
...
...
@@ -1108,7 +1094,6 @@ var serviceContext = (function () {
};
var
require_context_module_0_14
=
/*#__PURE__*/
Object
.
freeze
({
__proto__
:
null
,
chooseVideo
:
chooseVideo
});
...
...
@@ -1201,7 +1186,6 @@ var serviceContext = (function () {
};
var
require_context_module_0_15
=
/*#__PURE__*/
Object
.
freeze
({
__proto__
:
null
,
getImageInfo
:
getImageInfo
});
...
...
@@ -1237,7 +1221,6 @@ var serviceContext = (function () {
};
var
require_context_module_0_16
=
/*#__PURE__*/
Object
.
freeze
({
__proto__
:
null
,
previewImage
:
previewImage
});
...
...
@@ -1255,7 +1238,6 @@ var serviceContext = (function () {
};
var
require_context_module_0_17
=
/*#__PURE__*/
Object
.
freeze
({
__proto__
:
null
,
downloadFile
:
downloadFile
});
...
...
@@ -1358,7 +1340,6 @@ var serviceContext = (function () {
};
var
require_context_module_0_18
=
/*#__PURE__*/
Object
.
freeze
({
__proto__
:
null
,
request
:
request
});
...
...
@@ -1412,7 +1393,6 @@ var serviceContext = (function () {
};
var
require_context_module_0_19
=
/*#__PURE__*/
Object
.
freeze
({
__proto__
:
null
,
connectSocket
:
connectSocket
,
sendSocketMessage
:
sendSocketMessage
,
closeSocket
:
closeSocket
...
...
@@ -1449,7 +1429,6 @@ var serviceContext = (function () {
};
var
require_context_module_0_20
=
/*#__PURE__*/
Object
.
freeze
({
__proto__
:
null
,
uploadFile
:
uploadFile
});
...
...
@@ -1474,7 +1453,6 @@ var serviceContext = (function () {
};
var
require_context_module_0_21
=
/*#__PURE__*/
Object
.
freeze
({
__proto__
:
null
,
getProvider
:
getProvider
});
...
...
@@ -1623,7 +1601,6 @@ var serviceContext = (function () {
));
var
require_context_module_0_22
=
/*#__PURE__*/
Object
.
freeze
({
__proto__
:
null
,
redirectTo
:
redirectTo
,
reLaunch
:
reLaunch
,
navigateTo
:
navigateTo
,
...
...
@@ -1667,7 +1644,6 @@ var serviceContext = (function () {
const
removeStorageSync
=
getStorageSync
;
var
require_context_module_0_23
=
/*#__PURE__*/
Object
.
freeze
({
__proto__
:
null
,
getStorage
:
getStorage
,
getStorageSync
:
getStorageSync
,
setStorage
:
setStorage
,
...
...
@@ -1704,7 +1680,6 @@ var serviceContext = (function () {
};
var
require_context_module_0_24
=
/*#__PURE__*/
Object
.
freeze
({
__proto__
:
null
,
loadFontFace
:
loadFontFace
});
...
...
@@ -1747,7 +1722,6 @@ var serviceContext = (function () {
};
var
require_context_module_0_25
=
/*#__PURE__*/
Object
.
freeze
({
__proto__
:
null
,
setNavigationBarColor
:
setNavigationBarColor
,
setNavigationBarTitle
:
setNavigationBarTitle
});
...
...
@@ -1767,7 +1741,6 @@ var serviceContext = (function () {
};
var
require_context_module_0_26
=
/*#__PURE__*/
Object
.
freeze
({
__proto__
:
null
,
pageScrollTo
:
pageScrollTo
});
...
...
@@ -1885,7 +1858,6 @@ var serviceContext = (function () {
};
var
require_context_module_0_27
=
/*#__PURE__*/
Object
.
freeze
({
__proto__
:
null
,
showModal
:
showModal
,
showToast
:
showToast
,
showLoading
:
showLoading
,
...
...
@@ -1970,7 +1942,6 @@ var serviceContext = (function () {
};
var
require_context_module_0_28
=
/*#__PURE__*/
Object
.
freeze
({
__proto__
:
null
,
setTabBarItem
:
setTabBarItem
,
setTabBarStyle
:
setTabBarStyle
,
hideTabBar
:
hideTabBar
,
...
...
@@ -2539,7 +2510,6 @@ var serviceContext = (function () {
}
var
require_context_module_1_0
=
/*#__PURE__*/
Object
.
freeze
({
__proto__
:
null
,
base64ToArrayBuffer
:
base64ToArrayBuffer$1
,
arrayBufferToBase64
:
arrayBufferToBase64$1
});
...
...
@@ -2556,7 +2526,6 @@ var serviceContext = (function () {
}
var
require_context_module_1_1
=
/*#__PURE__*/
Object
.
freeze
({
__proto__
:
null
,
canIUse
:
canIUse$1
});
...
...
@@ -2565,7 +2534,6 @@ var serviceContext = (function () {
};
var
require_context_module_1_2
=
/*#__PURE__*/
Object
.
freeze
({
__proto__
:
null
,
interceptors
:
interceptors
,
addInterceptor
:
addInterceptor
,
removeInterceptor
:
removeInterceptor
...
...
@@ -2614,7 +2582,6 @@ var serviceContext = (function () {
}
var
require_context_module_1_3
=
/*#__PURE__*/
Object
.
freeze
({
__proto__
:
null
,
upx2px
:
upx2px$1
});
...
...
@@ -2641,7 +2608,6 @@ var serviceContext = (function () {
}
var
eventApis
=
/*#__PURE__*/
Object
.
freeze
({
__proto__
:
null
,
$on
:
$on$1
,
$off
:
$off$1
,
$once
:
$once$1
,
...
...
@@ -4310,7 +4276,6 @@ var serviceContext = (function () {
}
var
webview
=
/*#__PURE__*/
Object
.
freeze
({
__proto__
:
null
,
SCAN_ID
:
SCAN_ID
,
SCAN_PATH
:
SCAN_PATH
,
scanCode
:
scanCode
...
...
@@ -4522,7 +4487,6 @@ var serviceContext = (function () {
}
var
weex$1
=
/*#__PURE__*/
Object
.
freeze
({
__proto__
:
null
,
scanCode
:
scanCode$1
});
...
...
@@ -5288,7 +5252,6 @@ var serviceContext = (function () {
}
var
webview$1
=
/*#__PURE__*/
Object
.
freeze
({
__proto__
:
null
,
chooseLocation
:
chooseLocation$1
});
...
...
@@ -5352,7 +5315,6 @@ var serviceContext = (function () {
}
var
weex$2
=
/*#__PURE__*/
Object
.
freeze
({
__proto__
:
null
,
chooseLocation
:
chooseLocation$2
});
...
...
@@ -5473,7 +5435,6 @@ var serviceContext = (function () {
}
var
webview$2
=
/*#__PURE__*/
Object
.
freeze
({
__proto__
:
null
,
openLocation
:
openLocation$1
});
...
...
@@ -5493,7 +5454,6 @@ var serviceContext = (function () {
}
var
weex$3
=
/*#__PURE__*/
Object
.
freeze
({
__proto__
:
null
,
openLocation
:
openLocation$2
});
...
...
@@ -6592,14 +6552,14 @@ var serviceContext = (function () {
code
:
err
.
code
,
errMsg
:
'
login:fail:
'
+
err
.
message
});
},
{
scope
:
'
email
'
});
},
provider
===
'
apple
'
?
{
scope
:
'
email
'
}
:
{
});
}
// 先注销再登录
// apple登录logout之后无法重新触发获取email,fullname
if
(
provider
===
'
apple
'
)
{
login
();
}
else
{
loginServices
[
provider
].
logout
(
login
,
login
);
// apple登录logout之后无法重新触发获取email,fullname
if
(
provider
===
'
apple
'
)
{
login
();
}
else
{
loginServices
[
provider
].
logout
(
login
,
login
);
}
};
/**
...
...
@@ -6639,7 +6599,7 @@ var serviceContext = (function () {
errMsg
:
'
operateWXData:fail:请先调用 uni.login
'
})
}
loginService
.
getUserInfo
(
res
=>
{
loginService
.
getUserInfo
(
res
=>
{
let
userInfo
;
if
(
provider
===
'
weixin
'
)
{
const
wechatUserInfo
=
loginService
.
userInfo
;
...
...
@@ -6653,38 +6613,38 @@ var serviceContext = (function () {
avatarUrl
:
wechatUserInfo
.
headimgurl
,
unionId
:
wechatUserInfo
.
unionid
};
}
else
if
(
provider
===
'
apple
'
)
{
const
appleInfo
=
loginService
.
appleInfo
;
userInfo
=
{
openId
:
appleInfo
.
user
,
fullName
:
appleInfo
.
fullName
,
email
:
appleInfo
.
email
,
authorizationCode
:
appleInfo
.
authorizationCode
,
identityToken
:
appleInfo
.
identityToken
,
realUserStatus
:
appleInfo
.
realUserStatus
};
}
else
if
(
provider
===
'
apple
'
)
{
const
appleInfo
=
loginService
.
appleInfo
;
userInfo
=
{
openId
:
appleInfo
.
user
,
fullName
:
appleInfo
.
fullName
,
email
:
appleInfo
.
email
,
authorizationCode
:
appleInfo
.
authorizationCode
,
identityToken
:
appleInfo
.
identityToken
,
realUserStatus
:
appleInfo
.
realUserStatus
};
}
else
{
loginService
.
userInfo
.
openId
=
loginService
.
userInfo
.
openId
||
loginService
.
userInfo
.
openid
||
loginService
.
authResult
.
openid
;
loginService
.
userInfo
.
nickName
=
loginService
.
userInfo
.
nickName
||
loginService
.
userInfo
.
nickname
;
loginService
.
userInfo
.
avatarUrl
=
loginService
.
userInfo
.
avatarUrl
||
loginService
.
userInfo
.
avatarUrl
||
loginService
.
userInfo
.
headimgurl
;
loginService
.
userInfo
.
headimgurl
;
userInfo
=
loginService
.
userInfo
;
}
const
result
=
{
errMsg
:
'
operateWXData:ok
'
};
if
(
params
.
data
&&
params
.
data
.
api_name
===
'
webapi_getuserinfo
'
)
{
}
const
result
=
{
errMsg
:
'
operateWXData:ok
'
};
if
(
params
.
data
&&
params
.
data
.
api_name
===
'
webapi_getuserinfo
'
)
{
result
.
data
=
{
data
:
JSON
.
stringify
(
userInfo
),
rawData
:
''
,
signature
:
''
,
encryptedData
:
''
,
iv
:
''
};
}
else
{
result
.
userInfo
=
userInfo
;
}
};
}
else
{
result
.
userInfo
=
userInfo
;
}
invoke$1
(
callbackId
,
result
);
},
err
=>
{
invoke$1
(
callbackId
,
{
...
...
@@ -7178,15 +7138,15 @@ var serviceContext = (function () {
uni
.
hideToast
();
// 后退时,关闭 toast,loading
// 当前页面是 condition 进入
if
(
currentPage
.
$page
.
id
===
1
&&
__uniConfig
.
realEntryPagePath
)
{
if
(
currentPage
.
$page
.
meta
.
isQuit
)
{
quit
();
}
else
if
(
currentPage
.
$page
.
id
===
1
&&
__uniConfig
.
realEntryPagePath
)
{
// condition
uni
.
reLaunch
({
url
:
'
/
'
+
__uniConfig
.
realEntryPagePath
});
}
else
{
currentPage
.
$page
.
meta
.
isQuit
?
quit
()
:
back
(
delta
,
animationType
,
animationDuration
);
back
(
delta
,
animationType
,
animationDuration
);
}
return
{
errMsg
:
'
navigateBack:ok
'
...
...
@@ -7365,7 +7325,11 @@ var serviceContext = (function () {
const
titleNView
=
parseTitleNView
(
routeOptions
);
if
(
titleNView
)
{
if
(
id
===
1
&&
__uniConfig
.
realEntryPagePath
)
{
if
(
id
===
1
&&
__uniConfig
.
realEntryPagePath
&&
!
routeOptions
.
meta
.
isQuit
// 可能是tabBar
)
{
titleNView
.
autoBackButton
=
true
;
}
webviewStyle
.
titleNView
=
titleNView
;
...
...
@@ -7882,8 +7846,13 @@ var serviceContext = (function () {
})
{
const
routeOptions
=
JSON
.
parse
(
JSON
.
stringify
(
__uniRoutes
.
find
(
route
=>
route
.
path
===
path
)));
if
(
openType
===
'
reLaunch
'
||
pages
.
length
===
0
)
{
// pages.length===0 表示首页触发 redirectTo
if
(
openType
===
'
reLaunch
'
||
(
openType
===
'
redirect
'
&&
pages
.
length
===
0
)
// 首页 redirect
)
{
routeOptions
.
meta
.
isQuit
=
true
;
}
else
if
(
!
routeOptions
.
meta
.
isTabBar
)
{
routeOptions
.
meta
.
isQuit
=
false
;
...
...
@@ -8709,7 +8678,6 @@ var serviceContext = (function () {
var
api
=
/*#__PURE__*/
Object
.
freeze
({
__proto__
:
null
,
startPullDownRefresh
:
startPullDownRefresh
,
stopPullDownRefresh
:
stopPullDownRefresh
,
$on
:
$on$1
,
...
...
@@ -9032,7 +9000,6 @@ var serviceContext = (function () {
}
var
require_context_module_1_4
=
/*#__PURE__*/
Object
.
freeze
({
__proto__
:
null
,
createInnerAudioContext
:
createInnerAudioContext
});
...
...
@@ -9177,7 +9144,6 @@ var serviceContext = (function () {
}
var
require_context_module_1_5
=
/*#__PURE__*/
Object
.
freeze
({
__proto__
:
null
,
getBackgroundAudioManager
:
getBackgroundAudioManager
});
...
...
@@ -10036,7 +10002,6 @@ var serviceContext = (function () {
}
var
require_context_module_1_6
=
/*#__PURE__*/
Object
.
freeze
({
__proto__
:
null
,
CanvasContext
:
CanvasContext
,
createCanvasContext
:
createCanvasContext$1
,
canvasGetImageData
:
canvasGetImageData$1
,
...
...
@@ -10087,7 +10052,6 @@ var serviceContext = (function () {
}
var
require_context_module_1_7
=
/*#__PURE__*/
Object
.
freeze
({
__proto__
:
null
,
MapContext
:
MapContext
,
createMapContext
:
createMapContext$1
});
...
...
@@ -10151,7 +10115,6 @@ var serviceContext = (function () {
}
var
require_context_module_1_8
=
/*#__PURE__*/
Object
.
freeze
({
__proto__
:
null
,
VideoContext
:
VideoContext
,
createVideoContext
:
createVideoContext$1
});
...
...
@@ -10198,7 +10161,6 @@ var serviceContext = (function () {
});
var
require_context_module_1_9
=
/*#__PURE__*/
Object
.
freeze
({
__proto__
:
null
,
EditorContext
:
EditorContext
});
...
...
@@ -10243,7 +10205,6 @@ var serviceContext = (function () {
}
var
require_context_module_1_10
=
/*#__PURE__*/
Object
.
freeze
({
__proto__
:
null
,
onAccelerometerChange
:
onAccelerometerChange
,
startAccelerometer
:
startAccelerometer
,
stopAccelerometer
:
stopAccelerometer
...
...
@@ -10267,7 +10228,6 @@ var serviceContext = (function () {
const
onBLECharacteristicValueChange$1
=
on
(
'
onBLECharacteristicValueChange
'
);
var
require_context_module_1_11
=
/*#__PURE__*/
Object
.
freeze
({
__proto__
:
null
,
onBluetoothDeviceFound
:
onBluetoothDeviceFound$1
,
onBluetoothAdapterStateChange
:
onBluetoothAdapterStateChange$1
,
onBLEConnectionStateChange
:
onBLEConnectionStateChange$1
,
...
...
@@ -10315,7 +10275,6 @@ var serviceContext = (function () {
}
var
require_context_module_1_12
=
/*#__PURE__*/
Object
.
freeze
({
__proto__
:
null
,
onCompassChange
:
onCompassChange
,
startCompass
:
startCompass
,
stopCompass
:
stopCompass
...
...
@@ -10334,7 +10293,6 @@ var serviceContext = (function () {
}
var
require_context_module_1_13
=
/*#__PURE__*/
Object
.
freeze
({
__proto__
:
null
,
onNetworkStatusChange
:
onNetworkStatusChange
});
...
...
@@ -10412,7 +10370,6 @@ var serviceContext = (function () {
}
var
require_context_module_1_14
=
/*#__PURE__*/
Object
.
freeze
({
__proto__
:
null
,
getRecorderManager
:
getRecorderManager
});
...
...
@@ -10501,7 +10458,6 @@ var serviceContext = (function () {
}
var
require_context_module_1_15
=
/*#__PURE__*/
Object
.
freeze
({
__proto__
:
null
,
downloadFile
:
downloadFile$1
});
...
...
@@ -10607,7 +10563,6 @@ var serviceContext = (function () {
}
var
require_context_module_1_16
=
/*#__PURE__*/
Object
.
freeze
({
__proto__
:
null
,
request
:
request$1
});
...
...
@@ -10782,7 +10737,6 @@ var serviceContext = (function () {
}
var
require_context_module_1_17
=
/*#__PURE__*/
Object
.
freeze
({
__proto__
:
null
,
connectSocket
:
connectSocket$1
,
sendSocketMessage
:
sendSocketMessage$1
,
closeSocket
:
closeSocket$1
,
...
...
@@ -10877,7 +10831,6 @@ var serviceContext = (function () {
}
var
require_context_module_1_18
=
/*#__PURE__*/
Object
.
freeze
({
__proto__
:
null
,
uploadFile
:
uploadFile$1
});
...
...
@@ -10987,7 +10940,6 @@ var serviceContext = (function () {
}
var
require_context_module_1_19
=
/*#__PURE__*/
Object
.
freeze
({
__proto__
:
null
,
setStorage
:
setStorage$1
,
setStorageSync
:
setStorageSync$1
,
getStorage
:
getStorage$1
,
...
...
@@ -11079,7 +11031,6 @@ var serviceContext = (function () {
}
var
require_context_module_1_20
=
/*#__PURE__*/
Object
.
freeze
({
__proto__
:
null
,
createAnimation
:
createAnimation
});
...
...
@@ -11144,7 +11095,6 @@ var serviceContext = (function () {
}
var
require_context_module_1_21
=
/*#__PURE__*/
Object
.
freeze
({
__proto__
:
null
,
createIntersectionObserver
:
createIntersectionObserver
});
...
...
@@ -11285,7 +11235,6 @@ var serviceContext = (function () {
}
var
require_context_module_1_22
=
/*#__PURE__*/
Object
.
freeze
({
__proto__
:
null
,
createSelectorQuery
:
createSelectorQuery
});
...
...
@@ -11302,7 +11251,6 @@ var serviceContext = (function () {
}
var
require_context_module_1_23
=
/*#__PURE__*/
Object
.
freeze
({
__proto__
:
null
,
onKeyboardHeightChange
:
onKeyboardHeightChange
});
...
...
@@ -11327,7 +11275,6 @@ var serviceContext = (function () {
}
var
require_context_module_1_24
=
/*#__PURE__*/
Object
.
freeze
({
__proto__
:
null
,
loadFontFace
:
loadFontFace$1
});
...
...
@@ -11340,7 +11287,6 @@ var serviceContext = (function () {
}
var
require_context_module_1_25
=
/*#__PURE__*/
Object
.
freeze
({
__proto__
:
null
,
pageScrollTo
:
pageScrollTo$1
});
...
...
@@ -11377,7 +11323,6 @@ var serviceContext = (function () {
}
var
require_context_module_1_26
=
/*#__PURE__*/
Object
.
freeze
({
__proto__
:
null
,
removeTabBarBadge
:
removeTabBarBadge$1
,
showTabBarRedDot
:
showTabBarRedDot$1
,
hideTabBarRedDot
:
hideTabBarRedDot$1
,
...
...
@@ -11403,7 +11348,6 @@ var serviceContext = (function () {
}
var
require_context_module_1_27
=
/*#__PURE__*/
Object
.
freeze
({
__proto__
:
null
,
onWindowResize
:
onWindowResize
,
offWindowResize
:
offWindowResize
});
...
...
@@ -11856,6 +11800,9 @@ var serviceContext = (function () {
if
(
allowDefault
)
{
// 返回默认实现
return
defaultApp
}
console
.
error
(
'
[warn]: getApp() 操作失败,v3模式加速了首页 nvue 的启动速度,当在首页 nvue 中使用 getApp() 不一定可以获取真正的 App 对象。详情请参考:https://uniapp.dcloud.io/collocation/frame/window?id=getapp
'
);
}
function
initGlobalListeners
()
{
...
...
@@ -11944,6 +11891,31 @@ var serviceContext = (function () {
});
}
function
initHotReload
()
{
const
reloadUrl
=
weex
.
config
.
reloadUrl
;
if
(
!
reloadUrl
)
{
return
}
if
(
reloadUrl
===
__uniConfig
.
entryPagePath
)
{
return
}
const
reloadPath
=
'
/
'
+
reloadUrl
;
const
routeOptions
=
__uniRoutes
.
find
(
route
=>
route
.
path
===
reloadPath
);
if
(
!
routeOptions
)
{
return
}
if
(
routeOptions
.
meta
.
isNVue
)
{
// 暂不处理 nvue
return
}
if
(
!
routeOptions
.
meta
.
isTabBar
)
{
__uniConfig
.
realEntryPagePath
=
__uniConfig
.
realEntryPagePath
||
__uniConfig
.
entryPagePath
;
}
__uniConfig
.
entryPagePath
=
reloadUrl
;
if
(
process
.
env
.
NODE_ENV
!==
'
production
'
)
{
console
.
log
(
`[uni-app] reloadUrl(
${
reloadUrl
}
)`
);
}
}
function
registerApp
(
appVm
)
{
if
(
process
.
env
.
NODE_ENV
!==
'
production
'
)
{
console
.
log
(
`[uni-app] registerApp`
);
...
...
@@ -11962,6 +11934,8 @@ var serviceContext = (function () {
getCurrentPages
:
getCurrentPages$1
});
initHotReload
();
initTabBar
();
initGlobalListeners
();
...
...
@@ -12175,8 +12149,8 @@ var serviceContext = (function () {
hideKeyboardTimeout
=
null
;
}
}
else
{
//
仅安卓
收起键盘时通知view层失去焦点
if
(
isAndroid
)
{
//
安卓/iOS13
收起键盘时通知view层失去焦点
if
(
isAndroid
||
parseInt
(
plus
.
os
.
version
)
>=
13
)
{
hideKeyboardTimeout
=
setTimeout
(
function
()
{
hideKeyboardTimeout
=
null
;
var
pageId
=
getCurrentPageId
();
...
...
packages/webpack-uni-pages-loader/lib/platforms/app-plus/index.v3.js
浏览文件 @
cf148611
...
...
@@ -16,15 +16,28 @@ const {
const
definePages
=
require
(
'
./define-pages
'
)
const
appConfigService
=
require
(
'
./app-config-service
'
)
function
getTabBarPages
(
appJson
)
{
return
appJson
.
tabBar
&&
appJson
.
tabBar
.
list
&&
appJson
.
tabBar
.
list
.
length
&&
appJson
.
tabBar
.
list
}
function
isTabBarPage
(
pathName
,
tabBarPages
)
{
return
tabBarPages
.
find
(
item
=>
item
.
pagePath
===
pathName
)
}
function
parseEntryPagePath
(
appJson
,
manifestJson
)
{
const
argsJsonStr
=
manifestJson
.
plus
.
arguments
if
(
argsJsonStr
)
{
try
{
const
args
=
JSON
.
parse
(
argsJsonStr
)
const
pathName
=
args
.
path
||
args
.
pathName
if
(
pathName
&&
pathName
!==
appJson
.
pages
[
0
]
)
{
if
(
pathName
&&
appJson
.
pages
[
0
]
!==
pathName
)
{
appJson
.
entryPagePath
=
pathName
appJson
.
realEntryPagePath
=
appJson
.
pages
[
0
]
if
(
!
isTabBarPage
(
pathName
,
getTabBarPages
(
appJson
)))
{
appJson
.
realEntryPagePath
=
appJson
.
pages
[
0
]
}
}
}
catch
(
e
)
{}
}
...
...
@@ -32,12 +45,13 @@ function parseEntryPagePath (appJson, manifestJson) {
appJson
.
entryPagePath
=
appJson
.
pages
[
0
]
}
}
module
.
exports
=
function
(
appJson
,
manifestJson
,
{
pagesJson
,
manifest
,
normalizeNetworkTimeout
})
{
parseEntryPagePath
(
appJson
,
manifestJson
)
})
{
parseEntryPagePath
(
appJson
,
manifestJson
)
// timeout
normalizeNetworkTimeout
(
appJson
)
...
...
@@ -61,7 +75,7 @@ module.exports = function (appJson, manifestJson, {
manifestJson
.
permissions
.
UniNView
=
{
'
description
'
:
'
UniNView原生渲染
'
}
// TODO 需要考虑 condition
manifestJson
.
plus
.
launchwebview
.
id
=
'
1
'
// 首页 id 固定 为 1
// 删除首页 style 中的 uni-app 配置(不注入 app-view.js)
delete
manifestJson
.
plus
.
launchwebview
[
'
uni-app
'
]
...
...
src/platforms/app-plus/service/api/route/navigate-back.js
浏览文件 @
cf148611
...
...
@@ -100,15 +100,15 @@ export function navigateBack ({
uni
.
hideToast
()
// 后退时,关闭 toast,loading
// 当前页面是 condition 进入
if
(
currentPage
.
$page
.
id
===
1
&&
__uniConfig
.
realEntryPagePath
)
{
if
(
currentPage
.
$page
.
meta
.
isQuit
)
{
quit
()
}
else
if
(
currentPage
.
$page
.
id
===
1
&&
__uniConfig
.
realEntryPagePath
)
{
// condition
uni
.
reLaunch
({
url
:
'
/
'
+
__uniConfig
.
realEntryPagePath
})
}
else
{
currentPage
.
$page
.
meta
.
isQuit
?
quit
()
:
back
(
delta
,
animationType
,
animationDuration
)
back
(
delta
,
animationType
,
animationDuration
)
}
return
{
errMsg
:
'
navigateBack:ok
'
...
...
src/platforms/app-plus/service/framework/app.js
浏览文件 @
cf148611
...
...
@@ -49,7 +49,9 @@ export function getApp ({
if
(
allowDefault
)
{
// 返回默认实现
return
defaultApp
}
console
.
error
(
'
[warn]: getApp() 操作失败,v3模式加速了首页 nvue 的启动速度,当在首页 nvue 中使用 getApp() 不一定可以获取真正的 App 对象。详情请参考:https://uniapp.dcloud.io/collocation/frame/window?id=getapp
'
)
console
.
error
(
'
[warn]: getApp() 操作失败,v3模式加速了首页 nvue 的启动速度,当在首页 nvue 中使用 getApp() 不一定可以获取真正的 App 对象。详情请参考:https://uniapp.dcloud.io/collocation/frame/window?id=getapp
'
)
}
function
initGlobalListeners
()
{
...
...
@@ -138,6 +140,31 @@ function initTabBar () {
})
}
function
initHotReload
()
{
const
reloadUrl
=
weex
.
config
.
reloadUrl
if
(
!
reloadUrl
)
{
return
}
if
(
reloadUrl
===
__uniConfig
.
entryPagePath
)
{
return
}
const
reloadPath
=
'
/
'
+
reloadUrl
const
routeOptions
=
__uniRoutes
.
find
(
route
=>
route
.
path
===
reloadPath
)
if
(
!
routeOptions
)
{
return
}
if
(
routeOptions
.
meta
.
isNVue
)
{
// 暂不处理 nvue
return
}
if
(
!
routeOptions
.
meta
.
isTabBar
)
{
__uniConfig
.
realEntryPagePath
=
__uniConfig
.
realEntryPagePath
||
__uniConfig
.
entryPagePath
}
__uniConfig
.
entryPagePath
=
reloadUrl
if
(
process
.
env
.
NODE_ENV
!==
'
production
'
)
{
console
.
log
(
`[uni-app] reloadUrl(
${
reloadUrl
}
)`
)
}
}
export
function
registerApp
(
appVm
)
{
if
(
process
.
env
.
NODE_ENV
!==
'
production
'
)
{
console
.
log
(
`[uni-app] registerApp`
)
...
...
@@ -156,6 +183,8 @@ export function registerApp (appVm) {
getCurrentPages
})
initHotReload
()
initTabBar
()
initGlobalListeners
()
...
...
@@ -167,4 +196,4 @@ export function registerApp (appVm) {
__uniConfig
.
ready
=
true
process
.
env
.
NODE_ENV
!==
'
production
'
&&
perf
(
'
registerApp
'
)
}
}
src/platforms/app-plus/service/framework/page.js
浏览文件 @
cf148611
...
...
@@ -32,8 +32,13 @@ export function registerPage ({
})
{
const
routeOptions
=
JSON
.
parse
(
JSON
.
stringify
(
__uniRoutes
.
find
(
route
=>
route
.
path
===
path
)))
if
(
openType
===
'
reLaunch
'
||
pages
.
length
===
0
)
{
// pages.length===0 表示首页触发 redirectTo
if
(
openType
===
'
reLaunch
'
||
(
openType
===
'
redirect
'
&&
pages
.
length
===
0
)
// 首页 redirect
)
{
routeOptions
.
meta
.
isQuit
=
true
}
else
if
(
!
routeOptions
.
meta
.
isTabBar
)
{
routeOptions
.
meta
.
isQuit
=
false
...
...
src/platforms/app-plus/service/framework/webview/parser/webview-style-parser.js
浏览文件 @
cf148611
...
...
@@ -4,8 +4,8 @@ import {
import
{
parsePullToRefresh
}
from
'
./pull-to-refresh-parser
'
}
from
'
./pull-to-refresh-parser
'
import
{
parseStyleUnit
}
from
'
./style-unit-parser
'
...
...
@@ -44,7 +44,11 @@ export function parseWebviewStyle (id, path, routeOptions = {}) {
const
titleNView
=
parseTitleNView
(
routeOptions
)
if
(
titleNView
)
{
if
(
id
===
1
&&
__uniConfig
.
realEntryPagePath
)
{
if
(
id
===
1
&&
__uniConfig
.
realEntryPagePath
&&
!
routeOptions
.
meta
.
isQuit
// 可能是tabBar
)
{
titleNView
.
autoBackButton
=
true
}
webviewStyle
.
titleNView
=
titleNView
...
...
@@ -74,4 +78,4 @@ export function parseWebviewStyle (id, path, routeOptions = {}) {
}
return
webviewStyle
}
}
src/platforms/mp-alipay/runtime/wrapper/page-parser.js
浏览文件 @
cf148611
...
...
@@ -67,8 +67,8 @@ export default function parsePage (vuePageOptions) {
},
events
:
{
// 支付宝小程序有些页面事件只能放在events下
onBack
()
{
this
.
$vm
.
__call_hook
(
'
onBackPress
'
);
onBack
()
{
this
.
$vm
.
__call_hook
(
'
onBackPress
'
)
}
},
__r
:
handleRef
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录