浏览代码

使用过程退出跳到登录页4095/4098

zhouna 5 年之前
父节点
当前提交
031ff5bb73
共有 1 个文件被更改,包括 4 次插入0 次删除
  1. 4 0
      src/js/utils.js

+ 4 - 0
src/js/utils.js

@@ -89,6 +89,10 @@ const post = function (url, data) {
         resolve({ data: res });
       },
       error: function (error) {
+        if(error.status===403||error.status===401){
+          const wd = window.parent.window||window;
+          wd.location.href = "../login.html";
+        }
         reject(error);
       },
     });