|
@@ -50,6 +50,7 @@ $(function() {
|
|
|
$(".timerInput").removeClass("customtime-active");
|
|
|
$(".timer").find("ul li:first-child").removeClass("active");
|
|
|
$(".release-time .timer li").removeClass("active");
|
|
|
+ beforeSubmit()
|
|
|
})
|
|
|
//
|
|
|
$(".nbprev").click(function(){
|
|
@@ -62,22 +63,33 @@ $(function() {
|
|
|
})
|
|
|
//筛选关闭和打开
|
|
|
//根据cookie值设置筛选是否显示
|
|
|
- var rsw = $.cookie("orshow");
|
|
|
- if(typeof(rsw)=="undefined"){
|
|
|
+ var rsw = localStorage.getItem("hideorshow");
|
|
|
+ if(rsw==null){
|
|
|
setTimeout(function(){
|
|
|
$(".searchTender").stop(false,true).slideDown(1000);
|
|
|
- $.cookie("orshow","T",{expires:360,path:"/" });
|
|
|
+ localStorage.setItem("hideorshow", "D");
|
|
|
},500);
|
|
|
+ }else{
|
|
|
+ if(rsw=="U"){
|
|
|
+ $("#screenBtn").addClass("down");
|
|
|
+ $(".searchTender").hide();
|
|
|
+ }else{
|
|
|
+ $("#screenBtn").removeClass("down");
|
|
|
+ $(".searchTender").show();
|
|
|
+ }
|
|
|
}
|
|
|
- /////////////////
|
|
|
-// $(".right-tabBtn button:nth-child(1)").click(function(){
|
|
|
-// tol="L"
|
|
|
-// getNewBiddings(1)
|
|
|
-// })
|
|
|
-// $(".right-tabBtn button:nth-child(2)").click(function(){
|
|
|
-// tol="T"
|
|
|
-// getNewBiddings(1)
|
|
|
-// })
|
|
|
+ //记录用户刷选按钮状态
|
|
|
+ $("#screenBtn").click(function(){
|
|
|
+ if($(this).attr("class").indexOf("down")>0){
|
|
|
+ localStorage.setItem("hideorshow", "U");
|
|
|
+ }else{
|
|
|
+ localStorage.setItem("hideorshow", "D");
|
|
|
+ }
|
|
|
+ })
|
|
|
+ //
|
|
|
+ $("#zbSeatchT input[type='button']").click(function(){
|
|
|
+ beforeSubmit()
|
|
|
+ })
|
|
|
})
|
|
|
//
|
|
|
function next(){
|
|
@@ -307,4 +319,82 @@ function getInputTime(){
|
|
|
endtime = "";
|
|
|
}
|
|
|
return [starttime,endtime]
|
|
|
+}
|
|
|
+///
|
|
|
+function beforeSubmit(){
|
|
|
+ //时间
|
|
|
+ var publishtime = null;
|
|
|
+ var timeslot = getInputTime().join("_");
|
|
|
+ if($(".timerInput").hasClass("active")){
|
|
|
+ if(timeslot != "_"){
|
|
|
+ $("#zbSeatchT [name='publishtime']").val(timeslot);
|
|
|
+ }else{
|
|
|
+ $("#zbSeatchT [name='publishtime']").val("");
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ publishtime = $(".timer .active").attr("data-value");
|
|
|
+ if(typeof(publishtime) != "undefined"){
|
|
|
+ $("#zbSeatchT [name='publishtime']").val(publishtime);
|
|
|
+ }else{
|
|
|
+ $("#zbSeatchT [name='publishtime']").val("");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if(timeslot != "_"){
|
|
|
+ $("#zbSeatchT [name='timeslot']").val(timeslot);
|
|
|
+ }else{
|
|
|
+ $("#zbSeatchT [name='timeslot']").val("");
|
|
|
+ }
|
|
|
+ //地区
|
|
|
+ var selectAreas = "";
|
|
|
+ $(".region-content .active:not(.parent-node)").each(function(){
|
|
|
+ var thisText = $(this).text();
|
|
|
+ if(thisText != "全国"){
|
|
|
+ if(selectAreas != ""){
|
|
|
+ selectAreas += ",";
|
|
|
+ }
|
|
|
+ selectAreas += thisText;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ $("#zbSeatchT [name='area']").val(selectAreas);
|
|
|
+ //类型
|
|
|
+ var selectSubTypes = "";
|
|
|
+ $(".info-content .active:not(.parent-node)").each(function(){
|
|
|
+ if($(this).attr("id") == "whole"||$(this).attr("id") == "infoBtn"){
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ var thisText = $(this).attr("data-value");
|
|
|
+ if(selectSubTypes != ""){
|
|
|
+ selectSubTypes += ",";
|
|
|
+ }
|
|
|
+ selectSubTypes += thisText;
|
|
|
+ });
|
|
|
+ $("#zbSeatchT [name='subtype']").val(selectSubTypes);
|
|
|
+ //行业
|
|
|
+ var selectIndustrys = "";
|
|
|
+ $(".industry-content .active:not(.parent-node)").each(function(){
|
|
|
+ if($(this).attr("id") == "induAll"){
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ var thisText = $(this).attr("data-value");
|
|
|
+ if(selectIndustrys != ""){
|
|
|
+ selectIndustrys += ",";
|
|
|
+ }
|
|
|
+ selectIndustrys += thisText;
|
|
|
+ });
|
|
|
+ $("#zbSeatchT [name='industry']").val(selectIndustrys);
|
|
|
+ //价格
|
|
|
+ var selectMinPrices = $(".PriceInput [name='minprice']").val();
|
|
|
+ var selectMaxPrices = $(".PriceInput [name='maxprice']").val();
|
|
|
+ $("#zbSeatchT [name='minprice']").val(selectMinPrices);
|
|
|
+ $("#zbSeatchT [name='maxprice']").val(selectMaxPrices);
|
|
|
+ //搜索关键词
|
|
|
+ var searchname = $("#zbSeatchT input[name='keywords']").val();
|
|
|
+ console.log("----"+searchname)
|
|
|
+ $("#zbSeatchT input[name='searchvalue']").val($.trim(searchname))
|
|
|
+ searchOnsubmit();
|
|
|
+ return true
|
|
|
+}
|
|
|
+//
|
|
|
+function searchOnsubmit(){
|
|
|
+
|
|
|
}
|