<script setup lang="ts">
import { onLaunch, onShow, onHide } from '@dcloudio/uni-app';
import { useAuthStore } from '@/store/modules/auth';
import { autoLogin } from '@/utils/routeGuard';
import { useInfoStore } from '@/store';
const infoStore = useInfoStore();
onLaunch(async () => {
    console.log('App Launch');
    infoStore?.setNavConfig('default'); // 或 'custom'，根据需要设置默认导航配置
    // 应用启动时检查登录状态
    try {
        // await autoLogin();
    } catch (error) {
        console.error('Auto login check failed:', error);
    }
});
onShow(() => {
    console.log('App Show');
});

onHide(() => {
    console.log('App Hide');
});
</script>
<style lang="scss">
@import 'uview-plus/index.scss';
@import '@/assets/styles/public.scss';
@import '@/assets/styles/uview-plus.scss';

// 设置背景色
page {
    background-color: #f7f7f7;
}
</style>
