classify.wxml
4.6 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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
<!--pages/classify/classify.wxml-->
<!-- 搜索框 -->
<view class="searchMain">
<view class="location">
<image src="/images/location.png"></image>
<text>{{location}}</text>
</view>
<view class="searchBox">
<view class="search_center" catchtap="goSearch">
<view class="real_search_center">
<input class="weui-input" auto-focus="{{false}}" placeholder="请输入商品名称" bindinput="getKeyWord"
placeholder-class="placeholder" />
<view class="search_right" catchtap="search">
<image src="/images/01-02/sousuo.png"></image>
</view>
</view>
</view>
</view>
</view>
<!-- 侧边导航 -->
<view class="navSide">
<van-sidebar active-key="{{ activeKey }}" style="background:rgb(247,248,250)">
<view wx:for="{{lableArray}}" data-id="{{item.categoryId}}" bindtap="onChange">
<van-sidebar-item title="{{item.categoryName}}" />
</view>
</van-sidebar>
<!-- 导航content -->
<view class="navContent">
<scroll-view scroll-with-animation scroll-y class="scroll-view">
<view class="navItem" wx:for="{{list}}" data-id="{{item.goodsId}}" data-index="{{index}}" bindtap="goGoodsDetail">
<view class="productLeft">
<image src="{{item.goodsImg}}"></image>
</view>
<view class="productRight">
<view class="name">{{item.goodsName}}</view>
<view class="detail">{{item.goodsAttributes}}</view>
<view class="num">
<view class="jNum" wx:if="{{item.type==1}}">积分:{{item.goodsPrice}}</view>
<view class="jNum" wx:if="{{item.type==2}}">
<text class="priceIcon">¥</text>
{{item.goodsPrice}}</view>
<view class="addIcon" catchtap="addCart" data-id="{{item.goodsId}}" data-index="{{index}}"
wx:if="{{item.type==2}}">
<image src="/images/03-02/tianjia.png"></image>
</view>
<view class="exchange" wx:if="{{item.type==1}}" catchtap="exchange" data-integral="{{item.goodsPrice}}"
data-defaultSku="{{item.defaultSku}}">
<image src="/images/03-02/duihuan.png"></image>
</view>
</view>
</view>
</view>
</scroll-view>
<view class="bottomHint" wx:if="{{bottomHint}}">
我是有底线的~
</view>
</view>
</view>
<!-- 加入购物车弹框 -->
<view class="mask" catchtap="closeMask" wx:if='{{showMask}}'>
<view class="diceng" catchtap="openMask">
<view class="info">
<image src="{{goodsData.goodsBanners[0]}}"></image>
<view class="info_right">
<view class="info_price">¥{{goodsData.list[idx].goodsPrice}}</view>
<view class="info_stock">库存:{{goodsData.list[idx].goodsStock}}件</view>
<view class="info_stock" wx:if='{{info.detai.spec_type=="20"}}'>请选择规格</view>
</view>
</view>
<view class="attr" wx:if='{{info.detail.spec_type=="20"}}' wx:for='{{info.specData.spec_attr}}' wx:key='index'>
<view>{{item.group_name}}</view>
<view class="attr_main">
<view class="attr_item {{cell.flag?'activity':''}}" wx:for='{{item.spec_items}}' wx:for-item='cell'
wx:for-index='cellindex' wx:key='{{cellindex}}' data-index='{{index}}' data-cellindex='{{cellindex}}'
catchtap="changeAttrNum">{{cell.spec_value}}</view>
</view>
</view>
<view class="spec">
<view class="{{idx==index?'specItem1':'specItem'}}" wx:for="{{goodsData.list}}" bindtap="check"
data-index="{{index}}" data-id="{{item.goodsSkuId}}">{{item.goodsSkuName}}</view>
</view>
<view class="pay_count">
<view>购买数量</view>
<view class="count_box">
<view class="count_jian" catchtap="decNum">-</view>
<view class="real_count">{{count}}</view>
<view class="count_jian" catchtap="addNum">+</view>
</view>
</view>
<view class="confrimBtn" catchtap="confrimCart">确定</view>
</view>
</view>
<!-- tabbar -->
<view class="tabbarBox">
<ul>
<li>
<view class="tabbarPic" bindtap="toHome">
<image src="/images/tab/home.png"></image>
</view>
<text bindtap="toHome">首页</text>
</li>
<li>
<view class="tabbarPic">
<image src="/images/tab/classify.png"></image>
</view>
<text class="check">分类</text>
</li>
<li>
<view class="tabbarPic" bindtap="toShopCart">
<image src="/images/tab/cart (2).png"></image>
</view>
<text bindtap="toShopCart">购物车</text>
</li>
<li>
<view class="tabbarPic" bindtap="toUser">
<image src="/images/tab/user.png"></image>
</view>
<text bindtap="toUser">我的</text>
</li>
</ul>
</view>