//$("#J_loginReg").hide(); //$("#J_userInfo").hide(); $("#loginbox").load("/config/loadbox/loginbox2016.asp?20241218"); $("#J_loginReg").show(); $("#J_menuReg").show(); $(".J_loginShow").hide(); $(".J_loginHide").show(); function WestBottomNotice(){ var syncNoticeCount = function () { $.ajax('/paas/notify/center/getcount', { method: 'get', dataType: 'json', success: function (data) { var count = +data.data.count; var msg = ''; if (count > 0) { msg = '(' + count + ')'; } $("#header2016 .J_noticeCount").text(msg); var date = new Date(); localStorage.setItem('GETCOUNT_COUNT', msg); localStorage.setItem('GETCOUNT_DATE', date); } }); }; if (!window.location.host.match(/^whois\.west\.cn/)) { //获取当前时间的毫秒数 var date1 = new Date(new Date()).getTime(); //获取localStorage中存入的时间的毫秒数 var date = new Date(localStorage.getItem("GETCOUNT_DATE")).getTime(); var msg = localStorage.getItem("GETCOUNT_COUNT"); if (msg != null) { //获取到 间隔分钟数=毫秒数 / 1000 / 60 var minutes = (date1 - date) / 1000 / 60; //写入缓存时间大于30分钟,则重新发请求获取数据 if (minutes > 60) { syncNoticeCount(); } else { $("#header2016 .J_noticeCount").text(msg); } } else { syncNoticeCount(); } } }