zoukankan      html  css  js  c++  java
  • 车林通购车之家--购车计算器模块--车型弹窗

    //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() }}   
  • 相关阅读:
    [oldboy-django][2深入django]老师管理--查看,添加,编辑
    全虚拟化和半虚拟化的区别 cpu的ring0~ring3又是什么概念?
    Ansible Jinja if 生成不同的MySQL文件
    Linux内核优化(未注释)
    CentOS7入门到精通实战课程课后习题
    基于sersync海量文件实时同步
    CentOS6系统优化
    lnmp架构实现动态php
    云计算与虚拟化KVM深度实践
    Linux6系统安装
  • 原文地址:https://www.cnblogs.com/zouke1220/p/8176483.html
Copyright © 2011-2022 走看看