feat: 前端认证
This commit is contained in:
@@ -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')
|
||||
|
Reference in New Issue
Block a user