fix: 改用hash路由解决SPA回退到首页问题 + 修复登录API响应解析
This commit is contained in:
@@ -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')
|
||||
|
||||
Reference in New Issue
Block a user