mirror of
https://github.com/xinnan-tech/xiaozhi-esp32-server.git
synced 2026-07-22 15:13:55 +08:00
40 lines
751 B
Vue
40 lines
751 B
Vue
<script setup lang="ts">
|
|
import { onHide, onLaunch, onShow } from '@dcloudio/uni-app'
|
|
import { usePageAuth } from '@/hooks/usePageAuth'
|
|
import { useConfigStore } from '@/store'
|
|
import 'abortcontroller-polyfill/dist/abortcontroller-polyfill-only'
|
|
|
|
usePageAuth()
|
|
|
|
const configStore = useConfigStore()
|
|
|
|
onLaunch(() => {
|
|
console.log('App Launch')
|
|
// 获取公共配置
|
|
configStore.fetchPublicConfig().catch((error) => {
|
|
console.error('获取公共配置失败:', error)
|
|
})
|
|
})
|
|
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>
|