home.wxml
5.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
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
<!--pages/home/home.wxml-->
<view class="contenter">
<!-- 搜索框 -->
<view>
<view class="search_center" catchtap="goSearch">
<view class="real_search_center">
<view class="iconfont icon-sousuo"></view>
<input placeholder='搜索' placeholder-class="placeholder" disabled />
</view>
</view>
</view>
<!-- 轮播图 -->
<view>
<swiper class="swiper" indicator-dots="true" autoplay="true" interval="5000" duration="1000">
<block wx:for="{{swiperArray}}" wx:for-index="idx">
<swiper-item bindtap="goBannnerDetail" data-url="{{item.url}}" data-index="{{index}}">
<image src="{{item.img}}" class="slideImage" mode="widthFix"></image>
</swiper-item>
</block>
</swiper>
</view>
<!-- 分类 -->
<view class="classify">
<scroll-view class='wrapper1' scroll-x="true">
<view wx:for="{{classifyArray}}" class="classifyItem" bindtap="classifyEvent" data-id="{{item.categoryId}}"
data-index="{{index}}">
<view class="classifyPic">
<image src="{{item.icon}}"></image>
</view>
<view class="classifyText">{{item.categoryName}}</view>
</view>
</scroll-view>
</view>
<!-- 限时优惠 -->
<view class="dayDiscount" wx:if="{{limitCountShow}}">
<view class="discountTitle">
<view class="limitCount">{{limitCount}}</view>
<!-- 倒计时 -->
<view class="countTime" wx:if="{{countDownShow}}">
<van-count-down use-slot time="{{ time }}" bind:change="onChange1">
<text class="item">{{ timeData.hours }}</text>
<text style="color:#FF593C">:</text>
<text class="item">{{ timeData.minutes }}</text>
<text style="color:#FF593C">:</text>
<text class="item">{{ timeData.seconds }}</text>
</van-count-down>
</view>
<view class="moreCount" bindtap="moreCount">{{moreCount}}</view>
<view class="arrow" bindtap="moreCount"></view>
</view>
<!-- <view class="discountContent"> -->
<scroll-view class='wrapper' scroll-x="true">
<view class="contentItem" wx:for="{{discountArray}}">
<view class="countPic" bindtap="goGoodsDetail" data-id="{{item.goodsId}}">
<image src="{{item.goodsImg}}"></image>
</view>
<view class="countText">{{item.goodsName}}</view>
<view class="countPrice">¥{{item.goodsPrice}}</view>
<view class="countNum">
<view class="num">还剩{{item.goodsStock}}件</view>
<view class="icon" bindtap="addCart" data-id="{{item.defaultSku}}" data-type="{{item.type}}">
<image src="/images/01-01/cart.png"></image>
</view>
</view>
</view>
</scroll-view>
<!-- </view> -->
</view>
<!-- 每日特价 -->
<view class="dayPriceContent">
<view class="dayPrice" wx:if="{{dayPriceShow}}">
<view class="dayPriceTitle">
<view class="dayPriceText">{{dayPrice}}</view>
<view class="dayPriceTime">
<van-count-down use-slot time="{{ times }}" bind:change="onChange2">
<text class="item">{{ timeDatas.hours }}</text>
<text style="color:#FF593C">:</text>
<text class="item">{{ timeDatas.minutes }}</text>
<text style="color:#FF593C">:</text>
<text class="item">{{ timeDatas.seconds }}</text>
</van-count-down>
</view>
<view class="morePrice" bindtap="morePrice">{{morePrice}}</view>
<view class="arrow" bindtap="morePrice"></view>
</view>
<view class="dayPricePicMain">
<scroll-view class='wrapper' scroll-x="true">
<view wx:for="{{dayPicArray}}" class="dayPricePic" bindtap="goGoodsDetail" data-id="{{item.goodsId}}">
<image src="{{item.goodsImg}}"></image>
</view>
</scroll-view>
</view>
</view>
<view class="mainly">
<view class="dayPriceTitle">
<view class="dayPriceText">{{nameData.name}}</view>
<view class="mainlyTitle">{{nameData.label}}</view>
</view>
<view class="dayPricePicMain">
<scroll-view class='wrapper' scroll-x="true">
<view wx:for="{{marilyArray}}" class="dayPricePic" bindtap="goGoodsDetail" data-id="{{item.goodsId}}">
<image src="{{item.goodsImg}}"></image>
</view>
</scroll-view>
</view>
</view>
</view>
<!-- 每日精选 -->
<van-tabs active="{{0}}" bind:change="onChange">
<van-tab title="{{item.categoryName}}" wx:for="{{pickArray}}">
<view class="pickContainer">
<view class="pickContent">
<view class="pickItem" wx:for="{{pickList}}" data-id="{{item.goodsId}}" bindtap="goGoodsDetail">
<view class="pickPic">
<image src="{{item.goodsImg}}"></image>
</view>
<view class="pickTitle">{{item.goodsName}}</view>
<view class="pickDesc">{{item.goodsAttributes}}</view>
<view class="userInfo">
<view class="collectIcon">
<image src="{{item.collectIcon}}"></image>
<view style="display:inline-block">¥{{item.goodsPrice}}</view>
</view>
</view>
</view>
</view>
</view>
</van-tab>
</van-tabs>
<!-- 优惠券弹出层 -->
<van-cell title="展示弹出层" is-link bind:click="showPopup"></van-cell>
<van-popup show="{{show}}" bind:close="onClose">
<view class="popupBox">
<view class="delIcon" bindtap="onClose">
<image src="/images/01-02/quxiao.png"></image>
</view>
<view class="popupPic">
<image src="/images/popup.png"></image>
</view>
<view>
<view class="popupText"> 实名优惠活动券</view>
<view class="popupImg" wx:for="{{discountCartArray}}" wx:if="{{item.status}}">
<view class="left"></view>
<view class="right"></view>
<view class="popupNamePic">{{item.name}}</view>
<view class="popupPriceBox">
<view class="popupIcon">¥</view>
<view class="popupPrice">{{item.amount}}</view>
</view>
</view>
<view class="popupBtn" bindtap="getDiscountCart">立即领取</view>
</view>
</view>
</van-popup>
</view>