index.min.js 2.4 KB

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