修改登录页
This commit is contained in:
@@ -130,22 +130,23 @@ const onSubmit = async (formEl: FormInstance | undefined) => {
|
||||
grant_type: 'captcha',
|
||||
imageCode: '',
|
||||
verifyCode: 0
|
||||
}).then(res => {
|
||||
if (res.code == 'A0000') {
|
||||
// window.localStorage.setItem('token', '123')
|
||||
})
|
||||
.then(res => {
|
||||
console.log('🚀 ~ file: login.vue:134 ~ gongkey ~ res:', res)
|
||||
|
||||
useInfo.setToken(res.data.token_type + ' ' + res.data.access_token, 'auth')
|
||||
state.submitLoading = false
|
||||
// state.submitLoading = false
|
||||
router.push({
|
||||
path: 'admin/dashboard'
|
||||
})
|
||||
} else {
|
||||
ElMessage({
|
||||
message: res.message,
|
||||
type: 'warning'
|
||||
})
|
||||
state.submitLoading = false
|
||||
}
|
||||
})
|
||||
})
|
||||
// .catch(res => {
|
||||
// ElMessage({
|
||||
// message: res.message,
|
||||
// type: 'warning'
|
||||
// })
|
||||
// })
|
||||
// state.submitLoading = false
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user