alphabetBrandList.wxml 2.42 KB
<!--pages/goodsList/alphabetBrandList.wxml-->
<view class="container" style="width: {{windowWidth}}px; height: {{screenHeight-64}}px">
  <!-- 选中的品牌 -->
  <view class="top-container" wx:if="{{selectedItems.length > 0}}">
    <scroll-view class="scroll-view-top" scroll-x>
      <block wx:for="{{selectedItems}}" wx:key="unique">
        <view class="filter-item-container" style="margin-left: {{index == 0 ? 15*scale : 0}}px; margin-right: {{index == selectedItems.length-1 ? 15*scale : 5*scale}}px" bindtap="deleteBrand" data-item='{{item}}' data-index='{{index}}'>
          <view class="filter-item-content">
            <image class="filter-icon" src='./images/filteritem-higjlight@2x.png'></image>
            <text class="item-text">{{item.itemName}}</text>
          </view>
        </view>
      </block>
    </scroll-view>
  </view>

  <!-- 品牌滑动区域 64顶部状态栏高度, 45底部固定按钮高度, 60顶部选中品牌悬浮高度 -->
  <scroll-view scroll-y style="height: {{screenHeight - 64 - 45 - (allSelect ? 0 : 60)}}px" scroll-into-view="{{alpha}}">
    <view wx:if='{{alphabetList.length > 0}}' class="section-item-cell" bindtap="clearBrand">
      <text class='head-text'>全部品牌</text>
      <image wx:if='{{allSelect}}' class='checked' src='./images/checked.png'></image>
    </view>
    <view wx:for="{{alphabetList}}" wx:key="unique" id="{{item.initial}}">
      <view class="section-item-header"> {{item.initial}}</view>
      <view class="section-item-cells" wx:for="{{item.brandInfo}}" wx:key="unique" wx:for-item="cell" wx:for-index="cellIndex" bindtap='selectBrand' data-item='{{cell}}'>
        <view class="section-item-cell {{cellIndex != (item.brandInfo.length-1) ? 'border-bottom':''}}">
          <text>{{cell.itemName}}</text>
          <image wx:if='{{cell.isSelected}}' class='checked' src='./images/checked.png'></image>
        </view>
      </view>
    </view>
  </scroll-view>

  <view wx:if='{{alphabetList.length > 0}}' class="bottom-view">
    <text class="filter-bottom-text" bindtap="clearBrand">清空</text>
    <view class="filter-separator"></view>
    <text class="filter-bottom-text" bindtap="submitBrand">确定</text>
  </view>
</view>

<view class="alphanet-selector" data-id="selector" catchtouchstart="handlerAlphaTap" catchtouchmove="handlerMove">
  <view class="selector-one" data-ap="{{item.initial}}" wx:for="{{alphabetList}}" wx:key="unique">
    {{item.initial}}
  </view>
</view>