category.ttml
2.98 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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
<genderSwitcher data="{{currentChannelId}}" bindswitchChannel="switchChannel"></genderSwitcher>
<view class="s"></view>
<scroll-view class="left-view" style="height:{{scrollHeight}}px;" scroll-y>
<view class="category-item " bindtap="onBrandItemSelected" >
<view class="item-left"/>
<view class="item-name">品牌</view>
<view class="divide-line" />
</view>
<block tt:for="{{categoryList[currentChannelId]}}" tt:key="{{item.category_id}}">
<view class="category-item {{currentCateId == item.category_id ? 'selected' : ''}}" data-id="{{item.category_id}}" data-name="{{item.category_name}}" data-index="{{index}}" bindtap="onCategoryItemSelected" >
<view class="item-left"/>
<view class="item-name">{{item.category_name}}</view>
<view class="divide-line" />
</view>
</block>
</scroll-view>
<scroll-view class="right-view" style="height:{{scrollHeight}}px;" scroll-y>
<view tt:if="{{currentSubCateData.salesInfo && currentSubCateData.salesInfo.length > 0}}" class="category-block">
<view class="category-block-header"> — 热门推荐 — </view>
<view class="category-block-body">
<block tt:for="{{currentSubCateData.salesInfo}}" tt:key="{{item.category_id}}">
<view class="category-item-block" data-url="{{item.url}}" data-cate_id="{{item.category_id}}"data-f_id="1001" bindtap="onHotRecommendItemTapped">
<image src="{{item.default_images}}" class="category-item-img"></image>
<view class="category-item-name">{{item.category_name}}</view>
</view>
</block>
</view>
</view>
<view tt:if="{{currentSubCateData.sortInfo && currentSubCateData.sortInfo.length > 0}}" class="category-block">
<view class="category-block-header"> — 全部{{currentCateValue}} — </view>
<view class="category-block-body">
<block tt:for="{{currentSubCateData.sortInfo}}" tt:key="{{item.category_id}}">
<view class="category-item-block" data-data="{{item}}" bindtap="onCategoryItemTapped">
<image src="{{item.default_images}}" class="category-item-img"></image>
<view class="category-item-name">{{item.category_name}}</view>
</view>
</block>
<view class="category-item-block" data-id="{{currentCateId}}" bindtap="onCategoryMoreTapped">
<view class="category-item-more">MORE</view>
</view>
</view>
</view>
<view tt:if="{{currentSubCateData.brandInfo && currentSubCateData.brandInfo.length > 0}}" class="category-block">
<view class="category-block-header"> — 热门品牌 — </view>
<view class="category-block-body">
<block tt:for="{{currentSubCateData.brandInfo}}" tt:key="{{item.id}}">
<view class="brand-item-block" data-data="{{item}}" bindtap="onHotBrandItemTapped">
<image src="{{item.brand_ico}}" class="brand-item-img"></image>
<view class="brand-item-name">{{item.brand_name}}</view>
</view>
</block>
</view>
</view>
</scroll-view>
<loading tt:if="{{isFetching}}">加载中</loading>