refactor: 完善前端 axios 请求响应拦截器

This commit is contained in:
2023-08-28 22:47:05 +08:00
parent 35fd681092
commit bb398d8101
4 changed files with 58 additions and 28 deletions

View File

@@ -143,13 +143,13 @@ public class GlobalExceptionHandler {
String errorMsg;
switch (e.getType()) {
case NotLoginException.KICK_OUT:
errorMsg = "您已被踢下线";
errorMsg = "您已被踢下线";
break;
case NotLoginException.BE_REPLACED_MESSAGE:
errorMsg = "您已被顶下线";
errorMsg = "您已被顶下线";
break;
default:
errorMsg = "登录状态已过期,请重新登录";
errorMsg = "您的登录状态已过期,请重新登录";
break;
}
LogContextHolder.setErrorMsg(errorMsg);