@@ -46,6 +46,7 @@
round
type="info"
@click="onSubmit(formRef)"
+
>
登录
@@ -130,24 +131,23 @@ const onSubmit = async (formEl: FormInstance | undefined) => {
grant_type: 'captcha',
imageCode: '',
verifyCode: 0
- })
- .then(res => {
- console.log('🚀 ~ file: login.vue:134 ~ gongkey ~ res:', res)
+ }).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
- router.push({
- path: 'admin/dashboard'
- })
+ useInfo.setToken(res.data.token_type + ' ' + res.data.access_token, 'auth')
+ state.submitLoading = false
+ router.push({
+ path: 'admin/dashboard'
})
- // .catch(res => {
- // ElMessage({
- // message: res.message,
- // type: 'warning'
- // })
- // })
+ })
+ // .catch(err => {
+ // state.submitLoading = false
+ // })
// state.submitLoading = false
})
+ setTimeout(() => {
+ state.submitLoading = false
+ }, 500)
}
})
}