<!doctype HTML>
<html>
<head>
<title>预算选车</title>
<meta name="keywords" content="" />
<meta name="description" content="" />
<meta http-equiv="content-type" content="text/html; charset=utf-8"/>
<meta name="author" content="yangzhifang_gz maiyaotang_gz" />
<meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0"/><!-- 手机视图 -->
<meta name="format-detection" content="telephone=no" />
<meta name="format-detection" content="email=no" />
<meta name="format-detection" content="address=no" >
<meta name="apple-mobile-web-app-capable" content="yes" />
<link rel="canonical" href="http://jr.pcauto.com.cn/" ><!-- 适配页，即和pc同权重页面 -->
<link href="http://js.3conline.com/pcauto/2015/chedaiwap/css/choiceCarList.css" rel="stylesheet" type="text/css" />
</head>
<script>if(!window._addIvyID) document.write("<scr"+"ipt src='http://www.pconline.com.cn/_hux_/auto/default/index.js'><\/scr"+"ipt>");</script>
<body>
 <script>document.body.insertBefore(document.createElement("script"),document.body.firstChild).src="http://count.pcauto.com.cn/count.php?channel=8484&screen="+screen.width+"*"+screen.height+"&refer="+encodeURIComponent(document.referrer)+"&anticache="+new Date().getTime()+"&url="+encodeURIComponent(location.href);</script>

<div class="g-doc" id="pclazy"> 
    <div id="Jhead">
        <!--头部-->
        <script src="http://www.pcauto.com.cn/global/wap/header_js/" charset="utf-8" class=" defer"></script>
        <!--/头部-->
        <div class="header-bg"> 
             <a onclick="history.back(-1);" class="header-back" title=""></a>
            <div class="header-title">
                <span class="header-title-nav txt-hide"><a href="http://{{{@root.host}}}/">首页</a></a>&gt;预算选车</span>
               <!-- <span class="header-title-nav"><a href="#">预算选车</a></span> -->
                <a onclick ="cityChoose();" class="m-ipcity" id="Jselect">广州</a>
            </div>
        </div>
    </div>
    
    <ul class="m-plst bg-white">
        <li class="m-plst-c">
            <div class="selectX" id="JselectX">
                <div class="wrap">
                    <div class="item-wrap" id="JitemWrap">
                        <div class="part" id="Jpart1">
                            <div class="item item1">
                                <a class="tit">
                                    <span class="mark txt-hide" id="shoufu">
									{{#if prePayRange}}
									{{#if_eq '2' prePayRange}}
                                     0-3万
								    {{/if_eq}}
									{{#if_eq '5' prePayRange}}
                                    3-7万
								    {{/if_eq}}
									{{#if_eq '10' prePayRange}}
                                    7-15万
								    {{/if_eq}}
									{{#if_eq '20' prePayRange}}
                                    15-25万
								    {{/if_eq}}
									{{#if_eq '30' prePayRange}}
                                    25-35万
								    {{/if_eq}}
									{{#if_eq '40' prePayRange}}
                                     35万以上
								    {{/if_eq}}
									{{else}}
									3-7万
									{{/if}}</span>
                                    <span class="icon"></span>
                                </a>
                            </div>
                            <div class="item item2">
                                <a class="tit">
                                    <span class="mark txt-hide" id="monthRange">
									{{#if paymentRange}}
									{{#if_eq '1' paymentRange}}
                                      1,000元以下
									{{/if_eq}}
									{{#if_eq '2' paymentRange}}
                                    1,000-3,000
									{{/if_eq}}
									{{#if_eq '3' paymentRange}}
                                     3,000-5,000
									{{/if_eq}}
									{{#if_eq '4' paymentRange}}
                                     5,000-10,000
									{{/if_eq}}
									{{#if_eq '5' paymentRange}}
                                     10,000-20,000
									{{/if_eq}}
									{{#if_eq '6' paymentRange}}
                                    20,000以上
									{{/if_eq}}
									{{else}}
									3,000-5,000
									{{/if}}
									</span>
                                    <span class="icon"></span>                            
                                </a>
                            </div>  
                        </div>
                        <div class="part" id="Jpart2">
                            <div class="item item3" id="Jitem">
                                <a class="tit">
                                    <span class="mark txt-hide" id="level">
									{{#if level}}
									{{#if_eq '76' level}}
                                       微型车
									{{/if_eq}}
									{{#if_eq '110' level}}
                                      小型车
									{{/if_eq}}
									{{#if_eq '73' level}}
                                      紧凑型车
									{{/if_eq}}
									{{#if_eq '72' level}}
                                      中型车
									{{/if_eq}}
									{{#if_eq '71' level}}
                                      中大型车
									{{/if_eq}}
									{{#if_eq '70' level}}
                                      大型车
									{{/if_eq}}
									{{#if_eq '75' level}}
                                       SUV
									{{/if_eq}}
									{{#if_eq '74' level}}
                                     MPV
									{{/if_eq}}
									{{else}}
									紧凑型车
									{{/if}}</span>
                                    <span class="icon"></span>
                                </a>
                            </div>
                            <div class="item item4">
                                <a class="tit" onclick="brandChoose();">
                                    <span class="mark txt-hide" id="brand">{{#if brandName}}{{brandName}} {{else}}品牌{{/if}}<input type = "hidden" id = "bid" value = "{{bid}}"/></span>
                                    <span class="icon"></span>                            
                                </a>
                            </div> 
                        </div>                
                    </div>                 
                </div>

                <div class="pop-wrap" id="JpopWrap">
                    <div class="select-wrap">
                        <div class="selectConA">
                            <div class="sel-th">首付款</div> 
                            <input type="hidden" name="" value="" id="Jtd"> 
                            <i><a href="javascript:;"onclick=loadData('2','','','','');>0-3万</a></i>
                            <i><a href="javascript:;" onclick=loadData('5','','','','');>3-7万</a></i>
                            <i><a href="javascript:onclick('8-15')"onclick=loadData('10','','','','');>7-15万</a></i>
                            <i><a href="javascript:;"onclick=loadData('20','','','','')>15-25万</a></i>
							 <i><a href="javascript:;"onclick=loadData('30','','','','')>25-35万</a></i>
                            <i><a href="javascript:;"onclick=loadData('40','','','','');>35万以上</a></i>

                        </div>
                    </div>
                    <div class="select-wrap">
                        <div class="selectConA">
                            <div class="sel-th">月供范围</div>
                            <input type="hidden" name="" value="" id="Jsf"> 
                            <i><a href="javascript:;"onclick=loadData('','1','','','');>1,000元以下</a></i>
                            <i><a href="javascript:;" onclick=loadData('','2','','','');>1,000-3,000</a></i>
                            <i><a href="javascript:;"  onclick=loadData('','3','','','');>3,000-5,000</a></i>
                            <i><a href="javascript:;" onclick=loadData('','4','','','');>5,000-10,000</a></i>
                            <i><a href="javascript:;" onclick=loadData('','5','','','');>10,000-20,000</a></i>
                            <i><a href="javascript:;"  onclick=loadData('','6','','','');>20,000以上</a></i>
                        </div>
                    </div>
                    <div class="select-wrap">
                        <div class="selectConA">
                            <div class="sel-th">级别</div>
                            <input type="hidden" name="" value="" id="Jqx"> 
                            <i><a href="javascript:;"  onclick=loadData('','','76','','');>微型车</a></i>
                            <i><a href="javascript:;" onclick=loadData('','','110','','');>小型车</a></i>
                            <i><a href="javascript:;"  onclick=loadData('','','73','','');>紧凑型车</a></i>
                            <i><a href="javascript:;" onclick=loadData('','','72','',''); >中型车</a></i>
                            <i><a href="javascript:;" onclick=loadData('','','71','','');>中大型车</a></i>
                            <i><a href="javascript:;" onclick=loadData('','','70','','');>大型车</a></i>
                            <i><a href="javascript:;"  onclick=loadData('','','75','','');>SUV</a></i>
                            <i><a href="javascript:;" onclick=loadData('','','74','','');>MPV</a></i>
                        </div>
                    </div>
                </div>
            </div>
        </li>
    </ul>

    <div class="m-box bg-white">
        <div class="m-tab">
            <div class="m-tab-ctrl" id="Jnav">
			  {{#if browser}}
                <a href="http://{{{@root.host}}}/budgetp/r{{rId}}/s{{prePayRange}}-m{{paymentRange}}-l{{level}}-st1{{#if bid}}-b{{bid}}{{/if}}/wx/f{{{@root.flow}}}/" class="current">默认</a>
                <a href="http://{{{@root.host}}}/budgetp/r{{rId}}/s{{prePayRange}}-m{{paymentRange}}-l{{level}}-st2{{#if bid}}-b{{bid}}{{/if}}/wx/f{{{@root.flow}}}/">月供</a>
				{{else}}
				 <a href="http://{{{@root.host}}}/budgetp/r{{rId}}/s{{prePayRange}}-m{{paymentRange}}-l{{level}}-st1{{#if bid}}-b{{bid}}{{/if}}/f{{{@root.flow}}}/" class="current">默认</a>
                <a href="http://{{{@root.host}}}/budgetp/r{{rId}}/s{{prePayRange}}-m{{paymentRange}}-l{{level}}-st2{{#if bid}}-b{{bid}}{{/if}}/f{{{@root.flow}}}/">月供</a>
				{{/if}}
            </div>
			<a onclick="reset()" id="resetId" class="btn-cz"><em></em><span>重置</span></a>
			<!--筛选没有结果--> 
			  {{#if list}}
            <div class="m-tab-con" id="Jswipe">
                <div class="swipe-content">
                    <div class="m-tab-div">
                        <ul class="m-li" id="Jcon1">
						{{#each list}}
                            <li>
							  {{#if ../browser}}
                                 <a href="http://{{{@root.host}}}/choose/r{{../../rId}}/sg{{serialGroupId}}-m{{modelId}}-s{{downPayment}}-p{{period}}/wx/f{{{@root.flow}}}/
									">
								{{else}}
								 <a href="http://{{{@root.host}}}/choose/r{{../../rId}}/sg{{serialGroupId}}-m{{modelId}}-s{{downPayment}}-p{{period}}/f{{{@root.flow}}}/
									">
								{{/if}}

                                    <img src="{{icon}}" #src="{{icon}}" width="100" height="75" alt="">
                                    <div class="dDes">
                                        <p class="pTit">{{name}}</p>
                                        <p><span>官方价：<em class="red">{{price}}万</em></span><span>月供：<em class="red">{{payment}}</em>元起</span>贷款成本：{{cost}}万</p>
                                    </div>
                                </a>
                            </li>
							{{/each}}
							
                        </ul>    
                             
                    </div>
                </div>
            </div>  
			 {{else}}
                <!--/筛选没有结果--> 
                     <div class="noneGoods red bg-yellow">抱歉，暂时没有符合您当前条件的金融产品。</div>
			{{/if}}
			      <div class="noneGoods red bg-yellow" style="display:none" id="noMessage">抱歉，暂时没有符合您当前条件的金融产品。</div>
            <!--/筛选有结果-->                 
        </div>
    </div>
       <div class="more" id="Jmore1" style="display:none;">点击查看更多</div> 

    <!-- 公共底部-->
    <script src="http://www.pcauto.com.cn/global/wap/footer_js/" charset="utf-8" class=" defer"></script>
    <!--/公共底部-->
</div>
<script src="http://js.3conline.com/min2/temp/v2/plugin-location2,plugin-lazy.js" charset="utf-8"></script>
<script src="http://js.3conline.com/wap/2013/common/js/zepto.min.js"></script>
<script src="http://js.3conline.com/pcauto/2015/chedaiwap/js/choiceCarList.js"></script>
<script type="text/javascript">

/**************************点击查看更多***********************/
/******************************测试数据*******************************/
/*
var data1=[
    {"name":"速腾","price0":"1111.11万","price1":"241956","price2":"0.7万","pic":"http://dummyimage.com/100X75/0092d3/fff","url":"javascript:;"},
    {"name":"速腾","price0":"1111.11万","price1":"241956","price2":"0.7万","pic":"http://dummyimage.com/100X75/0092d3/fff","url":"javascript:;"},
    {"name":"速腾","price0":"1111.11万","price1":"241956","price2":"0.7万","pic":"http://dummyimage.com/100X75/0092d3/fff","url":"javascript:;"},
    {"name":"速腾","price0":"1111.11万","price1":"241956","price2":"0.7万","pic":"http://dummyimage.com/100X75/0092d3/fff","url":"javascript:;"},
    {"name":"速腾","price0":"1111.11万","price1":"241956","price2":"0.7万","pic":"http://dummyimage.com/100X75/0092d3/fff","url":"javascript:;"},
    {"name":"速腾","price0":"1111.11万","price1":"241956","price2":"0.7万","pic":"http://dummyimage.com/100X75/0092d3/fff","url":"javascript:;"},
    {"name":"速腾","price0":"1111.11万","price1":"241956","price2":"0.7万","pic":"http://dummyimage.com/100X75/0092d3/fff","url":"javascript:;"},
    {"name":"速腾","price0":"1111.11万","price1":"241956","price2":"0.7万","pic":"http://dummyimage.com/100X75/0092d3/fff","url":"javascript:;"},
    {"name":"速腾","price0":"1111.11万","price1":"241956","price2":"0.7万","pic":"http://dummyimage.com/100X75/0092d3/fff","url":"javascript:;"},
    {"name":"速腾","price0":"1111.11万","price1":"241956","price2":"0.7万","pic":"http://dummyimage.com/100X75/0092d3/fff","url":"javascript:;"}];
	*/

function getmoreAll(id,con){
    var Jmore = $$(id);  //获取 点击加载更多 按钮的id
    var page_num = 10; //每次显示个数
    var now_page = {{pageNo}}; //当前第几页
    var list_total = {{total}};  //获取数量
    if(list_total == 0){
        Jmore.style.display = "none"; 
    }
	var reset = document.getElementById("resetId")
	{{#if prePayRange}}
	  var prePayRange = {{prePayRange}};
	{{/if}}
	{{#if paymentRange}}
	  var paymentRange = {{paymentRange}};
	{{/if}}
	{{#if level}}
	  var level = {{level}};
	{{/if}}
	{{#if bid}}
	 reset.className  ="cur btn-cz";
	{{else}}
	 //设置重置样式
	if(prePayRange && paymentRange && level ){
	   if(prePayRange != 5 || paymentRange != 3 || level != 73){
	    reset.className  ="cur btn-cz";
	  }else{
	    reset.className  ="btn-cz";
	  }
	 }else{
        reset.className  ="btn-cz";
	 }
	{{/if}}
    var show = 0; //控制是否再加载
    var Jcon = $$(con);
    noMessage.style.display = "none"; 
    //数量超过0个时显示加载更多
    if(list_total > page_num){
        Jmore.style.display = "block";
    }else{
        Jmore.style.display = "none";
	}
    var pageNo = 2;
    Jmore.addEventListener("click",
    function more(Jmore){
       loadData('','','',pageNo,10);
	   pageNo++;
      //点击后异步加载后端数据
      /*
        var begin_num = parseInt((now_page - 1) * page_num);
        var end_num = now_page * page_num;
        if (begin_num < 1) {
            begin_num = 0;
        }
        if (end_num > list_total) {
            end_num = list_total
        };
        if (show == 0) {
            var arr = [];
            for (var i = begin_num; i < end_num; i++) {
                var txt = '<li><a href="javascript:;"><img src="'+data[i].pic+'" width="100" height="75" alt=""><div class="dDes"><p class="pTit">'+data[i].name+'</p><p><span>官方价：<em class="red">'+data[i].price0+'</em></span><span>月供：<em class="red">'+data[i].price1+'</em>元起</span>贷款成本：'+data[i].price2+'</p></div></a></li>';
                arr.push(txt);
            }
            Jcon.innerHTML = Jcon.innerHTML + arr.join("");
            now_page++;
            if (end_num == list_total) {
                show = 1;
                this.style.display='none';
                return false;
            }
        }
		*/
    });
	

}
function formSub(){
    //具体获取表单可以通过这里提交，已经检查过数据了。
    openPop("验证通过，执行ajax,开发在这里操作");
}
function reset(){
	{{#if prePayRange}}
	  var prePayRange = {{prePayRange}};
	{{/if}}
	{{#if paymentRange}}
	  var paymentRange = {{paymentRange}};
	{{/if}}
	{{#if level}}
	  var level = {{level}};
	{{/if}}
	{{#if bid}}
	  url = "http://{{{@root.host}}}/budgetp/r{{rId}}/s5-m3-l73-st{{sort}}/"
	  {{#if browser}}
    	 url  = url+ 'wx/'
	  {{/if}}
	  window.location.href=  url+'f{{{@root.flow}}}/';
	{{else}}
	 //设置重置样式
	if(prePayRange && paymentRange && level ){
	   if(prePayRange != 5 || paymentRange != 3 || level != 73){
		  url = "http://{{{@root.host}}}/budgetp/r{{rId}}/s5-m3-l73-st{{sort}}/";
		  {{#if browser}}
    	     url  = url+ 'wx/';
	      {{/if}}
	      window.location.href =  url+'f{{{@root.flow}}}/';
	   }
	}
	{{/if}}
}
getmoreAll("Jmore1","Jcon1");
/**************************点击查看更多***********************/


// 选品牌
function brandChoose(){
	 var shoufuSpan = document.getElementById('shoufu');
     if(shoufuSpan.innerHTML) {
        var shoufu = shoufuSpan.innerHTML;
        var s = shoufu.replace(/\n?\s*/,'');
        var q = s.indexOf('万');
        q++;
        shoufu = s.slice(0,q);
    }else if(shoufuSpan.innerText) {
        var shoufu = shoufuSpan.innerText;
    }else {
        var shoufu = shoufuSpan.textContent;
    }          //首付
	 if(!shoufu || shoufu == '0-3万'){
	    var shoufuNum =  2;
	 }                      
	 if(shoufu == '3-7万'){
	    var shoufuNum =  5;
	 }
	  if(shoufu == '7-15万'){
	    var shoufuNum =  10;
	 }
	  if(shoufu == '15-25万'){
	    var shoufuNum =  20;
	 }
	 if(shoufu == '25-35万'){
	    var shoufuNum =  30;
	 }
	  if(shoufu == '35万'){
	    var shoufuNum =  40;
	 }
	 var monthRangeSpan = document.getElementById('monthRange');
     if(monthRangeSpan.textContent) {
        var monthRange = monthRangeSpan.textContent;
        var s = monthRange.replace(/\n?\s*/,'');
        var q = s.indexOf('以')
        if(q == -1) {
            q = s.indexOf('-')
        }
        monthRange = s.slice(0,q);
    }else if(monthRangeSpan.innerText) {
        var monthRange = monthRangeSpan.innerText;
    }else {
        var monthRange = monthRangeSpan.innerHTML;
    }  //月供范围
      if(monthRange == '1,000元'){
        var monthRangeNum = 1;
	  }
	  if(monthRange == '1,000'){
        var monthRangeNum = 2;
	  }
	  if(!monthRange || monthRange == '3,000'){
        var monthRangeNum = 3;
	  }
	  if(monthRange == '5,000'){
        var monthRangeNum = 4;
	  }
	  if(monthRange == '10,000'){
        var monthRangeNum = 5;
	  }
	   if(monthRange == '20,000'){
        var monthRangeNum = 6;
	  }
	 var levelSpan = document.getElementById('level');
	 if(levelSpan.textContent) {
        var level = levelSpan.textContent;
        var s = level.replace(/\n?\s*/,'');
        var q = s.indexOf('车')
        if(q == -1) {
            q = s.indexOf('V')
        }
        q++;
        level = s.slice(0,q);
    }else if(levelSpan.innerText) {
        var level = levelSpan.innerText;
    }else {
        var level = levelSpan.innerHTML;
    }            //类型
	   if(level == '微型车'){
	   var levelNum = 76;
	  }
	  if(level == '小型车'){
	   var levelNum = 110;
	  }
	  if(!level || level == '紧凑型车'){
	   var levelNum = 73;
	  }
	  if(level == '中型车'){
	   var levelNum = 72;
	  }
	  if(level == '中大型车'){
	   var levelNum = 71;
	  }
	  if(level == '大型车'){
	   var levelNum = 70;
	  }
	  if(level == 'SUV'){
	   var levelNum = 75;
	  }
	  if(level == 'MPV'){
	   var levelNum = 74;
	  }
      sort = {{sort}};
      brandUrl="http://{{{@root.host}}}/brand/r{{rId}}/d"+shoufuNum+"-mp"+monthRangeNum+"-k"+levelNum;
	 if(sort){
        brandUrl =  brandUrl+'-st'+sort+'/';
	 }
	{{#if browser}}
    	brandUrl  = brandUrl + 'wx/'
	{{/if}} 
	 window.location.href= brandUrl+'f{{{@root.flow}}}/';
}
  //异步请求后端接口
var xmlhttp;
function send(method, url, callback) {
     if(window.XMLHttpRequest) {
         xmlhttp = new XMLHttpRequest();
        }else if(window.ActiveXObject) {
         xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
        }
        xmlhttp.onreadystatechange = callback;
        xmlhttp.open(method, url, true);
        xmlhttp.send();
}

function loadData(shoufuCheck,rangCheck,levelCheck,pageNo,pageSize){
	if(shoufuCheck == ''){
	 var shoufuSpan = document.getElementById('shoufu');
     if(shoufuSpan.innerHTML) {
        var shoufu = shoufuSpan.innerHTML;
        var s = shoufu.replace(/\n?\s*/,'');
        var q = s.indexOf('万');
        q++;
        shoufu = s.slice(0,q);
    }else if(shoufuSpan.innerText) {
        var shoufu = shoufuSpan.innerText;
    }else {
        var shoufu = shoufuSpan.textContent;
    }   //首付
	 if(shoufu == '0-3万'){
	    var shoufuNum =  2;
	 }                      
	 if(shoufu == '3-7万'){
	    var shoufuNum =  5;
	 }
	  if(shoufu == '7-15万'){
	    var shoufuNum =  10;
	 }
	  if(shoufu == '15-25万'){
	    var shoufuNum =  20;
	 }
	 if(shoufu == '25-35万'){
	    var shoufuNum =  30;
	 }
	  if(shoufu == '35万'){
	    var shoufuNum =  40;
	 }
	}else{
		var shoufuNum= shoufuCheck;
	}
	if(rangCheck == ''){
     var monthRangeSpan = document.getElementById('monthRange');
     if(monthRangeSpan.textContent) {
        var monthRange = monthRangeSpan.textContent;
        var s = monthRange.replace(/\n?\s*/,'');
        var q = s.indexOf('以')
        if(q == -1) {
            q = s.indexOf('-')
        }
        monthRange = s.slice(0,q);
    }else if(monthRangeSpan.innerText) {
        var monthRange = monthRangeSpan.innerText;
    }else {
        var monthRange = monthRangeSpan.innerHTML;
    } //月供范围
	  if(monthRange == '1,000元'){
        var monthRangeNum = 1;
	  }
	   if(monthRange == '1,000'){
        var monthRangeNum = 2;
	  }
	   if(monthRange == '3,000'){
        var monthRangeNum = 3;
	  }
	  if(monthRange == '5,000'){
        var monthRangeNum = 4;
	  }
	  if(monthRange == '10,000'){
        var monthRangeNum = 5;
	  }
	   if(monthRange == '20,000'){
        var monthRangeNum = 6;
	  }
	}else{
		var monthRangeNum = rangCheck;
	}
	if(levelCheck == ''){
	  var levelSpan = document.getElementById('level');
      if(levelSpan.textContent) {
        var level = levelSpan.textContent;
        var s = level.replace(/\n?\s*/,'');
        var q = s.indexOf('车')
        if(q == -1) {
            q = s.indexOf('V')
        }
        q++;
        level = s.slice(0,q);
    }else if(levelSpan.innerText) {
        var level = levelSpan.innerText;
    }else {
        var level = levelSpan.innerHTML;
    }           //类型
	  if(level == '微型车'){
	   var levelNum = 76;
	  }
	  if(level == '小型车'){
	   var levelNum = 110;
	  }
	  if(!level || level == '紧凑型车'){
	   var levelNum = 73;
	  }
	  if(level == '中型车'){
	   var levelNum = 72;
	  }
	  if(level == '中大型车'){
	   var levelNum = 71;
	  }
	  if(level == '大型车'){
	   var levelNum = 70;
	  }
	  if(level == 'SUV'){
	   var levelNum = 75;
	  }
	  if(level == 'MPV'){
	   var levelNum = 74;
	  }
	}else{
		var levelNum = levelCheck;
	}
	var brandSpan = document.getElementById('brand');
	var brand = brandSpan.innerText;           //品牌
	var bid =  document.getElementById('bid').value;
	//var monthRangeSpan = document.getElementById('monthRange');
    //var monthRange = monthRangeSpan.innerText;  //月供范围
    //var brandSpan = document.getElementById('brand');
	//var brand = brandSpan.innerText;         //品牌

	//异步请求后端数据接口
	//if(pageNo >1 && pageNo) {
  //  for(var i = 0 ; i < pageNo ; i++){	
	
	/*
    if(sort){
		url = url +"&sort="+sort;
	}
	*/
	sort ={{{sort}}};
	if(shoufuCheck || rangCheck || levelCheck ){
	if(sort){
		if(bid){
	  var url ="http://{{{@root.host}}}/budgetp/r{{rId}}/s"+shoufuNum+"-m"+monthRangeNum+"-l"+levelNum+"-st"+sort+"-b"+bid+"/";
	  {{#if browser}}
    	url  = url+ 'wx/'
	  {{/if}}
		}else{
			 var url ="http://{{{@root.host}}}/budgetp/r{{rId}}/s"+shoufuNum+"-m"+monthRangeNum+"-l"+levelNum+"-st"+sort+"/";
			   {{#if browser}}
    	        url  = url+ 'wx/'
	           {{/if}}

		}

	 }else{
		if(bid){
     var url ="http://{{{@root.host}}}/budgetp/r{{rId}}/s"+shoufuNum+"-m"+monthRangeNum+"-l"+levelNum+"-st1"+"-b"+bid+"/";
	 {{#if browser}}
    	 url  =  url + 'wx/'
	{{/if}}
		}else{
			var url ="http://{{{@root.host}}}/budgetp/r{{rId}}/s"+shoufuNum+"-m"+monthRangeNum+"-l"+levelNum+"-st1/";
			{{#if browser}}
    	        url  = url+ 'wx/'
	           {{/if}}

		}
	 }

	 if(pageNo){
		url = url +"&pageNo="+pageNo;
	 }
	 if(pageSize){
        url = url +"&pageSize="+pageSize;
	 }
	   //var url ="http://{{{@root.host}}}/budget/r1/?sort=2&level=73&prePayRange=5&paymentRange=3&bid=4";
	 window.location.href= url+'f{{{@root.flow}}}/';
	}else{
 
	 if(sort){
		 {{#if browser}}
	    var url ="http://{{{@root.host}}}/budgetpoxy/r{{rId}}/s{{sort}}/"+
    	 "wx/?"+"prePayRange="+shoufuNum+"&paymentRange="+monthRangeNum+"&level="+levelNum;
		 {{else}}
          var url ="http://{{{@root.host}}}/budgetpoxy/r{{rId}}/s{{sort}}/"+
    	 "?"+"prePayRange="+shoufuNum+"&paymentRange="+monthRangeNum+"&level="+levelNum;
		 {{/if}}
	 }else{
		 {{#if browser}}
      var url ="http://{{{@root.host}}}/budgetpoxy/r{{rId}}/s1/"+
    	 "wx/?"+"prePayRange="+shoufuNum+"&paymentRange="+monthRangeNum+"&level="+levelNum;
		 {{else}}
		    var url ="http://{{{@root.host}}}/budgetpoxy/r{{rId}}/s1/"+
    	 "?"+"prePayRange="+shoufuNum+"&paymentRange="+monthRangeNum+"&level="+levelNum;
		 {{/if}}
	 }
	 if(pageNo){
		url = url +"&pageNo="+pageNo;
	 }
	 if(pageSize){
        url = url +"&pageSize="+pageSize;
	 }
	 if(brand != '品牌'){
		  {{#if bid}}
		   url = url +"&bId="+{{bid}};
		  {{/if}}
	  }
      url+='f{{{@root.flow}}}/';
     send("GET", url, function() {
      if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
         var resultHtml = xmlhttp.responseText;
		 var replyJson = JSON.parse(resultHtml);
		 total = replyJson.total;
		//存在数据
		 if(replyJson){
             var pageSize = replyJson.pageSize;
			 var data=[];
             data = replyJson.list;
			 if(pageSize < 11){
				 var arr = [];
				if(data.length >0){
				 for(var i = 0 ; i < data.length ; i ++){
                    //动态更新数据
                      noMessage.style.display = "none"; 
					 {{#if browser}}
					 var txt = '<li><a href="http://{{{@root.host}}}/choose/r{{rId}}/sg'+data[i].serialGroupId+'-m'+data[i].modelId+'-s'+data[i].downPayment+'-p'+data[i].period+'/wx/f{{{@root.flow}}}/"><img src="'+data[i].icon+'" width="100" height="75" alt=""><div class="dDes"><p class="pTit">'+data[i].name+'</p><p><span>官方价：<em class="red">'+data[i].price+'万</em></span><span>月供：<em class="red">'+data[i].payment+'</em>元起</span>贷款成本：'+data[i].cost+'万</p></div></a></li>';
					 {{else}}
					 var txt = '<li><a href="http://{{{@root.host}}}/choose/r{{rId}}/sg'+data[i].serialGroupId+'-m'+data[i].modelId+'-s'+data[i].downPayment+'-p'+data[i].period+'/f{{{@root.flow}}}/"><img src="'+data[i].icon+'" width="100" height="75" alt=""><div class="dDes"><p class="pTit">'+data[i].name+'</p><p><span>官方价：<em class="red">'+data[i].price+'万</em></span><span>月供：<em class="red">'+data[i].payment+'</em>元起</span>贷款成本：'+data[i].cost+'万</p></div></a></li>';
					 {{/if}}
					 arr.push(txt)
				 }
				}else{
					 if(pageNo ==''){
					  noMessage.style.display = "block"; 
					 }
				}
				if(pageNo){
					 Jcon1.innerHTML =Jcon1.innerHTML + arr.join("");
				}else{
                    Jcon1.innerHTML = arr.join("");
				}
				if(total > (pageNo * pageSize) && (data.length >pageSize || data.length == pageSize)){
		          Jmore1.style.display = "block"; 
            	}else{
		          Jmore1.style.display = "none";      
	            }

			 }
			}
	        }
          });
	   } 
	// }
	//}
}
</script>
<script>
function cityChoose(){
	 var shoufuSpan = document.getElementById('shoufu');
     if(shoufuSpan.innerHTML) {
        var shoufu = shoufuSpan.innerHTML;
        var s = shoufu.replace(/\n?\s*/,'');
        var q = s.indexOf('万');
        q++;
        shoufu = s.slice(0,q);
    }else if(shoufuSpan.innerText) {
        var shoufu = shoufuSpan.innerText;
    }else {
        var shoufu = shoufuSpan.textContent;
    }         //首付
	 sort ={{{sort}}};
	 if(shoufu == '0-3万'){
	    var shoufuNum =  2;
	 }                      
	 if(shoufu == '3-7万'){
	    var shoufuNum =  5;
	 }
	  if(shoufu == '7-15万'){
	    var shoufuNum =  10;
	 }
	  if(shoufu == '15-25万'){
	    var shoufuNum =  20;
	 }
	 if(shoufu == '25-35万'){
	    var shoufuNum =  30;
	 }
	  if(shoufu == '35万'){
	    var shoufuNum =  40;
	 }
     var monthRangeSpan = document.getElementById('monthRange');
     if(monthRangeSpan.textContent) {
        var monthRange = monthRangeSpan.textContent;
        var s = monthRange.replace(/\n?\s*/,'');
        var q = s.indexOf('以')
        if(q == -1) {
            q = s.indexOf('-')
        }
        monthRange = s.slice(0,q);
    }else if(monthRangeSpan.innerText) {
        var monthRange = monthRangeSpan.innerText;
    }else {
        var monthRange = monthRangeSpan.innerHTML;
    }  //月供范围
	 if(monthRange == '1,000元'){
        var monthRangeNum = 1;
	  }
	 if(monthRange == '1,000'){
        var monthRangeNum = 2;
	  }
	 if(monthRange == '3,000'){
        var monthRangeNum = 3;
	  }
	 if(monthRange == '5,000'){
        var monthRangeNum = 4;
	  }
	 if(monthRange == '10,000'){
        var monthRangeNum = 5;
	  }
	  if(monthRange == '20,000'){
        var monthRangeNum = 6;
	  }
	  var levelSpan = document.getElementById('level');
	  if(levelSpan.textContent) {
        var level = levelSpan.textContent;
        var s = level.replace(/\n?\s*/,'');
        var q = s.indexOf('车')
        if(q == -1) {
            q = s.indexOf('V')
        }
        q++;
        level = s.slice(0,q);
    }else if(levelSpan.innerText) {
        var level = levelSpan.innerText;
    }else {
        var level = levelSpan.innerHTML;
    }          //类型
	  if(level == '微型车'){
	   var levelNum = 76;
	  }
	  if(level == '小型车'){
	   var levelNum = 110;
	  }
	  if(level == '紧凑型车'){
	   var levelNum = 73;
	  }
	  if(level == '中型车'){
	   var levelNum = 72;
	  }
	  if(level == '中大型车'){
	   var levelNum = 71;
	  }
	  if(level == '大型车'){
	   var levelNum = 70;
	  }
	  if(level == 'SUV'){
	   var levelNum = 75;
	  }
	  if(level == 'MPV'){
	   var levelNum = 74;
	  }
	  var brandSpan = document.getElementById('brand');
	  var brand = brandSpan.innerText;           //类型
      var url ="http://m.pcauto.com.cn/x/selectcity/jr/?returns=http://{{{@root.host}}}/budgetp/" 
	  if(shoufuNum){
		  url = url +'s'+shoufuNum+'-';
	  }
	  if(monthRange){
		  url = url +'m'+monthRangeNum+'-';
	  }
	  if(level){
		  url = url +'l'+levelNum+'-';
	  }
	  
	 if(sort){
		 url = url +'st'+sort;
	 }else{
		 url = url +'st1';
	 }
	 if(brand != '品牌'){
		  {{#if bid}}
		   url = url +'-b'+{{bid}};
		  {{/if}}
	  }
	  
	 url =url +'/';
	 {{#if browser}}
	     url = url + 'wx/';
	  {{/if}}
	 window.location.href= url+'f{{{@root.flow}}}/';
}


</script>


<script>
// 保存选项值与索引的关系value-index
//prePayRangeMap[0] = '0-3万';
var prePayRangeMap={2:0,5:1,10:2,20:3,30:4,40:5}
var paymentRangeMap={1:0,2:1,3:2,4:3,5:4,6:5}
var levelMap={76:0,110:1,73:2,72:3,71:4,70:5,75:6,74:7}
/****************更新选择条件******************/
setOptions('{{prePayRange}}','{{paymentRange}}','{{level}}');
function setOptions(prePayRange,paymentRange,level){
	var fIndex=prePayRangeMap[prePayRange];
	var pIndex=paymentRangeMap[paymentRange];
	var tIndex=levelMap[level];
	getStr(fIndex,pIndex,tIndex);
}

</script>
<script>_submitIvyID();</script>

</body>
</html>