feat: 前端认证

This commit is contained in:
tbphp
2025-07-01 12:52:38 +08:00
parent 92fdd6d680
commit c447e3ad0b
10 changed files with 545 additions and 66 deletions

View File

@@ -4,6 +4,7 @@ import App from './App.vue'
import router from './router'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import { useAuthStore } from './stores/authStore'
const app = createApp(App)
@@ -11,4 +12,8 @@ app.use(createPinia())
app.use(router)
app.use(ElementPlus)
// 确保认证状态在应用启动时初始化
const authStore = useAuthStore()
authStore.initializeAuth()
app.mount('#app')