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

feat(h5): add path and query (App.vue onLaunch,onShow) #408

上级 96786a98
...@@ -31,10 +31,13 @@ export function createAppMixin (routes, entryRoute) { ...@@ -31,10 +31,13 @@ export function createAppMixin (routes, entryRoute) {
}, },
mounted: function appMounted () { mounted: function appMounted () {
// 稍微靠后点,让 App 有机会在 mounted 事件前注册一些全局事件监听,如 UI 显示(showModal) // 稍微靠后点,让 App 有机会在 mounted 事件前注册一些全局事件监听,如 UI 显示(showModal)
callAppHook(this, 'onLaunch', { const args = {
path: this.$route.meta && this.$route.meta.pagePath,
query: this.$route.query,
scene: 1001 scene: 1001
}) }
callAppHook(this, 'onShow', {}) callAppHook(this, 'onLaunch', args)
callAppHook(this, 'onShow', args)
} }
} }
} }
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册