2025-06-04 09:00:34 +08:00
|
|
|
|
<script setup lang="ts">
|
2025-06-21 16:56:24 +08:00
|
|
|
|
import { onHide, onLaunch, onShow } from '@dcloudio/uni-app'
|
2025-08-07 18:22:57 +08:00
|
|
|
|
import { navigateToInterceptor } from '@/router/interceptor'
|
2025-06-21 16:56:24 +08:00
|
|
|
|
import 'abortcontroller-polyfill/dist/abortcontroller-polyfill-only'
|
2025-06-04 12:25:13 +08:00
|
|
|
|
|
2025-08-07 18:22:57 +08:00
|
|
|
|
onLaunch((options) => {
|
|
|
|
|
|
// #ifdef H5
|
|
|
|
|
|
// 处理H5环境用户直接输入页面路由的情况:https://github.com/unibest-tech/unibest/issues/192
|
|
|
|
|
|
console.log('App Launch', options?.path)
|
|
|
|
|
|
navigateToInterceptor.invoke({ url: options?.path ?? '/' })
|
|
|
|
|
|
// #endif
|
2025-06-04 09:00:34 +08:00
|
|
|
|
})
|
|
|
|
|
|
onShow(() => {
|
|
|
|
|
|
console.log('App Show')
|
|
|
|
|
|
})
|
|
|
|
|
|
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>
|