$(function() { var dataLength; var EndTime = new Date().getTime(); var StartTime = EndTime - 31536000000; var NoticeType = '招标公告'; var dataUrl = '/nx/n/list/notice'; AjaxFan(1); function AjaxFan(pagenum) { $.ajax({ url: getServerHttp() + dataUrl, type: 'post', cache: false, dataType: 'json', data: { p: pagenum, notice_type: NoticeType, start_time: StartTime, end_time: EndTime }, success: function(data) { var data = ajaxDataParames(data); var doms = ""; // dataLength = data.count; dataLength = data.pagePackage.page.totalRow; $('.result-content-title-right span i').html(dataLength); if (NoticeType == "招标公告") { var type = 1 } else { var type = 2 } var list = data.pagePackage.data; for (var i = 0; i < list.length; i++) { var iDom = ""; var applyTime = list[i].apply_date_end; var noticeTime = list[i].notice_end_time; var nowDate = new Date(); if (applyTime > noticeTime || applyTime === noticeTime) { var endDate = new Date(applyTime); } else if (applyTime < noticeTime) { var endDate = new Date(noticeTime); } var overDate = endDate - nowDate; var timeDay = Math.floor(overDate / 86400000); var timeHour = Math.floor((overDate % 86400000) / 3600000); var timeHtml = '剩余' + timeDay + '天' + timeHour + '小时'; var iconStyle = list[i].notice_nature; if (iconStyle === "正常公告" || iconStyle === "再次公告") { iDom = '新'; } else if (iconStyle === "变更公告") { iDom = '变更'; } else if (iconStyle === "延期公告") { iDom = '延期'; } else if (iconStyle === "补充公告") { iDom = '补充'; } else if (iconStyle === "控制价") { iDom = '控价'; } else if (iconStyle === "撤销公告") { iDom = '撤销'; } if (timeDay < 0 || iconStyle === "控制价" || iconStyle === "变更公告" || iconStyle === "延期公告" || iconStyle === "补充公告" || iconStyle === "撤销公告") { timeHtml = '无'; } // 判断用户现在使用的设备 if ((navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i))) { var porjectUrl = '../page_detailed/list_Phone.html?kid=' + list[i].kid + '&type=' + type; } else { var porjectUrl = '../page_detailed/list.html?kid=' + list[i].kid + '&type=' + type; } doms += '