File tree 1 file changed +6
-3
lines changed
1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change 15
15
<a-alert
16
16
v-if =" isLoginError"
17
17
type =" error"
18
- show-icon
18
+ : show-icon= " true "
19
19
style =" margin-bottom : 24px ;"
20
- message =" 账户或密码错误(admin/a123456 ) "
20
+ : message =" loginErrorMessage "
21
21
/>
22
22
<a-form-item >
23
23
<a-input
@@ -158,6 +158,7 @@ export default {
158
158
// login type: 0 email, 1 username, 2 telephone
159
159
loginType: 0 ,
160
160
isLoginError: false ,
161
+ loginErrorMessage: " " ,
161
162
requiredTwoStepCaptcha: false ,
162
163
stepCaptchaVisible: false ,
163
164
form: this .$form .createForm (this ),
@@ -268,9 +269,11 @@ export default {
268
269
},
269
270
requestFailed (err ) {
270
271
this .isLoginError = true
272
+ let errorMessage = ((err .response || {}).data || {}).message || ' 请求出现错误,请稍后再试'
273
+ this .loginErrorMessage = errorMessage
271
274
this .$notification [' error' ]({
272
275
message: ' 错误' ,
273
- description: (( err . response || {}). data || {}). message || ' 请求出现错误,请稍后再试 ' ,
276
+ description: errorMessage ,
274
277
duration: 4
275
278
})
276
279
}
You can’t perform that action at this time.
0 commit comments