; In('pcas','css_task','search','ui_slider',function(){task_bar(),new PCAS("province","city","area",'','','');}); var is_rewrite = '0'; /** 检查用户是否登陆 */ var uid = parseInt('') + 0; function check_user_login(){ if (isNaN(uid) || uid == 0) { showDialog("你还没有登录,是否现在登录?", 'confirm', "登录消息提示", 'user_login()', 0); return false; } else { return true; } } /** 用户登陆 */ function user_login(){ showWindow('user_login', 'index.php?do=login', 'get'); return false; } //页面加载,判断搜索条件是现实还是隐藏 $(function(){ var show_cookie = getcookie('show_cookie'); if (show_cookie == 1) { $("#condition_list").show(); $("#tool_hide").show(); $("#tool_show").hide(); } }); //搜索条件现实 /隐藏 function show_hide(){ $("#condition_list").toggle(0, function(){ if ($("#tool_show").is(":hidden")) { setcookie('show_cookie', ''); $("#tool_show").show(); $("#tool_hide").hide(); } else { setcookie('show_cookie', 1,3600); $("#tool_hide").show(); $("#tool_show").hide(); } }); } //多选模式切换 function much_choice(){ $("#single_choice_span").hide(); $("#much_choice_span").show(); $("#show_much_choice").hide(); $("#much_choice_sreach").show(); } //重置 function model_reset(){ var model_ids = ''; $("#much_choice_span").hide(); $("#single_choice_span").show(); $("#much_choice_sreach").hide(); $("#show_much_choice").show(); var url = window.location.href; if(is_rewrite>0){ var new_url = url.replace('-model_ids-'+model_ids, ''); }else{ var new_url = url.replace('&model_ids='+model_ids, ''); } location.href = new_url; } //分享 var share = function(obj, title){ ajaxmenu(obj, 250, '1', '2', '43'); return false; } //进度条 function task_bar(){ var min = Number(); var max = Number(); $("#slider-range").slider({ range: true, min: 0, max: 5000, values: [min, max], slide: function(event, ui){ $("#amount1").val(ui.values['0']); $("#amount2").val(ui.values['1']); } }); //$("#amount").val('$' + $("#slider-range").slider("values", 0) + ' - $' + $("#slider-range").slider("values", 1)); $("#amount1").val($("#slider-range").slider("values", 0)); $("#amount2").val($("#slider-range").slider("values", 1)); } //赏金搜索 function search_task_cash(){ var url = window.location.href; var min = $("#amount1").val(); var max = $("#amount2").val(); var model_ids = "" var path="B1D2C2A398G4E2"; path = path.replace(/C\d{0,3}/,""); $("#cash_frm_path").val(path); $("#min").val(min); $("#max").val(max); $("#task_model_ids").val(model_ids); $("#cash_frm").submit(); } //多任务模型搜索 function model_search(){ var model_ids_val = ''; var url = window.location.href;//获取本页面的url连接 var model_ids = ''; var new_url = ''; $(".model_class").each(function(){//生成model_ids数据 if ($(this).is(":checked")) { model_ids += 'M'+$(this).attr("ext"); } }); if(is_rewrite>0){ //判断是否存在model_ids if(url.indexOf('model_ids') ==-1){//不存在拼接 new_url = url; }else{//替换 new_url = url.replace("-model_ids-"+model_ids_val,""); } new_url = new_url.replace(".html","-model_ids-"+model_ids+".html"); }else{ //判断是否存在model_ids if(url.indexOf('model_ids') ==-1){//不存在拼接 new_url = url; }else{//替换 new_url = url.replace("&model_ids="+model_ids_val,""); } new_url = new_url+'&model_ids='+model_ids; //新地址 } location.href=new_url;//跳转 } //任务模型多选 function model_all(){ $(".model_class").each(function(){ $(this).attr("checked", "checked"); $(this).parent().attr("class", "selected"); }); } function select_model_a(model_id){ var model_id = model_id; var classes = $("#model_a_" + model_id).attr("class"); if (classes == 'selected') { $("#model_a_" + model_id).attr("class", " "); $("#model_a_" + model_id + " input").attr("checked", ""); } else { $("#model_a_" + model_id + " input").attr("checked", "checked"); $("#model_a_" + model_id).attr("class", "selected"); } }