diff --git a/src/platforms/app-plus-nvue/service/api/route/navigate-back.js b/src/platforms/app-plus-nvue/service/api/route/navigate-back.js index e9ca66fa194fc9986bf6c184e14a36bc043cc458..5c7636aeeec96c26b950ef259df1e101334b08d0 100644 --- a/src/platforms/app-plus-nvue/service/api/route/navigate-back.js +++ b/src/platforms/app-plus-nvue/service/api/route/navigate-back.js @@ -79,7 +79,7 @@ export function navigateBack ({ animationType, animationDuration }) { - const pages = getCurrentPages() + const pages = getCurrentPages() const currentPage = pages[pages.length - 1] if ( @@ -91,11 +91,15 @@ export function navigateBack ({ }) ) { return - } + } uni.hideToast() // 后退时,关闭 toast,loading currentPage.$page.meta.isQuit ? quit() : back(delta, animationType, animationDuration) -} + + return { + errMsg: 'navigateBack:ok' + } +} diff --git a/src/platforms/app-plus-nvue/service/api/route/navigate-to.js b/src/platforms/app-plus-nvue/service/api/route/navigate-to.js index 2e32edefb7937fe5d871682528585c69a10f5d60..e9db3d0d7d0e6865b9a4ceecb4014fbc98f70a45 100644 --- a/src/platforms/app-plus-nvue/service/api/route/navigate-to.js +++ b/src/platforms/app-plus-nvue/service/api/route/navigate-to.js @@ -7,14 +7,15 @@ import { } from './util' import { - setStatusBarStyle + setStatusBarStyle, + invoke } from '../../bridge' export function navigateTo ({ url, animationType, animationDuration -}) { +}, callbackId) { const urls = url.split('?') const path = urls[0] @@ -32,8 +33,13 @@ export function navigateTo ({ openType: 'navigate' }), animationType, - animationDuration + animationDuration, + () => { + invoke(callbackId, { + errMsg: 'navigateTo:ok' + }) + } ) setStatusBarStyle() -} +} diff --git a/src/platforms/app-plus-nvue/service/api/route/re-launch.js b/src/platforms/app-plus-nvue/service/api/route/re-launch.js index 4e05a19a884ceb3468a1b970d16e2affcfad81d2..bd25baab0aa4e2e5c5569e307e0541fad1227472 100644 --- a/src/platforms/app-plus-nvue/service/api/route/re-launch.js +++ b/src/platforms/app-plus-nvue/service/api/route/re-launch.js @@ -7,14 +7,15 @@ import { } from './util' import { - setStatusBarStyle + setStatusBarStyle, + invoke } from '../../bridge' import tabBar from '../../../../app-plus/service/framework/tab-bar' export function reLaunch ({ url -}) { +}, callbackId) { const urls = url.split('?') const path = urls[0] @@ -35,7 +36,12 @@ export function reLaunch ({ openType: 'reLaunch' }), 'none', - 0 + 0, + () => { + invoke(callbackId, { + errMsg: 'reLaunch:ok' + }) + } ) pages.forEach(page => { @@ -44,4 +50,4 @@ export function reLaunch ({ }) setStatusBarStyle() -} +} diff --git a/src/platforms/app-plus-nvue/service/api/route/redirect-to.js b/src/platforms/app-plus-nvue/service/api/route/redirect-to.js index 6ba7e9ae0c3c83db645231f8e1698d14b6a8e35a..87017f3e836315589e12e8bac74425255ebfa6c7 100644 --- a/src/platforms/app-plus-nvue/service/api/route/redirect-to.js +++ b/src/platforms/app-plus-nvue/service/api/route/redirect-to.js @@ -7,12 +7,13 @@ import { } from './util' import { - setStatusBarStyle + setStatusBarStyle, + invoke } from '../../bridge' export function redirectTo ({ url -}) { +}, callbackId) { const urls = url.split('?') const path = urls[0] @@ -33,8 +34,11 @@ export function redirectTo ({ 0, () => { lastPage && lastPage.$getAppWebview().close('none') + invoke(callbackId, { + errMsg: 'redirectTo:ok' + }) } ) setStatusBarStyle() -} +} diff --git a/src/platforms/app-plus-nvue/service/api/route/switch-tab.js b/src/platforms/app-plus-nvue/service/api/route/switch-tab.js index d1e64c143497e72934b7c44ab403715f3e5330ce..79fdb52c78533da6412c21c83dc28d6bc66248af 100644 --- a/src/platforms/app-plus-nvue/service/api/route/switch-tab.js +++ b/src/platforms/app-plus-nvue/service/api/route/switch-tab.js @@ -5,7 +5,8 @@ import { } from './util' import { - setStatusBarStyle + setStatusBarStyle, + invoke } from '../../bridge' import tabBar from '../../../../app-plus/service/framework/tab-bar' @@ -13,7 +14,7 @@ import tabBar from '../../../../app-plus/service/framework/tab-bar' export function switchTab ({ url, from -}) { +}, callbackId) { const path = url.split('?')[0] tabBar.switchTab(path.slice(1)) @@ -66,8 +67,16 @@ export function switchTab ({ path, query: {}, openType: 'switchTab' - }), 'none', 0, null, 70) + }), 'none', 0, () => { + invoke(callbackId, { + errMsg: 'switchTab:ok' + }) + }, 70) + return } setStatusBarStyle() + return { + errMsg: 'switchTab:ok' + } }