CarBrand.wxml 3.41 KB
<!--packageMine/components/CarBrand/CarBrand.wxml-->
<view class="car-brands-box">
<view class="box-title">选择品牌</view>
  <view class="car-brands">
    <scroll-view style="height:100%;" scroll-y scroll-into-view="{{letter}}">
      <block wx:if="{{flag}}">
        <block wx:if="{{brandList.length > 0}}">
          <block wx:for="{{brandList}}" wx:key="index">
            <view id="{{item.letter}}">
              <!-- <view class="title y-center">{{item.letter}}</view> -->
              <view class="box">
                <block wx:for="{{item.list}}" wx:for-item="i" wx:key="ind" wx:for-index="ind">
                  <!-- <view class="brands" catchtap="showChilds" data-index='{{index}}' data-ind='{{ind}}'> -->
                  <view class="brands" data-index='{{index}}' data-ind='{{ind}}'>
                    <view class="list y-center">
                      <view class="pBrand">
                        <image class="logo" src="{{i.logoUrl}}"></image>
                        {{i.label}}
                      </view>
                    </view>
                    <!-- <block wx:if="{{i.active && i.childs}}"> -->
                    <block wx:if="{{i.children}}">
                      <block wx:for="{{i.children}}" wx:key="cind" wx:for-item="c" wx:for-index="cind">
                        <!-- <view class="list y-center child" catchtap="showCarSeriesList" data-item="{{i}}" data-that="{{c}}"> -->
                        <view class="list y-center child {{c.active ? 'active' : ''}}" catchtap="clickChild" data-index="{{index}}" data-pidx="{{ind}}" data-cidx="{{cind}}" data-pitem="{{i}}" data-that="{{c}}">
                          {{c.label}}
                          <glsx-image src="personal/checked.png" class="icon" />
                        </view>
                      </block>
                    </block>
                  </view>
                </block>
              </view>
            </view>
          </block>
        </block>
        <block wx:else>
          <view class="nothing">暂无数据</view>
        </block>
      </block>

    </scroll-view>
    <view class="side-bar" id="side-bar">
      <block wx:for="{{brandList}}" wx:key="index">
        <view data-letter="{{item.letter}}" class="view {{item.active?'active':''}}" capture-catch:touchstart="start" id="letter-{{item.letter}}" data-index="{{index}}" capture-catch:touchmove="move" capture-catch:touchend="end">{{item.letter}}
        </view>
      </block>
    </view>
    <!-- 提示 -->
    <view class='tips' hidden='{{!showTip}}'>{{letter}}</view>
  </view>
  <!-- 车系车型 -->
  <!-- <block wx:if="{{carSeriesList.length}}">
    <view class="car-type-box">
      <view class="bg" bindtap="cancel" catchtouchmove="noScroll"></view>
      <view class="brands-box">
        <block wx:for="{{carSeriesList}}" wx:key="index">
          <view class="title y-center" bindtap="toggle" data-index="{{index}}" data-id="{{item.id}}">{{item.name}}
          </view>
          <view class="box" hidden="{{!item.active}}">
            <block wx:for="{{item.list}}" wx:for-item="i" wx:key="id">
              <view class="brands-list y-center" bindtap="choose" data-item="{{item}}" data-that="{{i}}">{{i.name}}
              </view>
            </block>
          </view>
        </block>
      </view>
    </view>
  </block> -->
</view>
<!-- <view class="btn-box">
  <view class="btn btn-cancel">取消</view>
  <view class="btn" bindtap="handleConfirm">确定</view>
</view> -->