feat: 登录接口错误信息码调整
This commit is contained in:
@ -303,6 +303,12 @@ const handleSubmit = async () => {
|
||||
const _fn = isCaptchaLogin.value ? fetchAuthorizationsCaptcha : postLoginPassword;
|
||||
const { code, data, message: errorInfo } = await _fn(loginForm);
|
||||
|
||||
console.log(code, errorInfo);
|
||||
if (code === 10001) {
|
||||
errMsg.value = errorInfo;
|
||||
return;
|
||||
}
|
||||
|
||||
if (code === 200) {
|
||||
// 处理登录成功逻辑
|
||||
message.success('登录成功');
|
||||
@ -318,10 +324,6 @@ const handleSubmit = async () => {
|
||||
|
||||
getProfileInfo();
|
||||
}
|
||||
} catch (error) {
|
||||
if (error?.status === 400) {
|
||||
errMsg.value = error.data?.message;
|
||||
}
|
||||
} finally {
|
||||
submitting.value = false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user