diff --git a/packages/uni-app-plus/dist/index.v3.js b/packages/uni-app-plus/dist/index.v3.js index fd9320e320c479bcd18c5a69a8850df6c08e97f8..020b236640628124b88d0ef1ef3445136e4c3789 100644 --- a/packages/uni-app-plus/dist/index.v3.js +++ b/packages/uni-app-plus/dist/index.v3.js @@ -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({ diff --git a/src/platforms/app-plus/service/api/route/navigate-back.js b/src/platforms/app-plus/service/api/route/navigate-back.js index b4904272341b853c67261a706af31eaccd0fc331..53aed3cb738e20b3f4e441f9a13f7009686747d6 100644 --- a/src/platforms/app-plus/service/api/route/navigate-back.js +++ b/src/platforms/app-plus/service/api/route/navigate-back.js @@ -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) diff --git a/src/platforms/app-plus/service/framework/page.js b/src/platforms/app-plus/service/framework/page.js index 9e571e82a483e462cda1141a0ceb23be5fdf5836..f1fbe5a33433a7cdacb8d1eba3318ea19cfb02e4 100644 --- a/src/platforms/app-plus/service/framework/page.js +++ b/src/platforms/app-plus/service/framework/page.js @@ -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) {