wangxiaogang 3 anni fa
parent
commit
ca86ee3652
2 ha cambiato i file con 4 aggiunte e 6 eliminazioni
  1. 1 2
      src/web/staticres/js/login.js
  2. 3 4
      src/web/staticres/js/message.js

+ 1 - 2
src/web/staticres/js/login.js

@@ -420,7 +420,6 @@ var logic = function(data,num){
       checkMenuForEnt()
 			infoListCss();
 			commonMouseEvent();
-            // message.checkMessage()
             message.init()
 		}catch(e){}
 	}
@@ -704,7 +703,7 @@ var haslogin = function(num,kyorpn,url){
         checkMenuForEnt()
 				infoListCss();
 				commonMouseEvent();
-                message.checkMessage()
+                message.init()
 			}catch(e){}
 		}else{
 			$("#login").html("<button class='loginBtn' data-toggle='modal' onclick='openLoginDig()'>登录</button>");

+ 3 - 4
src/web/staticres/js/message.js

@@ -8,7 +8,6 @@ function topRead(ids, type) {
         msgType: type
       },
       success:function (res) {
-        console.log(res)
         message.checkMessage()
         message.checkOpened()
       }
@@ -31,6 +30,7 @@ function Message() {
     
     // 初始化
     this.init = function () {
+        if (!loginflag) return
         this.checkOpened()
         this.checkMessage()
         this.bindEvents()
@@ -172,7 +172,6 @@ function Message() {
             })
         })
     }
-    if (loginflag) {
-        this.init()
-    }
+
+    this.init()
 }