feat: 更新用户登录为简易版jwt
This commit is contained in:
@@ -110,10 +110,10 @@ const router = useRouter()
|
|||||||
|
|
||||||
const handleSubmit = async () => {
|
const handleSubmit = async () => {
|
||||||
if (!validateForm()) return
|
if (!validateForm()) return
|
||||||
adminStore.updateAdminPwd(password.value)
|
|
||||||
api
|
api
|
||||||
.post('/admin/login', { password: password.value })
|
.post('/admin/login', { password: password.value })
|
||||||
.then(() => {
|
.then((res: any) => {
|
||||||
|
adminStore.updateAdminPwd(res.detail.token)
|
||||||
router.push('/admin')
|
router.push('/admin')
|
||||||
})
|
})
|
||||||
.catch((error: any) => {
|
.catch((error: any) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user