From 3fcf8207dac24999a42ba3f271703c2f0a4b6097 Mon Sep 17 00:00:00 2001 From: wangyaqi Date: Thu, 26 Dec 2019 12:21:45 +0800 Subject: [PATCH] =?UTF-8?q?fix(v3):=20=E4=BF=AE=E5=A4=8Dpages.json=20?= =?UTF-8?q?=E5=86=85=E9=85=8D=E7=BD=AE=E9=A1=B5=E9=9D=A2=E5=8A=A8=E7=94=BB?= =?UTF-8?q?=E4=B8=8D=E7=94=9F=E6=95=88=E7=9A=84Bug=20askId:85654?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../app-plus/service/api/route/navigate-to.js | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/src/platforms/app-plus/service/api/route/navigate-to.js b/src/platforms/app-plus/service/api/route/navigate-to.js index 68a5973f07..d7523f44b4 100644 --- a/src/platforms/app-plus/service/api/route/navigate-to.js +++ b/src/platforms/app-plus/service/api/route/navigate-to.js @@ -1,6 +1,11 @@ import { parseQuery -} from 'uni-shared' +} from 'uni-shared' + +import { + ANI_SHOW, + ANI_DURATION +} from '../../constants' import { showWebview @@ -54,7 +59,15 @@ export function navigateTo ({ 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({ -- GitLab