码迷,mamicode.com
首页 > 其他好文 > 详细

车林通购车之家--购车计算器模块--车型弹窗

时间:2018-01-02 13:24:11      阅读:185      评论:0      收藏:0      [点我收藏+]

标签:模块   asc   comm   gray   弹出层   attr   carp   init   计算器   

//car-model-select-tanchaung.twig

  <!--对车车型弹出层 S-->
  <div class="select-models">
      <header class="common-header font32">
      <a class="goback close-select" href="javascript:void(0)"><i class="arrow-icon go-back-icon"></i></a>
      车林通<i class="circle-icon"></i><span>选择车款</span>
      <a class="header-search"><i class="common-icon search-icon"></i></a>
    </header>
    <ul class="switch-nav switch-nav-model db-tags bgfff clearfix">
        <li class="active"><a id="cc">奥迪A4L</a></li>
        <li><a><span>按品牌查找<i class="line"></i></span></a></li>
        <li><a><span>历史记录<i class="line"></i></span></a></li>
    </ul>
    <div id="kk" class="switch-item switch-item-model active">
      <div class="year-tt font24 color-gray"></div>
      <ul id="kkd" class="pic-txt-j">  
          <li>
          <a href="javascript:voil(0);">
            <h4 class="font28 color-light-gray"></h4>
            <p class="font24 color-gray"></p>
          </a>
        </li>
      </ul>
    </div>
    <div class="switch-item switch-item-model">
        <div class="blank20"></div>
        <div class="bgfff">
        <div class="tt-small font24 color-blue">热门品牌</div>
        <div class="brand-hot" id="brand-hot">
          <ul class="clearfix">
            {% for i in hotBrands %}
            <li>
               <a href="#" id="{{i.id}}" class="{{i.name}}">
                <img class="brand-logo" src="{{i.logo}}" /> 
                <p class="brand-name">{{i.name}}</p>
              </a>
            </li> 
            {% endfor %}
          </ul>
        </div>
      </div>
      <div class="bg-wrap">
        {% for initial,brand in brands %}
        <div class="tt-small font24 color-blue" id="char-nav-{{initial}}">{{initial}}</div>
        <div class="bybrand-list" id="bybrand-list">
          <ul> 
            {% for j in brand%}
            <li>
              <a href="#" id="{{j.id}}" class="{{j.name}}">
                <img  class="brand-logo" src="{{j.logo}}" />
                <span class="brand-name">{{j.name}}</span>
              </a>
            </li>  
            {% endfor %}
          </ul>
        </div>
        {% endfor %} 
      </div>
                
      <div class="fixed-letter-nav">
        <ul class="rows-box">
          <li><a href="#">热</a></li>
          <li><a href="#char-nav-A">A</a></li>
          <li><a href="#char-nav-B">B</a></li>
          <li><a href="#char-nav-C">C</a></li>
          <li><a href="#char-nav-D">D</a></li>
          <li><a href="#char-nav-F">F</a></li>
          <li><a href="#char-nav-G">G</a></li>
          <li><a href="#char-nav-H">H</a></li>
          <li><a href="#char-nav-J">J</a></li>
          <li><a href="#char-nav-K">K</a></li>
          <li><a href="#char-nav-L">L</a></li>

          <li><a href="#char-nav-M">M</a></li>
          <li><a href="#char-nav-N">N</a></li>
          <li><a href="#char-nav-O">O</a></li>
          <li><a href="#char-nav-P">P</a></li>
          <li><a href="#char-nav-Q">Q</a></li>
          <li><a href="#char-nav-R">R</a></li>
          <li><a href="#char-nav-S">S</a></li>
          <li><a href="#char-nav-T">T</a></li>
          <li><a href="#char-nav-W">W</a></li>
          <li><a href="#char-nav-X">X</a></li>
          <li><a href="#char-nav-Y">Y</a></li>
          <li><a href="#char-nav-Z">Z</a></li>
        </ul>
      </div>
      <!--品牌选择弹窗-->
      <div class="left-mask1"></div>
      <div class="left-popup popup-type rand-list">
        <div class="swipe-left">
          <div class="choose-car-name-close">
            
          </div>
          <span id="tt">
                
          </span>        
      </div>
      </div>
      <!--车系选择弹窗-->
      <div class="left-mask2"></div>
      <div class="left-popup popup-type rand-model-list">
        <div class="swipe-left">
          <p class="dealer-type font26">
          </p>
          <span id="aa">
          </span>
    </div>
  </div>
  </div>
  <!--历史记录-->
  <div class="switch-item switch-item-model">
        <ul id="mm" class="pic-txt-f">
            {% for i in history%}
            <li brandId="{{i.brand_id}}" seriesId="{{i.series_id}}" modelId="{{i.model_id}}" price="{{i.price}}">
                <a href="javascript:void(0);">
                    <h4 class="font28" style="color:#666666">{{i.name}}</h4>
                    <p class="font24" style="color:#999999">{{i.price}}元</p>
                    <p class="font24" style="color:#999999">{{i.view_time}}</p>
                 </a>
            </li>
            {% endfor %}
        </ul>
  </div>
</div>
{{ use(common\\widgets\\JsBlock) }}
{{ js_block_begin() }}
<script> 
     $("#mm li").click(function(){
          bd=$(this).attr("brandId");
          sd=$(this).attr("seriesId");
          md=$(this).attr("modelId");
          $.cookie("brand_id",bd);
          $.cookie("series_id",sd);
          $.cookie("model_id",md);
          var htmg=$(this).find("h4").text();
          $.cookie("htmg",htmg);
          hidCarPrice=$(this).attr("price");
          $.cookie(hidCarPrice,hidCarPrice);
          //设置单机后颜色
          $(".pic-txt-f li").find("h4").attr("style","color:#666666");
          $(".pic-txt-f li").find("p").attr("style","color:#999999");
          $(this).find("a").css("color","#3B5998");                                                  
          $(this).find("h4").removeAttr("style");
          $(this).find("p").removeAttr("style"); 
          if($.cookie("k")==0){  
                 var url=window.location.href;
                 if(url.indexOf("dk")>0){
                       location.href={{path([dk])}}?model_id=+md+&brand_id=+bd+&series_id=+sd; 
                 }else if(url.indexOf("qk")>0){
                       location.href={{path([qk])}}?model_id=+md+&brand_id=+bd+&series_id=+sd; 
                 }else{
                       location.href={{path([bx])}}?model_id=+md+&brand_id=+bd+&series_id=+sd; 
                 } 
          } 
          $("#select_carname2").html(htmg);
          $("#luochePrice3").attr("value",hidCarPrice);
          $(".select-models").hide();
    });
</script>
{{ js_block_end() }}   

 

车林通购车之家--购车计算器模块--车型弹窗

标签:模块   asc   comm   gray   弹出层   attr   carp   init   计算器   

原文地址:https://www.cnblogs.com/zouke1220/p/8176483.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!