Commit 303eff71518aa32e21fcfcb922632ca81ea1bb88
1 parent
f8d339cc
每月礼包
Showing
25 changed files
with
10242 additions
and
2 deletions
app.json
... | ... | @@ -221,7 +221,12 @@ |
221 | 221 | "pages/user/labels/labels", |
222 | 222 | "pages/cart/cart2/cart2", |
223 | 223 | "pages/barCodeBank/barCodeBank", |
224 | - "pages/qy/contactMe/contactMe" | |
224 | + "pages/qy/contactMe/contactMe", | |
225 | + "pages/user/monthgiftbag/payment/payment", | |
226 | + "pages/user/monthgiftbag/monthgiftbag", | |
227 | + "pages/user/monthgiftbag/giftpacklist/giftpacklist", | |
228 | + "pages/user/monthgiftbag/giftpackinfo/giftpackinfo", | |
229 | + "pages/user/monthgiftbag/giftpackbuy/giftpackbuy" | |
225 | 230 | ] |
226 | 231 | } |
227 | 232 | ... | ... |
packageE/pages/user/monthgiftbag/giftpackbuy/giftpackbuy.js
0 → 100644
1 | +var i = require("../../../../../utils/util.js"); | |
2 | +var com = require("../public/buy_com.js"); | |
3 | +var e = getApp(), | |
4 | + a = e.globalData.setting, | |
5 | + os = a, | |
6 | + t = e.request, | |
7 | + d = e.globalData; | |
8 | +Page({ | |
9 | + data: { | |
10 | + url: a.url, //接口网址 | |
11 | + iurl: a.imghost, //图片前缀网址 | |
12 | + getStorageID: '', | |
13 | + getUserID: '', | |
14 | + wareCard: [], | |
15 | + // page: 0, | |
16 | + // pageSize: 10, | |
17 | + isEmpty: false, | |
18 | + loadingType: 0, //定义加载方式 0---contentdown 1---contentrefresh 2---contentnomore | |
19 | + contentText: { | |
20 | + contentdown: '加载更多', | |
21 | + contentrefresh: '加载中...', | |
22 | + contentnomore: '已加载全部' | |
23 | + }, | |
24 | + ismore: 0, //数据是否全部加载完成 | |
25 | + is_read: 0, //是否查询过我的礼包接口 | |
26 | + curpage: 1, //当前分页数 | |
27 | + pageSize: 10, //页大小 | |
28 | + total: 0, //总数量 | |
29 | + ad_data: null, | |
30 | + first_leader: e.globalData.first_leader || 0, // 推荐人ID | |
31 | + | |
32 | + //门店相关 | |
33 | + ismend: 0, | |
34 | + is_sec_mend: 0, | |
35 | + sto_sele_name: "", //选中的门店名称 | |
36 | + sto_sele_id: "", //选中的门店id | |
37 | + sto_sele_distr: "", //选择的门店的配送方式 | |
38 | + is_show_sto_cat: 1, //是否显示门店分类 | |
39 | + only_pk: null, | |
40 | + all_sto: null, | |
41 | + sec_sto: null, //选择了的门店分类 | |
42 | + pickpu_list: null, //读出的所有门店list | |
43 | + def_pickpu_list: null, //一开始5个门店list | |
44 | + sec_pick_index: 0, //第二级门店选择ID | |
45 | + fir_pick_index: 0, //第一级门店选择ID | |
46 | + all_pick_list: null,//所有的门店先记录起来 | |
47 | + | |
48 | + select_store: 0, //选择更多 | |
49 | + index: 1, | |
50 | + more_store: 0, //选择门店 | |
51 | + sort_store: 0, //门店分类 | |
52 | + choice_sort_store: 0, //选择分类门店 | |
53 | + new_user: 0, //新用户 | |
54 | + | |
55 | + def_pick_store: null, // 默认的门店 | |
56 | + fir_def_store: null, //客户默认的门店的 | |
57 | + lat: null, //维度 | |
58 | + lon: null, //经度 | |
59 | + | |
60 | + is_get_local_ok: 0, //获取坐标是否完成 | |
61 | + region_name: "门店分类", //区域的名字 | |
62 | + is_gps: 1, | |
63 | + open_ind_store: 0, //哪里打开的门店列表的控制属性 | |
64 | + default_store: {}, //创建添加默认门店地址的对象 | |
65 | + | |
66 | + store:0, | |
67 | + openSpecModal:0, | |
68 | + | |
69 | + is_get_guide:0, | |
70 | + | |
71 | + }, | |
72 | + onLoad: function (options) { | |
73 | + var th=this; | |
74 | + | |
75 | + this.setData({ | |
76 | + params: options, | |
77 | + now:Date.parse(new Date()) / 1000, | |
78 | + }) | |
79 | + | |
80 | + getApp().getConfig2(function (e) { | |
81 | + var json_d = JSON.parse(e.switch_list); | |
82 | + th.setData({ | |
83 | + bconfig: e, | |
84 | + sys_switch:json_d | |
85 | + }); | |
86 | + }) | |
87 | + | |
88 | + }, | |
89 | + init() { | |
90 | + var th = this; | |
91 | + let options = this.data?.params; | |
92 | + this.setData({ | |
93 | + getStorageID: a.stoid, | |
94 | + getUserID: d.user_id | |
95 | + }); | |
96 | + var my_confirm = th.selectComponent("#my_confirm"); //组件的id | |
97 | + my_confirm.open_cancel(0); | |
98 | + //-- 获取分享人的ID -- | |
99 | + var first_leader = options.first_leader || getApp().globalData.first_leader; | |
100 | + if (first_leader) { | |
101 | + | |
102 | + this.data.is_get_guide=1; | |
103 | + this.setData({ | |
104 | + first_leader, | |
105 | + }) | |
106 | + //-- user_id代过来免登录 -- | |
107 | + getApp().globalData.first_leader = first_leader; | |
108 | + //调用接口判断是不是会员 | |
109 | + getApp().request.promiseGet("/api/weshop/shoppingGuide/get/" + os.stoid + "/" + first_leader, {}).then(res => { | |
110 | + if (res.data.code == 0) { | |
111 | + getApp().globalData.guide_id = res.data.data.id; | |
112 | + getApp().globalData.guide_pick_id= res.data.data.pickup_id | |
113 | + } | |
114 | + | |
115 | + com.wait_for_store_config(th); | |
116 | + com.set_user_mo_store(th,os); | |
117 | + | |
118 | + }) | |
119 | + } | |
120 | + | |
121 | + getApp().request.promiseGet("/api/weshop/ad/page?pid=1208&store_id=" + os.stoid, { | |
122 | + data: { | |
123 | + enabled: 1 | |
124 | + } | |
125 | + }).then(res => { | |
126 | + if (res.data.code == 0 && res.data.data && res.data.data.pageData && res.data.data.pageData.length > 0) { | |
127 | + var a = res.data.data.pageData; | |
128 | + var tt = { | |
129 | + 'ad_code': os.imghost + a[0].ad_code, | |
130 | + 'media_link': '', | |
131 | + 'ad_weapplink': a[0].ad_weapplink, | |
132 | + 'bgcolor': a[0].bgcolor, | |
133 | + }; | |
134 | + th.setData({ | |
135 | + ad_data: tt | |
136 | + }); | |
137 | + } | |
138 | + }) | |
139 | + this.getList(); | |
140 | + }, | |
141 | + onShow: function () { | |
142 | + getApp().check_can_share(); | |
143 | + var th=this; | |
144 | + //--先判断会员状态-- | |
145 | + getApp().is_Single_page(this, function () { | |
146 | + var user_info = getApp().globalData.userInfo; | |
147 | + if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) { | |
148 | + getApp().goto('/packageE/pages/togoin/togoin'); | |
149 | + return false; | |
150 | + } | |
151 | + | |
152 | + if(!th.data.is_get_guide) { | |
153 | + com.wait_for_store_config(th); | |
154 | + com.set_user_mo_store(th, os); | |
155 | + } | |
156 | + th.data.is_get_guide=0; | |
157 | + | |
158 | + }) | |
159 | + this.init(); | |
160 | + }, | |
161 | + | |
162 | + //购买礼包 | |
163 | + GetBuyPrice: function (e) { | |
164 | + | |
165 | + var th = this; | |
166 | + var index = e.currentTarget.dataset.index; //活动id | |
167 | + var sele_g=th.data.wareCard[index]; | |
168 | + this.data.payMoney=sele_g.payMoney; | |
169 | + | |
170 | + th.setData({sele_g:sele_g,buyType:2,}) | |
171 | + if(sele_g.is_pickup){ | |
172 | + if(sele_g.pickup_list && th.data.def_pick_store){ | |
173 | + com.check_def_pk(th); | |
174 | + } | |
175 | + com.get_sto(th,os) | |
176 | + th.setData({ | |
177 | + openSpecModal:1 | |
178 | + }) | |
179 | + }else{ | |
180 | + var my_confirm = th.selectComponent("#my_confirm"); //组件的id | |
181 | + my_confirm.open( | |
182 | + "是否确定购买该礼包", | |
183 | + "取消", | |
184 | + "确定", | |
185 | + function () { | |
186 | + my_confirm.open_cancel(0); | |
187 | + }, | |
188 | + function () { | |
189 | + my_confirm.open_cancel(0); | |
190 | + com.buy_libao(th) | |
191 | + } | |
192 | + | |
193 | + ) | |
194 | + } | |
195 | + | |
196 | + | |
197 | + | |
198 | + | |
199 | + | |
200 | + }, | |
201 | + // 积分兑换 | |
202 | + GetBuyIntegral: function (e) { | |
203 | + var th = this; | |
204 | + var index = e.currentTarget.dataset.index; //活动id | |
205 | + var sele_g=th.data.wareCard[index]; | |
206 | + th.setData({sele_g:sele_g, buyType:1,}) | |
207 | + if(sele_g.is_pickup){ | |
208 | + if(sele_g.pickup_list && th.data.def_pick_store){ | |
209 | + com.check_def_pk(th); | |
210 | + } | |
211 | + com.get_sto(th,os) | |
212 | + th.setData({ | |
213 | + openSpecModal:1 | |
214 | + }) | |
215 | + }else { | |
216 | + var my_confirm = th.selectComponent("#my_confirm"); //组件的id | |
217 | + my_confirm.open( | |
218 | + "是否确定兑换该礼包", | |
219 | + "取消", | |
220 | + "确定", | |
221 | + function () { | |
222 | + my_confirm.open_cancel(0); | |
223 | + }, | |
224 | + function () { | |
225 | + my_confirm.open_cancel(0); | |
226 | + com.buy_libao(th) | |
227 | + }) | |
228 | + } | |
229 | + | |
230 | + }, | |
231 | + //免费领取 | |
232 | + GetFree: function (e) { | |
233 | + | |
234 | + var th = this; | |
235 | + var index = e.currentTarget.dataset.index; //活动id | |
236 | + var sele_g=th.data.wareCard[index]; | |
237 | + th.setData({sele_g:sele_g, buyType:3,}) | |
238 | + | |
239 | + if(sele_g.is_pickup){ | |
240 | + if(sele_g.pickup_list && th.data.def_pick_store){ | |
241 | + com.check_def_pk(th); | |
242 | + } | |
243 | + com.get_sto(th,os) | |
244 | + th.setData({ | |
245 | + openSpecModal:1 | |
246 | + }) | |
247 | + }else { | |
248 | + | |
249 | + | |
250 | + var my_confirm = th.selectComponent("#my_confirm"); //组件的id | |
251 | + my_confirm.open( | |
252 | + "是否确定领取该礼包", | |
253 | + "取消", | |
254 | + "确定", | |
255 | + function () { | |
256 | + my_confirm.open_cancel(0); | |
257 | + }, | |
258 | + function () { | |
259 | + my_confirm.open_cancel(0); | |
260 | + com.buy_libao(th) | |
261 | + }) | |
262 | + } | |
263 | + }, | |
264 | + | |
265 | + getList: function (e) { | |
266 | + var th = this; | |
267 | + getApp().request.get('/api/weshop/marketing/marketingMonthgiftbagForm/page', { | |
268 | + isShowLoading: true, | |
269 | + data: { | |
270 | + store_id: th.data.getStorageID, //商家ID | |
271 | + user_id: th.data.getUserID, //用户ID | |
272 | + page: th.data.curpage, | |
273 | + pageSize: th.data.pageSize, | |
274 | + is_end:0 | |
275 | + }, | |
276 | + success: function (res) { | |
277 | + if (res.data.code == 0) { | |
278 | + th.data.curpage++; | |
279 | + var arr1 = th.data.wareCard; | |
280 | + var arr2 = res.data.data.pageData; | |
281 | + for (let j = 0; j < arr2.length; j++) { | |
282 | + // arr2[j].starTime1=Date.parse(new Date(arr2[j].begindate.replace(/-/g, "/")))/1000 | |
283 | + arr2[j].starTime1=arr2[j].begindate | |
284 | + arr2[j].starTime=i.formatTime(arr2[j].begindate, "yyyy-MM-dd hh:mm:ss"); | |
285 | + arr2[j].endTime=i.formatTime(arr2[j].enddate, "yyyy-MM-dd hh:mm:ss"); | |
286 | + arr2[j].giftPosPrice=arr2[j].oldPrice | |
287 | + arr2[j].payMoney=arr2[j].lbPrice | |
288 | + arr2[j].payIntegral=arr2[j].exchangeIntegral | |
289 | + arr2[j].giftQty=arr2[j].buynum | |
290 | + arr2[j].cover_img=arr2[j].imageurl | |
291 | + arr2[j].giftTitle=arr2[j].act_name | |
292 | + arr2[j].virtualsales=arr2[j].virtualSales | |
293 | + arr2[j].lbnum=arr2[j].lbNum | |
294 | + } | |
295 | + | |
296 | + var arr3 = [...arr1, ...arr2]; | |
297 | + var ismore = 0; | |
298 | + if (arr3.length == res.data.data.total) ismore = 1 | |
299 | + th.setData({ | |
300 | + wareCard: arr3, | |
301 | + total: res.data.data.total, | |
302 | + ismore: ismore, | |
303 | + is_read: 1, | |
304 | + is_get:1 | |
305 | + }), wx.stopPullDownRefresh(); //停止下拉刷新 | |
306 | + } else { | |
307 | + th.setData({ | |
308 | + is_read: 1, | |
309 | + ismore: 1, | |
310 | + is_get:1 | |
311 | + }) | |
312 | + } | |
313 | + } | |
314 | + }) | |
315 | + | |
316 | + }, | |
317 | + //销毁界面跳转 | |
318 | + redirectTo: function (e) { | |
319 | + var th = this; | |
320 | + var url = e.currentTarget.dataset.url; | |
321 | + //销毁跳转 | |
322 | + wx.redirectTo({ | |
323 | + url: url | |
324 | + }); | |
325 | + }, | |
326 | + //不销毁界面跳转 | |
327 | + navigateTo: function (e) { | |
328 | + | |
329 | + var th = this; | |
330 | + var url = e.currentTarget.dataset.url; | |
331 | + var index=e.currentTarget.dataset.index | |
332 | + console.log(url); | |
333 | + wx.setStorageSync('monthgiftbag', th.data.wareCard[index]) | |
334 | + getApp().goto(url); | |
335 | + | |
336 | + }, | |
337 | + //下拉事件 | |
338 | + onReachBottom: function () { | |
339 | + var th = this; | |
340 | + if (th.data.total <= th.data.pageSize) return; | |
341 | + if (th.data.ismore) return; | |
342 | + | |
343 | + th.getList(); | |
344 | + }, | |
345 | + //图片失败,默认图片 | |
346 | + bind_bnerr2: function (e) { | |
347 | + var _errImg = e.target.dataset.errorimg; | |
348 | + var _errObj = {}; | |
349 | + _errObj[_errImg] = "/miniapp/images/default_g_img.gif"; | |
350 | + this.setData(_errObj) //注意这里的赋值方式,只是将数据列表中的此项图片路径值替换掉 ; | |
351 | + }, | |
352 | + goto: function (e) { | |
353 | + var th = this; | |
354 | + var url = e.currentTarget.dataset.url; | |
355 | + getApp().goto(url); | |
356 | + }, | |
357 | + | |
358 | + onShareAppMessage: function (e) { | |
359 | + getApp().globalData.no_clear=1; | |
360 | + var curPage = this; | |
361 | + var pagePath = curPage.route; //当前页面url | |
362 | + if (pagePath.indexOf('/') != 0) { | |
363 | + pagePath = '/' + pagePath; | |
364 | + } | |
365 | + pagePath += "?first_leader=" + this.data.getUserID; | |
366 | + return { | |
367 | + title: "专享礼包", | |
368 | + path: pagePath, | |
369 | + } | |
370 | + }, | |
371 | + | |
372 | + // 分享朋友圈 | |
373 | + onShareTimeline() { | |
374 | + getApp().globalData.no_clear=1; | |
375 | + | |
376 | + var user_id=getApp().globalData.user_id; | |
377 | + if(!user_id) user_id=0; | |
378 | + | |
379 | + return { | |
380 | + title: '专享礼包', | |
381 | + imageUrl: this.data.ad_data.ad_code, | |
382 | + query: 'first_leader='+user_id | |
383 | + } | |
384 | + }, | |
385 | + | |
386 | + | |
387 | + | |
388 | + //--- 设置一下默认库存的数量 ---- | |
389 | + set_def_storage(ee) { | |
390 | + var that = this, th = this; | |
391 | + that.data.fir_def_store = ee; | |
392 | + that.setData({ | |
393 | + def_pick_store: ee, | |
394 | + sto_sele_name: ee.pickup_name, | |
395 | + sto_sele_id: ee.pickup_id, | |
396 | + sto_sele_distr: ee.distr_type | |
397 | + }) | |
398 | + }, | |
399 | + // 选择门店 | |
400 | + choice_store: function (ee) { | |
401 | + //--先判断会员状态-- | |
402 | + var user_info = getApp().globalData.userInfo; | |
403 | + if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) { | |
404 | + wx.navigateTo({ | |
405 | + url: '/packageE/pages/togoin/togoin', | |
406 | + }) | |
407 | + return false; | |
408 | + } | |
409 | + | |
410 | + var th = this; | |
411 | + var ind = ee.currentTarget.dataset.ind; | |
412 | + var bconfig = th.data.bconfig; | |
413 | + | |
414 | + //如果开启了,则不在选择门店 | |
415 | + if(this.data.sys_switch.is_pricing_open_store && getApp().globalData.pk_store){ | |
416 | + return false; | |
417 | + } | |
418 | + | |
419 | + if (!th.data.only_pk && !th.data.def_pickpu_list) { | |
420 | + getApp().confirmBox("门店库存不足", null, 25000, !1); | |
421 | + return false; | |
422 | + } | |
423 | + | |
424 | + if (th.data.only_pk && !th.data.only_pk.length) { | |
425 | + getApp().confirmBox("门店库存不足", null, 25000, !1); | |
426 | + return false; | |
427 | + } | |
428 | + if (th.data.def_pickpu_list && !th.data.def_pickpu_list.length) { | |
429 | + getApp().confirmBox("门店库存不足", null, 25000, !1); | |
430 | + return false; | |
431 | + } | |
432 | + | |
433 | + | |
434 | + if (bconfig && bconfig.is_sort_storage) { | |
435 | + wx.getLocation({ | |
436 | + type: 'gcj02', | |
437 | + success: function (res) { | |
438 | + | |
439 | + th.data.lat = res.latitude; | |
440 | + th.data.lon = res.longitude; | |
441 | + th.data.is_get_local_ok = 1; | |
442 | + th.setData({ | |
443 | + is_gps: 1 | |
444 | + }); | |
445 | + //th.onShow(); | |
446 | + com.get_sto(th,os); | |
447 | + }, | |
448 | + fail: function (res) { | |
449 | + //th.onShow(); | |
450 | + th.data.is_get_local_ok = 1; | |
451 | + com.get_sto(th,os); | |
452 | + if (res.errCode == 2) { | |
453 | + th.setData({ | |
454 | + is_gps: 0 | |
455 | + }); | |
456 | + if (th.data.is_gps == 0) { | |
457 | + getApp().confirmBox("请开启GPS定位", null, 25000, !1); | |
458 | + } | |
459 | + } else { | |
460 | + th.setData({ | |
461 | + is_gps: "3" | |
462 | + }); | |
463 | + } | |
464 | + | |
465 | + } | |
466 | + }) | |
467 | + } else { | |
468 | + th.data.is_get_local_ok = 1; | |
469 | + com.get_sto(th,os); | |
470 | + } | |
471 | + | |
472 | + if (ind != undefined && ind != null) { | |
473 | + this.setData({ | |
474 | + open_ind_store: ind, | |
475 | + store: 1, | |
476 | + openSpecModal: !1, | |
477 | + openSpecModal_pt: !1, | |
478 | + openSpecModal_flash_normal: !1, | |
479 | + }) | |
480 | + } else { | |
481 | + this.setData({ | |
482 | + store: 1, | |
483 | + openSpecModal: !1, | |
484 | + openSpecModal_pt: !1, | |
485 | + openSpecModal_flash_normal: !1 | |
486 | + | |
487 | + }) | |
488 | + } | |
489 | + }, | |
490 | + //关闭选择门店 | |
491 | + close_popup: function (e) { | |
492 | + var th = this; | |
493 | + this.setData({ | |
494 | + store: 0, | |
495 | + choice_sort_store: 0, | |
496 | + sort_store: 0, | |
497 | + fir_pick_index: 0, | |
498 | + sec_pick_index: 0 | |
499 | + }) | |
500 | + | |
501 | + var openindstore = this.data.open_ind_store; | |
502 | + if (openindstore == 1) { | |
503 | + th.setData({ | |
504 | + openSpecModal: !0, | |
505 | + openSpecModal_ind: openindstore, | |
506 | + }); | |
507 | + } else if (openindstore == 2) { | |
508 | + th.setData({ | |
509 | + openSpecModal: !0, | |
510 | + openSpecModal_ind: openindstore, | |
511 | + }); | |
512 | + } | |
513 | + else if (openindstore == 4) { //4就是拼团 | |
514 | + th.setData({ | |
515 | + openSpecModal_pt: 1, //打开拼团购买界面 | |
516 | + store: 0, //关闭门店 | |
517 | + choice_sort_store: 0, //关闭门店2级 | |
518 | + sort_store: 0, //关闭门店2级 | |
519 | + }); | |
520 | + } | |
521 | + else { | |
522 | + th.setData({ | |
523 | + store: 0, | |
524 | + choice_sort_store: 0, | |
525 | + sort_store: 0 | |
526 | + }) | |
527 | + } | |
528 | + | |
529 | + | |
530 | + }, | |
531 | + | |
532 | + //选择更多门店 | |
533 | + more_store: function () { | |
534 | + this.setData({ | |
535 | + sort_store: 1 | |
536 | + }); | |
537 | + }, | |
538 | + // 返回按钮 | |
539 | + returns: function () { | |
540 | + this.setData({ | |
541 | + sort_store: 0, | |
542 | + choice_sort_store: 0 | |
543 | + }); | |
544 | + }, | |
545 | + //---选择分类门店--- | |
546 | + choice_sort_store: function (e) { | |
547 | + var index = e.currentTarget.dataset.index; | |
548 | + var region_name = e.currentTarget.dataset.region; | |
549 | + var item = this.data.all_sto[index]; | |
550 | + this.setData({ | |
551 | + region_name: region_name, | |
552 | + sort_store: 0, | |
553 | + choice_sort_store: 1, | |
554 | + sec_sto: item, | |
555 | + sec_pick_index: 0 | |
556 | + }); | |
557 | + }, | |
558 | + | |
559 | + choose_for_store_fir: function (e) { | |
560 | + var index_c = e.currentTarget.dataset.ind; | |
561 | + var th = this; | |
562 | + th.setData({ | |
563 | + fir_pick_index: index_c | |
564 | + }) | |
565 | + | |
566 | + }, | |
567 | + | |
568 | + //确定def_pick为选择的门店 | |
569 | + sure_pick: function (e) { | |
570 | + var th = this; | |
571 | + var item = null; | |
572 | + var openindstore = th.data.open_ind_store; | |
573 | + | |
574 | + if (th.data.choice_sort_store == 0) { | |
575 | + var index = th.data.fir_pick_index; | |
576 | + if (th.data.is_show_sto_cat == 1) { | |
577 | + item = th.data.def_pickpu_list[index]; | |
578 | + } else { | |
579 | + item = th.data.only_pk?th.data.only_pk[index]:null; //当没有门店分类的时候 | |
580 | + } | |
581 | + | |
582 | + } else { | |
583 | + var index = th.data.sec_pick_index; | |
584 | + item = th.data.sec_sto.s_arr[index]; | |
585 | + } | |
586 | + | |
587 | + if(!item) return false; | |
588 | + | |
589 | + if (!th.data.sele_g) return false; | |
590 | + | |
591 | + th.setData({ | |
592 | + def_pick_store: item, | |
593 | + sto_sele_name: item.pickup_name, | |
594 | + sto_sele_id: item.pickup_id, | |
595 | + sto_sele_distr: item.distr_type, | |
596 | + store: 0, | |
597 | + choice_sort_store: 0, | |
598 | + fir_pick_index: 0, | |
599 | + openSpecModal: !0, | |
600 | + }); | |
601 | + | |
602 | + | |
603 | + }, | |
604 | + //---点击二级之后的选择--- | |
605 | + choose_for_store: function (e) { | |
606 | + var index_c = e.currentTarget.dataset.ind; | |
607 | + var th = this; | |
608 | + th.setData({ | |
609 | + sec_pick_index: index_c, | |
610 | + fir_pick_index: index_c | |
611 | + }) | |
612 | + | |
613 | + }, | |
614 | + //把选择的门店设置成默认的门店def_pick | |
615 | + set_def_pick: function (e) { | |
616 | + var th = this; | |
617 | + var item = null; | |
618 | + if (th.data.choice_sort_store == 0) { | |
619 | + var index = th.data.fir_pick_index; | |
620 | + if (th.data.is_show_sto_cat == 1) { | |
621 | + item = th.data.def_pickpu_list[index]; | |
622 | + } else { | |
623 | + item = th.data.only_pk?th.data.only_pk[index]:null; //当没有门店分类的时候 | |
624 | + } | |
625 | + } else { | |
626 | + var index = th.data.sec_pick_index; | |
627 | + item = th.data.sec_sto.s_arr[index]; | |
628 | + } | |
629 | + | |
630 | + if(!item) return false; | |
631 | + | |
632 | + th.setData({ | |
633 | + def_pick_store: item, | |
634 | + sto_sele_name: item.pickup_name, | |
635 | + sto_sele_id: item.pickup_id, | |
636 | + sto_sele_distr: item.distr_type, | |
637 | + store: 0, | |
638 | + choice_sort_store: 0, | |
639 | + openSpecModal: !0, | |
640 | + }); | |
641 | + | |
642 | + var user_id=getApp().globalData.user_id; | |
643 | + var def_pickup_id = item.pickup_id; | |
644 | + getApp().request.put('/api/weshop/users/update', { | |
645 | + data: { | |
646 | + user_id: user_id, | |
647 | + def_pickup_id: def_pickup_id | |
648 | + }, | |
649 | + success: function (res) { | |
650 | + if (res.data.code == 0) { | |
651 | + if (th.data.choice_sort_store == 0) th.setData({ | |
652 | + fir_pick_index: 0 | |
653 | + }); | |
654 | + getApp().globalData.pk_store = item; | |
655 | + } else { | |
656 | + getApp().my_warnning("设置默认门店地址失败", 0, th) | |
657 | + } | |
658 | + | |
659 | + } | |
660 | + }); | |
661 | + | |
662 | + | |
663 | + | |
664 | + }, | |
665 | + closeSpecModal: function () { | |
666 | + this.setData({openSpecModal: 0}); | |
667 | + }, | |
668 | + | |
669 | + buy_libao:function () { | |
670 | + com.buy_libao(this) | |
671 | + } | |
672 | +}) | |
0 | 673 | \ No newline at end of file | ... | ... |
packageE/pages/user/monthgiftbag/giftpackbuy/giftpackbuy.json
0 → 100644
packageE/pages/user/monthgiftbag/giftpackbuy/giftpackbuy.wxml
0 → 100644
1 | +<wxs module="filter" src="../../../utils/filter.wxs"></wxs> | |
2 | +<view class="top_img" style="background-color: {{ad_data?ad_data.bgcolor:'rgb(250, 120, 88)'}};min-height: 100vh;"> | |
3 | + <block wx:if="{{ad_data}}"> | |
4 | + <view class="top_img"> | |
5 | + <image src="{{ad_data.ad_code}}" lazy-load="true" binderror="bind_bnerr2" data-errorimg="wareCard[{{index}}].lbUrl"></image> | |
6 | + </view> | |
7 | + </block> | |
8 | + <block wx:else> | |
9 | + <view class="top_img"> | |
10 | + <image src="{{iurl+'/miniapp/images/monthgiftbagtop.png?v=2019'}}" lazy-load="true" binderror="bind_bnerr2" data-errorimg="wareCard[{{index}}].lbUrl"></image> | |
11 | + </view> | |
12 | + </block> | |
13 | + | |
14 | + | |
15 | + <view class="top_title"> | |
16 | + <view class="top_title_box"> | |
17 | + <text class="top_title_redtext">礼包列表</text> | |
18 | + </view> | |
19 | + <view class="top_title_box_S"></view> | |
20 | + <view class="top_title_box"> | |
21 | + <a class="top_title_blacktext" bindtap="redirectTo" data-url="/packageE/pages/user/monthgiftbag/monthgiftbag">我的礼包</a> | |
22 | + </view> | |
23 | + </view> | |
24 | + <!--<block wx:for="{{wareCard}}" wx:if="{{now > filter.gettimestamp(items.starTime) || (items.is_show && now > items.show_time)}}" wx:for-item="items" wx:for-index="index" wx:key="index">--> | |
25 | + <block wx:for="{{wareCard}}" wx:for-item="items" wx:for-index="index" wx:key="index"> | |
26 | + <view class="content_box"> | |
27 | + <view class="content_box_ware" catchtap="navigateTo" data-index="{{index}}" data-url="/packageE/pages/user/monthgiftbag/giftpackinfo/giftpackinfo?isBuy=1&id={{items.id}}&cover_img={{items.cover_img}}&orderSn=''"> | |
28 | + <view class="content_box_img"> | |
29 | + <image src="{{iurl+items.cover_img}}" lazy-load="true" binderror="bind_bnerr2" wx:if="{{items.cover_img}}" data-errorimg="wareCard[{{index}}].cover_img"></image> | |
30 | + <image src="{{iurl+items.lbUrl}}" lazy-load="true" binderror="bind_bnerr2" wx:else data-errorimg="wareCard[{{index}}].lbUrl"></image> | |
31 | + </view> | |
32 | + <view class="content_box_title"> | |
33 | + <view class="content_ware_title"> | |
34 | + <text>{{items.giftTitle}}</text> | |
35 | + </view> | |
36 | + <view class="content_ware_type flex"> | |
37 | + <block wx:if="{{items.payMoney>0}}"> | |
38 | + <text>{{"¥"+items.payMoney}}</text> | |
39 | + </block> | |
40 | + <block wx:if="{{items.payMoney>0&&items.payIntegral>0}}"> | |
41 | + <text>/</text> | |
42 | + </block> | |
43 | + <block wx:if="{{items.payIntegral>0}}"> | |
44 | + <view class="flex"> | |
45 | + <text class="ellipsis-1">{{items.payIntegral}}</text> | |
46 | + <view>积分</view> | |
47 | + </view> | |
48 | + </block> | |
49 | + </view> | |
50 | + <view class="content_ware_price no_line_c"> | |
51 | + <text class="ellipsis-1">{{"零售价:¥"+items.giftPosPrice}}</text> | |
52 | + </view> | |
53 | + <view wx:if="{{items.is_show && now < items.starTime1 }}" class="content_ware_time"> | |
54 | + <text class="ellipsis-1">{{"活动开始时间:"+items.starTime}}</text> | |
55 | + </view> | |
56 | + <view wx:else class="content_ware_time"> | |
57 | + <text class="ellipsis-1">{{"活动结束时间:"+items.endTime}}</text> | |
58 | + </view> | |
59 | + </view> | |
60 | + </view> | |
61 | + <view class="content_box_button"> | |
62 | + <view class="box_button_remark"> | |
63 | + <text>{{"已售:"+items.giftQty+"件"}}</text> | |
64 | + </view> | |
65 | + <block wx:if="{{now > items.starTime1}}"> | |
66 | + <view class="flex-vertical"> | |
67 | + <block wx:if="{{items.payMoney>0 && items.payIntegral>0}}"> | |
68 | + <block wx:if="{{items.payMoney>0}}"> | |
69 | + <view class="flex" bindtap="GetBuyPrice" data-index="{{index}}"> | |
70 | + <button class="box_button_dui">立即购买</button> | |
71 | + </view> | |
72 | + </block> | |
73 | + <block wx:if="{{items.payIntegral>0}}"> | |
74 | + <view class="flex" bindtap="GetBuyIntegral" data-index="{{index}}"> | |
75 | + <button class="box_button_dui box_button_buy">立即兑换</button> | |
76 | + </view> | |
77 | + </block> | |
78 | + </block> | |
79 | + <block wx:else> | |
80 | + <block wx:if="{{items.payMoney>0}}"> | |
81 | + <view class="flex" bindtap="GetBuyPrice" data-index="{{index}}"> | |
82 | + <button class="box_button_dui box_button_buy">立即购买</button> | |
83 | + </view> | |
84 | + </block> | |
85 | + <block wx:if="{{items.payIntegral>0}}"> | |
86 | + <view class="flex" bindtap="GetBuyIntegral" data-index="{{index}}"> | |
87 | + <button class="box_button_dui box_button_buy">立即兑换</button> | |
88 | + </view> | |
89 | + </block> | |
90 | + </block> | |
91 | + <block wx:if="{{!items.payMoney && !items.payIntegral}}"> | |
92 | + <view class="flex" bindtap="GetFree" data-index="{{index}}"> | |
93 | + <button class="box_button_dui box_button_buy">免费领取</button> | |
94 | + </view> | |
95 | + </block> | |
96 | + </view> | |
97 | + </block> | |
98 | + <block wx:else> | |
99 | + <view class="flex-vertical" style="color: #666;"> | |
100 | + <button class="box_button_dui box_button_buy" style="background-color: #666;">活动还未开始</button> | |
101 | + </view> | |
102 | + </block> | |
103 | + </view> | |
104 | + </view> | |
105 | + </block> | |
106 | + <block wx:if="{{is_read && wareCard.length<1 && is_get}}"> | |
107 | + <view class="foot_empty"> | |
108 | + <view> | |
109 | + <image src="{{iurl+'/miniapp/images/giftbag/gift07.png'}}" lazy-load="true"></image> | |
110 | + </view> | |
111 | + <view> | |
112 | + <text>当前暂无礼包</text> | |
113 | + </view> | |
114 | + <view class="foot_empty_button"> | |
115 | + <text bindtap="goto" data-url="/pages/index/index/index">回到首页</text> | |
116 | + </view> | |
117 | + </view> | |
118 | + </block> | |
119 | + <!-- 加载完毕并且数据大于=页大小 --> | |
120 | + <view class="After_all flex-center" wx:if="{{ismore && wareCard.length>=3}}"> | |
121 | + <view class="Line"></view> | |
122 | + <view class="end fs26">到底了</view> | |
123 | + <view class="Line"></view> | |
124 | + </view> | |
125 | +</view> | |
126 | +<!-- 引入提示组件 --> | |
127 | +<warn id="warn"></warn> | |
128 | +<my_confirm id="my_confirm"></my_confirm> | |
129 | + | |
130 | +<include src="../public/buy_com.wxml"></include> | |
0 | 131 | \ No newline at end of file | ... | ... |
packageE/pages/user/monthgiftbag/giftpackbuy/giftpackbuy.wxss
0 → 100644
1 | +/*引用样式路径*/ | |
2 | +@charset "UTF-8"; | |
3 | +@import './goodsInfo.wxss'; | |
4 | + | |
5 | +page { | |
6 | + /* background-color: #fb7454; */ | |
7 | +} | |
8 | + | |
9 | +.top_img { | |
10 | + -webkit-align-content: center; | |
11 | + align-content: center; | |
12 | +} | |
13 | + | |
14 | +.top_img image { | |
15 | + width: 100%; | |
16 | + | |
17 | +} | |
18 | + | |
19 | +.top_title { | |
20 | + display: -webkit-box; | |
21 | + display: -webkit-flex; | |
22 | + display: flex; | |
23 | + background-color: #fff; | |
24 | + height: 85rpx; | |
25 | + border-radius: 10rpx 10rpx 0rpx 0rpx; | |
26 | + margin: 0rpx 20rpx 0rpx 20rpx; | |
27 | + -webkit-align-content: center; | |
28 | + align-content: center; | |
29 | + margin-bottom: 10rpx; | |
30 | +} | |
31 | + | |
32 | +.top_title_box { | |
33 | + width: 49%; | |
34 | + -webkit-align-content: center; | |
35 | + align-content: center; | |
36 | + text-align: center; | |
37 | + padding: 15rpx; | |
38 | +} | |
39 | + | |
40 | +.top_title_box_S { | |
41 | + width: 1%; | |
42 | + -webkit-align-content: center; | |
43 | + align-content: center; | |
44 | + text-align: center; | |
45 | + margin: 20rpx 0rpx 20rpx 0rpx; | |
46 | + border-left: #000 solid 3rpx; | |
47 | +} | |
48 | + | |
49 | +.top_title_redtext { | |
50 | + font-size: 30rpx; | |
51 | + color: #d61b30; | |
52 | +} | |
53 | + | |
54 | +.top_title_blacktext { | |
55 | + font-size: 30rpx; | |
56 | + color: #000; | |
57 | +} | |
58 | + | |
59 | +.content_box { | |
60 | + background-color: #fff; | |
61 | + margin: 0rpx 20rpx; | |
62 | + border-radius: 10rpx; | |
63 | + margin-bottom: 10rpx; | |
64 | +} | |
65 | + | |
66 | +.content_box_ware { | |
67 | + border-bottom: #f5f5f5 solid 2rpx; | |
68 | + display: -webkit-box; | |
69 | + display: -webkit-flex; | |
70 | + display: flex; | |
71 | +} | |
72 | + | |
73 | +.content_box_img { | |
74 | + margin: 20rpx 20rpx 20rpx 25rpx; | |
75 | + width: 35%; | |
76 | + display: -webkit-box; | |
77 | + display: -webkit-flex; | |
78 | + display: flex; | |
79 | + font-size: 8rpx; | |
80 | + position: relative; | |
81 | +} | |
82 | + | |
83 | +.content_box_img image { | |
84 | + width: 230rpx; | |
85 | + height: 230rpx; | |
86 | +} | |
87 | + | |
88 | +.content_box_title { | |
89 | + width: 65%; | |
90 | + margin: 25rpx 25rpx 10rpx 0rpx; | |
91 | + position: relative; | |
92 | +} | |
93 | + | |
94 | +.content_ware_title { | |
95 | + font-size: 30rpx; | |
96 | + word-break: break-all; | |
97 | + /*属性规定自动换行的处理方法。normal(使用浏览器默认的换行规则。),break-all(允许在单词内换行。),keep-all(只能在半角空格或连字符处换行。)*/ | |
98 | + text-overflow: ellipsis; | |
99 | + display: -webkit-box; | |
100 | + /** 对象作为伸缩盒子模型显示 **/ | |
101 | + -webkit-box-orient: vertical; | |
102 | + /** 设置或检索伸缩盒对象的子元素的排列方式 **/ | |
103 | + -webkit-line-clamp: 2; | |
104 | + /** 显示的行数 **/ | |
105 | + overflow: hidden; | |
106 | + /** 隐藏超出的内容 **/ | |
107 | +} | |
108 | + | |
109 | +.content_ware_type { | |
110 | + font-size: 32rpx; | |
111 | + color: #c61a34; | |
112 | + margin-top: 10rpx; | |
113 | + position: absolute; | |
114 | + left: 0; | |
115 | + bottom: 100rpx; | |
116 | +} | |
117 | + | |
118 | +.content_ware_price { | |
119 | + font-size: 26rpx; | |
120 | + color: #b9b5b5; | |
121 | + margin-top: 2rpx; | |
122 | + text-decoration: line-through; | |
123 | + position: absolute; | |
124 | + left: 0; | |
125 | + bottom: 70rpx; | |
126 | +} | |
127 | + | |
128 | +.content_ware_time { | |
129 | + font-size: 25rpx; | |
130 | + color: #000; | |
131 | + margin-top: 20rpx; | |
132 | + position: absolute; | |
133 | + left: 0; | |
134 | + bottom: 25rpx; | |
135 | +} | |
136 | +.box_button_buy{ | |
137 | + display: flex; | |
138 | + align-items: center; | |
139 | +} | |
140 | +.content_box_button { | |
141 | + display: flex; | |
142 | + height: 110rpx; | |
143 | + justify-content: space-between; | |
144 | + align-items: center; | |
145 | + padding-left: 20rpx; | |
146 | + padding-right: 25rpx; | |
147 | + line-height: 110rpx; | |
148 | +} | |
149 | + | |
150 | +.box_button_remark text { | |
151 | + font-size: 28rpx; | |
152 | + color: #b9b5b5; | |
153 | +} | |
154 | + | |
155 | +.box_button_dui { | |
156 | + display: inline-block; | |
157 | + width: 160rpx; | |
158 | + height: 50rpx; | |
159 | + font-size: 20rpx; | |
160 | + background: #fff; | |
161 | + color: #000; | |
162 | + line-height: 50rpx; | |
163 | + margin-left: 20rpx; | |
164 | + border-radius: 10rpx; | |
165 | +} | |
166 | + | |
167 | +.box_button_buy { | |
168 | + background: #d41c34; | |
169 | + color: #fff; | |
170 | + border-radius: 10rpx; | |
171 | +} | |
172 | + | |
173 | +.foot_box { | |
174 | + -webkit-align-content: center; | |
175 | + align-content: center; | |
176 | + text-align: center; | |
177 | + margin-top: 15rpx; | |
178 | + margin-bottom: 50rpx; | |
179 | +} | |
180 | + | |
181 | +.foot_box text { | |
182 | + font-size: 25rpx; | |
183 | + color: #fff; | |
184 | +} | |
185 | + | |
186 | +.foot_empty { | |
187 | + background-color: #fff; | |
188 | + height: 375rpx; | |
189 | + margin: 10rpx 20rpx 0rpx 20rpx; | |
190 | + border-radius: 10rpx; | |
191 | + text-align: center; | |
192 | + padding: 150rpx 0rpx 300rpx 0rpx; | |
193 | + -webkit-box-pack: center; | |
194 | + -webkit-justify-content: center; | |
195 | + justify-content: center; | |
196 | +} | |
197 | + | |
198 | +.foot_empty image { | |
199 | + width: 400rpx; | |
200 | + height: 273rpx; | |
201 | +} | |
202 | + | |
203 | +.foot_empty text { | |
204 | + font-size: 30rpx; | |
205 | + color: #999; | |
206 | +} | |
207 | + | |
208 | +.foot_empty_button { | |
209 | + background: #ff6363; | |
210 | + margin: 60rpx 230rpx 0rpx 230rpx; | |
211 | + padding: 10rpx; | |
212 | + border-radius: 70rpx; | |
213 | + line-height: 40rpx; | |
214 | +} | |
215 | + | |
216 | +.foot_empty_button text { | |
217 | + font-size: 28rpx; | |
218 | + color: #fff; | |
219 | +} | |
220 | +.After_all { | |
221 | + height: 80rpx; | |
222 | + margin-bottom: 10rpx; | |
223 | + color: rgb(255, 255, 255); | |
224 | +} | |
225 | + | |
226 | +.After_all .Line { | |
227 | + border-top: 3rpx solid rgb(255, 255, 255); | |
228 | + width: 130rpx; | |
229 | +} | |
230 | + | |
231 | +.After_all .end { | |
232 | + margin: 0rpx 15rpx; | |
233 | +} | |
0 | 234 | \ No newline at end of file | ... | ... |
packageE/pages/user/monthgiftbag/giftpackbuy/goodsInfo.wxss
0 → 100644
1 | +@import "../../../../../utils/wxParse/wxParse.wxss"; | |
2 | + | |
3 | +.container { | |
4 | + margin-bottom: 100rpx; | |
5 | + overflow: hidden; | |
6 | + padding-top: 80rpx; | |
7 | +} | |
8 | + | |
9 | +image { | |
10 | + vertical-align: top; | |
11 | +} | |
12 | +.rules { | |
13 | + position: fixed; | |
14 | + background-color: rgba(0,0,0,.2); | |
15 | + color: white; | |
16 | + top: 22rpx; | |
17 | + right: 0; | |
18 | + z-index: 100; | |
19 | + font-size: 26rpx; | |
20 | + padding: 0 20rpx; | |
21 | + z-index: 99999; | |
22 | + border-radius: 20rpx 0 0 20rpx; | |
23 | +} | |
24 | + | |
25 | +.rule-pop-container { | |
26 | + position: fixed; | |
27 | + left: 0; | |
28 | + bottom: 0; | |
29 | + width: 100%; | |
30 | + background-color: white; | |
31 | + z-index: 99999; | |
32 | + border-radius: 16rpx 16rpx 0 0; | |
33 | + padding: 0 40rpx; | |
34 | + box-sizing: border-box; | |
35 | + font-size: 28rpx; | |
36 | + color: #444; | |
37 | +} | |
38 | + | |
39 | +.pop-title { | |
40 | + padding: 20rpx 0; | |
41 | + text-align: center; | |
42 | + font-size: 32rpx; | |
43 | + position: relative; | |
44 | +} | |
45 | +.icon-guan { | |
46 | + position: absolute; | |
47 | + right: 0; | |
48 | + font-size: 26rpx; | |
49 | + top: 50%; | |
50 | + transform: translateY(-50%); | |
51 | + color: #ccc; | |
52 | +} | |
53 | +.btn { | |
54 | + color: white; | |
55 | + padding: 20rpx 0; | |
56 | + text-align: center; | |
57 | + border-radius: 40rpx; | |
58 | + background: -webkit-linear-gradient(left,#ff5000,#ff2000) no-repeat; | |
59 | +} | |
60 | + | |
61 | +.goods-detail { | |
62 | + overflow: hidden | |
63 | +} | |
64 | +.popup-content { | |
65 | + max-height: 600rpx; | |
66 | + overflow-y: auto; | |
67 | +} | |
68 | + | |
69 | +.type-navbar { | |
70 | + display: flex; | |
71 | + justify-content: center; | |
72 | + width: 100%; | |
73 | + position: fixed; | |
74 | + top: 0; | |
75 | + z-index: 999; | |
76 | + /* height: 80rpx; */ | |
77 | + /* margin-bottom: 20rpx; */ | |
78 | + background-color: #fff; | |
79 | + border-top: 2rpx solid #ebedf0; | |
80 | + /* border-bottom: 1rpx #fafafa solid; */ | |
81 | +} | |
82 | + | |
83 | +.type-box { | |
84 | + width: 25%; | |
85 | + box-sizing: border-box; | |
86 | + font-size: 32rpx; | |
87 | + line-height: 76rpx; | |
88 | + padding: 0 20rpx; | |
89 | + text-align: center; | |
90 | + display: inline-block; | |
91 | + overflow: hidden; | |
92 | +} | |
93 | + | |
94 | +.type-navbar-item { | |
95 | + /* border-bottom: 4rpx solid #fff; */ | |
96 | + display: flex; | |
97 | + justify-content: center; | |
98 | + width: 100%; | |
99 | + font-size: 26rpx; | |
100 | +} | |
101 | + | |
102 | +.type-item-on { | |
103 | + color: #F95D74; | |
104 | + font-weight: bold; | |
105 | + /* border-bottom: 4rpx solid #F95D74; */ | |
106 | + position: relative; | |
107 | + font-size: 30rpx; | |
108 | +} | |
109 | + | |
110 | +.type-item-on:after { | |
111 | + content: ''; | |
112 | + position: absolute; | |
113 | + width: 50%; | |
114 | + height: 4rpx; | |
115 | + background-color: #F95D74; | |
116 | + left: 0; | |
117 | + right: 0; | |
118 | + bottom: 0; | |
119 | + margin: 0 auto; | |
120 | +} | |
121 | + | |
122 | +.swiper_box { | |
123 | + width: 100%; | |
124 | + height: 750rpx; | |
125 | +} | |
126 | + | |
127 | +.goods-title { | |
128 | + display: flex; | |
129 | + justify-content: space-between; | |
130 | + align-items: center; | |
131 | + vertical-align: middle; | |
132 | + /* overflow: hidden; */ | |
133 | + /* height: 108rpx; */ | |
134 | +} | |
135 | + | |
136 | +.goods-name { | |
137 | + /* width: 560rpx; */ | |
138 | + /* line-height: 46rpx; */ | |
139 | + font-size: 32rpx; | |
140 | + font-weight: bold; | |
141 | + color: #333; | |
142 | + /* margin-top: 30rpx; | |
143 | + margin-bottom:30rpx; */ | |
144 | + flex: 1; | |
145 | + text-align: justify; | |
146 | + margin: 10rpx 0 20rpx; | |
147 | +} | |
148 | + | |
149 | +.goods-collect { | |
150 | + width: 112rpx; | |
151 | + padding-top: 30rpx; | |
152 | +} | |
153 | + | |
154 | +.collect-img { | |
155 | + width: 50rpx; | |
156 | + height: 44rpx; | |
157 | + margin: 0 auto; | |
158 | + overflow: hidden; | |
159 | +} | |
160 | + | |
161 | +.collect-des { | |
162 | + text-align: center; | |
163 | + font-size: 24rpx; | |
164 | + color: #333; | |
165 | +} | |
166 | + | |
167 | +.goods-price { | |
168 | + font-size: 60rpx; | |
169 | + /* padding: 20rpx 34rpx; */ | |
170 | + /* padding:0rpx 34rpx; */ | |
171 | + /* line-height: 60rpx; */ | |
172 | + color: #999; | |
173 | + padding: 20rpx; | |
174 | + /* margin-top: 46rpx; */ | |
175 | + /* margin-top:26rpx; | |
176 | + padding-bottom:20rpx; */ | |
177 | +} | |
178 | + | |
179 | +.prom-info { | |
180 | + margin: 10rpx 0; | |
181 | + color: #f23030; | |
182 | +} | |
183 | + | |
184 | +.prom-info>.prom-type { | |
185 | + color: white; | |
186 | + background-color: #f23030; | |
187 | + margin-right: 14rpx; | |
188 | + padding: 2rpx 8rpx; | |
189 | + border-radius: 4rpx; | |
190 | +} | |
191 | + | |
192 | +.market-price { | |
193 | + /* display: flex; | |
194 | + margin-left: -5rpx; */ | |
195 | +} | |
196 | + | |
197 | +.market-price .yuan { | |
198 | + /* top:24rpx; */ | |
199 | + font-size: 30rpx | |
200 | +} | |
201 | + | |
202 | +.market-price>view>text { | |
203 | + text-decoration: line-through; | |
204 | +} | |
205 | + | |
206 | +.market-price>.yj { | |
207 | + color: #999999; | |
208 | + font-size: 24rpx; | |
209 | + /* margin-left: 16rpx;position: relative;top:30rpx; */ | |
210 | + display: inline-block; | |
211 | +} | |
212 | + | |
213 | +.goods-price>.tm { | |
214 | + color: #999999; | |
215 | + font-size: 26rpx; | |
216 | + margin-top: 10rpx; | |
217 | +} | |
218 | + | |
219 | +.goods-num { | |
220 | + display: flex; | |
221 | + font-size: 24rpx; | |
222 | + justify-content: space-between; | |
223 | +} | |
224 | + | |
225 | +.goods-detail .twen { | |
226 | + background: #fff; | |
227 | + height: 60rpx; | |
228 | + line-height: 60rpx; | |
229 | + font-size: 30rpx; | |
230 | + padding-left: 30rpx; | |
231 | + display: flex; | |
232 | +} | |
233 | + | |
234 | +.goods-detail .twen .img { | |
235 | + width: 32rpx; | |
236 | + height: 32rpx; | |
237 | + margin-left: 200rpx; | |
238 | + background: #fff | |
239 | +} | |
240 | + | |
241 | +.goods-detail .twen image.img { | |
242 | + vertical-align: auto; | |
243 | +} | |
244 | + | |
245 | + | |
246 | +.logistics-item { | |
247 | + display: flex; | |
248 | + justify-content: space-between; | |
249 | + align-items: center; | |
250 | + height: 90rpx; | |
251 | + /*border-bottom: 1px solid #f5f5f5;*/ | |
252 | + font-size: 32rpx; | |
253 | + color: #666; | |
254 | +} | |
255 | + | |
256 | +.logistics-item .small { | |
257 | + color: #999; | |
258 | + font-size: 24rpx; | |
259 | +} | |
260 | + | |
261 | +.item-title { | |
262 | + width: 180rpx; | |
263 | +} | |
264 | + | |
265 | +.item-mes { | |
266 | + color: #333; | |
267 | + width: 420rpx; | |
268 | + height: 90rpx; | |
269 | + line-height: 90rpx; | |
270 | +} | |
271 | + | |
272 | +.item-img { | |
273 | + width: 32rpx; | |
274 | + height: 32rpx; | |
275 | +} | |
276 | + | |
277 | +.prom-item { | |
278 | + color: #f23030; | |
279 | + border: 1px solid #f23030; | |
280 | + border-radius: 18rpx; | |
281 | + line-height: 40rpx; | |
282 | + height: 40rpx; | |
283 | + padding: 2rpx 8rpx; | |
284 | +} | |
285 | + | |
286 | +.guarantee { | |
287 | + justify-content: space-around; | |
288 | +} | |
289 | + | |
290 | +.ico-item { | |
291 | + width: 32rpx; | |
292 | + height: 32rpx; | |
293 | + margin-right: 10rpx; | |
294 | +} | |
295 | + | |
296 | +.guarantee>view { | |
297 | + display: flex; | |
298 | + align-items: center; | |
299 | + height: 32rpx; | |
300 | + color: #666; | |
301 | +} | |
302 | + | |
303 | +.user-comment { | |
304 | + margin: 10rpx 0; | |
305 | + font-size: 28rpx; | |
306 | +} | |
307 | + | |
308 | +.good-comment, | |
309 | +.comment-num { | |
310 | + display: flex; | |
311 | +} | |
312 | + | |
313 | +.recommend { | |
314 | + background-color: #fff; | |
315 | + border-bottom: 1px solid #ddd; | |
316 | + padding-bottom: 20rpx; | |
317 | +} | |
318 | + | |
319 | +.recommend-title { | |
320 | + height: 70rpx; | |
321 | + line-height: 70rpx; | |
322 | + font-size: 28rpx; | |
323 | + padding: 0 30rpx; | |
324 | +} | |
325 | + | |
326 | +.recommend-ul { | |
327 | + display: flex; | |
328 | + justify-content: flex-start; | |
329 | +} | |
330 | + | |
331 | +.recommend-ul .li { | |
332 | + width: 25%; | |
333 | + box-sizing: border-box; | |
334 | + text-align: center; | |
335 | + font-size: 28rpx; | |
336 | + color: #333; | |
337 | +} | |
338 | + | |
339 | +.li-img { | |
340 | + width: 120rpx; | |
341 | + height: 120rpx; | |
342 | + margin: 0 auto; | |
343 | +} | |
344 | + | |
345 | +.li-title { | |
346 | + height: 58rpx; | |
347 | + line-height: 30rpx; | |
348 | + margin: 10rpx 0; | |
349 | +} | |
350 | + | |
351 | +.comment-item { | |
352 | + background-color: #fff; | |
353 | + font-size: 28rpx; | |
354 | +} | |
355 | + | |
356 | +.comment-title { | |
357 | + display: flex; | |
358 | + justify-content: space-between; | |
359 | + align-items: center; | |
360 | + height: 102rpx; | |
361 | + margin: 0 30rpx; | |
362 | + color: #333; | |
363 | + border-bottom: 1px solid #eee; | |
364 | +} | |
365 | + | |
366 | +.user-name { | |
367 | + display: flex; | |
368 | + align-items: center; | |
369 | +} | |
370 | + | |
371 | +.user-pic { | |
372 | + width: 54rpx; | |
373 | + height: 54rpx; | |
374 | + margin-right: 10rpx; | |
375 | + border-radius: 50%; | |
376 | + overflow: hidden; | |
377 | +} | |
378 | + | |
379 | +.stars { | |
380 | + float: left; | |
381 | + display: flex; | |
382 | + height: 42rpx; | |
383 | + line-height: 42rpx; | |
384 | + margin: 15rpx 0; | |
385 | + width: 200rpx; | |
386 | +} | |
387 | + | |
388 | +.star { | |
389 | + width: 26rpx; | |
390 | + height: 26rpx; | |
391 | + margin-right: 5rpx; | |
392 | +} | |
393 | + | |
394 | +.state-spec { | |
395 | + margin: 15rpx 0; | |
396 | + float: right; | |
397 | + font-size: 24rpx; | |
398 | + color: #666; | |
399 | + width: 460rpx; | |
400 | + text-align: right; | |
401 | +} | |
402 | + | |
403 | +.comment-cont { | |
404 | + padding: 0 30rpx 30rpx; | |
405 | + border-bottom: 1px solid #eee; | |
406 | +} | |
407 | + | |
408 | +.comment-mes { | |
409 | + line-height: 42rpx; | |
410 | +} | |
411 | + | |
412 | +.img-ul { | |
413 | + display: flex; | |
414 | + flex-wrap: wrap; | |
415 | +} | |
416 | + | |
417 | +.img-li { | |
418 | + width: 150rpx; | |
419 | + height: 150rpx; | |
420 | + margin-top: 8rpx; | |
421 | + margin-right: 10rpx; | |
422 | +} | |
423 | + | |
424 | +.comment-btn { | |
425 | + height: 60rpx; | |
426 | + padding: 20rpx 30rpx; | |
427 | +} | |
428 | + | |
429 | +.comment-btn .btn { | |
430 | + display: flex; | |
431 | + justify-content: center; | |
432 | + align-items: center; | |
433 | + height: 60rpx; | |
434 | + width: 45%; | |
435 | + border: 1px solid #eee; | |
436 | +} | |
437 | + | |
438 | +.comment-btn .btn-img { | |
439 | + width: 30rpx; | |
440 | + height: 28rpx; | |
441 | + margin: 0 10rpx; | |
442 | +} | |
443 | + | |
444 | +.reply-ul { | |
445 | + margin-top: 20rpx; | |
446 | +} | |
447 | + | |
448 | +.reply-li { | |
449 | + color: #aaa; | |
450 | +} | |
451 | + | |
452 | +.join-cart { | |
453 | + position: fixed; | |
454 | + left: 0; | |
455 | + bottom: 0; | |
456 | + display: flex; | |
457 | + width: 100%; | |
458 | + height: 100rpx; | |
459 | + background-color: #fff; | |
460 | + z-index: 9; | |
461 | + border-top: 4rpx solid #eee; | |
462 | + | |
463 | +} | |
464 | + | |
465 | +.join-cart>view { | |
466 | + width: 29%; | |
467 | +} | |
468 | + | |
469 | +.join-cart>.new_split { | |
470 | + width: 13%; | |
471 | + text-align: center; | |
472 | + padding: 0; | |
473 | + margin: 0; | |
474 | +} | |
475 | + | |
476 | +.cart-ico { | |
477 | + font-size: 24rpx; | |
478 | + color: #333; | |
479 | +} | |
480 | + | |
481 | +.shopping-cart { | |
482 | + position: relative; | |
483 | +} | |
484 | + | |
485 | +.cs-img { | |
486 | + width: 45rpx; | |
487 | + height: 40rpx; | |
488 | + margin-top: 15rpx; | |
489 | +} | |
490 | + | |
491 | +.sc-img { | |
492 | + width: 42rpx; | |
493 | + height: 40rpx; | |
494 | + margin-top: 15rpx; | |
495 | +} | |
496 | + | |
497 | +.cart-num { | |
498 | + position: absolute; | |
499 | + left: 50%; | |
500 | + top: 1rpx; | |
501 | + width: 40rpx; | |
502 | + height: 40rpx; | |
503 | + line-height: 40rpx; | |
504 | + text-align: center; | |
505 | + border-radius: 50%; | |
506 | + color: #fff; | |
507 | + background-color: rgba(217, 81, 99, 0.9); | |
508 | +} | |
509 | + | |
510 | +.cart-btn { | |
511 | + font-size: 28rpx; | |
512 | + color: #fff; | |
513 | + line-height: 70rpx; | |
514 | + margin-top: 16rpx; | |
515 | + text-align: center; | |
516 | + | |
517 | + | |
518 | +} | |
519 | + | |
520 | +.join-btn { | |
521 | + background-color: #ffb03f; | |
522 | + height: 70rpx; | |
523 | + border-radius: 55rpx 0rpx 0rpx 55rpx; | |
524 | + margin-top: 16rpx; | |
525 | + | |
526 | + | |
527 | +} | |
528 | + | |
529 | +view.cart-btn-lg { | |
530 | + width: 50%; | |
531 | +} | |
532 | + | |
533 | +.buy-btn { | |
534 | + background-color: #f23030; | |
535 | + height: 70rpx; | |
536 | + border-radius: 0 56rpx 55rpx 0; | |
537 | + | |
538 | +} | |
539 | + | |
540 | +.buy-btn-all { | |
541 | + background-color: #f23030; | |
542 | + height: 70rpx; | |
543 | + border-radius: 56rpx; | |
544 | +} | |
545 | + | |
546 | + | |
547 | +.toTop { | |
548 | + position: fixed; | |
549 | + z-index: 3; | |
550 | + right: 20rpx; | |
551 | + bottom: 160rpx; | |
552 | + width: 68rpx; | |
553 | + height: 68rpx; | |
554 | + border: 1px solid #ddd; | |
555 | + border-radius: 50%; | |
556 | + overflow: hidden; | |
557 | + cursor: pointer; | |
558 | +} | |
559 | + | |
560 | +.comment-more { | |
561 | + height: 56rpx; | |
562 | + line-height: 56rpx; | |
563 | + font-size: 26rpx; | |
564 | + color: #999; | |
565 | + text-align: center; | |
566 | + background-color: #eee; | |
567 | +} | |
568 | + | |
569 | +.goods-more { | |
570 | + background-color: #fff; | |
571 | +} | |
572 | + | |
573 | +.goods-norms { | |
574 | + background-color: #fff; | |
575 | +} | |
576 | + | |
577 | +.type-navbar2 { | |
578 | + display: flex; | |
579 | + height: 72rpx; | |
580 | + border-top: 1px solid #ddd; | |
581 | + border-bottom: 1px solid #ddd; | |
582 | +} | |
583 | + | |
584 | +.type-box2 { | |
585 | + width: 50%; | |
586 | + font-size: 26rpx; | |
587 | + line-height: 72rpx; | |
588 | + text-align: center; | |
589 | + overflow: hidden; | |
590 | +} | |
591 | + | |
592 | +.type-item2-on { | |
593 | + color: #f23030; | |
594 | +} | |
595 | + | |
596 | +.parameter { | |
597 | + padding: 40rpx 0; | |
598 | +} | |
599 | + | |
600 | +.table { | |
601 | + width: 698rpx; | |
602 | + margin: 0 auto; | |
603 | + border: 1px solid #ddd; | |
604 | + border-bottom: none; | |
605 | +} | |
606 | + | |
607 | +.tb { | |
608 | + width: 100%; | |
609 | + min-height: 69rpx; | |
610 | + line-height: 69rpx; | |
611 | + border-bottom: 1px solid #ddd; | |
612 | + font-size: 28rpx; | |
613 | + text-align: center; | |
614 | + color: #333; | |
615 | +} | |
616 | + | |
617 | +.th-thitle { | |
618 | + font-weight: bold; | |
619 | + background-color: #f5fafe; | |
620 | +} | |
621 | + | |
622 | +.td-cont { | |
623 | + display: flex; | |
624 | +} | |
625 | + | |
626 | +.td-title { | |
627 | + width: 259rpx; | |
628 | + background-color: #f5fafe; | |
629 | + border-right: 1px solid #ddd; | |
630 | +} | |
631 | + | |
632 | +.td-text { | |
633 | + width: 439rpx; | |
634 | +} | |
635 | + | |
636 | +.goods-comment { | |
637 | + background-color: #fff; | |
638 | +} | |
639 | + | |
640 | +.type-navbar3 { | |
641 | + display: flex; | |
642 | + height: 88rpx; | |
643 | + border-top: 1px solid #ddd; | |
644 | + border-bottom: 1px solid #ddd; | |
645 | + padding: 10rpx 0; | |
646 | +} | |
647 | + | |
648 | +.type-box3 { | |
649 | + width: 20%; | |
650 | + font-size: 30rpx; | |
651 | + line-height: 44rpx; | |
652 | + text-align: center; | |
653 | + overflow: hidden; | |
654 | +} | |
655 | + | |
656 | +.type-item3-on { | |
657 | + color: #f23030; | |
658 | +} | |
659 | + | |
660 | +.spec-model { | |
661 | + position: fixed; | |
662 | + bottom: 0; | |
663 | + z-index: 20; | |
664 | + background: white; | |
665 | + width: 100%; | |
666 | + /* padding: 0 30rpx; */ | |
667 | + font-size: 32rpx; | |
668 | + box-sizing: border-box; | |
669 | + border-radius: 20rpx 20rpx 0 0; | |
670 | + /* height: 72%; */ | |
671 | +} | |
672 | + | |
673 | +.spec-model .pding { | |
674 | + padding: 0 20rpx; | |
675 | +} | |
676 | + | |
677 | +.spec-goods { | |
678 | + padding: 30rpx 0 20rpx; | |
679 | + /* float: left; */ | |
680 | + width: 100%; | |
681 | + /* border-bottom:2rpx solid #eee; */ | |
682 | +} | |
683 | + | |
684 | +.spec-img { | |
685 | + float: left; | |
686 | + height: 186rpx; | |
687 | + width: 186rpx; | |
688 | + border: 4rpx solid #eee | |
689 | +} | |
690 | + | |
691 | +.spec-goods-info { | |
692 | + float: left; | |
693 | + padding: 0 25rpx; | |
694 | + width: 400rpx; | |
695 | +} | |
696 | + | |
697 | +.spec-goods-name { | |
698 | + font-size: 30rpx; | |
699 | + line-height: 35rpx; | |
700 | + height: 70rpx; | |
701 | + margin: 15rpx 20rpx 25rpx 0; | |
702 | + overflow: hidden; | |
703 | + text-overflow: ellipsis; | |
704 | + color: #333; | |
705 | +} | |
706 | + | |
707 | +.spec-goods-price { | |
708 | + color: #d60021; | |
709 | + font-size: 33rpx; | |
710 | + font-weight: bold; | |
711 | + /* display: flex; */ | |
712 | +} | |
713 | + | |
714 | +.spec-goods-stock { | |
715 | + margin-top: 3rpx; | |
716 | + font-size: 24rpx; | |
717 | + color: #999999; | |
718 | + margin-right: 15rpx; | |
719 | +} | |
720 | + | |
721 | +.spec-name { | |
722 | + clear: both; | |
723 | + padding: 20rpx 0; | |
724 | + font-size: 30rpx; | |
725 | + color: #333; | |
726 | +} | |
727 | + | |
728 | + | |
729 | +.spec-name+view{ | |
730 | + flex-wrap: wrap; | |
731 | +} | |
732 | + | |
733 | +.quhuo { | |
734 | + font-size: 30rpx; | |
735 | + color: #000 | |
736 | +} | |
737 | + | |
738 | +.b_num { | |
739 | + display: flex; | |
740 | + font-size: 30rpx; | |
741 | + color: #333; | |
742 | + justify-content: space-between; | |
743 | + align-items: center; | |
744 | + padding: 20rpx 0; | |
745 | +} | |
746 | + | |
747 | +.count { | |
748 | + /* position: fixed; */ | |
749 | + display: flex; | |
750 | + height: 50rpx; | |
751 | + /* border: 1rpx solid #000; */ | |
752 | + font-size: 28rpx; | |
753 | + right: 30rpx; | |
754 | +} | |
755 | + | |
756 | + | |
757 | +.count>view, | |
758 | +.count>input { | |
759 | + width: 60rpx; | |
760 | + height: 50rpx; | |
761 | + line-height: 50rpx; | |
762 | + text-align: center; | |
763 | +} | |
764 | + | |
765 | +.spec_bt { | |
766 | + background: fff; | |
767 | + color: #333; | |
768 | + margin-left: 10rpx; | |
769 | + padding: 4rpx 15rpx 4rpx; | |
770 | + display: inline-block; | |
771 | + border-radius: 30rpx; | |
772 | + font-size: 24rpx; | |
773 | + border: 1rpx solid #ccc; | |
774 | + margin: 10rpx; | |
775 | + height: 40rpx; | |
776 | + line-height: 40rpx; | |
777 | +} | |
778 | + | |
779 | +.spec_bt.act { | |
780 | + background: #d60021; | |
781 | + color: #fff; | |
782 | + border: 1rpx solid #d60021; | |
783 | +} | |
784 | + | |
785 | +.sub, | |
786 | +.add, | |
787 | +.count>input { | |
788 | + /* border-right: 1px solid #000; */ | |
789 | + background-color: #f8f8f8; | |
790 | + border-radius: 8rpx; | |
791 | +} | |
792 | + | |
793 | +.sub.active { | |
794 | + /* background-color: #ddd; */ | |
795 | + color: #ccc; | |
796 | +} | |
797 | + | |
798 | +.count>input { | |
799 | + margin: 0 10rpx; | |
800 | +} | |
801 | + | |
802 | +.add { | |
803 | + /* background-color: #f8f8f8; */ | |
804 | + /* border-left: 1px solid #000; */ | |
805 | +} | |
806 | + | |
807 | +.spec-btn { | |
808 | + color: black; | |
809 | + background-color: white; | |
810 | + padding: 10rpx 10rpx; | |
811 | + font-size: 26rpx; | |
812 | + line-height: 28rpx; | |
813 | + float: left; | |
814 | + border: 1rpx solid #dedede; | |
815 | + margin: 4rpx 10rpx 4rpx 0; | |
816 | + border-radius: 4rpx; | |
817 | +} | |
818 | + | |
819 | +.spec-btn-click { | |
820 | + color: white; | |
821 | + background-color: #f23030; | |
822 | + border: 1rpx solid #f23030; | |
823 | +} | |
824 | + | |
825 | +.spec-cart-btns { | |
826 | + /* width: 92%; */ | |
827 | + line-height: 70rpx; | |
828 | + /* margin: 0rpx auto; | |
829 | + margin-top: 160rpx; */ | |
830 | + /* border-radius: 20rpx; */ | |
831 | + /* position: fixed; */ | |
832 | + /* bottom: 50rpx; */ | |
833 | + /* left: 4%; */ | |
834 | + padding: 20rpx; | |
835 | +} | |
836 | + | |
837 | +.spec-cart-btn { | |
838 | + | |
839 | + width: 100%; | |
840 | + font-size: 30rpx; | |
841 | + text-align: center; | |
842 | + color: white; | |
843 | + border-radius: 40rpx; | |
844 | +} | |
845 | + | |
846 | +.spec-cart-btn.w40 { | |
847 | + width: 46%; | |
848 | +} | |
849 | + | |
850 | +.spec-add-cart { | |
851 | + background-color: #ffb03f; | |
852 | +} | |
853 | + | |
854 | +.spec-buy { | |
855 | + background-color: #f23030; | |
856 | + /* margin-left: 34rpx; */ | |
857 | +} | |
858 | + | |
859 | +.spec-cart-disable { | |
860 | + background: #bbbbbb; | |
861 | +} | |
862 | + | |
863 | +.spec-cart-btn-lg { | |
864 | + width: 614rpx; | |
865 | +} | |
866 | + | |
867 | +.prom-model { | |
868 | + position: fixed; | |
869 | + bottom: 0; | |
870 | + z-index: 20; | |
871 | + background: white; | |
872 | + width: 100%; | |
873 | + padding: 0 30rpx 30rpx; | |
874 | + font-size: 32rpx; | |
875 | + box-sizing: border-box; | |
876 | + overflow-x: hidden; | |
877 | +} | |
878 | + | |
879 | +.prom-model .prom-title { | |
880 | + text-align: center; | |
881 | + margin: 30rpx 0; | |
882 | +} | |
883 | + | |
884 | +.prom-model .logistics-item { | |
885 | + border: 0; | |
886 | +} | |
887 | + | |
888 | +.prom-model .item-mes { | |
889 | + width: 500rpx; | |
890 | +} | |
891 | + | |
892 | +.integral-btn { | |
893 | + width: 100%; | |
894 | + padding: 0rpx; | |
895 | + margin: 0rpx; | |
896 | +} | |
897 | + | |
898 | +.clear { | |
899 | + clear: both; | |
900 | +} | |
901 | + | |
902 | +.sto_v .title, | |
903 | +.sto_v .stitle { | |
904 | + border-top: 1rpx solid #dedede; | |
905 | + border-bottom: 1rpx solid #dedede; | |
906 | + height: 78rpx; | |
907 | + line-height: 78rpx; | |
908 | +} | |
909 | + | |
910 | +.sto_v .title .tubiao, | |
911 | +.sto_v .stitle .tubiao { | |
912 | + width: 32rpx; | |
913 | + height: 32rpx; | |
914 | + margin-top: 23rpx; | |
915 | +} | |
916 | + | |
917 | +.itemlists .item { | |
918 | + border-bottom: 1rpx solid #dedede; | |
919 | + height: 72rpx; | |
920 | + line-height: 72rpx; | |
921 | + font-size: 28rpx; | |
922 | + margin: 0 10rpx; | |
923 | +} | |
924 | + | |
925 | +.cshu { | |
926 | + margin-bottom: 30rpx; | |
927 | + margin-top: 20rpx; | |
928 | +} | |
929 | + | |
930 | +.cshu view { | |
931 | + color: #999; | |
932 | + font-size: 30rpx; | |
933 | + margin-left: 26rpx; | |
934 | +} | |
935 | + | |
936 | + | |
937 | +/*---活动特殊显示---*/ | |
938 | +.prom_show { | |
939 | + height: 120rpx; | |
940 | + display: flex; | |
941 | +} | |
942 | + | |
943 | +.prom_show .secondkill-img { | |
944 | + width: 100%; | |
945 | + height: 100%; | |
946 | +} | |
947 | + | |
948 | +.prom_show .spike-img { | |
949 | + width: 283rpx; | |
950 | + height: 57rpx; | |
951 | + top: 35rpx; | |
952 | + left: 31rpx; | |
953 | +} | |
954 | + | |
955 | +.prom_show .stop { | |
956 | + color: #d81731; | |
957 | + top: 17rpx; | |
958 | + right: 65rpx; | |
959 | + font-weight: 600; | |
960 | +} | |
961 | + | |
962 | +.prom_show .start { | |
963 | + color: #009ae2; | |
964 | + top: 17rpx; | |
965 | + right: 65rpx; | |
966 | + font-weight: 600; | |
967 | +} | |
968 | + | |
969 | +.prom_show .timeac { | |
970 | + font-size: 32rpx; | |
971 | + height: 120rpx; | |
972 | + color: #333; | |
973 | +} | |
974 | + | |
975 | +.prom_show .timeac.left { | |
976 | + width: 66%; | |
977 | + color: #fff; | |
978 | + background: #f23030; | |
979 | +} | |
980 | + | |
981 | +.prom_show .timeac.right { | |
982 | + width: 34%; | |
983 | + background-color: #d7d7d7; | |
984 | + text-align: center | |
985 | +} | |
986 | + | |
987 | +.prom_show .secview .day { | |
988 | + padding-right: 10rpx; | |
989 | +} | |
990 | + | |
991 | +.prom_show .secview .time-val { | |
992 | + width: 36rpx; | |
993 | + height: 36rpx; | |
994 | + border-radius: 7rpx; | |
995 | + line-height: 36rpx; | |
996 | +} | |
997 | + | |
998 | +.prom_show .secview .time { | |
999 | + margin-right: 10rpx; | |
1000 | + margin-left: 10rpx; | |
1001 | +} | |
1002 | + | |
1003 | + | |
1004 | +.prom_show .timeac.left view { | |
1005 | + margin-left: 20rpx | |
1006 | +} | |
1007 | + | |
1008 | +.prom_show .timeac.left view.firview { | |
1009 | + margin-top: 10rpx | |
1010 | +} | |
1011 | + | |
1012 | +.prom_show .timeac.left view .tr_line { | |
1013 | + text-decoration: line-through; | |
1014 | + font-size: 28rpx; | |
1015 | +} | |
1016 | + | |
1017 | +.prom_show .timeac.left view .bprice { | |
1018 | + font-size: 50rpx; | |
1019 | +} | |
1020 | + | |
1021 | +.prom_show .timeac.right view.firview { | |
1022 | + margin-top: 12rpx; | |
1023 | + margin-bottom: 10rpx | |
1024 | +} | |
1025 | + | |
1026 | +.prom_show .timeac.right view.secview { | |
1027 | + display: flex; | |
1028 | + text-align: center; | |
1029 | + justify-content: center; | |
1030 | + flex-direction: row; | |
1031 | +} | |
1032 | + | |
1033 | +.prom_show .timeac.right view .tui-conutdown-box { | |
1034 | + /* background: #6b6b6b; */ | |
1035 | + width: auto; | |
1036 | + /* min-width: 45rpx; */ | |
1037 | + height: 45rpx; | |
1038 | + color: #c4182e; | |
1039 | + font-size: 27rpx; | |
1040 | + text-align: center; | |
1041 | + line-height: 46rpx; | |
1042 | +} | |
1043 | + | |
1044 | +.huise { | |
1045 | + background: gray | |
1046 | +} | |
1047 | + | |
1048 | +.lanse { | |
1049 | + background: #0199e2 | |
1050 | +} | |
1051 | + | |
1052 | + | |
1053 | +/*------拼单------*/ | |
1054 | +.pt_view { | |
1055 | + text-align: center; | |
1056 | + width: 100%; | |
1057 | + height: 100rpx; | |
1058 | + line-height: 100rpx; | |
1059 | + font-size: 26rpx | |
1060 | +} | |
1061 | + | |
1062 | +.pt_view .secondkill-img { | |
1063 | + width: 100%; | |
1064 | + height: 100%; | |
1065 | +} | |
1066 | + | |
1067 | +.pt_fir { | |
1068 | + background: #fff; | |
1069 | + /* margin-bottom: 10rpx; */ | |
1070 | +} | |
1071 | + | |
1072 | +.pt_fir .pt_fir_title { | |
1073 | + display: flex; | |
1074 | + align-items: center; | |
1075 | + /* margin-left: 10rpx; margin-top: 20rpx; */ | |
1076 | + font-size: 28rpx; | |
1077 | + position: relative; | |
1078 | +} | |
1079 | + | |
1080 | +.pt_fir .pt_fir_title .kt_type { | |
1081 | + color: #fff; | |
1082 | + background: #e9030d; | |
1083 | + width: 100rpx; | |
1084 | + line-height: 40rpx; | |
1085 | + border-radius: 6rpx; | |
1086 | + margin: 0 10rpx; | |
1087 | + height: 40rpx; | |
1088 | + font-size: 24rpx; | |
1089 | + text-align: center; | |
1090 | +} | |
1091 | + | |
1092 | +.pt_fir .pt_fir_title .price { | |
1093 | + color: #e9030d; | |
1094 | + font-size: 26rpx; | |
1095 | +} | |
1096 | + | |
1097 | +.pt_fir .pt_fir_title .bigw { | |
1098 | + font-size: 36rpx; | |
1099 | +} | |
1100 | + | |
1101 | +.pt_fir .pt_fir_title .tprice { | |
1102 | + text-decoration: line-through; | |
1103 | + color: #949494 | |
1104 | +} | |
1105 | + | |
1106 | +.pt_fir .pt_fir_title .tprice.ml50 { | |
1107 | + margin-left: 50rpx | |
1108 | +} | |
1109 | + | |
1110 | +.pt_fir .pt_fir_title .js { | |
1111 | + padding: 0 15rpx; | |
1112 | + height: 40rpx; | |
1113 | + background: #e9030d; | |
1114 | + text-align: center; | |
1115 | + border-radius: 8rpx; | |
1116 | + color: #fff; | |
1117 | + margin-left: 10rpx; | |
1118 | +} | |
1119 | + | |
1120 | +.pt_fir .pt_fir_title .tuannum { | |
1121 | + color: #e9030d; | |
1122 | + position: absolute; | |
1123 | + right: 20rpx; | |
1124 | + font-size: 26rpx; | |
1125 | +} | |
1126 | + | |
1127 | +.pding { | |
1128 | + padding-top: 20rpx; | |
1129 | + padding-left: 20rpx; | |
1130 | + height: 81%; | |
1131 | + padding-right: 20rpx; | |
1132 | + font-size: 26rpx; | |
1133 | + color: #ea120f | |
1134 | +} | |
1135 | + | |
1136 | +.pdres { | |
1137 | + margin-left: 10rpx; | |
1138 | + color: #8f8f94 | |
1139 | +} | |
1140 | + | |
1141 | +.ptgz { | |
1142 | + position: relative; | |
1143 | + font-size: 30rpx; | |
1144 | + padding-left: 20rpx; | |
1145 | + margin-top: 10rpx; | |
1146 | + overflow: hidden | |
1147 | +} | |
1148 | + | |
1149 | +.shuxian { | |
1150 | + width: 6rpx; | |
1151 | + height: 28rpx; | |
1152 | + background: #ea120f; | |
1153 | + display: inline-block; | |
1154 | + top: 5rpx; | |
1155 | + position: relative; | |
1156 | + margin-right: 5rpx | |
1157 | +} | |
1158 | + | |
1159 | +.ptgz_an { | |
1160 | + position: absolute; | |
1161 | + top: 5rpx; | |
1162 | + right: 6rpx | |
1163 | +} | |
1164 | + | |
1165 | +.ptgz_an .arrow-two { | |
1166 | + width: 18rpx; | |
1167 | + height: 18rpx; | |
1168 | + border-color: #da0b31; | |
1169 | + margin-top: 30rpx; | |
1170 | +} | |
1171 | + | |
1172 | +.pt_fir.se { | |
1173 | + height: auto; | |
1174 | + margin-bottom: 10rpx | |
1175 | +} | |
1176 | + | |
1177 | +.t_gz { | |
1178 | + padding: 10rpx 20rpx; | |
1179 | + font-size: 28rpx | |
1180 | +} | |
1181 | + | |
1182 | +.pt_fir.se1 { | |
1183 | + height: auto; | |
1184 | + margin: 0 | |
1185 | +} | |
1186 | + | |
1187 | +.pt_fir.se2 { | |
1188 | + height: auto; | |
1189 | + margin: 0; | |
1190 | + /* border-top:6rpx solid #eeeeee;border-bottom:2rpx solid #eeeeee; */ | |
1191 | +} | |
1192 | + | |
1193 | +.pt_hb { | |
1194 | + height: 78rpx; | |
1195 | + line-height: 75rpx; | |
1196 | + position: relative; | |
1197 | + font-size: 32rpx; | |
1198 | + overflow: hidden; | |
1199 | + width: 695rpx; | |
1200 | + margin-left: 28rpx; | |
1201 | + border-bottom: 1rpx solid #E5E5E5 | |
1202 | +} | |
1203 | + | |
1204 | +.ptgz_an.xq { | |
1205 | + font-size: 32rpx; | |
1206 | + color: #d40024 | |
1207 | +} | |
1208 | + | |
1209 | +.wf { | |
1210 | + display: flex; | |
1211 | + padding: 20rpx 0; | |
1212 | +} | |
1213 | + | |
1214 | +.wf .item { | |
1215 | + width: 24.5%; | |
1216 | + text-align: center; | |
1217 | + font-size: 26rpx; | |
1218 | + color: #666 | |
1219 | +} | |
1220 | + | |
1221 | +.wf .item .item_txy { | |
1222 | + position: relative; | |
1223 | + width: 60rpx; | |
1224 | + height: 60rpx; | |
1225 | + background: #ea120f; | |
1226 | + border-radius: 50%; | |
1227 | + left: 50%; | |
1228 | + margin-left: -30rpx; | |
1229 | + border: 3px #dfdfdf solid; | |
1230 | + text-align: center; | |
1231 | + line-height: 60rpx; | |
1232 | + color: #fff; | |
1233 | + margin-bottom: 10rpx; | |
1234 | +} | |
1235 | + | |
1236 | +.wf .item .item_txy.hs { | |
1237 | + background: #cbcbcb; | |
1238 | +} | |
1239 | + | |
1240 | +.po { | |
1241 | + margin-bottom: 20rpx; | |
1242 | +} | |
1243 | + | |
1244 | +.cart-btn.line-h { | |
1245 | + line-height: 26rpx; | |
1246 | +} | |
1247 | + | |
1248 | +.cart-btn .fir-v { | |
1249 | + margin-top: 10rpx; | |
1250 | +} | |
1251 | + | |
1252 | +.hyt { | |
1253 | + padding: 0 20rpx; | |
1254 | + font-size: 30rpx; | |
1255 | + display: flex; | |
1256 | + align-items: center; | |
1257 | + margin-top: 10rpx; | |
1258 | +} | |
1259 | + | |
1260 | +.hyt .r_f { | |
1261 | + color: #e9120f; | |
1262 | + font-size: 26rpx; | |
1263 | + position: relative; | |
1264 | + top: 3rpx | |
1265 | +} | |
1266 | + | |
1267 | +.hyt .byj { | |
1268 | + color: #e9120f; | |
1269 | + font-size: 32rpx; | |
1270 | + position: relative; | |
1271 | + top: 5rpx | |
1272 | +} | |
1273 | + | |
1274 | +.pt_fir .pt_fir_title.no-mar-b { | |
1275 | + margin-bottom: 0; | |
1276 | + padding-bottom: 10rpx; | |
1277 | + margin-left: 20rpx | |
1278 | +} | |
1279 | + | |
1280 | +.pt_fir .pt_fir_title.boder-1 { | |
1281 | + border-bottom: 1rpx #e7e7e7 solid | |
1282 | +} | |
1283 | + | |
1284 | +.jie_price { | |
1285 | + /* padding: 10rpx 30rpx; */ | |
1286 | +} | |
1287 | + | |
1288 | +.jie_price_title { | |
1289 | + font-size: 30rpx; | |
1290 | + color: #a26270; | |
1291 | + margin-bottom: 10rpx | |
1292 | +} | |
1293 | + | |
1294 | +.price_list { | |
1295 | + display: flex; | |
1296 | + width: 100%; | |
1297 | +} | |
1298 | + | |
1299 | +.price_item { | |
1300 | + width: 25%; | |
1301 | + font-size: 28rpx; | |
1302 | + color: #4c336c | |
1303 | +} | |
1304 | + | |
1305 | +.pt_fir.se2 .zzk-1 { | |
1306 | + /* margin-top: 23rpx; */ | |
1307 | + font-size: 30rpx; | |
1308 | + position: relative; | |
1309 | + /* margin-bottom: 30rpx; */ | |
1310 | + border-left: 4rpx solid red; | |
1311 | + /* margin-left:14rpx; */ | |
1312 | + height: 30rpx; | |
1313 | + line-height: 30rpx; | |
1314 | + /* padding-left:5rpx; */ | |
1315 | +} | |
1316 | + | |
1317 | +.ckgd { | |
1318 | + /* position: absolute;top:0;right:57rpx; */ | |
1319 | + color: #d70025; | |
1320 | + font-size: 26rpx; | |
1321 | +} | |
1322 | + | |
1323 | +.ckgd .arrow-one { | |
1324 | + width: 14rpx; | |
1325 | + height: 14rpx; | |
1326 | + border-color: #da0b31; | |
1327 | + /* margin-top:5rpx; */ | |
1328 | + margin: auto; | |
1329 | +} | |
1330 | + | |
1331 | +.bview { | |
1332 | + position: fixed; | |
1333 | + top: 0; | |
1334 | + left: 0; | |
1335 | + width: 100%; | |
1336 | + height: 100%; | |
1337 | + background-color: rgba(0, 0, 0, 0.5); | |
1338 | +} | |
1339 | + | |
1340 | +.juzhong { | |
1341 | + position: fixed; | |
1342 | + top: 0; | |
1343 | + left: 0; | |
1344 | + width: 100%; | |
1345 | + height: 100%; | |
1346 | + display: flex; | |
1347 | + flex-direction: row; | |
1348 | + justify-content: center; | |
1349 | + align-items: center; | |
1350 | +} | |
1351 | + | |
1352 | +.juzhong .xq { | |
1353 | + padding: 0 20rpx; | |
1354 | + background: #fff; | |
1355 | + font-size: 30rpx; | |
1356 | + padding-bottom: 20rpx; | |
1357 | +} | |
1358 | + | |
1359 | +.juzhong .xq .title { | |
1360 | + text-align: center; | |
1361 | + margin: 20rpx 0; | |
1362 | + position: relative; | |
1363 | + height: 50rpx; | |
1364 | +} | |
1365 | + | |
1366 | +.juzhong .xq .hs1 { | |
1367 | + font-size: 28rpx; | |
1368 | + color: #ab8f9e | |
1369 | +} | |
1370 | + | |
1371 | +.juzhong .xq .title .close { | |
1372 | + position: absolute; | |
1373 | + top: 0; | |
1374 | + right: 0; | |
1375 | + width: 45rpx; | |
1376 | + height: 45rpx; | |
1377 | +} | |
1378 | + | |
1379 | +.pt_qd { | |
1380 | + /* margin-top: 40rpx; height: auto; */ | |
1381 | + padding: 20rpx; | |
1382 | +} | |
1383 | + | |
1384 | +.spec-cart-btn.w100 { | |
1385 | + width: 95%; | |
1386 | + margin-left: 0; | |
1387 | + height: 75rpx; | |
1388 | + line-height: 75rpx; | |
1389 | + margin: auto; | |
1390 | +} | |
1391 | + | |
1392 | +.sto_v { | |
1393 | + color: #333; | |
1394 | +} | |
1395 | + | |
1396 | +.ellipsis { | |
1397 | + overflow: hidden; | |
1398 | + white-space: nowrap; | |
1399 | + text-overflow: ellipsis; | |
1400 | +} | |
1401 | + | |
1402 | + | |
1403 | +/*---多少人参加团--*/ | |
1404 | +.group { | |
1405 | + padding-top: 20rpx; | |
1406 | + padding-bottom: 20rpx; | |
1407 | + width: 100%; | |
1408 | + /* min-height: 92rpx; */ | |
1409 | + border-bottom: 2rpx solid #ebedf0; | |
1410 | + | |
1411 | +} | |
1412 | + | |
1413 | +.group .group-list { | |
1414 | + display: flex; | |
1415 | + align-items: center; | |
1416 | + justify-content: space-around; | |
1417 | + /* height: 90rpx; */ | |
1418 | + /* padding: 0 130rpx 0 100rpx; */ | |
1419 | + /* width: 470rpx; | |
1420 | + | |
1421 | + position: absolute; */ | |
1422 | +} | |
1423 | + | |
1424 | +.group .group-list .gtou { | |
1425 | + width: 70rpx; | |
1426 | + height: 70rpx; | |
1427 | + /* float: left; | |
1428 | + position: relative; | |
1429 | + top: 6rpx; | |
1430 | + left: -96rpx; */ | |
1431 | +} | |
1432 | + | |
1433 | +.group .group-list .gtou image { | |
1434 | + display: block; | |
1435 | + width: 100%; | |
1436 | + height: 100%; | |
1437 | + border-radius: 50%; | |
1438 | + background-color: #f0f0f0; | |
1439 | +} | |
1440 | + | |
1441 | +.group .group-list .gdn { | |
1442 | + width: 140rpx; | |
1443 | + text-align: center; | |
1444 | + /* float: left; */ | |
1445 | + font-size: 26rpx; | |
1446 | + /* padding-left: 20rpx; */ | |
1447 | + /* line-height: 48rpx; | |
1448 | + height: 48rpx; | |
1449 | + width: 168rpx; | |
1450 | + position: relative; | |
1451 | + left: -80rpx; | |
1452 | + top:20rpx; */ | |
1453 | + font-weight: bold; | |
1454 | +} | |
1455 | + | |
1456 | +.group .group-list .ghaicha { | |
1457 | + /* width:300rpx; */ | |
1458 | + font-size: 27rpx; | |
1459 | + /* margin-left:180rpx; | |
1460 | + top:13rpx; | |
1461 | + left:-3rpx; */ | |
1462 | + font-weight: bold; | |
1463 | + | |
1464 | + | |
1465 | +} | |
1466 | + | |
1467 | +.group .group-list .ghaicha .gred { | |
1468 | + /* height: 48rpx; | |
1469 | + width: 300rpx; */ | |
1470 | +} | |
1471 | + | |
1472 | +.gsj { | |
1473 | + float: left; | |
1474 | + color: #8f8f94; | |
1475 | +} | |
1476 | + | |
1477 | +.group .group-list .cjt { | |
1478 | + height: 42rpx; | |
1479 | + width: 137rpx; | |
1480 | + /* position: absolute; | |
1481 | + right: 4rpx; | |
1482 | + top:25rpx; */ | |
1483 | + line-height: 42rpx; | |
1484 | + font-size: 24rpx; | |
1485 | + color: #fff; | |
1486 | + border: 2rpx solid #d60024; | |
1487 | + background-color: #d60024; | |
1488 | + border-radius: 25rpx; | |
1489 | + | |
1490 | +} | |
1491 | + | |
1492 | +.gbody { | |
1493 | + background-color: white; | |
1494 | +} | |
1495 | + | |
1496 | +.t_show { | |
1497 | + /* overflow: hidden; */ | |
1498 | + display: flex; | |
1499 | + /* width: 300rpx; */ | |
1500 | + color: #292929; | |
1501 | + /* line-height: 36rpx; */ | |
1502 | + font-size: 26rpx; | |
1503 | +} | |
1504 | + | |
1505 | +.join-cart>view.set_width { | |
1506 | + width: 58%; | |
1507 | +} | |
1508 | + | |
1509 | +/*秒杀样式zwp*/ | |
1510 | +#zwpMs { | |
1511 | + width: 31%; | |
1512 | + color: #fff; | |
1513 | + background: url(https://mshopimg.yolipai.net/miniapp/images/user/bgred.png) no-repeat; | |
1514 | + background-size: 100% 60px; | |
1515 | +} | |
1516 | + | |
1517 | + | |
1518 | +/*--------- 修改后的样式 -----------*/ | |
1519 | +.elli { | |
1520 | + overflow: hidden; | |
1521 | + text-overflow: ellipsis; | |
1522 | + display: -webkit-box; | |
1523 | + -webkit-line-clamp: 2; | |
1524 | + -webkit-box-orient: vertical; | |
1525 | +} | |
1526 | + | |
1527 | +.one_elli { | |
1528 | + overflow: hidden; | |
1529 | + text-overflow: ellipsis; | |
1530 | + white-space: nowrap; | |
1531 | +} | |
1532 | + | |
1533 | +.tuwen_title { | |
1534 | + /* height: 86rpx; */ | |
1535 | + background-color: #eeeeee; | |
1536 | + /* margin-bottom: 32rpx; */ | |
1537 | + position: relative; | |
1538 | + display: flex; | |
1539 | + justify-content: center; | |
1540 | + align-items: center; | |
1541 | + padding: 20rpx; | |
1542 | +} | |
1543 | + | |
1544 | +.tuwen_title .g_line { | |
1545 | + width: 496rpx; | |
1546 | + height: 1rpx; | |
1547 | + border-bottom: #ababab 1rpx solid; | |
1548 | +} | |
1549 | + | |
1550 | +.tuwen_title .center_s { | |
1551 | + width: 124rpx; | |
1552 | + position: absolute; | |
1553 | + height: 34rpx; | |
1554 | + background-color: #eeeeee; | |
1555 | + font-size: 32rpx; | |
1556 | + display: flex; | |
1557 | + overflow: hidden; | |
1558 | + justify-content: center; | |
1559 | + align-items: center; | |
1560 | +} | |
1561 | + | |
1562 | +.tuwen_title .center_s image { | |
1563 | + width: 34rpx; | |
1564 | + height: 26rpx; | |
1565 | + margin-right: 10rpx | |
1566 | +} | |
1567 | + | |
1568 | +.t_g_info { | |
1569 | + /* margin: 0 34rpx;margin-bottom: 20rpx; */ | |
1570 | + display: flex; | |
1571 | + align-items: center; | |
1572 | + padding: 20rpx; | |
1573 | +} | |
1574 | + | |
1575 | +.red_shu { | |
1576 | + width: 10rpx; | |
1577 | + height: 36rpx; | |
1578 | + background-color: #da0035; | |
1579 | + margin-right: 8rpx; | |
1580 | +} | |
1581 | + | |
1582 | +.tb-l { | |
1583 | + /* line-height: 96rpx; */ | |
1584 | +} | |
1585 | + | |
1586 | +.table_s { | |
1587 | + border: #e4e4e4 1rpx solid; | |
1588 | + box-sizing: border-box; | |
1589 | + font-size: 26rpx; | |
1590 | +} | |
1591 | + | |
1592 | +.tb_item { | |
1593 | + display: flex; | |
1594 | + /* height: 96rpx; */ | |
1595 | + border-bottom: 1rpx solid #e4e4e4 | |
1596 | +} | |
1597 | + | |
1598 | +.item_left { | |
1599 | + width: 210rpx; | |
1600 | + height: 100%; | |
1601 | + box-sizing: border-box; | |
1602 | + text-align: center; | |
1603 | + padding: 20rpx; | |
1604 | + background: #f9f9f9; | |
1605 | + border-right: 2rpx solid #e4e4e4 | |
1606 | +} | |
1607 | + | |
1608 | +.item_left text { | |
1609 | + /* margin-left: 44rpx; */ | |
1610 | +} | |
1611 | + | |
1612 | +.item_right { | |
1613 | + flex: 1; | |
1614 | + height: 100%; | |
1615 | + overflow: hidden; | |
1616 | + white-space: nowrap; | |
1617 | + text-overflow: ellipsis; | |
1618 | + padding: 20rpx; | |
1619 | +} | |
1620 | + | |
1621 | +.item_right text { | |
1622 | + /* margin-left: 66rpx; */ | |
1623 | +} | |
1624 | + | |
1625 | +.table_s .tb-l:last-child { | |
1626 | + border-bottom: none; | |
1627 | +} | |
1628 | + | |
1629 | +.bzfu_img { | |
1630 | + width: 164rpx; | |
1631 | + height: 34rpx; | |
1632 | + /* margin-right: 18rpx; margin-left: 12rpx */ | |
1633 | +} | |
1634 | + | |
1635 | +.bz_view { | |
1636 | + /* height:100rpx; padding: 0 34rpx 0 13rpx; */ | |
1637 | + color: #333; | |
1638 | + font-size: 28rpx; | |
1639 | + padding: 20rpx 20rpx 20rpx 10rpx; | |
1640 | + /* border-bottom: 3rpx solid #eee; */ | |
1641 | + /* border-top: 3rpx solid #eee; */ | |
1642 | +} | |
1643 | + | |
1644 | +.bz_view view { | |
1645 | + width: 520rpx; | |
1646 | + /* max-height: 70rpx; */ | |
1647 | + /* overflow: hidden; */ | |
1648 | +} | |
1649 | + | |
1650 | +.bb_view { | |
1651 | + display: flex; | |
1652 | + align-items: center; | |
1653 | + justify-content: space-between; | |
1654 | + padding: 20rpx; | |
1655 | + color: #333; | |
1656 | + font-size: 30rpx; | |
1657 | + /* height: 104rpx; line-height: 104rpx; overflow: hidden; padding-right:26rpx */ | |
1658 | +} | |
1659 | + | |
1660 | +.red_bb { | |
1661 | + color: #d70026; | |
1662 | + /* min-width:158rpx;width: auto; */ | |
1663 | +} | |
1664 | + | |
1665 | +.bg_jj { | |
1666 | + width: 14rpx; | |
1667 | + height: 14rpx; | |
1668 | + border-top: 2rpx solid #d70026; | |
1669 | + border-right: 2rpx solid #d70026; | |
1670 | + transform: rotateZ(45deg); | |
1671 | + display: inline-block; | |
1672 | + margin-bottom: 3rpx; | |
1673 | +} | |
1674 | + | |
1675 | +.bg_jj.down { | |
1676 | + transform: rotateZ(135deg); | |
1677 | +} | |
1678 | + | |
1679 | +.bg_jj.up { | |
1680 | + transform: rotateZ(-45deg); | |
1681 | + margin-top: 6rpx; | |
1682 | +} | |
1683 | + | |
1684 | +.bz-content { | |
1685 | + padding: 0 0 0 20rpx; | |
1686 | +} | |
1687 | + | |
1688 | + | |
1689 | + | |
1690 | + | |
1691 | +/* 顶部边框 */ | |
1692 | +.topframe { | |
1693 | + width: 100%; | |
1694 | + height: 172rpx; | |
1695 | + flex-direction: row; | |
1696 | + justify-content: space-between; | |
1697 | + border-bottom: 6rpx solid #eeeeee; | |
1698 | + overflow: hidden; | |
1699 | +} | |
1700 | + | |
1701 | +/* 评价人边框*/ | |
1702 | +.topframe .topframe-top { | |
1703 | + display: flex; | |
1704 | + margin-top: 40rpx; | |
1705 | + margin-bottom: 36rpx; | |
1706 | + color: #7d7d7d; | |
1707 | + padding-left: 20rpx; | |
1708 | + font-size: 32rpx; | |
1709 | +} | |
1710 | + | |
1711 | +/*评价人数量*/ | |
1712 | +.topframe .topframe-top .topframe-top-val { | |
1713 | + margin-left: 15rpx; | |
1714 | + | |
1715 | +} | |
1716 | + | |
1717 | +.topframe-top-content { | |
1718 | + display: flex; | |
1719 | + width: 36%; | |
1720 | +} | |
1721 | + | |
1722 | +/* 好评 */ | |
1723 | +.topframe-praise { | |
1724 | + width: 61%; | |
1725 | + text-align: right; | |
1726 | + color: #dc4355; | |
1727 | + font-size: 28rpx; | |
1728 | +} | |
1729 | + | |
1730 | +/* 按钮列表 */ | |
1731 | +.buttem-list { | |
1732 | + width: 100%; | |
1733 | + display: flex; | |
1734 | + font-size: 20rpx; | |
1735 | + overflow: hidden; | |
1736 | +} | |
1737 | + | |
1738 | +.buttem-list .item { | |
1739 | + min-width: 17%; | |
1740 | + font-size: 24rpx; | |
1741 | + border-radius: 20rpx; | |
1742 | + background: #ffe3e2; | |
1743 | + height: 38rpx; | |
1744 | + text-align: center; | |
1745 | + line-height: 38rpx; | |
1746 | + margin-left: 20rpx; | |
1747 | + justify-content: center; | |
1748 | +} | |
1749 | + | |
1750 | +.buttem-list .item.red { | |
1751 | + color: #fff; | |
1752 | + background: #d60022; | |
1753 | +} | |
1754 | + | |
1755 | +/* 用户评价 */ | |
1756 | +.middle { | |
1757 | + width: 95%; | |
1758 | + margin: 0 auto; | |
1759 | +} | |
1760 | + | |
1761 | +.middle-img-frame { | |
1762 | + height: 65rpx; | |
1763 | + display: flex; | |
1764 | + margin-top: 32rpx; | |
1765 | + | |
1766 | +} | |
1767 | + | |
1768 | +/* 评价的用户图片 */ | |
1769 | +.middle-img { | |
1770 | + width: 60rpx; | |
1771 | + height: 60rpx; | |
1772 | + border-radius: 50%; | |
1773 | + -moz-border-radius: 50%; | |
1774 | + -webkit-border-radius: 50%; | |
1775 | + margin-right: 15rpx; | |
1776 | +} | |
1777 | + | |
1778 | +/* 评价的用户边框 */ | |
1779 | +.middle-user-frame { | |
1780 | + height: 65rpx; | |
1781 | + overflow: hidden; | |
1782 | +} | |
1783 | + | |
1784 | +.middle-user { | |
1785 | + height: 25; | |
1786 | + font-size: 28rpx; | |
1787 | +} | |
1788 | + | |
1789 | +/* 评价图片 */ | |
1790 | +.middle-img-two { | |
1791 | + width: 115rpx; | |
1792 | + height: 25rpx; | |
1793 | + text-align: center; | |
1794 | + margin-bottom: 20rpx; | |
1795 | + margin-left: 5rpx; | |
1796 | +} | |
1797 | + | |
1798 | +.xc-pirces { | |
1799 | + margin-top: 14rpx; | |
1800 | +} | |
1801 | + | |
1802 | +/* 评价文字 */ | |
1803 | +.middle-font { | |
1804 | + font-size: 30rpx; | |
1805 | + | |
1806 | +} | |
1807 | + | |
1808 | +.iddle-goods-img { | |
1809 | + width: 100%; | |
1810 | + display: flex; | |
1811 | + margin-top: 22rpx; | |
1812 | +} | |
1813 | + | |
1814 | +/* 商品图片 */ | |
1815 | +.goods-img { | |
1816 | + width: 156rpx; | |
1817 | + height: 156rpx; | |
1818 | + margin-left: 22rpx; | |
1819 | + height: 100%; | |
1820 | +} | |
1821 | + | |
1822 | +.parameter-frame { | |
1823 | + margin-top: 14rxp; | |
1824 | + margin-bottom: 14rpx; | |
1825 | + width: 50%; | |
1826 | + height: 30rpx; | |
1827 | +} | |
1828 | + | |
1829 | +.z_parameter { | |
1830 | + width: 98%; | |
1831 | + height: 45rpx; | |
1832 | + display: flex; | |
1833 | + line-height: 45rpx; | |
1834 | + margin-top: 20rpx; | |
1835 | + margin-bottom: 14rpx; | |
1836 | + justify-content: space-between; | |
1837 | +} | |
1838 | + | |
1839 | +.parameter-font { | |
1840 | + font-size: 26rpx; | |
1841 | + | |
1842 | +} | |
1843 | + | |
1844 | +/* 规格 */ | |
1845 | +.parameter-state { | |
1846 | + width: 100rpx; | |
1847 | + font-size: 24rpx; | |
1848 | + color: #c4c4c4; | |
1849 | +} | |
1850 | + | |
1851 | +.parameter-dian { | |
1852 | + display: flex; | |
1853 | + width: 94rpx; | |
1854 | + height: 33rpx; | |
1855 | + font-size: 20rpx; | |
1856 | + border-radius: 20rpx; | |
1857 | + line-height: 33rpx; | |
1858 | + padding-left: 25rpx; | |
1859 | + border: 4rpx solid #eeeeee; | |
1860 | + | |
1861 | +} | |
1862 | + | |
1863 | +/* 点赞图片 */ | |
1864 | +.parameter-img { | |
1865 | + width: 27rpx; | |
1866 | + height: 27rpx; | |
1867 | + margin-top: 3rpx; | |
1868 | +} | |
1869 | + | |
1870 | +.parameter-val { | |
1871 | + margin-left: 25rpx; | |
1872 | + font-size: 26rpx; | |
1873 | + color: #999; | |
1874 | +} | |
1875 | + | |
1876 | +/* 回复 */ | |
1877 | +.reply { | |
1878 | + width: 95%; | |
1879 | + height: 120rpx; | |
1880 | + padding-top: 14rpx; | |
1881 | + border-top: 3rpx solid #eeeeee; | |
1882 | + margin: 0 auto; | |
1883 | + | |
1884 | +} | |
1885 | + | |
1886 | +.shop-reply { | |
1887 | + height: 30rpx; | |
1888 | + color: #d60022; | |
1889 | + font-size: 24rpx; | |
1890 | + overflow: hidden; | |
1891 | +} | |
1892 | + | |
1893 | +.shop-font { | |
1894 | + width: 94%; | |
1895 | + font-size: 24rpx; | |
1896 | + padding-top: 10rpx; | |
1897 | + | |
1898 | +} | |
1899 | + | |
1900 | +.line_bulge { | |
1901 | + width: 17rpx; | |
1902 | + height: 17rpx; | |
1903 | + border-top: 1rpx solid #eeeeee; | |
1904 | + border-left: 1rpx solid #eeeeee; | |
1905 | + transform: rotate(45deg); | |
1906 | + position: absolute; | |
1907 | + top: -12rpx; | |
1908 | + left: 50rpx; | |
1909 | + background: #fff; | |
1910 | +} | |
1911 | + | |
1912 | + | |
1913 | +.xc_comment { | |
1914 | + display: flex; | |
1915 | + justify-content: space-around; | |
1916 | + width: 100%; | |
1917 | + box-sizing: border-box; | |
1918 | + padding: 10rpx 20rpx; | |
1919 | + /* height: 42rpx; | |
1920 | + padding-left: 34rpx; */ | |
1921 | + color: #333; | |
1922 | + | |
1923 | +} | |
1924 | + | |
1925 | +.xc_comment-have-pictures { | |
1926 | + width: 153rpx; | |
1927 | + /* height: 42rpx; */ | |
1928 | + line-height: 42rpx; | |
1929 | + text-align: center; | |
1930 | + background: #ffe3e2; | |
1931 | + color: 28rpx; | |
1932 | + border-radius: 21rpx; | |
1933 | + font-size: 24rpx; | |
1934 | +} | |
1935 | + | |
1936 | +.xc_comment-discuss { | |
1937 | + width: 152rpx; | |
1938 | + height: 42rpx; | |
1939 | + line-height: 42rpx; | |
1940 | + text-align: center; | |
1941 | + background: #ffe3e2; | |
1942 | + color: 28rpx; | |
1943 | + border-radius: 20rpx; | |
1944 | + font-size: 24rpx; | |
1945 | + margin-left: 28rpx | |
1946 | +} | |
1947 | + | |
1948 | +.xc_comment-detail { | |
1949 | + display: flex; | |
1950 | + /* margin-top: 40rpx; */ | |
1951 | + /* width: 524rpx; */ | |
1952 | + /* margin-left: 34rpx; */ | |
1953 | + border-radius: 24rpx; | |
1954 | + border: 2rpx solid #ebedf0; | |
1955 | + margin-left: 20rpx; | |
1956 | + box-sizing: border-box; | |
1957 | + /* overflow: hidden; */ | |
1958 | +} | |
1959 | + | |
1960 | +.xc_user-img { | |
1961 | + border-radius: 50%; | |
1962 | + margin: auto 0; | |
1963 | +} | |
1964 | + | |
1965 | +.xc_comment-user { | |
1966 | + display: flex; | |
1967 | + /* margin-top: 22rpx; | |
1968 | + margin-left: 22rpx; */ | |
1969 | +} | |
1970 | + | |
1971 | +.xc_user { | |
1972 | + width: 170rpx; | |
1973 | + height: 60rpx; | |
1974 | + margin-left: 6rpx; | |
1975 | + overflow: hidden; | |
1976 | +} | |
1977 | + | |
1978 | +.xc_user-name { | |
1979 | + /* height: 25rpx; */ | |
1980 | +} | |
1981 | + | |
1982 | +.xc_comment-img { | |
1983 | + width: 22rpx; | |
1984 | + height: 22rpx; | |
1985 | + /* margin-top: 14rpx; */ | |
1986 | + margin-right: 5rpx | |
1987 | +} | |
1988 | + | |
1989 | +.xc_comment-font { | |
1990 | + /* height: 75rpx; */ | |
1991 | + /* margin-left: 22rpx; */ | |
1992 | + white-space: normal; | |
1993 | + overflow: hidden; | |
1994 | + /* margin-top: 8rpx; | |
1995 | + line-height: 38rpx; */ | |
1996 | + | |
1997 | +} | |
1998 | + | |
1999 | +.xc_comment-val { | |
2000 | + /* width: 88%; | |
2001 | + height: 30rpx; | |
2002 | + margin-left: 22rpx; | |
2003 | + display: flex; | |
2004 | + margin-top: 15rpx; | |
2005 | + margin-bottom:15rpx; */ | |
2006 | +} | |
2007 | + | |
2008 | +.xc_comment-time { | |
2009 | + /* height: 30rpx; */ | |
2010 | + font-size: 22rpx; | |
2011 | + color: #a5a5a5; | |
2012 | + overflow: hidden; | |
2013 | +} | |
2014 | + | |
2015 | +.xc_goods-img { | |
2016 | + width: 180rpx; | |
2017 | + height: 180rpx; | |
2018 | +} | |
2019 | + | |
2020 | +.xc_comment-left { | |
2021 | + display: inline-block; | |
2022 | + width: 312rpx; | |
2023 | + padding: 20rpx; | |
2024 | +} | |
2025 | + | |
2026 | +.xc_goods-img-frame { | |
2027 | + border-radius: 0 22rpx 22rpx 0; | |
2028 | + overflow: hidden; | |
2029 | + /* display:inline-block; */ | |
2030 | + /* width: 40%; | |
2031 | + height: 90%; | |
2032 | + text-align: center; | |
2033 | + padding-top: 30rpx; | |
2034 | + vertical-align: top; */ | |
2035 | +} | |
2036 | + | |
2037 | +.xc_imgs { | |
2038 | + width: 50rpx; | |
2039 | + height: 50rpx; | |
2040 | + border-radius: 50%; | |
2041 | + margin-right: 5rpx; | |
2042 | +} | |
2043 | + | |
2044 | +.pj_word_size { | |
2045 | + font-size: 28rpx | |
2046 | +} | |
2047 | + | |
2048 | +.pj_scroll { | |
2049 | + /* white-space: nowrap; */ | |
2050 | + /* height: 324rpx; */ | |
2051 | + /* margin-bottom: 50rpx; */ | |
2052 | + display: flex; | |
2053 | + align-items: center; | |
2054 | + padding: 20rpx 0; | |
2055 | + /* box-sizing: border-box; */ | |
2056 | + /* box-shadow: 0 8px 12px #e7e9eb; */ | |
2057 | +} | |
2058 | + | |
2059 | + | |
2060 | +/*领券*/ | |
2061 | +.three-level-word { | |
2062 | + font-size: 25rpx; | |
2063 | +} | |
2064 | + | |
2065 | +.four-level-word { | |
2066 | + font-size: 23rpx; | |
2067 | +} | |
2068 | + | |
2069 | +.cx-frame { | |
2070 | + /* border-top:3rpx solid #eee; */ | |
2071 | + /* width:99%; | |
2072 | + height: 95rpx; | |
2073 | + line-height: 95rpx; | |
2074 | + padding-left:24rpx; */ | |
2075 | + padding: 20rpx; | |
2076 | +} | |
2077 | + | |
2078 | +.cx-frame .cx-sizs { | |
2079 | + /* width: 68rpx; */ | |
2080 | + /* height: 100%; */ | |
2081 | + /* line-height: 100rpx; */ | |
2082 | + /* overflow: hidden; */ | |
2083 | + /* margin-left: 10rpx; */ | |
2084 | +} | |
2085 | + | |
2086 | +.xc-coupon-fram { | |
2087 | + position: relative; | |
2088 | + margin-right: 16rpx; | |
2089 | + /* width:200rpx; */ | |
2090 | + /* padding-top:30rpx; */ | |
2091 | + | |
2092 | +} | |
2093 | + | |
2094 | +.xc-coupon-fram .xc-coupon { | |
2095 | + /* width:175rpx ; | |
2096 | + height: 40rpx; | |
2097 | + line-height: 40rpx; */ | |
2098 | + background-color: #d60021; | |
2099 | + /* margin:0 auto; */ | |
2100 | + color: #fff; | |
2101 | + padding: 6rpx 20rpx; | |
2102 | + | |
2103 | +} | |
2104 | + | |
2105 | +.xc-coupon-fram .xc-circular { | |
2106 | + width: 16rpx; | |
2107 | + height: 16rpx; | |
2108 | + background-color: white; | |
2109 | + position: absolute; | |
2110 | + top: 50%; | |
2111 | + /* left: -10rpx; */ | |
2112 | + transform: translateY(-50%); | |
2113 | +} | |
2114 | + | |
2115 | +.xc-coupon-fram .xc-one { | |
2116 | + left: -8rpx; | |
2117 | +} | |
2118 | + | |
2119 | +.xc-coupon-fram .xc-two { | |
2120 | + right: -8rpx; | |
2121 | +} | |
2122 | + | |
2123 | +.cx-obtain-coupon { | |
2124 | + /* width: 65rpx; | |
2125 | + height: 100%; | |
2126 | + padding-left:15rpx; */ | |
2127 | + color: #d70025; | |
2128 | + display: flex; | |
2129 | + align-items: center; | |
2130 | + /* position: absolute; | |
2131 | + right: 5rpx; */ | |
2132 | +} | |
2133 | + | |
2134 | +/* 自定义弹出窗口 */ | |
2135 | +.cx-popup { | |
2136 | + width: 100%; | |
2137 | + background: #fff; | |
2138 | + z-index: 35; | |
2139 | + border-top-left-radius: 25rpx; | |
2140 | + border-top-right-radius: 25rpx; | |
2141 | + position: fixed; | |
2142 | + bottom: 0; | |
2143 | +} | |
2144 | + | |
2145 | +.cx-popup .top { | |
2146 | + /* width: 90%; | |
2147 | + height:85rpx; */ | |
2148 | + font-size: 32rpx; | |
2149 | + padding: 20rpx 0; | |
2150 | + border-bottom: 2rpx solid #ebedf0; | |
2151 | + /* padding-top: 50rpx; | |
2152 | + font-weight:600; */ | |
2153 | + | |
2154 | +} | |
2155 | + | |
2156 | +.cx-popup .top-frame { | |
2157 | + /* width: 100%; | |
2158 | + display: flex; | |
2159 | + justify-content: center; | |
2160 | + overflow: hidden; */ | |
2161 | +} | |
2162 | + | |
2163 | +.xc-valid-coupon { | |
2164 | + width: 90%; | |
2165 | + height: 40rpx; | |
2166 | + padding-top: 24rpx; | |
2167 | + overflow: hidden; | |
2168 | +} | |
2169 | + | |
2170 | +.xc-frame { | |
2171 | + position: relative; | |
2172 | +} | |
2173 | + | |
2174 | +.xc-coupon-frame { | |
2175 | + width: 100%; | |
2176 | + max-height: 560rpx; | |
2177 | + overflow: auto; | |
2178 | + | |
2179 | +} | |
2180 | + | |
2181 | +.xc-coupon-frame .rel:not(:first-child) { | |
2182 | + margin-top: 20rpx; | |
2183 | +} | |
2184 | + | |
2185 | +.xc-coupon-frame .coupon { | |
2186 | + width: 100%; | |
2187 | + height: 168rpx; | |
2188 | + border-radius: 25rpx; | |
2189 | + border: 2rpx solid #ffdcdc; | |
2190 | + overflow: hidden; | |
2191 | + /* margin-top:16rpx; */ | |
2192 | + box-sizing: border-box; | |
2193 | + | |
2194 | +} | |
2195 | + | |
2196 | +/* .xc-coupon-frame .coupon ~ .coupon { | |
2197 | + margin-top:16rpx; | |
2198 | +} */ | |
2199 | +.xc-coupon-left { | |
2200 | + width: 216rpx; | |
2201 | + /* height: 100%; */ | |
2202 | + background-color: #ffeeef; | |
2203 | + border-right: 4rpx dashed #ffdbd9; | |
2204 | + overflow: hidden; | |
2205 | + /* line-height: 100%; */ | |
2206 | + display: flex; | |
2207 | + flex-direction: column; | |
2208 | + justify-content: center; | |
2209 | + align-items: center; | |
2210 | + flex-shrink: 0; | |
2211 | +} | |
2212 | + | |
2213 | +.xc-money { | |
2214 | + color: #f30026; | |
2215 | + text-align: center; | |
2216 | +} | |
2217 | + | |
2218 | +.xc-rmb { | |
2219 | + /* width:44rpx; | |
2220 | + padding-top:7rpx; */ | |
2221 | +} | |
2222 | + | |
2223 | +.xc-money-frame { | |
2224 | + /* margin-left:35rpx; | |
2225 | + margin-top:48rpx; */ | |
2226 | + | |
2227 | +} | |
2228 | + | |
2229 | +.xc-spacing { | |
2230 | + letter-spacing: 4rpx; | |
2231 | +} | |
2232 | + | |
2233 | +.xc-circular-one { | |
2234 | + position: absolute; | |
2235 | + top: -15rpx; | |
2236 | + left: 205rpx; | |
2237 | + width: 30rpx; | |
2238 | + height: 30rpx; | |
2239 | + background: #fff; | |
2240 | + overflow: hidden; | |
2241 | +} | |
2242 | + | |
2243 | +.xc-circular-two { | |
2244 | + position: absolute; | |
2245 | + bottom: -15rpx; | |
2246 | + /* top:150rpx; */ | |
2247 | + left: 205rpx; | |
2248 | + width: 30rpx; | |
2249 | + height: 30rpx; | |
2250 | + background: #fff; | |
2251 | +} | |
2252 | + | |
2253 | +.xc-detail-coupon { | |
2254 | + /* margin-left: 22rpx; | |
2255 | + overflow: hidden; | |
2256 | + padding-top: 43rpx; */ | |
2257 | + /* display: flex; | |
2258 | + align-items: center; */ | |
2259 | +} | |
2260 | + | |
2261 | +.xc-coupon-right { | |
2262 | + /* width: 455rpx; | |
2263 | + height: 100%; */ | |
2264 | + background: #fffaf9; | |
2265 | + padding: 20rpx; | |
2266 | + box-sizing: border-box; | |
2267 | + width: 100%; | |
2268 | + justify-content: space-between; | |
2269 | + align-items: center; | |
2270 | +} | |
2271 | + | |
2272 | +.xc-below { | |
2273 | + margin-top: 20rpx; | |
2274 | + | |
2275 | +} | |
2276 | + | |
2277 | +.xc-get { | |
2278 | + | |
2279 | + width: 140rpx; | |
2280 | + /* height: 48rpx; */ | |
2281 | + color: #fff; | |
2282 | + text-align: center; | |
2283 | + border-radius: 27rpx; | |
2284 | + line-height: 54rpx; | |
2285 | + /* margin-left:20rpx; */ | |
2286 | +} | |
2287 | + | |
2288 | +.background { | |
2289 | + background: #f40028; | |
2290 | +} | |
2291 | + | |
2292 | +/*--不可使用--*/ | |
2293 | +.background.nouse { | |
2294 | + background: gainsboro; | |
2295 | +} | |
2296 | + | |
2297 | +.xc-background { | |
2298 | + background: #b9b9b9; | |
2299 | +} | |
2300 | + | |
2301 | + | |
2302 | +.cx-confirm { | |
2303 | + width: 100%; | |
2304 | + padding: 20rpx; | |
2305 | + box-sizing: border-box; | |
2306 | + /* height: 160rpx; */ | |
2307 | + | |
2308 | +} | |
2309 | + | |
2310 | +.cx-confirm .confirm { | |
2311 | + /* width: 372rpx; | |
2312 | + height: 60rpx; */ | |
2313 | + background-color: #f40026; | |
2314 | + color: #fff; | |
2315 | + border-radius: 10rpx; | |
2316 | + line-height: 80rpx; | |
2317 | + font-size: 28rpx; | |
2318 | + | |
2319 | +} | |
2320 | + | |
2321 | +.up { | |
2322 | + animation: up .7s; | |
2323 | +} | |
2324 | + | |
2325 | +.down { | |
2326 | + animation: down 1s; | |
2327 | +} | |
2328 | + | |
2329 | +@keyframes up { | |
2330 | + 0% { | |
2331 | + transform: translateY(550rpx); | |
2332 | + } | |
2333 | + | |
2334 | + 100% { | |
2335 | + transform: translateY(0); | |
2336 | + } | |
2337 | +} | |
2338 | + | |
2339 | +@keyframes down { | |
2340 | + 0% { | |
2341 | + transform: translateY(0); | |
2342 | + } | |
2343 | + | |
2344 | + 100% { | |
2345 | + transform: translateY(550rpx); | |
2346 | + } | |
2347 | +} | |
2348 | + | |
2349 | + | |
2350 | +/* 分享 */ | |
2351 | +.icon-share { | |
2352 | + font-size: 42rpx; | |
2353 | + color: #d60021; | |
2354 | + line-height: 1; | |
2355 | +} | |
2356 | + | |
2357 | +.xc-share-frame { | |
2358 | + /* width: 129rpx; | |
2359 | + height: 48rpx; | |
2360 | + border-top-left-radius: 18rpx; | |
2361 | + border-bottom-left-radius: 18rpx; */ | |
2362 | + /* background: #d60021; */ | |
2363 | + /* position:absolute; | |
2364 | + left:622rpx; | |
2365 | + top:-37rpx; | |
2366 | + line-height:50rpx; | |
2367 | + margin-top:52rpx; */ | |
2368 | +} | |
2369 | + | |
2370 | +.xc-share-frame-jieti { | |
2371 | + width: 129rpx; | |
2372 | + height: 48rpx; | |
2373 | + border-top-left-radius: 18rpx; | |
2374 | + border-bottom-left-radius: 18rpx; | |
2375 | + background: #d60021; | |
2376 | + line-height: 50rpx; | |
2377 | +} | |
2378 | + | |
2379 | +.xc-share-frame .share-font, | |
2380 | +.xc-share-frame-jieti .share-font { | |
2381 | + font-size: 32rpx; | |
2382 | + color: #fff; | |
2383 | + margin-left: 10rpx; | |
2384 | + | |
2385 | +} | |
2386 | + | |
2387 | + | |
2388 | +.xc-share-frame .share-frame, | |
2389 | +.xc-share-frame-jieti .share-frame { | |
2390 | + width: 30rpx; | |
2391 | + height: 30rpx; | |
2392 | + margin-top: 9rpx; | |
2393 | + margin-left: 10rpx; | |
2394 | + | |
2395 | +} | |
2396 | + | |
2397 | +.xc-share { | |
2398 | + width: 90%; | |
2399 | + height: 800rpx; | |
2400 | + background: #fff; | |
2401 | + z-index: 35; | |
2402 | +} | |
2403 | + | |
2404 | +.img-frame { | |
2405 | + position: absolute; | |
2406 | + top: 175rpx; | |
2407 | + left: 100rpx; | |
2408 | + z-index: 55; | |
2409 | + overflow: hidden; | |
2410 | + | |
2411 | +} | |
2412 | + | |
2413 | +.img-frame .img { | |
2414 | + width: 100rpx; | |
2415 | + height: 100rpx; | |
2416 | + | |
2417 | +} | |
2418 | + | |
2419 | +.xc-share .top { | |
2420 | + height: 85rpx; | |
2421 | + width: 100%; | |
2422 | + border-bottom: 4rpx dashed #f5f5f5; | |
2423 | + overflow: hidden; | |
2424 | + | |
2425 | +} | |
2426 | + | |
2427 | +.xc-share .name { | |
2428 | + font-size: 25rpx; | |
2429 | + margin-left: 180rpx; | |
2430 | + color: #000; | |
2431 | + | |
2432 | +} | |
2433 | + | |
2434 | +.xc-share .recommend { | |
2435 | + width: 110rpx; | |
2436 | + height: 12rpx; | |
2437 | + color: #fff; | |
2438 | + background: #d60021; | |
2439 | + font-size: 20rpx; | |
2440 | + border-radius: 25rpx; | |
2441 | + margin-left: 10rpx; | |
2442 | + line-height: 37rpx; | |
2443 | +} | |
2444 | + | |
2445 | +.xc-left-circle { | |
2446 | + width: 40rpx; | |
2447 | + height: 25rpx; | |
2448 | + position: absolute; | |
2449 | + top: 280rpx; | |
2450 | + left: 29rpx; | |
2451 | + z-index: 55; | |
2452 | + background: #727272; | |
2453 | + border-radius: 50rpx 50rpx 0 0; | |
2454 | + transform: rotate(90deg); | |
2455 | + | |
2456 | +} | |
2457 | + | |
2458 | +.xc-right-circle { | |
2459 | + width: 40rpx; | |
2460 | + height: 25rpx; | |
2461 | + position: absolute; | |
2462 | + top: 280rpx; | |
2463 | + left: 683rpx; | |
2464 | + z-index: 55; | |
2465 | + background: #727272; | |
2466 | + border-radius: 50rpx 50rpx 0 0; | |
2467 | + transform: rotate(270deg); | |
2468 | + | |
2469 | +} | |
2470 | + | |
2471 | +.xc-circle-frame { | |
2472 | + width: 25rpx; | |
2473 | + height: 40rpx; | |
2474 | + overflow: hidden; | |
2475 | +} | |
2476 | + | |
2477 | +.xc-goods-name { | |
2478 | + width: 95%; | |
2479 | + font-size: 35rpx; | |
2480 | + padding-left: 75rpx; | |
2481 | + height: 50rpx; | |
2482 | + padding-top: 10rpx; | |
2483 | + color: #000; | |
2484 | + | |
2485 | +} | |
2486 | + | |
2487 | +.xc-good-img { | |
2488 | + width: 100%; | |
2489 | + height: 381rpx; | |
2490 | + margin-top: 5rpx; | |
2491 | + | |
2492 | +} | |
2493 | + | |
2494 | +.xc-good-img .img { | |
2495 | + width: 90%; | |
2496 | + height: 381rpx; | |
2497 | +} | |
2498 | + | |
2499 | +.xc-ensure-frame { | |
2500 | + width: 90%; | |
2501 | + height: 60rpx; | |
2502 | + border-bottom: 2rpx solid #d8d6d7; | |
2503 | +} | |
2504 | + | |
2505 | +.xc-ensure { | |
2506 | + width: 30%; | |
2507 | + height: 60rpx; | |
2508 | + line-height: 60rpx; | |
2509 | +} | |
2510 | + | |
2511 | +xc-ensure-div { | |
2512 | + width: 100%; | |
2513 | + height: 60rpx; | |
2514 | +} | |
2515 | + | |
2516 | +.xc-ensure .word { | |
2517 | + font-size: 25rpx; | |
2518 | + color: #d30025; | |
2519 | + margin-left: 9rpx; | |
2520 | + | |
2521 | +} | |
2522 | + | |
2523 | +.xc-ensure .img { | |
2524 | + width: 25rpx; | |
2525 | + height: 25rpx; | |
2526 | + margin-top: 18rpx; | |
2527 | + | |
2528 | +} | |
2529 | + | |
2530 | +.xc-bottmon { | |
2531 | + width: 100%; | |
2532 | +} | |
2533 | + | |
2534 | +.xc-bottmon .xc-left { | |
2535 | + width: 55%; | |
2536 | + margin-top: 30rpx; | |
2537 | + padding-left: 20rpx; | |
2538 | + | |
2539 | +} | |
2540 | + | |
2541 | +.xc-left .xc-top { | |
2542 | + font-size: 25rpx; | |
2543 | + height: 40rpx; | |
2544 | + line-height: 40rpx; | |
2545 | + color: #000; | |
2546 | +} | |
2547 | + | |
2548 | +.xc-left .xc-middle { | |
2549 | + font-size: 25rpx; | |
2550 | + color: #b2b2b2; | |
2551 | + height: 30rpx; | |
2552 | + line-height: 30rpx; | |
2553 | +} | |
2554 | + | |
2555 | +.xc-left .xc-buttem { | |
2556 | + font-size: 25rpx; | |
2557 | + height: 100rpx; | |
2558 | + line-height: 100rpx; | |
2559 | + color: #000; | |
2560 | +} | |
2561 | + | |
2562 | +.xc-ensure-right { | |
2563 | + width: 30%; | |
2564 | +} | |
2565 | + | |
2566 | +.xc-qrcode { | |
2567 | + width: 120rpx; | |
2568 | + height: 120rpx; | |
2569 | + margin-top: 43rpx; | |
2570 | + margin-left: 80rpx; | |
2571 | + | |
2572 | +} | |
2573 | + | |
2574 | +.xc-close { | |
2575 | + width: 50rpx; | |
2576 | + height: 50rpx; | |
2577 | + border-radius: 50%; | |
2578 | + border: 3rpx solid #fff; | |
2579 | + text-align: center; | |
2580 | + line-height: 41rpx; | |
2581 | + font-size: 50rpx; | |
2582 | + color: #fff; | |
2583 | + font-weight: lighter; | |
2584 | + font-family: MingLiU; | |
2585 | + transform: rotate(270deg); | |
2586 | + overflow: auto; | |
2587 | + margin-top: 6rpx; | |
2588 | + margin-bottom: 1rpx; | |
2589 | + | |
2590 | +} | |
2591 | + | |
2592 | +.xc-close-frame { | |
2593 | + position: absolute; | |
2594 | + margin-top: 30rpx; | |
2595 | + width: 90%; | |
2596 | + display: flex; | |
2597 | + justify-content: center; | |
2598 | + overflow: auto; | |
2599 | + | |
2600 | +} | |
2601 | + | |
2602 | +.xc-guanbi { | |
2603 | + width: 100%; | |
2604 | + height: 80rpx; | |
2605 | + overflow: hidden; | |
2606 | +} | |
2607 | + | |
2608 | + | |
2609 | +/* 自定义弹出窗口 */ | |
2610 | +.cx-popup { | |
2611 | + width: 100%; | |
2612 | + background: #fff; | |
2613 | + z-index: 35; | |
2614 | + border-top-left-radius: 10rpx; | |
2615 | + border-top-right-radius: 10rpx; | |
2616 | + position: fixed; | |
2617 | + bottom: 0; | |
2618 | +} | |
2619 | + | |
2620 | +.xc-top-content { | |
2621 | + width: 88%; | |
2622 | + height: 85rpx; | |
2623 | + padding-top: 50rpx; | |
2624 | + font-size: 36rpx; | |
2625 | +} | |
2626 | + | |
2627 | + | |
2628 | +.xc-valid-coupon { | |
2629 | + width: 90%; | |
2630 | + height: 40rpx; | |
2631 | + padding-top: 24rpx; | |
2632 | + overflow: hidden; | |
2633 | +} | |
2634 | + | |
2635 | +.xc-frame { | |
2636 | + /* width: 100%; | |
2637 | + margin-top:20rpx; */ | |
2638 | + padding: 20rpx; | |
2639 | +} | |
2640 | + | |
2641 | +.xc-frame .list-frame { | |
2642 | + width: 90%; | |
2643 | + height: 100%; | |
2644 | + overflow-y: scroll; | |
2645 | + | |
2646 | + margin-top: 20rpx; | |
2647 | + | |
2648 | +} | |
2649 | + | |
2650 | +.xc-close-frame { | |
2651 | + margin-top: 30rpx; | |
2652 | + width: 15%; | |
2653 | + display: flex; | |
2654 | +} | |
2655 | + | |
2656 | +.xc-close { | |
2657 | + width: 70rpx; | |
2658 | + height: 70rpx; | |
2659 | + border-radius: 50%; | |
2660 | + border: 5rpx solid #a5a5a7; | |
2661 | + text-align: center; | |
2662 | + line-height: 55rpx; | |
2663 | + font-size: 80rpx; | |
2664 | + color: #a5a5a7; | |
2665 | + font-family: "微软正黑体"; | |
2666 | + margin-top: 8rpx; | |
2667 | + | |
2668 | +} | |
2669 | + | |
2670 | +.xc-money { | |
2671 | + color: #ff0013; | |
2672 | +} | |
2673 | + | |
2674 | +.xc-money-frame { | |
2675 | + /* margin-left:35rpx; */ | |
2676 | + | |
2677 | +} | |
2678 | + | |
2679 | +.xc-coupon-effect { | |
2680 | + width: 99%; | |
2681 | + height: 128rpx; | |
2682 | + border-bottom: 3rpx solid #ddd; | |
2683 | + | |
2684 | + | |
2685 | +} | |
2686 | + | |
2687 | +.xc-goods-coupon { | |
2688 | + width: 80%; | |
2689 | + height: 100%; | |
2690 | + | |
2691 | +} | |
2692 | + | |
2693 | +.xc-title { | |
2694 | + width: 50%; | |
2695 | + margin-left: 222rpx; | |
2696 | + | |
2697 | +} | |
2698 | + | |
2699 | +.xc-coupon-money { | |
2700 | + color: #c91e31; | |
2701 | + font-size: 35rpx; | |
2702 | + margin-top: 20rpx; | |
2703 | + | |
2704 | +} | |
2705 | + | |
2706 | +.xc-coupon-time { | |
2707 | + height: 50rpx; | |
2708 | + font-size: 27rpx; | |
2709 | + color: #a4a4a4; | |
2710 | +} | |
2711 | + | |
2712 | +.xc-coupon-time .time { | |
2713 | + margin-left: 15rpx; | |
2714 | + font-size: 27rpx; | |
2715 | +} | |
2716 | + | |
2717 | +.xc-coupon-selection { | |
2718 | + width: 99%; | |
2719 | + height: 100%; | |
2720 | + | |
2721 | + | |
2722 | +} | |
2723 | + | |
2724 | +.xc-confirm { | |
2725 | + width: 90%; | |
2726 | + height: 75rpx; | |
2727 | + margin: 0 auto; | |
2728 | + background: #c41830; | |
2729 | + color: #fff; | |
2730 | + border-radius: 10rpx; | |
2731 | + font-size: 30rpx; | |
2732 | + margin-top: 50rpx; | |
2733 | +} | |
2734 | + | |
2735 | +.xc-not-Selection { | |
2736 | + width: 60rpx; | |
2737 | + height: 60rpx; | |
2738 | + background: #eeeeee; | |
2739 | +} | |
2740 | + | |
2741 | +/*---------------视频图片---------------*/ | |
2742 | +.xc-imageCount { | |
2743 | + width: 95rpx; | |
2744 | + height: 50rpx; | |
2745 | + background-color: rgba(0, 0, 0, 0.3); | |
2746 | + border-radius: 40rpx; | |
2747 | + line-height: 50rpx; | |
2748 | + color: #fff; | |
2749 | + text-align: center; | |
2750 | + font-size: 26rpx; | |
2751 | + position: absolute; | |
2752 | + | |
2753 | + right: 23rpx; | |
2754 | + bottom: 21rpx; | |
2755 | +} | |
2756 | + | |
2757 | + | |
2758 | +/* 视频图片的边框 */ | |
2759 | +.xc-videos-picture { | |
2760 | + width: 100%; | |
2761 | + height: 750rpx; | |
2762 | +} | |
2763 | + | |
2764 | +/* 视频 */ | |
2765 | +.xc-videos { | |
2766 | + width: 100%; | |
2767 | + height: 544rpx; | |
2768 | + | |
2769 | + | |
2770 | +} | |
2771 | + | |
2772 | +/* 点击视频或图片 */ | |
2773 | +.xc-video-picture { | |
2774 | + | |
2775 | + bottom: 20rpx; | |
2776 | + left: 0rpx; | |
2777 | + display: flex; | |
2778 | + align-items: center; | |
2779 | + justify-content: center; | |
2780 | + width: 45%; | |
2781 | + height: 60rpx; | |
2782 | + margin-left: 215rpx; | |
2783 | + | |
2784 | +} | |
2785 | + | |
2786 | +.xc-video-button:before { | |
2787 | + content: ""; | |
2788 | + position: absolute; | |
2789 | + left: 48%; | |
2790 | + top: 40%; | |
2791 | + width: 0; | |
2792 | + height: 0; | |
2793 | + margin-left: -36rpx; | |
2794 | + margin-top: -10rpx; | |
2795 | + border-width: 13rpx; | |
2796 | + border-style: dashed; | |
2797 | + border-color: transparent transparent transparent #fff; | |
2798 | + font-size: 0; | |
2799 | + line-height: 0; | |
2800 | + z-index: 2; | |
2801 | + -webkit-backface-visibility: hidden; | |
2802 | +} | |
2803 | + | |
2804 | +.xc-video-buttons:before { | |
2805 | + content: ""; | |
2806 | + position: absolute; | |
2807 | + left: 50%; | |
2808 | + top: 41%; | |
2809 | + width: 0; | |
2810 | + height: 0; | |
2811 | + margin-left: -36rpx; | |
2812 | + margin-top: -10rpx; | |
2813 | + border-width: 13rpx; | |
2814 | + border-style: dashed; | |
2815 | + border-color: transparent transparent transparent #000; | |
2816 | + font-size: 0; | |
2817 | + line-height: 0; | |
2818 | + z-index: 2; | |
2819 | + -webkit-backface-visibility: hidden; | |
2820 | +} | |
2821 | + | |
2822 | +.xc-video { | |
2823 | + /* width:100rpx; */ | |
2824 | + /* height: 50rpx; | |
2825 | + line-height: 50rpx; */ | |
2826 | + text-align: center; | |
2827 | + /* margin-left:-30rpx; */ | |
2828 | + | |
2829 | + | |
2830 | +} | |
2831 | + | |
2832 | +/* 图片 */ | |
2833 | +.xc-picture { | |
2834 | + color: #000; | |
2835 | + background: #dcdcdc; | |
2836 | + width: 94rpx; | |
2837 | + height: 45rpx; | |
2838 | + font-size: 25rpx; | |
2839 | + border-radius: 25rpx; | |
2840 | + font-family: 'SimHei', Arial; | |
2841 | + text-align: center; | |
2842 | + line-height: 45rpx; | |
2843 | + margin-left: 53rpx | |
2844 | +} | |
2845 | + | |
2846 | +/* 点击视频 */ | |
2847 | +.xc-video-button { | |
2848 | + position: relative; | |
2849 | + color: #000; | |
2850 | + background: #dcdcdc; | |
2851 | + width: 85rpx; | |
2852 | + height: 45rpx; | |
2853 | + line-height: 45rpx; | |
2854 | + font-size: 30rpx; | |
2855 | + border-radius: 25rpx; | |
2856 | + font-family: 'SimHei', Arial; | |
2857 | + padding-left: 11rpx; | |
2858 | +} | |
2859 | + | |
2860 | + | |
2861 | +.xc-sn { | |
2862 | + color: #fff; | |
2863 | + background: #c7161e; | |
2864 | + border-color: transparent transparent transparent #fff; | |
2865 | +} | |
2866 | + | |
2867 | +/* 图片 */ | |
2868 | +.xc-pictures { | |
2869 | + width: 100%; | |
2870 | + height: 529rpx; | |
2871 | + | |
2872 | +} | |
2873 | + | |
2874 | +/*视频封面的图片 */ | |
2875 | +.xc-picturess { | |
2876 | + position: relative; | |
2877 | + width: 100%; | |
2878 | + height: 529rpx; | |
2879 | +} | |
2880 | + | |
2881 | +/* 播放 */ | |
2882 | +.xc-play { | |
2883 | + width: 130rpx; | |
2884 | + height: 130rpx; | |
2885 | + position: absolute; | |
2886 | + top: 207rpx; | |
2887 | + left: 309rpx; | |
2888 | +} | |
2889 | + | |
2890 | +.xc-video-buttons { | |
2891 | + position: relative; | |
2892 | + color: #000; | |
2893 | + background: #dcdcdc; | |
2894 | + width: 85rpx; | |
2895 | + height: 45rpx; | |
2896 | + line-height: 45rpx; | |
2897 | + font-size: 30rpx; | |
2898 | + border-radius: 25rpx; | |
2899 | + font-family: 'SimHei', Arial; | |
2900 | + padding-left: 11rpx; | |
2901 | +} | |
2902 | + | |
2903 | + | |
2904 | +.wsize { | |
2905 | + font-size: 32rpx | |
2906 | +} | |
2907 | + | |
2908 | +.five-level-word { | |
2909 | + font-size: 24rpx; | |
2910 | +} | |
2911 | + | |
2912 | + | |
2913 | +/*-- 推荐商品 --*/ | |
2914 | +.xc-goods { | |
2915 | + height: auto; | |
2916 | + background: #f2f2f2; | |
2917 | + padding: 0 20rpx; | |
2918 | + margin-top: -25rpx; | |
2919 | + padding-bottom: 20rpx | |
2920 | +} | |
2921 | + | |
2922 | +.xc-goods-recommend { | |
2923 | + border-radius: 20rpx; | |
2924 | + width: 345rpx; | |
2925 | + height: 450rpx; | |
2926 | + margin-top: 25rpx; | |
2927 | + display: inline-block; | |
2928 | + | |
2929 | +} | |
2930 | + | |
2931 | +.xc-goods-recommend.ml { | |
2932 | + margin-left: 22rpx | |
2933 | +} | |
2934 | + | |
2935 | +.xc-goods-recommend .xc-goods-imgs { | |
2936 | + width: 100%; | |
2937 | + height: 325rpx; | |
2938 | + border-radius: 20rpx 20rpx 0 0; | |
2939 | +} | |
2940 | + | |
2941 | +.xc-goods-bottom { | |
2942 | + width: 345rpx; | |
2943 | + height: 134rpx; | |
2944 | + background: #fff; | |
2945 | + border-radius: 0 0 20rpx 20rpx; | |
2946 | + bottom: -8rpx; | |
2947 | + left: 0rpx; | |
2948 | +} | |
2949 | + | |
2950 | +.xc-goods-bottom .monry-frame { | |
2951 | + width: 283rpx; | |
2952 | + height: 52rpx; | |
2953 | + padding-left: 24rpx; | |
2954 | + | |
2955 | +} | |
2956 | + | |
2957 | +.xc-good-explain { | |
2958 | + width: 283rpx; | |
2959 | + height: 60rpx; | |
2960 | + word-break: normal; | |
2961 | + margin-left: 30rpx; | |
2962 | + font-size: 26rpx; | |
2963 | + line-height: 30rpx; | |
2964 | + margin-top: 5rpx; | |
2965 | +} | |
2966 | + | |
2967 | +.money-color-val { | |
2968 | + color: #c6172f; | |
2969 | +} | |
2970 | + | |
2971 | +.rmb-symbol { | |
2972 | + line-height: 81rpx; | |
2973 | + height: 53rpx; | |
2974 | + font-size: 28rpx; | |
2975 | +} | |
2976 | + | |
2977 | +.xc-original-price { | |
2978 | + color: #c0c0c0; | |
2979 | +} | |
2980 | + | |
2981 | +/* 文字中间加线条 */ | |
2982 | +.word-lines { | |
2983 | + text-decoration: line-through; | |
2984 | + line-height: 90rpx; | |
2985 | + margin-left: 10rpx; | |
2986 | + font-size: 20rpx; | |
2987 | +} | |
2988 | + | |
2989 | +.xc-linellae-frame { | |
2990 | + width: 100%; | |
2991 | + height: 70rpx; | |
2992 | + background: #f2f2f2; | |
2993 | +} | |
2994 | + | |
2995 | +.xc-linellae-frame .xc-linellae { | |
2996 | + width: 386rpx; | |
2997 | + height: 1rpx; | |
2998 | + border-bottom: 1rpx solid #ebedf0; | |
2999 | +} | |
3000 | + | |
3001 | +.xc-recommend-frame { | |
3002 | + background: #f2f2f2; | |
3003 | + width: 97rpx; | |
3004 | + height: 100%; | |
3005 | + padding-left: 10rpx; | |
3006 | +} | |
3007 | + | |
3008 | +.xc-recommend-frame .xc-recommend { | |
3009 | + width: 35rpx; | |
3010 | + height: 27rpx; | |
3011 | +} | |
3012 | + | |
3013 | +.xc-recommend-frame .xc-recommend-word { | |
3014 | + width: 58rpx; | |
3015 | + font-size: 24rpx; | |
3016 | + color: #a9a9a9; | |
3017 | + margin-left: 5rpx; | |
3018 | + margin-bottom: 5rpx; | |
3019 | + margin-top: 1rpx; | |
3020 | + | |
3021 | +} | |
3022 | + | |
3023 | +.xc-price-frame { | |
3024 | + color: #ec0022; | |
3025 | + align-items: baseline; | |
3026 | + /* height:44rpx; */ | |
3027 | +} | |
3028 | + | |
3029 | +.xc-price-frame .sign { | |
3030 | + margin-top: 19rpx; | |
3031 | + margin-left: -4px; | |
3032 | +} | |
3033 | + | |
3034 | +.xc-val-price { | |
3035 | + margin-left: 24rpx; | |
3036 | + color: #ec0022; | |
3037 | + padding-top: 13rpx; | |
3038 | +} | |
3039 | + | |
3040 | +.xc-val-price .save { | |
3041 | + border-radius: 10rpx; | |
3042 | + margin-top: 5rpx; | |
3043 | + background: #fed2d9; | |
3044 | + min-width: 230rpx; | |
3045 | + height: 40rpx; | |
3046 | + line-height: 40rpx; | |
3047 | + width: auto; | |
3048 | + padding-left: 12rpx; | |
3049 | + padding-right: 12rpx; | |
3050 | + | |
3051 | +} | |
3052 | + | |
3053 | +.xc-unit-price { | |
3054 | + margin-top: 25rpx; | |
3055 | + padding-left: -4rpx; | |
3056 | + | |
3057 | +} | |
3058 | + | |
3059 | +.xc-explain { | |
3060 | + color: #292929; | |
3061 | + width: 542rpx; | |
3062 | + margin: 10rpx 0 20rpx; | |
3063 | + width: 100%; | |
3064 | + font-weight: bold; | |
3065 | +} | |
3066 | + | |
3067 | +.xc-item { | |
3068 | + width: 16%; | |
3069 | + font-size: 26rpx; | |
3070 | + color: #666; | |
3071 | + margin-right: 5rpx; | |
3072 | +} | |
3073 | + | |
3074 | +.xc-item .yuan { | |
3075 | + width: 38rpx; | |
3076 | + height: 38rpx; | |
3077 | + line-height: 38rpx; | |
3078 | + border: 1rpx solid #f3f1f2; | |
3079 | + margin-left: 33rpx; | |
3080 | + | |
3081 | +} | |
3082 | + | |
3083 | +.xc-item .word { | |
3084 | + width: 104rpx; | |
3085 | + margin-top: 16rpx; | |
3086 | + color: #363636; | |
3087 | + font-weight: 600; | |
3088 | + | |
3089 | +} | |
3090 | + | |
3091 | +.xc-item .circle-color { | |
3092 | + background: #d60024; | |
3093 | + color: #fff; | |
3094 | +} | |
3095 | + | |
3096 | +.xc-item .circle-color1 { | |
3097 | + background: #fefefe; | |
3098 | + color: #666666; | |
3099 | +} | |
3100 | + | |
3101 | +.link { | |
3102 | + height: 6rpx; | |
3103 | + width: 180rpx; | |
3104 | + top: 54rpx; | |
3105 | + left: 32px; | |
3106 | +} | |
3107 | + | |
3108 | +.link1 { | |
3109 | + height: 6rpx; | |
3110 | + width: 166rpx; | |
3111 | + top: 54rpx; | |
3112 | + left: 264rpx; | |
3113 | +} | |
3114 | + | |
3115 | +.link2 { | |
3116 | + height: 6rpx; | |
3117 | + width: 157rpx; | |
3118 | + top: 54rpx; | |
3119 | + right: 87rpx; | |
3120 | +} | |
3121 | + | |
3122 | +.link-color-red { | |
3123 | + background: #d60024; | |
3124 | +} | |
3125 | + | |
3126 | +.link-color { | |
3127 | + background: #e5e5e5; | |
3128 | +} | |
3129 | + | |
3130 | +.xc-qt-price { | |
3131 | + top: -15rpx; | |
3132 | + left: 25rpx; | |
3133 | + color: #fff; | |
3134 | +} | |
3135 | + | |
3136 | +.xc-qt-price .xc-qtunit-price { | |
3137 | + margin-left: 6rpx; | |
3138 | + margin-top: -4rpx; | |
3139 | +} | |
3140 | + | |
3141 | +.xc-nanber { | |
3142 | + top: -25rpx; | |
3143 | + left: 289rpx; | |
3144 | + | |
3145 | +} | |
3146 | + | |
3147 | +.xc-qtsign { | |
3148 | + margin-top: 5rpx; | |
3149 | + | |
3150 | +} | |
3151 | + | |
3152 | +.xc-people-img { | |
3153 | + height: 36rpx; | |
3154 | + width: 36rpx; | |
3155 | + background: #fff; | |
3156 | + border-radius: 7rpx; | |
3157 | + | |
3158 | +} | |
3159 | + | |
3160 | +.xc-people-img .imgs { | |
3161 | + width: 28rpx; | |
3162 | + height: 28rpx; | |
3163 | + margin-top: 4rpx; | |
3164 | + | |
3165 | +} | |
3166 | + | |
3167 | +.xc-people-val { | |
3168 | + | |
3169 | + height: 32rpx; | |
3170 | + border-top: 1rpx solid #fff; | |
3171 | + border-bottom: 1rpx solid #fff; | |
3172 | + border-right: 1rpx solid #fff; | |
3173 | + border-radius: 0 7rpx 7rpx 0; | |
3174 | + line-height: 32rpx; | |
3175 | + margin-left: -6rpx; | |
3176 | + padding: 0 12rpx; | |
3177 | +} | |
3178 | + | |
3179 | +.word-color { | |
3180 | + color: #d70024; | |
3181 | +} | |
3182 | + | |
3183 | +.word-color-lan { | |
3184 | + color: #0393e1; | |
3185 | +} | |
3186 | + | |
3187 | +.pt_view .hy-stop { | |
3188 | + top: -23rpx; | |
3189 | + right: 56rpx; | |
3190 | +} | |
3191 | + | |
3192 | +.xc-time-val { | |
3193 | + width: 36rpx; | |
3194 | + height: 36rpx; | |
3195 | + border-radius: 7rpx; | |
3196 | + line-height: 36rpx; | |
3197 | +} | |
3198 | + | |
3199 | +.xc-time { | |
3200 | + margin-right: 10rpx; | |
3201 | + margin-left: 10rpx; | |
3202 | + margin-top: -32rpx; | |
3203 | +} | |
3204 | + | |
3205 | +.xc-goods-explain { | |
3206 | + width: 100%; | |
3207 | + /* padding-left:30rpx; | |
3208 | + margin-left:-9rpx; | |
3209 | + height: 150rpx */ | |
3210 | +} | |
3211 | + | |
3212 | +.xc-partner-frame { | |
3213 | + border-bottom: 2rpx solid #eee; | |
3214 | + width: 100%; | |
3215 | + padding: 20rpx; | |
3216 | + /* height:56rpx; */ | |
3217 | + box-sizing: border-box; | |
3218 | +} | |
3219 | + | |
3220 | +.xc-person-number { | |
3221 | + width: 120rpx; | |
3222 | + color: #999999; | |
3223 | + padding-left: 8rpx; | |
3224 | + text-align: left | |
3225 | +} | |
3226 | + | |
3227 | +.xc-miaosha-time { | |
3228 | + right: 17rpx; | |
3229 | + top: 55rpx; | |
3230 | +} | |
3231 | + | |
3232 | +.pd_top1 { | |
3233 | + padding-top: 10rpx | |
3234 | +} | |
3235 | + | |
3236 | +.s_ms_bth { | |
3237 | + margin-top: 85rpx | |
3238 | +} | |
3239 | + | |
3240 | + | |
3241 | +.no_pj_list { | |
3242 | + text-align: center; | |
3243 | + width: 100%; | |
3244 | + color: #999; | |
3245 | + margin: 30rpx 0; | |
3246 | + display: inline-block; | |
3247 | + font-size: 28rpx | |
3248 | +} | |
3249 | + | |
3250 | +/* 门店地址 */ | |
3251 | +.xc-address_frame { | |
3252 | + /* border-top:1rpx solid #eee; */ | |
3253 | + width: 100%; | |
3254 | + height: auto; | |
3255 | + padding: 20rpx; | |
3256 | + box-sizing: border-box; | |
3257 | +} | |
3258 | + | |
3259 | +.on_height { | |
3260 | + height: 90rpx; | |
3261 | +} | |
3262 | + | |
3263 | +.sn_height { | |
3264 | + /* min-height: 170rpx; height: auto;padding: 10rpx 0; */ | |
3265 | +} | |
3266 | + | |
3267 | +.xc-address_frame .address_frame { | |
3268 | + width: 100%; | |
3269 | + /* padding-left: 10rpx; | |
3270 | +margin: auto; */ | |
3271 | + | |
3272 | +} | |
3273 | + | |
3274 | +.shop_name {} | |
3275 | + | |
3276 | +.stores-img { | |
3277 | + width: 28rpx; | |
3278 | + height: 28rpx; | |
3279 | + margin-right: 10rpx; | |
3280 | +} | |
3281 | + | |
3282 | +.shop_name { | |
3283 | + margin-right: 10rpx; | |
3284 | +} | |
3285 | +.shop_name.max{ | |
3286 | + max-width:370rpx; flex-shrink: 0; | |
3287 | +} | |
3288 | + | |
3289 | + | |
3290 | +.address { | |
3291 | + /* width: 100%; | |
3292 | + margin-top: 5rpx; | |
3293 | + margin-bottom: 5rpx; */ | |
3294 | +} | |
3295 | + | |
3296 | +.distance { | |
3297 | + padding-left: 20rpx; | |
3298 | + padding-right: 20rpx; | |
3299 | + background: #eee; | |
3300 | + border-radius: 20rpx; | |
3301 | + /* margin-right: 5rpx; */ | |
3302 | + color: #999; | |
3303 | + height: 38rpx; | |
3304 | + line-height: 38rpx; | |
3305 | + position: relative; | |
3306 | + top: 5rpx; | |
3307 | + | |
3308 | +} | |
3309 | + | |
3310 | +/* 选择门店的弹窗 */ | |
3311 | +.mongolia-layer { | |
3312 | + position: fixed; | |
3313 | + left: 0; | |
3314 | + top: 0; | |
3315 | + right: 0; | |
3316 | + bottom: 0; | |
3317 | + z-index: 11; | |
3318 | + background: rgba(0, 0, 0, 0.4); | |
3319 | + width: 100%; | |
3320 | + height: 91.9%; | |
3321 | + | |
3322 | +} | |
3323 | + | |
3324 | +.popup-frame { | |
3325 | + position: fixed; | |
3326 | + z-index: 20; | |
3327 | + background: white; | |
3328 | + width: 100%; | |
3329 | + border-radius: 20rpx 20rpx 0 0; | |
3330 | + height: auto; | |
3331 | + bottom: 0; | |
3332 | +} | |
3333 | + | |
3334 | +.popup-top { | |
3335 | + border-bottom: 1rpx solid #eee; | |
3336 | + height: 155rpx; | |
3337 | + width: 95%; | |
3338 | + margin: auto; | |
3339 | + line-height: 155rpx; | |
3340 | + | |
3341 | +} | |
3342 | + | |
3343 | +.bg_rights { | |
3344 | + border-top: 2rpx solid; | |
3345 | + border-right: 2rpx solid; | |
3346 | + transform: rotate(45deg); | |
3347 | + display: inline-block; | |
3348 | + width: 15rpx; | |
3349 | + height: 15rpx; | |
3350 | + border-color: #da0b31; | |
3351 | +} | |
3352 | + | |
3353 | +.modal-closes { | |
3354 | + position: absolute; | |
3355 | + right: 30rpx; | |
3356 | + top: -15rpx; | |
3357 | + height: 25rpx; | |
3358 | + | |
3359 | +} | |
3360 | + | |
3361 | +.choose_more { | |
3362 | + margin-top: 40rpx; | |
3363 | + margin-right: 20rpx; | |
3364 | + | |
3365 | +} | |
3366 | + | |
3367 | +.choose_mores { | |
3368 | + margin-top: 30rpx; | |
3369 | + margin-right: 15rpx; | |
3370 | + | |
3371 | +} | |
3372 | + | |
3373 | +.store-list { | |
3374 | + width: 95%; | |
3375 | + min-height: 300rpx; | |
3376 | + overflow-y: scroll; | |
3377 | + margin: auto; | |
3378 | + max-height: 610rpx; | |
3379 | +} | |
3380 | + | |
3381 | +.store-list .store_choose { | |
3382 | + width: 100%; | |
3383 | + height: 120rpx; | |
3384 | + line-height: 125rpx; | |
3385 | + border-bottom: 1rpx solid #eee; | |
3386 | + | |
3387 | +} | |
3388 | + | |
3389 | +.store-list .store_choose .store { | |
3390 | + width: 100%; | |
3391 | + margin: auto; | |
3392 | + line-height: 37rpx; | |
3393 | + padding-left: 20rpx; | |
3394 | + | |
3395 | +} | |
3396 | + | |
3397 | +.xc-hook { | |
3398 | + width: 35rpx; | |
3399 | + height: 35rpx; | |
3400 | + transform: rotate(-145deg); | |
3401 | + line-height: 37rpx; | |
3402 | + text-align: center; | |
3403 | +} | |
3404 | + | |
3405 | +.xc-hooks { | |
3406 | + width: 30rpx; | |
3407 | + height: 30rpx; | |
3408 | + border: 1rpx solid #999; | |
3409 | +} | |
3410 | + | |
3411 | +.address-frame { | |
3412 | + width: 93%; | |
3413 | + margin-left: 7rpx; | |
3414 | + | |
3415 | +} | |
3416 | + | |
3417 | +.nearby_store { | |
3418 | + margin-left: 17rpx; | |
3419 | +} | |
3420 | + | |
3421 | +.address_name { | |
3422 | + margin-right: 10rpx; | |
3423 | + width: 360rpx; | |
3424 | + | |
3425 | +} | |
3426 | + | |
3427 | +.address-val { | |
3428 | + height: 38rpx; | |
3429 | + line-height: 38rpx; | |
3430 | + | |
3431 | +} | |
3432 | + | |
3433 | +.store-bottom { | |
3434 | + width: 85%; | |
3435 | + margin: auto; | |
3436 | + height: 90rpx; | |
3437 | +} | |
3438 | + | |
3439 | +.determine { | |
3440 | + width: 260rpx; | |
3441 | + height: 55rpx; | |
3442 | + border-radius: 50rpx; | |
3443 | + line-height: 55rpx; | |
3444 | +} | |
3445 | + | |
3446 | +.default { | |
3447 | + width: 260rpx; | |
3448 | + height: 55rpx; | |
3449 | + border: 3rpx solid #c8c8c8; | |
3450 | + border-radius: 50rpx; | |
3451 | + line-height: 55rpx; | |
3452 | +} | |
3453 | + | |
3454 | +.store-bottom-frame { | |
3455 | + width: 95%; | |
3456 | + margin: auto; | |
3457 | + | |
3458 | +} | |
3459 | + | |
3460 | +/* 门店分类列表 */ | |
3461 | +.sort_store_list { | |
3462 | + max-height: 700rpx; | |
3463 | + overflow: hidden; | |
3464 | + overflow-y: scroll; | |
3465 | + width: 95%; | |
3466 | + margin: auto; | |
3467 | +} | |
3468 | + | |
3469 | +.sort_store_list .sort-store-frame { | |
3470 | + width: 100%; | |
3471 | + height: 100rpx; | |
3472 | + line-height: 100rpx; | |
3473 | + border-bottom: 1rpx solid #eee; | |
3474 | + | |
3475 | +} | |
3476 | + | |
3477 | +.sort_store_list .sort-store-frame .sort-store { | |
3478 | + width: 94.5%; | |
3479 | + margin: auto; | |
3480 | +} | |
3481 | + | |
3482 | +.black_rights-frame { | |
3483 | + width: 50%; | |
3484 | +} | |
3485 | + | |
3486 | +.black_rights-frame .black_rights { | |
3487 | + border-top: 3rpx solid; | |
3488 | + border-right: 3rpx solid; | |
3489 | + transform: rotate(45deg); | |
3490 | + display: inline-block; | |
3491 | + width: 20rpx; | |
3492 | + height: 20rpx; | |
3493 | +} | |
3494 | + | |
3495 | +.xc-val-money { | |
3496 | + height: 55rpx; | |
3497 | +} | |
3498 | + | |
3499 | +.xc-distance-bottom { | |
3500 | + margin-bottom: 40rpx; | |
3501 | +} | |
3502 | + | |
3503 | +.xc-distance-top { | |
3504 | + margin-top: 10rpx; | |
3505 | +} | |
3506 | + | |
3507 | +.xc-width { | |
3508 | + width: 100%; | |
3509 | +} | |
3510 | + | |
3511 | +.right-arrow { | |
3512 | + width: 15rpx; | |
3513 | + height: 15rpx; | |
3514 | + border-top: 2rpx solid #d70026; | |
3515 | + border-right: 2rpx solid #d70026; | |
3516 | + transform: rotate(45deg); | |
3517 | + display: inline-block; | |
3518 | + margin-bottom: 3rpx; | |
3519 | +} | |
3520 | + | |
3521 | +.xc-goods-attribute { | |
3522 | + border-bottom: 1px solid #eee; | |
3523 | + padding-bottom: 20rpx; | |
3524 | + /* margin-bottom:40rpx; */ | |
3525 | +} | |
3526 | + | |
3527 | +.xc-val-fream { | |
3528 | + width: 105rpx; | |
3529 | +} | |
3530 | + | |
3531 | +.is_stock { | |
3532 | + width: 58%; | |
3533 | + height: 70rpx; | |
3534 | + border-radius: 55rpx; | |
3535 | +} | |
3536 | + | |
3537 | +.select_store_height { | |
3538 | + height: 50rpx; | |
3539 | +} | |
3540 | + | |
3541 | +.butttem5 { | |
3542 | + margin-bottom: 5rpx; | |
3543 | +} | |
3544 | + | |
3545 | +.no_pj_list { | |
3546 | + text-align: center; | |
3547 | + width: 100%; | |
3548 | + color: #999; | |
3549 | + margin-top: 30rpx; | |
3550 | + display: inline-block; | |
3551 | + font-size: 28rpx | |
3552 | +} | |
3553 | + | |
3554 | + | |
3555 | +.join-cart>view.no_store { | |
3556 | + width: 58%; | |
3557 | + background-color: #adadad; | |
3558 | +} | |
3559 | + | |
3560 | +.s_btn { | |
3561 | + margin-top: 25rpx; | |
3562 | +} | |
3563 | + | |
3564 | +/* 美妆价的样式 */ | |
3565 | +.beauty-makeup-frame { | |
3566 | + /* width: 101.5%; | |
3567 | + margin: auto; */ | |
3568 | + height: 120rpx; | |
3569 | + border-radius: 15rpx; | |
3570 | + margin-top: 10px; | |
3571 | + | |
3572 | +} | |
3573 | + | |
3574 | +.beauty-makeup-frame .left { | |
3575 | + width: 80%; | |
3576 | + height: 100%; | |
3577 | + background: #f7f7f7; | |
3578 | + border-radius: 20rpx 0rpx 0rpx 20rpx; | |
3579 | + /* padding: 0 10rpx; */ | |
3580 | +} | |
3581 | + | |
3582 | +.card-frame { | |
3583 | + margin-top: 0rpx; | |
3584 | + /* padding-right: 23rpx; | |
3585 | + margin-right: 15rpx; */ | |
3586 | +} | |
3587 | + | |
3588 | +.advert-card { | |
3589 | + margin-top: 0rpx !important; | |
3590 | + | |
3591 | +} | |
3592 | + | |
3593 | +.beauty-makeup-frame .right { | |
3594 | + width: 20%; | |
3595 | + height: 100%; | |
3596 | + background: #f3efe3; | |
3597 | + border-radius: 0rpx 20rpx 20rpx 0rpx; | |
3598 | +} | |
3599 | + | |
3600 | +.grade-card-frame { | |
3601 | + | |
3602 | + /* height:45rpx ; */ | |
3603 | + background: #3c300a; | |
3604 | + border-radius: 20rpx; | |
3605 | + /* margin-top: 10px; | |
3606 | + margin-left: 7rpx; */ | |
3607 | + justify-content: center; | |
3608 | + padding: 4rpx 12rpx; | |
3609 | +} | |
3610 | + | |
3611 | +.grade-card-frame .img { | |
3612 | + width: 24rpx; | |
3613 | + height: 24rpx; | |
3614 | + margin-top: 2px; | |
3615 | + | |
3616 | +} | |
3617 | + | |
3618 | +.grade-card-frame .card-name { | |
3619 | + margin-left: 8rpx; | |
3620 | + /* max-width: 120rpx; */ | |
3621 | + max-width: 165rpx; | |
3622 | +} | |
3623 | + | |
3624 | +.card-effect { | |
3625 | + /* margin-left: 15rpx; */ | |
3626 | +} | |
3627 | + | |
3628 | +.at_once_carde { | |
3629 | + width: 65rpx; | |
3630 | + height: 75rpx; | |
3631 | + line-height: 38rpx; | |
3632 | +} | |
3633 | + | |
3634 | +.bg_right { | |
3635 | + width: 18rpx; | |
3636 | + height: 18rpx; | |
3637 | + border-top: 2rpx solid #333; | |
3638 | + border-right: 2rpx solid #333; | |
3639 | + transform: rotate(45deg); | |
3640 | + display: inline-block; | |
3641 | + margin-bottom: 3rpx; | |
3642 | + | |
3643 | +} | |
3644 | + | |
3645 | +.carde_frame { | |
3646 | + height: 50rpx; | |
3647 | + /* line-height: 18rpx */ | |
3648 | +} | |
3649 | + | |
3650 | +button.custom-service { | |
3651 | + line-height: normal; | |
3652 | + border: 0; | |
3653 | +} | |
3654 | + | |
3655 | +button.custom-service::after { | |
3656 | + border: 0; | |
3657 | +} | |
3658 | + | |
3659 | +.no_store,.c-red22 { | |
3660 | + color: #d60021; | |
3661 | + font-size: 26rpx; | |
3662 | +} | |
3663 | + | |
3664 | + | |
3665 | +.cx_show_view { | |
3666 | + width: 580rpx; | |
3667 | + /* line-height: 30rpx; margin-bottom: 6rpx; */ | |
3668 | +} | |
3669 | + | |
3670 | +.cx_show_view .word { | |
3671 | + width: 400rpx | |
3672 | +} | |
3673 | + | |
3674 | +.prom_condition { | |
3675 | + color: #f23030; | |
3676 | + /* width: 180rpx; */ | |
3677 | + /* height: 30rpx; */ | |
3678 | + /* font-size: 20rpx; */ | |
3679 | + /* padding-top: 0.01rpx; */ | |
3680 | + /* display: flex; | |
3681 | + justify-content: center; | |
3682 | + align-items: center; */ | |
3683 | + border: 2rpx solid #f23030; | |
3684 | + border-radius: 6rpx; | |
3685 | + /* margin-right: 10rpx; */ | |
3686 | + /* margin-left: 10rpx; */ | |
3687 | + font-size: 24rpx; | |
3688 | + padding-right: 6rpx; | |
3689 | + /* padding: 0 10rpx; */ | |
3690 | +} | |
3691 | + | |
3692 | +.hui_img { | |
3693 | + width: 44rpx; | |
3694 | + height: 44rpx; | |
3695 | + margin-right: 8rpx | |
3696 | +} | |
3697 | + | |
3698 | +.order_hui { | |
3699 | + color: #444; | |
3700 | + width: 420rpx | |
3701 | +} | |
3702 | + | |
3703 | +.order_hui view { | |
3704 | + height: 34rpx; | |
3705 | + line-height: 34rpx; | |
3706 | +} | |
3707 | + | |
3708 | +.dp_img { | |
3709 | + width: 240rpx; | |
3710 | + height: 240rpx; | |
3711 | + margin: 0 40rpx | |
3712 | +} | |
3713 | + | |
3714 | +.dp_cx_view { | |
3715 | + border-bottom: 0.02rpx solid #eee; | |
3716 | + padding-bottom: 40rpx | |
3717 | +} | |
3718 | + | |
3719 | +.act_content { | |
3720 | + margin-top: 40rpx | |
3721 | +} | |
3722 | + | |
3723 | +.act_content view { | |
3724 | + margin-bottom: 12rpx | |
3725 | +} | |
3726 | + | |
3727 | +.color_b { | |
3728 | + color: #ff9c00 | |
3729 | +} | |
3730 | + | |
3731 | +.poster-container { | |
3732 | + box-sizing: border-box; | |
3733 | + position: fixed; | |
3734 | + width: 610rpx; | |
3735 | + top: 50%; | |
3736 | + left: 50%; | |
3737 | + transform: translate(-50%, -50%); | |
3738 | + /* width: calc(100% - 210rpx); */ | |
3739 | + z-index: 1000; | |
3740 | +} | |
3741 | + | |
3742 | +.mask { | |
3743 | + position: fixed; | |
3744 | + top: 0; | |
3745 | + left: 0; | |
3746 | + width: 100%; | |
3747 | + height: 100%; | |
3748 | + z-index: 999; | |
3749 | + background-color: rgba(0, 0, 0, .6); | |
3750 | +} | |
3751 | + | |
3752 | +.poster-wrapper { | |
3753 | + width: 100%; | |
3754 | +} | |
3755 | + | |
3756 | +.poster { | |
3757 | + box-sizing: border-box; | |
3758 | + width: 100%; | |
3759 | + height: 980rpx; | |
3760 | + border-radius: 16rpx; | |
3761 | + /* box-shadow: 0 8px 12px #666; */ | |
3762 | + position: relative; | |
3763 | + z-index: 999; | |
3764 | + overflow: hidden; | |
3765 | +} | |
3766 | + | |
3767 | +.poster-img { | |
3768 | + display: block; | |
3769 | + width: 100%; | |
3770 | + height: 100%; | |
3771 | +} | |
3772 | + | |
3773 | +.btn-container { | |
3774 | + display: flex; | |
3775 | + justify-content: space-around; | |
3776 | +} | |
3777 | + | |
3778 | +.btn-share { | |
3779 | + display: block; | |
3780 | + background-color: #FE6867; | |
3781 | + color: white; | |
3782 | + border-radius: 8rpx; | |
3783 | + line-height: 80rpx; | |
3784 | + margin-top: 28rpx; | |
3785 | + padding: 0 60rpx; | |
3786 | +} | |
3787 | + | |
3788 | +/* .btn-close { | |
3789 | + background-color: rgba(0,0,0,.5); | |
3790 | + color: white; | |
3791 | + width: 40rpx; | |
3792 | + height: 40rpx; | |
3793 | + line-height: 40rpx; | |
3794 | + text-align: center; | |
3795 | + border-radius: 50%; | |
3796 | + position: absolute; | |
3797 | + right: 20rpx; | |
3798 | + top: 10rpx; | |
3799 | +} */ | |
3800 | + | |
3801 | +.goods-price .rel_txt { | |
3802 | + /* position: relative; top: 32rpx; */ | |
3803 | + font-size: 30rpx; | |
3804 | +} | |
3805 | + | |
3806 | +.goods-price .rel_img { | |
3807 | + width: 62rpx; | |
3808 | + height: 62rpx; | |
3809 | + position: relative; | |
3810 | + top: 8rpx; | |
3811 | +} | |
3812 | + | |
3813 | +.btn-close { | |
3814 | + /* background-color: rgba(0,0,0,.5); */ | |
3815 | + color: #ccc; | |
3816 | + /* width: 50rpx; | |
3817 | + height: 50rpx; | |
3818 | + line-height: 50rpx; | |
3819 | + text-align: center; */ | |
3820 | + border-radius: 50%; | |
3821 | + position: absolute; | |
3822 | + right: 20rpx; | |
3823 | + top: 20rpx; | |
3824 | +} | |
3825 | + | |
3826 | +.icon-close { | |
3827 | + font-size: 36rpx; | |
3828 | +} | |
3829 | + | |
3830 | +.quan_price { | |
3831 | + background-color: #ff4700; | |
3832 | + color: #fff; | |
3833 | + padding: 10rpx 25rpx; | |
3834 | + margin-left: 10rpx; | |
3835 | + border-radius: 30rpx; | |
3836 | +} | |
3837 | + | |
3838 | +/*--闪白屏--*/ | |
3839 | +.g_img_box { | |
3840 | + background-position: center center; | |
3841 | + background-repeat: no-repeat; | |
3842 | + -webkit-background-size: cover; | |
3843 | + -moz-background-size: cover; | |
3844 | + background-size: cover; | |
3845 | +} | |
3846 | + | |
3847 | + | |
3848 | + | |
3849 | +.arrow { | |
3850 | + width: auto !important; | |
3851 | + position: absolute; | |
3852 | + right: 0; | |
3853 | + top: 50%; | |
3854 | + transform: translateY(-50%); | |
3855 | +} | |
3856 | + | |
3857 | + | |
3858 | +.logo-container { | |
3859 | + -webkit-filter: brightness(80%); | |
3860 | + filter: brightness(80%); | |
3861 | +} | |
3862 | + | |
3863 | +.logo { | |
3864 | + width: 132rpx; | |
3865 | + height: 37rpx; | |
3866 | + margin-right: 10rpx; | |
3867 | +} | |
3868 | + | |
3869 | +.miao_lab { | |
3870 | + width: 36rpx; | |
3871 | + height: 36rpx; | |
3872 | + border: 4rpx solid #e71f19; | |
3873 | + color: #e71f19; | |
3874 | + text-align: center; | |
3875 | + margin-right: 10rpx; | |
3876 | + line-height: 36rpx; | |
3877 | + font-size: 22rpx; | |
3878 | + font-weight: bolder; | |
3879 | + border-radius: 50%; | |
3880 | +} | |
3881 | + | |
3882 | +.pop_more_act .content { | |
3883 | + position: fixed; | |
3884 | + background: #fff; | |
3885 | + width: 100%; | |
3886 | + left: 0; | |
3887 | + bottom: 0; | |
3888 | + z-index: 1000; | |
3889 | +} | |
3890 | + | |
3891 | +.p_btn { | |
3892 | + background-color: #f23030; | |
3893 | + height: 70rpx; | |
3894 | + line-height: 70rpx; | |
3895 | + color: #fff; | |
3896 | +} | |
3897 | + | |
3898 | +.mt20 { | |
3899 | + margin-top: 20rpx | |
3900 | +} | |
3901 | + | |
3902 | +.group .group-list.luck { | |
3903 | + padding: 0 20rpx; | |
3904 | + justify-content: flex-start; | |
3905 | +} | |
3906 | + | |
3907 | +.group-list.luck .gtou~.gtou { | |
3908 | + margin-left: -16rpx; | |
3909 | +} | |
3910 | + | |
3911 | +.gtou.more { | |
3912 | + background-color: #ddd; | |
3913 | + text-align: center; | |
3914 | + line-height: 70rpx; | |
3915 | + border-radius: 50%; | |
3916 | + color: #aaa; | |
3917 | +} | |
3918 | + | |
3919 | + | |
3920 | +.tick { | |
3921 | + position: relative; | |
3922 | +} | |
3923 | + | |
3924 | +.tick:before { | |
3925 | + content: ''; | |
3926 | + display: inline-block; | |
3927 | + vertical-align: middle; | |
3928 | + margin-top: -4rpx; | |
3929 | + margin-right: 12rpx; | |
3930 | + width: 22rpx; | |
3931 | + height: 22rpx; | |
3932 | + background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABYAAAAWCAMAAADzapwJAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAABCUExURUdwTPInDPInDPgoDfMnDPYqEvInDPInDPInDP87NPUoDv8vEvMoDPInDPIoDPMnDvInDPInDPInDPIoDPQoDfInDEON4KMAAAAVdFJOUwD45yawG4zz3gQ0DmLOfECQZpPlS54kMQ4AAAC0SURBVBjTbZFREoMgDERDS0xQQNHu/a/alEGtaIYfHrBhs0S1pujVifo40VkhC+BUHSDzQTlBhjHY8bjogXmDZ+orJKwXwMUeUoa/0PeGbH8Q4Y5CJopYOjosiOQxdpRGk1UXOkrBKdkimtN8UrKrJBVXdzsllSYSjR/0J9JaGn81WluWtonYKQ0op51P3M2L2bmZN9n8MKoVqTph/RsseyjfYxAkfgot/82CpuJVLOLSIv4Cd5AJ37BgpFwAAAAASUVORK5CYII=) no-repeat; | |
3933 | + background-size: 22rpx auto; | |
3934 | +} | |
3935 | + | |
3936 | +.details::after { | |
3937 | + content: ''; | |
3938 | + position: absolute; | |
3939 | + right: 0; | |
3940 | + top: 0; | |
3941 | + bottom: 0; | |
3942 | + margin: auto; | |
3943 | + display: inline-block; | |
3944 | + width: 40rpx; | |
3945 | + height: 40rpx; | |
3946 | + background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoBAMAAAB+0KVeAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAVUExURUdwTIyMjCYmJiYmJi0tLY+PjyYmJidnOsIAAAAGdFJOUwDt6aYcSSEXj/YAAAA8SURBVCjPY2AYBTQBLEbKDhiCTmlpKggeq2AAiDJLS0tGcBkFBUActbS0JAY4F6sgVu1YLcLnpFFAFQAATwgLKVhjC9UAAAAASUVORK5CYII=); | |
3947 | + background-repeat: no-repeat; | |
3948 | + background-size: 40rpx auto; | |
3949 | +} | |
3950 | + | |
3951 | +.lh2 { | |
3952 | + line-height: 2; | |
3953 | +} | |
3954 | + | |
3955 | +.fill-box { | |
3956 | + background-color: #f23030; | |
3957 | + color: white; | |
3958 | + padding: 0 6rpx; | |
3959 | + border-radius: 0 0 10rpx 0; | |
3960 | + margin-right: 4rpx; | |
3961 | +} | |
3962 | + | |
3963 | +.jie_show{ display: inline-block; width: 40rpx; height: 40rpx; background-color:#ff0505;border-radius:50%;color: #fff;text-align: center; margin: 0 20rpx } | |
3964 | + | |
3965 | +.jie_show{ display: inline-block; width: 40rpx; height: 40rpx; background-color:#ff0505;border-radius:50%;color: #fff;text-align: center; margin: 0 20rpx } | |
3966 | +/* 历史购买 */ | |
3967 | +.swiper-container { | |
3968 | + position: absolute; | |
3969 | + top: 0; | |
3970 | + left: 0; | |
3971 | + padding: 20rpx 10rpx; | |
3972 | + width: 100%; | |
3973 | + box-sizing: border-box; | |
3974 | + z-index: 98; | |
3975 | +} | |
3976 | + | |
3977 | +.swiper { | |
3978 | + height: 60rpx; | |
3979 | + color: white; | |
3980 | + font-size: 26rpx; | |
3981 | +} | |
3982 | + | |
3983 | +.swiper-item { | |
3984 | + /* width: auto !important; | |
3985 | + background-color: rgba(0,0,0,.4); | |
3986 | + border-radius: 60rpx; */ | |
3987 | + position: relative; | |
3988 | +} | |
3989 | + | |
3990 | +.swiper-item .item { | |
3991 | + position: absolute; | |
3992 | +} | |
3993 | + | |
3994 | +.item { | |
3995 | + /* position: absolute; */ | |
3996 | + display: flex; | |
3997 | + align-items: center; | |
3998 | + /* justify-content: center; */ | |
3999 | + border-radius: 60rpx; | |
4000 | + background-color: rgba(0,0,0,.4); | |
4001 | + /* position: absolute; */ | |
4002 | +} | |
4003 | + | |
4004 | +.avatar-container { | |
4005 | + width: 60rpx; | |
4006 | + height: 60rpx; | |
4007 | + border-radius: 50%; | |
4008 | + overflow: hidden; | |
4009 | + flex-shrink: 0; | |
4010 | +} | |
4011 | +.avatar-container image { | |
4012 | + width: 100%; | |
4013 | + height: 100%; | |
4014 | +} | |
4015 | + | |
4016 | +.hideArea { | |
4017 | + position: absolute; | |
4018 | + left: -1000px; | |
4019 | + top: -1000px; | |
4020 | +} | ... | ... |
packageE/pages/user/monthgiftbag/giftpackinfo/giftpackinfo.js
0 → 100644
1 | +var e = getApp(), | |
2 | + a = e.globalData.setting, | |
3 | + os = a, | |
4 | + t = e.request, | |
5 | + d = e.globalData; | |
6 | +var ut = require("../../../../../utils/util.js"); | |
7 | +var com = require("../public/buy_com.js"); | |
8 | + | |
9 | +Page({ | |
10 | + data: { | |
11 | + url: a.url, //接口网址 | |
12 | + iurl: a.imghost, //图片前缀网址 | |
13 | + isBuy: 0, | |
14 | + getGiftID: '', //礼包id | |
15 | + giftImage: '', | |
16 | + giftTitle: '', | |
17 | + giftDate: '', | |
18 | + giftPrice: '', | |
19 | + giftIntegral: '', | |
20 | + giftPosPrice: '', | |
21 | + giftQty: '', | |
22 | + giftRemark: '', | |
23 | + giftType: '', | |
24 | + actTitle: '', | |
25 | + getUrl: '', | |
26 | + wareCard: [], | |
27 | + orderSn: "", //订单编号 | |
28 | + lbId: "", | |
29 | + code: "", //核销码 | |
30 | + c_state: "0", //判断是否已经使用, 0正常 1已使用 2已过期 | |
31 | + is_lb: 0, //是否有礼包 | |
32 | + default_color: null, | |
33 | + first_leader: e.globalData.first_leader || 0, // 推荐人ID | |
34 | + | |
35 | + //门店相关 | |
36 | + ismend: 0, | |
37 | + is_sec_mend: 0, | |
38 | + sto_sele_name: "", //选中的门店名称 | |
39 | + sto_sele_id: "", //选中的门店id | |
40 | + sto_sele_distr: "", //选择的门店的配送方式 | |
41 | + is_show_sto_cat: 1, //是否显示门店分类 | |
42 | + only_pk: null, | |
43 | + all_sto: null, | |
44 | + sec_sto: null, //选择了的门店分类 | |
45 | + pickpu_list: null, //读出的所有门店list | |
46 | + def_pickpu_list: null, //一开始5个门店list | |
47 | + sec_pick_index: 0, //第二级门店选择ID | |
48 | + fir_pick_index: 0, //第一级门店选择ID | |
49 | + all_pick_list: null,//所有的门店先记录起来 | |
50 | + | |
51 | + select_store: 0, //选择更多 | |
52 | + index: 1, | |
53 | + more_store: 0, //选择门店 | |
54 | + sort_store: 0, //门店分类 | |
55 | + choice_sort_store: 0, //选择分类门店 | |
56 | + new_user: 0, //新用户 | |
57 | + | |
58 | + def_pick_store: null, // 默认的门店 | |
59 | + fir_def_store: null, //客户默认的门店的 | |
60 | + lat: null, //维度 | |
61 | + lon: null, //经度 | |
62 | + | |
63 | + is_get_local_ok: 0, //获取坐标是否完成 | |
64 | + region_name: "门店分类", //区域的名字 | |
65 | + is_gps: 1, | |
66 | + open_ind_store: 0, //哪里打开的门店列表的控制属性 | |
67 | + default_store: {}, //创建添加默认门店地址的对象 | |
68 | + | |
69 | + store: 0, | |
70 | + openSpecModal: 0, | |
71 | + | |
72 | + sto_sele_name_1: '', | |
73 | + share_goods_img:'', //礼包的分享图 | |
74 | + giftImageCover:null, | |
75 | + canvasHidden:true, | |
76 | + is_receive:0, | |
77 | + screenWidth: 0, | |
78 | + monthgiftbag:{}, | |
79 | + }, | |
80 | + onLoad: function (options) { | |
81 | + | |
82 | + var th = this; | |
83 | + | |
84 | + this.setData({ | |
85 | + params: options, | |
86 | + }) | |
87 | + | |
88 | + getApp().getConfig(function (e) { | |
89 | + th.setData({sto_sele_name_1: e.store_name}) | |
90 | + }) | |
91 | + | |
92 | + getApp().getConfig2(function (e) { | |
93 | + var json_d = JSON.parse(e.switch_list); | |
94 | + th.setData({ | |
95 | + bconfig: e, | |
96 | + sys_switch: json_d, | |
97 | + is_retail_price: json_d.is_retail_price || 0 | |
98 | + }); | |
99 | + }) | |
100 | + | |
101 | + //获取用户设备信息,屏幕宽度 | |
102 | + wx.getSystemInfo({ | |
103 | + success: res => { | |
104 | + th.setData({ | |
105 | + screenWidth: res.screenWidth | |
106 | + }) | |
107 | + } | |
108 | + }); | |
109 | + | |
110 | + let monthgiftbag=wx.getStorageSync('monthgiftbag') | |
111 | + | |
112 | + var now = ut.gettimestamp(); | |
113 | + var isStart=0; | |
114 | + // var str = res.data.data.starTime; | |
115 | + var start = monthgiftbag.begindate; | |
116 | + // start = start / 1000; | |
117 | + if (start < now) isStart = 1; | |
118 | + this.setData({ | |
119 | + isStart, | |
120 | + monthgiftbag, | |
121 | + sele_g:monthgiftbag | |
122 | + }) | |
123 | + | |
124 | + }, | |
125 | + init() { | |
126 | + let options = this.data?.params; // this.data == null ? undefined:this.data.params | |
127 | + var th = this; | |
128 | + this.setData({ | |
129 | + getUserID: d.user_id, | |
130 | + getStorageID: a.stoid, | |
131 | + }) | |
132 | + | |
133 | + if(!options.lbId && options.scene){ | |
134 | + var gid_str = decodeURIComponent(options.scene); | |
135 | + gid_str = gid_str.split("_"); | |
136 | + | |
137 | + options.lbId=gid_str[0]; | |
138 | + options.first_leader=gid_str[1]; | |
139 | + options.isBuy=1; | |
140 | + } | |
141 | + | |
142 | + | |
143 | + this.setData({ | |
144 | + isBuy: options.isBuy, | |
145 | + getGiftID: options.lbId, | |
146 | + orderSn: options.orderSn, | |
147 | + flag: options.flag, // 如果从商品详情页的促销处点击专享礼包跳转到此页,则flag为1 | |
148 | + record_list_id:options.record_list_id, | |
149 | + is_receive:options.is_receive | |
150 | + }) | |
151 | + if (options.lbId) th.data.lbId = options.lbId; | |
152 | + //-- 获取分享人的ID -- | |
153 | + var first_leader = options.first_leader || getApp().globalData.first_leader; | |
154 | + if (first_leader) { | |
155 | + this.setData({ | |
156 | + first_leader, | |
157 | + }) | |
158 | + //-- user_id代过来免登录 -- | |
159 | + getApp().globalData.first_leader = first_leader; | |
160 | + //调用接口判断是不是会员 | |
161 | + getApp().request.promiseGet("/api/weshop/shoppingGuide/get/" + os.stoid + "/" + first_leader, {}).then(res => { | |
162 | + if (res.data.code == 0) { | |
163 | + getApp().globalData.guide_id = res.data.data.id; | |
164 | + getApp().globalData.guide_pick_id= res.data.data.pickup_id | |
165 | + } | |
166 | + }) | |
167 | + } | |
168 | + th.close(); | |
169 | + | |
170 | + | |
171 | + // if (this.data.flag == 1) { | |
172 | + // this.getZxlbDetails(); | |
173 | + // } else { | |
174 | + // if (this.data.isBuy == 0) { | |
175 | + // this.GetMyGiftList(); | |
176 | + // } else if (this.data.isBuy == 1) { | |
177 | + // this.GetBuyGiftList(); | |
178 | + // } | |
179 | + | |
180 | + // } | |
181 | + | |
182 | + }, | |
183 | + | |
184 | + onShow: function () { | |
185 | + getApp().check_can_share(); | |
186 | + getApp().is_Single_page(this, function () { | |
187 | + //--先判断会员状态-- | |
188 | + var user_info = getApp().globalData.userInfo; | |
189 | + if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) { | |
190 | + getApp().goto('/packageE/pages/togoin/togoin'); | |
191 | + return false; | |
192 | + } | |
193 | + this.init(); | |
194 | + }) | |
195 | + }, | |
196 | + GetBuyPrice: function (e) { | |
197 | + var that = this.data; | |
198 | + var th = this; | |
199 | + //如果还没有开始的话 | |
200 | + if (th.data.isStart != 1) { | |
201 | + getApp().my_warnning("活动还没有开始", 0, th); | |
202 | + return false; | |
203 | + } | |
204 | + | |
205 | + this.data.payMoney = th.data.sele_g.payMoney; | |
206 | + th.setData({buyType: 2}) | |
207 | + if (th.data.sele_g.is_pickup) { | |
208 | + th.setData({ | |
209 | + openSpecModal: 1 | |
210 | + }) | |
211 | + } else { | |
212 | + var my_confirm = th.selectComponent("#my_confirm"); //组件的id | |
213 | + my_confirm.open( | |
214 | + "是否确定购买该礼包", | |
215 | + "取消", | |
216 | + "确定", | |
217 | + function () { | |
218 | + my_confirm.open_cancel(0); | |
219 | + }, | |
220 | + function () { | |
221 | + my_confirm.open_cancel(0); | |
222 | + com.buy_libao(th) | |
223 | + } | |
224 | + ) | |
225 | + } | |
226 | + | |
227 | + | |
228 | + }, | |
229 | + GetBuyIntegral: function (e) { | |
230 | + var that = this.data; | |
231 | + var th = this; | |
232 | + | |
233 | + //如果还没有开始的话 | |
234 | + if (th.data.isStart != 1) { | |
235 | + getApp().my_warnning("活动还没有开始", 0, th); | |
236 | + return false; | |
237 | + } | |
238 | + | |
239 | + th.setData({buyType: 1}); | |
240 | + if (th.data.sele_g.is_pickup) { | |
241 | + th.setData({ | |
242 | + openSpecModal: 1 | |
243 | + }) | |
244 | + } else { | |
245 | + var my_confirm = th.selectComponent("#my_confirm"); //组件的id | |
246 | + my_confirm.open( | |
247 | + "是否确定兑换该礼包", | |
248 | + "取消", | |
249 | + "确定", | |
250 | + function () { | |
251 | + my_confirm.open_cancel(0); | |
252 | + }, | |
253 | + function () { | |
254 | + my_confirm.open_cancel(0); | |
255 | + com.buy_libao(th) | |
256 | + }) | |
257 | + } | |
258 | + | |
259 | + | |
260 | + }, | |
261 | + | |
262 | + GetMyGiftList: function () { | |
263 | + var _this = this; | |
264 | + var th = this; | |
265 | + getApp().request.get('/api/weshop/marketing/my/giftbag/detail/get', { | |
266 | + isShowLoading: true, | |
267 | + data: { | |
268 | + "storeId": a.stoid, //商家ID | |
269 | + "userId": d.user_id, //用户ID | |
270 | + "orderSn": th.data.orderSn | |
271 | + }, | |
272 | + success: function (res) { | |
273 | + if (res.data.code == 0) { | |
274 | + console.log('商品------++') | |
275 | + console.log(res) | |
276 | + th.setData({ | |
277 | + giftImage: th.data.iurl + res.data.data.lbUrl, | |
278 | + giftImageCover: th.data.iurl + (th.data.params.cover_img ? th.data.params.cover_img: res.data.data.lbUrl), | |
279 | + giftTitle: res.data.data.giftTitle, | |
280 | + default_color: res.data.data.bgcolor | |
281 | + }) | |
282 | + | |
283 | + if (res.data.data.iswarelbtype == 1) { | |
284 | + th.setData({iswarelbtype: 1}) | |
285 | + } | |
286 | + | |
287 | + if (!res.data.data.giftRemark || res.data.data.giftRemark == '') { | |
288 | + th.setData({ | |
289 | + giftRemark: '暂无详情......' | |
290 | + }) | |
291 | + } else { | |
292 | + th.setData({ | |
293 | + giftRemark: res.data.data.giftRemark.replace(/\<img/gi, '<img style="max-width:100%;height:auto;display:block"') | |
294 | + }) | |
295 | + } | |
296 | + | |
297 | + //---获取日期的时间戳--- | |
298 | + var t_endtime = res.data.data.endTime; | |
299 | + t_endtime = t_endtime.replace(/-/g, '/'); | |
300 | + var t_date = new Date(t_endtime) / 1000; | |
301 | + var t_now = ut.gettimestamp(); | |
302 | + | |
303 | + var t_starttime = res.data.data.starTime; | |
304 | + t_starttime = t_starttime.replace(/-/g, '/'); | |
305 | + var t_sdate = new Date(t_starttime) / 1000; | |
306 | + | |
307 | + if (res.data.data.goodsUseState) th.setData({ | |
308 | + c_state: 1 | |
309 | + }) | |
310 | + else if (t_date <= t_now) | |
311 | + th.setData({ | |
312 | + c_state: 2 | |
313 | + }) | |
314 | + else if (t_sdate > t_now) | |
315 | + th.setData({ | |
316 | + c_state: -1 | |
317 | + }) | |
318 | + th.setData({ | |
319 | + giftDate: res.data.data.endTime, | |
320 | + giftPosPrice: res.data.data.giftPosPrice, | |
321 | + giftQty: res.data.data.giftQty, | |
322 | + giftIntegral: res.data.data.payIntegral, | |
323 | + giftPrice: res.data.data.payMoney, | |
324 | + giftType: res.data.data.actType, | |
325 | + actTitle: res.data.data.actTitle, | |
326 | + wareCard: res.data.data.wareCard, | |
327 | + lbId: res.data.data.lbId | |
328 | + }) | |
329 | + //判断是否有礼包 | |
330 | + for (var i = 0; i < res.data.data.wareCard.length; i++) { | |
331 | + if (res.data.data.wareCard[i].lbType == 1) { | |
332 | + th.setData({ | |
333 | + is_lb: 1 | |
334 | + }) | |
335 | + break; | |
336 | + } | |
337 | + } | |
338 | + | |
339 | + if (res.data.data.pickup_id) { | |
340 | + getApp().request.get("/api/weshop/pickup/get/" + os.stoid + "/" + res.data.data.pickup_id, { | |
341 | + success: function (res) { | |
342 | + if (res.data.code == 0) { | |
343 | + th.setData({pick_up: res.data.data}); | |
344 | + } | |
345 | + } | |
346 | + }); | |
347 | + | |
348 | + } | |
349 | + | |
350 | + | |
351 | + } else { | |
352 | + getApp().my_warnning(res.data.msg, 0, th); | |
353 | + return false; | |
354 | + } | |
355 | + } | |
356 | + }); | |
357 | + | |
358 | + }, | |
359 | + | |
360 | + check_guide(func){ | |
361 | + var first_leader=this.data.first_leader; | |
362 | + if(!first_leader){ | |
363 | + func(); | |
364 | + return false; | |
365 | + } | |
366 | + if(this.data.is_geted_guide_pick){ | |
367 | + func(); | |
368 | + return false; | |
369 | + } | |
370 | + if(getApp().globalData.guide_pick_id){ | |
371 | + func(); | |
372 | + return false; | |
373 | + } | |
374 | + var th=this; | |
375 | + getApp().request.promiseGet("/api/weshop/shoppingGuide/get/" + os.stoid + "/" + first_leader, {}).then(res => { | |
376 | + if (res.data.code == 0) { | |
377 | + getApp().globalData.guide_pick_id= res.data.data.pickup_id; | |
378 | + } | |
379 | + th.data.is_geted_guide_pick=1; | |
380 | + func(); | |
381 | + }) | |
382 | + }, | |
383 | + | |
384 | + GetBuyGiftList: function () { | |
385 | + var _this2 = this; | |
386 | + var th = this.data; | |
387 | + getApp().request.get('/api/weshop/marketing/giftbag/detail/getNew', { | |
388 | + isShowLoading: true, | |
389 | + data: { | |
390 | + "storeId": a.stoid, //商家ID | |
391 | + "userId": d.user_id, //用户ID | |
392 | + "giftBagId": th.getGiftID | |
393 | + }, | |
394 | + success: function success(res) { | |
395 | + if (res.data.code == 0) { | |
396 | + _this2.setData({ | |
397 | + giftImage: th.iurl + res.data.data.lbUrl, | |
398 | + giftImageCover: th.iurl + (_this2.data.params.cover_img ? _this2.data.params.cover_img: res.data.data.lbUrl), | |
399 | + // giftTitle: res.data.data.giftTitle, | |
400 | + giftTitle: res.data.data.lbTitle, | |
401 | + default_color: res.data.data.bgcolor | |
402 | + }) | |
403 | + if (!res.data.data.giftRemark) { | |
404 | + _this2.setData({ | |
405 | + giftRemark: '暂无详情......' | |
406 | + }) | |
407 | + } else { | |
408 | + _this2.setData({ | |
409 | + giftRemark: res.data.data.giftRemark.replace(/\<img/gi, '<img style="max-width:100%;height:auto;display:block"') | |
410 | + }) | |
411 | + } | |
412 | + | |
413 | + var isStart = 0; | |
414 | + var now = ut.gettimestamp(); | |
415 | + | |
416 | + var str = res.data.data.starTime; | |
417 | + var start = Date.parse(new Date(str)); | |
418 | + start = start / 1000; | |
419 | + if (start < now) isStart = 1; | |
420 | + | |
421 | + _this2.setData({ | |
422 | + giftDate: res.data.data.endTime, | |
423 | + giftStart: res.data.data.starTime, | |
424 | + giftPosPrice: res.data.data.oldPrice, | |
425 | + giftQty: res.data.data.giftQty, | |
426 | + giftIntegral: res.data.data.payIntegral, | |
427 | + giftPrice: res.data.data.payMoney, | |
428 | + giftType: res.data.data.actType, | |
429 | + actTitle: res.data.data.actTitle, | |
430 | + wareCard: res.data.data.wareCard, | |
431 | + isStart: isStart, | |
432 | + sele_g: res.data.data | |
433 | + }) | |
434 | + | |
435 | + | |
436 | + var sele_g = res.data.data; | |
437 | + //需不需要门店,不需要门店返回 | |
438 | + if (!sele_g.is_pickup) return false; | |
439 | + | |
440 | + //-- 检测一下有没有门店 -- | |
441 | + _this2.check_guide(function (){ | |
442 | + com.wait_for_store_config(_this2); | |
443 | + com.set_user_mo_store(_this2, os, function () { | |
444 | + if (sele_g.pickup_list && _this2.data.def_pick_store) { | |
445 | + com.check_def_pk(_this2); | |
446 | + } | |
447 | + }); | |
448 | + com.get_sto(_this2, os); | |
449 | + }) | |
450 | + | |
451 | + } else { | |
452 | + getApp().my_warnning(res.data.msg, 0, _this2); | |
453 | + return false; | |
454 | + } | |
455 | + } | |
456 | + }); | |
457 | + | |
458 | + }, | |
459 | + | |
460 | + getZxlbDetails: function () { | |
461 | + | |
462 | + var th = this; | |
463 | + getApp().request.get('/api/weshop/marketing/giftbag/detail/getNew', { | |
464 | + isShowLoading: true, | |
465 | + data: { | |
466 | + "storeId": a.stoid, //商家ID | |
467 | + //"userId": d.user_id, //用户ID | |
468 | + "giftBagId": th.data.lbId | |
469 | + }, | |
470 | + success: function (res) { | |
471 | + if (res.data.code == 0) { | |
472 | + th.setData({ | |
473 | + giftImage: th.data.iurl + res.data.data.lbUrl, | |
474 | + giftImageCover: th.data.iurl + (th.data.params.cover_img ? th.data.params.cover_img: res.data.data.lbUrl), | |
475 | + giftTitle: res.data.data.lbTitle, | |
476 | + default_color: res.data.data.bgcolor | |
477 | + }) | |
478 | + if (res.data.data.lbIntro == '') { | |
479 | + th.setData({ | |
480 | + giftRemark: '暂无详情......' | |
481 | + }) | |
482 | + } else { | |
483 | + th.setData({ | |
484 | + giftRemark: res.data.data.lbIntro.replace(/\<img/gi, '<img style="max-width:100%;height:auto;display:block"') | |
485 | + }) | |
486 | + } | |
487 | + | |
488 | + //---获取日期的时间戳--- | |
489 | + let exchangeType = res.data.data.exchangeType; | |
490 | + let exchangeDay = res.data.data.exchangeDay; | |
491 | + let exchangeStartTime = res.data.data.exchangeStartTime; | |
492 | + let exchangeEndTime = res.data.data.exchangeEndTime; | |
493 | + // let t_endtime; | |
494 | + | |
495 | + if (exchangeType == 2) { | |
496 | + if (exchangeStartTime == 0 || !exchangeStartTime) { | |
497 | + exchangeStartTime = ut.gettimestamp(); | |
498 | + } | |
499 | + exchangeStartTime = ut.formatTime(exchangeStartTime, 0); | |
500 | + exchangeEndTime = ut.formatTime(exchangeEndTime, 0); | |
501 | + } | |
502 | + | |
503 | + | |
504 | + th.setData({ | |
505 | + // giftDate: t_endtime, | |
506 | + giftPosPrice: res.data.data.oldPrice, | |
507 | + giftQty: res.data.data.lbNum, | |
508 | + giftIntegral: res.data.data.exchangeIntegral, | |
509 | + giftPrice: res.data.data.lbPrice, | |
510 | + giftType: res.data.data.actType, | |
511 | + actTitle: res.data.data.actTitle, | |
512 | + wareCard: res.data.data.wareCard, | |
513 | + lbId: res.data.data.lbId, | |
514 | + exchangeType: exchangeType, | |
515 | + exchangeDay: exchangeDay, | |
516 | + exchangeStartTime: exchangeStartTime, | |
517 | + exchangeEndTime: exchangeEndTime, | |
518 | + }) | |
519 | + //判断是否有礼包 | |
520 | + for (var i = 0; i < res.data.data.wareCard.length; i++) { | |
521 | + if (res.data.data.wareCard[i].lbType == 1) { | |
522 | + th.setData({ | |
523 | + is_lb: 1 | |
524 | + }) | |
525 | + break; | |
526 | + } | |
527 | + } | |
528 | + } else { | |
529 | + getApp().my_warnning(res.data.msg, 0, th); | |
530 | + return false; | |
531 | + } | |
532 | + } | |
533 | + }); | |
534 | + | |
535 | + }, | |
536 | + | |
537 | + | |
538 | + //显示核销码 | |
539 | + code_show: function (e) { | |
540 | + var th = this; | |
541 | + //--获取成功的时候-- | |
542 | + var no = th.data.code; | |
543 | + var qc_com = th.selectComponent("#qc_com"); //组件的id | |
544 | + var obj = { | |
545 | + val: no, | |
546 | + content: "请将二维码展示给核销员,收货更快捷" | |
547 | + }; | |
548 | + qc_com.open(obj) | |
549 | + }, | |
550 | + //获取核销码 | |
551 | + getcode: function (e) { | |
552 | + var th = this; | |
553 | + var orderSn = th.data.orderSn; //订单号 | |
554 | + let codeId = e.currentTarget.dataset.codeid; | |
555 | + var json = { | |
556 | + "storeId": a.stoid, | |
557 | + "orderSn": orderSn, | |
558 | + } | |
559 | + if (codeId && codeId !== "") { | |
560 | + json.id = codeId | |
561 | + } | |
562 | + var data = JSON.stringify(json); | |
563 | + var url = th.data.url + "/api/weshop/marketing/gift/goods/verify/code/get"; //预约接口地址 | |
564 | + getApp().request.json_post(url, json, | |
565 | + function (res) { | |
566 | + if (res.data.code == 0) { | |
567 | + th.setData({ | |
568 | + code: res.data.data | |
569 | + }) | |
570 | + th.code_show(); | |
571 | + } else { | |
572 | + getApp().my_warnning(res.data.msg, 0, th); | |
573 | + } | |
574 | + }, | |
575 | + function (res) { | |
576 | + | |
577 | + }, | |
578 | + "put" | |
579 | + ) | |
580 | + | |
581 | + }, | |
582 | + //界面跳转 | |
583 | + goto: function (e) { | |
584 | + var th = this; | |
585 | + var url = e.currentTarget.dataset.url; | |
586 | + getApp().goto(url); | |
587 | + }, | |
588 | + //图片失败,默认图片 | |
589 | + bind_bnerr2: function (e) { | |
590 | + var _errImg = e.target.dataset.errorimg; | |
591 | + var _errObj = {}; | |
592 | + _errObj[_errImg] = "/miniapp/images/giftbag/gift01.png"; | |
593 | + this.setData(_errObj) //注意这里的赋值方式,只是将数据列表中的此项图片路径值替换掉 ; | |
594 | + }, | |
595 | + | |
596 | + //图片失败,默认图片 | |
597 | + bind_bnerr: function (e) { | |
598 | + var _errImg = e.target.dataset.errorimg; | |
599 | + var _errObj = {}; | |
600 | + _errObj[_errImg] = this.data.iurl + "miniapp/images/big_back.jpg"; | |
601 | + this.setData(_errObj) //注意这里的赋值方式,只是将数据列表中的此项图片路径值替换掉 ; | |
602 | + //this.setData({ giftImage: this.data.iurl + "/miniapp/images/giftbag/gift01.png"}); | |
603 | + | |
604 | + }, | |
605 | + | |
606 | + //关闭导航 | |
607 | + close: function () { | |
608 | + var th = this; | |
609 | + var nav_b = th.selectComponent("#nav_b"); //组件的id | |
610 | + nav_b.close_box(); | |
611 | + nav_b.set_name("礼包", "/pages/giftpack/buygiftpack/giftpackbuy"); | |
612 | + }, | |
613 | + | |
614 | + //--- 分享设置 -- | |
615 | + onShareAppMessage: function (e) { | |
616 | + getApp().globalData.no_clear = 1; | |
617 | + var curPage = this; | |
618 | + var pagePath = curPage.route; //当前页面url | |
619 | + if (pagePath.indexOf('/') != 0) { | |
620 | + pagePath = '/' + pagePath; | |
621 | + } | |
622 | + pagePath += "?isBuy=1" + "&lbId=" + this.data.getGiftID + "&first_leader=" + this.data.getUserID; | |
623 | + // if (this.data.isBuy == 0) { | |
624 | + // pagePath += "&orderSn=" + this.data.orderSn; | |
625 | + // } else { | |
626 | + // pagePath += "&lbId=" + this.data.getGiftID; | |
627 | + // } | |
628 | + // console.log('pagePath', pagePath); | |
629 | + return { | |
630 | + title: "礼包详情", | |
631 | + path: pagePath, | |
632 | + } | |
633 | + }, | |
634 | + | |
635 | + /** | |
636 | + * 用户分享朋友圈 | |
637 | + */ | |
638 | + onShareTimeline() { | |
639 | + getApp().globalData.no_clear = 1; | |
640 | + | |
641 | + var pagePath = "&isBuy=1" + "&lbId=" + this.data.lbId + "&first_leader=" + this.data.getUserID; | |
642 | + var user_id = getApp().globalData.user_id; | |
643 | + if (!user_id) user_id = 0; | |
644 | + | |
645 | + return { | |
646 | + title: "礼包详情", | |
647 | + query: 'first_leader=' + user_id + pagePath | |
648 | + } | |
649 | + }, | |
650 | + | |
651 | + //免费领取 | |
652 | + GetFree: function (e) { | |
653 | + var that = this.data; | |
654 | + var th = this; | |
655 | + //如果还没有开始的话 | |
656 | + if (th.data.isStart != 1) { | |
657 | + getApp().my_warnning("活动还没有开始", 0, th); | |
658 | + return false; | |
659 | + } | |
660 | + th.setData({buyType: 3}); | |
661 | + if (th.data.sele_g.is_pickup) { | |
662 | + th.setData({ | |
663 | + openSpecModal: 1 | |
664 | + }) | |
665 | + } else { | |
666 | + // var id = e.currentTarget.dataset.id;//活动id | |
667 | + var my_confirm = th.selectComponent("#my_confirm"); //组件的id | |
668 | + my_confirm.open( | |
669 | + "是否确定领取该礼包", | |
670 | + "取消", | |
671 | + "确定", | |
672 | + function () { | |
673 | + my_confirm.open_cancel(0); | |
674 | + }, | |
675 | + function () { | |
676 | + my_confirm.open_cancel(0); | |
677 | + com.buy_libao(th) | |
678 | + }) | |
679 | + } | |
680 | + | |
681 | + | |
682 | + }, | |
683 | + | |
684 | + | |
685 | + getGift(){ | |
686 | + var that=this; | |
687 | + | |
688 | + var json = { | |
689 | + // "actId": '', //活动Id | |
690 | + // "actType": '', //活动类型 1:新人礼、2:评价有礼、3:节日营销、4:生日营销 | |
691 | + // "buyType":""+that.data.buyType, //1=积分兑换 2=余额购买 | |
692 | + // "giftBagId": id, //每月礼包主表id | |
693 | + // "buyFrom": 2, | |
694 | + "id":that.data.record_list_id,// "记录Id", | |
695 | + "storeId": that.data.getStorageID, //商家Id | |
696 | + "userId": that.data.getUserID, //用户ID | |
697 | + }; | |
698 | + // var url ="/api/weshop/marketing/buy/receive/gift/record/insert"; | |
699 | + // var url ="/api/weshop/marketing/marketingMonthgiftbagRecord/createOrder"; | |
700 | + var url ="/api/weshop/marketing/marketingMonthgiftbagRecord/recordReceive"; | |
701 | + getApp().request.json_post(url, json, | |
702 | + function (res) { | |
703 | + console.log('领取礼包'); | |
704 | + console.log(res); | |
705 | + if (res.data.code == 0 && res.data.data) { | |
706 | + that.setData({ | |
707 | + is_receive:1 | |
708 | + }) | |
709 | + getApp().my_warnning("领取成功!", 1, that); | |
710 | + that.closeSpecModal(); | |
711 | + setTimeout(()=>{ | |
712 | + wx.navigateBack({ | |
713 | + delta: 0, | |
714 | + }) | |
715 | + },500) | |
716 | + } else { | |
717 | + that.setData({submit:0}) | |
718 | + getApp().my_warnning(res.data.msg, 0, that); | |
719 | + } | |
720 | + }, | |
721 | + function (res) { | |
722 | + that.setData({submit:0}) | |
723 | + } | |
724 | + ) | |
725 | + }, | |
726 | + | |
727 | + //--- 设置一下默认库存的数量 ---- | |
728 | + set_def_storage(ee) { | |
729 | + var that = this, th = this; | |
730 | + that.data.fir_def_store = ee; | |
731 | + | |
732 | + that.setData({ | |
733 | + def_pick_store: ee, | |
734 | + sto_sele_name: ee.pickup_name, | |
735 | + sto_sele_id: ee.pickup_id, | |
736 | + sto_sele_distr: ee.distr_type | |
737 | + }) | |
738 | + }, | |
739 | + // 选择门店 | |
740 | + choice_store: function (ee) { | |
741 | + | |
742 | + //--先判断会员状态-- | |
743 | + var user_info = getApp().globalData.userInfo; | |
744 | + if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) { | |
745 | + wx.navigateTo({ | |
746 | + url: '/packageE/pages/togoin/togoin', | |
747 | + }) | |
748 | + return false; | |
749 | + } | |
750 | + | |
751 | + var th = this; | |
752 | + var ind = ee.currentTarget.dataset.ind; | |
753 | + var bconfig = th.data.bconfig; | |
754 | + | |
755 | + //如果开启了,则不在选择门店 | |
756 | + if (this.data.sys_switch.is_pricing_open_store && getApp().globalData.pk_store) { | |
757 | + return false; | |
758 | + } | |
759 | + // if (!th.data.only_pk && !th.data.def_pickpu_list) { | |
760 | + // getApp().confirmBox("门店库存不足", null, 25000, !1); | |
761 | + // return false; | |
762 | + // } | |
763 | + | |
764 | + if (th.data.only_pk && !th.data.only_pk.length) { | |
765 | + getApp().confirmBox("门店库存不足", null, 25000, !1); | |
766 | + return false; | |
767 | + } | |
768 | + if (th.data.def_pickpu_list && !th.data.def_pickpu_list.length) { | |
769 | + getApp().confirmBox("门店库存不足", null, 25000, !1); | |
770 | + return false; | |
771 | + } | |
772 | + | |
773 | + | |
774 | + if (bconfig && bconfig.is_sort_storage) { | |
775 | + wx.getLocation({ | |
776 | + type: 'gcj02', | |
777 | + success: function (res) { | |
778 | + | |
779 | + th.data.lat = res.latitude; | |
780 | + th.data.lon = res.longitude; | |
781 | + th.data.is_get_local_ok = 1; | |
782 | + th.setData({ | |
783 | + is_gps: 1 | |
784 | + }); | |
785 | + //th.onShow(); | |
786 | + com.get_sto(th, os); | |
787 | + }, | |
788 | + fail: function (res) { | |
789 | + //th.onShow(); | |
790 | + th.data.is_get_local_ok = 1; | |
791 | + com.get_sto(th, os); | |
792 | + if (res.errCode == 2) { | |
793 | + th.setData({ | |
794 | + is_gps: 0 | |
795 | + }); | |
796 | + if (th.data.is_gps == 0) { | |
797 | + getApp().confirmBox("请开启GPS定位", null, 25000, !1); | |
798 | + } | |
799 | + } else { | |
800 | + th.setData({ | |
801 | + is_gps: "3" | |
802 | + }); | |
803 | + } | |
804 | + | |
805 | + } | |
806 | + }) | |
807 | + } else { | |
808 | + th.data.is_get_local_ok = 1; | |
809 | + com.get_sto(th, os); | |
810 | + } | |
811 | + | |
812 | + if (ind != undefined && ind != null) { | |
813 | + this.setData({ | |
814 | + open_ind_store: ind, | |
815 | + store: 1, | |
816 | + openSpecModal: !1, | |
817 | + openSpecModal_pt: !1, | |
818 | + openSpecModal_flash_normal: !1, | |
819 | + }) | |
820 | + } else { | |
821 | + this.setData({ | |
822 | + store: 1, | |
823 | + openSpecModal: !1, | |
824 | + openSpecModal_pt: !1, | |
825 | + openSpecModal_flash_normal: !1 | |
826 | + | |
827 | + }) | |
828 | + } | |
829 | + }, | |
830 | + //关闭选择门店 | |
831 | + close_popup: function (e) { | |
832 | + var th = this; | |
833 | + this.setData({ | |
834 | + store: 0, | |
835 | + choice_sort_store: 0, | |
836 | + sort_store: 0, | |
837 | + fir_pick_index: 0, | |
838 | + sec_pick_index: 0 | |
839 | + }) | |
840 | + | |
841 | + var openindstore = this.data.open_ind_store; | |
842 | + if (openindstore == 1) { | |
843 | + th.setData({ | |
844 | + openSpecModal: !0, | |
845 | + openSpecModal_ind: openindstore, | |
846 | + }); | |
847 | + } else if (openindstore == 2) { | |
848 | + th.setData({ | |
849 | + openSpecModal: !0, | |
850 | + openSpecModal_ind: openindstore, | |
851 | + }); | |
852 | + } else if (openindstore == 4) { //4就是拼团 | |
853 | + th.setData({ | |
854 | + openSpecModal_pt: 1, //打开拼团购买界面 | |
855 | + store: 0, //关闭门店 | |
856 | + choice_sort_store: 0, //关闭门店2级 | |
857 | + sort_store: 0, //关闭门店2级 | |
858 | + }); | |
859 | + } else { | |
860 | + th.setData({ | |
861 | + store: 0, | |
862 | + choice_sort_store: 0, | |
863 | + sort_store: 0 | |
864 | + }) | |
865 | + } | |
866 | + | |
867 | + | |
868 | + }, | |
869 | + | |
870 | + //选择更多门店 | |
871 | + more_store: function () { | |
872 | + this.setData({ | |
873 | + sort_store: 1 | |
874 | + }); | |
875 | + }, | |
876 | + // 返回按钮 | |
877 | + returns: function () { | |
878 | + this.setData({ | |
879 | + sort_store: 0, | |
880 | + choice_sort_store: 0 | |
881 | + }); | |
882 | + }, | |
883 | + //---选择分类门店--- | |
884 | + choice_sort_store: function (e) { | |
885 | + var index = e.currentTarget.dataset.index; | |
886 | + var region_name = e.currentTarget.dataset.region; | |
887 | + var item = this.data.all_sto[index]; | |
888 | + this.setData({ | |
889 | + region_name: region_name, | |
890 | + sort_store: 0, | |
891 | + choice_sort_store: 1, | |
892 | + sec_sto: item, | |
893 | + sec_pick_index: 0 | |
894 | + }); | |
895 | + }, | |
896 | + | |
897 | + choose_for_store_fir: function (e) { | |
898 | + var index_c = e.currentTarget.dataset.ind; | |
899 | + var th = this; | |
900 | + th.setData({ | |
901 | + fir_pick_index: index_c | |
902 | + }) | |
903 | + | |
904 | + }, | |
905 | + | |
906 | + //确定def_pick为选择的门店 | |
907 | + sure_pick: function (e) { | |
908 | + var th = this; | |
909 | + var item = null; | |
910 | + var openindstore = th.data.open_ind_store; | |
911 | + | |
912 | + if (th.data.choice_sort_store == 0) { | |
913 | + var index = th.data.fir_pick_index; | |
914 | + if (th.data.is_show_sto_cat == 1) { | |
915 | + item = th.data.def_pickpu_list[index]; | |
916 | + } else { | |
917 | + item = th.data.only_pk?th.data.only_pk[index]:null; //当没有门店分类的时候 | |
918 | + } | |
919 | + | |
920 | + } else { | |
921 | + var index = th.data.sec_pick_index; | |
922 | + item = th.data.sec_sto.s_arr[index]; | |
923 | + } | |
924 | + | |
925 | + if(!item) return false; | |
926 | + | |
927 | + if (!th.data.sele_g) return false; | |
928 | + | |
929 | + th.setData({ | |
930 | + def_pick_store: item, | |
931 | + sto_sele_name: item.pickup_name, | |
932 | + sto_sele_id: item.pickup_id, | |
933 | + sto_sele_distr: item.distr_type, | |
934 | + store: 0, | |
935 | + choice_sort_store: 0, | |
936 | + fir_pick_index: 0, | |
937 | + openSpecModal: !0, | |
938 | + }); | |
939 | + | |
940 | + | |
941 | + }, | |
942 | + //---点击二级之后的选择--- | |
943 | + choose_for_store: function (e) { | |
944 | + var index_c = e.currentTarget.dataset.ind; | |
945 | + var th = this; | |
946 | + th.setData({ | |
947 | + sec_pick_index: index_c, | |
948 | + fir_pick_index: index_c | |
949 | + }) | |
950 | + | |
951 | + }, | |
952 | + //把选择的门店设置成默认的门店def_pick | |
953 | + set_def_pick: function (e) { | |
954 | + var th = this; | |
955 | + var item = null; | |
956 | + if (th.data.choice_sort_store == 0) { | |
957 | + var index = th.data.fir_pick_index; | |
958 | + if (th.data.is_show_sto_cat == 1) { | |
959 | + item = th.data.def_pickpu_list[index]; | |
960 | + } else { | |
961 | + item = th.data.only_pk?th.data.only_pk[index]:null; //当没有门店分类的时候 | |
962 | + } | |
963 | + } else { | |
964 | + var index = th.data.sec_pick_index; | |
965 | + item = th.data.sec_sto.s_arr[index]; | |
966 | + } | |
967 | + | |
968 | + if(!item) return false; | |
969 | + | |
970 | + th.setData({ | |
971 | + def_pick_store: item, | |
972 | + sto_sele_name: item.pickup_name, | |
973 | + sto_sele_id: item.pickup_id, | |
974 | + sto_sele_distr: item.distr_type, | |
975 | + store: 0, | |
976 | + choice_sort_store: 0, | |
977 | + openSpecModal: !0, | |
978 | + }); | |
979 | + | |
980 | + var user_id = getApp().globalData.user_id; | |
981 | + var def_pickup_id = item.pickup_id; | |
982 | + getApp().request.put('/api/weshop/users/update', { | |
983 | + data: { | |
984 | + user_id: user_id, | |
985 | + def_pickup_id: def_pickup_id | |
986 | + }, | |
987 | + success: function (res) { | |
988 | + if (res.data.code == 0) { | |
989 | + if (th.data.choice_sort_store == 0) th.setData({ | |
990 | + fir_pick_index: 0 | |
991 | + }); | |
992 | + getApp().globalData.pk_store = item; | |
993 | + } else { | |
994 | + getApp().my_warnning("设置默认门店地址失败", 0, th) | |
995 | + } | |
996 | + | |
997 | + } | |
998 | + }); | |
999 | + | |
1000 | + | |
1001 | + }, | |
1002 | + closeSpecModal: function () { | |
1003 | + this.setData({openSpecModal: 0}); | |
1004 | + }, | |
1005 | + | |
1006 | + buy_libao: function () { | |
1007 | + com.buy_libao(this) | |
1008 | + }, | |
1009 | + | |
1010 | + | |
1011 | + clickShare() { | |
1012 | + if (!getApp().globalData.user_id) { | |
1013 | + getApp().goto("/packageE/pages/togoin/togoin"); | |
1014 | + return false; | |
1015 | + } | |
1016 | + this.setData({ | |
1017 | + share_hidden: true, | |
1018 | + }); | |
1019 | + }, | |
1020 | + | |
1021 | + send() { | |
1022 | + this.setData({ | |
1023 | + share_hidden: false, | |
1024 | + }); | |
1025 | + }, | |
1026 | + | |
1027 | + cancel() { | |
1028 | + this.setData({ | |
1029 | + share_hidden: false, | |
1030 | + }); | |
1031 | + }, | |
1032 | + | |
1033 | + | |
1034 | + //--定义的保存图片方法,分享团--- | |
1035 | + saveImageToPhotosAlbum: function () { | |
1036 | + //--先判断会员状态-- | |
1037 | + var user_info = getApp().globalData.userInfo; | |
1038 | + if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) { | |
1039 | + //getApp().my_warnning("请先登录",0,this); | |
1040 | + wx.navigateTo({url: '/packageE/pages/togoin/togoin',}) | |
1041 | + return false; | |
1042 | + } | |
1043 | + | |
1044 | + if (this.data.share_hidden) { | |
1045 | + this.setData({share_hidden: false,}); | |
1046 | + } | |
1047 | + | |
1048 | + wx.showLoading({title: '生成中...',}) | |
1049 | + var that = this, th = that; | |
1050 | + //设置画板显示,才能开始绘图 | |
1051 | + that.setData({ | |
1052 | + canvasHidden: false | |
1053 | + }) | |
1054 | + | |
1055 | + var app = getApp(); | |
1056 | + var unit = that.data.screenWidth / 750 * 1.35; //基础单位, | |
1057 | + var scene = th.data.lbId + ""; | |
1058 | + | |
1059 | + var user_id = getApp().globalData.user_id ? getApp().globalData.user_id : 0; | |
1060 | + if (user_id > 0) { | |
1061 | + scene += "_" + user_id; | |
1062 | + } | |
1063 | + ///二微码 | |
1064 | + var path3 = os.url + "/api/wx/open/app/user/getWeAppEwm/" + | |
1065 | + os.stoid + "?sceneValue=" + scene + "&pageValue=pages/giftpack/giftpacklist/giftpacklist"; | |
1066 | + | |
1067 | + // 读取文件成功则OK-- | |
1068 | + wx.getImageInfo({ | |
1069 | + src: path3, | |
1070 | + success: function (res) { | |
1071 | + th.get_goods_temp(function () { | |
1072 | + var vpath = res.path; | |
1073 | + var context = wx.createCanvasContext('share'); | |
1074 | + // let share_goods_img = th.params.cover_img | |
1075 | + th.drawPoster(context, unit, th.data.share_goods_img, vpath, 0); | |
1076 | + | |
1077 | + //把画板内容绘制成图片,并回调 画板图片路径 | |
1078 | + context.draw(false, function () { | |
1079 | + setTimeout(function () { | |
1080 | + wx.canvasToTempFilePath({ | |
1081 | + x: 0, | |
1082 | + y: 0, | |
1083 | + width: 750, | |
1084 | + height: 1217, | |
1085 | + destWidth: 1.2 * 750 * 750 / that.data.screenWidth, | |
1086 | + destHeight: 1.2 * 1217 * 750 / that.data.screenWidth, | |
1087 | + canvasId: 'share', | |
1088 | + success: function (res) { | |
1089 | + | |
1090 | + that.setData({ | |
1091 | + shareImgPath: res.tempFilePath, | |
1092 | + canvasHidden: true | |
1093 | + }) | |
1094 | + | |
1095 | + if (!res.tempFilePath) { | |
1096 | + wx.showModal({ | |
1097 | + title: '提示', | |
1098 | + content: '图片绘制中,请稍后重试', | |
1099 | + showCancel: false | |
1100 | + }) | |
1101 | + return false; | |
1102 | + } | |
1103 | + | |
1104 | + that.setData({ | |
1105 | + showPoster: true, | |
1106 | + }); | |
1107 | + wx.hideLoading(); | |
1108 | + } | |
1109 | + }) | |
1110 | + }, 800) | |
1111 | + | |
1112 | + }); | |
1113 | + }) | |
1114 | + }, | |
1115 | + fail: function (res) { | |
1116 | + console.log(res); | |
1117 | + wx.hideLoading(); | |
1118 | + | |
1119 | + } | |
1120 | + }); | |
1121 | + }, | |
1122 | + | |
1123 | + //-- 小程序绘制海报 -- | |
1124 | + drawPoster(context, unit, img, vpath, type) { | |
1125 | + // 1.灰色背景 | |
1126 | + context.setFillStyle('#f2f1f6'); | |
1127 | + context.rect(0, 0, 554 * unit, 899 * unit); | |
1128 | + context.fill(); | |
1129 | + | |
1130 | + // 2.商城名称 | |
1131 | + let shopName = this.data.sto_sele_name_1; | |
1132 | + context.setTextAlign('center'); | |
1133 | + context.setFontSize(26 * unit); | |
1134 | + context.setFillStyle('black'); | |
1135 | + context.fillText(shopName, 277 * unit, 60 * unit); | |
1136 | + | |
1137 | + // 3.推荐来源 | |
1138 | + let fromText = `来自${getApp().globalData.userInfo.nickname}的推荐`; | |
1139 | + context.setTextAlign('center'); | |
1140 | + context.setFontSize(22 * unit); | |
1141 | + context.setFillStyle('#96959a'); | |
1142 | + context.fillText(fromText, 277 * unit, 105 * unit); | |
1143 | + | |
1144 | + // 4.海报背景 | |
1145 | + context.setFillStyle('white'); | |
1146 | + context.fillRect(37 * unit, 157 * unit, 480 * unit, 673 * unit); | |
1147 | + | |
1148 | + // 5.商品图片 | |
1149 | + // 图片的x坐标 | |
1150 | + let bg_x = 37 * unit | |
1151 | + // 图片的y坐标 | |
1152 | + let bg_y = 157 * unit | |
1153 | + // 图片宽度 | |
1154 | + let bg_w = 480 * unit | |
1155 | + // 图片高度 | |
1156 | + let bg_h = 474 * unit | |
1157 | + // 图片圆角 | |
1158 | + let bg_r = 4 | |
1159 | + // 绘制海报背景图片圆角 | |
1160 | + context.save() | |
1161 | + context.beginPath() | |
1162 | + context.arc(bg_x + bg_r, bg_y + bg_r, bg_r, Math.PI, Math.PI * 1.5) | |
1163 | + context.arc(bg_x + bg_w - bg_r, bg_y + bg_r, bg_r, Math.PI * 1.5, Math.PI * 2) | |
1164 | + context.arc(bg_x + bg_w, bg_y + bg_h, bg_r, 0, Math.PI * 0.5) | |
1165 | + context.arc(bg_x, bg_y + bg_h, 0, Math.PI * 0.5, Math.PI) | |
1166 | + context.clip() | |
1167 | + context.drawImage(img, bg_x, bg_y, bg_w, bg_h); | |
1168 | + context.restore(); | |
1169 | + | |
1170 | + // 6.强烈推荐 | |
1171 | + let src = ''; | |
1172 | + context.beginPath(); | |
1173 | + if (type == 0) { // 普通 | |
1174 | + src = '../../../images/share/q_tj.png'; | |
1175 | + context.drawImage(src, 54 * unit, 648 * unit, 85 * unit, 30 * unit); | |
1176 | + context.setFontSize(16 * unit) | |
1177 | + context.setFillStyle("white") | |
1178 | + context.setTextAlign('left'); | |
1179 | + context.fillText('强烈推荐', 64 * unit, 668 * unit); | |
1180 | + } | |
1181 | + | |
1182 | + | |
1183 | + let price = this.data.giftPrice; | |
1184 | + let giftIntegral = this.data.giftIntegral; | |
1185 | + context.setFontSize(32 * unit); | |
1186 | + context.setFillStyle('#DE1117'); | |
1187 | + | |
1188 | + var price_txt=""; | |
1189 | + if(price || giftIntegral){ | |
1190 | + if(price){ | |
1191 | + price_txt='¥' + price; | |
1192 | + if(giftIntegral) price_txt+='+'; | |
1193 | + } | |
1194 | + if(giftIntegral) price_txt+=giftIntegral+'积分'; | |
1195 | + }else{ | |
1196 | + price_txt="¥0"; | |
1197 | + } | |
1198 | + | |
1199 | + context.fillText(price_txt, 54 * unit, 735 * unit); | |
1200 | + | |
1201 | + | |
1202 | + var wp= 62 * unit; | |
1203 | + var hp=765 * unit | |
1204 | + this.draw_pos_price(context,wp,hp,this.giftPosPrice,unit); | |
1205 | + | |
1206 | + // 8.商品标题 | |
1207 | + context.setFontSize(20 * unit); | |
1208 | + context.setFillStyle('#898989'); | |
1209 | + getApp().draw_Text(context, this.data.giftTitle, 54 * unit, 800 * unit, 240 * unit, 280 * unit, unit, 1); | |
1210 | + | |
1211 | + // 9.小程序码 | |
1212 | + context.drawImage(vpath, 375 * unit, 660 * unit, 120 * unit, 120 * unit); | |
1213 | + context.setFontSize(16 * unit); | |
1214 | + context.setFillStyle('#777'); | |
1215 | + context.fillText('长按识别二维码', 378 * unit, 810 * unit); | |
1216 | + | |
1217 | + // 10.竖线 | |
1218 | + context.beginPath(); | |
1219 | + context.setFillStyle('#eee'); | |
1220 | + context.rect(354 * unit, 670 * unit, 1 * unit, 130 * unit); | |
1221 | + context.fill(); | |
1222 | + }, | |
1223 | + | |
1224 | + | |
1225 | + //---市场价划掉--- | |
1226 | + draw_pos_price(context,w,h,market_price,unit){ | |
1227 | + | |
1228 | + if(!this.is_retail_price) return false; | |
1229 | + | |
1230 | + context.setFillStyle("gray") | |
1231 | + context.setFontSize(22 * unit) | |
1232 | + var pri0 = "¥" + market_price.toFixed(2); | |
1233 | + context.fillText(pri0, w, h); | |
1234 | + | |
1235 | + var c_h=h-6; | |
1236 | + context.setStrokeStyle('gray'); | |
1237 | + context.setLineWidth(1 * unit); | |
1238 | + context.moveTo(w - 5, c_h); | |
1239 | + context.lineTo(w + ut.measureText(pri0, 22 * unit) + 5, c_h); | |
1240 | + context.stroke(); | |
1241 | + | |
1242 | + }, | |
1243 | + | |
1244 | + //--获取商品图片的本地缓存,回调写法-- | |
1245 | + get_goods_temp: function (tt) { | |
1246 | + var ee = this; | |
1247 | + if (ee.data.share_goods_img) { | |
1248 | + tt(); | |
1249 | + return false; | |
1250 | + } | |
1251 | + var img_url = ee.data.giftImageCover ? ee.data.giftImageCover : ee.data.giftImage; | |
1252 | + //获取商品是分享图信息 | |
1253 | + wx.getImageInfo({ | |
1254 | + src: img_url, | |
1255 | + success: function (res) { | |
1256 | + //res.path是网络图片的本地地址 | |
1257 | + ee.data.share_goods_img = res.path; | |
1258 | + tt(); | |
1259 | + }, | |
1260 | + fail: function (res) { | |
1261 | + //获取默认空白图 | |
1262 | + wx.getImageInfo({ | |
1263 | + src: ee.data.iurl+'/miniapp/images/default_g_img.gif', | |
1264 | + success: function(res) { | |
1265 | + ee.data.share_goods_img = res.path; //分享的图片不能用网络的 | |
1266 | + tt(); | |
1267 | + } | |
1268 | + }) | |
1269 | + } | |
1270 | + }); | |
1271 | + }, | |
1272 | + | |
1273 | + closePoster() { | |
1274 | + this.setData({ | |
1275 | + showPoster: false, | |
1276 | + }); | |
1277 | + }, | |
1278 | + // 保存图片到手机 | |
1279 | + savePic() { | |
1280 | + getApp().savePic(this); | |
1281 | + }, | |
1282 | + // 预览海报 | |
1283 | + previewPoster() { | |
1284 | + getApp().globalData.no_clear=1; | |
1285 | + wx.previewImage({ | |
1286 | + current: this.data.shareImgPath, // 当前显示图片的http链接 | |
1287 | + urls: [this.data.shareImgPath] ,// 需要预览的图片http链接列表 | |
1288 | + }); | |
1289 | + }, | |
1290 | + | |
1291 | + | |
1292 | + | |
1293 | +}); | |
0 | 1294 | \ No newline at end of file | ... | ... |
packageE/pages/user/monthgiftbag/giftpackinfo/giftpackinfo.json
0 → 100644
1 | +{ | |
2 | + "navigationBarTitleText": "礼包详情", | |
3 | + "usingComponents": { | |
4 | + "warn": "/components/long_warn/long_warn", | |
5 | + "my_confirm": "/components/my_confirm/my_confirm", | |
6 | + "qr_code": "/components/qr_code/qr_code", | |
7 | + "nav_b": "/components/nav_b/nav_b", | |
8 | + "share": "/components/share/share" | |
9 | + } | |
10 | +} | |
0 | 11 | \ No newline at end of file | ... | ... |
packageE/pages/user/monthgiftbag/giftpackinfo/giftpackinfo.wxml
0 → 100644
1 | +<view class="box data-v-3a5b7e36" style="background-color:{{default_color?default_color:'#e85f93'}};min-height: 100vh;"> | |
2 | + <view class="box_top data-v-3a5b7e36"> | |
3 | + <image src="{{iurl}}{{monthgiftbag.cover_img}}" class="data-v-3a5b7e36" lazy-load="true" binderror="bind_bnerr" data-errorimg="giftImage"></image> | |
4 | + </view> | |
5 | + <view class="box_title data-v-3a5b7e36" > | |
6 | + | |
7 | + <view class="flex ai_c fs28" style="margin-bottom: 20rpx" wx:if="{{isBuy==0 && pick_up}}"> | |
8 | + <image class="stores-img" src="{{iurl}}/miniapp/images/stores.png"></image>{{pick_up.pickup_name}} | |
9 | + </view> | |
10 | + | |
11 | + <view class="top_title data-v-3a5b7e36"> | |
12 | + <text class="data-v-3a5b7e36 ellipsis-2" style="width:90%;">{{monthgiftbag.giftTitle}}</text> | |
13 | + | |
14 | + <!-- 这个是分享按钮 --> | |
15 | + <!-- <view wx:if="{{c_state<2}}" class="xc-share-frame t-c" bindtap="clickShare"> | |
16 | + <view class="iconfont icon-share fs40" ></view> | |
17 | + <view class="fs22 c-7b">分享</view> | |
18 | + </view> --> | |
19 | + | |
20 | + | |
21 | + </view> | |
22 | + <!-- <view class="top_time data-v-3a5b7e36" wx:if="{{!flag}}"> | |
23 | + <block wx:if="{{isBuy==1 && giftTitle && isStart!=1}}" > | |
24 | + <text class="data-v-3a5b7e36"> | |
25 | + {{"活动开始时间:"+giftStart}} | |
26 | + </text> | |
27 | + </block> | |
28 | + | |
29 | + <block wx:else> | |
30 | + <text class="data-v-3a5b7e36" wx:if="{{isBuy==0 && iswarelbtype}}">{{"兑换结束时间:"+giftDate}}</text> | |
31 | + <text class="data-v-3a5b7e36" wx:if="{{flag == 1}}"> | |
32 | + {{"活动结束时间:"+giftDate}} | |
33 | + </text> | |
34 | + </block> | |
35 | + </view> | |
36 | + <view class="top_time data-v-3a5b7e36" wx:if="{{flag == 1 && iswarelbtype}}"> | |
37 | + <text class="data-v-3a5b7e36" wx:if="{{exchangeType == 1}}"> | |
38 | + {{"兑换时间:领取后"+exchangeDay+"天内兑换"}} | |
39 | + </text> | |
40 | + <text class="data-v-3a5b7e36" wx:elif="{{exchangeType == 2}}"> | |
41 | + {{"兑换时间:"+exchangeStartTime+"至"+exchangeEndTime}} | |
42 | + </text> | |
43 | + </view> --> | |
44 | + | |
45 | + <view class="top_price data-v-3a5b7e36"> | |
46 | + | |
47 | + | |
48 | + <block wx:if="{{monthgiftbag.lbPrice>0}}"> | |
49 | + <text class="data-v-3a5b7e36">{{"¥"+monthgiftbag.lbPrice}}</text> | |
50 | + </block> | |
51 | + <block wx:if="{{monthgiftbag.lbPrice>0 && monthgiftbag.payIntegral>0}}"> | |
52 | + <text class="data-v-3a5b7e36">/</text> | |
53 | + </block> | |
54 | + <block wx:if="{{monthgiftbag.payIntegral>0}}"> | |
55 | + <text class="data-v-3a5b7e36">{{monthgiftbag.payIntegral+"积分"}}</text> | |
56 | + </block> | |
57 | + <!-- <block wx:if="{{giftType>0}}"> | |
58 | + <text class="data-v-3a5b7e36">{{actTitle}}</text> | |
59 | + </block> --> | |
60 | + | |
61 | + | |
62 | + | |
63 | + | |
64 | + </view> | |
65 | + <view class="top_foot data-v-3a5b7e36"> | |
66 | + <view class="top_foot_price data-v-3a5b7e36 no_line_x"> | |
67 | + <text class="data-v-3a5b7e36"> {{monthgiftbag.oldPrice?'零售价:':''}}{{monthgiftbag.oldPrice+"元"}}</text> | |
68 | + </view> | |
69 | + <!-- <view class="top_foot_qty data-v-3a5b7e36"> | |
70 | + <text class="data-v-3a5b7e36" wx:if="{{!flag}}">{{"已售:"+giftQty+"件"}}</text> | |
71 | + <text class="data-v-3a5b7e36" wx:elif="{{flag == 1 && giftQty > 0}}">{{"数量:"+giftQty+"件"}}</text> | |
72 | + </view> --> | |
73 | + </view> | |
74 | + </view> | |
75 | + <view class="box_ware data-v-3a5b7e36" wx:if="{{false}}"> | |
76 | + <view class="box_ware_title data-v-3a5b7e36"> | |
77 | + <text class="data-v-3a5b7e36">礼包内容</text> | |
78 | + </view> | |
79 | + <block wx:for="{{wareCard}}" wx:for-item="item" wx:for-index="index" wx:key="Id"> | |
80 | + <view wx:if="{{item.couponName!=undefined}}" class="box_ware_box data-v-3a5b7e36"> | |
81 | + <view class="box_ware_img data-v-3a5b7e36"> | |
82 | + <block wx:if="{{item.lbType==1}}"> | |
83 | + <image src="{{item.wareImage==''?iurl+'/miniapp/images/giftbag/gift01.png':iurl+item.wareImage}}" class="data-v-3a5b7e36" lazy-load="true" binderror="bind_bnerr2" data-errorimg="wareCard[{{index}}].wareImage"></image> | |
84 | + </block> | |
85 | + <block wx:if="{{item.lbType==2}}"> | |
86 | + <image src="{{iurl+'/miniapp/images/giftbag/gift05.png'}}" class="data-v-3a5b7e36" lazy-load="true" binderror="bind_bnerr2" data-errorimg="wareCard[{{index}}].wareImage"></image> | |
87 | + </block> | |
88 | + <block wx:if="{{item.lbType==3}}"> | |
89 | + <image src="{{iurl+'/miniapp/images/giftbag/gift02.png'}}" class="data-v-3a5b7e36" lazy-load="true" binderror="bind_bnerr2" data-errorimg="wareCard[{{index}}].wareImage"></image> | |
90 | + </block> | |
91 | + <block wx:if="{{item.lbType==4}}"> | |
92 | + <image src="{{iurl+'/miniapp/images/giftbag/gift03.png'}}" class="data-v-3a5b7e36" lazy-load="true" binderror="bind_bnerr2" data-errorimg="wareCard[{{index}}].wareImage"></image> | |
93 | + </block> | |
94 | + <block wx:if="{{item.lbType==5}}"> | |
95 | + <image src="{{iurl+'/miniapp/images/giftbag/gift04.png'}}" class="data-v-3a5b7e36" lazy-load="true" binderror="bind_bnerr2" data-errorimg="wareCard[{{index}}].wareImage"></image> | |
96 | + </block> | |
97 | + </view> | |
98 | + <view class="box_ware_item data-v-3a5b7e36"> | |
99 | + <view class="box_ware_item_title data-v-3a5b7e36"> | |
100 | + <text class="data-v-3a5b7e36">{{item.couponName}}</text> | |
101 | + </view> | |
102 | + <view class="box_ware_item_price data-v-3a5b7e36"> | |
103 | + <text class="data-v-3a5b7e36"></text> | |
104 | + </view> | |
105 | + <view class="box_ware_item_qty data-v-3a5b7e36 flex"> | |
106 | + <text class="data-v-3a5b7e36 ellipsis-1"> | |
107 | + {{"数量:"+item.num}} | |
108 | + </text> | |
109 | + <block wx:if="{{isBuy==0 && !flag && item.lbType==1}}"> | |
110 | + <text style="margin-left:10rpx" wx:if="{{item.useState}}"> | |
111 | + 已核销 | |
112 | + </text> | |
113 | + <text style="margin-left:10rpx" wx:else> | |
114 | + 未核销 | |
115 | + </text> | |
116 | + </block> | |
117 | + </view> | |
118 | + | |
119 | + <view class="box_ware_code data-v-3a5b7e36" wx:if="{{!flag}}"> | |
120 | + <!-- <block wx:if="{{c_state==0}}"> --> | |
121 | + | |
122 | + <block wx:if="{{isBuy==0&item.lbType==1}}"> | |
123 | + <image src="{{iurl+'/miniapp/images/giftbag/gift06.png'}}" lazy-load="true" bindtap="getcode" data-codeId="{{item.Id}}" class="data-v-3a5b7e36"></image> | |
124 | + </block> | |
125 | + | |
126 | + <block wx:if="{{isBuy==0&item.lbType==2}}"> | |
127 | + <image src="{{iurl+'/miniapp/images/giftbag/gift06.png'}}" class="data-v-3a5b7e36" lazy-load="true" data-url="/packageD/pages/user/coupons/coupons" bindtap="goto"></image> | |
128 | + </block> | |
129 | + <block wx:if="{{isBuy==0&item.lbType==3}}"> | |
130 | + <image src="{{iurl+'/miniapp/images/giftbag/gift06.png'}}" class="data-v-3a5b7e36" lazy-load="true" data-url="/pages/user/my_service/i_service" bindtap="goto"></image> | |
131 | + </block> | |
132 | + <block wx:if="{{isBuy==0&item.lbType>3}}"> | |
133 | + <text class="data-v-3a5b7e36">奖励已发放</text> | |
134 | + </block> | |
135 | + </view> | |
136 | + </view> | |
137 | + </view> | |
138 | + </block> | |
139 | + </view> | |
140 | + <view class="foot_box data-v-3a5b7e36"> | |
141 | + <view class="foot_box_title data-v-3a5b7e36"> | |
142 | + <text class="data-v-3a5b7e36">活动说明</text> | |
143 | + </view> | |
144 | + <view class="foot_box_remark data-v-3a5b7e36"> | |
145 | + <rich-text nodes="{{monthgiftbag.remark}}" style="word-break:break-all;word-wrap:break-word"></rich-text> | |
146 | + </view> | |
147 | + </view> | |
148 | + | |
149 | + | |
150 | + <view class="foot_empty data-v-3a5b7e36"></view> | |
151 | + | |
152 | + <block wx:if="{{flag != 1}}"> | |
153 | + <block wx:if="{{isBuy==1 && monthgiftbag.giftTitle}}"> | |
154 | + <block wx:if="{{isStart==1}}"> | |
155 | + <view class="foot_button data-v-3a5b7e36"> | |
156 | + <block wx:if="{{monthgiftbag.lbPrice>0 && monthgiftbag.payIntegral>0}}"> | |
157 | + <view class="foot_button_left data-v-3a5b7e36 " data-money="{{monthgiftbag.lbPrice}}" data-id="{{lbId}}" bindtap="GetBuyPrice"> | |
158 | + <text class="data-v-3a5b7e36 ">立即购买</text> | |
159 | + </view> | |
160 | + <view class="foot_button_right data-v-3a5b7e36 " bindtap="GetBuyIntegral" data-id="{{lbId}}"> | |
161 | + <text class="data-v-3a5b7e36">立即兑换</text> | |
162 | + </view> | |
163 | + </block> | |
164 | + <block wx:if="{{monthgiftbag.lbPrice>0 && monthgiftbag.payIntegral<=0}}"> | |
165 | + <view class="foot_button_buy data-v-3a5b7e36 " data-money="{{monthgiftbag.lbPrice}}" bindtap="GetBuyPrice" data-id="{{lbId}}"> | |
166 | + <text class="data-v-3a5b7e36">立即购买</text> | |
167 | + </view> | |
168 | + </block> | |
169 | + <block wx:if="{{monthgiftbag.lbPrice<=0 && monthgiftbag.payIntegral>0}}"> | |
170 | + <view class="foot_button_intalge data-v-3a5b7e36 " bindtap="GetBuyIntegral" data-id="{{lbId}}"> | |
171 | + <text class="data-v-3a5b7e36">立即兑换</text> | |
172 | + </view> | |
173 | + </block> | |
174 | + <!-- <block > | |
175 | + <view class="foot_button_intalge data-v-3a5b7e36 " wx:if="{{!is_receive}}" bindtap="getGift" data-id="{{lbId}}"> | |
176 | + <text class="data-v-3a5b7e36">领取</text> | |
177 | + </view> | |
178 | + <view class="foot_button_intalge data-v-3a5b7e36 " wx:if="{{is_receive}}" data-id="{{lbId}}"> | |
179 | + <text class="data-v-3a5b7e36">已领取</text> | |
180 | + </view> | |
181 | + </block> --> | |
182 | + </view> | |
183 | + </block> | |
184 | + <block wx:else> | |
185 | + <view class="foot_button data-v-3a5b7e36"> | |
186 | + <view class="foot_button_intalge data-v-3a5b7e36 gray "> | |
187 | + <text class="data-v-3a5b7e36">活动还未开始</text> | |
188 | + </view> | |
189 | + </view> | |
190 | + </block> | |
191 | + | |
192 | + </block> | |
193 | + <block wx:if="{{isBuy==0}}"> | |
194 | + <view class="foot_button data-v-3a5b7e36"> | |
195 | + <block wx:if="{{is_lb!=1}}"> | |
196 | + <view class="foot_button_buy data-v-3a5b7e36 overdue"> | |
197 | + <text class="data-v-3a5b7e36">无核销商品</text> | |
198 | + </view> | |
199 | + </block> | |
200 | + <block wx:else> | |
201 | + <view wx:if="{{c_state==-1}}" class="foot_button_buy data-v-3a5b7e36 overdue" > | |
202 | + <text class="data-v-3a5b7e36">兑换未开始</text> | |
203 | + </view> | |
204 | + <view wx:if="{{c_state==0}}" class="foot_button_buy data-v-3a5b7e36" bindtap="getcode"> | |
205 | + <text class="data-v-3a5b7e36">立即使用</text> | |
206 | + </view> | |
207 | + <view wx:if="{{c_state==1}}" class="foot_button_buy data-v-3a5b7e36 overdue" bindtap="getcode"> | |
208 | + <text class="data-v-3a5b7e36">商品已核销</text> | |
209 | + </view> | |
210 | + <view wx:if="{{c_state==2}}" class="foot_button_buy data-v-3a5b7e36 overdue"> | |
211 | + <text class="data-v-3a5b7e36">商品兑换时间已过</text> | |
212 | + </view> | |
213 | + </block> | |
214 | + </view> | |
215 | + </block> | |
216 | + </block> | |
217 | + | |
218 | +</view> | |
219 | +<!-- 引入提示组件 --> | |
220 | +<warn id="warn"></warn> | |
221 | +<my_confirm id="my_confirm"></my_confirm> | |
222 | +<!-- 弹出框扫描 --> | |
223 | +<qr_code id="qc_com"></qr_code> | |
224 | +<!-- 制作一个圆球导航 --> | |
225 | +<nav_b id="nav_b"></nav_b> | |
226 | + | |
227 | +<include src="../public/buy_com.wxml"></include> | |
228 | +<canvas canvas-id='share' style='width:750rpx;height:1217rpx;background-color:white;' wx:if="{{!canvasHidden}}"></canvas> | |
229 | +<share id="share_button" bind:send="send" bind:cancel="cancel" bind:share_img="saveImageToPhotosAlbum" wx:if="{{share_hidden}}"></share> | |
230 | + | |
231 | + | |
232 | +<view wx:if="{{showPoster}}"> | |
233 | + <view class="mask" catchtap="closePoster"></view> | |
234 | + <view class="poster-container"> | |
235 | + <view class="poster-wrapper"> | |
236 | + <view class="poster" bindtap="previewPoster"> | |
237 | + <!-- <view class="poster" bindtap="previewImage"> --> | |
238 | + <image src="{{shareImgPath}}" class="poster-img"></image> | |
239 | + <view class="btn-close" catchtap="closePoster"> | |
240 | + <text class="iconfont icon-close"></text> | |
241 | + </view> | |
242 | + </view> | |
243 | + <view class="btn-container"> | |
244 | + <!-- <button class="btn-share" open-type="share" bindtap="">微信好友分享</button> --> | |
245 | + <button class="btn-share" bindtap="savePic">保存到相册</button> | |
246 | + </view> | |
247 | + </view> | |
248 | + </view> | |
249 | +</view> | |
0 | 250 | \ No newline at end of file | ... | ... |
packageE/pages/user/monthgiftbag/giftpackinfo/giftpackinfo.wxss
0 → 100644
1 | +@charset "UTF-8"; | |
2 | +@import '../giftpackbuy/goodsInfo.wxss'; | |
3 | + | |
4 | +.box.data-v-3a5b7e36 { | |
5 | + -webkit-align-content: center; | |
6 | + align-content: center; | |
7 | + background-color: #e85f93; | |
8 | +} | |
9 | + | |
10 | +.box_top.data-v-3a5b7e36 { | |
11 | + width: 100%; | |
12 | +} | |
13 | + | |
14 | +.box_top image.data-v-3a5b7e36 { | |
15 | + width: 100%; | |
16 | + max-height: 540rpx; | |
17 | +} | |
18 | + | |
19 | +.box_title.data-v-3a5b7e36 { | |
20 | + margin: 10rpx 20rpx 20rpx 20rpx; | |
21 | + padding: 35rpx; | |
22 | + background-color: #fff; | |
23 | + border-radius: 40rpx; | |
24 | +} | |
25 | + | |
26 | +.top_title.data-v-3a5b7e36 { | |
27 | + font-size: 30rpx; | |
28 | + margin-bottom: 10rpx; | |
29 | + position: relative; | |
30 | +} | |
31 | + | |
32 | +.top_time.data-v-3a5b7e36 { | |
33 | + font-size: 27rpx; | |
34 | + color: #b9b5b5; | |
35 | +} | |
36 | + | |
37 | +.top_price.data-v-3a5b7e36 { | |
38 | + font-size: 35rpx; | |
39 | + color: #d61b30; | |
40 | + margin-top: 30rpx; | |
41 | + margin-bottom: 5rpx; | |
42 | + position: relative; | |
43 | +} | |
44 | + | |
45 | +.top_foot.data-v-3a5b7e36 { | |
46 | + display: -webkit-box; | |
47 | + display: -webkit-flex; | |
48 | + display: flex; | |
49 | +} | |
50 | + | |
51 | +.top_foot_price.data-v-3a5b7e36 { | |
52 | + font-size: 22rpx; | |
53 | + color: #b9b5b5; | |
54 | + width: 50%; | |
55 | + text-decoration: line-through; | |
56 | +} | |
57 | + | |
58 | +.top_foot_qty.data-v-3a5b7e36 { | |
59 | + font-size: 22rpx; | |
60 | + color: #b9b5b5; | |
61 | + width: 50%; | |
62 | + -webkit-align-content: flex-end; | |
63 | + align-content: flex-end; | |
64 | + text-align: right; | |
65 | +} | |
66 | + | |
67 | +.box_ware.data-v-3a5b7e36 { | |
68 | + margin: 10rpx 20rpx 20rpx 20rpx; | |
69 | + padding: 35rpx; | |
70 | + background-color: #fff; | |
71 | + border-radius: 40rpx; | |
72 | +} | |
73 | + | |
74 | +.box_ware_title.data-v-3a5b7e36 { | |
75 | + font-size: 35rpx; | |
76 | + margin: 5rpx 0rpx 30rpx 0rpx; | |
77 | +} | |
78 | + | |
79 | +.box_ware_box.data-v-3a5b7e36 { | |
80 | + display: -webkit-box; | |
81 | + display: -webkit-flex; | |
82 | + display: flex; | |
83 | + margin: 10rpx 0rpx 25rpx 0rpx; | |
84 | +} | |
85 | + | |
86 | +/* .box_ware_img.data-v-3a5b7e36 { | |
87 | + width: 30%; | |
88 | + height: 180rpx; | |
89 | + border: #999999 solid 1rpx; | |
90 | +} */ | |
91 | + | |
92 | +.box_ware_img image.data-v-3a5b7e36 { | |
93 | + /* width: 185rpx; | |
94 | + height: 190rpx; *//* background-color: rgba(138, 138, 138, 0.63); */ | |
95 | + border: 2rpx solid #999; | |
96 | + width: 120rpx; | |
97 | + height: 120rpx; | |
98 | + background-color: #f8f8f8; | |
99 | +} | |
100 | + | |
101 | +.box_ware_item.data-v-3a5b7e36 { | |
102 | + width: 70%; | |
103 | + margin-left: 25rpx; | |
104 | + position: relative; | |
105 | +} | |
106 | + | |
107 | +.box_ware_item_title.data-v-3a5b7e36 { | |
108 | + font-size: 24rpx; | |
109 | + word-break: break-all; | |
110 | + text-overflow: ellipsis; | |
111 | + display: -webkit-box; | |
112 | + -webkit-box-orient: vertical; | |
113 | + -webkit-line-clamp: 2; | |
114 | + overflow: hidden; | |
115 | +} | |
116 | + | |
117 | +.box_ware_count.data-v-3a5b7e36 { | |
118 | + display: -webkit-box; | |
119 | + display: -webkit-flex; | |
120 | + display: flex; | |
121 | +} | |
122 | + | |
123 | +.box_ware_item_price.data-v-3a5b7e36 { | |
124 | + font-size: 25rpx; | |
125 | + color: #b9b5b5; | |
126 | + position: absolute; | |
127 | + bottom: 60rpx; | |
128 | + left: 0; | |
129 | +} | |
130 | + | |
131 | +.box_ware_item_qty.data-v-3a5b7e36 { | |
132 | + font-size: 22rpx; | |
133 | + position: absolute; | |
134 | + bottom: 15rpx; | |
135 | + left: 0; | |
136 | +} | |
137 | + | |
138 | +.box_ware_code.data-v-3a5b7e36 { | |
139 | + position: absolute; | |
140 | + right: 10rpx; | |
141 | + bottom: 10rpx; | |
142 | +} | |
143 | + | |
144 | +.box_ware_code image.data-v-3a5b7e36 { | |
145 | + width: 50rpx; | |
146 | + height: 50rpx; | |
147 | +} | |
148 | + | |
149 | +.box_ware_code text.data-v-3a5b7e36 { | |
150 | + font-size: 20rpx; | |
151 | +} | |
152 | + | |
153 | +.foot_box.data-v-3a5b7e36 { | |
154 | + margin: 10rpx 20rpx 50rpx 20rpx; | |
155 | + padding: 35rpx; | |
156 | + background-color: #fff; | |
157 | + border-radius: 40rpx; | |
158 | +} | |
159 | + | |
160 | +.foot_box_title.data-v-3a5b7e36 { | |
161 | + font-size: 35rpx; | |
162 | + margin-bottom: 30rpx; | |
163 | +} | |
164 | + | |
165 | +.foot_box_remark.data-v-3a5b7e36 { | |
166 | + font-size: 27rpx; | |
167 | + line-height: 40rpx; | |
168 | +} | |
169 | + | |
170 | +.foot_empty.data-v-3a5b7e36 { | |
171 | + height: 90rpx; | |
172 | +} | |
173 | + | |
174 | +.foot_button.data-v-3a5b7e36 { | |
175 | + display: -webkit-box; | |
176 | + display: -webkit-flex; | |
177 | + display: flex; | |
178 | + margin: 20rpx 0rpx 0rpx 0rpx; | |
179 | + padding: 25rpx 0rpx; | |
180 | + background: #fff; | |
181 | + text-align: center; | |
182 | + -webkit-box-pack: center; | |
183 | + -webkit-justify-content: center; | |
184 | + justify-content: center; | |
185 | + position: fixed; | |
186 | + bottom: 0; | |
187 | + left: 0; | |
188 | + width: 100%; | |
189 | +} | |
190 | + | |
191 | +.foot_button_left.data-v-3a5b7e36 { | |
192 | + background: #e4010c; | |
193 | + color: #fff; | |
194 | + width: 250rpx; | |
195 | + height: 70rpx; | |
196 | + font-size: 28rpx; | |
197 | + line-height: 70rpx; | |
198 | + border-radius: 40rpx; | |
199 | + margin-right: 20rpx; | |
200 | +} | |
201 | + | |
202 | +.foot_button_right.data-v-3a5b7e36 { | |
203 | + background: #ffbb42; | |
204 | + color: #fff; | |
205 | + width: 250rpx; | |
206 | + height: 70rpx; | |
207 | + font-size: 28rpx; | |
208 | + line-height: 70rpx; | |
209 | + border-radius: 40rpx; | |
210 | +} | |
211 | + | |
212 | +.foot_button_buy.data-v-3a5b7e36 { | |
213 | + background: #e4010c; | |
214 | + color: #fff; | |
215 | + width: 400rpx; | |
216 | + height: 70rpx; | |
217 | + font-size: 28rpx; | |
218 | + line-height: 70rpx; | |
219 | + border-radius: 40rpx; | |
220 | +} | |
221 | + | |
222 | +.foot_button_intalge.data-v-3a5b7e36 { | |
223 | + background: #ffbb42; | |
224 | + color: #fff; | |
225 | + width: 400rpx; | |
226 | + height: 70rpx; | |
227 | + font-size: 28rpx; | |
228 | + line-height: 70rpx; | |
229 | + border-radius: 40rpx; | |
230 | +} | |
231 | + | |
232 | +page.data-v-3a5b7e36 { | |
233 | + background-color: #e85f93; | |
234 | +} | |
235 | + | |
236 | +.foot_box_remark.data-v-3a5b7e36 ._img { | |
237 | + width: 100%; | |
238 | +} | |
239 | + | |
240 | +.foot_box_remark.data-v-3a5b7e36 .img { | |
241 | + line-height: 0; | |
242 | +} | |
243 | +.overdue.data-v-3a5b7e36{ | |
244 | + background-color: rgb(153,153,153); | |
245 | +} | |
246 | + | |
247 | +.foot_button_intalge.data-v-3a5b7e36.gray{ background-color: #aaa; } | |
248 | + | |
249 | +.xc-share-frame { | |
250 | + position: absolute; right:0; top: -10rpx; | |
251 | +} | |
252 | + | ... | ... |
packageE/pages/user/monthgiftbag/giftpacklist/giftpacklist.js
0 → 100644
1 | +var e = getApp(), | |
2 | + a = e.globalData.setting, | |
3 | + os = a, | |
4 | + t = e.request, | |
5 | + d = e.globalData; | |
6 | +var ut = require("../../../../../utils/util.js"); | |
7 | +var com = require("../public/buy_com.js"); | |
8 | + | |
9 | +Page({ | |
10 | + data: { | |
11 | + url: a.url, //接口网址 | |
12 | + iurl: a.imghost, //图片前缀网址 | |
13 | + isBuy: 0, | |
14 | + getGiftID: '', //礼包id | |
15 | + giftImage: '', | |
16 | + giftTitle: '', | |
17 | + giftDate: '', | |
18 | + giftPrice: '', | |
19 | + giftIntegral: '', | |
20 | + giftPosPrice: '', | |
21 | + giftQty: '', | |
22 | + giftRemark: '', | |
23 | + giftType: '', | |
24 | + actTitle: '', | |
25 | + getUrl: '', | |
26 | + wareCard: [], | |
27 | + orderSn: "", //订单编号 | |
28 | + lbId: "", | |
29 | + code: "", //核销码 | |
30 | + c_state: "0", //判断是否已经使用, 0正常 1已使用 2已过期 | |
31 | + is_lb: 0, //是否有礼包 | |
32 | + default_color: null, | |
33 | + first_leader: e.globalData.first_leader || 0, // 推荐人ID | |
34 | + | |
35 | + //门店相关 | |
36 | + ismend: 0, | |
37 | + is_sec_mend: 0, | |
38 | + sto_sele_name: "", //选中的门店名称 | |
39 | + sto_sele_id: "", //选中的门店id | |
40 | + sto_sele_distr: "", //选择的门店的配送方式 | |
41 | + is_show_sto_cat: 1, //是否显示门店分类 | |
42 | + only_pk: null, | |
43 | + all_sto: null, | |
44 | + sec_sto: null, //选择了的门店分类 | |
45 | + pickpu_list: null, //读出的所有门店list | |
46 | + def_pickpu_list: null, //一开始5个门店list | |
47 | + sec_pick_index: 0, //第二级门店选择ID | |
48 | + fir_pick_index: 0, //第一级门店选择ID | |
49 | + all_pick_list: null,//所有的门店先记录起来 | |
50 | + | |
51 | + select_store: 0, //选择更多 | |
52 | + index: 1, | |
53 | + more_store: 0, //选择门店 | |
54 | + sort_store: 0, //门店分类 | |
55 | + choice_sort_store: 0, //选择分类门店 | |
56 | + new_user: 0, //新用户 | |
57 | + | |
58 | + def_pick_store: null, // 默认的门店 | |
59 | + fir_def_store: null, //客户默认的门店的 | |
60 | + lat: null, //维度 | |
61 | + lon: null, //经度 | |
62 | + | |
63 | + is_get_local_ok: 0, //获取坐标是否完成 | |
64 | + region_name: "门店分类", //区域的名字 | |
65 | + is_gps: 1, | |
66 | + open_ind_store: 0, //哪里打开的门店列表的控制属性 | |
67 | + default_store: {}, //创建添加默认门店地址的对象 | |
68 | + | |
69 | + store: 0, | |
70 | + openSpecModal: 0, | |
71 | + | |
72 | + sto_sele_name_1: '', | |
73 | + share_goods_img:'', //礼包的分享图 | |
74 | + giftImageCover:null, | |
75 | + canvasHidden:true, | |
76 | + is_receive:1, //是否已经领取 | |
77 | + screenWidth: 0, | |
78 | + | |
79 | + }, | |
80 | + onLoad: function (options) { | |
81 | + | |
82 | + var th = this; | |
83 | + | |
84 | + this.setData({ | |
85 | + params: options, | |
86 | + }) | |
87 | + | |
88 | + getApp().getConfig(function (e) { | |
89 | + th.setData({sto_sele_name_1: e.store_name}) | |
90 | + }) | |
91 | + | |
92 | + getApp().getConfig2(function (e) { | |
93 | + var json_d = JSON.parse(e.switch_list); | |
94 | + th.setData({ | |
95 | + bconfig: e, | |
96 | + sys_switch: json_d, | |
97 | + is_retail_price: json_d.is_retail_price || 0 | |
98 | + }); | |
99 | + }) | |
100 | + | |
101 | + //获取用户设备信息,屏幕宽度 | |
102 | + wx.getSystemInfo({ | |
103 | + success: res => { | |
104 | + th.setData({ | |
105 | + screenWidth: res.screenWidth | |
106 | + }) | |
107 | + } | |
108 | + }); | |
109 | + | |
110 | + }, | |
111 | + init() { | |
112 | + let options = this.data?.params; // this.data == null ? undefined:this.data.params | |
113 | + var th = this; | |
114 | + this.setData({ | |
115 | + getUserID: d.user_id, | |
116 | + getStorageID: a.stoid, | |
117 | + }) | |
118 | + | |
119 | + if(!options.lbId && options.scene){ | |
120 | + var gid_str = decodeURIComponent(options.scene); | |
121 | + gid_str = gid_str.split("_"); | |
122 | + | |
123 | + options.lbId=gid_str[0]; | |
124 | + options.first_leader=gid_str[1]; | |
125 | + options.isBuy=1; | |
126 | + } | |
127 | + | |
128 | + | |
129 | + this.setData({ | |
130 | + isBuy: options.isBuy, | |
131 | + getGiftID: options.lbId, | |
132 | + orderSn: options.orderSn, | |
133 | + flag: options.flag, // 如果从商品详情页的促销处点击专享礼包跳转到此页,则flag为1 | |
134 | + record_list_id:options.record_list_id, | |
135 | + is_receive:options.is_receive | |
136 | + }) | |
137 | + if (options.lbId) th.data.lbId = options.lbId; | |
138 | + //-- 获取分享人的ID -- | |
139 | + var first_leader = options.first_leader || getApp().globalData.first_leader; | |
140 | + if (first_leader) { | |
141 | + this.setData({ | |
142 | + first_leader, | |
143 | + }) | |
144 | + //-- user_id代过来免登录 -- | |
145 | + getApp().globalData.first_leader = first_leader; | |
146 | + //调用接口判断是不是会员 | |
147 | + getApp().request.promiseGet("/api/weshop/shoppingGuide/get/" + os.stoid + "/" + first_leader, {}).then(res => { | |
148 | + if (res.data.code == 0) { | |
149 | + getApp().globalData.guide_id = res.data.data.id; | |
150 | + getApp().globalData.guide_pick_id= res.data.data.pickup_id | |
151 | + } | |
152 | + }) | |
153 | + } | |
154 | + th.close(); | |
155 | + | |
156 | + | |
157 | + if (this.data.flag == 1) { | |
158 | + this.getZxlbDetails(); | |
159 | + } else { | |
160 | + if (this.data.isBuy == 0) { | |
161 | + this.GetMyGiftList(); | |
162 | + } else if (this.data.isBuy == 1) { | |
163 | + this.GetBuyGiftList(); | |
164 | + } | |
165 | + | |
166 | + } | |
167 | + | |
168 | + }, | |
169 | + | |
170 | + onShow: function () { | |
171 | + getApp().check_can_share(); | |
172 | + getApp().is_Single_page(this, function () { | |
173 | + //--先判断会员状态-- | |
174 | + var user_info = getApp().globalData.userInfo; | |
175 | + if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) { | |
176 | + getApp().goto('/packageE/pages/togoin/togoin'); | |
177 | + return false; | |
178 | + } | |
179 | + this.init(); | |
180 | + }) | |
181 | + }, | |
182 | + GetBuyPrice: function (e) { | |
183 | + var that = this.data; | |
184 | + var th = this; | |
185 | + //如果还没有开始的话 | |
186 | + if (th.data.isStart != 1) { | |
187 | + getApp().my_warnning("活动还没有开始", 0, th); | |
188 | + return false; | |
189 | + } | |
190 | + | |
191 | + this.data.payMoney = th.data.sele_g.payMoney; | |
192 | + th.setData({buyType: 2}) | |
193 | + if (th.data.sele_g.is_pickup) { | |
194 | + th.setData({ | |
195 | + openSpecModal: 1 | |
196 | + }) | |
197 | + } else { | |
198 | + var my_confirm = th.selectComponent("#my_confirm"); //组件的id | |
199 | + my_confirm.open( | |
200 | + "是否确定购买该礼包", | |
201 | + "取消", | |
202 | + "确定", | |
203 | + function () { | |
204 | + my_confirm.open_cancel(0); | |
205 | + }, | |
206 | + function () { | |
207 | + my_confirm.open_cancel(0); | |
208 | + com.buy_libao(th) | |
209 | + } | |
210 | + ) | |
211 | + } | |
212 | + | |
213 | + | |
214 | + }, | |
215 | + GetBuyIntegral: function (e) { | |
216 | + var that = this.data; | |
217 | + var th = this; | |
218 | + | |
219 | + //如果还没有开始的话 | |
220 | + if (th.data.isStart != 1) { | |
221 | + getApp().my_warnning("活动还没有开始", 0, th); | |
222 | + return false; | |
223 | + } | |
224 | + | |
225 | + th.setData({buyType: 1}); | |
226 | + if (th.data.sele_g.is_pickup) { | |
227 | + th.setData({ | |
228 | + openSpecModal: 1 | |
229 | + }) | |
230 | + } else { | |
231 | + var my_confirm = th.selectComponent("#my_confirm"); //组件的id | |
232 | + my_confirm.open( | |
233 | + "是否确定兑换该礼包", | |
234 | + "取消", | |
235 | + "确定", | |
236 | + function () { | |
237 | + my_confirm.open_cancel(0); | |
238 | + }, | |
239 | + function () { | |
240 | + my_confirm.open_cancel(0); | |
241 | + com.buy_libao(th) | |
242 | + }) | |
243 | + } | |
244 | + | |
245 | + | |
246 | + }, | |
247 | + | |
248 | + GetMyGiftList: function () { | |
249 | + var _this = this; | |
250 | + var th = this; | |
251 | + getApp().request.get('/api/weshop/marketing/my/giftbag/detail/get', { | |
252 | + isShowLoading: true, | |
253 | + data: { | |
254 | + "storeId": a.stoid, //商家ID | |
255 | + "userId": d.user_id, //用户ID | |
256 | + "orderSn": th.data.orderSn | |
257 | + }, | |
258 | + success: function (res) { | |
259 | + if (res.data.code == 0) { | |
260 | + console.log('商品------++') | |
261 | + console.log(res) | |
262 | + th.setData({ | |
263 | + giftImage: th.data.iurl + res.data.data.lbUrl, | |
264 | + giftImageCover: th.data.iurl + (th.data.params.cover_img ? th.data.params.cover_img: res.data.data.lbUrl), | |
265 | + giftTitle: res.data.data.giftTitle, | |
266 | + default_color: res.data.data.bgcolor | |
267 | + }) | |
268 | + | |
269 | + if (res.data.data.iswarelbtype == 1) { | |
270 | + th.setData({iswarelbtype: 1}) | |
271 | + } | |
272 | + | |
273 | + if (!res.data.data.giftRemark || res.data.data.giftRemark == '') { | |
274 | + th.setData({ | |
275 | + giftRemark: '暂无详情......' | |
276 | + }) | |
277 | + } else { | |
278 | + th.setData({ | |
279 | + giftRemark: res.data.data.giftRemark.replace(/\<img/gi, '<img style="max-width:100%;height:auto;display:block"') | |
280 | + }) | |
281 | + } | |
282 | + | |
283 | + //---获取日期的时间戳--- | |
284 | + var t_endtime = res.data.data.endTime; | |
285 | + t_endtime = t_endtime.replace(/-/g, '/'); | |
286 | + var t_date = new Date(t_endtime) / 1000; | |
287 | + var t_now = ut.gettimestamp(); | |
288 | + | |
289 | + var t_starttime = res.data.data.starTime; | |
290 | + t_starttime = t_starttime.replace(/-/g, '/'); | |
291 | + var t_sdate = new Date(t_starttime) / 1000; | |
292 | + | |
293 | + if (res.data.data.goodsUseState) th.setData({ | |
294 | + c_state: 1 | |
295 | + }) | |
296 | + else if (t_date <= t_now) | |
297 | + th.setData({ | |
298 | + c_state: 2 | |
299 | + }) | |
300 | + else if (t_sdate > t_now) | |
301 | + th.setData({ | |
302 | + c_state: -1 | |
303 | + }) | |
304 | + th.setData({ | |
305 | + giftDate: res.data.data.endTime, | |
306 | + giftPosPrice: res.data.data.giftPosPrice, | |
307 | + giftQty: res.data.data.giftQty, | |
308 | + giftIntegral: res.data.data.payIntegral, | |
309 | + giftPrice: res.data.data.payMoney, | |
310 | + giftType: res.data.data.actType, | |
311 | + actTitle: res.data.data.actTitle, | |
312 | + wareCard: res.data.data.wareCard, | |
313 | + lbId: res.data.data.lbId | |
314 | + }) | |
315 | + //判断是否有礼包 | |
316 | + for (var i = 0; i < res.data.data.wareCard.length; i++) { | |
317 | + if (res.data.data.wareCard[i].lbType == 1) { | |
318 | + th.setData({ | |
319 | + is_lb: 1 | |
320 | + }) | |
321 | + break; | |
322 | + } | |
323 | + } | |
324 | + | |
325 | + if (res.data.data.pickup_id) { | |
326 | + getApp().request.get("/api/weshop/pickup/get/" + os.stoid + "/" + res.data.data.pickup_id, { | |
327 | + success: function (res) { | |
328 | + if (res.data.code == 0) { | |
329 | + th.setData({pick_up: res.data.data}); | |
330 | + } | |
331 | + } | |
332 | + }); | |
333 | + | |
334 | + } | |
335 | + | |
336 | + | |
337 | + } else { | |
338 | + getApp().my_warnning(res.data.msg, 0, th); | |
339 | + return false; | |
340 | + } | |
341 | + } | |
342 | + }); | |
343 | + | |
344 | + }, | |
345 | + | |
346 | + check_guide(func){ | |
347 | + var first_leader=this.data.first_leader; | |
348 | + if(!first_leader){ | |
349 | + func(); | |
350 | + return false; | |
351 | + } | |
352 | + if(this.data.is_geted_guide_pick){ | |
353 | + func(); | |
354 | + return false; | |
355 | + } | |
356 | + if(getApp().globalData.guide_pick_id){ | |
357 | + func(); | |
358 | + return false; | |
359 | + } | |
360 | + var th=this; | |
361 | + getApp().request.promiseGet("/api/weshop/shoppingGuide/get/" + os.stoid + "/" + first_leader, {}).then(res => { | |
362 | + if (res.data.code == 0) { | |
363 | + getApp().globalData.guide_pick_id= res.data.data.pickup_id; | |
364 | + } | |
365 | + th.data.is_geted_guide_pick=1; | |
366 | + func(); | |
367 | + }) | |
368 | + }, | |
369 | + | |
370 | + GetBuyGiftList: function () { | |
371 | + var _this2 = this; | |
372 | + var th = this.data; | |
373 | + let url='/api/weshop/marketing/giftbag/detail/getNew' | |
374 | + let data={ | |
375 | + "storeId": a.stoid, //商家ID | |
376 | + "userId": d.user_id, //用户ID | |
377 | + } | |
378 | + // if (th.orderSn) { | |
379 | + // url='/api/weshop/marketing/my/giftbag/detail/get' | |
380 | + // data.orderSn=th.orderSn | |
381 | + // }else{ | |
382 | + // data.giftBagId=th.getGiftID | |
383 | + // } | |
384 | + data.giftBagId=th.getGiftID | |
385 | + getApp().request.get(url, { | |
386 | + isShowLoading: true, | |
387 | + data:data, | |
388 | + success: function success(res) { | |
389 | + if (res.data.code == 0) { | |
390 | + _this2.setData({ | |
391 | + giftImage: th.iurl + res.data.data.lbUrl, | |
392 | + giftImageCover: th.iurl + (_this2.data.params.cover_img ? _this2.data.params.cover_img: res.data.data.lbUrl), | |
393 | + // giftTitle: res.data.data.giftTitle, | |
394 | + giftTitle: res.data.data.lbTitle, | |
395 | + default_color: res.data.data.bgcolor | |
396 | + }) | |
397 | + if (!res.data.data.giftRemark) { | |
398 | + _this2.setData({ | |
399 | + giftRemark: '暂无详情......' | |
400 | + }) | |
401 | + } else { | |
402 | + _this2.setData({ | |
403 | + giftRemark: res.data.data.giftRemark.replace(/\<img/gi, '<img style="max-width:100%;height:auto;display:block"') | |
404 | + }) | |
405 | + } | |
406 | + | |
407 | + var isStart = 0; | |
408 | + var now = ut.gettimestamp(); | |
409 | + | |
410 | + var str = res.data.data.starTime; | |
411 | + var start = Date.parse(new Date(str)); | |
412 | + start = start / 1000; | |
413 | + if (start < now) isStart = 1; | |
414 | + | |
415 | + _this2.setData({ | |
416 | + giftDate: res.data.data.endTime, | |
417 | + giftStart: res.data.data.starTime, | |
418 | + giftPosPrice: res.data.data.oldPrice, | |
419 | + giftQty: res.data.data.giftQty, | |
420 | + giftIntegral: res.data.data.payIntegral, | |
421 | + giftPrice: res.data.data.payMoney, | |
422 | + giftType: res.data.data.actType, | |
423 | + actTitle: res.data.data.actTitle, | |
424 | + wareCard: res.data.data.wareCard, | |
425 | + isStart: isStart, | |
426 | + sele_g: res.data.data | |
427 | + }) | |
428 | + | |
429 | + | |
430 | + var sele_g = res.data.data; | |
431 | + //需不需要门店,不需要门店返回 | |
432 | + if (!sele_g.is_pickup) return false; | |
433 | + | |
434 | + //-- 检测一下有没有门店 -- | |
435 | + _this2.check_guide(function (){ | |
436 | + com.wait_for_store_config(_this2); | |
437 | + com.set_user_mo_store(_this2, os, function () { | |
438 | + if (sele_g.pickup_list && _this2.data.def_pick_store) { | |
439 | + com.check_def_pk(_this2); | |
440 | + } | |
441 | + }); | |
442 | + com.get_sto(_this2, os); | |
443 | + }) | |
444 | + | |
445 | + } else { | |
446 | + getApp().my_warnning(res.data.msg, 0, _this2); | |
447 | + return false; | |
448 | + } | |
449 | + } | |
450 | + }); | |
451 | + | |
452 | + }, | |
453 | + | |
454 | + getZxlbDetails: function () { | |
455 | + | |
456 | + var th = this; | |
457 | + getApp().request.get('/api/weshop/marketing/giftbag/detail/getNew', { | |
458 | + isShowLoading: true, | |
459 | + data: { | |
460 | + "storeId": a.stoid, //商家ID | |
461 | + //"userId": d.user_id, //用户ID | |
462 | + "giftBagId": th.data.lbId | |
463 | + }, | |
464 | + success: function (res) { | |
465 | + if (res.data.code == 0) { | |
466 | + th.setData({ | |
467 | + giftImage: th.data.iurl + res.data.data.lbUrl, | |
468 | + giftImageCover: th.data.iurl + (th.data.params.cover_img ? th.data.params.cover_img: res.data.data.lbUrl), | |
469 | + giftTitle: res.data.data.lbTitle, | |
470 | + default_color: res.data.data.bgcolor | |
471 | + }) | |
472 | + if (res.data.data.lbIntro == '') { | |
473 | + th.setData({ | |
474 | + giftRemark: '暂无详情......' | |
475 | + }) | |
476 | + } else { | |
477 | + th.setData({ | |
478 | + giftRemark: res.data.data.lbIntro.replace(/\<img/gi, '<img style="max-width:100%;height:auto;display:block"') | |
479 | + }) | |
480 | + } | |
481 | + | |
482 | + //---获取日期的时间戳--- | |
483 | + let exchangeType = res.data.data.exchangeType; | |
484 | + let exchangeDay = res.data.data.exchangeDay; | |
485 | + let exchangeStartTime = res.data.data.exchangeStartTime; | |
486 | + let exchangeEndTime = res.data.data.exchangeEndTime; | |
487 | + // let t_endtime; | |
488 | + | |
489 | + if (exchangeType == 2) { | |
490 | + if (exchangeStartTime == 0 || !exchangeStartTime) { | |
491 | + exchangeStartTime = ut.gettimestamp(); | |
492 | + } | |
493 | + exchangeStartTime = ut.formatTime(exchangeStartTime, 0); | |
494 | + exchangeEndTime = ut.formatTime(exchangeEndTime, 0); | |
495 | + } | |
496 | + | |
497 | + | |
498 | + th.setData({ | |
499 | + // giftDate: t_endtime, | |
500 | + giftPosPrice: res.data.data.oldPrice, | |
501 | + giftQty: res.data.data.lbNum, | |
502 | + giftIntegral: res.data.data.exchangeIntegral, | |
503 | + giftPrice: res.data.data.lbPrice, | |
504 | + giftType: res.data.data.actType, | |
505 | + actTitle: res.data.data.actTitle, | |
506 | + wareCard: res.data.data.wareCard, | |
507 | + lbId: res.data.data.lbId, | |
508 | + exchangeType: exchangeType, | |
509 | + exchangeDay: exchangeDay, | |
510 | + exchangeStartTime: exchangeStartTime, | |
511 | + exchangeEndTime: exchangeEndTime, | |
512 | + }) | |
513 | + //判断是否有礼包 | |
514 | + for (var i = 0; i < res.data.data.wareCard.length; i++) { | |
515 | + if (res.data.data.wareCard[i].lbType == 1) { | |
516 | + th.setData({ | |
517 | + is_lb: 1 | |
518 | + }) | |
519 | + break; | |
520 | + } | |
521 | + } | |
522 | + } else { | |
523 | + getApp().my_warnning(res.data.msg, 0, th); | |
524 | + return false; | |
525 | + } | |
526 | + } | |
527 | + }); | |
528 | + | |
529 | + }, | |
530 | + | |
531 | + | |
532 | + //显示核销码 | |
533 | + code_show: function (e) { | |
534 | + var th = this; | |
535 | + //--获取成功的时候-- | |
536 | + var no = th.data.code; | |
537 | + var qc_com = th.selectComponent("#qc_com"); //组件的id | |
538 | + var obj = { | |
539 | + val: no, | |
540 | + content: "请将二维码展示给核销员,收货更快捷" | |
541 | + }; | |
542 | + qc_com.open(obj) | |
543 | + }, | |
544 | + //获取核销码 | |
545 | + getcode: function (e) { | |
546 | + var th = this; | |
547 | + var orderSn = th.data.orderSn; //订单号 | |
548 | + let codeId = e.currentTarget.dataset.codeid; | |
549 | + var json = { | |
550 | + "storeId": a.stoid, | |
551 | + "orderSn": orderSn, | |
552 | + } | |
553 | + if (codeId && codeId !== "") { | |
554 | + json.id = codeId | |
555 | + } | |
556 | + var data = JSON.stringify(json); | |
557 | + var url = th.data.url + "/api/weshop/marketing/gift/goods/verify/code/get"; //预约接口地址 | |
558 | + getApp().request.json_post(url, json, | |
559 | + function (res) { | |
560 | + if (res.data.code == 0) { | |
561 | + th.setData({ | |
562 | + code: res.data.data | |
563 | + }) | |
564 | + th.code_show(); | |
565 | + } else { | |
566 | + getApp().my_warnning(res.data.msg, 0, th); | |
567 | + } | |
568 | + }, | |
569 | + function (res) { | |
570 | + | |
571 | + }, | |
572 | + "put" | |
573 | + ) | |
574 | + | |
575 | + }, | |
576 | + //界面跳转 | |
577 | + goto: function (e) { | |
578 | + var th = this; | |
579 | + var url = e.currentTarget.dataset.url; | |
580 | + getApp().goto(url); | |
581 | + }, | |
582 | + //图片失败,默认图片 | |
583 | + bind_bnerr2: function (e) { | |
584 | + var _errImg = e.target.dataset.errorimg; | |
585 | + var _errObj = {}; | |
586 | + _errObj[_errImg] = "/miniapp/images/giftbag/gift01.png"; | |
587 | + this.setData(_errObj) //注意这里的赋值方式,只是将数据列表中的此项图片路径值替换掉 ; | |
588 | + }, | |
589 | + | |
590 | + //图片失败,默认图片 | |
591 | + bind_bnerr: function (e) { | |
592 | + var _errImg = e.target.dataset.errorimg; | |
593 | + var _errObj = {}; | |
594 | + _errObj[_errImg] = this.data.iurl + "miniapp/images/big_back.jpg"; | |
595 | + this.setData(_errObj) //注意这里的赋值方式,只是将数据列表中的此项图片路径值替换掉 ; | |
596 | + //this.setData({ giftImage: this.data.iurl + "/miniapp/images/giftbag/gift01.png"}); | |
597 | + | |
598 | + }, | |
599 | + | |
600 | + //关闭导航 | |
601 | + close: function () { | |
602 | + var th = this; | |
603 | + var nav_b = th.selectComponent("#nav_b"); //组件的id | |
604 | + nav_b.close_box(); | |
605 | + nav_b.set_name("礼包", "/pages/giftpack/buygiftpack/giftpackbuy"); | |
606 | + }, | |
607 | + | |
608 | + //--- 分享设置 -- | |
609 | + onShareAppMessage: function (e) { | |
610 | + getApp().globalData.no_clear = 1; | |
611 | + var curPage = this; | |
612 | + var pagePath = curPage.route; //当前页面url | |
613 | + if (pagePath.indexOf('/') != 0) { | |
614 | + pagePath = '/' + pagePath; | |
615 | + } | |
616 | + pagePath += "?isBuy=1" + "&lbId=" + this.data.getGiftID + "&first_leader=" + this.data.getUserID; | |
617 | + // if (this.data.isBuy == 0) { | |
618 | + // pagePath += "&orderSn=" + this.data.orderSn; | |
619 | + // } else { | |
620 | + // pagePath += "&lbId=" + this.data.getGiftID; | |
621 | + // } | |
622 | + // console.log('pagePath', pagePath); | |
623 | + return { | |
624 | + title: "礼包详情", | |
625 | + path: pagePath, | |
626 | + } | |
627 | + }, | |
628 | + | |
629 | + /** | |
630 | + * 用户分享朋友圈 | |
631 | + */ | |
632 | + onShareTimeline() { | |
633 | + getApp().globalData.no_clear = 1; | |
634 | + | |
635 | + var pagePath = "&isBuy=1" + "&lbId=" + this.data.lbId + "&first_leader=" + this.data.getUserID; | |
636 | + var user_id = getApp().globalData.user_id; | |
637 | + if (!user_id) user_id = 0; | |
638 | + | |
639 | + return { | |
640 | + title: "礼包详情", | |
641 | + query: 'first_leader=' + user_id + pagePath | |
642 | + } | |
643 | + }, | |
644 | + | |
645 | + //免费领取 | |
646 | + GetFree: function (e) { | |
647 | + var that = this.data; | |
648 | + var th = this; | |
649 | + //如果还没有开始的话 | |
650 | + if (th.data.isStart != 1) { | |
651 | + getApp().my_warnning("活动还没有开始", 0, th); | |
652 | + return false; | |
653 | + } | |
654 | + th.setData({buyType: 3}); | |
655 | + if (th.data.sele_g.is_pickup) { | |
656 | + th.setData({ | |
657 | + openSpecModal: 1 | |
658 | + }) | |
659 | + } else { | |
660 | + // var id = e.currentTarget.dataset.id;//活动id | |
661 | + var my_confirm = th.selectComponent("#my_confirm"); //组件的id | |
662 | + my_confirm.open( | |
663 | + "是否确定领取该礼包", | |
664 | + "取消", | |
665 | + "确定", | |
666 | + function () { | |
667 | + my_confirm.open_cancel(0); | |
668 | + }, | |
669 | + function () { | |
670 | + my_confirm.open_cancel(0); | |
671 | + com.buy_libao(th) | |
672 | + }) | |
673 | + } | |
674 | + | |
675 | + | |
676 | + }, | |
677 | + | |
678 | + | |
679 | + getGift(){ | |
680 | + var that=this; | |
681 | + | |
682 | + var json = { | |
683 | + // "actId": '', //活动Id | |
684 | + // "actType": '', //活动类型 1:新人礼、2:评价有礼、3:节日营销、4:生日营销 | |
685 | + // "buyType":""+that.data.buyType, //1=积分兑换 2=余额购买 | |
686 | + // "giftBagId": id, //每月礼包主表id | |
687 | + // "buyFrom": 2, | |
688 | + "id":that.data.record_list_id,// "记录Id", | |
689 | + "storeId": that.data.getStorageID, //商家Id | |
690 | + "userId": that.data.getUserID, //用户ID | |
691 | + }; | |
692 | + // var url ="/api/weshop/marketing/buy/receive/gift/record/insert"; | |
693 | + // var url ="/api/weshop/marketing/marketingMonthgiftbagRecord/createOrder"; | |
694 | + var url ="/api/weshop/marketing/marketingMonthgiftbagRecord/recordReceive"; | |
695 | + getApp().request.json_post(url, json, | |
696 | + function (res) { | |
697 | + console.log('领取礼包'); | |
698 | + console.log(res); | |
699 | + if (res.data.code == 0 && res.data.data) { | |
700 | + that.setData({ | |
701 | + is_receive:1 | |
702 | + }) | |
703 | + getApp().my_warnning("领取成功!", 1, that); | |
704 | + that.closeSpecModal(); | |
705 | + setTimeout(()=>{ | |
706 | + wx.navigateBack({ | |
707 | + delta: 0, | |
708 | + }) | |
709 | + },500) | |
710 | + } else { | |
711 | + that.setData({submit:0}) | |
712 | + getApp().my_warnning(res.data.msg, 0, that); | |
713 | + } | |
714 | + }, | |
715 | + function (res) { | |
716 | + that.setData({submit:0}) | |
717 | + } | |
718 | + ) | |
719 | + }, | |
720 | + | |
721 | + //--- 设置一下默认库存的数量 ---- | |
722 | + set_def_storage(ee) { | |
723 | + var that = this, th = this; | |
724 | + that.data.fir_def_store = ee; | |
725 | + | |
726 | + that.setData({ | |
727 | + def_pick_store: ee, | |
728 | + sto_sele_name: ee.pickup_name, | |
729 | + sto_sele_id: ee.pickup_id, | |
730 | + sto_sele_distr: ee.distr_type | |
731 | + }) | |
732 | + }, | |
733 | + // 选择门店 | |
734 | + choice_store: function (ee) { | |
735 | + | |
736 | + //--先判断会员状态-- | |
737 | + var user_info = getApp().globalData.userInfo; | |
738 | + if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) { | |
739 | + wx.navigateTo({ | |
740 | + url: '/packageE/pages/togoin/togoin', | |
741 | + }) | |
742 | + return false; | |
743 | + } | |
744 | + | |
745 | + var th = this; | |
746 | + var ind = ee.currentTarget.dataset.ind; | |
747 | + var bconfig = th.data.bconfig; | |
748 | + | |
749 | + //如果开启了,则不在选择门店 | |
750 | + if (this.data.sys_switch.is_pricing_open_store && getApp().globalData.pk_store) { | |
751 | + return false; | |
752 | + } | |
753 | + if (!th.data.only_pk && !th.data.def_pickpu_list) { | |
754 | + getApp().confirmBox("门店库存不足", null, 25000, !1); | |
755 | + return false; | |
756 | + } | |
757 | + | |
758 | + if (th.data.only_pk && !th.data.only_pk.length) { | |
759 | + getApp().confirmBox("门店库存不足", null, 25000, !1); | |
760 | + return false; | |
761 | + } | |
762 | + if (th.data.def_pickpu_list && !th.data.def_pickpu_list.length) { | |
763 | + getApp().confirmBox("门店库存不足", null, 25000, !1); | |
764 | + return false; | |
765 | + } | |
766 | + | |
767 | + | |
768 | + if (bconfig && bconfig.is_sort_storage) { | |
769 | + wx.getLocation({ | |
770 | + type: 'gcj02', | |
771 | + success: function (res) { | |
772 | + | |
773 | + th.data.lat = res.latitude; | |
774 | + th.data.lon = res.longitude; | |
775 | + th.data.is_get_local_ok = 1; | |
776 | + th.setData({ | |
777 | + is_gps: 1 | |
778 | + }); | |
779 | + //th.onShow(); | |
780 | + com.get_sto(th, os); | |
781 | + }, | |
782 | + fail: function (res) { | |
783 | + //th.onShow(); | |
784 | + th.data.is_get_local_ok = 1; | |
785 | + com.get_sto(th, os); | |
786 | + if (res.errCode == 2) { | |
787 | + th.setData({ | |
788 | + is_gps: 0 | |
789 | + }); | |
790 | + if (th.data.is_gps == 0) { | |
791 | + getApp().confirmBox("请开启GPS定位", null, 25000, !1); | |
792 | + } | |
793 | + } else { | |
794 | + th.setData({ | |
795 | + is_gps: "3" | |
796 | + }); | |
797 | + } | |
798 | + | |
799 | + } | |
800 | + }) | |
801 | + } else { | |
802 | + th.data.is_get_local_ok = 1; | |
803 | + com.get_sto(th, os); | |
804 | + } | |
805 | + | |
806 | + if (ind != undefined && ind != null) { | |
807 | + this.setData({ | |
808 | + open_ind_store: ind, | |
809 | + store: 1, | |
810 | + openSpecModal: !1, | |
811 | + openSpecModal_pt: !1, | |
812 | + openSpecModal_flash_normal: !1, | |
813 | + }) | |
814 | + } else { | |
815 | + this.setData({ | |
816 | + store: 1, | |
817 | + openSpecModal: !1, | |
818 | + openSpecModal_pt: !1, | |
819 | + openSpecModal_flash_normal: !1 | |
820 | + | |
821 | + }) | |
822 | + } | |
823 | + }, | |
824 | + //关闭选择门店 | |
825 | + close_popup: function (e) { | |
826 | + var th = this; | |
827 | + this.setData({ | |
828 | + store: 0, | |
829 | + choice_sort_store: 0, | |
830 | + sort_store: 0, | |
831 | + fir_pick_index: 0, | |
832 | + sec_pick_index: 0 | |
833 | + }) | |
834 | + | |
835 | + var openindstore = this.data.open_ind_store; | |
836 | + if (openindstore == 1) { | |
837 | + th.setData({ | |
838 | + openSpecModal: !0, | |
839 | + openSpecModal_ind: openindstore, | |
840 | + }); | |
841 | + } else if (openindstore == 2) { | |
842 | + th.setData({ | |
843 | + openSpecModal: !0, | |
844 | + openSpecModal_ind: openindstore, | |
845 | + }); | |
846 | + } else if (openindstore == 4) { //4就是拼团 | |
847 | + th.setData({ | |
848 | + openSpecModal_pt: 1, //打开拼团购买界面 | |
849 | + store: 0, //关闭门店 | |
850 | + choice_sort_store: 0, //关闭门店2级 | |
851 | + sort_store: 0, //关闭门店2级 | |
852 | + }); | |
853 | + } else { | |
854 | + th.setData({ | |
855 | + store: 0, | |
856 | + choice_sort_store: 0, | |
857 | + sort_store: 0 | |
858 | + }) | |
859 | + } | |
860 | + | |
861 | + | |
862 | + }, | |
863 | + | |
864 | + //选择更多门店 | |
865 | + more_store: function () { | |
866 | + this.setData({ | |
867 | + sort_store: 1 | |
868 | + }); | |
869 | + }, | |
870 | + // 返回按钮 | |
871 | + returns: function () { | |
872 | + this.setData({ | |
873 | + sort_store: 0, | |
874 | + choice_sort_store: 0 | |
875 | + }); | |
876 | + }, | |
877 | + //---选择分类门店--- | |
878 | + choice_sort_store: function (e) { | |
879 | + var index = e.currentTarget.dataset.index; | |
880 | + var region_name = e.currentTarget.dataset.region; | |
881 | + var item = this.data.all_sto[index]; | |
882 | + this.setData({ | |
883 | + region_name: region_name, | |
884 | + sort_store: 0, | |
885 | + choice_sort_store: 1, | |
886 | + sec_sto: item, | |
887 | + sec_pick_index: 0 | |
888 | + }); | |
889 | + }, | |
890 | + | |
891 | + choose_for_store_fir: function (e) { | |
892 | + var index_c = e.currentTarget.dataset.ind; | |
893 | + var th = this; | |
894 | + th.setData({ | |
895 | + fir_pick_index: index_c | |
896 | + }) | |
897 | + | |
898 | + }, | |
899 | + | |
900 | + //确定def_pick为选择的门店 | |
901 | + sure_pick: function (e) { | |
902 | + var th = this; | |
903 | + var item = null; | |
904 | + var openindstore = th.data.open_ind_store; | |
905 | + | |
906 | + if (th.data.choice_sort_store == 0) { | |
907 | + var index = th.data.fir_pick_index; | |
908 | + if (th.data.is_show_sto_cat == 1) { | |
909 | + item = th.data.def_pickpu_list[index]; | |
910 | + } else { | |
911 | + item = th.data.only_pk?th.data.only_pk[index]:null; //当没有门店分类的时候 | |
912 | + } | |
913 | + | |
914 | + } else { | |
915 | + var index = th.data.sec_pick_index; | |
916 | + item = th.data.sec_sto.s_arr[index]; | |
917 | + } | |
918 | + | |
919 | + if(!item) return false; | |
920 | + | |
921 | + if (!th.data.sele_g) return false; | |
922 | + | |
923 | + th.setData({ | |
924 | + def_pick_store: item, | |
925 | + sto_sele_name: item.pickup_name, | |
926 | + sto_sele_id: item.pickup_id, | |
927 | + sto_sele_distr: item.distr_type, | |
928 | + store: 0, | |
929 | + choice_sort_store: 0, | |
930 | + fir_pick_index: 0, | |
931 | + openSpecModal: !0, | |
932 | + }); | |
933 | + | |
934 | + | |
935 | + }, | |
936 | + //---点击二级之后的选择--- | |
937 | + choose_for_store: function (e) { | |
938 | + var index_c = e.currentTarget.dataset.ind; | |
939 | + var th = this; | |
940 | + th.setData({ | |
941 | + sec_pick_index: index_c, | |
942 | + fir_pick_index: index_c | |
943 | + }) | |
944 | + | |
945 | + }, | |
946 | + //把选择的门店设置成默认的门店def_pick | |
947 | + set_def_pick: function (e) { | |
948 | + var th = this; | |
949 | + var item = null; | |
950 | + if (th.data.choice_sort_store == 0) { | |
951 | + var index = th.data.fir_pick_index; | |
952 | + if (th.data.is_show_sto_cat == 1) { | |
953 | + item = th.data.def_pickpu_list[index]; | |
954 | + } else { | |
955 | + item = th.data.only_pk?th.data.only_pk[index]:null; //当没有门店分类的时候 | |
956 | + } | |
957 | + } else { | |
958 | + var index = th.data.sec_pick_index; | |
959 | + item = th.data.sec_sto.s_arr[index]; | |
960 | + } | |
961 | + | |
962 | + if(!item) return false; | |
963 | + | |
964 | + th.setData({ | |
965 | + def_pick_store: item, | |
966 | + sto_sele_name: item.pickup_name, | |
967 | + sto_sele_id: item.pickup_id, | |
968 | + sto_sele_distr: item.distr_type, | |
969 | + store: 0, | |
970 | + choice_sort_store: 0, | |
971 | + openSpecModal: !0, | |
972 | + }); | |
973 | + | |
974 | + var user_id = getApp().globalData.user_id; | |
975 | + var def_pickup_id = item.pickup_id; | |
976 | + getApp().request.put('/api/weshop/users/update', { | |
977 | + data: { | |
978 | + user_id: user_id, | |
979 | + def_pickup_id: def_pickup_id | |
980 | + }, | |
981 | + success: function (res) { | |
982 | + if (res.data.code == 0) { | |
983 | + if (th.data.choice_sort_store == 0) th.setData({ | |
984 | + fir_pick_index: 0 | |
985 | + }); | |
986 | + getApp().globalData.pk_store = item; | |
987 | + } else { | |
988 | + getApp().my_warnning("设置默认门店地址失败", 0, th) | |
989 | + } | |
990 | + | |
991 | + } | |
992 | + }); | |
993 | + | |
994 | + | |
995 | + }, | |
996 | + closeSpecModal: function () { | |
997 | + this.setData({openSpecModal: 0}); | |
998 | + }, | |
999 | + | |
1000 | + buy_libao: function () { | |
1001 | + com.buy_libao(this) | |
1002 | + }, | |
1003 | + | |
1004 | + | |
1005 | + clickShare() { | |
1006 | + if (!getApp().globalData.user_id) { | |
1007 | + getApp().goto("/packageE/pages/togoin/togoin"); | |
1008 | + return false; | |
1009 | + } | |
1010 | + this.setData({ | |
1011 | + share_hidden: true, | |
1012 | + }); | |
1013 | + }, | |
1014 | + | |
1015 | + send() { | |
1016 | + this.setData({ | |
1017 | + share_hidden: false, | |
1018 | + }); | |
1019 | + }, | |
1020 | + | |
1021 | + cancel() { | |
1022 | + this.setData({ | |
1023 | + share_hidden: false, | |
1024 | + }); | |
1025 | + }, | |
1026 | + | |
1027 | + | |
1028 | + //--定义的保存图片方法,分享团--- | |
1029 | + saveImageToPhotosAlbum: function () { | |
1030 | + //--先判断会员状态-- | |
1031 | + var user_info = getApp().globalData.userInfo; | |
1032 | + if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) { | |
1033 | + //getApp().my_warnning("请先登录",0,this); | |
1034 | + wx.navigateTo({url: '/packageE/pages/togoin/togoin',}) | |
1035 | + return false; | |
1036 | + } | |
1037 | + | |
1038 | + if (this.data.share_hidden) { | |
1039 | + this.setData({share_hidden: false,}); | |
1040 | + } | |
1041 | + | |
1042 | + wx.showLoading({title: '生成中...',}) | |
1043 | + var that = this, th = that; | |
1044 | + //设置画板显示,才能开始绘图 | |
1045 | + that.setData({ | |
1046 | + canvasHidden: false | |
1047 | + }) | |
1048 | + | |
1049 | + var app = getApp(); | |
1050 | + var unit = that.data.screenWidth / 750 * 1.35; //基础单位, | |
1051 | + var scene = th.data.lbId + ""; | |
1052 | + | |
1053 | + var user_id = getApp().globalData.user_id ? getApp().globalData.user_id : 0; | |
1054 | + if (user_id > 0) { | |
1055 | + scene += "_" + user_id; | |
1056 | + } | |
1057 | + ///二微码 | |
1058 | + var path3 = os.url + "/api/wx/open/app/user/getWeAppEwm/" + | |
1059 | + os.stoid + "?sceneValue=" + scene + "&pageValue=pages/giftpack/giftpacklist/giftpacklist"; | |
1060 | + | |
1061 | + // 读取文件成功则OK-- | |
1062 | + wx.getImageInfo({ | |
1063 | + src: path3, | |
1064 | + success: function (res) { | |
1065 | + th.get_goods_temp(function () { | |
1066 | + var vpath = res.path; | |
1067 | + var context = wx.createCanvasContext('share'); | |
1068 | + // let share_goods_img = th.params.cover_img | |
1069 | + th.drawPoster(context, unit, th.data.share_goods_img, vpath, 0); | |
1070 | + | |
1071 | + //把画板内容绘制成图片,并回调 画板图片路径 | |
1072 | + context.draw(false, function () { | |
1073 | + setTimeout(function () { | |
1074 | + wx.canvasToTempFilePath({ | |
1075 | + x: 0, | |
1076 | + y: 0, | |
1077 | + width: 750, | |
1078 | + height: 1217, | |
1079 | + destWidth: 1.2 * 750 * 750 / that.data.screenWidth, | |
1080 | + destHeight: 1.2 * 1217 * 750 / that.data.screenWidth, | |
1081 | + canvasId: 'share', | |
1082 | + success: function (res) { | |
1083 | + | |
1084 | + that.setData({ | |
1085 | + shareImgPath: res.tempFilePath, | |
1086 | + canvasHidden: true | |
1087 | + }) | |
1088 | + | |
1089 | + if (!res.tempFilePath) { | |
1090 | + wx.showModal({ | |
1091 | + title: '提示', | |
1092 | + content: '图片绘制中,请稍后重试', | |
1093 | + showCancel: false | |
1094 | + }) | |
1095 | + return false; | |
1096 | + } | |
1097 | + | |
1098 | + that.setData({ | |
1099 | + showPoster: true, | |
1100 | + }); | |
1101 | + wx.hideLoading(); | |
1102 | + } | |
1103 | + }) | |
1104 | + }, 800) | |
1105 | + | |
1106 | + }); | |
1107 | + }) | |
1108 | + }, | |
1109 | + fail: function (res) { | |
1110 | + console.log(res); | |
1111 | + wx.hideLoading(); | |
1112 | + | |
1113 | + } | |
1114 | + }); | |
1115 | + }, | |
1116 | + | |
1117 | + //-- 小程序绘制海报 -- | |
1118 | + drawPoster(context, unit, img, vpath, type) { | |
1119 | + // 1.灰色背景 | |
1120 | + context.setFillStyle('#f2f1f6'); | |
1121 | + context.rect(0, 0, 554 * unit, 899 * unit); | |
1122 | + context.fill(); | |
1123 | + | |
1124 | + // 2.商城名称 | |
1125 | + let shopName = this.data.sto_sele_name_1; | |
1126 | + context.setTextAlign('center'); | |
1127 | + context.setFontSize(26 * unit); | |
1128 | + context.setFillStyle('black'); | |
1129 | + context.fillText(shopName, 277 * unit, 60 * unit); | |
1130 | + | |
1131 | + // 3.推荐来源 | |
1132 | + let fromText = `来自${getApp().globalData.userInfo.nickname}的推荐`; | |
1133 | + context.setTextAlign('center'); | |
1134 | + context.setFontSize(22 * unit); | |
1135 | + context.setFillStyle('#96959a'); | |
1136 | + context.fillText(fromText, 277 * unit, 105 * unit); | |
1137 | + | |
1138 | + // 4.海报背景 | |
1139 | + context.setFillStyle('white'); | |
1140 | + context.fillRect(37 * unit, 157 * unit, 480 * unit, 673 * unit); | |
1141 | + | |
1142 | + // 5.商品图片 | |
1143 | + // 图片的x坐标 | |
1144 | + let bg_x = 37 * unit | |
1145 | + // 图片的y坐标 | |
1146 | + let bg_y = 157 * unit | |
1147 | + // 图片宽度 | |
1148 | + let bg_w = 480 * unit | |
1149 | + // 图片高度 | |
1150 | + let bg_h = 474 * unit | |
1151 | + // 图片圆角 | |
1152 | + let bg_r = 4 | |
1153 | + // 绘制海报背景图片圆角 | |
1154 | + context.save() | |
1155 | + context.beginPath() | |
1156 | + context.arc(bg_x + bg_r, bg_y + bg_r, bg_r, Math.PI, Math.PI * 1.5) | |
1157 | + context.arc(bg_x + bg_w - bg_r, bg_y + bg_r, bg_r, Math.PI * 1.5, Math.PI * 2) | |
1158 | + context.arc(bg_x + bg_w, bg_y + bg_h, bg_r, 0, Math.PI * 0.5) | |
1159 | + context.arc(bg_x, bg_y + bg_h, 0, Math.PI * 0.5, Math.PI) | |
1160 | + context.clip() | |
1161 | + context.drawImage(img, bg_x, bg_y, bg_w, bg_h); | |
1162 | + context.restore(); | |
1163 | + | |
1164 | + // 6.强烈推荐 | |
1165 | + let src = ''; | |
1166 | + context.beginPath(); | |
1167 | + if (type == 0) { // 普通 | |
1168 | + src = '../../../images/share/q_tj.png'; | |
1169 | + context.drawImage(src, 54 * unit, 648 * unit, 85 * unit, 30 * unit); | |
1170 | + context.setFontSize(16 * unit) | |
1171 | + context.setFillStyle("white") | |
1172 | + context.setTextAlign('left'); | |
1173 | + context.fillText('强烈推荐', 64 * unit, 668 * unit); | |
1174 | + } | |
1175 | + | |
1176 | + | |
1177 | + let price = this.data.giftPrice; | |
1178 | + let giftIntegral = this.data.giftIntegral; | |
1179 | + context.setFontSize(32 * unit); | |
1180 | + context.setFillStyle('#DE1117'); | |
1181 | + | |
1182 | + var price_txt=""; | |
1183 | + if(price || giftIntegral){ | |
1184 | + if(price){ | |
1185 | + price_txt='¥' + price; | |
1186 | + if(giftIntegral) price_txt+='+'; | |
1187 | + } | |
1188 | + if(giftIntegral) price_txt+=giftIntegral+'积分'; | |
1189 | + }else{ | |
1190 | + price_txt="¥0"; | |
1191 | + } | |
1192 | + | |
1193 | + context.fillText(price_txt, 54 * unit, 735 * unit); | |
1194 | + | |
1195 | + | |
1196 | + var wp= 62 * unit; | |
1197 | + var hp=765 * unit | |
1198 | + this.draw_pos_price(context,wp,hp,this.giftPosPrice,unit); | |
1199 | + | |
1200 | + // 8.商品标题 | |
1201 | + context.setFontSize(20 * unit); | |
1202 | + context.setFillStyle('#898989'); | |
1203 | + getApp().draw_Text(context, this.data.giftTitle, 54 * unit, 800 * unit, 240 * unit, 280 * unit, unit, 1); | |
1204 | + | |
1205 | + // 9.小程序码 | |
1206 | + context.drawImage(vpath, 375 * unit, 660 * unit, 120 * unit, 120 * unit); | |
1207 | + context.setFontSize(16 * unit); | |
1208 | + context.setFillStyle('#777'); | |
1209 | + context.fillText('长按识别二维码', 378 * unit, 810 * unit); | |
1210 | + | |
1211 | + // 10.竖线 | |
1212 | + context.beginPath(); | |
1213 | + context.setFillStyle('#eee'); | |
1214 | + context.rect(354 * unit, 670 * unit, 1 * unit, 130 * unit); | |
1215 | + context.fill(); | |
1216 | + }, | |
1217 | + | |
1218 | + | |
1219 | + //---市场价划掉--- | |
1220 | + draw_pos_price(context,w,h,market_price,unit){ | |
1221 | + | |
1222 | + if(!this.is_retail_price) return false; | |
1223 | + | |
1224 | + context.setFillStyle("gray") | |
1225 | + context.setFontSize(22 * unit) | |
1226 | + var pri0 = "¥" + market_price.toFixed(2); | |
1227 | + context.fillText(pri0, w, h); | |
1228 | + | |
1229 | + var c_h=h-6; | |
1230 | + context.setStrokeStyle('gray'); | |
1231 | + context.setLineWidth(1 * unit); | |
1232 | + context.moveTo(w - 5, c_h); | |
1233 | + context.lineTo(w + ut.measureText(pri0, 22 * unit) + 5, c_h); | |
1234 | + context.stroke(); | |
1235 | + | |
1236 | + }, | |
1237 | + | |
1238 | + //--获取商品图片的本地缓存,回调写法-- | |
1239 | + get_goods_temp: function (tt) { | |
1240 | + var ee = this; | |
1241 | + if (ee.data.share_goods_img) { | |
1242 | + tt(); | |
1243 | + return false; | |
1244 | + } | |
1245 | + var img_url = ee.data.giftImageCover ? ee.data.giftImageCover : ee.data.giftImage; | |
1246 | + //获取商品是分享图信息 | |
1247 | + wx.getImageInfo({ | |
1248 | + src: img_url, | |
1249 | + success: function (res) { | |
1250 | + //res.path是网络图片的本地地址 | |
1251 | + ee.data.share_goods_img = res.path; | |
1252 | + tt(); | |
1253 | + }, | |
1254 | + fail: function (res) { | |
1255 | + //获取默认空白图 | |
1256 | + wx.getImageInfo({ | |
1257 | + src: ee.data.iurl+'/miniapp/images/default_g_img.gif', | |
1258 | + success: function(res) { | |
1259 | + ee.data.share_goods_img = res.path; //分享的图片不能用网络的 | |
1260 | + tt(); | |
1261 | + } | |
1262 | + }) | |
1263 | + } | |
1264 | + }); | |
1265 | + }, | |
1266 | + | |
1267 | + closePoster() { | |
1268 | + this.setData({ | |
1269 | + showPoster: false, | |
1270 | + }); | |
1271 | + }, | |
1272 | + // 保存图片到手机 | |
1273 | + savePic() { | |
1274 | + getApp().savePic(this); | |
1275 | + }, | |
1276 | + // 预览海报 | |
1277 | + previewPoster() { | |
1278 | + getApp().globalData.no_clear=1; | |
1279 | + wx.previewImage({ | |
1280 | + current: this.data.shareImgPath, // 当前显示图片的http链接 | |
1281 | + urls: [this.data.shareImgPath] ,// 需要预览的图片http链接列表 | |
1282 | + }); | |
1283 | + }, | |
1284 | + | |
1285 | + | |
1286 | + | |
1287 | +}); | |
0 | 1288 | \ No newline at end of file | ... | ... |
packageE/pages/user/monthgiftbag/giftpacklist/giftpacklist.json
0 → 100644
1 | +{ | |
2 | + "navigationBarTitleText": "礼包详情", | |
3 | + "usingComponents": { | |
4 | + "warn": "/components/long_warn/long_warn", | |
5 | + "my_confirm": "/components/my_confirm/my_confirm", | |
6 | + "qr_code": "/components/qr_code/qr_code", | |
7 | + "nav_b": "/components/nav_b/nav_b", | |
8 | + "share": "/components/share/share" | |
9 | + } | |
10 | +} | |
0 | 11 | \ No newline at end of file | ... | ... |
packageE/pages/user/monthgiftbag/giftpacklist/giftpacklist.wxml
0 → 100644
1 | +<view class="box data-v-3a5b7e36" style="background-color:{{default_color?default_color:'#e85f93'}}"> | |
2 | + <view class="box_top data-v-3a5b7e36"> | |
3 | + <image src="{{giftImage}}" class="data-v-3a5b7e36" lazy-load="true" binderror="bind_bnerr" data-errorimg="giftImage"></image> | |
4 | + </view> | |
5 | + <view class="box_title data-v-3a5b7e36" > | |
6 | + | |
7 | + <view class="flex ai_c fs28" style="margin-bottom: 20rpx" wx:if="{{isBuy==0 && pick_up}}"> | |
8 | + <image class="stores-img" src="{{iurl}}/miniapp/images/stores.png"></image>{{pick_up.pickup_name}} | |
9 | + </view> | |
10 | + | |
11 | + <view class="top_title data-v-3a5b7e36"> | |
12 | + <text class="data-v-3a5b7e36 ellipsis-2" style="width:90%;">{{giftTitle}}</text> | |
13 | + | |
14 | + <!-- 这个是分享按钮 --> | |
15 | + <!-- <view wx:if="{{c_state<2}}" class="xc-share-frame t-c" bindtap="clickShare"> | |
16 | + <view class="iconfont icon-share fs40" ></view> | |
17 | + <view class="fs22 c-7b">分享</view> | |
18 | + </view> --> | |
19 | + | |
20 | + | |
21 | + </view> | |
22 | + <view class="top_time data-v-3a5b7e36" wx:if="{{!flag}}"> | |
23 | + <block wx:if="{{isBuy==1 && giftTitle && isStart!=1}}" > | |
24 | + <text class="data-v-3a5b7e36"> | |
25 | + {{"活动开始时间:"+giftStart}} | |
26 | + </text> | |
27 | + </block> | |
28 | + | |
29 | + <block wx:else> | |
30 | + <text class="data-v-3a5b7e36" wx:if="{{isBuy==0 && iswarelbtype}}">{{"兑换结束时间:"+giftDate}}</text> | |
31 | + <text class="data-v-3a5b7e36" wx:if="{{flag == 1}}"> | |
32 | + {{"活动结束时间:"+giftDate}} | |
33 | + </text> | |
34 | + </block> | |
35 | + </view> | |
36 | + <view class="top_time data-v-3a5b7e36" wx:if="{{flag == 1 && iswarelbtype}}"> | |
37 | + <text class="data-v-3a5b7e36" wx:if="{{exchangeType == 1}}"> | |
38 | + {{"兑换时间:领取后"+exchangeDay+"天内兑换"}} | |
39 | + </text> | |
40 | + <text class="data-v-3a5b7e36" wx:elif="{{exchangeType == 2}}"> | |
41 | + {{"兑换时间:"+exchangeStartTime+"至"+exchangeEndTime}} | |
42 | + </text> | |
43 | + </view> | |
44 | + | |
45 | + <view class="top_price data-v-3a5b7e36"> | |
46 | + | |
47 | + | |
48 | + <block wx:if="{{giftPrice>0}}"> | |
49 | + <text class="data-v-3a5b7e36">{{"¥"+giftPrice}}</text> | |
50 | + </block> | |
51 | + <block wx:if="{{giftPrice>0 && giftIntegral>0}}"> | |
52 | + <text class="data-v-3a5b7e36">/</text> | |
53 | + </block> | |
54 | + <block wx:if="{{giftIntegral>0}}"> | |
55 | + <text class="data-v-3a5b7e36">{{giftIntegral+"积分"}}</text> | |
56 | + </block> | |
57 | + <block wx:if="{{giftType>0}}"> | |
58 | + <text class="data-v-3a5b7e36">{{actTitle}}</text> | |
59 | + </block> | |
60 | + | |
61 | + | |
62 | + | |
63 | + | |
64 | + </view> | |
65 | + <view class="top_foot data-v-3a5b7e36"> | |
66 | + <view class="top_foot_price data-v-3a5b7e36 no_line_x"> | |
67 | + <text class="data-v-3a5b7e36"> {{is_retail_price?'零售价:':''}}{{giftPosPrice+"元"}}</text> | |
68 | + </view> | |
69 | + <!-- <view class="top_foot_qty data-v-3a5b7e36"> | |
70 | + <text class="data-v-3a5b7e36" wx:if="{{!flag}}">{{"已售:"+giftQty+"件"}}</text> | |
71 | + <text class="data-v-3a5b7e36" wx:elif="{{flag == 1 && giftQty > 0}}">{{"数量:"+giftQty+"件"}}</text> | |
72 | + </view> --> | |
73 | + </view> | |
74 | + </view> | |
75 | + <view class="box_ware data-v-3a5b7e36"> | |
76 | + <view class="box_ware_title data-v-3a5b7e36"> | |
77 | + <text class="data-v-3a5b7e36">礼包内容</text> | |
78 | + </view> | |
79 | + <block wx:for="{{wareCard}}" wx:for-item="item" wx:for-index="index" wx:key="Id"> | |
80 | + <view wx:if="{{item.couponName!=undefined}}" class="box_ware_box data-v-3a5b7e36"> | |
81 | + <view class="box_ware_img data-v-3a5b7e36"> | |
82 | + <block wx:if="{{item.lbType==1}}"> | |
83 | + <image src="{{item.wareImage==''?iurl+'/miniapp/images/giftbag/gift01.png':iurl+item.wareImage}}" class="data-v-3a5b7e36" lazy-load="true" binderror="bind_bnerr2" data-errorimg="wareCard[{{index}}].wareImage"></image> | |
84 | + </block> | |
85 | + <block wx:if="{{item.lbType==2}}"> | |
86 | + <image src="{{iurl+'/miniapp/images/giftbag/gift05.png'}}" class="data-v-3a5b7e36" lazy-load="true" binderror="bind_bnerr2" data-errorimg="wareCard[{{index}}].wareImage"></image> | |
87 | + </block> | |
88 | + <block wx:if="{{item.lbType==3}}"> | |
89 | + <image src="{{iurl+'/miniapp/images/giftbag/gift02.png'}}" class="data-v-3a5b7e36" lazy-load="true" binderror="bind_bnerr2" data-errorimg="wareCard[{{index}}].wareImage"></image> | |
90 | + </block> | |
91 | + <block wx:if="{{item.lbType==4}}"> | |
92 | + <image src="{{iurl+'/miniapp/images/giftbag/gift03.png'}}" class="data-v-3a5b7e36" lazy-load="true" binderror="bind_bnerr2" data-errorimg="wareCard[{{index}}].wareImage"></image> | |
93 | + </block> | |
94 | + <block wx:if="{{item.lbType==5}}"> | |
95 | + <image src="{{iurl+'/miniapp/images/giftbag/gift04.png'}}" class="data-v-3a5b7e36" lazy-load="true" binderror="bind_bnerr2" data-errorimg="wareCard[{{index}}].wareImage"></image> | |
96 | + </block> | |
97 | + </view> | |
98 | + <view class="box_ware_item data-v-3a5b7e36"> | |
99 | + <view class="box_ware_item_title data-v-3a5b7e36"> | |
100 | + <text class="data-v-3a5b7e36">{{item.couponName}}</text> | |
101 | + </view> | |
102 | + <view class="box_ware_item_price data-v-3a5b7e36"> | |
103 | + <text class="data-v-3a5b7e36"></text> | |
104 | + </view> | |
105 | + <view class="box_ware_item_qty data-v-3a5b7e36 flex"> | |
106 | + <text class="data-v-3a5b7e36 ellipsis-1"> | |
107 | + {{"数量:"+item.num}} | |
108 | + </text> | |
109 | + <block wx:if="{{is_receive==1 && !flag && item.lbType==1}}"> | |
110 | + <text style="margin-left:10rpx" wx:if="{{item.useState}}"> | |
111 | + 已核销 | |
112 | + </text> | |
113 | + <text style="margin-left:10rpx" wx:else> | |
114 | + 未核销 | |
115 | + </text> | |
116 | + </block> | |
117 | + </view> | |
118 | + | |
119 | + <view class="box_ware_code data-v-3a5b7e36" wx:if="{{!flag}}"> | |
120 | + <!-- <block wx:if="{{c_state==0}}"> --> | |
121 | + | |
122 | + <block wx:if="{{is_receive==1&item.lbType==1}}"> | |
123 | + <image src="{{iurl+'/miniapp/images/giftbag/gift06.png'}}" lazy-load="true" bindtap="getcode" data-codeId="{{item.Id}}" class="data-v-3a5b7e36"></image> | |
124 | + </block> | |
125 | + | |
126 | + <block wx:if="{{is_receive==1&item.lbType==2}}"> | |
127 | + <image src="{{iurl+'/miniapp/images/giftbag/gift06.png'}}" class="data-v-3a5b7e36" lazy-load="true" data-url="/packageD/pages/user/coupons/coupons" bindtap="goto"></image> | |
128 | + </block> | |
129 | + <block wx:if="{{is_receive==1&item.lbType==3}}"> | |
130 | + <image src="{{iurl+'/miniapp/images/giftbag/gift06.png'}}" class="data-v-3a5b7e36" lazy-load="true" data-url="/pages/user/my_service/i_service" bindtap="goto"></image> | |
131 | + </block> | |
132 | + <block wx:if="{{is_receive==1&item.lbType>3}}"> | |
133 | + <text class="data-v-3a5b7e36">奖励已发放</text> | |
134 | + </block> | |
135 | + </view> | |
136 | + </view> | |
137 | + </view> | |
138 | + </block> | |
139 | + </view> | |
140 | + <view class="foot_box data-v-3a5b7e36"> | |
141 | + <view class="foot_box_title data-v-3a5b7e36"> | |
142 | + <text class="data-v-3a5b7e36">活动说明</text> | |
143 | + </view> | |
144 | + <view class="foot_box_remark data-v-3a5b7e36"> | |
145 | + <rich-text nodes="{{giftRemark}}" style="word-break:break-all;word-wrap:break-word"></rich-text> | |
146 | + </view> | |
147 | + </view> | |
148 | + | |
149 | + | |
150 | + <view class="foot_empty data-v-3a5b7e36"></view> | |
151 | + | |
152 | + <block wx:if="{{flag != 1}}"> | |
153 | + <block wx:if="{{isBuy==1 && giftTitle}}"> | |
154 | + <block wx:if="{{isStart==1}}"> | |
155 | + <view class="foot_button data-v-3a5b7e36"> | |
156 | + <!-- <block wx:if="{{giftPrice>0 && giftIntegral>0}}"> | |
157 | + <view class="foot_button_left data-v-3a5b7e36 " data-money="{{giftPrice}}" data-id="{{lbId}}" bindtap="GetBuyPrice"> | |
158 | + <text class="data-v-3a5b7e36 ">立即购买</text> | |
159 | + </view> | |
160 | + <view class="foot_button_right data-v-3a5b7e36 " bindtap="GetBuyIntegral" data-id="{{lbId}}"> | |
161 | + <text class="data-v-3a5b7e36">立即兑换</text> | |
162 | + </view> | |
163 | + </block> --> | |
164 | + <!-- <block wx:if="{{giftPrice>0 && giftIntegral<=0}}"> | |
165 | + <view class="foot_button_buy data-v-3a5b7e36 " data-money="{{giftPrice}}" bindtap="GetBuyPrice" data-id="{{lbId}}"> | |
166 | + <text class="data-v-3a5b7e36">立即购买</text> | |
167 | + </view> | |
168 | + </block> --> | |
169 | + <!-- <block wx:if="{{giftPrice<=0 && giftIntegral>0}}"> | |
170 | + <view class="foot_button_intalge data-v-3a5b7e36 " bindtap="GetBuyIntegral" data-id="{{lbId}}"> | |
171 | + <text class="data-v-3a5b7e36">立即兑换</text> | |
172 | + </view> | |
173 | + </block> --> | |
174 | + <block > | |
175 | + <view class="foot_button_intalge data-v-3a5b7e36 gray" wx:if="{{is_receive==1}}" data-id="{{lbId}}"> | |
176 | + <text class="data-v-3a5b7e36">已领取</text> | |
177 | + </view> | |
178 | + <view class="foot_button_intalge data-v-3a5b7e36 " wx:else bindtap="getGift" data-id="{{lbId}}"> | |
179 | + <text class="data-v-3a5b7e36">领取</text> | |
180 | + </view> | |
181 | + </block> | |
182 | + </view> | |
183 | + </block> | |
184 | + <block wx:else> | |
185 | + <view class="foot_button data-v-3a5b7e36"> | |
186 | + <view class="foot_button_intalge data-v-3a5b7e36 gray "> | |
187 | + <text class="data-v-3a5b7e36">活动还未开始</text> | |
188 | + </view> | |
189 | + </view> | |
190 | + </block> | |
191 | + | |
192 | + </block> | |
193 | + <block wx:if="{{isBuy==0}}"> | |
194 | + <view class="foot_button data-v-3a5b7e36"> | |
195 | + <block wx:if="{{is_lb!=1}}"> | |
196 | + <view class="foot_button_buy data-v-3a5b7e36 overdue"> | |
197 | + <text class="data-v-3a5b7e36">无核销商品</text> | |
198 | + </view> | |
199 | + </block> | |
200 | + <block wx:else> | |
201 | + <view wx:if="{{c_state==-1}}" class="foot_button_buy data-v-3a5b7e36 overdue" > | |
202 | + <text class="data-v-3a5b7e36">兑换未开始</text> | |
203 | + </view> | |
204 | + <view wx:if="{{c_state==0}}" class="foot_button_buy data-v-3a5b7e36" bindtap="getcode"> | |
205 | + <text class="data-v-3a5b7e36">立即使用</text> | |
206 | + </view> | |
207 | + <view wx:if="{{c_state==1}}" class="foot_button_buy data-v-3a5b7e36 overdue" bindtap="getcode"> | |
208 | + <text class="data-v-3a5b7e36">商品已核销</text> | |
209 | + </view> | |
210 | + <view wx:if="{{c_state==2}}" class="foot_button_buy data-v-3a5b7e36 overdue"> | |
211 | + <text class="data-v-3a5b7e36">商品兑换时间已过</text> | |
212 | + </view> | |
213 | + </block> | |
214 | + </view> | |
215 | + </block> | |
216 | + </block> | |
217 | + | |
218 | +</view> | |
219 | +<!-- 引入提示组件 --> | |
220 | +<warn id="warn"></warn> | |
221 | +<my_confirm id="my_confirm"></my_confirm> | |
222 | +<!-- 弹出框扫描 --> | |
223 | +<qr_code id="qc_com"></qr_code> | |
224 | +<!-- 制作一个圆球导航 --> | |
225 | +<nav_b id="nav_b"></nav_b> | |
226 | + | |
227 | +<include src="../public/buy_com.wxml"></include> | |
228 | +<canvas canvas-id='share' style='width:750rpx;height:1217rpx;background-color:white;' wx:if="{{!canvasHidden}}"></canvas> | |
229 | +<share id="share_button" bind:send="send" bind:cancel="cancel" bind:share_img="saveImageToPhotosAlbum" wx:if="{{share_hidden}}"></share> | |
230 | + | |
231 | + | |
232 | +<view wx:if="{{showPoster}}"> | |
233 | + <view class="mask" catchtap="closePoster"></view> | |
234 | + <view class="poster-container"> | |
235 | + <view class="poster-wrapper"> | |
236 | + <view class="poster" bindtap="previewPoster"> | |
237 | + <!-- <view class="poster" bindtap="previewImage"> --> | |
238 | + <image src="{{shareImgPath}}" class="poster-img"></image> | |
239 | + <view class="btn-close" catchtap="closePoster"> | |
240 | + <text class="iconfont icon-close"></text> | |
241 | + </view> | |
242 | + </view> | |
243 | + <view class="btn-container"> | |
244 | + <!-- <button class="btn-share" open-type="share" bindtap="">微信好友分享</button> --> | |
245 | + <button class="btn-share" bindtap="savePic">保存到相册</button> | |
246 | + </view> | |
247 | + </view> | |
248 | + </view> | |
249 | +</view> | |
0 | 250 | \ No newline at end of file | ... | ... |
packageE/pages/user/monthgiftbag/giftpacklist/giftpacklist.wxss
0 → 100644
1 | +@charset "UTF-8"; | |
2 | +@import '../giftpackbuy/goodsInfo.wxss'; | |
3 | + | |
4 | +.box.data-v-3a5b7e36 { | |
5 | + -webkit-align-content: center; | |
6 | + align-content: center; | |
7 | + background-color: #e85f93; | |
8 | +} | |
9 | + | |
10 | +.box_top.data-v-3a5b7e36 { | |
11 | + width: 100%; | |
12 | +} | |
13 | + | |
14 | +.box_top image.data-v-3a5b7e36 { | |
15 | + width: 100%; | |
16 | + max-height: 540rpx; | |
17 | +} | |
18 | + | |
19 | +.box_title.data-v-3a5b7e36 { | |
20 | + margin: 10rpx 20rpx 20rpx 20rpx; | |
21 | + padding: 35rpx; | |
22 | + background-color: #fff; | |
23 | + border-radius: 40rpx; | |
24 | +} | |
25 | + | |
26 | +.top_title.data-v-3a5b7e36 { | |
27 | + font-size: 30rpx; | |
28 | + margin-bottom: 10rpx; | |
29 | + position: relative; | |
30 | +} | |
31 | + | |
32 | +.top_time.data-v-3a5b7e36 { | |
33 | + font-size: 27rpx; | |
34 | + color: #b9b5b5; | |
35 | +} | |
36 | + | |
37 | +.top_price.data-v-3a5b7e36 { | |
38 | + font-size: 35rpx; | |
39 | + color: #d61b30; | |
40 | + margin-top: 30rpx; | |
41 | + margin-bottom: 5rpx; | |
42 | + position: relative; | |
43 | +} | |
44 | + | |
45 | +.top_foot.data-v-3a5b7e36 { | |
46 | + display: -webkit-box; | |
47 | + display: -webkit-flex; | |
48 | + display: flex; | |
49 | +} | |
50 | + | |
51 | +.top_foot_price.data-v-3a5b7e36 { | |
52 | + font-size: 22rpx; | |
53 | + color: #b9b5b5; | |
54 | + width: 50%; | |
55 | + text-decoration: line-through; | |
56 | +} | |
57 | + | |
58 | +.top_foot_qty.data-v-3a5b7e36 { | |
59 | + font-size: 22rpx; | |
60 | + color: #b9b5b5; | |
61 | + width: 50%; | |
62 | + -webkit-align-content: flex-end; | |
63 | + align-content: flex-end; | |
64 | + text-align: right; | |
65 | +} | |
66 | + | |
67 | +.box_ware.data-v-3a5b7e36 { | |
68 | + margin: 10rpx 20rpx 20rpx 20rpx; | |
69 | + padding: 35rpx; | |
70 | + background-color: #fff; | |
71 | + border-radius: 40rpx; | |
72 | +} | |
73 | + | |
74 | +.box_ware_title.data-v-3a5b7e36 { | |
75 | + font-size: 35rpx; | |
76 | + margin: 5rpx 0rpx 30rpx 0rpx; | |
77 | +} | |
78 | + | |
79 | +.box_ware_box.data-v-3a5b7e36 { | |
80 | + display: -webkit-box; | |
81 | + display: -webkit-flex; | |
82 | + display: flex; | |
83 | + margin: 10rpx 0rpx 25rpx 0rpx; | |
84 | +} | |
85 | + | |
86 | +/* .box_ware_img.data-v-3a5b7e36 { | |
87 | + width: 30%; | |
88 | + height: 180rpx; | |
89 | + border: #999999 solid 1rpx; | |
90 | +} */ | |
91 | + | |
92 | +.box_ware_img image.data-v-3a5b7e36 { | |
93 | + /* width: 185rpx; | |
94 | + height: 190rpx; *//* background-color: rgba(138, 138, 138, 0.63); */ | |
95 | + border: 2rpx solid #999; | |
96 | + width: 120rpx; | |
97 | + height: 120rpx; | |
98 | + background-color: #f8f8f8; | |
99 | +} | |
100 | + | |
101 | +.box_ware_item.data-v-3a5b7e36 { | |
102 | + width: 70%; | |
103 | + margin-left: 25rpx; | |
104 | + position: relative; | |
105 | +} | |
106 | + | |
107 | +.box_ware_item_title.data-v-3a5b7e36 { | |
108 | + font-size: 24rpx; | |
109 | + word-break: break-all; | |
110 | + text-overflow: ellipsis; | |
111 | + display: -webkit-box; | |
112 | + -webkit-box-orient: vertical; | |
113 | + -webkit-line-clamp: 2; | |
114 | + overflow: hidden; | |
115 | +} | |
116 | + | |
117 | +.box_ware_count.data-v-3a5b7e36 { | |
118 | + display: -webkit-box; | |
119 | + display: -webkit-flex; | |
120 | + display: flex; | |
121 | +} | |
122 | + | |
123 | +.box_ware_item_price.data-v-3a5b7e36 { | |
124 | + font-size: 25rpx; | |
125 | + color: #b9b5b5; | |
126 | + position: absolute; | |
127 | + bottom: 60rpx; | |
128 | + left: 0; | |
129 | +} | |
130 | + | |
131 | +.box_ware_item_qty.data-v-3a5b7e36 { | |
132 | + font-size: 22rpx; | |
133 | + position: absolute; | |
134 | + bottom: 15rpx; | |
135 | + left: 0; | |
136 | +} | |
137 | + | |
138 | +.box_ware_code.data-v-3a5b7e36 { | |
139 | + position: absolute; | |
140 | + right: 10rpx; | |
141 | + bottom: 10rpx; | |
142 | +} | |
143 | + | |
144 | +.box_ware_code image.data-v-3a5b7e36 { | |
145 | + width: 50rpx; | |
146 | + height: 50rpx; | |
147 | +} | |
148 | + | |
149 | +.box_ware_code text.data-v-3a5b7e36 { | |
150 | + font-size: 20rpx; | |
151 | +} | |
152 | + | |
153 | +.foot_box.data-v-3a5b7e36 { | |
154 | + margin: 10rpx 20rpx 50rpx 20rpx; | |
155 | + padding: 35rpx; | |
156 | + background-color: #fff; | |
157 | + border-radius: 40rpx; | |
158 | +} | |
159 | + | |
160 | +.foot_box_title.data-v-3a5b7e36 { | |
161 | + font-size: 35rpx; | |
162 | + margin-bottom: 30rpx; | |
163 | +} | |
164 | + | |
165 | +.foot_box_remark.data-v-3a5b7e36 { | |
166 | + font-size: 27rpx; | |
167 | + line-height: 40rpx; | |
168 | +} | |
169 | + | |
170 | +.foot_empty.data-v-3a5b7e36 { | |
171 | + height: 90rpx; | |
172 | +} | |
173 | + | |
174 | +.foot_button.data-v-3a5b7e36 { | |
175 | + display: -webkit-box; | |
176 | + display: -webkit-flex; | |
177 | + display: flex; | |
178 | + margin: 20rpx 0rpx 0rpx 0rpx; | |
179 | + padding: 25rpx 0rpx; | |
180 | + background: #fff; | |
181 | + text-align: center; | |
182 | + -webkit-box-pack: center; | |
183 | + -webkit-justify-content: center; | |
184 | + justify-content: center; | |
185 | + position: fixed; | |
186 | + bottom: 0; | |
187 | + left: 0; | |
188 | + width: 100%; | |
189 | +} | |
190 | + | |
191 | +.foot_button_left.data-v-3a5b7e36 { | |
192 | + background: #e4010c; | |
193 | + color: #fff; | |
194 | + width: 250rpx; | |
195 | + height: 70rpx; | |
196 | + font-size: 28rpx; | |
197 | + line-height: 70rpx; | |
198 | + border-radius: 40rpx; | |
199 | + margin-right: 20rpx; | |
200 | +} | |
201 | + | |
202 | +.foot_button_right.data-v-3a5b7e36 { | |
203 | + background: #ffbb42; | |
204 | + color: #fff; | |
205 | + width: 250rpx; | |
206 | + height: 70rpx; | |
207 | + font-size: 28rpx; | |
208 | + line-height: 70rpx; | |
209 | + border-radius: 40rpx; | |
210 | +} | |
211 | + | |
212 | +.foot_button_buy.data-v-3a5b7e36 { | |
213 | + background: #e4010c; | |
214 | + color: #fff; | |
215 | + width: 400rpx; | |
216 | + height: 70rpx; | |
217 | + font-size: 28rpx; | |
218 | + line-height: 70rpx; | |
219 | + border-radius: 40rpx; | |
220 | +} | |
221 | + | |
222 | +.foot_button_intalge.data-v-3a5b7e36 { | |
223 | + background: #ffbb42; | |
224 | + color: #fff; | |
225 | + width: 400rpx; | |
226 | + height: 70rpx; | |
227 | + font-size: 28rpx; | |
228 | + line-height: 70rpx; | |
229 | + border-radius: 40rpx; | |
230 | +} | |
231 | + | |
232 | +page.data-v-3a5b7e36 { | |
233 | + background-color: #e85f93; | |
234 | +} | |
235 | + | |
236 | +.foot_box_remark.data-v-3a5b7e36 ._img { | |
237 | + width: 100%; | |
238 | +} | |
239 | + | |
240 | +.foot_box_remark.data-v-3a5b7e36 .img { | |
241 | + line-height: 0; | |
242 | +} | |
243 | +.overdue.data-v-3a5b7e36{ | |
244 | + background-color: rgb(153,153,153); | |
245 | +} | |
246 | + | |
247 | +.foot_button_intalge.data-v-3a5b7e36.gray{ background-color: #aaa; } | |
248 | + | |
249 | +.xc-share-frame { | |
250 | + position: absolute; right:0; top: -10rpx; | |
251 | +} | |
252 | + | ... | ... |
packageE/pages/user/monthgiftbag/monthgiftbag.js
0 → 100644
1 | +var i = require("../../../../utils/util.js") | |
2 | +var e = getApp(), | |
3 | + a = e.globalData.setting, | |
4 | + os = a, | |
5 | + t = e.request, | |
6 | + d = e.globalData; | |
7 | +Page({ | |
8 | + data: { | |
9 | + iurl: a.imghost, //图片前缀网址 | |
10 | + getDate: "", | |
11 | + getStorageID: '', | |
12 | + getUserID: '', | |
13 | + wareCard: [], | |
14 | + // pages: 0, | |
15 | + // pageSize: 10, | |
16 | + isEmpty: false, | |
17 | + loadingType: 0, //定义加载方式 0---contentdown 1---contentrefresh 2---contentnomore | |
18 | + contentText: { | |
19 | + contentdown: '加载更多', | |
20 | + contentrefresh: '加载中...', | |
21 | + contentnomore: '已加载全部' | |
22 | + }, | |
23 | + ismore: 0, //数据是否全部加载完成 | |
24 | + is_read: 0, //是否查询过我的礼包接口 | |
25 | + curpage: 1, //当前分页数 | |
26 | + pageSize: 10, //页大小 | |
27 | + total: 0, //总数量 | |
28 | + ad_data: null, | |
29 | + first_leader: e.globalData.first_leader || 0, // 推荐人ID | |
30 | + }, | |
31 | + onLoad: function (options) { | |
32 | + this.setData({ | |
33 | + params: options, | |
34 | + }) | |
35 | + }, | |
36 | + | |
37 | + init() { | |
38 | + let options = this.data?.params; | |
39 | + var th = this; | |
40 | + this.setData({ | |
41 | + getStorageID: a.stoid, | |
42 | + getUserID: d.user_id, | |
43 | + loadingType: 0, | |
44 | + getDate: i.formatTime(new Date().getTime()) | |
45 | + }); | |
46 | + //-- 获取分享人的ID -- | |
47 | + var first_leader = options.first_leader || getApp().globalData.first_leader; | |
48 | + if (first_leader) { | |
49 | + this.setData({ | |
50 | + first_leader, | |
51 | + }) | |
52 | + //-- user_id代过来免登录 -- | |
53 | + getApp().globalData.first_leader = first_leader; | |
54 | + //调用接口判断是不是会员 | |
55 | + getApp().request.promiseGet("/api/weshop/shoppingGuide/get/" + os.stoid + "/" + first_leader, {}).then(res => { | |
56 | + if (res.data.code == 0) { | |
57 | + getApp().globalData.guide_id = res.data.data.id; | |
58 | + getApp().globalData.guide_pick_id= res.data.data.pickup_id | |
59 | + } | |
60 | + }) | |
61 | + } | |
62 | + | |
63 | + getApp().request.promiseGet("/api/weshop/ad/page?pid=1208&store_id=" + os.stoid, { | |
64 | + data: { | |
65 | + enabled: 1 | |
66 | + } | |
67 | + }).then(res => { | |
68 | + if (res.data.code == 0 && res.data.data && res.data.data.pageData && res.data.data.pageData.length > 0) { | |
69 | + var a = res.data.data.pageData; | |
70 | + var tt = { | |
71 | + 'ad_code': os.imghost + a[0].ad_code, | |
72 | + 'media_link': '', | |
73 | + 'ad_weapplink': a[0].ad_weapplink, | |
74 | + 'bgcolor': a[0].bgcolor, | |
75 | + }; | |
76 | + th.setData({ ad_data: tt }); | |
77 | + } | |
78 | + }) | |
79 | + this.getList(); | |
80 | + }, | |
81 | + onShow: function () { | |
82 | + getApp().check_can_share(); | |
83 | + this.setData({ | |
84 | + curpage:1 | |
85 | + }) | |
86 | + //--先判断会员状态-- | |
87 | + getApp().is_Single_page(this, function () { | |
88 | + var user_info = getApp().globalData.userInfo; | |
89 | + if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) { | |
90 | + getApp().goto('/packageE/pages/togoin/togoin'); | |
91 | + return false; | |
92 | + } | |
93 | + this.setData({ | |
94 | + wareCard:[] | |
95 | + }) | |
96 | + this.init() | |
97 | + }) | |
98 | + | |
99 | + | |
100 | + }, | |
101 | + getList: function () { | |
102 | + var th = this; | |
103 | + | |
104 | + getApp().request.get('/api/weshop/marketing/marketingMonthgiftbagRecord/page', { | |
105 | + isShowLoading: true, | |
106 | + data: { | |
107 | + store_id: th.data.getStorageID, //商家ID | |
108 | + user_id: th.data.getUserID, //用户ID | |
109 | + page: th.data.curpage, | |
110 | + pageSize: th.data.pageSize, | |
111 | + pay_state:1 | |
112 | + }, | |
113 | + success: function (res) { | |
114 | + if (res.data.code == 0) { | |
115 | + | |
116 | + var arr1 = th.data.wareCard; | |
117 | + var arr2 = res.data.data.pageData; | |
118 | + if (arr2.length>=th.data.pageSize) { | |
119 | + th.data.curpage++; | |
120 | + } | |
121 | + for (let j = 0; j < arr2.length; j++) { | |
122 | + // arr2[j].starTime1=Date.parse(new Date(arr2[j].begindate.replace(/-/g, "/")))/1000 | |
123 | + // arr2[j].starTime1=arr2[j].begindate | |
124 | + // arr2[j].starTime=i.formatTime(arr2[j].begindate, "yyyy-MM-dd hh:mm:ss"); | |
125 | + // arr2[j].endTime=i.formatTime(arr2[j].enddate, "yyyy-MM-dd hh:mm:ss"); | |
126 | + arr2[j].giftPosPrice=arr2[j].oldPrice | |
127 | + arr2[j].payMoney=arr2[j].pay_money | |
128 | + arr2[j].payIntegral=arr2[j].pay_integral | |
129 | + // arr2[j].giftQty=arr2[j].buynum | |
130 | + arr2[j].cover_img=arr2[j].imageurl | |
131 | + arr2[j].giftTitle=arr2[j].act_name | |
132 | + arr2[j].lbId=arr2[j].cur_giftid | |
133 | + arr2[j].orderSn=arr2[j].order_sn | |
134 | + arr2[j].pay_time=i.formatTime(arr2[j].paytime, "yyyy-MM-dd hh:mm:ss"); | |
135 | + | |
136 | + // arr2[j].virtualsales=arr2[j].virtualSales | |
137 | + // arr2[j].lbnum=arr2[j].lbNum | |
138 | + } | |
139 | + | |
140 | + | |
141 | + var arr3 = [...arr1, ...arr2]; | |
142 | + var ismore = 0; | |
143 | + if (arr3.length == res.data.data.total) ismore = 1 | |
144 | + th.setData({ | |
145 | + wareCard: arr3, | |
146 | + total: res.data.data.total, | |
147 | + ismore: ismore, | |
148 | + is_read: 1, | |
149 | + is_get:1, | |
150 | + }), wx.stopPullDownRefresh(); //停止下拉刷新 | |
151 | + } else { | |
152 | + th.setData({ | |
153 | + is_read: 1, | |
154 | + ismore: 1, | |
155 | + is_get:1, | |
156 | + }) | |
157 | + } | |
158 | + | |
159 | + } | |
160 | + | |
161 | + }); | |
162 | + | |
163 | + }, | |
164 | + //销毁界面跳转 | |
165 | + redirectTo: function (e) { | |
166 | + var th = this; | |
167 | + var url = e.currentTarget.dataset.url; | |
168 | + //销毁跳转 | |
169 | + wx.redirectTo({ | |
170 | + url: url | |
171 | + }); | |
172 | + }, | |
173 | + //不销毁界面跳转 | |
174 | + navigateTo: function (e) { | |
175 | + var th = this; | |
176 | + var url = e.currentTarget.dataset.url; | |
177 | + getApp().goto(url); | |
178 | + }, | |
179 | + //下拉事件 | |
180 | + onReachBottom: function () { | |
181 | + var th = this; | |
182 | + if (th.data.total <= th.data.pageSize) return; | |
183 | + if (th.data.ismore) return; | |
184 | + th.getList(); | |
185 | + }, | |
186 | + | |
187 | + //图片失败,默认图片 | |
188 | + bind_bnerr2: function (e) { | |
189 | + var _errImg = e.target.dataset.errorimg; | |
190 | + var _errObj = {}; | |
191 | + _errObj[_errImg] = "/miniapp/images/default_g_img.gif"; | |
192 | + this.setData(_errObj) //注意这里的赋值方式,只是将数据列表中的此项图片路径值替换掉 ; | |
193 | + }, | |
194 | + | |
195 | + | |
196 | + //--- 分享设置 -- | |
197 | + onShareAppMessage: function (e) { | |
198 | + getApp().globalData.no_clear=1; | |
199 | + var curPage = this; | |
200 | + var pagePath = curPage.route; //当前页面url | |
201 | + if (pagePath.indexOf('/') != 0) { | |
202 | + pagePath = '/' + pagePath; | |
203 | + } | |
204 | + pagePath += "?first_leader=" + this.data.getUserID; | |
205 | + return { | |
206 | + title: "专享礼包", | |
207 | + path: pagePath, | |
208 | + } | |
209 | + }, | |
210 | + | |
211 | + onShareTimeline() { | |
212 | + getApp().globalData.no_clear=1; | |
213 | + return { | |
214 | + title: '专享礼包', | |
215 | + imageUrl: this.data.ad_data.ad_code, | |
216 | + query: "first_leader=" + this.data.getUserID | |
217 | + } | |
218 | + }, | |
219 | + | |
220 | + | |
221 | +}); | |
0 | 222 | \ No newline at end of file | ... | ... |
packageE/pages/user/monthgiftbag/monthgiftbag.json
0 → 100644
packageE/pages/user/monthgiftbag/monthgiftbag.wxml
0 → 100644
1 | +<view class="top_img" style="background-color: {{ad_data?ad_data.bgcolor:'rgb(250, 120, 88)'}};min-height: 100vh;"> | |
2 | + <block wx:if="{{ad_data}}"> | |
3 | + <view class="top_img"> | |
4 | + <image mode="widthFix" src="{{ad_data.ad_code}}" lazy-load="true" binderror="bind_bnerr2" data-errorimg="wareCard[{{index}}].lbUrl"></image> | |
5 | + </view> | |
6 | + </block> | |
7 | + <block wx:else> | |
8 | + <view class="top_img"> | |
9 | + <!-- <image src="{{$GetInfo.imgHttp+'/miniapp/images/giftbag/gift00.jpg'}}"></image> --> | |
10 | + <image mode="widthFix" src="{{iurl+'/miniapp/images/monthgiftbagtop.png?v=2019'}}" lazy-load="true"></image> | |
11 | + </view> | |
12 | + </block> | |
13 | + | |
14 | + | |
15 | + <view class="top_title"> | |
16 | + <view class="top_title_box"> | |
17 | + <text class="top_title_blacktext" bindtap="redirectTo" data-url="/packageE/pages/user/monthgiftbag/giftpackbuy/giftpackbuy">礼包列表</text> | |
18 | + </view> | |
19 | + <view class="top_title_box_S"></view> | |
20 | + <view class="top_title_box"> | |
21 | + <text class="top_title_redtext">我的礼包</text> | |
22 | + </view> | |
23 | + </view> | |
24 | + <block wx:for="{{wareCard}}" wx:for-item="item" wx:for-index="index" wx:key="index"> | |
25 | + <view class="content_box"> | |
26 | + <view class="content_box_ware" bindtap="navigateTo" data-url="/packageE/pages/user/monthgiftbag/giftpacklist/giftpacklist?isBuy=1&lbId={{item.lbId}}&cover_img={{item.cover_img}}&orderSn={{item.order_sn}}&record_list_id={{item.record_list_id}}&is_receive={{item.is_receive}}"> | |
27 | + <view class="content_box_img"> | |
28 | + <!-- <image src="{{$GetInfo.imgHttp+item.$orig.lbUrl}}"></image> --> | |
29 | + <image wx:if="{{item.cover_img}}" src="{{iurl+item.cover_img}}" lazy-load="true" binderror="bind_bnerr2" data-errorimg="wareCard[{{index}}].cover_img"></image> | |
30 | + <image wx:else src="{{iurl+item.lbUrl}}" lazy-load="true" binderror="bind_bnerr2" data-errorimg="wareCard[{{index}}].lbUrl"></image> | |
31 | + | |
32 | + <block wx:if="{{item.actType!=0}}"> | |
33 | + <view class="{{[item.actType==1?'content_box_img_title content_box_img_ground1':item.actType==2?'content_box_img_title content_box_img_ground2':item.actType==4?'content_box_img_title content_box_img_ground3':'content_box_img_title content_box_img_ground4']}}"> | |
34 | + <image src="{{iurl+'/miniapp/images/giftbag/gift01.png'}}" lazy-load="true"></image> | |
35 | + <!-- <block wx:if="{{item.$orig.actType==1}}"> --> | |
36 | + <block wx:if="{{item.actType==1}}"> | |
37 | + <text>新人有礼</text> | |
38 | + </block> | |
39 | + <block wx:if="{{item.actType==2}}"> | |
40 | + <text>评价有礼</text> | |
41 | + </block> | |
42 | + <block wx:if="{{item.actType==3}}"> | |
43 | + <text>节日营销</text> | |
44 | + </block> | |
45 | + <block wx:if="{{item.actType==4}}"> | |
46 | + <text>生日营销</text> | |
47 | + </block> | |
48 | + <block wx:if="{{item.actType==5}}"> | |
49 | + <text>助力礼包</text> | |
50 | + </block> | |
51 | + </view> | |
52 | + </block> | |
53 | + </view> | |
54 | + <view class="content_box_title"> | |
55 | + <view class="content_ware_title"> | |
56 | + <text>{{item.giftTitle}}</text> | |
57 | + </view> | |
58 | + <view class="content_ware_type"> | |
59 | + <block wx:if="{{item.payMoney>0}}"> | |
60 | + <text>{{"¥"+item.payMoney}}</text> | |
61 | + </block> | |
62 | + <block wx:if="{{item.payIntegral>0}}"> | |
63 | + <text>{{item.payIntegral+"积分"}}</text> | |
64 | + </block> | |
65 | + <block wx:if="{{item.actType==1}}"> | |
66 | + <text>{{item.actTitle}}</text> | |
67 | + </block> | |
68 | + <block wx:if="{{item.actType==2}}"> | |
69 | + <text>{{item.actTitle}}</text> | |
70 | + </block> | |
71 | + <block wx:if="{{item.actType==3}}"> | |
72 | + <text>{{item.actTitle}}</text> | |
73 | + </block> | |
74 | + <block wx:if="{{item.actType==4}}"> | |
75 | + <text>{{item.actTitle}}</text> | |
76 | + </block> | |
77 | + <block wx:if="{{item.actType==5}}"> | |
78 | + <text>{{item.actTitle}}</text> | |
79 | + </block> | |
80 | + </view> | |
81 | + <view class="content_ware_price no_line_c"> | |
82 | + <text >{{"购买时间:"+item.pay_time}}</text> | |
83 | + </view> | |
84 | +<!-- | |
85 | + <view class="content_ware_time" wx:if="{{item.iswarelbtype==1}}"> | |
86 | + <block wx:if="{{getDate>item.endTime}}"> | |
87 | + <text>{{"兑换截至日期:"+item.endTime}}</text> | |
88 | + </block> | |
89 | + <block wx:if="{{getDate<item.starTime}}"> | |
90 | + <text>{{"距兑换开始时间: "+item.starTime}}</text> | |
91 | + </block> | |
92 | + </view> --> | |
93 | + | |
94 | + </view> | |
95 | + </view> | |
96 | + <view class="content_box_button" bindtap="navigateTo" data-url="/packageE/pages/user/monthgiftbag/giftpacklist/giftpacklist?isBuy=1&lbId={{item.lbId}}&cover_img={{item.cover_img}}&orderSn={{item.order_sn}}&record_list_id={{item.record_list_id}}&is_receive={{item.is_receive}}"> | |
97 | + <button>立即使用</button> | |
98 | + </view> | |
99 | + </view> | |
100 | + </block> | |
101 | + <block wx:if="{{is_read && wareCard.length<1 && is_get}}"> | |
102 | + <view class="foot_empty"> | |
103 | + <view> | |
104 | + <image src="{{iurl+'/miniapp/images/giftbag/gift07.png'}}" lazy-load="true"></image> | |
105 | + </view> | |
106 | + <view> | |
107 | + <text>当前暂无礼包</text> | |
108 | + </view> | |
109 | + <view class="foot_empty_button"> | |
110 | + <text bindtap="navigateTo" data-url="/pages/giftpack/buygiftpack/giftpackbuy">去获取</text> | |
111 | + </view> | |
112 | + </view> | |
113 | + </block> | |
114 | + <block wx:if="{{ismore}}"> | |
115 | + <!-- 加载完毕并且数据大于=页大小 --> | |
116 | + <view class="After_all flex-center" wx:if="{{ismore && wareCard.length>=3}}"> | |
117 | + <view class="Line"></view> | |
118 | + <view class="end fs26">到底了</view> | |
119 | + <view class="Line"></view> | |
120 | + </view> | |
121 | + </block> | |
122 | +</view> | |
123 | +<!-- 引入提示组件 --> | |
124 | +<warn id="warn"></warn> | |
125 | +<my_confirm id="my_confirm"></my_confirm> | |
0 | 126 | \ No newline at end of file | ... | ... |
packageE/pages/user/monthgiftbag/monthgiftbag.wxss
0 → 100644
1 | +/*引用样式路径*/ | |
2 | +@charset "UTF-8"; | |
3 | + | |
4 | +/* Author XGQ | |
5 | + * 2019-11-12 | |
6 | + */ | |
7 | + | |
8 | +.top_img { | |
9 | + -webkit-align-content: center; | |
10 | + align-content: center; | |
11 | +} | |
12 | + | |
13 | +.top_img image { | |
14 | + width: 100%; | |
15 | +} | |
16 | + | |
17 | +.top_title { | |
18 | + display: -webkit-box; | |
19 | + display: -webkit-flex; | |
20 | + display: flex; | |
21 | + background-color: #fff; | |
22 | + height: 85rpx; | |
23 | + border-radius: 10rpx 10rpx 0rpx 0rpx; | |
24 | + margin: 0rpx 20rpx 0rpx 20rpx; | |
25 | + -webkit-align-content: center; | |
26 | + align-content: center; | |
27 | + margin-bottom: 10rpx; | |
28 | +} | |
29 | + | |
30 | +.top_title_box { | |
31 | + width: 49%; | |
32 | + -webkit-align-content: center; | |
33 | + align-content: center; | |
34 | + text-align: center; | |
35 | + padding: 15rpx; | |
36 | +} | |
37 | + | |
38 | +.top_title_box_S { | |
39 | + width: 1%; | |
40 | + -webkit-align-content: center; | |
41 | + align-content: center; | |
42 | + text-align: center; | |
43 | + margin: 20rpx 0rpx 20rpx 0rpx; | |
44 | + border-left: #000 solid 3rpx; | |
45 | +} | |
46 | + | |
47 | +.top_title_redtext { | |
48 | + font-size: 30rpx; | |
49 | + color: #d61b30; | |
50 | +} | |
51 | + | |
52 | +.top_title_blacktext { | |
53 | + font-size: 30rpx; | |
54 | + color: #000; | |
55 | +} | |
56 | + | |
57 | +.content_box { | |
58 | + background-color: #fff; | |
59 | + height: 375rpx; | |
60 | + margin: 0rpx 20rpx; | |
61 | + border-radius: 10rpx; | |
62 | + margin-bottom: 10rpx; | |
63 | +} | |
64 | + | |
65 | +.content_box_ware { | |
66 | + border-bottom: #f5f5f5 solid 2rpx; | |
67 | + display: -webkit-box; | |
68 | + display: -webkit-flex; | |
69 | + display: flex; | |
70 | +} | |
71 | + | |
72 | +.content_box_img { | |
73 | + margin: 20rpx 20rpx 20rpx 25rpx; | |
74 | + width: 35%; | |
75 | + display: -webkit-box; | |
76 | + display: -webkit-flex; | |
77 | + display: flex; | |
78 | + font-size: 8rpx; | |
79 | + position: relative; | |
80 | +} | |
81 | + | |
82 | +.content_box_img image { | |
83 | + width: 230rpx; | |
84 | + height: 230rpx; | |
85 | +} | |
86 | + | |
87 | +.content_box_img_title { | |
88 | + position: absolute; | |
89 | + background: #d01119; | |
90 | + display: -webkit-box; | |
91 | + display: -webkit-flex; | |
92 | + display: flex; | |
93 | + padding: 8rpx; | |
94 | + border-radius: 0rpx 0rpx 10rpx 0rpx; | |
95 | +} | |
96 | + | |
97 | +.content_box_img_ground1 { | |
98 | + background: #fb6451; | |
99 | +} | |
100 | + | |
101 | +.content_box_img_ground2 { | |
102 | + background: #ffb72d; | |
103 | +} | |
104 | + | |
105 | +.content_box_img_ground3 { | |
106 | + background: #9be0e5; | |
107 | +} | |
108 | + | |
109 | +.content_box_img_ground4 { | |
110 | + background: #4784ef; | |
111 | +} | |
112 | + | |
113 | +.content_box_img_title image { | |
114 | + width: 30rpx; | |
115 | + height: 30rpx; | |
116 | +} | |
117 | + | |
118 | +.content_box_img_title text { | |
119 | + font-size: 20rpx; | |
120 | + color: #fff; | |
121 | + line-height: 25rpx; | |
122 | + padding-top: 5rpx; | |
123 | +} | |
124 | + | |
125 | +.content_box_title { | |
126 | + width: 65%; | |
127 | + margin: 25rpx 25rpx 10rpx 0rpx; | |
128 | + position: relative; | |
129 | +} | |
130 | + | |
131 | +.content_ware_title { | |
132 | + font-size: 30rpx; | |
133 | + word-break: break-all; | |
134 | + /*属性规定自动换行的处理方法。normal(使用浏览器默认的换行规则。),break-all(允许在单词内换行。),keep-all(只能在半角空格或连字符处换行。)*/ | |
135 | + text-overflow: ellipsis; | |
136 | + display: -webkit-box; | |
137 | + /** 对象作为伸缩盒子模型显示 **/ | |
138 | + -webkit-box-orient: vertical; | |
139 | + /** 设置或检索伸缩盒对象的子元素的排列方式 **/ | |
140 | + -webkit-line-clamp: 2; | |
141 | + /** 显示的行数 **/ | |
142 | + overflow: hidden; | |
143 | + /** 隐藏超出的内容 **/ | |
144 | +} | |
145 | + | |
146 | +.content_ware_type { | |
147 | + font-size: 32rpx; | |
148 | + color: #c61a34; | |
149 | + margin-top: 10rpx; | |
150 | + position: absolute; | |
151 | + left: 0; | |
152 | + bottom: 100rpx; | |
153 | +} | |
154 | + | |
155 | +.content_ware_price { | |
156 | + font-size: 26rpx; | |
157 | + color: #b9b5b5; | |
158 | + margin-top: 2rpx; | |
159 | + text-decoration: line-through; | |
160 | + position: absolute; | |
161 | + left: 0; | |
162 | + bottom: 40rpx; | |
163 | +} | |
164 | + | |
165 | +.content_ware_time { | |
166 | + font-size: 24rpx; | |
167 | + color: #c61a34; | |
168 | + margin-top: 20rpx; | |
169 | + position: absolute; | |
170 | + left: 0; | |
171 | + bottom: 25rpx; | |
172 | +} | |
173 | + | |
174 | +.content_box_button { | |
175 | + text-align: right; | |
176 | + margin: 20rpx 25rpx 20rpx 20rpx; | |
177 | +} | |
178 | + | |
179 | +.content_box_button button { | |
180 | + display: inline-block; | |
181 | + width: 160rpx; | |
182 | + height: 50rpx; | |
183 | + font-size: 25rpx; | |
184 | + background: #d41c34; | |
185 | + color: #fff; | |
186 | + line-height: 50rpx; | |
187 | +} | |
188 | + | |
189 | +.foot_box { | |
190 | + -webkit-align-content: center; | |
191 | + align-content: center; | |
192 | + text-align: center; | |
193 | + margin-top: 15rpx; | |
194 | + margin-bottom: 50rpx; | |
195 | +} | |
196 | + | |
197 | +.foot_box text { | |
198 | + font-size: 25rpx; | |
199 | + color: #fff; | |
200 | +} | |
201 | + | |
202 | +.foot_empty { | |
203 | + background-color: #fff; | |
204 | + height: 375rpx; | |
205 | + margin: 10rpx 20rpx 0rpx 20rpx; | |
206 | + border-radius: 10rpx; | |
207 | + text-align: center; | |
208 | + padding: 150rpx 0rpx 300rpx 0rpx; | |
209 | + -webkit-box-pack: center; | |
210 | + -webkit-justify-content: center; | |
211 | + justify-content: center; | |
212 | +} | |
213 | + | |
214 | +.foot_empty image { | |
215 | + width: 400rpx; | |
216 | + height: 273rpx; | |
217 | +} | |
218 | + | |
219 | +.foot_empty text { | |
220 | + font-size: 30rpx; | |
221 | + color: #999; | |
222 | +} | |
223 | + | |
224 | +.foot_empty_button { | |
225 | + background: #ff6363; | |
226 | + margin: 60rpx 230rpx 0rpx 230rpx; | |
227 | + padding: 10rpx; | |
228 | + border-radius: 70rpx; | |
229 | + line-height: 40rpx; | |
230 | +} | |
231 | + | |
232 | +.foot_empty_button text { | |
233 | + font-size: 28rpx; | |
234 | + color: #fff; | |
235 | +} | |
236 | + | |
237 | +page { | |
238 | + /* background-color: rgb(250, 120, 88); */ | |
239 | +} | |
240 | +.After_all { | |
241 | + height: 80rpx; | |
242 | + margin-bottom: 10rpx; | |
243 | + color: rgb(255, 255, 255); | |
244 | +} | |
245 | + | |
246 | +.After_all .Line { | |
247 | + border-top: 3rpx solid rgb(255, 255, 255); | |
248 | + width: 130rpx; | |
249 | +} | |
250 | + | |
251 | +.After_all .end { | |
252 | + margin: 0rpx 15rpx; | |
253 | +} | ... | ... |
packageE/pages/user/monthgiftbag/payment/payment.js
0 → 100644
1 | +var e = getApp(); | |
2 | +var regeneratorRuntime = require('../../../../../utils/runtime.js'); | |
3 | +Page({ | |
4 | + /** | |
5 | + * 页面的初始数据 | |
6 | + */ | |
7 | + data: { | |
8 | + url: e.globalData.setting.imghost, | |
9 | + resourceUrl: e.globalData.setting.resourceUrl, | |
10 | + iurl: e.globalData.setting.imghost, | |
11 | + allmoney: 0, | |
12 | + order_sn: "", | |
13 | + }, | |
14 | + | |
15 | + /** | |
16 | + * 生命周期函数--监听页面加载 | |
17 | + */ | |
18 | + onLoad: function (options) { | |
19 | + wx.setNavigationBarTitle({ | |
20 | + title: '支付成功', | |
21 | + }); | |
22 | + var money = parseFloat(options.money).toFixed(2), order_sn = options.order_sn; | |
23 | + this.setData({allmoney:money,order_sn:order_sn}) | |
24 | + }, | |
25 | + | |
26 | + goto: function () { | |
27 | + var url = '/pages/index/index/index'; | |
28 | + getApp().goto(url) | |
29 | + }, | |
30 | +}) | |
0 | 31 | \ No newline at end of file | ... | ... |
packageE/pages/user/monthgiftbag/payment/payment.json
0 → 100644
packageE/pages/user/monthgiftbag/payment/payment.wxml
0 → 100644
1 | +<wxs module="filters" src="../../../utils/filter.wxs"></wxs> | |
2 | +<view> | |
3 | + <!-- 支付成功提示 --> | |
4 | + <view class="payradio"> | |
5 | + <!-- 提示框 --> | |
6 | + <view class="Success_box flex-center"> | |
7 | + <view> | |
8 | + <view class="flex-center"> | |
9 | + <image src="{{url}}miniapp/images/pay/paysuccess.png"></image> | |
10 | + </view> | |
11 | + <view class="Success_box_title fs32">订单支付成功!</view> | |
12 | + </view> | |
13 | + </view> | |
14 | + | |
15 | + <!-- 支付信息 --> | |
16 | + <view class="payitem_max fs28"> | |
17 | + <!-- 订单编号 --> | |
18 | + <view class="payitem flex"> | |
19 | + <view>订单编号 :</view> | |
20 | + <text selectable="true">{{order_sn}}</text> | |
21 | + </view> | |
22 | + | |
23 | + <!-- 实付金额 --> | |
24 | + <view class="payitem flex"> | |
25 | + <view>实付金额 :</view> | |
26 | + <!-- {{filters.toFix()}} --> | |
27 | + <view class="pay_money">{{allmoney}}元</view> | |
28 | + </view> | |
29 | + | |
30 | + <!-- 支付方式 --> | |
31 | + <view class="payitem flex" wx:if="type==1"> | |
32 | + <view>支付方式 :</view> | |
33 | + <view>微信支付</view> | |
34 | + </view> | |
35 | + </view> | |
36 | + </view> | |
37 | + <view class="flex-level"> | |
38 | + <view class="line"></view> | |
39 | + </view> | |
40 | + | |
41 | + <!-- 跳转链接 --> | |
42 | + <view> | |
43 | + <!-- 链接 --> | |
44 | + <view class="fs32"> | |
45 | + <view class="flex-center"> | |
46 | + <navigator class="pay_order flex-center" url="/packageE/pages/user/monthgiftbag/monthgiftbag"> | |
47 | + <view>每月礼包</view> | |
48 | + </navigator> | |
49 | + </view> | |
50 | + <view class="flex-center"> | |
51 | + <navigator class="pay_home flex-center" bindtap="goto"> | |
52 | + <view>回到首页</view> | |
53 | + </navigator> | |
54 | + </view> | |
55 | + </view> | |
56 | + </view> | |
57 | +</view> | |
0 | 58 | \ No newline at end of file | ... | ... |
packageE/pages/user/monthgiftbag/payment/payment.wxss
0 → 100644
1 | +page { | |
2 | + border-top: 2rpx solid rgb(245, 245, 245); | |
3 | +} | |
4 | +.line { | |
5 | + border-top: 2rpx solid rgb(245, 245, 245); | |
6 | + width: 700rpx; | |
7 | +} | |
8 | + | |
9 | +.payradio .Success_box { | |
10 | + padding-top: 45rpx; | |
11 | + padding-bottom: 45rpx; | |
12 | +} | |
13 | + | |
14 | +.payradio .Success_box .Success_box_title { | |
15 | + margin-top: 45rpx; | |
16 | + color: rgb(8, 8, 8); | |
17 | +} | |
18 | + | |
19 | +.payradio image { | |
20 | + width: 140rpx; | |
21 | + height: 140rpx; | |
22 | + display: flex; | |
23 | +} | |
24 | + | |
25 | +.payitem_max { | |
26 | + padding: 0rpx 55rpx; | |
27 | + color: rgb(104, 104, 104); | |
28 | + padding-bottom: 30rpx; | |
29 | +} | |
30 | + | |
31 | +.payitem_max .payitem { | |
32 | + margin-top: 30rpx; | |
33 | +} | |
34 | + | |
35 | +.payitem_max .payitem .pay_nam { | |
36 | + width: 200rpx; | |
37 | +} | |
38 | + | |
39 | +.payitem_max .payitem view { | |
40 | + margin-right: 50rpx; | |
41 | +} | |
42 | +.pay_money{ | |
43 | + color: rgb(219, 27, 52); | |
44 | +} | |
45 | + | |
46 | +.pay_User { | |
47 | + padding-left: 55rpx; | |
48 | + color: rgb(104, 104, 104); | |
49 | +} | |
50 | + | |
51 | +.pay_User .payitem { | |
52 | + margin-top: 30rpx; | |
53 | +} | |
54 | + | |
55 | +.pay_User .payitem .pay_Receiving { | |
56 | + width: 128rpx; | |
57 | + margin-right: 50rpx; | |
58 | +} | |
59 | + | |
60 | +.pay_User .payitem .pay_name { | |
61 | + margin-right: 38rpx; | |
62 | + max-width: 250rpx; | |
63 | +} | |
64 | + | |
65 | +.pay_order { | |
66 | + margin-top: 115rpx; | |
67 | + color: rgb(104, 104, 104); | |
68 | + width: 560rpx; | |
69 | + height: 62rpx; | |
70 | + border-radius: 30rpx; | |
71 | + border: 3rpx solid rgb(209, 209, 209); | |
72 | +} | |
73 | + | |
74 | +.pay_home { | |
75 | + margin-top: 35rpx; | |
76 | + color: rgb(255, 255, 255); | |
77 | + width: 566rpx; | |
78 | + height: 68rpx; | |
79 | + border-radius: 30rpx; | |
80 | + background-color: rgb(219, 27, 52); | |
81 | +} | |
82 | +.address{ | |
83 | + width: 470rpx; | |
84 | +} | |
0 | 85 | \ No newline at end of file | ... | ... |
packageE/pages/user/monthgiftbag/public/buy_com.js
0 → 100644
1 | +module.exports = { | |
2 | + //开启定位 | |
3 | + wait_for_store_config: function (th) { | |
4 | + var t_time = setInterval(function () { | |
5 | + if (th.data.bconfig == null) false; | |
6 | + var e = th.data.bconfig; | |
7 | + if (e && e.is_sort_storage) { | |
8 | + wx.getLocation({ | |
9 | + type: 'gcj02', | |
10 | + success: function (res) { | |
11 | + th.data.lat = res.latitude; | |
12 | + th.data.lon = res.longitude; | |
13 | + th.data.is_get_local_ok = 1; | |
14 | + }, | |
15 | + fail: function (res) { | |
16 | + if (res.errCode == 2) { | |
17 | + th.setData({ | |
18 | + is_gps: 0 | |
19 | + }); | |
20 | + if (th.data.is_gps == 0) { | |
21 | + getApp().confirmBox("请开启GPS定位", null, 10000, !1); | |
22 | + } | |
23 | + | |
24 | + } else { | |
25 | + th.setData({ | |
26 | + is_gps: "3" | |
27 | + }); | |
28 | + } | |
29 | + | |
30 | + th.data.is_get_local_ok = 1; | |
31 | + } | |
32 | + }) | |
33 | + } else { | |
34 | + th.data.is_get_local_ok = 1; | |
35 | + } | |
36 | + clearInterval(t_time); | |
37 | + }, 500) | |
38 | + }, | |
39 | + set_user_mo_store(th,os,func){ | |
40 | + var that=th; | |
41 | + //获取用户的默认门店 | |
42 | + getApp().get_user_store(function (e) { | |
43 | + if (!e) { | |
44 | + th.data.fir_def_store = {}; //赋值空对象 | |
45 | + return false; | |
46 | + } | |
47 | + | |
48 | + if(getApp().globalData.is_dj_pk) th.setData({has_def:1}) | |
49 | + | |
50 | + var ee = JSON.parse(JSON.stringify(e)); | |
51 | + //--定时器推迟一下-- | |
52 | + setTimeout(function () { | |
53 | + if (th.data.fir_goods) var g_distr_type = th.data.fir_goods.distr_type; | |
54 | + //--如果默认门店的配送方式不对,就不能被选择,这里不控制,如果不一样,就说明配送方式不对-- | |
55 | + if (ee.distr_type != 0 && g_distr_type != 0 && ee.distr_type != g_distr_type) { | |
56 | + ee.is_no_dis = 1; | |
57 | + } | |
58 | + | |
59 | + var appd = getApp().globalData; | |
60 | + var w_time = setInterval(function () { | |
61 | + if (that.data.is_get_local_ok == 0) return false; | |
62 | + clearInterval(w_time); | |
63 | + var distance = null; | |
64 | + var e = JSON.parse(JSON.stringify(ee)); | |
65 | + | |
66 | + //如果有开启近距离的话,同时距离优不一样了 | |
67 | + if (that.data.lat != null) { | |
68 | + //如果经纬度有变化的话 | |
69 | + if (e && appd.lat == that.data.lat && appd.lon == that.data.lon && e.distance > 0) { | |
70 | + that.set_def_storage(e); | |
71 | + if(func) func(); | |
72 | + } else { | |
73 | + //要用接口是获取距离,js的计算不准 | |
74 | + getApp().request.promiseGet("/api/weshop/pickup/list", { | |
75 | + data: { | |
76 | + store_id: os.stoid, | |
77 | + pickup_id: e.pickup_id, | |
78 | + lat: th.data.lat, | |
79 | + lon: th.data.lon, | |
80 | + isstop: 0, | |
81 | + is_pos: 1 | |
82 | + }, | |
83 | + }).then(res => { | |
84 | + if (res.data.code == 0) { | |
85 | + e = res.data.data.pageData[0]; | |
86 | + if (e) { | |
87 | + e.is_no_dis = ee.is_no_dis; | |
88 | + appd.pk_store = e; | |
89 | + that.set_def_storage(e); | |
90 | + } | |
91 | + | |
92 | + } | |
93 | + if(func) func(); | |
94 | + }) | |
95 | + } | |
96 | + //e.distance = distance; | |
97 | + appd.lat = that.data.lat; | |
98 | + appd.lon = that.data.lon; | |
99 | + | |
100 | + } else { | |
101 | + if (e) { | |
102 | + e.distance = null; | |
103 | + that.set_def_storage(e); | |
104 | + } | |
105 | + if(func) func(); | |
106 | + } | |
107 | + }, 500) | |
108 | + }, 700) | |
109 | + }) | |
110 | + | |
111 | + }, | |
112 | + | |
113 | + //---------拿出门店分类和门店------------ | |
114 | + get_sto(th,os) { | |
115 | + var that = th; | |
116 | + var self=this; | |
117 | + var timer_get = setInterval(function () { | |
118 | + if (th.data.is_get_local_ok == 0) return false; | |
119 | + var dd = null; | |
120 | + | |
121 | + dd = { | |
122 | + store_id: os.stoid, | |
123 | + isstop: 0, | |
124 | + is_pos: 1, | |
125 | + pageSize: 2000, | |
126 | + } | |
127 | + | |
128 | + //如果有距离的话 | |
129 | + if (th.data.lat != null) { | |
130 | + dd.lat = th.data.lat; | |
131 | + dd.lon = th.data.lon; | |
132 | + } | |
133 | + | |
134 | + if(th.data.sele_g && th.data.sele_g.pickup_list){ | |
135 | + dd.ids=th.data.sele_g.pickup_list | |
136 | + } | |
137 | + | |
138 | + clearInterval(timer_get); | |
139 | + | |
140 | + //如果会员是有默认的门店话 | |
141 | + if (!th.data.def_pick_store && th.data.fir_def_store) { | |
142 | + th.setData({def_pick_store: th.data.fir_def_store}); | |
143 | + } | |
144 | + wx.showLoading({ | |
145 | + title: '加载中.' | |
146 | + }); | |
147 | + //----------获取门店---------------- | |
148 | + getApp().request.promiseGet("/api/weshop/pickup/list", { | |
149 | + data: dd, | |
150 | + }).then(res => { | |
151 | + var e = res; | |
152 | + | |
153 | + if (e.data.code == 0 && e.data.data && e.data.data.pageData && e.data.data.pageData.length > 0) { | |
154 | + | |
155 | + var his_cate_num = 0; | |
156 | + for (let i in e.data.data.pageData) { | |
157 | + let item = e.data.data.pageData[i]; | |
158 | + if (item.category_id > 0) { | |
159 | + his_cate_num = 1; | |
160 | + break; | |
161 | + } | |
162 | + } | |
163 | + e.his_cate_num = his_cate_num; | |
164 | + | |
165 | + //如果有开启距离的功能,没有设置默认门店,要用最近的门店作为默认门店 | |
166 | + if (dd.lat && (!th.data.def_pick_store || JSON.stringify(th.data.def_pick_store) == '{}') && th.data.bconfig && th.data.bconfig.is_sort_storage) { | |
167 | + th.setData({ | |
168 | + def_pick_store: e.data.data.pageData[0], | |
169 | + sto_sele_name: e.data.data.pageData[0].pickup_name, | |
170 | + sto_sele_id: e.data.data.pageData[0].pickup_id, | |
171 | + sto_sele_distr: e.data.data.pageData[0].distr_type | |
172 | + }); | |
173 | + th.data.fir_def_store = e.data.data.pageData[0]; | |
174 | + } | |
175 | + | |
176 | + //-- 如果有默认选择门店的时候,要把默认门店放在第一位,修改不要配送方式的判断 -- | |
177 | + if (th.data.def_pick_store && JSON.stringify(th.data.def_pick_store) != '{}') { | |
178 | + for (var k = 0; k < e.data.data.pageData.length; k++) { | |
179 | + if (e.data.data.pageData[k].pickup_id == th.data.def_pick_store.pickup_id) { | |
180 | + e.data.data.pageData.splice(k, 1); //删除 | |
181 | + break; | |
182 | + } | |
183 | + } | |
184 | + e.data.data.pageData.splice(0, 0, th.data.def_pick_store); //添加 | |
185 | + } | |
186 | + | |
187 | + th.setData({all_pick_list: e.data.data.pageData}); | |
188 | + | |
189 | + setTimeout(function () { | |
190 | + self.deal_pickup(e,th,os); //--普通门店排版-- | |
191 | + }, 800) | |
192 | + | |
193 | + } | |
194 | + }) | |
195 | + }, 200) | |
196 | + | |
197 | + }, | |
198 | + | |
199 | + //-- 统一购买 -- | |
200 | + buy_libao:function (th) { | |
201 | + let then1=this | |
202 | + if(th.data.sele_g.is_pickup){ | |
203 | + if(!th.data.def_pick_store || (th.data.def_pick_store && !th.data.def_pick_store.pickup_id) ){ | |
204 | + getApp().my_warnning("请先选择门店", 1, th); | |
205 | + return false; | |
206 | + } | |
207 | + | |
208 | + if(th.data.def_pick_store.is_no_dis){ | |
209 | + getApp().my_warnning("门店不匹配,请重新选择", 1, th); | |
210 | + return false; | |
211 | + } | |
212 | + } | |
213 | + | |
214 | + th.setData({submit:1}) | |
215 | + var id=th.data.sele_g.id; | |
216 | + var that=th; | |
217 | + var json = { | |
218 | + "actId": '', //活动Id | |
219 | + "actType": '', //活动类型 1:新人礼、2:评价有礼、3:节日营销、4:生日营销 | |
220 | + "buyType":""+that.data.buyType, //1=积分兑换 2=余额购买 | |
221 | + "giftBagId": id, //每月礼包主表id | |
222 | + "storeId": that.data.getStorageID, //商家Id | |
223 | + "userId": that.data.getUserID, //用户ID | |
224 | + "buyFrom": 2, | |
225 | + }; | |
226 | + | |
227 | + if(that.data.first_leader){ | |
228 | + json.first_leader=that.data.first_leader | |
229 | + } | |
230 | + if(that.data.guide_id){ | |
231 | + json.guide_id=that.data.guide_id | |
232 | + } | |
233 | + | |
234 | + if(th.data.sele_g.is_pickup && that.data.def_pick_store){ | |
235 | + json.pickup_id=that.data.def_pick_store.pickup_id; | |
236 | + } | |
237 | + | |
238 | + //-- 分享导购要记录 -- | |
239 | + if (getApp().globalData.guide_id) { | |
240 | + json.guide_id = getApp().globalData.guide_id; | |
241 | + } | |
242 | + | |
243 | + // var url ="/api/weshop/marketing/buy/receive/gift/record/insert"; | |
244 | + var url ="/api/weshop/marketing/marketingMonthgiftbagRecord/createOrder"; | |
245 | + getApp().request.json_post(url, json, | |
246 | + function (res) { | |
247 | + if (res.data.code == 0 && res.data.data) { | |
248 | + switch(that.data.buyType){ | |
249 | + case 1://立即兑换 | |
250 | + th.setData({submit:0}) | |
251 | + getApp().my_warnning("兑换成功!", 1, th); | |
252 | + th.closeSpecModal(); | |
253 | + break; | |
254 | + case 2://立即购买 | |
255 | + var order_sn = res.data.data.orderSn; | |
256 | + res = res.data.data.result; | |
257 | + if (!res) return false; | |
258 | + var money=that.data.payMoney; | |
259 | + var url = "/packageE/pages/user/monthgiftbag/payment/payment?money=" + money + "&order_sn=" + order_sn; | |
260 | + getApp().globalData.no_clear=1; | |
261 | + wx.requestPayment({ | |
262 | + timeStamp: String(res.timeStamp), | |
263 | + nonceStr: res.nonceStr, | |
264 | + package: res.packageValue, | |
265 | + signType: res.signType, | |
266 | + paySign: res.paySign, | |
267 | + success: function (res) { | |
268 | + th.setData({submit:0}) | |
269 | + getApp().goto(url); | |
270 | + }, | |
271 | + fail: function (res) { | |
272 | + th.setData({submit:0}) | |
273 | + getApp().my_warnning("取消支付", 0, th); | |
274 | + then1.reduce(order_sn,that.data.getStorageID) | |
275 | + } | |
276 | + }); | |
277 | + break; | |
278 | + case 3://立即领取 | |
279 | + th.setData({submit:0}) | |
280 | + getApp().my_warnning("领取成功!", 1, th); | |
281 | + th.closeSpecModal(); | |
282 | + break; | |
283 | + } | |
284 | + | |
285 | + } else { | |
286 | + th.setData({submit:0}) | |
287 | + getApp().my_warnning(res.data.msg, 0, th); | |
288 | + } | |
289 | + }, | |
290 | + function (res) { | |
291 | + th.setData({submit:0}) | |
292 | + } | |
293 | + ) | |
294 | + | |
295 | + }, | |
296 | + | |
297 | + | |
298 | + //每月礼包减少购买数量 | |
299 | + reduce(order_sn,stoid){ | |
300 | + wx.showLoading({ | |
301 | + title: '加载中.' | |
302 | + }); | |
303 | + getApp().request.put("/api/weshop/marketing/marketingMonthgiftbagRecord/updateSubBuyNum", { | |
304 | + data: { | |
305 | + store_id: stoid, | |
306 | + order_sn | |
307 | + }, | |
308 | + success: function (ee) { | |
309 | + wx.hideLoading() | |
310 | + }, | |
311 | + | |
312 | + }); | |
313 | + }, | |
314 | + | |
315 | + //------------处理门店--------------- | |
316 | + deal_pickup(e,th,os) { | |
317 | + | |
318 | + if (!th.data.sele_g) return false | |
319 | + wx.hideLoading(); | |
320 | + | |
321 | + //单总量超出10个的时候,同时门店有分类 | |
322 | + if (e.data.data.total > 10 && e.his_cate_num) { | |
323 | + getApp().request.get("/api/weshop/storagecategory/page", { | |
324 | + data: { | |
325 | + store_id: os.stoid, | |
326 | + pageSize: 1000, | |
327 | + orderField: "sort", | |
328 | + orderType: 'asc', | |
329 | + }, | |
330 | + success: function (ee) { | |
331 | + if (ee.data.code == 0) { | |
332 | + var check_all_cate = 0; | |
333 | + if (ee.data.data && ee.data.data.pageData && ee.data.data.pageData.length > 0) { | |
334 | + for (let i in ee.data.data.pageData) { | |
335 | + let item = ee.data.data.pageData[i]; | |
336 | + if (item.is_show == 1) { | |
337 | + check_all_cate = 1; | |
338 | + break | |
339 | + } | |
340 | + } | |
341 | + } | |
342 | + if (check_all_cate) { | |
343 | + var sto_cate = ee.data.data.pageData; | |
344 | + var sto_arr = e.data.data.pageData; | |
345 | + var newarr = new Array(); | |
346 | + var qita = new Array(); | |
347 | + | |
348 | + | |
349 | + var is_del_pk = 0; | |
350 | + //----要进行门店分组-------- | |
351 | + for (var i = 0; i < sto_arr.length; i++) { | |
352 | + //找一下这个门店有没有在分类数组内 | |
353 | + var find2 = 0, find2name = "", sort = 0; | |
354 | + is_del_pk = 0; | |
355 | + for (var m = 0; m < sto_cate.length; m++) { | |
356 | + if (sto_arr[i].category_id == sto_cate[m].cat_id) { | |
357 | + if (sto_cate[m].is_show != 1) { | |
358 | + is_del_pk = 1; | |
359 | + sto_arr.splice(i, 1); | |
360 | + i--; | |
361 | + } else { | |
362 | + find2 = sto_cate[m].cat_id; | |
363 | + find2name = sto_cate[m].cat_name; | |
364 | + sort = sto_cate[m].sort; | |
365 | + is_del_pk = 0; | |
366 | + } | |
367 | + break; | |
368 | + } | |
369 | + } | |
370 | + if (is_del_pk) continue; | |
371 | + | |
372 | + if (newarr.length > 0) { | |
373 | + var find = 0; | |
374 | + //如果有找到,那门店就在这个分组内,否则,分类就要排在其他 | |
375 | + if (find2 != 0) { | |
376 | + for (var ii = 0; ii < newarr.length; ii++) { | |
377 | + if (sto_arr[i].category_id == newarr[ii].cat_id) { | |
378 | + newarr[ii].s_arr.push(sto_arr[i]); | |
379 | + find = 1; | |
380 | + break; | |
381 | + } | |
382 | + } | |
383 | + if (find == 0) { | |
384 | + var arr0 = new Array(); | |
385 | + arr0.push(sto_arr[i]); | |
386 | + var item = { | |
387 | + cat_id: find2, | |
388 | + name: find2name, | |
389 | + sort: sort, | |
390 | + s_arr: arr0 | |
391 | + }; | |
392 | + newarr.push(item); | |
393 | + } | |
394 | + } else { | |
395 | + qita.push(sto_arr[i]); | |
396 | + } | |
397 | + } else { | |
398 | + //如果有找到,那门店就在这个分组内,否则,分类就要排在其他 | |
399 | + if (find2 != 0) { | |
400 | + var arr0 = new Array(); | |
401 | + arr0.push(sto_arr[i]); | |
402 | + var item = { | |
403 | + cat_id: find2, | |
404 | + name: find2name, | |
405 | + sort: sort, | |
406 | + s_arr: arr0 | |
407 | + }; | |
408 | + newarr.push(item); | |
409 | + } else { | |
410 | + qita.push(sto_arr[i]); | |
411 | + } | |
412 | + } | |
413 | + } | |
414 | + | |
415 | + var def_arr = new Array(); | |
416 | + //-- 开始就看10个门店 -- | |
417 | + for (var k = 0; k < 10; k++) { | |
418 | + if (k == sto_arr.length) break; | |
419 | + def_arr.push(sto_arr[k]); | |
420 | + } | |
421 | + | |
422 | + th.setData({ | |
423 | + def_pickpu_list: def_arr, | |
424 | + pickpu_list: ee.data.data.pageData | |
425 | + }); | |
426 | + | |
427 | + | |
428 | + //门店分类要排序下 | |
429 | + function compare(property) { | |
430 | + return function (a, b) { | |
431 | + var value1 = a[property]; | |
432 | + var value2 = b[property]; | |
433 | + return value1 - value2; | |
434 | + } | |
435 | + } | |
436 | + | |
437 | + if (newarr.length > 0) | |
438 | + newarr.sort(compare("sort")); | |
439 | + | |
440 | + | |
441 | + //----安排其他的分类----- | |
442 | + if (qita.length > 0) { | |
443 | + var item = { | |
444 | + cat_id: -1, | |
445 | + name: "其他", | |
446 | + s_arr: qita | |
447 | + }; | |
448 | + newarr.push(item); | |
449 | + } | |
450 | + | |
451 | + var sd = { | |
452 | + all_sto: newarr, | |
453 | + is_show_sto_cat: 1 | |
454 | + } | |
455 | + if (!sto_arr || sto_arr.length <= 10) { | |
456 | + sd.is_show_sto_cat = -1; | |
457 | + sd.only_pk = sto_arr; | |
458 | + } | |
459 | + th.setData(sd); | |
460 | + | |
461 | + } else { | |
462 | + th.setData({ | |
463 | + is_show_sto_cat: -1, | |
464 | + only_pk: e.data.data.pageData | |
465 | + }); | |
466 | + //-----如果没有默认门店,要取第一个门店作为默认店.此时没有门店分类的情况------ | |
467 | + if (!th.data.def_pick_store) { | |
468 | + th.setData({ | |
469 | + def_pick_store: e.data.data.pageData[0], | |
470 | + sto_sele_name: e.data.data.pageData[0].pickup_name, | |
471 | + sto_sele_id: e.data.data.pageData[0].pickup_id, | |
472 | + sto_sele_distr: e.data.data.pageData[0].distr_type | |
473 | + }) | |
474 | + } | |
475 | + } | |
476 | + } else { | |
477 | + th.setData({ | |
478 | + is_show_sto_cat: -1, | |
479 | + only_pk: e.data.data.pageData | |
480 | + }); | |
481 | + //-----如果没有默认门店,要取第一个门店作为默认店.此时没有门店分类的情况------ | |
482 | + if (!th.data.def_pick_store) { | |
483 | + th.setData({ | |
484 | + def_pick_store: e.data.data.pageData[0], | |
485 | + sto_sele_name: e.data.data.pageData[0].pickup_name, | |
486 | + sto_sele_id: e.data.data.pageData[0].pickup_id, | |
487 | + sto_sele_distr: e.data.data.pageData[0].distr_type | |
488 | + }) | |
489 | + } | |
490 | + | |
491 | + } | |
492 | + } | |
493 | + }); | |
494 | + } else { | |
495 | + th.setData({ | |
496 | + is_show_sto_cat: 0, | |
497 | + only_pk: e.data.data.pageData | |
498 | + }); | |
499 | + //-----如果没有默认门店,要取第一个门店作为默认店------ | |
500 | + if (!th.data.def_pick_store && th.data.bconfig && th.data.bconfig.is_sort_storage) { | |
501 | + th.setData({ | |
502 | + def_pick_store: e.data.data.pageData[0], | |
503 | + sto_sele_name: e.data.data.pageData[0].pickup_name, | |
504 | + sto_sele_id: e.data.data.pageData[0].pickup_id, | |
505 | + sto_sele_distr: e.data.data.pageData[0].distr_type | |
506 | + }) | |
507 | + } | |
508 | + } | |
509 | + }, | |
510 | + | |
511 | + check_def_pk:function (th) { | |
512 | + th.data.def_pick_store.is_no_dis=0; | |
513 | + var def_pick_store=th.data.def_pick_store | |
514 | + var sele_g=th.data.sele_g; | |
515 | + var arr=sele_g.pickup_list.split(','); | |
516 | + | |
517 | + var idx=arr.findIndex(function (e) { | |
518 | + return e==def_pick_store.pickup_id; | |
519 | + }) | |
520 | + | |
521 | + if(idx==-1){ | |
522 | + def_pick_store.is_no_dis=1; | |
523 | + } | |
524 | + th.setData({def_pick_store}) | |
525 | + | |
526 | + } | |
527 | + | |
528 | + | |
529 | + | |
530 | + | |
531 | +} | |
0 | 532 | \ No newline at end of file | ... | ... |
packageE/pages/user/monthgiftbag/public/buy_com.wxml
0 → 100644
1 | +<!-- 选择门店的弹框,1.1版最新的 --> | |
2 | +<block wx:if="{{store}}"> | |
3 | + <view class="mongolia-layer" bindtap="close_popup"></view> | |
4 | + <view class="popup-frame"> | |
5 | + <block wx:if="{{sort_store==0}}"> | |
6 | + <!-- 头部 标题 --> | |
7 | + <view class="popup-top flex-space-between"> | |
8 | + <text class="fs32 nearby_store">{{choice_sort_store==0?'附近的门店':region_name}}</text> | |
9 | + <view> | |
10 | + <view> | |
11 | + <icon bindtap="close_popup" class="modal-closes" color="black" size="22" type="cancel"></icon> | |
12 | + </view> | |
13 | + <view class="felx choose_more" bindtap="more_store" wx:if="{{is_show_sto_cat>0}}"> | |
14 | + <text class="fs26 red-co" >{{choice_sort_store==0?'更多门店':'返回'}}</text> <view class="bg_rights" ></view> | |
15 | + </view> | |
16 | + </view> | |
17 | + </view> | |
18 | + <!-- 门店列表,最外层的门店列表,一开始 --> | |
19 | + <view class="store-list"> | |
20 | + <!-- 如果还没有点击更多门店的时候 --> | |
21 | + <block wx:if="{{choice_sort_store==0}}"> | |
22 | + <!-- 需要for循环 --> | |
23 | + <block wx:if="{{is_show_sto_cat==1}}"> | |
24 | + <view class="store_choose flex" wx:for="{{def_pickpu_list}}" bindtap="choose_for_store_fir" data-ind="{{index}}"> | |
25 | + <view class="store flex-vertical"> | |
26 | + <!-- 需要点击事件 --> | |
27 | + <block wx:if="{{index==fir_pick_index}}"> | |
28 | + <view class="circle white xc-hook fs20 red-b">Г</view> | |
29 | + </block> | |
30 | + <block wx:else> | |
31 | + <view class="circle xc-hooks"></view> | |
32 | + </block> | |
33 | + <view class="address-frame xc-ash"> | |
34 | + <view class="flex-vertical-between butttem5"> | |
35 | + <view class="flex xc-ash"> | |
36 | + <view class="fs30 xc-black3 address_name">{{item.pickup_name}}</view> | |
37 | + </view> | |
38 | + <view> | |
39 | + <view class="distance fs24 address-val" wx:if="{{item.distance!=null}}"> | |
40 | + 距离:{{item.distance>1000?filter.toFix(item.distance/1000,2)+'km':filter.toFix(item.distance,0)+"m"}} | |
41 | + </view> | |
42 | + </view> | |
43 | + </view> | |
44 | + <view class="fs24 xc-ash-9f">地址:{{item.fulladdress}}</view> | |
45 | + </view> | |
46 | + </view> | |
47 | + </view> | |
48 | + </block> | |
49 | + <block wx:else> | |
50 | + <view class="store_choose flex" wx:for="{{only_pk}}" bindtap="choose_for_store_fir" data-ind="{{index}}"> | |
51 | + <view class="store flex-vertical"> | |
52 | + <!-- 需要点击事件 --> | |
53 | + <block wx:if="{{index==fir_pick_index}}"> | |
54 | + <view class="circle white xc-hook fs20 red-b">Г</view> | |
55 | + </block> | |
56 | + <block wx:else> | |
57 | + <view class="circle xc-hooks"></view> | |
58 | + </block> | |
59 | + <view class="address-frame xc-ash"> | |
60 | + <view class="flex-vertical-between "> | |
61 | + <view class="flex xc-ash"> | |
62 | + <view class="fs30 xc-black3 address_name">{{item.pickup_name}}</view> | |
63 | + </view> | |
64 | + <view> | |
65 | + <view class="distance fs24 address-val" wx:if="{{item.distance!=null}}"> | |
66 | + 距离:{{item.distance>1000?filter.toFix(item.distance/1000,2)+"km":filter.toFix(item.distance,0)+"m"}} | |
67 | + </view> | |
68 | + </view> | |
69 | + </view> | |
70 | + <view class="fs24 xc-ash-9f">地址:{{item.fulladdress}}</view> | |
71 | + </view> | |
72 | + </view> | |
73 | + </view> | |
74 | + </block> | |
75 | + </block> | |
76 | + <block wx:else> | |
77 | + <!-- 如果是点击选择门店分类后显示分类下的门店 --> | |
78 | + <view class="store_choose flex" wx:for="{{sec_sto.s_arr}}" data-ind="{{index}}" bindtap="choose_for_store"> | |
79 | + <view class="store flex-vertical"> | |
80 | + <!-- 需要点击事件 --> | |
81 | + <block wx:if="{{index==sec_pick_index}}"> | |
82 | + <view class="circle white xc-hook fs20 red-b">Г</view> | |
83 | + </block> | |
84 | + <block wx:else> | |
85 | + <view class="circle xc-hooks"></view> | |
86 | + </block> | |
87 | + <view class="address-frame xc-ash"> | |
88 | + <view class="flex-vertical-between "> | |
89 | + <view class="flex xc-ash"> | |
90 | + <view class="fs28 xc-black3 address_name">{{item.pickup_name}}</view> | |
91 | + </view> | |
92 | + <view> | |
93 | + <view class="distance fs24 address-val" wx:if="{{item.distance!=null}}"> | |
94 | + 距离:{{item.distance>1000?filter.toFix(item.distance/1000,2)+"km":filter.toFix(item.distance,0)+"m"}} | |
95 | + </view> | |
96 | + </view> | |
97 | + </view> | |
98 | + <view class="fs24 xc-ash-9f">地址:{{item.fulladdress}}</view> | |
99 | + </view> | |
100 | + </view> | |
101 | + </view> | |
102 | + </block> | |
103 | + </view> | |
104 | + <!-- 门店列表底部 --> | |
105 | + <view class="store-bottom-frame"> | |
106 | + <view class="store-bottom flex-vertical-between"> | |
107 | + <view class="determine red-b fs28 white t-c" bindtap="sure_pick" data-openindstore="{{open_ind_store}}"> | |
108 | + 确定 | |
109 | + </view> | |
110 | + <view class="default t-c fs28" bindtap="set_def_pick" data-openindstore="{{open_ind_store}}"> | |
111 | + 设为默认 | |
112 | + </view> | |
113 | + </view> | |
114 | + </view> | |
115 | + </block> | |
116 | + <block wx:else> | |
117 | + <view class="popup-top flex-space-between"> | |
118 | + <text class="fs32 nearby_store">门店分类选择</text> | |
119 | + <view> | |
120 | + <view> | |
121 | + <icon bindtap="close_popup" class="modal-closes" color="black" size="22" type="cancel"></icon> | |
122 | + </view> | |
123 | + <view class="felx choose_mores" bindtap="returns"> | |
124 | + <text class="fs26 red-co">返回</text> | |
125 | + </view> | |
126 | + </view> | |
127 | + </view> | |
128 | + <view class="sort_store_list"> | |
129 | + <view class="sort-store-frame" wx:for="{{all_sto}}" data-index="{{index}}" bindtap="choice_sort_store" data-region="{{item.name}}"> | |
130 | + <view class="sort-store flex-vertical-between"> | |
131 | + <view class="fs30" di>{{item.name}}</view> | |
132 | + <view class="black_rights-frame"> | |
133 | + <view class="black_rights"></view> | |
134 | + </view> | |
135 | + </view> | |
136 | + </view> | |
137 | + </view> | |
138 | + </block> | |
139 | + </view> | |
140 | +</block> | |
141 | + | |
142 | + <!-- --弹起来,选择规格数量,普通商品购买和秒杀---- --> | |
143 | +<view hidden="{{!openSpecModal}}"> | |
144 | + <view bindtap="closeSpecModal" class="cover-layer"></view> | |
145 | + <view class="spec-model"> | |
146 | + <view class="pding"> | |
147 | + <icon bindtap="closeSpecModal" class="modal-close" color="black" size="22" type="cancel"></icon> | |
148 | + <view class="spec-goods"> | |
149 | + <image class="wh100 spec-img xc-distance-bottom" bindtap="previewImage" src="{{iurl+(sele_g.cover_img?sele_g.cover_img:sele_g.lbUrl)}}" binderror="pop_err_img" data-errorimg=""></image> | |
150 | + <view class="spec-goods-info"> | |
151 | + <view class="spec-goods-name ellipsis-2">{{sele_g.giftTitle}}</view> | |
152 | + <view class="flex ai_end xc-val-money"> | |
153 | + <view class="spec-goods-price"> | |
154 | + <block wx:if="{{sele_g.payMoney>0}}"> | |
155 | + <text>{{"¥"+sele_g.payMoney}}</text> | |
156 | + </block> | |
157 | + <block wx:if="{{sele_g.payMoney>0&&sele_g.payIntegral>0}}"> | |
158 | + <text>/</text> | |
159 | + </block> | |
160 | + <block wx:if="{{sele_g.payIntegral>0}}"> | |
161 | + <view class="flex"> | |
162 | + <text class="ellipsis-1">{{sele_g.payIntegral}}</text> | |
163 | + <view>积分</view> | |
164 | + </view> | |
165 | + </block> | |
166 | + | |
167 | + </view> | |
168 | + </view> | |
169 | + | |
170 | + | |
171 | + <view class="flex"> | |
172 | + <view class="spec-goods-stock" >已售:{{sele_g.giftQty}}</view> | |
173 | + <view class="spec-goods-stock">可售:{{sele_g.lbnum-sele_g.giftQty+(sele_g.virtualsales?sele_g.virtualsales:0)}}</view> | |
174 | + </view> | |
175 | + | |
176 | + </view> | |
177 | + <!-- 选择门店模块 --> | |
178 | + <view class="flex-space-between address ai_end xc-width "> | |
179 | + <view class="flex ai_end" wx:if="{{def_pick_store && def_pick_store.pickup_name}}"> | |
180 | + <text class="fs30 xc-black3 shop_name bold">{{def_pick_store.pickup_name}}</text> | |
181 | + <view class="distance fs24 xc-ash" wx:if="{{def_pick_store.distance!=null}}"> | |
182 | + 距离:{{def_pick_store.distance>1000?filter.toFix(def_pick_store.distance/1000,2)+"km":filter.toFix(def_pick_store.distance,0)+"m"}} | |
183 | + </view> | |
184 | + </view> | |
185 | + <!-- 没有门店的时候 --> | |
186 | + <view class="flex" bindtap="choice_store" wx:else> | |
187 | + <image class="stores-img" src="{{iurl}}/miniapp/images/stores.png"></image> | |
188 | + <view class="fs30" style="color:black;">选择门店</view> | |
189 | + </view> | |
190 | + <view hidden="{{has_def && sys_switch.is_pricing_open_store}}" class="red-co fs28" bindtap="choice_store">更多门店<text class="right-arrow"></text></view> | |
191 | + </view> | |
192 | + <view wx:if="{{only_pk && !only_pk.length}}">(库存不足)</view> | |
193 | + <block wx:else> | |
194 | + <view wx:if="{{def_pickpu_list && !def_pickpu_list.length}}">(库存不足)</view> | |
195 | + <block wx:else> | |
196 | + <view class="no_store" wx:if="{{def_pick_store.is_no_dis}}">(配送不匹配)</view> | |
197 | + <view wx:elif="{{def_pick_store && !def_pick_store.CanOutQty && sales_rules==2 && prom_type==0}}"> | |
198 | + (库存不足) | |
199 | + </view> | |
200 | + </block> | |
201 | + </block> | |
202 | + <view class="fs24 xc-ash-9f xc-distance-top " wx:if="{{def_pick_store && def_pick_store.fulladdress}}"> | |
203 | + 地址:{{def_pick_store.fulladdress}} | |
204 | + </view> | |
205 | + </view> | |
206 | + <!-- 商品的属性项目 --> | |
207 | + | |
208 | + | |
209 | + </view> | |
210 | + <view class="spec-cart-btns"> | |
211 | + <!-- 根本就找不到门店 --> | |
212 | + <block wx:if="{{!only_pk && !def_pickpu_list}}"> | |
213 | + <view class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999;"> | |
214 | + 未找到门店 | |
215 | + </view> | |
216 | + </block> | |
217 | + <block wx:else> | |
218 | + <block wx:if="{{only_pk && !only_pk.length}}"> | |
219 | + <view class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999;"> | |
220 | + 未找到门店 | |
221 | + </view> | |
222 | + </block> | |
223 | + <block wx:else> | |
224 | + <block wx:if="{{def_pickpu_list && !def_pickpu_list.length}}"> | |
225 | + <view class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999"> | |
226 | + 库存不足 | |
227 | + </view> | |
228 | + </block> | |
229 | + <block wx:else> | |
230 | + <block wx:if="{{!def_pick_store}}"> | |
231 | + <view class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999"> | |
232 | + 请先选择门店 | |
233 | + </view> | |
234 | + </block> | |
235 | + <block wx:else> | |
236 | + <block wx:if="{{sele_g.store_count<=0}}"> | |
237 | + <view class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999"> | |
238 | + 库存不足 | |
239 | + </view> | |
240 | + </block> | |
241 | + <block wx:else> | |
242 | + <button bindtap="buy_libao" disabled="{{submit}}" style="display: block" class="spec-cart-btn {{buyType==2?'yellow':'red-b'}} fs32" data-action="add"> | |
243 | + <text wx:if="{{buyType==1}}">立即兑换</text> | |
244 | + <text wx:if="{{buyType==2}}">立即购买</text> | |
245 | + <text wx:if="{{buyType==3}}">立即领取</text> | |
246 | + </button> | |
247 | + </block> | |
248 | + | |
249 | + </block> | |
250 | + </block> | |
251 | + </block> | |
252 | + </block> | |
253 | + | |
254 | + </view> | |
255 | + <view class="clear"></view> | |
256 | + | |
257 | + </view> | |
258 | +</view> | |
0 | 259 | \ No newline at end of file | ... | ... |
pages/giftpack/public/buy_com.js
... | ... | @@ -199,7 +199,7 @@ module.exports = { |
199 | 199 | //-- 统一购买 -- |
200 | 200 | buy_libao:function (th) { |
201 | 201 | if(th.data.sele_g.is_pickup){ |
202 | - if(!th.data.def_pick_store && !th.data.def_pick_store.pickup_id){ | |
202 | + if(!th.data.def_pick_store || (th.data.def_pick_store && !th.data.def_pick_store.pickup_id)){ | |
203 | 203 | getApp().my_warnning("请先选择门店", 1, th); |
204 | 204 | return false; |
205 | 205 | } | ... | ... |