activity_share.wxml
11.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
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
<wxs module="g_filter" src="g_filter.wxs"></wxs>
<view class="container">
<!-- 搜索框 -->
<view class="search-container">
<view class="input-container"><input bindinput="set_search_value" class="search" type="text" placeholder="请输入您想查找的商品信息"/></view>
<view bindtap="search_data" class="btn-search">搜索</view>
</view>
<!-- 列表 -->
<view class="list-container">
<!-- 标题 -->
<view class="title" >
<block wx:for="{{tab}}">
<view class="title-item {{currentIndex == index ? 'active':''}}" data-index="{{index}}" bindtap="clickTab">{{item}}</view>
</block>
</view>
<!-- 促销页标题 -->
<view class="subTab-title flex" wx:if="{{currentIndex == 2}}">
<block wx:for="{{tab2}}">
<view class="subTab-titleItem {{currentIndex2 == index ? 'active':''}}" data-index="{{index}}" bindtap="clickTab2">{{item}}</view>
</block>
</view>
<!-- 列表项 -->
<scroll-view
class="list {{currentIndex == 2?'active1':''}} {{currentIndex == 3?'active2':''}}"
scroll-y="true"
bindscrolltolower="refresh"
scroll-anchoring
>
<block wx:for="{{list}}">
<!-- 拼单和秒杀 -->
<block wx:if="{{currentIndex == 0 || currentIndex == 1}}">
<view class class="list-item" bindtap="go_goods" data-index="{{index}}">
<view class="img-container">
<image src="{{url+item.original_img}}" style="width: 100%; height: 100%;"
binderror="bind_bnerr2" lazy-load="true"
data-errorimg="list[{{index}}].original_img"></image>
</view>
<view class="details">
<view class="fs28 name ellipsis-2">{{item.title}}</view>
<view>
<!-- 点击秒杀时显示 -->
<view class="flex ai-center pdtb8" wx:if="{{currentIndex == 0}}">
<view class="progress-container">
<progress class="progress" percent="{{100*(item.goods_num-item.buy_num)/item.goods_num}}" border-radius="6" stroke-width="14" activeColor="#FE6867" backgroundColor="#ccc"></progress>
<text class="percent fs20">剩余{{g_filter.toFix(100*(item.goods_num-item.buy_num)/item.goods_num,2) }}%</text>
</view>
<view class="fs22 gray">已抢{{item.buy_num}}件</view>
</view>
<!-- 点击拼单时显示 -->
<view class="flex pdtb6" wx:if="{{currentIndex == 1}}">
<view class="group-num">已拼{{item.buy_num}}份</view>
<view class="group-type">{{item.ct_num}}人团</view>
</view>
<!-- 公共项 -->
<view class="fs22 red">剩余:
<text class='tui-conutdown-box'> {{item.djs.day}}</text>天
<text class='tui-conutdown-box'>{{item.djs.hou}}</text>时
<text class='tui-conutdown-box'>{{item.djs.min}}</text>分
<text class='tui-conutdown-box tui-countdown-bg'>{{item.djs.sec}}</text>秒
</view>
</view>
<view class="red flex ai-center">
<view>¥{{item.price}}</view>
<view class="retail">零售价:¥{{item.market_price}}</view>
</view>
<view catchtap="share_good" data-index="{{index}}" class="t-r fs28"><text class="btn-share">分享</text></view>
</view>
</view>
</block>
<!-- 促销 - 订单促销 -->
<block wx:if="{{currentIndex == 2}}">
<view class="subTab-container">
<view class="subTab-list">
<view class="subTab-item">
<view class="bdr-b">
<view class="flex">
<view wx:if="{{currentIndex2==1 && item.type==0}}" class="badge">折</view>
<view wx:if="{{currentIndex2==1 && item.type==1}}" class="badge">减</view>
<view wx:if="{{currentIndex2==1}}" class="badge">配</view>
<view wx:if="{{currentIndex2==2}}" class="badge">惠</view>
<view wx:if="{{currentIndex2==1}}" class="ellipsis-1">{{item.main_goods_name}}</view>
<view wx:else class="ellipsis-1">{{item.name}}</view>
</view>
<view class="pdv10 fs28">促销时间:{{g_filter.format_time(item.start_time,1)}} 到 {{g_filter.format_time(item.end_time,1)}}</view>
</view>
<view class="flex-space-between" wx:if="{{currentIndex2 == 0}}">
<view class="fs28">
<view class="pdv10">需购买金额:¥{{g_filter.toFix(item.money,2)}}</view>
<view wx:if="{{item.type==0}}">折扣:{{item.expression}}(%)</view>
<view wx:if="{{item.type==1}}">优惠金额:{{g_filter.toFix(item.expression,2)}}</view>
</view>
<view bindtap="share_index" data-index="{{index}}" class="btn-container"><text class="btn-share">分享</text></view>
</view>
<view class="flex-equality pdt20" wx:else>
<view bindtap="showPopup" data-index="{{index}}" class="btn-container" ><text class="btn-share">活动详情</text></view>
<view bindtap="share_index" data-index="{{index}}" class="btn-container"><text class="btn-share w164">分享</text></view>
</view>
</view>
</view>
</view>
</block>
<!-- 专享礼包 -->
<block wx:if="{{currentIndex == 3}}">
<view class class="list-item" bindtap="go_libao" data-index="{{index}}">
<view class="img-container">
<image src="{{url+item.lbUrl}}" style="width: 100%; height: 100%;"
binderror="bind_bnerr2" lazy-load="true"
data-errorimg="list[{{index}}].lbUrl"></image>
</view>
<view class="details">
<view class="ellipsis-2 fs28 name">{{item.giftTitle}}</view>
<view class="pdt14 red">
<tex wx:if="{{item.payMoney}}">¥{{g_filter.toFix(item.payMoney,2)}}</tex>
<text wx:if="{{item.payMoney && item.payIntegral}}">/</text>
<text wx:if="{{item.payIntegral}}">{{item.payIntegral}}积分</text>
</view>
<view class="fs22 line-through gray">零售价:¥{{item.giftPosPrice}}</view>
<!-- <view class="fs22">已售:<text class="red">3</text></view> -->
<view catchtap="share_index" data-index="{{index}}" class="t-r fs28"><view class="btn-share">分享</view></view>
</view>
</view>
</block>
</block><!--for的闭合 -->
<view style="height: 1rpx;"></view>
<nodata wx:if="{{list.length==0}}" nodataContainer="nodata">暂无数据</nodata>
<view wx:if="{{is_no_more}}" class="no-more t-c">- 已全部加载 -</view>
</scroll-view>
</view>
<!-- 底部栏 -->
<view class="tabbar flex" wx:if="{{currentIndex == 0 || currentIndex == 1}}" bindtap="clickTab3">
<view class="tabbar-item {{currentIndex3 == 0?'active':''}}" data-index="0">
<text class="iconfont icon-hot"></text>火热进行
</view>
<view class="tabbar-item {{currentIndex3 == 1?'active':''}}" data-index="1">
<text class="iconfont icon-clock"></text>即将开始
</view>
</view>
<!-- 弹出层 -->
<view class="popup-container" hidden="{{hiddenPopup}}">
<view class="popup">
<view class="popup-content {{currentIndex2 == 2?'active':''}}">
<view class="popup-title dash-b">活动详情</view>
<!-- 搭配促销 -->
<block wx:if="{{currentIndex2 == 1}}">
<view class="pdv20 dash-b fs28" bindtap="go_coll_good" data-gid="{{hui_active.main_goods_id}}">
<view class="popup-title2">必买商品</view>
<view class="popup-title3">商品编号:{{hui_active.ginfo.goods_sn}}</view>
<view class="popup-title3">商品名称:{{hui_active.main_goods_name}}</view>
<view class="popup-title3">手店价:<text class="red">¥{{g_filter.toFix(hui_active.ginfo.shop_price,2)}}</text></view>
</view>
<view class="pdv20">
<view class="popup-title2 fs28">搭配商品</view>
<view class="fs28">
<view class="flex t-c bold pdv10">
<view class="w25">序号</view>
<view class="w25">商品信息</view>
<view class="w25">手店价</view>
<view class="w25">搭配价</view>
</view>
<view class="popup-list t-c">
<block wx:for="{{list2}}">
<view class="flex ai-center pdb10" bindtap="go_coll_good" data-gid="{{item.goods_id}}">
<view class="w25">{{index+1}}</view>
<view class="w25 ellipsis-2">{{item.goods_name}}</view>
<view class="w25">¥{{g_filter.toFix(item.shop_price,2)}}</view>
<view class="w25 red">¥{{g_filter.toFix(item.price,2)}}</view>
</view>
</block>
</view>
</view>
</view>
</block>
<!-- 优惠促销 -->
<block wx:if="{{currentIndex2 == 2}}">
<view class="pdv20 dash-b">
<view class="popup-title2 fs28">参与对象</view>
<view class="flex ai-center t-c fs28 pdv20">
<view class="w50">
<radio wx:if="{{hui_active.good_object==0}}" checked="true" disabled/>
<radio wx:else disabled/>
全部商品
</view>
<view class="w50">
<radio wx:if="{{hui_active.good_object==1}}" checked="true" disabled/>
<radio wx:else disabled/>
指定商品
</view>
</view>
<view class="fs28">
<view class="flex t-c bold pdv10">
<view class="w25">序号</view>
<view class="w25">商品信息</view>
<view class="w25">手店价</view>
<view class="w25">操作</view>
</view>
<view class="t-c">
<block wx:for="{{list2}}">
<view class="flex ai-center pdb10" bindtap="go_coll_good" data-gid="{{item.goods_id}}">
<view class="w25">{{index+1}}</view>
<view class="w25 ellipsis-2">{{item.goods_name}}</view>
<view class="w25">¥{{item.shop_price}}</view>
<view catchtap="share_good2" data-index="{{index}}" class="w25"><text class="btn-share">分享</text></view>
</view>
</block>
</view>
</view>
</view>
<view class="pdv20">
<view class="popup-title2 fs28">活动详情</view>
<view class="fs28">
<block wx:for="{{prom_goods}}">
<view class="pdv10">需购买:{{item.condition}}
<text wx:if="{{item.prom_type==0}}">元</text>
<text wx:else>件</text>
</view>
<view class="pdl20">
<view class="flex pdb20">
<view class="w50" wx:if="{{item.money}}"><radio checked="true" disabled/>减现金 <text class="red">{{item.money}}</text></view>
<view class="w50" wx:if="{{item.sale}}"><radio checked="true" disabled/>打折 <text class="red">{{item.sale}}折</text></view>
</view>
<view class="flex pdb20">
<view class="w50"><radio wx:if="{{item.past}}" checked="true" disabled/><radio wx:else disabled/>包邮</view>
<view class="w50">
<block wx:if="{{item.intValue}}">
<radio checked="true" disabled/>积分 <text class="red">{{item.intValue}}</text>
</block>
<block wx:else>
<radio disabled/>积分
</block>
</view>
</view>
<view class="pdb20"><radio wx:if="{{item.couponId}}" checked="true" disabled/> <radio wx:else disabled/>优惠券</view>
<view class="pdb20"><radio wx:if="{{item.gift_id}}" checked="true" disabled/> <radio wx:else disabled/>赠品</view>
<view><radio wx:if="{{item.lb_id}}" checked="true" disabled/> <radio wx:else disabled/>礼包</view>
</view>
</block>
</view>
</view>
</block>
</view>
<view class="popup-btn t-c"><text class="iconfont icon-close" bindtap="closePopup"></text></view>
</view>
</view>
</view>
<!--二维码显示页面-->
<canvas canvas-id='share' style='width:750rpx;height:1217rpx;' wx:if='{{!canvasHidden}}'></canvas>
<!-- 分享控件,底部弹出 -->
<share_button id="share_button" bind:cancel="cancel" bind:share_img="saveImageToPhotosAlbum" wx:if="{{!share_hidden}}"></share_button>