Explorar o código

登录失效调试9

zhouna %!s(int64=3) %!d(string=hai) anos
pai
achega
594016699b
Modificáronse 1 ficheiros con 4 adicións e 0 borrados
  1. 4 0
      src/js/utils.js

+ 4 - 0
src/js/utils.js

@@ -141,6 +141,10 @@ const getUrlArgObjectNew = function (name, srcUrl) {
 window.abortAjax = '';
 
 const post = function (url, data, opts) {
+  if(localStorage.getItem('toLogin')==='1'){
+    //如果前面已经被标记为登录失效,接下来的请求都不发送
+    return;
+  }
   let isPlacefile = getCookie('isPlacefile') || 1;
   const token = localStorage.getItem('accessToken');
   if (!token && window.location.href.indexOf('login') == -1) {