|
|
@@ -217,22 +217,29 @@ service.interceptors.response.use(response => {
|
|
|
} else { // 错误处理
|
|
|
let errorMsg = ''
|
|
|
if (Utils.isNotEmpty(message)) { // 有错误消息
|
|
|
- errorMsg = Utils.isNotEmpty(dataAxios.cause) ? I18n.t('error.messageCause', {
|
|
|
- message,
|
|
|
- cause: dataAxios.cause
|
|
|
- }) : I18n.t('error.message', {
|
|
|
- message
|
|
|
- })
|
|
|
+ errorMsg = '错误原因:用户名或密码错误'
|
|
|
+ // errorMsg = Utils.isNotEmpty(dataAxios.cause) ? I18n.t('error.messageCause', {
|
|
|
+ // message,
|
|
|
+ // cause: dataAxios.cause
|
|
|
+ // }) : I18n.t('error.message', {
|
|
|
+ // message
|
|
|
+ // })
|
|
|
} else if (Utils.isNotEmpty(cause)) { // 只有错误原因
|
|
|
- errorMsg = I18n.t('error.cause', {
|
|
|
- cause
|
|
|
- })
|
|
|
+ errorMsg = '错误原因:用户名或密码错误'
|
|
|
+
|
|
|
+ // errorMsg = I18n.t('error.cause', {
|
|
|
+ // cause
|
|
|
+ // })
|
|
|
} else if (I18n.te('error.status.' + state)) { // 有错误编码
|
|
|
- errorMsg = I18n.t('error.status.' + state)
|
|
|
+ errorMsg = '错误原因:用户名或密码错误'
|
|
|
+
|
|
|
+ // errorMsg = I18n.t('error.status.' + state)
|
|
|
} else { // 未知
|
|
|
- errorMsg = message || I18n.t('error.unknown', {
|
|
|
- state
|
|
|
- })
|
|
|
+ errorMsg = '错误原因:用户名或密码错误'
|
|
|
+
|
|
|
+ // errorMsg = message || I18n.t('error.unknown', {
|
|
|
+ // state
|
|
|
+ // })
|
|
|
}
|
|
|
Toast({
|
|
|
message: `${errorMsg}`,
|