Browse Source

错误消息返回

msgroup 4 năm trước cách đây
mục cha
commit
ed635b5051
1 tập tin đã thay đổi với 4 bổ sung0 xóa
  1. 4 0
      src/main/webapp/static/plugins/ms/1.0.0/ms.http.js

+ 4 - 0
src/main/webapp/static/plugins/ms/1.0.0/ms.http.js

@@ -48,11 +48,15 @@
                     msg = "账号被锁定!";
                 } else if (error.response.status == 500) {
                     msg = "服务器异常";
+
                 } else if (error.response.status == 501) {
                     msg = "您的操作被取消或不允许提交";
                 } else if (error.response.status == 423) {
                     msg = "服务器正在开小差....";
                 }
+                if(error.response.data && error.response.data.msg) {
+                    msg = error.response.data.msg;
+                }
                 if (msg) {
                     var tempVue = document.createElement('div');
                     tempVue.id = "tempVue";