|
@@ -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
|