fix: avatar 以及 auth 重构

This commit is contained in:
Tim
2025-10-17 15:10:43 +08:00
parent 61f8fa4bb7
commit f17b644a9b
14 changed files with 67 additions and 114 deletions
+1 -2
View File
@@ -40,7 +40,7 @@
<script setup>
import { toast } from '~/main'
import { setToken, loadCurrentUser } from '~/utils/auth'
import { setToken } from '~/utils/auth'
import BaseInput from '~/components/BaseInput.vue'
import ThirdPartyAuth from '~/components/ThirdPartyAuth.vue'
import { registerPush } from '~/utils/push'
@@ -61,7 +61,6 @@ const submitLogin = async () => {
const data = await res.json()
if (res.ok && data.token) {
setToken(data.token)
await loadCurrentUser()
toast.success('登录成功')
registerPush()
await navigateTo('/', { replace: true })