alphabetBrandList.wxml
2.42 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
<!--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>