category.wxml
2.82 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
<!--category.wxml-->
<import src="./genderSwitcher.wxml"/>
<template is='genderSwitcher' data='{{currentChannelId}}'/>
<view class="s"></view>
<scroll-view class="left-view" style="height:{{scrollHeight}}px;" scroll-y>
<block wx:for="{{categoryList[currentChannelId]}}" wx: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 wx:if="{{currentSubCateData.salesInfo && currentSubCateData.salesInfo.length > 0}}" class="category-block">
<view class="category-block-header"> — 热门推荐 — </view>
<view class="category-block-body">
<block wx:for="{{currentSubCateData.salesInfo}}" wx: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 wx:if="{{currentSubCateData.sortInfo && currentSubCateData.sortInfo.length > 0}}" class="category-block">
<view class="category-block-header"> — 全部{{currentCateValue}} — </view>
<view class="category-block-body">
<block wx:for="{{currentSubCateData.sortInfo}}" wx: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 wx:if="{{currentSubCateData.brandInfo && currentSubCateData.brandInfo.length > 0}}" class="category-block">
<view class="category-block-header"> — 热门品牌 — </view>
<view class="category-block-body">
<block wx:for="{{currentSubCateData.brandInfo}}" wx: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 wx:if="{{isFetching}}">加载中</loading>