<script setup lang="ts">
import { onLaunch, onShow, onHide } from '@dcloudio/uni-app';
import { useAuthStore } from '@/store/modules/auth';
import { autoLogin } from '@/utils/routeGuard';

onLaunch(async () => {
    console.log('App Launch');

    // 应用启动时检查登录状态
    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 '@/assets/styles/public.scss';
@import '@/assets/styles/common.scss';
@import '@/assets/styles/uview-plus.scss';
</style>
