mirror of
https://github.com/vastsa/FileCodeBoxFronted.git
synced 2026-11-24 21:58:01 +08:00
feat: 更新用户登录为简易版jwt
This commit is contained in:
1 parent
34abbf2989
commit
4a8d2b7157
1 file changed
+2
-2
@@ -110,10 +110,10 @@ const router = useRouter()
|
||||
|
||||
const handleSubmit = async () => {
|
||||
if (!validateForm()) return
|
||||
adminStore.updateAdminPwd(password.value)
|
||||
api
|
||||
.post('/admin/login', { password: password.value })
|
||||
.then(() => {
|
||||
.then((res: any) => {
|
||||
adminStore.updateAdminPwd(res.detail.token)
|
||||
router.push('/admin')
|
||||
})
|
||||
.catch((error: any) => {
|
||||
|
||||
Reference in new issue
Block a user