lsc 2 月之前
父节点
当前提交
25787384b3
共有 2 个文件被更改,包括 4 次插入24 次删除
  1. 2 12
      js/liyuan/Onload.js
  2. 2 12
      js/liyuan/Onload2.js

+ 2 - 12
js/liyuan/Onload.js

@@ -675,12 +675,7 @@ U.MD.D.getuser = function () {
 
     var _cookie = U.UF.Cookie.get("cocorobo");
     if(LoginState && !_cookie){
-        window.removeEventListener('beforeunload', function (event) { 
-            // 阻止默认行为 
-            event.preventDefault(); 
-            event.returnValue = ''; 
-            // / 对某些浏览器有效 
-        });
+        window.onbeforeunload = null
         window.location.reload();
     }else if(LoginState && !CookieS){
         CookieS = _cookie
@@ -703,12 +698,7 @@ U.MD.D.getuser = function () {
 
                 }, [], { "type": "GET", "withCredentials": true });
             }else {
-                window.removeEventListener('beforeunload', function (event) { 
-                    // 阻止默认行为 
-                    event.preventDefault(); 
-                    event.returnValue = ''; 
-                    // / 对某些浏览器有效 
-                });
+                window.onbeforeunload = null
                 window.location.reload();
             }
         }, [], { "type": "GET", "withCredentials": true });

+ 2 - 12
js/liyuan/Onload2.js

@@ -675,12 +675,7 @@ U.MD.D.getuser = function () {
 
     var _cookie = U.UF.Cookie.get("cocorobo");
     if(LoginState && !_cookie){
-        window.removeEventListener('beforeunload', function (event) { 
-            // 阻止默认行为 
-            event.preventDefault(); 
-            event.returnValue = ''; 
-            // / 对某些浏览器有效 
-        });
+        window.onbeforeunload = null
         window.location.reload();
     }else if(LoginState && !CookieS){
         CookieS = _cookie
@@ -703,12 +698,7 @@ U.MD.D.getuser = function () {
 
                 }, [], { "type": "GET", "withCredentials": true });
             }else {
-                window.removeEventListener('beforeunload', function (event) { 
-                    // 阻止默认行为 
-                    event.preventDefault(); 
-                    event.returnValue = ''; 
-                    // / 对某些浏览器有效 
-                });
+                window.onbeforeunload = null
                 window.location.reload();
             }
         }, [], { "type": "GET", "withCredentials": true });