fix: 改用hash路由解决SPA回退到首页问题 + 修复登录API响应解析

This commit is contained in:
Agent
2026-07-14 20:10:36 +08:00
parent c469f0a137
commit 9cafd5ca78
2 changed files with 4 additions and 3 deletions
+2 -1
View File
@@ -41,7 +41,8 @@ async function handleLogin() {
loading.value = true
try {
const res = await authApi.login(form.value)
store.setToken(res.data.token)
const token = res.result.token
store.setToken(token)
await store.fetchProfile()
ElMessage.success('登录成功')
router.push('/admin/dashboard')