|
@@ -5,11 +5,14 @@ import { tabbarStore } from './tabbar/store'
|
|
|
import 'abortcontroller-polyfill/dist/abortcontroller-polyfill-only'
|
|
import 'abortcontroller-polyfill/dist/abortcontroller-polyfill-only'
|
|
|
|
|
|
|
|
onLaunch((options) => {
|
|
onLaunch((options) => {
|
|
|
|
|
+ console.log('App Launch', options)
|
|
|
|
|
+})
|
|
|
|
|
+onShow((options) => {
|
|
|
|
|
+ console.log('App Show', options)
|
|
|
// 处理直接进入页面路由的情况:如h5直接输入路由、微信小程序分享后进入等
|
|
// 处理直接进入页面路由的情况:如h5直接输入路由、微信小程序分享后进入等
|
|
|
// https://github.com/unibest-tech/unibest/issues/192
|
|
// https://github.com/unibest-tech/unibest/issues/192
|
|
|
- console.log('App Launch', options)
|
|
|
|
|
if (options?.path) {
|
|
if (options?.path) {
|
|
|
- navigateToInterceptor.invoke({ url: `/${options.path}` })
|
|
|
|
|
|
|
+ navigateToInterceptor.invoke({ url: `/${options.path}`, query: options.query })
|
|
|
}
|
|
}
|
|
|
else {
|
|
else {
|
|
|
navigateToInterceptor.invoke({ url: '/' })
|
|
navigateToInterceptor.invoke({ url: '/' })
|
|
@@ -17,9 +20,6 @@ onLaunch((options) => {
|
|
|
// 处理直接进入路由非首页时,tabbarIndex 不正确的问题
|
|
// 处理直接进入路由非首页时,tabbarIndex 不正确的问题
|
|
|
tabbarStore.setAutoCurIdx(options.path)
|
|
tabbarStore.setAutoCurIdx(options.path)
|
|
|
})
|
|
})
|
|
|
-onShow((options) => {
|
|
|
|
|
- console.log('App Show', options)
|
|
|
|
|
-})
|
|
|
|
|
onHide(() => {
|
|
onHide(() => {
|
|
|
console.log('App Hide')
|
|
console.log('App Hide')
|
|
|
})
|
|
})
|