Explorar el Código

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

zhouna hace 5 años
padre
commit
130b14aa46
Se han modificado 1 ficheros con 4 adiciones y 0 borrados
  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);
       },
     });