You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.
<!--
* @ Author : chris
* @ Date : 2025 - 10 - 20 10 : 45 : 46
* @ LastEditors : chris
* @ LastEditTime : 2025 - 10 - 28 11 : 11 : 53
-- >
< script setup lang = "ts" >
import { onHide , onLaunch , onShow } from '@dcloudio/uni-app'
import { navigateToInterceptor } from '@/router/interceptor'
onLaunch ( ( options ) => {
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' )
} )
< / script >
< style lang = "scss" >
swiper ,
scroll - view {
flex : 1 ;
height : 100 % ;
overflow : hidden ;
}
image {
width : 100 % ;
height : 100 % ;
vertical - align : middle ;
}
< / style >