提交 e51e450a 编写于 作者: fxy060608's avatar fxy060608

fix(v3): condition

上级 656b9603
......@@ -7183,8 +7183,10 @@ var serviceContext = (function () {
quit();
} else if (currentPage.$page.id === 1 && __uniConfig.realEntryPagePath) {
// condition
__uniConfig.entryPagePath = __uniConfig.realEntryPagePath;
delete __uniConfig.realEntryPagePath;
uni.reLaunch({
url: '/' + __uniConfig.realEntryPagePath
url: '/' + __uniConfig.entryPagePath
});
} else {
back(delta, animationType, animationDuration);
......@@ -7890,9 +7892,9 @@ var serviceContext = (function () {
if (
openType === 'reLaunch' ||
(
openType === 'redirect' &&
!__uniConfig.realEntryPagePath &&
pages.length === 0
) // 首页 redirect
)
) {
routeOptions.meta.isQuit = true;
} else if (!routeOptions.meta.isTabBar) {
......@@ -8018,7 +8020,15 @@ var serviceContext = (function () {
animationDuration
}, callbackId) {
const urls = url.split('?');
const path = urls[0];
const path = urls[0];
const routeStyles = __uniRoutes.find(route => route.path === path).window;
const globalStyle = __uniConfig.window;
if (!animationType) {
animationType = routeStyles.animationType || globalStyle.animationType || ANI_SHOW;
}
if (!animationDuration) {
animationDuration = routeStyles.animationDuration || globalStyle.animationDuration || ANI_DURATION;
}
const query = parseQuery(urls[1] || '');
navigate(path, function () {
_navigateTo({
......
......@@ -104,8 +104,10 @@ export function navigateBack ({
quit()
} else if (currentPage.$page.id === 1 && __uniConfig.realEntryPagePath) {
// condition
__uniConfig.entryPagePath = __uniConfig.realEntryPagePath
delete __uniConfig.realEntryPagePath
uni.reLaunch({
url: '/' + __uniConfig.realEntryPagePath
url: '/' + __uniConfig.entryPagePath
})
} else {
back(delta, animationType, animationDuration)
......
......@@ -35,9 +35,9 @@ export function registerPage ({
if (
openType === 'reLaunch' ||
(
openType === 'redirect' &&
!__uniConfig.realEntryPagePath &&
pages.length === 0
) // 首页 redirect
)
) {
routeOptions.meta.isQuit = true
} else if (!routeOptions.meta.isTabBar) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册