Merge branch 'main' into login
This commit is contained in:
15
src/App.vue
15
src/App.vue
@@ -4,15 +4,18 @@ import { navigateToInterceptor } from '@/router/interceptor'
|
||||
import 'abortcontroller-polyfill/dist/abortcontroller-polyfill-only'
|
||||
|
||||
onLaunch((options) => {
|
||||
// 处理直接进入页面路由的情况:如h5直接输入路由、微信小程序分享后进入等
|
||||
// https://github.com/unibest-tech/unibest/issues/192
|
||||
console.log('App Launch options: ', options)
|
||||
const gotoPath = options?.path || ''
|
||||
|
||||
navigateToInterceptor.invoke({ url: gotoPath })
|
||||
console.log('App Launch', options)
|
||||
})
|
||||
onShow((options) => {
|
||||
console.log('App Show', options)
|
||||
// 处理直接进入页面路由的情况:如h5直接输入路由、微信小程序分享后进入等
|
||||
// https://github.com/unibest-tech/unibest/issues/192
|
||||
if (options?.path) {
|
||||
navigateToInterceptor.invoke({ url: `/${options.path}`, query: options.query })
|
||||
}
|
||||
else {
|
||||
navigateToInterceptor.invoke({ url: '/' })
|
||||
}
|
||||
})
|
||||
onHide(() => {
|
||||
console.log('App Hide')
|
||||
|
||||
Reference in New Issue
Block a user