$(function(){ var dataLength; var EndTime = new Date().getTime(); var StartTime = EndTime - 31536000000; var NoticeType = '招标公告'; var dataUrl = '/web-back/nx/n/list/notice'; function AjaxFan(pagenum){ $.ajax({ url:dataUrl, type:'post', cache:false, dataType:'json', data:{ p:pagenum, notice_type:NoticeType, start_time:StartTime, end_time:EndTime }, success:function (data){ var doms = ""; dataLength = data.count; $('.result-content-title-right span i').html(dataLength); for(var i=0;inoticeTime || applyTime === noticeTime ){ var endDate = new Date( applyTime ); }else if(applyTime'+timeHour+'小时'; var iconStyle = data.rows[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 = ''; } var porjectUrl = '../page_detailed/list.html?kid='+data.rows[i].kid; doms += '
  • '+iDom+''+data.rows[i].project_name+''+data.rows[i].notice_release_time+''+data.rows[i].org_name+''+data.rows[i].region_name+''+timeHtml+'
  • '; } $('.result-content-line ul').html(doms); layui.laypage.render({ elem: 'paging', count: dataLength, limit: 20, first:'首页', last:'尾页', curr:pagenum, groups:5, jump: function(obj, first){ if(!first){ AjaxFan(obj.curr); } } }); } }); } layui.laypage.render({ elem: 'paging', count: 1, limit: 20, first:'首页', last:'尾页', curr:1, groups:5, // jump: function(obj, first){ // if(!first){ // AjaxFan(obj.curr); // } // } }); // AjaxFan(1); //条件筛选 $.fn.extend({ Screen:function(){ $(this).on('click',function(){ if(!$(this).find('a').hasClass('all-btn')){ $(this).find('a').addClass('all-btn'); $(this).siblings().find('a').removeClass('all-btn'); }else{return} if($(this).find('a').hasClass('notices')){ NoticeType = $(this).find('a').html(); }else if( $(this).find('a').hasClass('releasetime') ){ var ReleaseTime = $(this).find('a').attr('id'); if(ReleaseTime == 'year'){ StartTime = EndTime - 31536000000; }else if(ReleaseTime == 'month'){ StartTime = EndTime - 2592000000; }else if(ReleaseTime == 'week'){ StartTime = EndTime - 604800000; }else if(ReleaseTime == 'day'){ StartTime = EndTime - 259200000; } } AjaxFan(1); }) } }); (function(){ // $('.screen-content-box div ul li').Screen(); }()) })