fix: 导航栏用户显示改为 par_user 而非 token 串 + 注销同步清除

This commit is contained in:
mediabot-pt
2026-06-29 14:39:23 +08:00
parent bb26695c34
commit cd118586d2
3 changed files with 5 additions and 2 deletions

View File

@@ -53,11 +53,12 @@
<script setup>
const router = useRouter()
const userEmail = ref(localStorage.getItem('par_token') || 'admin')
const userEmail = ref(localStorage.getItem('par_user') || 'admin')
const handleCommand = (cmd) => {
if (cmd === 'logout') {
localStorage.removeItem('par_token')
localStorage.removeItem('par_user')
ElMessage.success('已退出')
router.push('/login')
}