This commit is contained in:
2025-09-27 22:57:59 +08:00
parent 8a458ff0a4
commit ed26244cdb
12585 changed files with 1914308 additions and 3474 deletions

View File

@@ -5,6 +5,17 @@ import './styles/theme.scss'
import App from './App.vue'
import router from './router'
// 自动注入管理员身份(仅当本地未设置时)
try {
const k = 'USER_ID'
const existed = localStorage.getItem(k)
if (!existed || !existed.trim()) {
// 可被环境变量覆盖VITE_ADMIN_USER_ID
const envUid = String((import.meta as any).env?.VITE_ADMIN_USER_ID || '')
localStorage.setItem(k, envUid || '1')
}
} catch {}
const app = createApp(App)
app.use(ElementPlus)
app.use(router)