|
@@ -419,25 +419,21 @@ function checkCounts() {
|
|
|
url: '/jymessageCenter/lastNewMessage?t=' + Date.now(),
|
|
|
success: function (r) {
|
|
|
var num = r.count
|
|
|
- // var isMsg = window.localStorage.getItem('noMesg')
|
|
|
- // if (num !== Number(isMsg)) {
|
|
|
- var datas = r.data
|
|
|
- // if (!$.isEmptyObject(datas)) {
|
|
|
- if (datas = {} || datas == '') {
|
|
|
- return
|
|
|
- } else {
|
|
|
- var notify = new Notification(datas.title,{
|
|
|
- icon: '../images/t3_new.jpg',
|
|
|
- body: datas.content
|
|
|
- })
|
|
|
+ var datas = r.data
|
|
|
+ if (datas = {} || datas == '') {
|
|
|
+ return
|
|
|
+ } else {
|
|
|
+ var notify = new Notification(datas.title,{
|
|
|
+ icon: '../images/t3_new.jpg',
|
|
|
+ body: datas.content
|
|
|
+ })
|
|
|
|
|
|
- // 点击时桌面消息时触发
|
|
|
- notify.onclick = () => {
|
|
|
- toReaded(r.data.id, r.data.msg_type, r.data.link)
|
|
|
- }
|
|
|
+ // 点击时桌面消息时触发
|
|
|
+ notify.onclick = () => {
|
|
|
+ toReaded(r.data.id, r.data.msg_type, r.data.link)
|
|
|
}
|
|
|
- localStorage.setItem('noMesg', num)
|
|
|
- // }
|
|
|
+ }
|
|
|
+ localStorage.setItem('noMesg', num)
|
|
|
},
|
|
|
error: function () {
|
|
|
clearInterval(msgTimer)
|
|
@@ -550,6 +546,7 @@ var logic = function(data,num){
|
|
|
checkCounts()
|
|
|
initIndexMsgList()
|
|
|
$(".newNotice").css('marginTop', '112px')
|
|
|
+ $('.jy-banner').css('marginTop', '28px')
|
|
|
}catch(e){ console.log(e) }
|
|
|
}
|
|
|
}
|