Browse Source

登录失效调试11

zhouna 3 years ago
parent
commit
6982588338
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/js/utils.js

+ 1 - 1
src/js/utils.js

@@ -143,7 +143,7 @@ window.abortAjax = '';
 const post = function (url, data, opts) {
 const post = function (url, data, opts) {
   if(localStorage.getItem('toLogin')==='1'){
   if(localStorage.getItem('toLogin')==='1'){
     //如果前面已经被标记为登录失效,接下来的请求都不发送
     //如果前面已经被标记为登录失效,接下来的请求都不发送
-    return;
+    return new Promise(()=>{});
   }
   }
   let isPlacefile = getCookie('isPlacefile') || 1;
   let isPlacefile = getCookie('isPlacefile') || 1;
   const token = localStorage.getItem('accessToken');
   const token = localStorage.getItem('accessToken');