diff --git a/src/platforms/app-plus/service/framework/app.js b/src/platforms/app-plus/service/framework/app.js index 982249805bda4ad46e5180edb2c6e0f340ee54a9..8fdeb40d9c53e405a4ea7a93cef7a7db59edcf97 100644 --- a/src/platforms/app-plus/service/framework/app.js +++ b/src/platforms/app-plus/service/framework/app.js @@ -112,15 +112,17 @@ function initTabBar () { const onLaunchWebviewReady = function onLaunchWebviewReady () { tabBar.init(__uniConfig.tabBar, (item, index) => { - UniServiceJSBridge.emit('onTabItemTap', { - index, - text: item.text, - pagePath: item.pagePath - }) uni.switchTab({ url: '/' + item.pagePath, openType: 'switchTab', - from: 'tabBar' + from: 'tabBar', + success () { + UniServiceJSBridge.emit('onTabItemTap', { + index, + text: item.text, + pagePath: item.pagePath + }) + } }) }) }