Browse Source

定时获取未读消息信息。

yangc 8 years ago
parent
commit
3c60790995
1 changed files with 5 additions and 1 deletions
  1. 5 1
      components/default/RightBar.vue

+ 5 - 1
components/default/RightBar.vue

@@ -27,7 +27,7 @@
           </div>
         </li>
         <li class="right-bar-item contact-menu">
-          <a href="javascript:void(0)" class="title" @click="goWebChat" @mouseenter="getChatCount">
+          <a href="javascript:void(0)" class="title" @click="goWebChat">
             <i class="fa fa-comments-o" aria-hidden="true" style="color: #FFFFFF;">
             </i>
             <i class="remind-point" v-if="user.logged && chatCount>0"></i>
@@ -110,6 +110,10 @@
         }
       }
     },
+    mounted () {
+      this.getChatCount()
+      setInterval(this.getChatCount(), 10000)
+    },
     methods: {
       listenPage: function (p) {
         this.page = p