index.min.js 2.2 KB

1
  1. $(function(){var d,a=(new Date).getTime(),e=a-31536e6,i="招标公告";layui.laypage.render({elem:"paging",count:1,limit:20,first:"首页",last:"尾页",curr:1,groups:5}),$.fn.extend({Screen:function(){$(this).on("click",function(){var s;$(this).find("a").hasClass("all-btn")||($(this).find("a").addClass("all-btn"),$(this).siblings().find("a").removeClass("all-btn"),$(this).find("a").hasClass("notices")?i=$(this).find("a").html():$(this).find("a").hasClass("releasetime")&&("year"==(s=$(this).find("a").attr("id"))?e=a-31536e6:"month"==s?e=a-2592e6:"week"==s?e=a-6048e5:"day"==s&&(e=a-2592e5)),function c(u){$.ajax({url:"/web-back/nx/n/list/notice",type:"post",cache:!1,dataType:"json",data:{p:u,notice_type:i,start_time:e,end_time:a},success:function(s){var a="";d=s.count,$(".result-content-title-right span i").html(d);for(var e=0;e<s.rows.length;e++){var i,n="",t=s.rows[e].apply_date_end,l=s.rows[e].notice_end_time,r=new Date,t=(l<t||t===l?i=new Date(t):t<l&&(i=new Date(l)),i-r),r='<span class="countdowns">剩余<i class="day">'+(l=Math.floor(t/864e5))+'</i>天<i class="hour">'+Math.floor(t%864e5/36e5)+"</i>小时</span>",o=("正常公告"===(t=s.rows[e].notice_nature)||"再次公告"===t?n='<i class="icons greens">新</i>':"变更公告"===t?n='<i class="icons blues">变更</i>':"延期公告"===t?n='<i class="icons blues">延期</i>':"补充公告"===t?n='<i class="icons blues">补充</i>':"控制价"===t?n='<i class="icons blues">控价</i>':"撤销公告"===t&&(n='<i class="icons reds">撤销</i>'),"../page_detailed/list.html?kid="+s.rows[e].kid);a+="<li>"+n+'<a href="'+o+'" class="names" target="_blank" title="'+s.rows[e].project_name+'">'+s.rows[e].project_name+'</a><span class="times">'+s.rows[e].notice_release_time+'</span><a href="javascript:void(0)" class="sources" title="'+s.rows[e].org_name+'">'+s.rows[e].org_name+'</a><span class="areas">'+s.rows[e].region_name+"</span>"+(r=l<0||"控制价"===t||"变更公告"===t||"延期公告"===t||"补充公告"===t||"撤销公告"===t?'<span class="countdowns">无</span>':r)+"</li>"}$(".result-content-line ul").html(a),layui.laypage.render({elem:"paging",count:d,limit:20,first:"首页",last:"尾页",curr:u,groups:5,jump:function(s,a){a||c(s.curr)}})}})}(1))})}})});