Browse Source

feat: 新增isPanL变量处理Cookie校验逻辑

lsc 3 weeks ago
parent
commit
da193009b0
1 changed files with 5 additions and 2 deletions
  1. 5 2
      js/liyuan/Onload2.js

+ 5 - 2
js/liyuan/Onload2.js

@@ -332,6 +332,7 @@ U.MD.D.error = function (errorMessage, scripturi, linenumber, columnnumber, erro
 let LoginState = false
 let CookieS = ''
 let CookieCheckTimes = 0
+let isPanL = false
 U.MD.D.getuser = function () {
     // $("#U_MD_D_BG")[0].style.backgroundImage = 'url("/img/icon/gif/longhuaBg.gif")'
     var userInfo = US.userInfo;
@@ -720,12 +721,14 @@ U.MD.D.getuser = function () {
                 window.location.reload();
             }
         }, [], { "type": "GET", "withCredentials": true });
-    }else if(LoginState && _cookie){
+    }else if(LoginState && _cookie && !isPanL){
         CookieCheckTimes++
         if (CookieCheckTimes % 5 !== 0) return;
+        isPanL = true
         U.A.Request(US.Config.server + "getcookieuserid", [], function (res) {
             if (res.value && res.value[0] && res.value[0][0]) {
-            }else {
+                isPanL = false
+            }else if(res.status != 0){
                 window.onbeforeunload = null
                 window.location.reload();
             }