lsc 2 hónapja
szülő
commit
25787384b3
2 módosított fájl, 4 hozzáadás és 24 törlés
  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 });