wangxiaogang 3 سال پیش
والد
کامیت
a9efbf4ccb
1فایلهای تغییر یافته به همراه4 افزوده شده و 2 حذف شده
  1. 4 2
      src/web/staticres/js/login.js

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

@@ -411,7 +411,6 @@ var msgTimer = null
 // 查看是否有新消息
 function checkCounts() {
     Notification.requestPermission(function(status) {
-        console.info(status, '----------')
         if(status === 'granted'){
             clearInterval(msgTimer)
             msgTimer = setInterval(function () {
@@ -423,7 +422,10 @@ function checkCounts() {
                         // var isMsg = window.localStorage.getItem('noMesg')
                         // if (num !== Number(isMsg)) {
                             var datas = r.data
-                            if (num && !$.isEmptyObject(datas)) {
+                            // if (!$.isEmptyObject(datas)) {
+                            if (datas = {} || datas == '') {
+                                return
+                            } else {
                                 var notify = new Notification(datas.title,{
                                     icon: '../images/t3_new.jpg',
                                     body: datas.content