<script setup lang="ts">
import { onLaunch, onShow, onHide } from '@dcloudio/uni-app';
import { useAuthStore } from '@/store/modules/auth';
import { autoLogin } from '@/utils/routeGuard';
import { getToken, setToken, removeToken } from '@/utils/auth';
onLaunch(async () => {
    console.log('App Launch');

    // 应用启动时检查登录状态
    try {
        // await autoLogin();
    } catch (error) {
        console.error('Auto login check failed:', error);
    }
});
setToken('eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJsb2dpblR5cGUiOiJsb2dpbiIsImxvZ2luSWQiOiJhcHBfdXNlcjoxOTQwMjQ1NzU5Mjk2ODY0MjU3Iiwicm5TdHIiOiJiVllYa0QwVnY2T3JLNnc1d1ZOTlpiV0hFUTlhU1J2RyIsImNsaWVudGlkIjoiMjAyNTAyMTQiLCJvcGVuaWQiOiJva0NHMjRrU29nT2VWTGFkc1JVYm8tS2JqR2Y4IiwidXNlcklkIjoxOTQwMjQ1NzU5Mjk2ODY0MjU3fQ.-gNoaCFtXKHYtiGLdd5mpEyhBf9AZ9BTw9udNA_1feM')
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/common.scss';
@import '@/assets/styles/uview-plus.scss';

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