Commit 04fa2399fbbba38378dcc6a51abc562f4d051f77
1 parent
39c2b351
服务卡项的优化
Showing
11 changed files
with
8460 additions
and
31 deletions
components/serviceCard_list/serviceCard_list.js
... | ... | @@ -154,9 +154,45 @@ Component({ |
154 | 154 | }, |
155 | 155 | |
156 | 156 | go_url:function (e) { |
157 | - var url=e.currentTarget.dataset.url; | |
158 | - console.log('url===>>>>', url); | |
159 | - getApp().goto(url); | |
157 | + var gid = e.currentTarget.dataset.gid; | |
158 | + var rurl = '/api/weshop/activitylist/listGoodActInfo2New'; | |
159 | + var req_d = { | |
160 | + "store_id": app.globalData.setting.stoid, | |
161 | + "goods_id": gid, | |
162 | + "user_id": getApp().globalData.user_id, | |
163 | + "goods_type":1 | |
164 | + } | |
165 | + var res= await getApp().request.promiseGet(rurl, {data: req_d}); | |
166 | + | |
167 | + var url = "/packageA/pages/goodsInfo/goodsInfo?goods_id=" + gid; | |
168 | + if (res.data.code == 0 && res.data.data && res.data.data.length > 0) { | |
169 | + var arr = res.data.data; | |
170 | + let times = new Date().getTime(); | |
171 | + //-- 预热也要计算 -- | |
172 | + var arr2 = arr.filter(function (e) { | |
173 | + return e.s_time < ut.gettimestamp() || (e.warm_uptime && e.warm_uptime < ut.gettimestamp()) | |
174 | + }) | |
175 | + if(arr2.length==1) { | |
176 | + switch(arr2[0].prom_type){ | |
177 | + case 1: | |
178 | + url+="&prom_type=1&prom_id="+arr2[0].act_id; | |
179 | + break; | |
180 | + case 2: | |
181 | + url="/packageG/pages/group_buy/goodsInfo/goodsInfo?goods_id="+gid+"&prom_id="+arr2[0].act_id; | |
182 | + break; | |
183 | + case 6: | |
184 | + url = `/packageA/pages/serviceCard_pd/goodsInfo/goodsInfo?goods_id=${gid}&prom_type=${arr2[0].prom_type}&prom_id=${arr2[0].act_id}`; | |
185 | + break; | |
186 | + case 8: | |
187 | + url = `/packageC/pages/presell/cardInfo/goodsInfo?goods_id=${gid}&prom_id=${arr2[0].act_id}`; | |
188 | + break; | |
189 | + } | |
190 | + } | |
191 | + | |
192 | + } | |
193 | + | |
194 | + | |
195 | + app.goto(url); | |
160 | 196 | } |
161 | 197 | |
162 | 198 | }, | ... | ... |
components/serviceCard_list/serviceCard_list.wxml
... | ... | @@ -5,7 +5,7 @@ |
5 | 5 | <view class="hang "> |
6 | 6 | <!-- 商品详情 --> |
7 | 7 | |
8 | - <view class="collect ib" wx:for="{{recommend}}" bindtap="go_url" data-url="/packageA/pages/goodsInfo/goodsInfo?goods_id={{item.id}}"> | |
8 | + <view class="collect ib" wx:for="{{recommend}}" bindtap="go_url" data-gid="{{item.id}}"> | |
9 | 9 | <!--<view class="collect ib" wx:for="{{recommend}}" bindtap="go_url" data-url="{{item.prom_type == 9 ? ('/packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo?goods_id=' + item.goods_id + '&group_id=' + item.prom_id):('/pages/goods/goodsInfo/goodsInfo?goods_id='+item.goods_id+'&title='+item.goods_name+'&prom_type='+item.prom_type+'&prom_id='+item.prom_id)}}">--> |
10 | 10 | <!-- <navigator url="/pages/goods/goodsInfo/goodsInfo?goods_id={{item.goods_id}}&title={{item.goods_name}}&prom_type={{item.prom_type}}&prom_id={{item.prom_id}}" hover-class="none"> --> |
11 | 11 | <navigator hover-class="none"> | ... | ... |
packageA/pages/cart2_ser/cart2_ser.js
... | ... | @@ -267,7 +267,7 @@ Page({ |
267 | 267 | t.data.data['buynum'] = gg.goods_num; |
268 | 268 | t.data.data.shop_price = gd.money; |
269 | 269 | |
270 | - if(th.data.postdata.prom_type == 1) { | |
270 | + if([1,2].includes(th.data.postdata.prom_type)) { | |
271 | 271 | let postdata = th.data.postdata; |
272 | 272 | t.data.data.shop_price = postdata.prom_price; |
273 | 273 | }; |
... | ... | @@ -604,7 +604,7 @@ Page({ |
604 | 604 | 'prom_id': this.data.postdata.prom_id, //促销活动id |
605 | 605 | }; |
606 | 606 | |
607 | - if(this.data.postdata.prom_type == 1) { | |
607 | + if([1,2].includes(this.data.postdata.prom_type)) { | |
608 | 608 | goods.price = this.data.postdata.prom_price; |
609 | 609 | }; |
610 | 610 | ... | ... |
packageA/pages/details_serviceCard/details_serviceCard.js
... | ... | @@ -261,13 +261,16 @@ Page({ |
261 | 261 | if(arr2.length==1) { |
262 | 262 | switch(arr2[0].prom_type){ |
263 | 263 | case 1: |
264 | - url+="&prom_type=1&prom_id="+arr[0].act_id; | |
264 | + url+="&prom_type=1&prom_id="+arr2[0].act_id; | |
265 | + break; | |
266 | + case 2: | |
267 | + url="/packageG/pages/group_buy/goodsInfo/goodsInfo?goods_id="+goods_id+"&prom_id="+arr2[0].act_id; | |
265 | 268 | break; |
266 | 269 | case 6: |
267 | - url = `/packageA/pages/serviceCard_pd/goodsInfo/goodsInfo?goods_id=${goods_id}&prom_type=${arr2[0].prom_type}&prom_id=${arr[0].act_id}`; | |
270 | + url = `/packageA/pages/serviceCard_pd/goodsInfo/goodsInfo?goods_id=${goods_id}&prom_type=${arr2[0].prom_type}&prom_id=${arr2[0].act_id}`; | |
268 | 271 | break; |
269 | 272 | case 8: |
270 | - url = `/packageC/pages/presell/cardInfo/goodsInfo?goods_id=${goods_id}&prom_id=${arr[0].act_id}`; | |
273 | + url = `/packageC/pages/presell/cardInfo/goodsInfo?goods_id=${goods_id}&prom_id=${arr2[0].act_id}`; | |
271 | 274 | break; |
272 | 275 | } |
273 | 276 | } |
... | ... | @@ -440,7 +443,7 @@ Page({ |
440 | 443 | var boughtNum = 0; |
441 | 444 | |
442 | 445 | // 秒杀活动中购买 |
443 | - if (prom_type == 1 && !is_pd_normal) { | |
446 | + if ((prom_type == 1 && !is_pd_normal) || prom_type==2) { | |
444 | 447 | |
445 | 448 | // 获取已购数量 |
446 | 449 | await getApp().request.promiseGet("/api/weshop/rechargeServicelist/getUserBuyGoodsNum?store_id="+os.stoid+"&user_id="+getApp().globalData.user_id+"&card_id="+card_id+"&prom_type="+prom_type+"&prom_id="+prom_id, { |
... | ... | @@ -449,20 +452,35 @@ Page({ |
449 | 452 | }); |
450 | 453 | |
451 | 454 | // 获取库存 |
452 | - await getApp().request.promiseGet("/api/weshop/activitylist/getActLen/" + os.stoid + "/1/" + prom_id, {}).then(res => { | |
455 | + await getApp().request.promiseGet("/api/weshop/activitylist/getActLen/" + os.stoid + "/"+prom_type+"/" + prom_id, {}).then(res => { | |
453 | 456 | if (res.data.code == 0) { |
454 | 457 | redisNums = !res.data.data ? 0 : res.data.data; |
455 | - }; | |
456 | - }); | |
458 | + } | |
459 | + }) | |
457 | 460 | |
458 | 461 | // 获取限购数 |
459 | 462 | var is_end = 1; |
460 | - await getApp().request.promiseGet("/api/ms/flash_sale/getNew/" + os.stoid + "/" + user_id + "/" + prom_id, {}).then(res => { | |
461 | - if (res.data.code == 0) { | |
462 | - is_end = res.data.data.is_end; | |
463 | - limitNum = res.data.data.buy_limit; | |
464 | - } | |
465 | - }); | |
463 | + | |
464 | + switch (prom_type){ | |
465 | + case 1: | |
466 | + await getApp().request.promiseGet("/api/ms/flash_sale/getNew/" + os.stoid + "/" + user_id + "/" + prom_id, {}).then(res => { | |
467 | + if (res.data.code == 0) { | |
468 | + is_end = res.data.data.is_end; | |
469 | + limitNum = res.data.data.buy_limit; | |
470 | + } | |
471 | + }); | |
472 | + break; | |
473 | + case 2: | |
474 | + await getApp().request.promiseGet("/api/weshop/goods/groupBuy/getActInfo/" + os.stoid + "/" + details.list[i].card_id + "/" + prom_id, {}).then(res => { | |
475 | + if (res.data.code == 0) { | |
476 | + is_end = res.data.data.is_end; | |
477 | + limitNum = res.data.data.buy_limit; | |
478 | + } | |
479 | + }); | |
480 | + break; | |
481 | + } | |
482 | + | |
483 | + | |
466 | 484 | // 判断活动是否结束 |
467 | 485 | if (is_end == 1) { |
468 | 486 | wx.showModal({ |
... | ... | @@ -658,14 +676,15 @@ Page({ |
658 | 676 | |
659 | 677 | //秒杀活动和拼团活动要重新计算一下 |
660 | 678 | for (const it of list) { |
661 | - if (it.prom_type == 1) { | |
679 | + if ([1,2].includes(it.prom_type)) { | |
662 | 680 | let act_details = null; |
663 | 681 | let redis_num = 0; |
664 | 682 | let promcardbuynum = 0; |
665 | 683 | let qty = it.qty; |
666 | 684 | |
667 | 685 | |
668 | - await getApp().request.promiseGet('/api/ms/flash_sale/getNew/' + store_id + '/' + user_id + '/' + it.prom_id, {}).then(res => { | |
686 | + if(it.prom_type==1) | |
687 | + await getApp().request.promiseGet('/api/ms/flash_sale/getNew/' + store_id + '/' + user_id + '/' + it.prom_id, {}).then(res => { | |
669 | 688 | console.log('11111111====>>>'); |
670 | 689 | if (res.data.code == 0) { |
671 | 690 | console.log('当前的秒杀活动信息:', res.data.data); |
... | ... | @@ -679,16 +698,6 @@ Page({ |
679 | 698 | flag = false; |
680 | 699 | return false; |
681 | 700 | }; |
682 | - if (act_details.id != it.prom_id) { | |
683 | - wx.showModal({ | |
684 | - title: '提示', | |
685 | - content: '活动发生了变化,无法支付,请取消订单,重新购买!', | |
686 | - showCancel: false, | |
687 | - }); | |
688 | - flag = false; | |
689 | - return false; | |
690 | - }; | |
691 | - | |
692 | 701 | |
693 | 702 | var t_now = ut.gettimestamp(); |
694 | 703 | if (act_details.is_end == 1 || act_details.start_time > t_now || act_details.end_time < t_now) { |
... | ... | @@ -716,6 +725,46 @@ Page({ |
716 | 725 | |
717 | 726 | }; |
718 | 727 | }); |
728 | + if(it.prom_type==2) | |
729 | + await getApp().request.promiseGet("/api/weshop/goods/groupBuy/getActInfo/" + os.stoid + "/" + gid + "/" + prom_id, {}).then(res => { | |
730 | + if (res.data.code == 0) { | |
731 | + console.log('当前的t团购活动信息:', res.data.data); | |
732 | + act_details = res.data.data; | |
733 | + if (act_details.is_end == 1) { | |
734 | + wx.showModal({ | |
735 | + title: '提示', | |
736 | + content: '活动已结束,无法支付,请取消订单!', | |
737 | + showCancel: false, | |
738 | + }); | |
739 | + flag = false; | |
740 | + return false; | |
741 | + }; | |
742 | + var t_now = ut.gettimestamp(); | |
743 | + if (act_details.is_end == 1 || act_details.start_time > t_now || act_details.end_time < t_now) { | |
744 | + wx.showModal({ | |
745 | + title: '提示', | |
746 | + content: '活动发生了变化,无法支付,请取消订单,重新购买!', | |
747 | + showCancel: false, | |
748 | + }); | |
749 | + flag = false; | |
750 | + return false; | |
751 | + } | |
752 | + | |
753 | + //指定门店的控制 | |
754 | + if (act_details.pick_up_lists) { | |
755 | + var idx0=act_details.pick_up_lists.findIndex(function (e){ | |
756 | + return e.pickup_id==it.pickup_id; | |
757 | + }) | |
758 | + if(idx0<0){ | |
759 | + getApp().confirmBox(it.service_name + "秒杀活动的门店不可售"); | |
760 | + th.setData({ paying: 0 }); | |
761 | + flag = false; | |
762 | + return false; | |
763 | + } | |
764 | + } | |
765 | + | |
766 | + }; | |
767 | + }); | |
719 | 768 | |
720 | 769 | if(act_details && act_details.buy_limit>0 && flag){ |
721 | 770 | await getApp().request.promiseGet("/api/weshop/rechargeServicelist/getUserBuyGoodsNum", { | ... | ... |
packageG/pages/group_buy/goodsInfo/buy_flash_normal.wxml
0 → 100644
1 | +<view bindtap="closeSpecModal_flash_normal" class="cover-layer"></view> | |
2 | + <view class="spec-model"> | |
3 | + <view class="pding"> | |
4 | + <icon bindtap="closeSpecModal_flash_normal" class="modal-close" color="black" size="22" type="cancel"></icon> | |
5 | + <view class="spec-goods"> | |
6 | + <image class="wh100 spec-img xc-distance-bottom" bindtap="previewImage" src="{{iurl + (data.image_url ? data.image_url:'miniapp/images/default_g_img.gif')}}" binderror="pop_err_img" data-errorimg="data.img_url"></image> | |
7 | + <view class="spec-goods-info"> | |
8 | + <view class="spec-goods-name ellipsis-2">{{data.goods_name}}</view> | |
9 | + <view class="flex ai_end xc-val-money"> | |
10 | + <view class="spec-goods-price"> | |
11 | + <text class="fs20">¥</text>{{data.shop_price}} | |
12 | + <!-- 如果是等级会员,且有等级价 --> | |
13 | + <!-- <block wx:if="{{card_field && sele_g[card_field]>0}}">{{sele_g[card_field]}} </block> --> | |
14 | + <!-- <block wx:else>{{sele_g.shop_price}}</block> --> | |
15 | + </view> | |
16 | + </view> | |
17 | + | |
18 | + <!-- <view class="flex"> | |
19 | + <view class="spec-goods-stock">已售:{{sele_g.sales_sum}}</view> | |
20 | + <block wx:if="{{sales_rules==2}}"> | |
21 | + <view class="spec-goods-stock" wx:if="{{def_pick_store && def_pick_store.CanOutQty}}">可售:{{def_pick_store.CanOutQty}}</view> | |
22 | + <view class="spec-goods-stock" wx:else>可售:0</view> | |
23 | + </block> | |
24 | + <block wx:else><view class="spec-goods-stock">可售:{{sele_g.store_count}}</view></block> | |
25 | + </view> --> | |
26 | + | |
27 | + | |
28 | + </view> | |
29 | + | |
30 | + <!-- 选择门店模块 --> | |
31 | + <view class="flex-space-between address ai_end xc-width "> | |
32 | + | |
33 | + <view class="flex" wx:if="{{def_pick_store && def_pick_store.pickup_name}}"> | |
34 | + <text class="fs30 xc-black3 shop_name">{{def_pick_store.pickup_name}}</text> | |
35 | + <view class="distance fs24 xc-ash"wx:if="{{def_pick_store.distance!=null}}"> | |
36 | + 距离:{{def_pick_store.distance>1000?filters.toFix(def_pick_store.distance/1000,2)+"km":filters.toFix(def_pick_store.distance,0)+"m"}} | |
37 | + | |
38 | + </view> | |
39 | + </view> | |
40 | + | |
41 | + <!-- 没有门店的时候 --> | |
42 | + <view class="flex" bindtap="choice_store" wx:else> | |
43 | + <image class="stores-img" src="{{iurl}}/miniapp/images/stores.png"></image> | |
44 | + <view class="fs30" style="color:black;">选择门店</view> | |
45 | + </view> | |
46 | + | |
47 | + <view hidden="{{has_def && sys_switch.is_pricing_open_store}}" class="red-co fs28" bindtap="choice_store" >更多门店<text class="right-arrow"></text></view> | |
48 | + </view> | |
49 | + <view wx:if="{{only_pk && !only_pk.length}}">(库存不足)</view> | |
50 | + <block wx:else> | |
51 | + <view wx:if="{{def_pickpu_list && !def_pickpu_list.length}}">(库存不足)</view> | |
52 | + <block wx:else> | |
53 | + <view class="no_store" wx:if="{{def_pick_store.is_no_dis}}">(该店不可售)</view> | |
54 | + <view wx:elif="{{def_pick_store && !def_pick_store.CanOutQty && !filters.is_virtual_gd(sele_g.is_virtual) && sales_rules==2 && prom_type==0}}">(库存不足)</view> | |
55 | + </block> | |
56 | + </block> | |
57 | + <view class="fs24 xc-ash-9f xc-distance-top "wx:if="{{def_pick_store && def_pick_store.fulladdress}}">地址:{{def_pick_store.fulladdress}}</view> | |
58 | + | |
59 | + | |
60 | + <!--商品的属性项目--> | |
61 | + <!-- <view class="xc-goods-attribute"> | |
62 | + <view hidden="{{ismend==1}}" class="spec-name">商品规格</view> | |
63 | + <view hidden="{{ismend==1}}" style="max-height: 120rpx;overflow-y: auto;"> | |
64 | + <view class="spec_bt {{gid==item.goods_id?'act':''}}" bindtap="sele_spec" data-nor="1" data-gid='{{item.goods_id}}' wx:for="{{sku_g_pt}}" wx:key="sku_g"> | |
65 | + {{item.gg}} | |
66 | + </view> | |
67 | + </view> | |
68 | + </view> --> | |
69 | + | |
70 | + <view class="b_num"> | |
71 | + <view>购买数量</view> | |
72 | + <view class="count"> | |
73 | + <view bindtap="{{goodsInputNum <= 1 ? '':'subCartNum'}}" class="sub {{goodsInputNum <= 1 ? 'active':''}}">-</view> | |
74 | + <input bindblur="inputCartNum" type="number" value="{{goodsInputNum}}"></input> | |
75 | + <view bindtap="addCartNum" class="add">+</view> | |
76 | + </view> | |
77 | + </view> | |
78 | + </view> | |
79 | + | |
80 | + | |
81 | + <!-- 提示再买多少优惠 --> | |
82 | + <view style="margin-top: 35rpx;color:#333;font-size:28rpx;" wx:if="{{hui_condition}}"> | |
83 | + 再买{{hui_condition.need}} | |
84 | + <text wx:if="{{hui_condition.money}}">,免{{hui_condition.money}}元</text> | |
85 | + <text wx:if="{{hui_condition.sale}}">,打{{hui_condition.sale}}折</text> | |
86 | + <text wx:if="{{hui_condition.past==1}}">,包邮</text> | |
87 | + <text wx:if="{{hui_condition.intValue>0}}">,送{{hui_condition.intValue}}积分</text> | |
88 | + <text wx:if="{{hui_condition.couponId>0}}">,送优惠券</text> | |
89 | + <text wx:if="{{hui_condition.gift_id>0}}">,送赠品</text> | |
90 | + <text wx:if="{{hui_condition.lb_id>0}}">,送礼包</text> | |
91 | + <text wx:if="{{hui_condition.zxlb_id>0}}">,送专享礼包</text> | |
92 | + </view> | |
93 | + | |
94 | + | |
95 | + <!-- 按钮部分 --> | |
96 | + <view class="spec-cart-btns"> | |
97 | + | |
98 | + <!-- 根本就找不到门店 --> | |
99 | + <block wx:if="{{def_pick_store && def_pick_store.is_no_dis}}"> | |
100 | + <view class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999;">该店不可售</view> | |
101 | + </block> | |
102 | + <block wx:else> | |
103 | + <!-- 根本就找不到门店 --> | |
104 | + <block wx:if="{{!only_pk && !def_pickpu_list}}"> | |
105 | + <view class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999;">库存不足</view> | |
106 | + </block> | |
107 | + <block wx:else> | |
108 | + | |
109 | + | |
110 | + <block wx:if="{{only_pk.length && !only_pk.length}}"> | |
111 | + <view class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999;">库存不足</view> | |
112 | + </block> | |
113 | + <block wx:else> | |
114 | + <block wx:if="{{def_pickpu_list && !def_pickpu_list.length}}"> | |
115 | + <view class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999">库存不足</view> | |
116 | + </block> | |
117 | + <block wx:else> | |
118 | + <block wx:if="{{!def_pick_store}}"> | |
119 | + <view class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999">请先选择门店</view> | |
120 | + </block> | |
121 | + <block wx:else> | |
122 | + <block wx:if="{{data.store_count<=0}}"> | |
123 | + <view class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999">库存不足</view> | |
124 | + </block> | |
125 | + <block wx:else> | |
126 | + <view class="flex jc_sb"> | |
127 | + <view class="spec-cart-btn spec-buy w40" bindtap="addCart" | |
128 | + data-action="add" style="background-color: #ffb03f;">加入购物车</view> | |
129 | + <view class="spec-cart-btn spec-buy w40" bindtap="addCart" | |
130 | + data-action="buy">立即购买</view> | |
131 | + </view> | |
132 | + </block> | |
133 | + | |
134 | + </block> | |
135 | + </block> | |
136 | + </block> | |
137 | + </block> | |
138 | + </block> | |
139 | + </view> | |
140 | + | |
141 | + </view> | |
142 | + </view> | |
143 | + <view class="clear"></view> | |
0 | 144 | \ No newline at end of file | ... | ... |
packageG/pages/group_buy/goodsInfo/filter.wxs
0 → 100644
1 | +var is_has = function (text,val) { | |
2 | + if(text.indexOf(","+val+",")==-1) return false; | |
3 | + return true | |
4 | +} | |
5 | +function format_tt(ts) { | |
6 | + if(ts==null || ts==undefined || ts=='') return ""; | |
7 | + var d = getDate(ts*1000) | |
8 | + var fm=(d.getMonth()+1)+"月"+ d.getDate()+"日"; | |
9 | + return fm; | |
10 | +} | |
11 | + | |
12 | +//拿来判断是不是在指定门店内 | |
13 | +function is_no_dis(text,val){ | |
14 | + if(text==undefined) return false; | |
15 | + if(text=='') return false; | |
16 | + if(!text) return false; | |
17 | + | |
18 | + if(text.indexOf(val)==-1) return true; | |
19 | + return false; | |
20 | +} | |
21 | + | |
22 | +module.exports = { | |
23 | + is_has: is_has, | |
24 | + format_tt:format_tt, | |
25 | + is_no_dis:is_no_dis | |
26 | +} | ... | ... |
packageG/pages/group_buy/goodsInfo/g_filter.wxs
0 → 100644
1 | +var g_filters = { | |
2 | + //-- 判断是不是有等级价 -- | |
3 | + is_has_rank:function(rank_switch,item){ | |
4 | + if(!rank_switch) return false; | |
5 | + if(item.cardprice1 || item.cardprice2 || item.cardprice3) {return true} | |
6 | + return false; | |
7 | + }, | |
8 | + | |
9 | + //-- 判断,不是等级会员时候,要显示的最低等级价和名称 -- | |
10 | + get_card_price:function(goods,all_card,type){ | |
11 | + var price1=parseFloat(goods['cardprice1']); | |
12 | + var price2=parseFloat(goods['cardprice2']); | |
13 | + var price3=parseFloat(goods['cardprice3']); | |
14 | + if(!all_card){ | |
15 | + if(type==0) return 0; | |
16 | + return ""; | |
17 | + } | |
18 | + | |
19 | + var arr=[]; | |
20 | + var min_price= 0; | |
21 | + var min_name=""; | |
22 | + | |
23 | + var min_price=null; | |
24 | + var min_name=null; | |
25 | + //---设置对应的价格名字---- | |
26 | + for(var i=0;i<3;i++) { | |
27 | + var vl=all_card[i]; | |
28 | + if(!vl) continue; | |
29 | + if(vl['CorrPrice']=="Price1" && price1>0) | |
30 | + { | |
31 | + if(min_price==null) { | |
32 | + min_price=price1;min_name=vl['CardName']; | |
33 | + } | |
34 | + else if(price1<min_price) { | |
35 | + min_price=price1;min_name=vl['CardName']; | |
36 | + } | |
37 | + } | |
38 | + if(vl['CorrPrice']=="Price2" && price2>0) | |
39 | + { | |
40 | + if(min_price==null) { | |
41 | + min_price=price2;min_name=vl['CardName']; | |
42 | + } | |
43 | + else if(price2<min_price) { | |
44 | + min_price=price2;min_name=vl['CardName']; | |
45 | + } | |
46 | + } | |
47 | + | |
48 | + if(vl['CorrPrice']=="Price3" && price3>0) | |
49 | + { | |
50 | + if(min_price==null) { | |
51 | + min_price=price3;min_name=vl['CardName']; | |
52 | + } | |
53 | + else if(price3<min_price) { | |
54 | + min_price=price3;min_name=vl['CardName']; | |
55 | + } | |
56 | + } | |
57 | + | |
58 | + } | |
59 | + if(min_price==null){ | |
60 | + if(type==0) return 0; | |
61 | + return ""; | |
62 | + } | |
63 | + | |
64 | + //if(type==0) return arr.length; | |
65 | + //--进行排序,升序--- | |
66 | + /*--- | |
67 | + arr.sort(function(a,b){ | |
68 | + if (a.price < b.price) { | |
69 | + return -1; | |
70 | + } else if (a.fee == b.fee) { | |
71 | + return 0; | |
72 | + } else { | |
73 | + return 1; | |
74 | + } | |
75 | + })--*/ | |
76 | + //-- 获取最下价钱,和相应的卡的名称 -- | |
77 | + //min_price=min.price; | |
78 | + //min_name=min.name; | |
79 | + if(type==0) return min_price.toFixed(2); | |
80 | + if(min_name.length>4) min_name=min_name.substring(0, 8); | |
81 | + return min_name; | |
82 | + }, | |
83 | + | |
84 | + toFix: function (val, count,set) { | |
85 | + if(val===undefined) return 0; | |
86 | + if(val===null) return 0; | |
87 | + if(val==='') return 0; | |
88 | + val = parseFloat(val); | |
89 | + if(set==1 && val==0) return val; | |
90 | + return val.toFixed(count) | |
91 | + }, | |
92 | + | |
93 | + //折扣数值处理,小数位数为1时,只显示1位;小数位数为2时,才显示2位; | |
94 | + num: function(value) { | |
95 | + if(value != 0) { | |
96 | + var val = value.toFixed(2).toString(); | |
97 | + if(val.indexOf('.') != -1) { | |
98 | + var arrval = val.split('.'); | |
99 | + if(arrval[1].length == 1 && arrval[1][0] == 0) { | |
100 | + val = val.slice(0,-2); | |
101 | + }; | |
102 | + | |
103 | + if(arrval[1].length == 2 && arrval[1][1] == 0) { | |
104 | + val = val.slice(0,-1); | |
105 | + }; | |
106 | + }; | |
107 | + return val; | |
108 | + } else { | |
109 | + return value.toFixed(0); | |
110 | + }; | |
111 | + }, | |
112 | +} | |
113 | +module.exports = { | |
114 | + is_has_rank:g_filters.is_has_rank, | |
115 | + get_card_price:g_filters.get_card_price, | |
116 | + num:g_filters.num, | |
117 | +} | |
0 | 118 | \ No newline at end of file | ... | ... |
packageG/pages/group_buy/goodsInfo/goodsInfo.js
0 → 100644
1 | +var t = require("../../../../utils/util.js"), | |
2 | + ut = t, | |
3 | + e = require("../../../../utils/common.js"), | |
4 | + a = require("../../../../utils/wxParse/wxParse.js"), | |
5 | + s = getApp(), | |
6 | + i = s.request, | |
7 | + rq = i, | |
8 | + oo = s.globalData, | |
9 | + o = s.globalData.setting, | |
10 | + os = o; | |
11 | + | |
12 | +let self = null; | |
13 | + | |
14 | +//评价加载更多 | |
15 | +var more = function (e) { | |
16 | + return e && e.__esModule ? e : { | |
17 | + default: e | |
18 | + }; | |
19 | + }(require("../../../../utils/LoadMore.js")), | |
20 | + n = new more.default(); | |
21 | +var utils = require('../../../../utils/util.js'); | |
22 | +var regeneratorRuntime = require('../../../../utils/runtime.js'); | |
23 | + | |
24 | +Page({ | |
25 | + data: { | |
26 | + start_stop: 2, //秒杀开始 结束 的控制(1正在进行,2即将开始) | |
27 | + color_type: 0, //线条控制 | |
28 | + color_type_one: 0, | |
29 | + color_type_two: 1, | |
30 | + is_share_text: 1, | |
31 | + | |
32 | + gid: "", | |
33 | + stoid: o.stoid, | |
34 | + url: o.url, | |
35 | + resourceUrl: o.h5_url, //公众号那边的图片文件域名 | |
36 | + iurl: o.imghost, | |
37 | + defaultAvatar: o.resourceUrl + "/static/images/user68.jpg", | |
38 | + | |
39 | + data: null, | |
40 | + content: "", //商品详情 | |
41 | + | |
42 | + | |
43 | + gallery: null, //图片滚动 | |
44 | + is_collect: 0, | |
45 | + collect_id: 0, | |
46 | + cartGoodsNum: 0, | |
47 | + specSelect: 0, | |
48 | + optionItemId: 0, | |
49 | + goodsInputNum: 1, | |
50 | + openSpecModal: !1, | |
51 | + | |
52 | + activeCategoryId: 0, | |
53 | + supportPageScroll: !1, | |
54 | + address: { | |
55 | + address: "", | |
56 | + district: 0, | |
57 | + }, | |
58 | + shipping: "", | |
59 | + shippingCost: 0, | |
60 | + enterAddressPage: !1, | |
61 | + categories: [{ | |
62 | + name: "卡项", | |
63 | + id: 0 | |
64 | + }, { | |
65 | + name: "详情", | |
66 | + id: 1 | |
67 | + }, { | |
68 | + name: "评价", | |
69 | + id: 2 | |
70 | + }], | |
71 | + activeCategoryId2: 0, | |
72 | + categories2: [{ | |
73 | + name: "商品详情", | |
74 | + id: 0 | |
75 | + }, { | |
76 | + name: "规格参数", | |
77 | + id: 1 | |
78 | + }], | |
79 | + activeCategoryId3: 1, // 点击评价-全部、有图、好评、中评时对应的id | |
80 | + categories3: [{ | |
81 | + name: "全部", | |
82 | + id: 1, | |
83 | + num: 0 | |
84 | + }, | |
85 | + { | |
86 | + name: "有图", | |
87 | + id: 5, | |
88 | + num: 0 | |
89 | + }, | |
90 | + | |
91 | + { | |
92 | + name: "好评", | |
93 | + id: 2, | |
94 | + num: 0 | |
95 | + }, { | |
96 | + name: "中评", | |
97 | + id: 3, | |
98 | + num: 0 | |
99 | + }, { | |
100 | + name: "差评", | |
101 | + id: 4, | |
102 | + num: 0 | |
103 | + }, | |
104 | + ], | |
105 | + | |
106 | + select: { | |
107 | + price: 0, | |
108 | + stock: 0, | |
109 | + specName: "", | |
110 | + activity: null | |
111 | + }, | |
112 | + | |
113 | + | |
114 | + //门店相关 | |
115 | + ismend: 0, | |
116 | + is_sec_mend: 0, | |
117 | + sto_sele_name: "", //选中的门店名称 | |
118 | + sto_sele_id: "", //选中的门店id | |
119 | + sto_sele_keyid: '', //选中的门店线下 | |
120 | + sto_sele_distr: "", //选择的门店的配送方式 | |
121 | + is_show_sto_cat: 1, //是否显示门店分类 | |
122 | + only_pk: null, | |
123 | + all_sto: null, | |
124 | + sec_sto: null, //选择了的门店分类 | |
125 | + pickpu_list: null, //读出的所有门店list | |
126 | + def_pickpu_list: null, //一开始5个门店list | |
127 | + sec_pick_index: 0, //第二级门店选择ID | |
128 | + fir_pick_index: 0, //第一级门店选择ID | |
129 | + all_pick_list: null,//所有的门店先记录起来 | |
130 | + | |
131 | + //联系电话 | |
132 | + mobile: '', | |
133 | + //商品的活动类型 0普通 1秒杀 2团购 3优惠 4 积分购 6拼单 | |
134 | + timer: [], | |
135 | + | |
136 | + //商品的购买次数 | |
137 | + prom_buy_num: -1, | |
138 | + g_buy_num: null, | |
139 | + | |
140 | + //会员自己的购买的拼单商品的情况 | |
141 | + //购买的订单 | |
142 | + buy_order: null, | |
143 | + //1加入购物车 2立即购买 | |
144 | + openSpecModal_ind: 0, | |
145 | + | |
146 | + //---计时器开关---- | |
147 | + is_timer: 1, | |
148 | + isshow: 0, | |
149 | + bconfig: null, //基础配置 | |
150 | + | |
151 | + //会员分享的头像 | |
152 | + share_head: "", | |
153 | + share_goods_img: "", | |
154 | + | |
155 | + //----------视频图片data参数--------- | |
156 | + current: 0, //图片计数 | |
157 | + swiperCurrent: 0, //轮播的下标 | |
158 | + hiddenn: 0, //控制轮播计数显示 | |
159 | + | |
160 | + currentTab: 0, // 选择器控制参数 | |
161 | + mapurl: "", | |
162 | + mapurl_f_img: "", | |
163 | + videopicture: 0, //视频图片的控制 | |
164 | + | |
165 | + video: 0, //视频图片切换器 | |
166 | + index: 0, | |
167 | + noon: 0, //开始视频的隐藏 | |
168 | + | |
169 | + screenWidth: 0, | |
170 | + canvasHidden: 1, | |
171 | + | |
172 | + //--推荐-- | |
173 | + store_config: null, | |
174 | + is_show_pl: 0, //是否品类 | |
175 | + is_show_pp: 0, //是否品牌 | |
176 | + is_show_gb: 0, //是否国别 | |
177 | + is_closecoupon: 0, | |
178 | + | |
179 | + | |
180 | + select_store: 0, //选择更多 | |
181 | + index: 1, | |
182 | + more_store: 0, //选择门店 | |
183 | + sort_store: 0, //门店分类 | |
184 | + choice_sort_store: 0, //选择分类门店 | |
185 | + new_user: 0, //新用户 | |
186 | + | |
187 | + def_pick_store: null, // 默认的门店 | |
188 | + fir_def_store: null, //客户默认的门店的 | |
189 | + lat: null, //维度 | |
190 | + lon: null, //经度 | |
191 | + | |
192 | + is_get_local_ok: 0, //获取坐标是否完成 | |
193 | + region_name: "门店分类", //区域的名字 | |
194 | + is_gps: 1, | |
195 | + open_ind_store: 0, //哪里打开的门店列表的控制属性 | |
196 | + default_store: {}, //创建添加默认门店地址的对象 | |
197 | + | |
198 | + comments_no_more: 0, | |
199 | + | |
200 | + is_collect_load: 0, //是不是处理 | |
201 | + is_newsales_rules: 0, //是否开启最新的门店规则,此时会新读门店,当点击选择门店时会触发读取线下库存 | |
202 | + sales_rules: 1, //默认是线上销售 | |
203 | + | |
204 | + wait_for_user_store: null, | |
205 | + poster: null, //自定义海报 | |
206 | + share_b_img: '', //自定义分享的背景 | |
207 | + showPoster: false, | |
208 | + hui_condition: null, | |
209 | + sto_sele_name_1: '',//分享的门店名称 | |
210 | + | |
211 | + // 秒杀 | |
212 | + prom_st: null, | |
213 | + prom_r_null: 0, | |
214 | + | |
215 | + hiddenCS: true, //控制客服操作菜单显示和控制 | |
216 | + | |
217 | + openSpecModal_flash_normal: 0, | |
218 | + keyword: '', //门店搜索 | |
219 | + sec_i: -1,//选中分类门店 下标 | |
220 | + | |
221 | + nav_frontColor: "#ffffff", | |
222 | + nav_backgroundColor: "#ffffff", | |
223 | + nav_type: 2, //导航类型 | |
224 | + istop: 0, //是否置顶风格为1 | |
225 | + searchbox_transparent: 1, | |
226 | + }, | |
227 | + | |
228 | + //------初始化加载---------- | |
229 | + onLoad: function (t) { | |
230 | + self = this; | |
231 | + | |
232 | + | |
233 | + t.prom_type=2; | |
234 | + this.data.options=t; | |
235 | + | |
236 | + var ee = this, | |
237 | + that = ee, | |
238 | + th = ee, | |
239 | + gid = t.goods_id, | |
240 | + first_leader = t.first_leader, | |
241 | + prom_type = 2, | |
242 | + prom_id = t.prom_id, | |
243 | + room_id = t.room_id, | |
244 | + room_user_share = t.room_user_share; //如果是会员分享带有room_id的话,那么接下来会员分享就不传room_id | |
245 | + | |
246 | + var share_openid = t.share_openid; | |
247 | + | |
248 | + //检查测肤 | |
249 | + getApp().check_skin_face(t, 1, gid); | |
250 | + | |
251 | + //---获取手机地址坐标-- | |
252 | + //--如果tg_id是空的话,分享回来-- | |
253 | + if (gid == undefined || gid == null || gid == "") { | |
254 | + var gid_str = decodeURIComponent(t.scene); | |
255 | + gid_str = gid_str.split("_"); | |
256 | + gid = gid_str[0]; | |
257 | + if (gid_str.length > 1 && gid_str[1] && parseInt(gid_str[1]) > 0) { | |
258 | + first_leader = gid_str[1]; | |
259 | + } | |
260 | + //-- 如果有room_id的获取 -- | |
261 | + if (gid_str.length > 2 && gid_str[2] && parseInt(gid_str[2]) > 0) { | |
262 | + room_id = gid_str[2]; | |
263 | + room_user_share = 1; | |
264 | + } | |
265 | + | |
266 | + if (gid_str.length > 3 && gid_str[3] && parseInt(gid_str[3]) > 0) { | |
267 | + this.data.options.prom_id = gid_str[3]; | |
268 | + } | |
269 | + | |
270 | + } | |
271 | + | |
272 | + //-- 设置顶部高度 -- | |
273 | + let height = getApp().globalData.navBarHeight; | |
274 | + ee.setData({gid: gid, top_nav: height}); | |
275 | + | |
276 | + if (first_leader > 0) { | |
277 | + getApp().globalData.first_leader = first_leader; | |
278 | + //调用接口判断是不是会员 | |
279 | + getApp().request.promiseGet("/api/weshop/shoppingGuide/get/" + os.stoid + "/" + first_leader, {}).then(res => { | |
280 | + if (res.data.code == 0) { | |
281 | + getApp().globalData.guide_id = res.data.data.id; | |
282 | + getApp().globalData.guide_pick_id = res.data.data.pickup_id | |
283 | + } | |
284 | + }) | |
285 | + } | |
286 | + | |
287 | + //-- 如果有房间号 -- | |
288 | + if (room_id) { | |
289 | + getApp().globalData.room_id = room_id; | |
290 | + getApp().globalData.room_goods_id = gid; | |
291 | + //如果是会员分享过来的要记录 | |
292 | + if (room_user_share) | |
293 | + getApp().globalData.room_user_share = room_user_share; | |
294 | + | |
295 | + if (share_openid) { | |
296 | + this.get_room_share_guide(share_openid); | |
297 | + } | |
298 | + } | |
299 | + | |
300 | + | |
301 | + var c_guide_id = t.c_guide_id; | |
302 | + if (c_guide_id) { | |
303 | + th.data.c_guide_id = c_guide_id; | |
304 | + } | |
305 | + | |
306 | + getApp().getConfig(function (e) { | |
307 | + ee.setData({sto_sele_name_1: e.store_name}) | |
308 | + }) | |
309 | + | |
310 | + //----获取系统参数----- | |
311 | + getApp().getConfig2(function (e) { | |
312 | + ee.setData({ | |
313 | + bconfig: e, | |
314 | + sales_rules: e.sales_rules, | |
315 | + }); | |
316 | + | |
317 | + if (e.categoryset.indexOf("," + 1 + ",") != -1) { | |
318 | + ee.setData({ | |
319 | + is_show_pl: 1 | |
320 | + }); | |
321 | + } | |
322 | + if (e.categoryset.indexOf("," + 3 + ",") != -1) { | |
323 | + ee.setData({ | |
324 | + is_show_pp: 1 | |
325 | + }); | |
326 | + } | |
327 | + if (e.categoryset.indexOf("," + 2 + ",") != -1) { | |
328 | + ee.setData({ | |
329 | + is_show_gb: 1 | |
330 | + }); | |
331 | + } | |
332 | + // console.log(e); | |
333 | + var json_d = JSON.parse(e.switch_list); | |
334 | + ee.setData({ | |
335 | + store_config: e, | |
336 | + sys_switch: json_d, | |
337 | + is_closecoupon: json_d.is_closecoupon, | |
338 | + is_newsales_rules: json_d.is_newsales_rules | |
339 | + }); | |
340 | + ee.init(gid); | |
341 | + | |
342 | + //------几人评价------- | |
343 | + //n.init(th, "", "comments"); | |
344 | + wx.pageScrollTo && th.setData({ | |
345 | + supportPageScroll: !0 | |
346 | + }); | |
347 | + | |
348 | + }, 1); | |
349 | + | |
350 | + //获取用户设备信息,屏幕宽度 | |
351 | + wx.getSystemInfo({ | |
352 | + success: res => { | |
353 | + that.setData({ | |
354 | + screenWidth: res.screenWidth | |
355 | + }) | |
356 | + } | |
357 | + }); | |
358 | + | |
359 | + //-- 自定义海报 -- | |
360 | + getApp().request.promiseGet("/api/weshop/goods/poster/page", { | |
361 | + data: {store_id: os.stoid, type: 1, is_use: 1} | |
362 | + }).then(res => { | |
363 | + if (res.data.code == 0 && res.data.data && res.data.data.pageData && res.data.data.pageData[0]) { | |
364 | + | |
365 | + var poster_data = res.data.data.pageData[0]; | |
366 | + var json_str = poster_data.jsonStr; | |
367 | + | |
368 | + if (json_str) { | |
369 | + var json_data = JSON.parse(json_str); | |
370 | + if (json_data.bg_img) { | |
371 | + | |
372 | + //-- 把图片那到本地 -- | |
373 | + wx.getImageInfo({ | |
374 | + src: json_data.bg_img, | |
375 | + success: function (res) { | |
376 | + var path = res.path; | |
377 | + th.setData({share_b_img: path}) | |
378 | + }, | |
379 | + fail: function (res) { | |
380 | + } | |
381 | + }); | |
382 | + } | |
383 | + th.setData({poster: json_data}) | |
384 | + | |
385 | + } | |
386 | + } | |
387 | + }) | |
388 | + | |
389 | + | |
390 | + }, | |
391 | + | |
392 | + //-- 获取直播的分享人的导购信息 -- | |
393 | + async get_room_share_guide(share_openid) { | |
394 | + | |
395 | + var url = "/api/weshop/users/page"; | |
396 | + var first_leader = 0; | |
397 | + | |
398 | + //调用接口判断是不是会员 | |
399 | + await getApp().request.promiseGet(url, { | |
400 | + data: { | |
401 | + stoid: os.stoid, | |
402 | + weapp_openid: share_openid | |
403 | + } | |
404 | + }).then(res => { | |
405 | + if (ut.ajax_ok(res)) { | |
406 | + first_leader = res.data.data.pageData[0].user_id; | |
407 | + getApp().globalData.guide_id = res.data.data.id; | |
408 | + } | |
409 | + }) | |
410 | + | |
411 | + if (!first_leader) return false; | |
412 | + | |
413 | + getApp().globalData.first_leader = first_leader; | |
414 | + | |
415 | + //调用接口判断是不是会员 | |
416 | + await getApp().request.promiseGet("/api/weshop/shoppingGuide/get/" + os.stoid + "/" + first_leader, {}).then(res => { | |
417 | + if (res.data.code == 0) { | |
418 | + getApp().globalData.guide_id = res.data.data.id; | |
419 | + getApp().globalData.guide_pick_id = res.data.data.pickup_id | |
420 | + } | |
421 | + }) | |
422 | + | |
423 | + }, | |
424 | + | |
425 | + | |
426 | + onReady() { | |
427 | + // 用于控制保障服务折叠图标的显示 | |
428 | + setTimeout(() => { | |
429 | + wx.createSelectorQuery().selectAll(".showArea, .hideArea").boundingClientRect(res => { | |
430 | + if (res.length != 0) { | |
431 | + this.setData({ | |
432 | + showFold: res[0].height < res[1].height, | |
433 | + }); | |
434 | + } | |
435 | + }).exec(); | |
436 | + }, 1000); | |
437 | + | |
438 | + }, | |
439 | + | |
440 | + | |
441 | + //------------程序初始化入口------------- | |
442 | + async init(gid) { | |
443 | + var ee = this, | |
444 | + th = ee, | |
445 | + gallery = null, | |
446 | + is_collect = 0, | |
447 | + collect_id = 0, | |
448 | + categories3 = ee.data.categories3, | |
449 | + fir_com = null, | |
450 | + fir_quan = null, | |
451 | + mapurl = null, | |
452 | + mapurl_f_img = null; | |
453 | + | |
454 | + | |
455 | + //------是否收藏---------- | |
456 | + await getApp().request.promiseGet("/api/weshop/goodscollect/page", { | |
457 | + data: { | |
458 | + store_id: os.stoid, | |
459 | + goods_id: gid, | |
460 | + user_id: oo.user_id, | |
461 | + } | |
462 | + }).then(res => { | |
463 | + var t = res; | |
464 | + var data = t.data.data.pageData; | |
465 | + if (data && data.length > 0) { | |
466 | + //ee.setData({ is_collect: 1, collect_id: data[0].collect_id, }); | |
467 | + is_collect = 1; | |
468 | + collect_id = data[0].collect_id; | |
469 | + } | |
470 | + }) | |
471 | + | |
472 | + //------获取评价的统计数量---- | |
473 | + await getApp().request.promiseGet("/api/weshop/serviceComment/countlist/", { | |
474 | + data: { | |
475 | + store_id: os.stoid, | |
476 | + service_id: gid | |
477 | + }, | |
478 | + }).then(res => { | |
479 | + console.log('get评价统计数量', res.data.data); | |
480 | + var t = res; | |
481 | + var g = t.data.data[0]; | |
482 | + if (g != null && g != undefined) { | |
483 | + var allnum = g.c0 + g.c1 + g.c2 + g.c3 + g.c4 + g.c5; | |
484 | + var num2 = g.c4 + g.c5; | |
485 | + var num3 = g.c3; | |
486 | + var num4 = g.c0 + g.c1 + g.c2; | |
487 | + | |
488 | + var dd = ee.data.categories3; | |
489 | + dd[0].num = allnum; | |
490 | + dd[1].num = g.cimg; | |
491 | + dd[2].num = num2; | |
492 | + dd[3].num = num3; | |
493 | + dd[4].num = num4; | |
494 | + | |
495 | + categories3 = dd; | |
496 | + } | |
497 | + }); | |
498 | + | |
499 | + //----获取详情页的评价---- | |
500 | + await getApp().request.promiseGet("/api/weshop/serviceComment/pageComment", { | |
501 | + data: { | |
502 | + store_id: os.stoid, | |
503 | + service_id: gid, | |
504 | + pageSize: 3, | |
505 | + parent_id: 0, | |
506 | + page: 1, | |
507 | + is_show: 1, | |
508 | + }, | |
509 | + }).then(res => { | |
510 | + console.log('get详情页评价', res.data.data); | |
511 | + fir_com = res.data.data.pageData; | |
512 | + }); | |
513 | + | |
514 | + if (fir_com) { | |
515 | + for (var ind in fir_com) { | |
516 | + if (fir_com[ind].head_pic == "") fir_com[ind].head_pic = ee.data.iurl + "/miniapp/images/hui_hear_pic.png"; | |
517 | + if (fir_com[ind].img) fir_com[ind].img = ut.unserialize(fir_com[ind].img); | |
518 | + if (fir_com[ind].weapp_img) fir_com[ind].weapp_img = JSON.parse(fir_com[ind].weapp_img); | |
519 | + } | |
520 | + } | |
521 | + ; | |
522 | + | |
523 | + | |
524 | + //this.getHistoryBuy(); //获取历史购买 | |
525 | + ee.setData({ | |
526 | + is_collect: is_collect, | |
527 | + collect_id: collect_id, | |
528 | + categories3: categories3, | |
529 | + fir_quan: fir_quan, | |
530 | + fir_comments: fir_com, | |
531 | + // cardComments: fir_com, | |
532 | + }); | |
533 | + | |
534 | + }, | |
535 | + | |
536 | + //检测有没有导购分享的门店 | |
537 | + check_guide(func) { | |
538 | + var first_leader = getApp().globalData.first_leader; | |
539 | + if (!first_leader) { | |
540 | + func(); | |
541 | + return false; | |
542 | + } | |
543 | + if (this.data.is_geted_guide_pick) { | |
544 | + func(); | |
545 | + return false; | |
546 | + } | |
547 | + | |
548 | + if (getApp().globalData.guide_pick_id) { | |
549 | + func(); | |
550 | + return false; | |
551 | + } | |
552 | + var th = this; | |
553 | + getApp().request.promiseGet("/api/weshop/shoppingGuide/get/" + os.stoid + "/" + first_leader, {}).then(res => { | |
554 | + if (res.data.code == 0) { | |
555 | + getApp().globalData.guide_pick_id = res.data.data.pickup_id; | |
556 | + } | |
557 | + th.data.is_geted_guide_pick = 1; | |
558 | + func(); | |
559 | + }) | |
560 | + }, | |
561 | + | |
562 | + //---展示--- | |
563 | + // gid 在onload阶段已经保存在this.data中 | |
564 | + onShow: function () { | |
565 | + | |
566 | + getApp().check_can_share(this); | |
567 | + //-- 看一下隐私政策要不要显示 -- | |
568 | + var privacy_pop = this.selectComponent("#privacy_pop"); //组件的id | |
569 | + if (privacy_pop) { | |
570 | + privacy_pop.check_pri_show(); | |
571 | + } | |
572 | + | |
573 | + var that = this; | |
574 | + var th = this; | |
575 | + var ee = this, gid = this.data.gid, i = getApp().request; | |
576 | + | |
577 | + th.data.is_timer = 1; | |
578 | + //获取用户的默认门店 | |
579 | + th.check_guide(() => { | |
580 | + getApp().get_user_store(function (e) { | |
581 | + if (!e) { | |
582 | + th.data.fir_def_store = {}; //赋值空对象 | |
583 | + return false; | |
584 | + } | |
585 | + | |
586 | + if (getApp().globalData.is_dj_pk) th.setData({has_def: 1}) | |
587 | + | |
588 | + var ee = JSON.parse(JSON.stringify(e)); | |
589 | + console.log(e); | |
590 | + | |
591 | + //--定时器推迟一下-- | |
592 | + var appd = getApp().globalData; | |
593 | + var w_time = setInterval(function () { | |
594 | + if (that.data.is_get_local_ok == 0) return false; | |
595 | + if (!th.data.data) { | |
596 | + return false; | |
597 | + } | |
598 | + var ser_card = th.data.data; | |
599 | + //--如果默认门店不在等级卡的默认们店以内 | |
600 | + if (ser_card.storageId != null && ser_card.storageId != "" && ser_card.storageId.indexOf(ee.keyid) == -1) { | |
601 | + ee.is_no_dis = 1; | |
602 | + } | |
603 | + | |
604 | + | |
605 | + clearInterval(w_time); | |
606 | + var distance = null; | |
607 | + var e = JSON.parse(JSON.stringify(ee)); | |
608 | + | |
609 | + //如果有开启近距离的话,同时距离优不一样了 | |
610 | + if (that.data.lat != null) { | |
611 | + //如果经纬度有变化的话 | |
612 | + if (e && appd.lat == that.data.lat && appd.lon == that.data.lon && e.distance > 0) { | |
613 | + that.data.fir_def_store = e; | |
614 | + that.setData({ | |
615 | + def_pick_store: e, | |
616 | + sto_sele_name: e.pickup_name, | |
617 | + sto_sele_id: e.pickup_id, | |
618 | + sto_sele_distr: e.distr_type, | |
619 | + sto_sele_keyid: e.keyid, | |
620 | + }) | |
621 | + } else { | |
622 | + //要用接口是获取距离,js的计算不准 | |
623 | + getApp().request.promiseGet("/api/weshop/pickup/list", { | |
624 | + data: { | |
625 | + store_id: os.stoid, | |
626 | + pickup_id: e.pickup_id, | |
627 | + lat: th.data.lat, | |
628 | + lon: th.data.lon, | |
629 | + is_pos: 1 | |
630 | + }, | |
631 | + }).then(res => { | |
632 | + if (ut.ajax_ok(res)) { | |
633 | + e = res.data.data.pageData[0]; | |
634 | + if (e) { | |
635 | + e.is_no_dis = ee.is_no_dis; | |
636 | + appd.pk_store = e; | |
637 | + that.data.fir_def_store = e; | |
638 | + | |
639 | + console.log('get_user_store--2'); | |
640 | + console.log(e); | |
641 | + | |
642 | + that.setData({ | |
643 | + def_pick_store: e, | |
644 | + sto_sele_name: e.pickup_name, | |
645 | + sto_sele_id: e.pickup_id, | |
646 | + sto_sele_distr: e.distr_type, | |
647 | + sto_sele_keyid: e.keyid, | |
648 | + }) | |
649 | + } | |
650 | + | |
651 | + } | |
652 | + }) | |
653 | + } | |
654 | + | |
655 | + //e.distance = distance; | |
656 | + appd.lat = that.data.lat; | |
657 | + appd.lon = that.data.lon; | |
658 | + | |
659 | + } else { | |
660 | + if (e) { | |
661 | + | |
662 | + console.log('get_user_store3---'); | |
663 | + console.log(e); | |
664 | + | |
665 | + e.distance = null; | |
666 | + that.data.fir_def_store = e; | |
667 | + that.setData({ | |
668 | + def_pick_store: e, | |
669 | + sto_sele_name: e.pickup_name, | |
670 | + sto_sele_id: e.pickup_id, | |
671 | + sto_sele_distr: e.distr_type, | |
672 | + sto_sele_keyid: e.keyid, | |
673 | + }) | |
674 | + } | |
675 | + } | |
676 | + }, 200) | |
677 | + | |
678 | + | |
679 | + }); | |
680 | + }) | |
681 | + | |
682 | + th.wait_for_store_config(); | |
683 | + | |
684 | + i.get("/api/weshop/serviceCard/get/" + o.stoid + "/" + ee.data.gid, { | |
685 | + failRollback: !0, | |
686 | + success: function (t) { | |
687 | + if (t.data.code == 0) { | |
688 | + // console.log('GET pic and video'); | |
689 | + if (t.data.data.listServiceVideos && t.data.data.listServiceVideos[0] && t.data.data.listServiceVideos[0].video_url) { | |
690 | + that.setData({ | |
691 | + mapurl: t.data.data.listServiceVideos[0].video_url, | |
692 | + }); | |
693 | + } | |
694 | + | |
695 | + if (t.data.data.listServiceVideos && t.data.data.listServiceVideos[0] && t.data.data.listServiceVideos[0].video_img) { | |
696 | + that.setData({ | |
697 | + mapurl_f_img: t.data.data.listServiceVideos[0].video_img, | |
698 | + }); | |
699 | + } | |
700 | + | |
701 | + if (t.data.data.listServiceImages) { | |
702 | + that.setData({ | |
703 | + gallery: t.data.data.listServiceImages, | |
704 | + }); | |
705 | + } | |
706 | + | |
707 | + if (t.data.data.listServiceItem) { | |
708 | + that.setData({ | |
709 | + listServiceItem: t.data.data.listServiceItem, | |
710 | + }); | |
711 | + } | |
712 | + | |
713 | + that.setData({ | |
714 | + 'data.goods_name': t.data.data.serviceName, | |
715 | + 'data.shop_price': t.data.data.money, | |
716 | + 'data.show_price': t.data.data.show_price, | |
717 | + 'data.validDays': t.data.data.validDays, | |
718 | + 'data.serviceContent': t.data.data.serviceContent, | |
719 | + 'data.image_url': t.data.data.imgUrl, | |
720 | + 'data.goods_id': t.data.data.id, | |
721 | + 'data.id': t.data.data.id, | |
722 | + 'data.sales_sum': t.data.data.sales_sum, | |
723 | + 'data.storageId': t.data.data.storageId, | |
724 | + 'data.service_sn': t.data.data.serviceSn, | |
725 | + 'data.listServiceVideos': t.data.data.listServiceVideos, | |
726 | + // gallery: t.data.data.listServiceImages, | |
727 | + // mapurl: t.data.data.listServiceVideos[0].video_url, | |
728 | + // mapurl_f_img: t.data.data.listServiceVideos[0].video_img, | |
729 | + //listServiceItem: t.data.data.listServiceItem, | |
730 | + }); | |
731 | + | |
732 | + that.getTaohe(); | |
733 | + // ----> 秒杀 | |
734 | + let prom_type = th.data.options.prom_type; | |
735 | + | |
736 | + let goods_id = th.data.options.goods_id; | |
737 | + if (!goods_id) goods_id = th.data.data.goods_id; | |
738 | + | |
739 | + let prom_id = th.data.options.prom_id; | |
740 | + // 检查活动是否开始 | |
741 | + th.check_prom(goods_id, prom_type, prom_id); | |
742 | + | |
743 | + | |
744 | + getApp().deal_iframe(a, e, 'content', t.data.data.serviceContent, ee); | |
745 | + | |
746 | + //获取重表 | |
747 | + getApp().promiseGet("/api/weshop/serviceItem/list", { | |
748 | + data: {store_id: o.stoid, service_id: t.data.data.id} | |
749 | + }).then(res => { | |
750 | + if (res.data.code == 0) { | |
751 | + var list = res.data.data; | |
752 | + that.setData({service_list: list}) | |
753 | + } | |
754 | + }) | |
755 | + | |
756 | + } else { | |
757 | + wx.showModal({ | |
758 | + title: t.data.msg, | |
759 | + showCancel: !1, | |
760 | + complete: function () { | |
761 | + wx.navigateBack(); | |
762 | + } | |
763 | + }); | |
764 | + } | |
765 | + ; | |
766 | + } | |
767 | + }); | |
768 | + | |
769 | + th.data.enterAddressPage && (this.data.enterAddressPage = !1); | |
770 | + //没有互动,就调用默认的门店 | |
771 | + if (!th.data.prom_type) th.get_sto(); | |
772 | + | |
773 | + | |
774 | + | |
775 | + }, | |
776 | + | |
777 | + enterAddress: function () { | |
778 | + this.data.enterAddressPage = !0, wx.navigateTo({ | |
779 | + url: "/packageF/pages/user/address_list/address_list?operate=selectAddress" | |
780 | + }); | |
781 | + }, | |
782 | + | |
783 | + onUnload: function () { | |
784 | + // for(var i = 1; i < 100; i++) { | |
785 | + // clearInterval(i); | |
786 | + // } | |
787 | + }, | |
788 | + | |
789 | + onHide: function () { | |
790 | + this.data.is_timer = 0; | |
791 | + // for(var i = 1; i < 100; i++) { | |
792 | + // clearInterval(i); | |
793 | + // } | |
794 | + }, | |
795 | + //----------三个选项按钮----------- | |
796 | + tabClick: function (t) { | |
797 | + var e = t.currentTarget.id; | |
798 | + this.setData({ | |
799 | + activeCategoryId: e | |
800 | + }), 1 == e ? this.tabGoodsContent() : 2 == e && this.tabComment(); | |
801 | + }, | |
802 | + | |
803 | + tabClick3: function (t) { | |
804 | + var e = this; | |
805 | + if (t.currentTarget.id != this.data.activeCategoryId3) { | |
806 | + e.data.c_curr_p = 1; | |
807 | + this.setData({ | |
808 | + activeCategoryId3: t.currentTarget.id, | |
809 | + comments: null, comments_no_more: 0, get_c: 0, | |
810 | + }); | |
811 | + this.requestComments_new(); | |
812 | + } | |
813 | + }, | |
814 | + | |
815 | + tabComment: function () { | |
816 | + this.setData({ | |
817 | + activeCategoryId: 2, comments_no_more: 0, get_c: 0 | |
818 | + }), this.data.comments || this.requestComments_new(); | |
819 | + }, | |
820 | + | |
821 | + //商品详情的时候调用 | |
822 | + tabGoodsContent: function () { | |
823 | + var th = this, | |
824 | + i = getApp().request; | |
825 | + this.setData({ | |
826 | + activeCategoryId: 1 | |
827 | + }); | |
828 | + }, | |
829 | + | |
830 | + | |
831 | + //------------加入购物车-------------- | |
832 | + addCart: async function (t) { | |
833 | + var th = this; | |
834 | + var ind = t.currentTarget.dataset.openSpecModal_ind; | |
835 | + var action = t.currentTarget.dataset.action; | |
836 | + | |
837 | + | |
838 | + if (getApp().is_sp_hao() && action == 'add') { | |
839 | + wx.showToast({ | |
840 | + title: "视频号商品不允许加入购物车", | |
841 | + icon: 'none', | |
842 | + duration: 2000 | |
843 | + }); | |
844 | + return false; | |
845 | + } | |
846 | + | |
847 | + | |
848 | + if (this.data.goodsInputNum == 0) { | |
849 | + getApp().my_warnning('请输入购买数量', 1, th, 450); | |
850 | + return false; | |
851 | + } | |
852 | + | |
853 | + | |
854 | + if (!ind) ind = t.currentTarget.dataset.openspecmodal_ind; | |
855 | + | |
856 | + th.setData({ | |
857 | + open_ind_store: ind | |
858 | + }); | |
859 | + | |
860 | + if (!th.data.sto_sele_name) { | |
861 | + getApp().my_warnning('请选择门店', 1, th, 450); | |
862 | + return false; | |
863 | + } | |
864 | + | |
865 | + // 库存 | |
866 | + var redisNums = 0; | |
867 | + // 限购数 | |
868 | + var limitNum = 0; | |
869 | + // 已购买数量 | |
870 | + var boughtNum = 0; | |
871 | + var is_ok = 1; | |
872 | + | |
873 | + // 获取redis当前可以购买的数量 | |
874 | + // 如果数量为0,设置和显示已抢光 | |
875 | + // 否则,进一步判断是否超出限购或超出库存 | |
876 | + await this.getactLen().then(async function (res) { | |
877 | + redisNums = res; | |
878 | + let curNum = th.data.goodsInputNum; | |
879 | + // res: redis可购买数量 | |
880 | + console.log('当前可以购买的数量:', res); | |
881 | + if (res <= 0) { | |
882 | + // 可购买数量<=0, 设置和显示已抢光 | |
883 | + th.setData({ | |
884 | + prom_r_null: 1, | |
885 | + }); | |
886 | + getApp().my_warnning('超出活动库存', 0, self); | |
887 | + is_ok = 0; | |
888 | + return false; | |
889 | + } else { | |
890 | + // 可购买数量>0 | |
891 | + // 计算自己还可以购买的数量 | |
892 | + // 自己还可购买的数量c = 每人活动限购数量a - 自己已经购买的数量b | |
893 | + // 如果限购数量a>redis可购买数量d,当增加数量t>d, 提示超出库存 | |
894 | + // 如果限购数量a<=redis可购买数量d, 当增加数量t>a,提示超出限购 | |
895 | + let actInfo = th.data.sele_g; | |
896 | + await th.get_buy_num2().then(function (data) { | |
897 | + let limited = actInfo.buy_limit == 0 ? 100000 : actInfo.buy_limit; // 限购数量a | |
898 | + let promcardbuynum = data.data.data.promcardbuynum; | |
899 | + let buyedNum = promcardbuynum; // 自己已经购买的数量b | |
900 | + let canBuyNum = limited - buyedNum; // 自己还可购买的数量c | |
901 | + limitNum = limited; | |
902 | + boughtNum = buyedNum; | |
903 | + | |
904 | + if (canBuyNum <= 0) { | |
905 | + canBuyNum = 0; | |
906 | + } | |
907 | + | |
908 | + if (canBuyNum > res) { | |
909 | + if (curNum > res) { // t当前增减的数量 | |
910 | + // wx.showModal({ | |
911 | + // title: '超出活动库存', | |
912 | + // }); | |
913 | + getApp().my_warnning('超出活动库存', 0, self); | |
914 | + th.setData({ | |
915 | + goodsInputNum: res || 1 | |
916 | + }); | |
917 | + is_ok = 0; | |
918 | + return false; | |
919 | + } | |
920 | + } | |
921 | + | |
922 | + if (canBuyNum <= res) { | |
923 | + if (curNum > canBuyNum) { | |
924 | + getApp().my_warnning('超出限购数量', 0, self); | |
925 | + th.setData({ | |
926 | + goodsInputNum: canBuyNum || 1, | |
927 | + }); | |
928 | + is_ok = 0; | |
929 | + return false; | |
930 | + } | |
931 | + } | |
932 | + }) | |
933 | + | |
934 | + } | |
935 | + }) | |
936 | + | |
937 | + if (!is_ok) return false; | |
938 | + | |
939 | + | |
940 | + if (action == "buy") { | |
941 | + //--------------此时操作的数据------------ | |
942 | + var newd = { | |
943 | + id: th.data.data.id, | |
944 | + goods_num: th.data.goodsInputNum, | |
945 | + pick_id: th.data.sto_sele_id, | |
946 | + keyid: th.data.sto_sele_keyid, | |
947 | + }; | |
948 | + newd['pick_name'] = th.data.sto_sele_name; | |
949 | + newd['guide_id'] = getApp().globalData.guide_id; | |
950 | + newd['guide_type'] = 0; | |
951 | + | |
952 | + if (getApp().globalData.groupchat_id) { | |
953 | + newd['groupchat_id'] = getApp().globalData.groupchat_id; | |
954 | + } | |
955 | + if (this.data.prom_type) { | |
956 | + newd['prom_type'] = this.data.prom_type; | |
957 | + newd['prom_id'] = this.data.prom_id; | |
958 | + newd['prom_price'] = this.data.prom_price; | |
959 | + } | |
960 | + th.buyNow(newd); | |
961 | + } else { | |
962 | + | |
963 | + var newd = { | |
964 | + service_id: th.data.data.id, | |
965 | + service_sn: th.data.data.service_sn, | |
966 | + service_name: th.data.data.goods_name, | |
967 | + goods_num: th.data.goodsInputNum, | |
968 | + pick_id: th.data.sto_sele_id, | |
969 | + user_id: oo.user_id, | |
970 | + store_id: os.stoid, | |
971 | + money: th.data.data.shop_price, | |
972 | + }; | |
973 | + if (getApp().globalData.guide_id) { | |
974 | + newd['guide_id'] = getApp().globalData.guide_id; | |
975 | + newd['guide_type'] = 0; | |
976 | + } | |
977 | + | |
978 | + if (getApp().globalData.groupchat_id) { | |
979 | + newd['groupchat_id'] = getApp().globalData.groupchat_id; | |
980 | + } | |
981 | + // 秒杀:单独购买的情况下,加入购物车显示的是零售价,否则显示秒杀活动价 | |
982 | + newd['prom_type'] = th.data.options.prom_type; | |
983 | + newd['prom_id'] = th.data.options.prom_id; | |
984 | + newd['money'] = th.data.prom_price; | |
985 | + | |
986 | + //----先看会员在购物车中是否加入了该商品----- | |
987 | + getApp().request.get("/api/weshop/cartService/page", { | |
988 | + data: { | |
989 | + store_id: os.stoid, | |
990 | + user_id: oo.user_id, | |
991 | + service_id: th.data.data.id, | |
992 | + }, | |
993 | + success: function (re) { | |
994 | + //-------如果购物车中有相关的数据--------- | |
995 | + if (re.data.data.total > 0) { | |
996 | + var item = null; | |
997 | + // 多门店问题 | |
998 | + var cartGoodsNum = 0; | |
999 | + const tmpObj = re.data.data.pageData; | |
1000 | + for (let i = 0; i < tmpObj.length; i++) { | |
1001 | + if (th.data.sto_sele_id != tmpObj[i].pick_id) { | |
1002 | + cartGoodsNum += parseInt(tmpObj[i].goods_num); | |
1003 | + } else { | |
1004 | + item = tmpObj[i]; | |
1005 | + } | |
1006 | + } | |
1007 | + // 当前门店同类商品还没加入到购物车 但是有其他门店的同类商品 | |
1008 | + if (th.data.prom_type == 1 && !th.data.is_normal && !item) { | |
1009 | + | |
1010 | + // 秒杀购物车购买 修正数量 | |
1011 | + var snum = limitNum - boughtNum; | |
1012 | + if (snum <= 0) { | |
1013 | + // wx.showModal({ | |
1014 | + // title: '超出限购数量', | |
1015 | + // }); | |
1016 | + getApp().my_warnning('超出限购数量', 0, self); | |
1017 | + return false; | |
1018 | + } | |
1019 | + | |
1020 | + var cSnum = snum - cartGoodsNum <= 0 ? 0 : snum - cartGoodsNum; | |
1021 | + var cRedisNums = redisNums - cartGoodsNum <= 0 ? 0 : redisNums - cartGoodsNum; | |
1022 | + | |
1023 | + if (newd['goods_num'] >= redisNums) { | |
1024 | + if (redisNums > snum) { | |
1025 | + newd['goods_num'] = cSnum; | |
1026 | + } else { | |
1027 | + newd['goods_num'] = cRedisNums; | |
1028 | + } | |
1029 | + } else { | |
1030 | + if (newd['goods_num'] > snum) newd['goods_num'] = cSnum; | |
1031 | + } | |
1032 | + | |
1033 | + if (newd['goods_num'] <= 0) { | |
1034 | + getApp().my_warnning('加入购物车成功', 1, th, 450); | |
1035 | + th.closeSpecModal(); | |
1036 | + return false; | |
1037 | + } | |
1038 | + getApp().request.post("/api/weshop/cartService/save", { | |
1039 | + data: newd, | |
1040 | + success: function (t) { | |
1041 | + getApp().my_warnning('加入购物车成功', 1, th, 450); | |
1042 | + var c_num = th.data.cartGoodsNum + th.data.goodsInputNum; | |
1043 | + th.setData({ | |
1044 | + cartGoodsNum: c_num | |
1045 | + }); | |
1046 | + th.closeSpecModal(); | |
1047 | + } | |
1048 | + }); | |
1049 | + return false; | |
1050 | + } | |
1051 | + | |
1052 | + // 以下为当前门店同类商品已经加入到购物车 | |
1053 | + var totalNum = th.data.goodsInputNum + item.goods_num; | |
1054 | + | |
1055 | + // 秒杀购物车购买 修正数量 | |
1056 | + if (th.data.prom_type == 1 && !th.data.is_normal) { | |
1057 | + var snum = limitNum - boughtNum; | |
1058 | + if (snum <= 0) { | |
1059 | + // wx.showModal({ | |
1060 | + // title: '超出限购数量', | |
1061 | + // }); | |
1062 | + getApp().my_warnning('超出限购数量', 0, self); | |
1063 | + return false; | |
1064 | + } | |
1065 | + if (totalNum >= redisNums) { | |
1066 | + if (redisNums > snum) { | |
1067 | + totalNum = snum - cartGoodsNum; | |
1068 | + } else { | |
1069 | + totalNum = redisNums - cartGoodsNum; | |
1070 | + } | |
1071 | + } else { | |
1072 | + if (totalNum > snum) | |
1073 | + totalNum = snum - cartGoodsNum; | |
1074 | + } | |
1075 | + } | |
1076 | + | |
1077 | + var updata = { | |
1078 | + id: item.id, | |
1079 | + goods_num: totalNum, | |
1080 | + money: th.data.data.shop_price, | |
1081 | + store_id: os.stoid, | |
1082 | + }; | |
1083 | + | |
1084 | + // 秒杀:单独购买的情况下,加入购物车显示的是零售价,否则显示秒杀活动价 | |
1085 | + if (th.data.options.prom_type == 1) { | |
1086 | + // updata['prom_type'] = th.data.options.prom_type; | |
1087 | + // updata['prom_id'] = th.data.options.prom_id; | |
1088 | + if (th.data.openSpecModal_flash_normal) { | |
1089 | + updata['money'] = th.data.data.shop_price; | |
1090 | + updata['is_pd_normal'] = 1; | |
1091 | + } else { | |
1092 | + updata['money'] = th.data.prom_price; | |
1093 | + } | |
1094 | + ; | |
1095 | + } | |
1096 | + ; | |
1097 | + | |
1098 | + if (getApp().globalData.guide_id) { | |
1099 | + updata['guide_id'] = getApp().globalData.guide_id; | |
1100 | + updata['guide_type'] = 1; | |
1101 | + } | |
1102 | + if (getApp().globalData.groupchat_id) { | |
1103 | + updata['groupchat_id'] = getApp().globalData.groupchat_id; | |
1104 | + } | |
1105 | + getApp().request.put("/api/weshop/cartService/update", { | |
1106 | + data: updata, | |
1107 | + success: function (t) { | |
1108 | + getApp().my_warnning('加入购物车成功', 1, th, 450); | |
1109 | + var c_num = th.data.cartGoodsNum + th.data.goodsInputNum; | |
1110 | + th.setData({ | |
1111 | + cartGoodsNum: c_num | |
1112 | + }); | |
1113 | + th.closeSpecModal(); | |
1114 | + } | |
1115 | + }); | |
1116 | + } else { | |
1117 | + getApp().request.post("/api/weshop/cartService/save", { | |
1118 | + data: newd, | |
1119 | + success: function (t) { | |
1120 | + getApp().my_warnning('加入购物车成功', 1, th, 450); | |
1121 | + var c_num = th.data.cartGoodsNum + th.data.goodsInputNum; | |
1122 | + th.setData({ | |
1123 | + cartGoodsNum: c_num | |
1124 | + }); | |
1125 | + th.closeSpecModal(); | |
1126 | + } | |
1127 | + }); | |
1128 | + } | |
1129 | + } | |
1130 | + }); | |
1131 | + | |
1132 | + } | |
1133 | + | |
1134 | + | |
1135 | + }, | |
1136 | + | |
1137 | + //----------立即购买----------- | |
1138 | + buyNow: function (e) { | |
1139 | + getApp().globalData.service_now = e; | |
1140 | + wx.redirectTo({ | |
1141 | + url: "/packageA/pages/cart2_ser/cart2_ser", | |
1142 | + }); | |
1143 | + }, | |
1144 | + //----------增加购买数量----------- | |
1145 | + addCartNum: function (t) { | |
1146 | + this.checkCartNum(this.data.goodsInputNum + 1); | |
1147 | + }, | |
1148 | + //----------减少购买数量----------- | |
1149 | + subCartNum: function (t) { | |
1150 | + this.checkCartNum(this.data.goodsInputNum - 1); | |
1151 | + }, | |
1152 | + //----------输入框输入购买数量----------- | |
1153 | + inputCartNum: function (t) { | |
1154 | + this.checkCartNum(Number(t.detail.value)); | |
1155 | + }, | |
1156 | + | |
1157 | + //------检查数量是不是超出限购------ | |
1158 | + checkCartNum: async function (t) { | |
1159 | + var th = this; | |
1160 | + | |
1161 | + if (!th.data.def_pick_store) { | |
1162 | + wx.showModal({title: '请选择门店',}); | |
1163 | + return false; | |
1164 | + } | |
1165 | + // 非秒杀活动 | |
1166 | + if (this.data.prom_type != 1) { | |
1167 | + this.setData({ | |
1168 | + goodsInputNum: t, | |
1169 | + }); | |
1170 | + } | |
1171 | + | |
1172 | + // 秒杀活动 | |
1173 | + if (this.data.prom_type == 1) { | |
1174 | + // 如果是秒杀活动下的单独购买,is_normal为1 | |
1175 | + if (this.data.openSpecModal_flash_normal) this.data.is_normal = 1; | |
1176 | + | |
1177 | + if (this.data.is_normal) {// 单独购买 | |
1178 | + this.setData({ | |
1179 | + goodsInputNum: t, | |
1180 | + }); | |
1181 | + } else {// 秒杀购买 | |
1182 | + | |
1183 | + // 获取redis当前可以购买的数量 | |
1184 | + // 如果数量为0,设置和显示已抢光 | |
1185 | + // 否则,进一步判断是否超出限购或超出库存 | |
1186 | + await this.getactLen().then(async function (res) { | |
1187 | + // res: redis可购买数量 | |
1188 | + // console.log('当前可以购买的数量:', res); | |
1189 | + if (res <= 0) { | |
1190 | + // 可购买数量<=0, 设置和显示已抢光 | |
1191 | + th.setData({ | |
1192 | + prom_r_null: 1, | |
1193 | + }); | |
1194 | + } else { | |
1195 | + // 可购买数量>0 | |
1196 | + // 计算自己还可以购买的数量 | |
1197 | + // 自己还可购买的数量c = 每人活动限购数量a - 自己已经购买的数量b | |
1198 | + // 如果限购数量a>redis可购买数量d,当增加数量t>d, 提示超出库存 | |
1199 | + // 如果限购数量a<=redis可购买数量d, 当增加数量t>a,提示超出限购 | |
1200 | + let actInfo = th.data.sele_g; | |
1201 | + await th.get_buy_num2().then(function (data) { | |
1202 | + let limited = actInfo.buy_limit == 0 ? 100000 : actInfo.buy_limit; // 限购数量a | |
1203 | + let promcardbuynum = data.data.data.promcardbuynum; | |
1204 | + let buyedNum = promcardbuynum; // 自己已经购买的数量b | |
1205 | + let canBuyNum = limited - buyedNum; // 自己还可购买的数量c | |
1206 | + | |
1207 | + if (canBuyNum <= 0) { | |
1208 | + canBuyNum = 0; | |
1209 | + } | |
1210 | + ; | |
1211 | + | |
1212 | + if (limited > res) { | |
1213 | + if (t > res) { // t当前增减的数量 | |
1214 | + // wx.showModal({ | |
1215 | + // title: '超出活动库存', | |
1216 | + // }); | |
1217 | + getApp().my_warnning('超出活动库存', 0, self); | |
1218 | + th.setData({ | |
1219 | + goodsInputNum: res || 1, | |
1220 | + }); | |
1221 | + return false; | |
1222 | + } | |
1223 | + | |
1224 | + } | |
1225 | + | |
1226 | + | |
1227 | + if (limited <= res) { | |
1228 | + if (t > canBuyNum) { | |
1229 | + // wx.showModal({ | |
1230 | + // title: '超出限购数量', | |
1231 | + // }); | |
1232 | + getApp().my_warnning('超出限购数量', 0, self); | |
1233 | + th.setData({ | |
1234 | + goodsInputNum: canBuyNum || 1, | |
1235 | + }); | |
1236 | + return false; | |
1237 | + } | |
1238 | + | |
1239 | + } | |
1240 | + | |
1241 | + | |
1242 | + th.setData({ | |
1243 | + goodsInputNum: t, | |
1244 | + }); | |
1245 | + }); | |
1246 | + } | |
1247 | + ; | |
1248 | + }); | |
1249 | + | |
1250 | + } | |
1251 | + | |
1252 | + | |
1253 | + } | |
1254 | + | |
1255 | + | |
1256 | + }, | |
1257 | + | |
1258 | + | |
1259 | + closeSpecModal: function () { | |
1260 | + this.setData({ | |
1261 | + openSpecModal: !1, | |
1262 | + openSpecModal_pt: !1, | |
1263 | + openSpecModal_flash_normal: !1, | |
1264 | + }); | |
1265 | + }, | |
1266 | + | |
1267 | + openSpecModel: function (t) { | |
1268 | + | |
1269 | + if (this.data.get_sto_ing) return false; | |
1270 | + | |
1271 | + var th = this; | |
1272 | + var open_store = t.currentTarget.dataset.ind; | |
1273 | + if (getApp().is_sp_hao() && open_store == 1) { | |
1274 | + wx.showToast({ | |
1275 | + title: "视频号商品不允许加入购物车", | |
1276 | + icon: 'none', | |
1277 | + duration: 2000 | |
1278 | + }); | |
1279 | + return false; | |
1280 | + } | |
1281 | + | |
1282 | + | |
1283 | + //--先判断会员状态-- | |
1284 | + var user_info = getApp().globalData.userInfo; | |
1285 | + if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) { | |
1286 | + wx.navigateTo({ | |
1287 | + url: '/packageE/pages/togoin/togoin', | |
1288 | + }) | |
1289 | + return false; | |
1290 | + } | |
1291 | + | |
1292 | + this.setData({ | |
1293 | + store: 0, | |
1294 | + choice_sort_store: 0, | |
1295 | + sort_store: 0, | |
1296 | + open_ind_store: open_store, | |
1297 | + }) | |
1298 | + | |
1299 | + | |
1300 | + var ind = t.currentTarget.dataset.ind; | |
1301 | + this.setData({ | |
1302 | + openSpecModal: !0, | |
1303 | + openSpecModal_ind: ind, | |
1304 | + }); | |
1305 | + | |
1306 | + }, | |
1307 | + | |
1308 | + //---------点击收藏和不收藏------------ | |
1309 | + collectGoods: function () { | |
1310 | + var t = this, i = getApp().request; | |
1311 | + var user_id = s.globalData.user_id; | |
1312 | + if (user_id == '') { | |
1313 | + getApp().getUserFir(function () { | |
1314 | + }); | |
1315 | + getApp().showWarning("未登录"); | |
1316 | + return false; | |
1317 | + } else { | |
1318 | + | |
1319 | + if (t.data.is_collect_load) return false; | |
1320 | + t.data.is_collect_load = 1; | |
1321 | + | |
1322 | + if (t.data.is_collect == 1) { //删除收藏 | |
1323 | + i.delete("/api/weshop/goodscollect/del/" + o.stoid + "/" + t.data.collect_id, { | |
1324 | + success: function (e) { | |
1325 | + t.data.is_collect_load = 0; | |
1326 | + if (e.data.code == 0) { | |
1327 | + t.setData({ | |
1328 | + is_collect: 0, | |
1329 | + collect_id: 0, | |
1330 | + }); | |
1331 | + } | |
1332 | + } | |
1333 | + }); | |
1334 | + } else { | |
1335 | + var timestamp = Date.parse(new Date()); | |
1336 | + timestamp = timestamp / 1000; | |
1337 | + var d = { | |
1338 | + goods_id: t.data.data.goods_id, | |
1339 | + user_id: s.globalData.user_id, | |
1340 | + store_id: o.stoid, | |
1341 | + add_time: timestamp, | |
1342 | + type: 1, | |
1343 | + }; | |
1344 | + //加入收藏夹就是导购的ID | |
1345 | + if (getApp().globalData.guide_id) { | |
1346 | + d.guide_id = getApp().globalData.guide_id; | |
1347 | + d.guide_type = 2; | |
1348 | + } | |
1349 | + if (getApp().globalData.groupchat_id) { | |
1350 | + d.groupchat_id = getApp().globalData.groupchat_id; | |
1351 | + } | |
1352 | + i.post("/api/weshop/goodscollect/save", { //添加收藏 | |
1353 | + data: d, | |
1354 | + success: function (e) { | |
1355 | + t.data.is_collect_load = 0; | |
1356 | + if (e.data.code == 0) { | |
1357 | + t.setData({ | |
1358 | + is_collect: 1, | |
1359 | + collect_id: e.data.data.collect_id, | |
1360 | + }); | |
1361 | + } | |
1362 | + } | |
1363 | + }); | |
1364 | + } | |
1365 | + } | |
1366 | + }, | |
1367 | + //---------联系客服------------ | |
1368 | + contactService: function () { | |
1369 | + this.getTel() | |
1370 | + .then(() => { | |
1371 | + if (self.data.store_tel) { | |
1372 | + wx.showModal({ | |
1373 | + title: '联系客服', | |
1374 | + content: '客服热线:' + self.data.store_tel, | |
1375 | + confirmText: '拨打', | |
1376 | + success(res) { | |
1377 | + if (res.confirm) { | |
1378 | + wx.makePhoneCall({ | |
1379 | + phoneNumber: self.data.store_tel, | |
1380 | + }) | |
1381 | + } | |
1382 | + ; | |
1383 | + }, | |
1384 | + }); | |
1385 | + } | |
1386 | + ; | |
1387 | + }); | |
1388 | + }, | |
1389 | + // 获取客服电话 | |
1390 | + getTel() { | |
1391 | + return new Promise((resolve, reject) => { | |
1392 | + s.getConfig(function (t) { | |
1393 | + if (t.store_tel == undefined) { | |
1394 | + getApp().request.get("/api/weshop/store/get/" + os.stoid, { | |
1395 | + isShowLoading: 1, | |
1396 | + data: {}, | |
1397 | + success: function (rs) { | |
1398 | + getApp().globalData.config = rs.data.data; | |
1399 | + if (rs.data.data.store_tel == null && rs.data.data.store_tel == undefined) { | |
1400 | + getApp().my_warnning("商家未设置电话", 0, th); | |
1401 | + return false; | |
1402 | + } | |
1403 | + self.setData({ | |
1404 | + store_tel: rs.data.data.store_tel, | |
1405 | + }); | |
1406 | + // s.confirmBox("请联系客服:" + rs.data.data.store_tel); | |
1407 | + } | |
1408 | + }) | |
1409 | + } else { | |
1410 | + self.setData({ | |
1411 | + store_tel: t.store_tel, | |
1412 | + }); | |
1413 | + // s.confirmBox("请联系客服:" + t.store_tel); | |
1414 | + } | |
1415 | + ; | |
1416 | + resolve(); | |
1417 | + }); | |
1418 | + }); | |
1419 | + }, | |
1420 | + //-------获取购物车数量---------- | |
1421 | + requestCardNum: function () { | |
1422 | + var t = this; | |
1423 | + getApp().request.get("/api/weshop/cart/page", { | |
1424 | + data: { | |
1425 | + store_id: o.stoid, | |
1426 | + user_id: s.globalData.user_id, | |
1427 | + state: 0, | |
1428 | + is_gift: 0 | |
1429 | + }, | |
1430 | + success: function (e) { | |
1431 | + var num = 0; | |
1432 | + for (var i = 0; i < e.data.data.pageData.length; i++) { | |
1433 | + num += e.data.data.pageData[i].goods_num; | |
1434 | + } | |
1435 | + | |
1436 | + //-- 读取服务卡的数量 -- | |
1437 | + getApp().promiseGet("/api/weshop/cartService/page", { | |
1438 | + data: { | |
1439 | + store_id: s.globalData.setting.stoid, | |
1440 | + user_id: s.globalData.user_id, | |
1441 | + } | |
1442 | + }).then(res => { | |
1443 | + for (var i = 0; i < res.data.data.pageData.length; i++) { | |
1444 | + num += res.data.data.pageData[i].goods_num; | |
1445 | + } | |
1446 | + t.setData({cartGoodsNum: num}); | |
1447 | + }) | |
1448 | + | |
1449 | + | |
1450 | + } | |
1451 | + }); | |
1452 | + }, | |
1453 | + | |
1454 | + //--点击分享事件--- | |
1455 | + onShareAppMessage: function (t) { | |
1456 | + | |
1457 | + var th = this; | |
1458 | + var price = th.data.data.shop_price; | |
1459 | + if (th.data.prom_act) { | |
1460 | + price = th.data.prom_act.price; | |
1461 | + | |
1462 | + } | |
1463 | + var title = th.data.data.goods_name; | |
1464 | + var img = th.data.iurl + th.data.data.image_url; | |
1465 | + if (th.data.prom_type == 6) { | |
1466 | + title = th.data.prom_act.share_title; | |
1467 | + img = th.data.iurl + th.data.prom_act.share_imgurl; | |
1468 | + } | |
1469 | + | |
1470 | + | |
1471 | + var url = "/packageA/pages/goodsInfo/goodsInfo?goods_id=" + th.data.gid; | |
1472 | + if (getApp().globalData.user_id) { | |
1473 | + url += "&first_leader=" + getApp().globalData.user_id; | |
1474 | + } | |
1475 | + | |
1476 | + //-- 如果房间分享,且不是会员分享的 -- | |
1477 | + if (getApp().globalData.room_id && | |
1478 | + th.data.data.goods_id == getApp().globalData.room_goods_id && | |
1479 | + !getApp().globalData.room_user_share | |
1480 | + ) { | |
1481 | + url += "&room_id=" + getApp().globalData.room_id + "&room_user_share=1"; | |
1482 | + } | |
1483 | + | |
1484 | + | |
1485 | + var ob = { | |
1486 | + title: price + "元 " + title, | |
1487 | + path: url, | |
1488 | + imageUrl: img, | |
1489 | + }; | |
1490 | + | |
1491 | + // 如果服务卡参加秒杀活动,且后台设置了分享标题和分享图片 | |
1492 | + if (th.data.prom_type == 1) { | |
1493 | + if (th.data.sele_g && th.data.sele_g.share_title) { | |
1494 | + title = th.data.sele_g.share_title; | |
1495 | + ob.title = title; | |
1496 | + } | |
1497 | + ; | |
1498 | + if (th.data.sele_g && th.data.sele_g.share_imgurl) { | |
1499 | + img = th.data.iurl + th.data.sele_g.share_imgurl; | |
1500 | + ob.imageUrl = img; | |
1501 | + } | |
1502 | + } | |
1503 | + | |
1504 | + return ob; | |
1505 | + | |
1506 | + }, | |
1507 | + | |
1508 | + //-----图片失败,默认图片----- | |
1509 | + bind_bnerr: function (e) { | |
1510 | + var _errImg = e.target.dataset.errorimg; | |
1511 | + var _errObj = {}; | |
1512 | + _errObj[_errImg] = this.data.iurl + "/miniapp/images/default_g_img.gif"; | |
1513 | + this.setData(_errObj) //注意这里的赋值方式,只是将数据列表中的此项图片路径值替换掉 ; | |
1514 | + }, | |
1515 | + | |
1516 | + //-----图片失败,默认图片----- | |
1517 | + bind_bnerr2: function (e) { | |
1518 | + | |
1519 | + var _errImg = e.target.dataset.errorimg; | |
1520 | + var _errObj = {}; | |
1521 | + _errObj[_errImg] = this.data.iurl + "/miniapp/images/hui_hear_pic.png" | |
1522 | + this.setData(_errObj) //注意这里的赋值方式,只是将数据列表中的此项图片路径值替换掉 ; | |
1523 | + }, | |
1524 | + | |
1525 | + | |
1526 | + //---------拿出门店分类和门店------------ | |
1527 | + get_sto(e) { | |
1528 | + var is_normal = e; | |
1529 | + var th = this, that = this; | |
1530 | + | |
1531 | + if (e == 1) { | |
1532 | + th.setData({ | |
1533 | + is_normal: 1 | |
1534 | + }) | |
1535 | + } else { | |
1536 | + th.setData({ | |
1537 | + is_normal: 0 | |
1538 | + }) | |
1539 | + } | |
1540 | + | |
1541 | + this.data.get_sto_ing = 1; | |
1542 | + | |
1543 | + var timer_get = setInterval(function () { | |
1544 | + if (th.data.is_get_local_ok == 0) return false; | |
1545 | + if (!th.data.fir_def_store) return false; | |
1546 | + var i = getApp().request; | |
1547 | + if (!th.data.data) return false; | |
1548 | + var dd = { | |
1549 | + store_id: o.stoid, | |
1550 | + isstop: 0, | |
1551 | + is_pos: 1, | |
1552 | + pageSize: 2000 | |
1553 | + } | |
1554 | + //如果有距离的话 | |
1555 | + if (th.data.lat != null) { | |
1556 | + dd.lat = th.data.lat; | |
1557 | + dd.lon = th.data.lon; | |
1558 | + } | |
1559 | + clearInterval(timer_get); | |
1560 | + | |
1561 | + //如果会员是有默认的门店话 | |
1562 | + if (!th.data.def_pick_store && th.data.fir_def_store) { | |
1563 | + th.setData({def_pick_store: th.data.fir_def_store}); | |
1564 | + } | |
1565 | + | |
1566 | + wx.showLoading({ | |
1567 | + title: '加载中.' | |
1568 | + }); | |
1569 | + //----------获取门店---------------- | |
1570 | + getApp().request.promiseGet("/api/weshop/pickup/list", { | |
1571 | + data: dd, | |
1572 | + }).then(res => { | |
1573 | + var e = res; | |
1574 | + if (e.data.code == 0 && e.data.data && e.data.data.pageData && e.data.data.pageData.length > 0) { | |
1575 | + | |
1576 | + var his_cate_num = 0; | |
1577 | + for (let i in e.data.data.pageData) { | |
1578 | + let item = e.data.data.pageData[i]; | |
1579 | + if (item.category_id > 0) { | |
1580 | + his_cate_num = 1; | |
1581 | + break; | |
1582 | + } | |
1583 | + } | |
1584 | + e.his_cate_num = his_cate_num; | |
1585 | + | |
1586 | + //--普通门店排版,服务卡项有指定门店才能使用,所以要筛选一下-- | |
1587 | + setTimeout(function () { | |
1588 | + var sto_list = th.data.data.storageId; | |
1589 | + if (sto_list) { | |
1590 | + for (var k = 0; k < e.data.data.pageData.length; k++) { | |
1591 | + var it = e.data.data.pageData[k]; | |
1592 | + if (sto_list.indexOf(it.keyid) == -1) { | |
1593 | + //删除 | |
1594 | + e.data.data.pageData.splice(k--, 1); | |
1595 | + } | |
1596 | + } | |
1597 | + | |
1598 | + } | |
1599 | + | |
1600 | + //如果有秒杀的指定门店 | |
1601 | + if (th.data.prom_type == 1 && th.data.prom_act && th.data.prom_act.pick_up_lists && e.data.data.pageData.length && !is_normal) { | |
1602 | + var pick_up_lists = th.data.prom_act.pick_up_lists; | |
1603 | + for (var kq = 0; kq < e.data.data.pageData.length; kq++) { | |
1604 | + var it0 = e.data.data.pageData[kq]; | |
1605 | + var idx0 = pick_up_lists.findIndex(function (e) { | |
1606 | + return e.pickup_id == it0.pickup_id; | |
1607 | + }) | |
1608 | + if (idx0 < 0) { | |
1609 | + //删除 | |
1610 | + e.data.data.pageData.splice(kq--, 1); | |
1611 | + } | |
1612 | + } | |
1613 | + | |
1614 | + if (th.data.def_pick_store && JSON.stringify(th.data.def_pick_store) != '{}') { | |
1615 | + //-- 查找一下门店有没有在 -- | |
1616 | + var idx1 = pick_up_lists.findIndex(function (e) { | |
1617 | + return e.pickup_id == th.data.def_pick_store.pickup_id; | |
1618 | + }) | |
1619 | + if (idx1 < 0) { | |
1620 | + //如果是秒杀的指定门店,就要设置秒杀的 | |
1621 | + th.data.def_pick_store.is_no_dis_act = 1; | |
1622 | + that.setData({ | |
1623 | + def_pick_store: th.data.def_pick_store | |
1624 | + }) | |
1625 | + } | |
1626 | + } | |
1627 | + | |
1628 | + } | |
1629 | + | |
1630 | + //-- 如果门店过滤后,还会是数量 -- | |
1631 | + if (e.data.data.pageData.length) { | |
1632 | + //如果有开启距离的功能,没有设置默认门店,要用最近的门店作为默认门店 | |
1633 | + if (dd.lat && (!th.data.def_pick_store || JSON.stringify(th.data.def_pick_store) == '{}') && th.data.bconfig && th.data.bconfig.is_sort_storage) { | |
1634 | + th.setData({ | |
1635 | + def_pick_store: e.data.data.pageData[0], | |
1636 | + sto_sele_name: e.data.data.pageData[0].pickup_name, | |
1637 | + sto_sele_id: e.data.data.pageData[0].pickup_id, | |
1638 | + sto_sele_distr: e.data.data.pageData[0].distr_type, | |
1639 | + sto_sele_keyid: e.data.data.pageData[0].keyid, | |
1640 | + }); | |
1641 | + th.data.fir_def_store = e.data.data.pageData[0]; | |
1642 | + } | |
1643 | + | |
1644 | + //-- 如果有默认选择门店的时候,要把默认门店放在第一位,修改不要配送方式的判断 -- | |
1645 | + if (th.data.def_pick_store && JSON.stringify(th.data.def_pick_store) != '{}') { | |
1646 | + for (var k = 0; k < e.data.data.pageData.length; k++) { | |
1647 | + if (e.data.data.pageData[k].pickup_id == th.data.def_pick_store.pickup_id) { | |
1648 | + e.data.data.pageData.splice(k, 1); //删除 | |
1649 | + break; | |
1650 | + } | |
1651 | + } | |
1652 | + e.data.data.pageData.splice(0, 0, th.data.def_pick_store); //添加 | |
1653 | + } | |
1654 | + | |
1655 | + th.setData({all_pick_list: e.data.data.pageData, isshow: 1}); | |
1656 | + th.deal_pickup(e); | |
1657 | + } else { | |
1658 | + th.data.get_sto_ing = 0; | |
1659 | + th.setData({ | |
1660 | + isshow: 1 | |
1661 | + }) | |
1662 | + wx.hideLoading(); | |
1663 | + } | |
1664 | + | |
1665 | + | |
1666 | + }, 800) | |
1667 | + | |
1668 | + } | |
1669 | + }) | |
1670 | + }, 200) | |
1671 | + }, | |
1672 | + //获取搜索门店输入的值 | |
1673 | + input_store: function (e) { | |
1674 | + this.setData({ | |
1675 | + keyword: e.detail.value | |
1676 | + }) | |
1677 | + }, | |
1678 | + //搜索门店 | |
1679 | + searchfn() { | |
1680 | + let choice_sort_store = this.data.choice_sort_store | |
1681 | + if (choice_sort_store == 0) { //全局搜索 | |
1682 | + let all_pick_list = this.data.all_pick_list | |
1683 | + let def_pickpu_list = this.data.def_pickpu_list | |
1684 | + let keyword = this.data.keyword | |
1685 | + if (keyword) { | |
1686 | + let arr = all_pick_list.filter(item => { | |
1687 | + let i = item.pickup_name.indexOf(keyword) | |
1688 | + if (i > -1) { | |
1689 | + return true | |
1690 | + } else { | |
1691 | + return false | |
1692 | + } | |
1693 | + }) | |
1694 | + if (arr && arr.length > 0) { | |
1695 | + if (this.data.is_show_sto_cat == 1) { | |
1696 | + this.setData({ | |
1697 | + def_pickpu_list: arr | |
1698 | + }) | |
1699 | + } else { | |
1700 | + this.setData({ | |
1701 | + only_pk: arr | |
1702 | + }) | |
1703 | + } | |
1704 | + } else { | |
1705 | + wx.showToast({ | |
1706 | + title: '没有搜索到门店', | |
1707 | + icon: 'none', | |
1708 | + duration: 2000 | |
1709 | + }) | |
1710 | + } | |
1711 | + } else { | |
1712 | + if (this.data.is_show_sto_cat == 1) { | |
1713 | + this.setData({ | |
1714 | + def_pickpu_list: all_pick_list.slice(0, 10) | |
1715 | + }) | |
1716 | + } else { | |
1717 | + this.setData({ | |
1718 | + only_pk: all_pick_list | |
1719 | + }) | |
1720 | + } | |
1721 | + | |
1722 | + } | |
1723 | + } else { //分类下搜索 | |
1724 | + let sec_i = this.data.sec_i | |
1725 | + let all_sto = this.data.all_sto | |
1726 | + let old_all_sto = this.data.old_all_sto | |
1727 | + if (!old_all_sto) { | |
1728 | + this.setData({ | |
1729 | + old_all_sto: JSON.parse(JSON.stringify(all_sto)) | |
1730 | + }) | |
1731 | + } | |
1732 | + let sec_sto = this.data.sec_sto | |
1733 | + let sec_arr = this.data.old_all_sto[sec_i].s_arr | |
1734 | + let keyword = this.data.keyword | |
1735 | + let text = 'sec_sto.s_arr' | |
1736 | + if (keyword) { | |
1737 | + let arr = sec_arr.filter(item => { | |
1738 | + let i = item.pickup_name.indexOf(keyword) | |
1739 | + if (i > -1) { | |
1740 | + return true | |
1741 | + } else { | |
1742 | + return false | |
1743 | + } | |
1744 | + }) | |
1745 | + if (arr && arr.length > 0) { | |
1746 | + this.setData({ | |
1747 | + [text]: arr | |
1748 | + }) | |
1749 | + } else { | |
1750 | + wx.showToast({ | |
1751 | + title: '没有搜索到门店', | |
1752 | + icon: 'none', | |
1753 | + duration: 2000 | |
1754 | + }) | |
1755 | + } | |
1756 | + } else { | |
1757 | + if (this.data.old_all_sto) { | |
1758 | + this.setData({ | |
1759 | + [text]: this.data.old_all_sto[sec_i].s_arr | |
1760 | + }) | |
1761 | + } else { | |
1762 | + this.setData({ | |
1763 | + [text]: all_sto[sec_i].s_arr | |
1764 | + }) | |
1765 | + } | |
1766 | + } | |
1767 | + | |
1768 | + | |
1769 | + } | |
1770 | + }, | |
1771 | + | |
1772 | + | |
1773 | + //------------处理门店--------------- | |
1774 | + deal_pickup(e) { | |
1775 | + var th = this; | |
1776 | + if (!th.data.data) return false | |
1777 | + wx.hideLoading(); | |
1778 | + //单总量超出5个的时候 | |
1779 | + if (e.data.data.total > 10 && e.his_cate_num) { | |
1780 | + getApp().request.get("/api/weshop/storagecategory/page", { | |
1781 | + data: { | |
1782 | + store_id: o.stoid, | |
1783 | + pageSize: 1000, | |
1784 | + orderField: "sort", | |
1785 | + orderType: 'asc', | |
1786 | + }, | |
1787 | + success: function (ee) { | |
1788 | + if (ee.data.code == 0) { | |
1789 | + | |
1790 | + var check_all_cate = 0; | |
1791 | + if (ee.data.data && ee.data.data.pageData && ee.data.data.pageData.length > 0) { | |
1792 | + for (let i in ee.data.data.pageData) { | |
1793 | + let item = ee.data.data.pageData[i]; | |
1794 | + if (item.is_show == 1) { | |
1795 | + check_all_cate = 1; | |
1796 | + break | |
1797 | + } | |
1798 | + } | |
1799 | + } | |
1800 | + | |
1801 | + if (check_all_cate) { | |
1802 | + | |
1803 | + | |
1804 | + var sto_cate = ee.data.data.pageData; | |
1805 | + var sto_arr = e.data.data.pageData; | |
1806 | + var newarr = new Array(); | |
1807 | + var qita = new Array(); | |
1808 | + | |
1809 | + var is_del_pk = 0; | |
1810 | + | |
1811 | + //----要进行门店分组-------- | |
1812 | + for (var i = 0; i < sto_arr.length; i++) { | |
1813 | + //找一下这个门店有没有在分类数组内 | |
1814 | + var find2 = 0, find2name = "", sort = 0; | |
1815 | + is_del_pk = 0; | |
1816 | + for (var m = 0; m < sto_cate.length; m++) { | |
1817 | + if (sto_arr[i].category_id == sto_cate[m].cat_id) { | |
1818 | + if (sto_cate[m].is_show != 1) { | |
1819 | + is_del_pk = 1; | |
1820 | + sto_arr.splice(i, 1); | |
1821 | + i--; | |
1822 | + } else { | |
1823 | + find2 = sto_cate[m].cat_id; | |
1824 | + find2name = sto_cate[m].cat_name; | |
1825 | + sort = sto_cate[m].sort; | |
1826 | + is_del_pk = 0; | |
1827 | + } | |
1828 | + break; | |
1829 | + } | |
1830 | + } | |
1831 | + if (is_del_pk) continue; | |
1832 | + | |
1833 | + if (newarr.length > 0) { | |
1834 | + var find = 0; | |
1835 | + //如果有找到,那门店就在这个分组内,否则,分类就要排在其他 | |
1836 | + if (find2 != 0) { | |
1837 | + for (var ii = 0; ii < newarr.length; ii++) { | |
1838 | + if (sto_arr[i].category_id == newarr[ii].cat_id) { | |
1839 | + newarr[ii].s_arr.push(sto_arr[i]); | |
1840 | + find = 1; | |
1841 | + break; | |
1842 | + } | |
1843 | + } | |
1844 | + if (find == 0) { | |
1845 | + var arr0 = new Array(); | |
1846 | + arr0.push(sto_arr[i]); | |
1847 | + var item = { | |
1848 | + cat_id: find2, | |
1849 | + name: find2name, | |
1850 | + sort: sort, | |
1851 | + s_arr: arr0 | |
1852 | + }; | |
1853 | + newarr.push(item); | |
1854 | + } | |
1855 | + } else { | |
1856 | + qita.push(sto_arr[i]); | |
1857 | + } | |
1858 | + } else { | |
1859 | + //如果有找到,那门店就在这个分组内,否则,分类就要排在其他 | |
1860 | + if (find2 != 0) { | |
1861 | + var arr0 = new Array(); | |
1862 | + arr0.push(sto_arr[i]); | |
1863 | + var item = { | |
1864 | + cat_id: find2, | |
1865 | + name: find2name, | |
1866 | + sort: sort, | |
1867 | + s_arr: arr0 | |
1868 | + }; | |
1869 | + newarr.push(item); | |
1870 | + } else { | |
1871 | + qita.push(sto_arr[i]); | |
1872 | + } | |
1873 | + } | |
1874 | + } | |
1875 | + | |
1876 | + var def_arr = new Array(); | |
1877 | + //-- 开始就看10个门店 -- | |
1878 | + for (var k = 0; k < 10; k++) { | |
1879 | + if (k == sto_arr.length) break; | |
1880 | + def_arr.push(sto_arr[k]); | |
1881 | + } | |
1882 | + | |
1883 | + th.setData({ | |
1884 | + def_pickpu_list: def_arr, | |
1885 | + pickpu_list: ee.data.data.pageData | |
1886 | + }); | |
1887 | + | |
1888 | + //门店分类要排序下 | |
1889 | + function compare(property) { | |
1890 | + return function (a, b) { | |
1891 | + var value1 = a[property]; | |
1892 | + var value2 = b[property]; | |
1893 | + return value1 - value2; | |
1894 | + } | |
1895 | + } | |
1896 | + | |
1897 | + if (newarr.length > 0) | |
1898 | + newarr.sort(compare("sort")); | |
1899 | + | |
1900 | + //----安排其他的分类----- | |
1901 | + if (qita.length > 0) { | |
1902 | + var item = { | |
1903 | + cat_id: -1, | |
1904 | + name: "其他", | |
1905 | + s_arr: qita | |
1906 | + }; | |
1907 | + newarr.push(item); | |
1908 | + } | |
1909 | + | |
1910 | + var sd = { | |
1911 | + all_sto: newarr, | |
1912 | + is_show_sto_cat: 1 | |
1913 | + } | |
1914 | + if (!sto_arr || sto_arr.length <= 10) { | |
1915 | + sd.is_show_sto_cat = -1; | |
1916 | + sd.only_pk = sto_arr; | |
1917 | + } | |
1918 | + th.setData(sd); | |
1919 | + | |
1920 | + } else { | |
1921 | + th.setData({ | |
1922 | + is_show_sto_cat: -1, | |
1923 | + only_pk: e.data.data.pageData | |
1924 | + }); | |
1925 | + //-----如果没有默认门店,要取第一个门店作为默认店.此时没有门店分类的情况------ | |
1926 | + if (!th.data.def_pick_store) { | |
1927 | + th.setData({def_pick_store: e.data.data.pageData[0]}) | |
1928 | + } | |
1929 | + } | |
1930 | + } else { | |
1931 | + th.setData({ | |
1932 | + is_show_sto_cat: -1, | |
1933 | + only_pk: e.data.data.pageData | |
1934 | + }); | |
1935 | + //-----如果没有默认门店,要取第一个门店作为默认店.此时没有门店分类的情况------ | |
1936 | + if (!th.data.def_pick_store) { | |
1937 | + th.setData({def_pick_store: e.data.data.pageData[0]}) | |
1938 | + } | |
1939 | + } | |
1940 | + th.data.get_sto_ing = 0; | |
1941 | + } | |
1942 | + }); | |
1943 | + } else { | |
1944 | + th.data.get_sto_ing = 0; | |
1945 | + | |
1946 | + th.setData({ | |
1947 | + is_show_sto_cat: 0, | |
1948 | + only_pk: e.data.data.pageData | |
1949 | + }); | |
1950 | + //-----如果没有默认门店,要取第一个门店作为默认店------ | |
1951 | + if (!th.data.def_pick_store && th.data.bconfig && th.data.bconfig.is_sort_storage) { | |
1952 | + | |
1953 | + if (e.data.data && e.data.data.pageData && e.data.data.pageData.length > 0) { | |
1954 | + th.setData({ | |
1955 | + def_pick_store: e.data.data.pageData[0], | |
1956 | + sto_sele_name: e.data.data.pageData[0].pickup_name, | |
1957 | + sto_sele_id: e.data.data.pageData[0].pickup_id, | |
1958 | + sto_sele_distr: e.data.data.pageData[0].distr_type, | |
1959 | + sto_sele_keyid: e.data.data.pageData[0].keyid, | |
1960 | + }) | |
1961 | + } | |
1962 | + | |
1963 | + } | |
1964 | + } | |
1965 | + }, | |
1966 | + | |
1967 | + //加载更多是靠这个函数 | |
1968 | + onReachBottom: function () { | |
1969 | + if (this.data.activeCategoryId == 2) { | |
1970 | + if (!this.data.comments_no_more) this.requestComments_new(); | |
1971 | + } | |
1972 | + | |
1973 | + var goods_list = this.selectComponent("#goods_list"); //组件的id | |
1974 | + if (goods_list) goods_list.get_list(); | |
1975 | + }, | |
1976 | + | |
1977 | + | |
1978 | + //---小于10的格式化函数---- | |
1979 | + timeFormat(param) { | |
1980 | + return param < 10 ? '0' + param : param; | |
1981 | + }, | |
1982 | + | |
1983 | + | |
1984 | + // ----视频图片---- | |
1985 | + // 图片计数器 | |
1986 | + swiperChange: function (e) { | |
1987 | + var that = this; | |
1988 | + if (e.detail.current > 0) { | |
1989 | + that.setData({ | |
1990 | + hiddenn: 1, | |
1991 | + videopicture: 1, | |
1992 | + }) | |
1993 | + } else { | |
1994 | + that.setData({ | |
1995 | + hiddenn: 0, | |
1996 | + videopicture: 0, | |
1997 | + }) | |
1998 | + } | |
1999 | + if (e.detail.source == 'touch') { | |
2000 | + that.setData({ | |
2001 | + current: e.detail.current | |
2002 | + }) | |
2003 | + } | |
2004 | + }, | |
2005 | + | |
2006 | + /*---视频相关--*/ | |
2007 | + videopicture: function (e) { | |
2008 | + var vipi = e.currentTarget.dataset.vipi; | |
2009 | + this.setData({ | |
2010 | + videopicture: vipi, | |
2011 | + swiperCurrent: vipi, | |
2012 | + noon: 0, | |
2013 | + current: 1 | |
2014 | + }); | |
2015 | + }, | |
2016 | + | |
2017 | + videoPlay: function (e) { | |
2018 | + var _index = e.currentTarget.id | |
2019 | + this.setData({ | |
2020 | + _index: _index, | |
2021 | + noon: 1 | |
2022 | + }) | |
2023 | + | |
2024 | + setTimeout(function () { | |
2025 | + //将点击视频进行播放 | |
2026 | + var videoContext = wx.createVideoContext(_index) | |
2027 | + videoContext.play(); | |
2028 | + }, 500) | |
2029 | + }, | |
2030 | + | |
2031 | + //--获取头像的本地缓存,回调写法-- | |
2032 | + get_head_temp: function (tt, func) { | |
2033 | + var ee = this; | |
2034 | + if (ee.data.share_head) { | |
2035 | + tt(func); | |
2036 | + return false; | |
2037 | + } | |
2038 | + //---获取分享图片的本地地址,头像和商品图片---- | |
2039 | + var path2 = getApp().globalData.userInfo ? getApp().globalData.userInfo.head_pic : ''; | |
2040 | + if (path2 == "") { | |
2041 | + ee.data.share_head = "../../../../images/share/hui_hear_pic.png"; | |
2042 | + tt(func); | |
2043 | + } else { | |
2044 | + path2 = path2.replace("http://thirdwx.qlogo.cn", "https://wx.qlogo.cn"); | |
2045 | + path2 = path2.replace("https://thirdwx.qlogo.cn", "https://wx.qlogo.cn"); | |
2046 | + wx.getImageInfo({ | |
2047 | + src: path2, | |
2048 | + success: function (res) { | |
2049 | + //res.path是网络图片的本地地址 | |
2050 | + ee.data.share_head = res.path; | |
2051 | + tt(func); | |
2052 | + }, | |
2053 | + fail: function (res) { | |
2054 | + ee.data.share_head = "../../../../images/share/hui_hear_pic.png"; //分享的图片不能用网络的 | |
2055 | + tt(func); | |
2056 | + } | |
2057 | + }); | |
2058 | + } | |
2059 | + }, | |
2060 | + | |
2061 | + //--获取商品图片的本地缓存,回调写法-- | |
2062 | + get_goods_temp: function (tt) { | |
2063 | + var ee = this; | |
2064 | + if (ee.data.share_goods_img) { | |
2065 | + tt(); | |
2066 | + return false; | |
2067 | + } | |
2068 | + | |
2069 | + var img = ee.data.iurl + ee.data.data.image_url; | |
2070 | + if (ee.data.prom_act && ee.data.prom_act.share_img) { | |
2071 | + img = ee.data.iurl + ee.data.prom_act.share_img; | |
2072 | + } | |
2073 | + | |
2074 | + //获取商品是分享图信息 | |
2075 | + wx.getImageInfo({ | |
2076 | + src: img, | |
2077 | + success: function (res) { | |
2078 | + //res.path是网络图片的本地地址 | |
2079 | + ee.data.share_goods_img = res.path; | |
2080 | + tt(); | |
2081 | + }, | |
2082 | + fail: function (res) { | |
2083 | + //获取默认空白图 | |
2084 | + wx.getImageInfo({ | |
2085 | + src: ee.data.iurl + '/miniapp/images/default_g_img.gif', | |
2086 | + success: function (res) { | |
2087 | + ee.data.share_goods_img = res.path; //分享的图片不能用网络的 | |
2088 | + tt(); | |
2089 | + } | |
2090 | + }) | |
2091 | + | |
2092 | + } | |
2093 | + }); | |
2094 | + }, | |
2095 | + | |
2096 | + | |
2097 | + //--跳转到商品详情页面-- | |
2098 | + go_goods: function (e) { | |
2099 | + var gid = e.currentTarget.dataset.gid; | |
2100 | + var url = "/pages/goods/goodsInfo/goodsInfo?goods_id=" + gid; | |
2101 | + getApp().goto(url); | |
2102 | + }, | |
2103 | + | |
2104 | + | |
2105 | + pop_err_img: function (e) { | |
2106 | + var txt = e.currentTarget.dataset.errorimg; | |
2107 | + var ob = {}; | |
2108 | + ob[txt] = this.data.iurl + "/miniapp/images/default_g_img.gif"; | |
2109 | + this.setData(ob); | |
2110 | + }, | |
2111 | + | |
2112 | + // 选择门店 | |
2113 | + choice_store: function (ee) { | |
2114 | + this.setData({ | |
2115 | + keyword: '' | |
2116 | + }) | |
2117 | + var th = this; | |
2118 | + var ind = ee.currentTarget.dataset.ind; | |
2119 | + var bconfig = th.data.bconfig; | |
2120 | + | |
2121 | + //--先判断会员状态-- | |
2122 | + var user_info = getApp().globalData.userInfo; | |
2123 | + // if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) { | |
2124 | + // wx.navigateTo({ | |
2125 | + // url: '/packageE/pages/togoin/togoin', | |
2126 | + // }) | |
2127 | + // return false; | |
2128 | + // } | |
2129 | + | |
2130 | + | |
2131 | + //如果开启了,则不在选择门店 | |
2132 | + if (this.data.sys_switch.is_pricing_open_store && getApp().globalData.pk_store) { | |
2133 | + return false; | |
2134 | + } | |
2135 | + if (!th.data.only_pk && !th.data.def_pickpu_list) { | |
2136 | + getApp().confirmBox("暂无可售门店", null, 25000, !1); | |
2137 | + return false; | |
2138 | + } | |
2139 | + | |
2140 | + if (th.data.only_pk && !th.data.only_pk.length) { | |
2141 | + getApp().confirmBox("暂无可售门店", null, 25000, !1); | |
2142 | + return false; | |
2143 | + } | |
2144 | + if (th.data.def_pickpu_list && !th.data.def_pickpu_list.length) { | |
2145 | + getApp().confirmBox("暂无可售门店", null, 25000, !1); | |
2146 | + return false; | |
2147 | + } | |
2148 | + | |
2149 | + | |
2150 | + if (bconfig && bconfig.is_sort_storage) { | |
2151 | + wx.getLocation({ | |
2152 | + type: 'gcj02', | |
2153 | + success: function (res) { | |
2154 | + | |
2155 | + th.data.lat = res.latitude; | |
2156 | + th.data.lon = res.longitude; | |
2157 | + th.data.is_get_local_ok = 1; | |
2158 | + th.setData({is_gps: 1}); | |
2159 | + th.get_sto(th.data.is_normal); | |
2160 | + }, | |
2161 | + fail: function (res) { | |
2162 | + | |
2163 | + th.data.is_get_local_ok = 1; | |
2164 | + th.get_sto(th.data.is_normal); | |
2165 | + if (res.errCode == 2) { | |
2166 | + th.setData({is_gps: 0}); | |
2167 | + if (th.data.is_gps == 0) { | |
2168 | + getApp().confirmBox("请开启GPS定位", null, 25000, !1); | |
2169 | + } | |
2170 | + } else { | |
2171 | + th.setData({is_gps: "3"}); | |
2172 | + } | |
2173 | + | |
2174 | + } | |
2175 | + }) | |
2176 | + } else { | |
2177 | + th.data.is_get_local_ok = 1; | |
2178 | + th.get_sto(th.data.is_normal); | |
2179 | + } | |
2180 | + | |
2181 | + if (ind != undefined && ind != null) { | |
2182 | + this.setData({ | |
2183 | + open_ind_store: ind, | |
2184 | + store: 1, | |
2185 | + openSpecModal: !1, | |
2186 | + openSpecModal_pt: !1 | |
2187 | + }) | |
2188 | + } else { | |
2189 | + this.setData({ | |
2190 | + store: 1, | |
2191 | + openSpecModal: !1, | |
2192 | + openSpecModal_pt: !1 | |
2193 | + }) | |
2194 | + } | |
2195 | + }, | |
2196 | + //关闭选择门店 | |
2197 | + close_popup: function (e) { | |
2198 | + var th = this; | |
2199 | + this.setData({ | |
2200 | + store: 0, | |
2201 | + choice_sort_store: 0, | |
2202 | + sort_store: 0, | |
2203 | + fir_pick_index: 0, | |
2204 | + sec_pick_index: 0 | |
2205 | + }) | |
2206 | + | |
2207 | + var openindstore = this.data.open_ind_store; | |
2208 | + if (openindstore == 1) { | |
2209 | + th.setData({ | |
2210 | + openSpecModal: !0, | |
2211 | + openSpecModal_ind: openindstore, | |
2212 | + }); | |
2213 | + } else if (openindstore == 2) { | |
2214 | + th.setData({ | |
2215 | + openSpecModal: !0, | |
2216 | + openSpecModal_ind: openindstore, | |
2217 | + }); | |
2218 | + } else if (openindstore == 4) { //4就是拼团 | |
2219 | + th.setData({ | |
2220 | + openSpecModal_pt: 1, //打开拼团购买界面 | |
2221 | + store: 0, //关闭门店 | |
2222 | + choice_sort_store: 0, //关闭门店2级 | |
2223 | + sort_store: 0, //关闭门店2级 | |
2224 | + }); | |
2225 | + } else { | |
2226 | + th.setData({ | |
2227 | + store: 0, | |
2228 | + choice_sort_store: 0, | |
2229 | + sort_store: 0 | |
2230 | + }) | |
2231 | + } | |
2232 | + }, | |
2233 | + | |
2234 | + //选择更多门店 | |
2235 | + more_store: function () { | |
2236 | + this.setData({ | |
2237 | + sort_store: 1 | |
2238 | + }); | |
2239 | + }, | |
2240 | + | |
2241 | + sort_store: function () { | |
2242 | + }, | |
2243 | + // 返回按钮 | |
2244 | + returns: function () { | |
2245 | + this.setData({ | |
2246 | + sort_store: 0, | |
2247 | + choice_sort_store: 0 | |
2248 | + }); | |
2249 | + }, | |
2250 | + //---选择分类门店--- | |
2251 | + choice_sort_store: function (e) { | |
2252 | + var index = e.currentTarget.dataset.index; | |
2253 | + var region_name = e.currentTarget.dataset.region; | |
2254 | + var item = this.data.all_sto[index]; | |
2255 | + this.setData({ | |
2256 | + region_name: region_name, | |
2257 | + sort_store: 0, | |
2258 | + choice_sort_store: 1, | |
2259 | + sec_sto: item, | |
2260 | + sec_i: index, | |
2261 | + sec_pick_index: 0 | |
2262 | + }); | |
2263 | + }, | |
2264 | + | |
2265 | + choose_for_store_fir: function (e) { | |
2266 | + var index_c = e.currentTarget.dataset.ind; | |
2267 | + var th = this; | |
2268 | + th.setData({ | |
2269 | + fir_pick_index: index_c | |
2270 | + }) | |
2271 | + | |
2272 | + }, | |
2273 | + | |
2274 | + //确定def_pick为选择的门店 | |
2275 | + sure_pick: function (e) { | |
2276 | + var th = this; | |
2277 | + var item = null; | |
2278 | + var openindstore = th.data.open_ind_store; | |
2279 | + | |
2280 | + if (th.data.choice_sort_store == 0) { | |
2281 | + var index = th.data.fir_pick_index; | |
2282 | + if (th.data.is_show_sto_cat == 1) { | |
2283 | + item = th.data.def_pickpu_list[index]; | |
2284 | + } else { | |
2285 | + item = th.data.only_pk ? th.data.only_pk[index] : null; //当没有门店分类的时候 | |
2286 | + } | |
2287 | + | |
2288 | + } else { | |
2289 | + var index = th.data.sec_pick_index; | |
2290 | + item = th.data.sec_sto.s_arr[index]; | |
2291 | + } | |
2292 | + | |
2293 | + if (!item) return false; | |
2294 | + | |
2295 | + | |
2296 | + var ser_card = this.data.data; | |
2297 | + //判断门店的配送方式是不是匹配 | |
2298 | + if (ser_card.storageId != null && ser_card.storageId != "" && ser_card.storageId.indexOf(item.keyid) == -1) { | |
2299 | + wx.showToast({ | |
2300 | + title: "该门店无此服务项目,请重新选择!", | |
2301 | + icon: 'none', | |
2302 | + duration: 2000 | |
2303 | + }); | |
2304 | + return false; | |
2305 | + } | |
2306 | + | |
2307 | + if (!item) return false; | |
2308 | + | |
2309 | + th.setData({ | |
2310 | + def_pick_store: item, | |
2311 | + sto_sele_name: item.pickup_name, | |
2312 | + sto_sele_id: item.pickup_id, | |
2313 | + sto_sele_keyid: item.keyid, | |
2314 | + sto_sele_distr: item.distr_type, | |
2315 | + store: 0, | |
2316 | + choice_sort_store: 0, | |
2317 | + fir_pick_index: 0 | |
2318 | + }); | |
2319 | + | |
2320 | + if (openindstore == 1) { | |
2321 | + th.setData({ | |
2322 | + openSpecModal: !0, | |
2323 | + openSpecModal_ind: openindstore, | |
2324 | + }); | |
2325 | + } else if (openindstore == 2) { | |
2326 | + th.setData({ | |
2327 | + openSpecModal: !0, | |
2328 | + openSpecModal_ind: openindstore, | |
2329 | + }); | |
2330 | + } else if (openindstore == 4) { //4就是拼团 | |
2331 | + th.setData({ | |
2332 | + openSpecModal_pt: 1, //打开拼团购买界面 | |
2333 | + store: 0, //关闭门店 | |
2334 | + choice_sort_store: 0, //关闭门店2级 | |
2335 | + sort_store: 0, //关闭门店2级 | |
2336 | + }); | |
2337 | + } else { | |
2338 | + th.setData({ | |
2339 | + store: 0, | |
2340 | + choice_sort_store: 0, | |
2341 | + sort_store: 0 | |
2342 | + }) | |
2343 | + } | |
2344 | + }, | |
2345 | + | |
2346 | + //---点击二级之后的选择--- | |
2347 | + choose_for_store: function (e) { | |
2348 | + var index_c = e.currentTarget.dataset.ind; | |
2349 | + var th = this; | |
2350 | + th.setData({ | |
2351 | + sec_pick_index: index_c, | |
2352 | + fir_pick_index: index_c | |
2353 | + }) | |
2354 | + | |
2355 | + }, | |
2356 | + //把选择的门店设置成默认的门店def_pick | |
2357 | + set_def_pick: function (e) { | |
2358 | + var th = this; | |
2359 | + var item = null; | |
2360 | + if (th.data.choice_sort_store == 0) { | |
2361 | + var index = th.data.fir_pick_index; | |
2362 | + if (th.data.is_show_sto_cat == 1) { | |
2363 | + item = th.data.def_pickpu_list[index]; | |
2364 | + } else { | |
2365 | + item = th.data.only_pk ? th.data.only_pk[index] : null; //当没有门店分类的时候 | |
2366 | + } | |
2367 | + } else { | |
2368 | + var index = th.data.sec_pick_index; | |
2369 | + item = th.data.sec_sto.s_arr[index]; | |
2370 | + } | |
2371 | + | |
2372 | + if (!item) return false; | |
2373 | + | |
2374 | + //判断门店的配送方式是不是匹配 | |
2375 | + var ser_card = this.data.data; | |
2376 | + //判断门店的配送方式是不是匹配 | |
2377 | + if (ser_card.storageId != null && ser_card.storageId != "" && ser_card.storageId.indexOf(item.keyid) == -1) { | |
2378 | + wx.showToast({ | |
2379 | + title: "该门店无此服务项目,请重新选择!", | |
2380 | + icon: 'none', | |
2381 | + duration: 2000 | |
2382 | + }); | |
2383 | + return false; | |
2384 | + } | |
2385 | + | |
2386 | + | |
2387 | + var store_id = o.stoid; | |
2388 | + var user_id = getApp().globalData.user_id; | |
2389 | + var def_pickup_id = item.pickup_id; | |
2390 | + | |
2391 | + getApp().request.put('/api/weshop/users/update', { | |
2392 | + data: { | |
2393 | + user_id: user_id, | |
2394 | + def_pickup_id: def_pickup_id | |
2395 | + }, | |
2396 | + success: function (res) { | |
2397 | + if (res.data.code == 0) { | |
2398 | + if (th.data.choice_sort_store == 0) th.setData({ | |
2399 | + fir_pick_index: 0 | |
2400 | + }); | |
2401 | + getApp().globalData.pk_store = item; | |
2402 | + } else { | |
2403 | + //s.showWarning("设置默认门店地址失败", null, 500, !1); | |
2404 | + getApp().my_warnning("设置默认门店地址失败", 0, th) | |
2405 | + } | |
2406 | + | |
2407 | + } | |
2408 | + }); | |
2409 | + | |
2410 | + | |
2411 | + if (!item) return false; | |
2412 | + | |
2413 | + th.setData({ | |
2414 | + def_pick_store: item, | |
2415 | + sto_sele_name: item.pickup_name, | |
2416 | + sto_sele_id: item.pickup_id, | |
2417 | + sto_sele_keyid: item.keyid, | |
2418 | + sto_sele_distr: item.distr_type, | |
2419 | + store: 0, | |
2420 | + choice_sort_store: 0 | |
2421 | + }); | |
2422 | + | |
2423 | + var openindstore = th.data.open_ind_store; | |
2424 | + if (openindstore == 1) { | |
2425 | + th.setData({ | |
2426 | + openSpecModal: !0, | |
2427 | + openSpecModal_ind: openindstore, | |
2428 | + store: 0, | |
2429 | + choice_sort_store: 0, | |
2430 | + sort_store: 0, | |
2431 | + }); | |
2432 | + } else if (openindstore == 2) { | |
2433 | + th.setData({ | |
2434 | + openSpecModal: !0, | |
2435 | + openSpecModal_ind: openindstore, | |
2436 | + store: 0, | |
2437 | + choice_sort_store: 0, | |
2438 | + sort_store: 0, | |
2439 | + }); | |
2440 | + } else if (openindstore == 4) { //4就是拼团 | |
2441 | + th.setData({ | |
2442 | + openSpecModal_pt: 1, //打开拼团购买界面 | |
2443 | + store: 0, //关闭门店 | |
2444 | + choice_sort_store: 0, //关闭门店2级 | |
2445 | + sort_store: 0, //关闭门店2级 | |
2446 | + }); | |
2447 | + } else { | |
2448 | + th.setData({ | |
2449 | + store: 0, | |
2450 | + choice_sort_store: 0, | |
2451 | + sort_store: 0, | |
2452 | + }) | |
2453 | + } | |
2454 | + | |
2455 | + }, | |
2456 | + | |
2457 | + wait_for_store_config: function () { | |
2458 | + var th = this; | |
2459 | + var t_time = setInterval(function () { | |
2460 | + if (th.data.bconfig == null) false; | |
2461 | + var e = th.data.bconfig; | |
2462 | + if (e && e.is_sort_storage) { | |
2463 | + wx.getLocation({ | |
2464 | + type: 'gcj02', | |
2465 | + success: function (res) { | |
2466 | + th.data.lat = res.latitude; | |
2467 | + th.data.lon = res.longitude; | |
2468 | + th.data.is_get_local_ok = 1; | |
2469 | + }, | |
2470 | + fail: function (res) { | |
2471 | + if (res.errCode == 2) { | |
2472 | + th.setData({ | |
2473 | + is_gps: 0 | |
2474 | + }); | |
2475 | + if (th.data.is_gps == 0) { | |
2476 | + getApp().confirmBox("请开启GPS定位", null, 10000, !1); | |
2477 | + } | |
2478 | + | |
2479 | + } else { | |
2480 | + th.setData({ | |
2481 | + is_gps: "3" | |
2482 | + }); | |
2483 | + } | |
2484 | + | |
2485 | + th.data.is_get_local_ok = 1; | |
2486 | + } | |
2487 | + }) | |
2488 | + } else { | |
2489 | + th.data.is_get_local_ok = 1; | |
2490 | + } | |
2491 | + clearInterval(t_time); | |
2492 | + }, 500) | |
2493 | + }, | |
2494 | + | |
2495 | + | |
2496 | + //-- 根据ID拿出门店 -- | |
2497 | + get_pick_from_list(pid) { | |
2498 | + var all_pick_list = this.data.all_pick_list; | |
2499 | + for (var i in all_pick_list) { | |
2500 | + var item = all_pick_list[i]; | |
2501 | + if (item.pickup_id == pid) { | |
2502 | + return item; | |
2503 | + } | |
2504 | + } | |
2505 | + }, | |
2506 | + | |
2507 | + closePoster() { | |
2508 | + this.setData({ | |
2509 | + showPoster: false, | |
2510 | + }); | |
2511 | + }, | |
2512 | + | |
2513 | + // 保存图片到手机 | |
2514 | + savePic() { | |
2515 | + console.log('保存图片'); | |
2516 | + var self = this; | |
2517 | + // 获取用户的当前设置,返回值中有小程序已经向用户请求过的权限 | |
2518 | + this.getSetting().then((res) => { | |
2519 | + // 判断用户是否授权了保存到相册的权限,如果没有发起授权 | |
2520 | + if (!res.authSetting['scope.writePhotosAlbum']) { | |
2521 | + this.authorize().then(() => { | |
2522 | + // 同意授权后保存下载文件 | |
2523 | + this.saveImage(self.data.shareImgPath) | |
2524 | + .then(() => { | |
2525 | + self.setData({ | |
2526 | + showPoster: false | |
2527 | + }); | |
2528 | + }); | |
2529 | + }) | |
2530 | + } else { | |
2531 | + // 如果已经授权,保存下载文件 | |
2532 | + this.saveImage(self.data.shareImgPath) | |
2533 | + .then(() => { | |
2534 | + self.setData({showPoster: false}); | |
2535 | + }); | |
2536 | + } | |
2537 | + | |
2538 | + }) | |
2539 | + }, | |
2540 | + | |
2541 | + // 获取用户已经授予了哪些权限 | |
2542 | + getSetting() { | |
2543 | + return new Promise((resolve, reject) => { | |
2544 | + wx.getSetting({ | |
2545 | + success: res => { | |
2546 | + resolve(res) | |
2547 | + } | |
2548 | + }) | |
2549 | + }) | |
2550 | + }, | |
2551 | + | |
2552 | + // 发起首次授权请求 | |
2553 | + authorize() { | |
2554 | + // isFirst 用来记录是否为首次发起授权, | |
2555 | + // 如果首次授权拒绝后,isFirst赋值为1 | |
2556 | + let isFirst = wx.getStorageSync('isFirst') || 0; | |
2557 | + return new Promise((resolve, reject) => { | |
2558 | + wx.authorize({ | |
2559 | + scope: 'scope.writePhotosAlbum', | |
2560 | + // 同意授权 | |
2561 | + success: () => { | |
2562 | + resolve(); | |
2563 | + }, | |
2564 | + // 拒绝授权,这里是用户拒绝授权后的回调 | |
2565 | + fail: res => { | |
2566 | + if (isFirst === 0) { | |
2567 | + wx.setStorageSync('isFirst', 1); | |
2568 | + wx.showToast({ | |
2569 | + title: '保存失败', | |
2570 | + icon: 'none', | |
2571 | + duration: 1000 | |
2572 | + }) | |
2573 | + } else { | |
2574 | + this.showModal(); | |
2575 | + } | |
2576 | + console.log('拒绝授权'); | |
2577 | + reject(); | |
2578 | + } | |
2579 | + }) | |
2580 | + }) | |
2581 | + }, | |
2582 | + | |
2583 | + // 保存图片到系统相册 | |
2584 | + saveImage(saveUrl) { | |
2585 | + var self = this; | |
2586 | + return new Promise((resolve, reject) => { | |
2587 | + wx.saveImageToPhotosAlbum({ | |
2588 | + filePath: saveUrl, | |
2589 | + success: (res) => { | |
2590 | + wx.showToast({ | |
2591 | + title: '保存成功', | |
2592 | + duration: 1000, | |
2593 | + }); | |
2594 | + self.setData({ | |
2595 | + showPlaybill: 'true' | |
2596 | + }); | |
2597 | + resolve(); | |
2598 | + }, | |
2599 | + fail: () => { | |
2600 | + wx.showToast({ | |
2601 | + title: '保存失败', | |
2602 | + duration: 1000, | |
2603 | + }); | |
2604 | + } | |
2605 | + }) | |
2606 | + }) | |
2607 | + }, | |
2608 | + | |
2609 | + previewImage() { | |
2610 | + getApp().pre_img(this.data.shareImgPath); | |
2611 | + }, | |
2612 | + | |
2613 | + onShareTimeline() { | |
2614 | + getApp().globalData.no_clear = 1 | |
2615 | + | |
2616 | + var th = this; | |
2617 | + var price = th.data.data.shop_price; | |
2618 | + if (th.data.prom_act) { | |
2619 | + price = th.data.prom_act.price; | |
2620 | + | |
2621 | + } | |
2622 | + var title = th.data.data.goods_name; | |
2623 | + // var img=th.data.data.original_img; | |
2624 | + var img = th.data.iurl + th.data.data.image_url; | |
2625 | + if (th.data.prom_type == 6) { | |
2626 | + title = th.data.prom_act.share_title; | |
2627 | + img = th.data.iurl + th.data.prom_act.share_imgurl; | |
2628 | + } | |
2629 | + | |
2630 | + var url = "goods_id=" + th.data.gid; | |
2631 | + if (getApp().globalData.user_id) { | |
2632 | + url += "&first_leader=" + getApp().globalData.user_id; | |
2633 | + } | |
2634 | + | |
2635 | + //-- 如果房间分享,且不是会员分享的 -- | |
2636 | + if (getApp().globalData.room_id && | |
2637 | + th.data.data.goods_id == getApp().globalData.room_goods_id && | |
2638 | + !getApp().globalData.room_user_share | |
2639 | + ) { | |
2640 | + url += "&room_id=" + getApp().globalData.room_id + "&room_user_share=1"; | |
2641 | + } | |
2642 | + | |
2643 | + // 如果服务卡参加秒杀活动,且后台设置了分享标题和分享图片 | |
2644 | + if (th.data.prom_type == 1) { | |
2645 | + if (th.data.sele_g && th.data.sele_g.share_imgurl) { | |
2646 | + img = th.data.iurl + th.data.sele_g.share_imgurl; | |
2647 | + } | |
2648 | + ; | |
2649 | + } | |
2650 | + ; | |
2651 | + | |
2652 | + return { | |
2653 | + title: price + "元 " + title, | |
2654 | + imageUrl: img, | |
2655 | + query: url | |
2656 | + } | |
2657 | + }, | |
2658 | + | |
2659 | + | |
2660 | + clickCollapse() { | |
2661 | + this.setData({ | |
2662 | + flag: !this.data.flag, | |
2663 | + }) | |
2664 | + }, | |
2665 | + | |
2666 | + //---------联系微信客服------------ | |
2667 | + con_weixin: function () { | |
2668 | + var url = this.data.sys_switch.weapp_customertype_url; | |
2669 | + var id = this.data.sys_switch.weapp_customertype_appid; | |
2670 | + wx.openCustomerServiceChat({ | |
2671 | + extInfo: {url: url}, | |
2672 | + corpId: id, | |
2673 | + success(res) { | |
2674 | + } | |
2675 | + }) | |
2676 | + }, | |
2677 | + | |
2678 | + //评论的调用 | |
2679 | + requestComments_new: async function () { | |
2680 | + var e = this, th = e, ee = e; | |
2681 | + var tp = e.data.activeCategoryId3; | |
2682 | + var t = '/api/weshop/serviceComment/pageComment?page=' + e.data.c_curr_p; | |
2683 | + | |
2684 | + wx.showLoading(); | |
2685 | + var req_where = { | |
2686 | + store_id: o.stoid, pageSize: 5, is_show: 1, | |
2687 | + parent_id: 0, goods_id: th.data.gid, commenttype: tp, | |
2688 | + service_id: this.data.gid, | |
2689 | + } | |
2690 | + if (getApp().globalData.userInfo) { | |
2691 | + req_where.userId = getApp().globalData.user_id; | |
2692 | + } | |
2693 | + | |
2694 | + var rs_data = null; | |
2695 | + await getApp().request.promiseGet(t, {data: req_where}).then(res => { | |
2696 | + var tot = res.data.data.total; | |
2697 | + e.data.c_curr_p++; | |
2698 | + e.setData({ | |
2699 | + com_num: tot, //已经有加载 | |
2700 | + }); | |
2701 | + if (res.data.data && res.data.data.pageData && res.data.data.pageData.length > 0) { | |
2702 | + rs_data = res.data.data.pageData; | |
2703 | + } else { | |
2704 | + th.setData({comments_no_more: 1, auto: 1}); | |
2705 | + } | |
2706 | + }) | |
2707 | + | |
2708 | + if (rs_data) { | |
2709 | + //var cda = th.data.comments; | |
2710 | + var cda = rs_data, com_data = th.data.comments; | |
2711 | + for (var ind in cda) { | |
2712 | + var ep = cda[ind]; | |
2713 | + if (cda[ind].head_pic == '') { | |
2714 | + cda[ind].head_pic = th.data.iurl + "/miniapp/images/hui_hear_pic.png"; | |
2715 | + } | |
2716 | + if (ep.weapp_img != "" && ut.isString(ep.weapp_img)) { | |
2717 | + cda[ind].weapp_img = JSON.parse(ep.weapp_img); | |
2718 | + } | |
2719 | + if (ep.img != "" && ut.isString(ep.img)) { | |
2720 | + cda[ind].img = ut.unserialize(ep.img); | |
2721 | + } | |
2722 | + | |
2723 | + //--测量多有字的宽带,计算有多少行-- | |
2724 | + var widh = ut.measureText(ep.content, 30); | |
2725 | + var lines = widh / 712; | |
2726 | + cda[ind].seeMore = false; | |
2727 | + if (lines > 3) cda[ind].seeMore = true; | |
2728 | + | |
2729 | + await getApp().request.promiseGet("/api/weshop/serviceComment/pageComment", { | |
2730 | + data: { | |
2731 | + store_id: o.stoid, | |
2732 | + parent_id: ep.comment_id, | |
2733 | + service_id: this.data.gid, | |
2734 | + } | |
2735 | + }).then(res => { | |
2736 | + if (res.data.data.pageData && res.data.data.pageData.length > 0) { | |
2737 | + cda[ind].replay_list = res.data.data.pageData; | |
2738 | + } | |
2739 | + }) | |
2740 | + } | |
2741 | + | |
2742 | + if (!com_data) com_data = cda; | |
2743 | + else com_data = com_data.concat(cda); | |
2744 | + | |
2745 | + th.setData({comments: com_data}); | |
2746 | + } | |
2747 | + th.setData({get_c: 1}); | |
2748 | + wx.hideLoading(); | |
2749 | + }, | |
2750 | + | |
2751 | + | |
2752 | + //--点赞功能-- | |
2753 | + click_zan: function (e) { | |
2754 | + var com_id = e.currentTarget.dataset.com_id; | |
2755 | + var item_id = e.currentTarget.dataset.item_id; | |
2756 | + var app = getApp(), | |
2757 | + th = this; | |
2758 | + | |
2759 | + if (app.globalData.userInfo == null || app.globalData.userInfo == undefined) { | |
2760 | + app.confirmBox("您还未登录"); | |
2761 | + return false; | |
2762 | + } | |
2763 | + | |
2764 | + var iszan = th.data.comments[item_id].userZanNum; | |
2765 | + if (this.data.iszaning) return false; | |
2766 | + this.data.iszaning = 1; | |
2767 | + | |
2768 | + | |
2769 | + app.request.post("/api/weshop/serviceCommentZan/save", { | |
2770 | + data: { | |
2771 | + store_id: o.stoid, | |
2772 | + user_id: app.globalData.user_id, | |
2773 | + goods_id: th.data.gid, | |
2774 | + service_id: th.data.gid, | |
2775 | + comment_id: com_id | |
2776 | + }, | |
2777 | + success: function (ee) { | |
2778 | + | |
2779 | + if (ee.data.code == "-1") { | |
2780 | + app.my_warnning("不能给自己点赞", 0, th); | |
2781 | + th.data.iszaning = 0; | |
2782 | + return; | |
2783 | + } | |
2784 | + | |
2785 | + if (ee.data.code == 0 && iszan != 1) { | |
2786 | + var num = th.data.comments[item_id].zan_num; | |
2787 | + num++; | |
2788 | + var text = "comments[" + item_id + "].zan_num"; | |
2789 | + var text1 = "comments[" + item_id + "].userZanNum"; | |
2790 | + var _errObj = {}; | |
2791 | + _errObj[text] = num; | |
2792 | + _errObj[text1] = 1; | |
2793 | + th.setData(_errObj); | |
2794 | + | |
2795 | + } else { | |
2796 | + var num = th.data.comments[item_id].zan_num; | |
2797 | + num--; | |
2798 | + var text = "comments[" + item_id + "].zan_num"; | |
2799 | + var text1 = "comments[" + item_id + "].userZanNum"; | |
2800 | + var _errObj = {}; | |
2801 | + _errObj[text] = num; | |
2802 | + _errObj[text1] = 0; | |
2803 | + th.setData(_errObj); | |
2804 | + } | |
2805 | + | |
2806 | + setTimeout(function () { | |
2807 | + th.data.iszaning = 0; | |
2808 | + }, 500) | |
2809 | + | |
2810 | + } | |
2811 | + }) | |
2812 | + }, | |
2813 | + | |
2814 | + | |
2815 | + //--外侧评价的点击效果--- | |
2816 | + clik_evaluate: function (e) { | |
2817 | + var val = e.currentTarget.dataset.val; | |
2818 | + this.setData({ | |
2819 | + activeCategoryId: 2, | |
2820 | + activeCategoryId3: val, | |
2821 | + comments: null | |
2822 | + }); | |
2823 | + this.requestComments_new(); | |
2824 | + }, | |
2825 | + | |
2826 | + | |
2827 | + //显示全部 | |
2828 | + toggleHandler: function (e) { | |
2829 | + var that = this, | |
2830 | + index = e.currentTarget.dataset.index; | |
2831 | + for (var i = 0; i < that.data.comments.length; i++) { | |
2832 | + if (index == i) { | |
2833 | + for (var i = 0; i < that.data.comments.length; i++) { | |
2834 | + that.data.comments[index].auto = true; | |
2835 | + that.data.comments[index].seeMore = false; | |
2836 | + } | |
2837 | + } | |
2838 | + } | |
2839 | + that.setData({ | |
2840 | + comments: that.data.comments | |
2841 | + }) | |
2842 | + }, | |
2843 | + | |
2844 | + //收起更多 | |
2845 | + toggleContent: function (e) { | |
2846 | + var that = this, | |
2847 | + index = e.currentTarget.dataset.index; | |
2848 | + for (var i = 0; i < that.data.comments.length; i++) { | |
2849 | + if (index == i) { | |
2850 | + that.data.comments[index].auto = true; | |
2851 | + that.data.comments[index].seeMore = true; | |
2852 | + } | |
2853 | + } | |
2854 | + that.setData({ | |
2855 | + comments: that.data.comments | |
2856 | + }) | |
2857 | + }, | |
2858 | + | |
2859 | + //--查看评价-- | |
2860 | + look_pj: function () { | |
2861 | + this.tabComment(); | |
2862 | + this.doScrollTop(); | |
2863 | + }, | |
2864 | + | |
2865 | + previewCommentImgs_w: function (t) { | |
2866 | + var e = this.data.comments[t.currentTarget.dataset.cidx].weapp_img; | |
2867 | + var b = e.slice() | |
2868 | + // for (var i in b) { | |
2869 | + // b[i] = this.data.iurl + e[i]; | |
2870 | + // } | |
2871 | + this.data.show_prew_img = 1; | |
2872 | + wx.previewImage({ | |
2873 | + current: b[t.currentTarget.dataset.id], | |
2874 | + urls: b | |
2875 | + }); | |
2876 | + }, | |
2877 | + | |
2878 | + | |
2879 | + // 判断是否开启美业,获取套盒列表 | |
2880 | + getTaohe() { | |
2881 | + // 判断是否开启美业 | |
2882 | + getApp().promiseGet('/api/weshop/store/getTabSys/' + os.stoid, {}).then(res => { | |
2883 | + if (res.data.code == 0) { | |
2884 | + let enableMeiye = res.data.data.EnableMeiye; | |
2885 | + self.setData({ | |
2886 | + enableMeiye, | |
2887 | + }); | |
2888 | + | |
2889 | + if (enableMeiye) { // 开启美业 | |
2890 | + // 获取套盒列表 | |
2891 | + let url = '/api/weshop/serviceGoods/list' | |
2892 | + let data = { | |
2893 | + store_id: getApp().globalData.setting.stoid, | |
2894 | + service_id: this.data.data.id, | |
2895 | + }; | |
2896 | + // 请求数据 | |
2897 | + getApp().promiseGet(url, { | |
2898 | + data: data, | |
2899 | + }).then(res => { | |
2900 | + if (res.data.code == 0) { | |
2901 | + console.log('请求成功套盒列表', res); | |
2902 | + self.setData({ | |
2903 | + taoheList: res.data.data, | |
2904 | + }); | |
2905 | + } else { | |
2906 | + throw (res); | |
2907 | + } | |
2908 | + ; | |
2909 | + }).catch(err => { | |
2910 | + }); | |
2911 | + | |
2912 | + } | |
2913 | + ; | |
2914 | + } | |
2915 | + ; | |
2916 | + }); | |
2917 | + }, | |
2918 | + | |
2919 | + | |
2920 | + //---小于10的格式化函数---- | |
2921 | + // timeFormat(param) { | |
2922 | + // return param < 10 ? '0' + param : param; | |
2923 | + // }, | |
2924 | + | |
2925 | + //----倒计时函数----- | |
2926 | + countDown(time, prom_st) { | |
2927 | + if (!this.data.is_timer) return false; | |
2928 | + var th = this; | |
2929 | + // 获取当前时间,同时得到活动结束时间数组 | |
2930 | + var endTime = time; | |
2931 | + var newTime = ut.gettimestamp(); | |
2932 | + // 对结束时间进行处理渲染到页面 | |
2933 | + var obj = null; | |
2934 | + // 如果活动未结束,对时间进行处理 | |
2935 | + if (endTime - newTime > 0) { | |
2936 | + var time = (endTime - newTime); | |
2937 | + // 获取天、时、分、秒 | |
2938 | + var day = parseInt(time / (60 * 60 * 24)); | |
2939 | + var hou = parseInt(time % (60 * 60 * 24) / 3600); | |
2940 | + var min = parseInt(time % (60 * 60 * 24) % 3600 / 60); | |
2941 | + var sec = parseInt(time % (60 * 60 * 24) % 3600 % 60); | |
2942 | + obj = { | |
2943 | + day: this.timeFormat(day), | |
2944 | + hou: this.timeFormat(hou), | |
2945 | + min: this.timeFormat(min), | |
2946 | + sec: this.timeFormat(sec) | |
2947 | + } | |
2948 | + } else { | |
2949 | + if (th.data.prom_st == 0) { | |
2950 | + //var endTime2 = new Date(th.data.prom_end_time).getTime(); | |
2951 | + var endTime2 = th.data.prom_act.end_time; | |
2952 | + th.setData({ | |
2953 | + prom_time_text: '距结束还剩:', | |
2954 | + prom_st: 1 | |
2955 | + }) | |
2956 | + setTimeout(function () { | |
2957 | + th.countDown(endTime2) | |
2958 | + }, 1000); | |
2959 | + return false; | |
2960 | + | |
2961 | + } else { | |
2962 | + //活动已结束,全部设置为'00' | |
2963 | + obj = { | |
2964 | + day: '00', | |
2965 | + hou: '00', | |
2966 | + min: '00', | |
2967 | + sec: '00' | |
2968 | + } | |
2969 | + th.setData({ | |
2970 | + prom_time_text: '活动已经结束:', | |
2971 | + prom_st: 3 | |
2972 | + }) | |
2973 | + th.setData({ | |
2974 | + djs: obj | |
2975 | + }); | |
2976 | + return false; | |
2977 | + } | |
2978 | + } | |
2979 | + | |
2980 | + th.setData({ | |
2981 | + djs: obj | |
2982 | + }); | |
2983 | + setTimeout(function () { | |
2984 | + th.countDown(endTime) | |
2985 | + }, 1000); | |
2986 | + }, | |
2987 | + | |
2988 | + get_normal(gid) { | |
2989 | + this.setData({ | |
2990 | + prom_type: 0, | |
2991 | + prom_id:0 | |
2992 | + }); | |
2993 | + this.get_sto(); | |
2994 | + this.data.is_normal = 1; | |
2995 | + }, | |
2996 | + | |
2997 | + //获取redis中的数量 | |
2998 | + async getactLen() { | |
2999 | + let prom_type = this.data.options.prom_type; | |
3000 | + let prom_id = this.data.options.prom_id; | |
3001 | + return await getApp().request.promiseGet("/api/weshop/activitylist/getActLen/" + os.stoid + "/" + prom_type + "/" + prom_id, { | |
3002 | + 1: 1 | |
3003 | + }).then(res => { | |
3004 | + if (res.data.code == 0) { | |
3005 | + // 当前可以购买的数量 | |
3006 | + let r_num = res.data.data; | |
3007 | + return r_num; | |
3008 | + } | |
3009 | + ; | |
3010 | + }) | |
3011 | + }, | |
3012 | + | |
3013 | + | |
3014 | + //--------检查是否活动,活动是否开始,或者是否结束------- | |
3015 | + async check_prom(gid, prom_type, prom_id) { | |
3016 | + var ee = this, th = ee; | |
3017 | + var user_id = getApp().globalData.user_id; | |
3018 | + if (!user_id) user_id = 0; | |
3019 | + | |
3020 | + //-------判断团购活动是否抢光--------- | |
3021 | + await getApp().request.promiseGet("/api/weshop/activitylist/getActLen/" + os.stoid + "/" + prom_type + "/" + prom_id, { | |
3022 | + 1: 1 | |
3023 | + }).then(res => { | |
3024 | + var em = res; | |
3025 | + if (em.data.code == 0) { | |
3026 | + if (em.data.data <= 0) ee.setData({ | |
3027 | + prom_r_null: 1 | |
3028 | + }); | |
3029 | + //拿取价格并且判断时间-- | |
3030 | + getApp().request.get("/api/weshop/goods/groupBuy/getActInfo/" + os.stoid + "/" + gid + "/" + prom_id, { | |
3031 | + success: function (t) { | |
3032 | + if (t.data.code != 0) { | |
3033 | + ee.get_normal(gid); | |
3034 | + return false; | |
3035 | + } | |
3036 | + //----已经结束----- | |
3037 | + if (t.data.data.is_end == 1) { | |
3038 | + ee.get_normal(gid); | |
3039 | + return false; | |
3040 | + } | |
3041 | + //----已经过期----- | |
3042 | + var now = ut.gettimestamp(); | |
3043 | + if (t.data.data.end_time < now || t.data.data.start_time > now) { | |
3044 | + ee.get_normal(gid); | |
3045 | + return false; | |
3046 | + } | |
3047 | + | |
3048 | + /*-- 还没有开始预热的也不显示 --*/ | |
3049 | + if (t.data.data.show_time > now) { | |
3050 | + ee.get_normal(gid); | |
3051 | + return false; | |
3052 | + } | |
3053 | + | |
3054 | + th.setData({ | |
3055 | + sele_g: t.data.data, | |
3056 | + }); | |
3057 | + | |
3058 | + var t_gd = ee.data.data; | |
3059 | + var prom_end_time = ut.formatTime(t.data.data.end_time, "yyyy-MM-dd hh:mm:ss"); | |
3060 | + var prom_start_time = ut.formatTime(t.data.data.start_time, "yyyy-MM-dd hh:mm:ss"); | |
3061 | + | |
3062 | + ee.setData({ | |
3063 | + prom_price: t.data.data.price, | |
3064 | + prom_type: 2, | |
3065 | + f_prom_type: 2, | |
3066 | + prom_id: prom_id, | |
3067 | + prom_buy_limit: t.data.data.buy_limit, | |
3068 | + prom_act: t.data.data, | |
3069 | + prom_end_time: prom_end_time, | |
3070 | + prom_start_time: prom_start_time, | |
3071 | + isshow: 1, | |
3072 | + }); | |
3073 | + | |
3074 | + ee.get_sto(); | |
3075 | + var newTime = ut.gettimestamp(); | |
3076 | + var endTime2 = t.data.data.end_time; | |
3077 | + var endTime1 = t.data.data.start_time; | |
3078 | + if (endTime1 > newTime) { | |
3079 | + ee.setData({ | |
3080 | + prom_time_text: '距团购开始还有' | |
3081 | + }) | |
3082 | + ee.countDown(endTime1, 0); | |
3083 | + } else { | |
3084 | + if (endTime2 > newTime) { | |
3085 | + ee.setData({ | |
3086 | + prom_time_text: '距团购结束还有', | |
3087 | + prom_st: 1 | |
3088 | + }) | |
3089 | + ee.countDown(endTime2); | |
3090 | + } | |
3091 | + } | |
3092 | + | |
3093 | + } | |
3094 | + }); | |
3095 | + } | |
3096 | + }) | |
3097 | + }, | |
3098 | + | |
3099 | + | |
3100 | + viewFlash(e) { | |
3101 | + let prom_type = e.currentTarget.dataset.promtype; | |
3102 | + let prom_id = e.currentTarget.dataset.promid; | |
3103 | + let goods_id = this.data.data.goods_id; | |
3104 | + let url = `/packageA/pages/goodsInfo/goodsInfo?goods_id=${goods_id}&prom_type=${prom_type}&prom_id=${prom_id}`; | |
3105 | + if (prom_type == 6) { | |
3106 | + url = `/packageA/pages/serviceCard_pd/goodsInfo/goodsInfo?goods_id=${goods_id}&prom_type=${prom_type}&prom_id=${prom_id}`; | |
3107 | + } | |
3108 | + getApp().goto(url); | |
3109 | + }, | |
3110 | + | |
3111 | + | |
3112 | + | |
3113 | + //-------------获取购买数量的总函数---------------- | |
3114 | + get_buy_num: function (gd, func) { | |
3115 | + // var map = this.data.g_buy_num, | |
3116 | + var th = this, | |
3117 | + user_id = getApp().globalData.user_id; | |
3118 | + if (user_id == null) { | |
3119 | + // map.set(gd.goods_id, 0); | |
3120 | + th.setData({ | |
3121 | + // g_buy_num: map, | |
3122 | + prom_buy_num: 0, | |
3123 | + }); | |
3124 | + "function" == typeof func && func(); | |
3125 | + return false; | |
3126 | + } | |
3127 | + | |
3128 | + // if (map.has(gd.goods_id)) { | |
3129 | + // "function" == typeof func && func(); | |
3130 | + // } else { | |
3131 | + //----获取商品购买数---- | |
3132 | + if (th.data.prom_type == 1) { | |
3133 | + //----获取活动购买数---- | |
3134 | + getApp().request.promiseGet("/api/weshop/rechargeServicelist/getUserBuyGoodsNum", { | |
3135 | + data: { | |
3136 | + store_id: os.stoid, | |
3137 | + user_id: user_id, | |
3138 | + card_id: th.data.options.goods_id, | |
3139 | + prom_type: th.data.options.prom_type, | |
3140 | + prom_id: th.data.options.prom_id | |
3141 | + }, | |
3142 | + //-----获取----- | |
3143 | + success: function (tt) { | |
3144 | + if (tt.data.code == 0) { | |
3145 | + // map.set(gd.goods_id, g_buy_num); | |
3146 | + th.setData({ | |
3147 | + // g_buy_num: map, | |
3148 | + promcardbuynum: tt.data.data.promcardbuynum, | |
3149 | + cardbuynum: tt.data.data.cardbuynum, | |
3150 | + }); | |
3151 | + "function" == typeof func && func(); | |
3152 | + } | |
3153 | + } | |
3154 | + }); | |
3155 | + } else { | |
3156 | + "function" == typeof func && func(); | |
3157 | + } | |
3158 | + }, | |
3159 | + | |
3160 | + | |
3161 | + get_buy_num2: async function () { | |
3162 | + var th = this, user_id = getApp().globalData.user_id; | |
3163 | + //----获取活动购买数---- | |
3164 | + return await getApp().request.promiseGet("/api/weshop/rechargeServicelist/getUserBuyGoodsNum", { | |
3165 | + data: { | |
3166 | + store_id: os.stoid, | |
3167 | + user_id: user_id, | |
3168 | + card_id: th.data.options.goods_id, | |
3169 | + prom_type: th.data.options.prom_type, | |
3170 | + prom_id: th.data.options.prom_id | |
3171 | + }, | |
3172 | + //-----获取----- | |
3173 | + success: function (tt) { | |
3174 | + if (tt.data.code == 0) { | |
3175 | + // map.set(gd.goods_id, g_buy_num); | |
3176 | + th.setData({ | |
3177 | + // g_buy_num: map, | |
3178 | + promcardbuynum: tt.data.data.promcardbuynum, | |
3179 | + cardbuynum: tt.data.data.cardbuynum, | |
3180 | + }); | |
3181 | + } | |
3182 | + } | |
3183 | + }); | |
3184 | + }, | |
3185 | + | |
3186 | + | |
3187 | + // 促销 -> 送礼包 -> 查看详情 | |
3188 | + viewLbDetails(e) { | |
3189 | + let id = e.currentTarget.dataset.id; // 获取礼包id | |
3190 | + let url = `/packageA/pages/myGiftDetails/myGiftDetails?btn=0&index=0&id=${id}`; // btn=0 控制跳转到的页面不显示按钮 | |
3191 | + // console.log('myurl', url); | |
3192 | + getApp().goto(url); | |
3193 | + }, | |
3194 | + | |
3195 | + go_more_ladder: function (e) { | |
3196 | + var prom_id = e.currentTarget.dataset.id; | |
3197 | + getApp().goto("/pages/goods/goodsList/goodsList?ladder_id=" + prom_id); | |
3198 | + }, | |
3199 | + | |
3200 | + getHistoryBuy() { | |
3201 | + let _this = this; | |
3202 | + let req_data = { | |
3203 | + store_id: os.stoid, | |
3204 | + goods_id: this.data.gid, | |
3205 | + pay_status: 1, | |
3206 | + rndid: 1 | |
3207 | + }; | |
3208 | + getApp().request.promiseGet('/api/weshop/ordergoods/list', { | |
3209 | + data: req_data, | |
3210 | + }) | |
3211 | + .then(res => { | |
3212 | + if (t.ajax_ok(res)) { | |
3213 | + _this.setData({ | |
3214 | + historyBuyInfo: res.data.data.pageData, | |
3215 | + }) | |
3216 | + } | |
3217 | + }) | |
3218 | + }, | |
3219 | + | |
3220 | + | |
3221 | + //-- 秒杀的普通购买 -- | |
3222 | + openSpecModel_Nor: function () { | |
3223 | + var th = this; | |
3224 | + | |
3225 | + if (th.data.get_sto_ing) return false; | |
3226 | + | |
3227 | + // 是否授权登陆 | |
3228 | + var user_info = getApp().globalData.userInfo; | |
3229 | + if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) { | |
3230 | + wx.navigateTo({ | |
3231 | + url: '/packageE/pages/togoin/togoin', | |
3232 | + }) | |
3233 | + return false; | |
3234 | + } | |
3235 | + this.data.g_buy_num = new Map(); | |
3236 | + var th = this; | |
3237 | + this.setData({open_ind_store: 5, goodsInputNum: 1});//拼团直接给4 | |
3238 | + | |
3239 | + this.setData({openSpecModal_flash_normal: 1}); | |
3240 | + this.get_sto(1) | |
3241 | + | |
3242 | + | |
3243 | + // if (th.data.sku_g_pt) { | |
3244 | + // // this.get_sto(1) | |
3245 | + // this.setData({openSpecModal_flash_normal: 1}); | |
3246 | + // } else { | |
3247 | + // th.get_sto(1); | |
3248 | + // th.get_sku(o.stoid, th.data.data, th.data.gid, 1, function () { | |
3249 | + // th.setData({ | |
3250 | + // openSpecModal_flash_normal: 1 | |
3251 | + // }); | |
3252 | + // }); | |
3253 | + // } | |
3254 | + // this.check_is_youhui(th.data.gid, 1); | |
3255 | + }, | |
3256 | + | |
3257 | + closeSpecModal_flash_normal: function () { | |
3258 | + this.setData({openSpecModal_flash_normal: 0, is_normal: 0}); | |
3259 | + }, | |
3260 | + | |
3261 | + | |
3262 | + //打开客服操作菜单 | |
3263 | + openCS() { | |
3264 | + // 判断会员状态 | |
3265 | + let user_info = getApp().globalData.userInfo; | |
3266 | + if (user_info == null || user_info.mobile == undefined || user_info.mobile == '' || user_info.mobile == null) { | |
3267 | + wx.navigateTo({ | |
3268 | + url: '/packageE/pages/togoin/togoin', | |
3269 | + }) | |
3270 | + return false; | |
3271 | + } | |
3272 | + ; | |
3273 | + // csType/在线客服设置: | |
3274 | + // 0关闭(如果有设置热线电话,则显示拨打热线电话)、 | |
3275 | + // 1小程序客服、 | |
3276 | + // 2企业微信客服 | |
3277 | + if (this.data.sys_switch) { | |
3278 | + let csType = this.data.sys_switch.weapp_customertype; | |
3279 | + if (csType == 0) { | |
3280 | + // 拨打电话号码 | |
3281 | + this.contactService(); | |
3282 | + } else { | |
3283 | + this.getTel() | |
3284 | + .then(() => { | |
3285 | + self.setData({ | |
3286 | + hiddenCS: false, | |
3287 | + }); | |
3288 | + }); | |
3289 | + } | |
3290 | + ; | |
3291 | + } | |
3292 | + ; | |
3293 | + | |
3294 | + }, | |
3295 | + | |
3296 | + //关闭客服操作菜单 | |
3297 | + closeCS() { | |
3298 | + this.setData({ | |
3299 | + hiddenCS: true, | |
3300 | + }); | |
3301 | + }, | |
3302 | + | |
3303 | + | |
3304 | + click_contact: function () { | |
3305 | + getApp().globalData.no_clear = 1; | |
3306 | + }, | |
3307 | + | |
3308 | + //打开客服操作菜单 | |
3309 | + openCS() { | |
3310 | + // csType/在线客服设置: | |
3311 | + // 0关闭(如果有设置热线电话,则显示拨打热线电话)、 | |
3312 | + // 1小程序客服、 | |
3313 | + // 2企业微信客服 | |
3314 | + let csType = this.data.sys_switch.weapp_customertype; | |
3315 | + if (csType == 0) { | |
3316 | + // 获取电话号码 | |
3317 | + this.contactService(); | |
3318 | + } else { | |
3319 | + this.getTel() | |
3320 | + .then(() => { | |
3321 | + self.setData({ | |
3322 | + hiddenCS: false, | |
3323 | + }); | |
3324 | + }); | |
3325 | + | |
3326 | + } | |
3327 | + ; | |
3328 | + }, | |
3329 | + | |
3330 | + //关闭客服操作菜单 | |
3331 | + closeCS() { | |
3332 | + this.setData({ | |
3333 | + hiddenCS: true, | |
3334 | + }); | |
3335 | + }, | |
3336 | + | |
3337 | + | |
3338 | + //-- 弹出框的同意的优化,重新获取定位 --- | |
3339 | + agree_pri: function () { | |
3340 | + var th = this; | |
3341 | + var bconfig = th.data.bconfig; | |
3342 | + if (bconfig && bconfig.is_sort_storage) { | |
3343 | + wx.getLocation({ | |
3344 | + type: 'gcj02', | |
3345 | + success: function (res) { | |
3346 | + | |
3347 | + th.data.lat = res.latitude; | |
3348 | + th.data.lon = res.longitude; | |
3349 | + th.data.is_get_local_ok = 1; | |
3350 | + th.setData({is_gps: 1}); | |
3351 | + th.get_sto(); | |
3352 | + }, | |
3353 | + fail: function (res) { | |
3354 | + th.data.is_get_local_ok = 1; | |
3355 | + th.get_sto(); | |
3356 | + if (res.errCode == 2) { | |
3357 | + th.setData({is_gps: 0}); | |
3358 | + if (th.data.is_gps == 0) { | |
3359 | + getApp().confirmBox("请开启GPS定位", null, 25000, !1); | |
3360 | + } | |
3361 | + } else { | |
3362 | + th.setData({is_gps: "3"}); | |
3363 | + } | |
3364 | + | |
3365 | + } | |
3366 | + }) | |
3367 | + } | |
3368 | + }, | |
3369 | + | |
3370 | + clickShare() { | |
3371 | + this.setData({ | |
3372 | + share_hidden: true, | |
3373 | + }); | |
3374 | + }, | |
3375 | + send() { | |
3376 | + this.setData({ | |
3377 | + share_hidden: false, | |
3378 | + }); | |
3379 | + }, | |
3380 | + cancel() { | |
3381 | + this.setData({ | |
3382 | + share_hidden: false, | |
3383 | + }); | |
3384 | + }, | |
3385 | + | |
3386 | + | |
3387 | + saveImageFn() { | |
3388 | + if (this.data.share_b_img) { | |
3389 | + this.saveImageToPhotosAlbum() | |
3390 | + } else { | |
3391 | + this.saveImageToPhotosAlbumDef() | |
3392 | + } | |
3393 | + }, | |
3394 | + | |
3395 | + | |
3396 | + //--定义的保存图片方法,分享团--- | |
3397 | + saveImageToPhotosAlbum: function () { | |
3398 | + //--先判断会员状态-- | |
3399 | + // var user_info = getApp().globalData.userInfo; | |
3400 | + // if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) { | |
3401 | + // //getApp().my_warnning("请先登录",0,this); | |
3402 | + // wx.navigateTo({ url: '/packageE/pages/togoin/togoin', }) | |
3403 | + // return false; | |
3404 | + // } | |
3405 | + | |
3406 | + if (this.data.share_hidden) { | |
3407 | + this.setData({ | |
3408 | + share_hidden: false, | |
3409 | + }); | |
3410 | + } | |
3411 | + ; | |
3412 | + | |
3413 | + //类型 0普通商品 1秒杀商品 2商家和会员团 3阶梯团 4阶梯团 | |
3414 | + var type = this.data.prom_type || 0; | |
3415 | + console.log('商品类型-----'); | |
3416 | + console.log(type); | |
3417 | + // if (type == 2) type = -1; | |
3418 | + if (type == 4) type = 0; | |
3419 | + if (type == 8) type = 0; | |
3420 | + if (type == 2) type = 0; | |
3421 | + if (type == 6) type = 2; // 6拼团 2团购 | |
3422 | + if (type == 10) type = -1; | |
3423 | + | |
3424 | + wx.showLoading({ | |
3425 | + title: '生成中...', | |
3426 | + }) | |
3427 | + var that = this, | |
3428 | + th = that; | |
3429 | + //设置画板显示,才能开始绘图 | |
3430 | + that.setData({ | |
3431 | + canvasHidden: false | |
3432 | + }) | |
3433 | + | |
3434 | + var app = getApp(); | |
3435 | + var unit = that.data.screenWidth / 750 * 1.35; //基础单位, | |
3436 | + var path2 = that.data.data.original_img; | |
3437 | + | |
3438 | + var scene = th.data.gid; | |
3439 | + var user_id = getApp().globalData.user_id ? getApp().globalData.user_id : 0; | |
3440 | + if (user_id > 0) { | |
3441 | + scene += "_" + user_id; | |
3442 | + } | |
3443 | + //-- 如果不是会员分享过来的要分享给别人 -- | |
3444 | + if (getApp().globalData.room_id && th.data.data.goods_id == getApp().globalData.room_goods_id && !getApp().globalData.room_user_share) { | |
3445 | + //固定房间是第3个字符 | |
3446 | + if (!user_id) scene += "_0"; | |
3447 | + scene += "_" + getApp().globalData.room_id; | |
3448 | + } else { | |
3449 | + if (!user_id) scene += "_0"; | |
3450 | + scene += "_0"; | |
3451 | + } | |
3452 | + if (this.data.prom_type) { | |
3453 | + scene += "_" + this.data.prom_type + "_" + th.data.prom_id; | |
3454 | + } | |
3455 | + | |
3456 | + | |
3457 | + ///二微码 | |
3458 | + var path3 = os.url + "/api/wx/open/app/user/getWeAppEwm/" + | |
3459 | + os.stoid + "?sceneValue=" + scene + "&pageValue=packageA/pages/goodsInfo/goodsInfo"; | |
3460 | + | |
3461 | + | |
3462 | + console.log(path3); | |
3463 | + | |
3464 | + //读取文件成功则OK-- | |
3465 | + wx.getImageInfo({ | |
3466 | + src: path3, | |
3467 | + success: function (res) { | |
3468 | + //回调写法 | |
3469 | + th.get_head_temp(th.get_goods_temp, function () { | |
3470 | + var vpath = res.path; | |
3471 | + var context = wx.createCanvasContext('share'); | |
3472 | + //先画背景 | |
3473 | + var pg_path = "../../../../images/share/share_bg.png"; | |
3474 | + | |
3475 | + //-- 如果有自定义海报的时候,判断背景的图片 -- | |
3476 | + if (th.data.share_b_img) { | |
3477 | + pg_path = th.data.share_b_img; | |
3478 | + } | |
3479 | + context.drawImage(pg_path, 0, 0, 554 * unit, 899 * unit); | |
3480 | + | |
3481 | + let nick = app.globalData.userInfo ? app.globalData.userInfo.nickname : ''; | |
3482 | + | |
3483 | + //-- 是自定义海报的情况下 -- | |
3484 | + if (th.data.poster && parseInt(th.data.poster.style) == 2) { | |
3485 | + //在线上分享人的情况下 | |
3486 | + if (parseInt(th.data.poster.show_headpic)) { | |
3487 | + //获取坐标 | |
3488 | + var x = parseFloat(th.data.poster.head_x) * 2; | |
3489 | + var y = parseFloat(th.data.poster.head_y) * 2; | |
3490 | + var x1 = (x + 90) * unit; | |
3491 | + var y1 = (y + 50) * unit; | |
3492 | + //--昵称--- | |
3493 | + context.setFontSize(24 * unit) | |
3494 | + context.setFillStyle("black") | |
3495 | + context.fillText(nick, x1, y1); | |
3496 | + var width = 24 * nick.length * unit + 4 * unit; | |
3497 | + //强烈推荐 改许程 | |
3498 | + var tj_path = "../../../../images/share/q_tj.png"; | |
3499 | + context.drawImage(tj_path, x1 + width, y1 - 22 * unit, 85 * unit, 30 * unit); | |
3500 | + context.setFontSize(16 * unit) | |
3501 | + context.setLineJoin('round'); //交点设置成圆角 | |
3502 | + context.setFillStyle("white") | |
3503 | + context.fillText('强烈推荐', x1 + width + 8 * unit, y1 - 1 * unit); | |
3504 | + | |
3505 | + //context.setFillStyle("black") | |
3506 | + //context.setFontSize(24 * unit) | |
3507 | + //context.fillText(getApp().globalData.config.store_name, 40 * unit, 130 * unit); | |
3508 | + } | |
3509 | + } else { | |
3510 | + //--昵称--- | |
3511 | + context.setFontSize(24 * unit) | |
3512 | + context.setFillStyle("black") | |
3513 | + context.fillText(nick, 152 * unit, 76 * unit); | |
3514 | + var width = 24 * nick.length * unit + 2 * unit; | |
3515 | + //强烈推荐 改许程 | |
3516 | + var tj_path = "../../../../images/share/q_tj.png"; | |
3517 | + context.drawImage(tj_path, 152 * unit + width, 54 * unit, 85 * unit, 30 * unit); | |
3518 | + context.setFontSize(16 * unit); | |
3519 | + context.setLineJoin('round'); //交点设置成圆角 | |
3520 | + context.setFillStyle("white"); | |
3521 | + context.fillText('强烈推荐', 149 * unit + width + 15 * unit, 75 * unit); | |
3522 | + } | |
3523 | + | |
3524 | + var share_title = th.data.data.goods_name; | |
3525 | + | |
3526 | + if (th.data.prom_type == 1 || th.data.prom_type == 2 || th.data.prom_type == 6 || th.data.prom_type == 4) { | |
3527 | + share_title = th.data.prom_act.share_title; | |
3528 | + if (!share_title) share_title = th.data.prom_act.title; | |
3529 | + if (th.data.prom_type == 4) share_title = th.data.prom_act.name; | |
3530 | + | |
3531 | + //-- 显示活动时间 -- | |
3532 | + if (th.data.share_b_img) { | |
3533 | + act_time = "截止时间:" + ut.formatTime(th.data.prom_act.end_time); | |
3534 | + } | |
3535 | + } | |
3536 | + | |
3537 | + //---产品名称--- | |
3538 | + //文本换行 参数:1、canvas对象,2、文本 3、距离左侧的距离 4、距离顶部的距离 5、6、文本的宽度 | |
3539 | + | |
3540 | + context.setFillStyle("black"); | |
3541 | + context.setFontSize(21.3 * unit) | |
3542 | + th.draw_Text(context, share_title, | |
3543 | + 80 * unit, 160 * unit, 200 * unit, 279 * unit, unit); | |
3544 | + | |
3545 | + //------产品的价格------- | |
3546 | + context.setFontSize(23 * unit) | |
3547 | + context.setFillStyle("red") | |
3548 | + | |
3549 | + // 7.商品价格 | |
3550 | + let price = th.data.data.shop_price; | |
3551 | + if (th.data.card_field && th.data.data[th.data.card_field]) { | |
3552 | + price = th.data.data[th.data.card_field]; | |
3553 | + } | |
3554 | + if (th.data.prom_act) price = th.data.prom_price; | |
3555 | + price = parseFloat(price).toFixed(2); | |
3556 | + | |
3557 | + var wd1 = th.data.screenWidth - ut.measureText(price, 31 * unit) - 25; | |
3558 | + context.fillText("¥", wd1 - 15, 160 * unit); | |
3559 | + context.setFontSize(31 * unit) | |
3560 | + context.fillText(price, wd1, 165 * unit); | |
3561 | + | |
3562 | + | |
3563 | + //-- 零售价的优化 -- | |
3564 | + var wp = wd1; | |
3565 | + var hp = 203 * unit; | |
3566 | + if (th.data.prom_type != 4) wp -= 12; | |
3567 | + th.draw_pos_price(context, wp, hp, th.data.data.show_price, unit); | |
3568 | + | |
3569 | + | |
3570 | + //console.log(th.data.share_goods_img); | |
3571 | + //let share_goods_img=th.data.presellForm.share_img; | |
3572 | + //share_goods_img?share_goods_img:th.data.data.share_goods_img; | |
3573 | + //---中间大图--- | |
3574 | + context.drawImage(th.data.share_goods_img, 70 * unit, 220 * unit, 408 * unit, 408 * unit); | |
3575 | + //---自定义海报 产品质量保证 | |
3576 | + if (th.data.poster.show_quality == 1) { | |
3577 | + var g_path = "../../../../images/share/s_gou.png"; | |
3578 | + context.drawImage(g_path, 56 * unit, 644 * unit, 22 * unit, 22 * unit); | |
3579 | + context.setFillStyle("red") | |
3580 | + context.setFontSize(18 * unit) | |
3581 | + context.fillText("正品保证", 84 * unit, 664 * unit); | |
3582 | + | |
3583 | + context.drawImage(g_path, 218 * unit, 644 * unit, 22 * unit, 22 * unit); | |
3584 | + context.setFillStyle("red") | |
3585 | + context.setFontSize(18 * unit) | |
3586 | + context.fillText("纯实体店", 246 * unit, 664 * unit); | |
3587 | + | |
3588 | + context.drawImage(g_path, 388 * unit, 644 * unit, 22 * unit, 22 * unit); | |
3589 | + context.setFillStyle("red") | |
3590 | + context.setFontSize(18 * unit) | |
3591 | + context.fillText("官方验证", 420 * unit, 664 * unit); | |
3592 | + | |
3593 | + } | |
3594 | + | |
3595 | + //---画线--- | |
3596 | + // context.setLineWidth(1 * unit) | |
3597 | + // context.moveTo(32 * unit, 662 * unit) | |
3598 | + // context.lineTo(520 * unit, 662 * unit) | |
3599 | + // context.stroke(); | |
3600 | + | |
3601 | + //-- 图片底部文字 -- | |
3602 | + switch (type) { | |
3603 | + case 0: | |
3604 | + //---文字--- | |
3605 | + //---文字--- | |
3606 | + context.setFillStyle("black"); | |
3607 | + context.setFontSize(22 * unit); | |
3608 | + | |
3609 | + context.fillText("优惠乐翻天,精彩就在你身边", 40 * unit, 776 * unit); | |
3610 | + context.fillText("长按识别二维码,立即开始抢购", 40 * unit, 826 * unit); | |
3611 | + | |
3612 | + break; | |
3613 | + | |
3614 | + case 1: | |
3615 | + | |
3616 | + //画秒杀的图片 | |
3617 | + if (th.data.is_share_text) { | |
3618 | + var miaos_path = '../../../../images/share/miao_share.png'; | |
3619 | + context.drawImage(miaos_path, 43 * unit, 690 * unit, 222 * unit, 40 * unit); | |
3620 | + } | |
3621 | + | |
3622 | + context.setFillStyle("black") | |
3623 | + context.setFontSize(24 * unit) | |
3624 | + context.fillText(th.data.sto_sele_name_1, 40 * unit, 770 * unit); | |
3625 | + //---文字--- | |
3626 | + context.setFontSize(22 * unit) | |
3627 | + context.setFillStyle("black") | |
3628 | + if (th.data.is_share_text) { | |
3629 | + context.fillText("特惠好物,限时秒杀", 40 * unit, 807 * unit); | |
3630 | + } | |
3631 | + context.fillText("长按识别二维码,立即开始抢购", 40 * unit, 844 * unit); | |
3632 | + | |
3633 | + break; | |
3634 | + | |
3635 | + } | |
3636 | + | |
3637 | + | |
3638 | + //---二维吗图--- | |
3639 | + //-- 自定义海报 -- | |
3640 | + if (th.data.poster) { | |
3641 | + var erm_x = parseFloat(th.data.poster.ewm_x) * 2; | |
3642 | + var erm_y = parseFloat(th.data.poster.ewm_y) * 2; | |
3643 | + context.drawImage(vpath, erm_x * unit, erm_y * unit, 136 * unit, 136 * unit); | |
3644 | + } else { | |
3645 | + //---二维吗图--- | |
3646 | + context.drawImage(vpath, 390 * unit, 746 * unit, 130 * unit, 116 * unit); | |
3647 | + } | |
3648 | + | |
3649 | + //--- 如果是自定义海报的时候 --- | |
3650 | + if (th.data.poster && parseInt(th.data.poster.style) == 2) { | |
3651 | + | |
3652 | + //如果显示会员信息的话 | |
3653 | + if (parseInt(th.data.poster.show_headpic)) { | |
3654 | + //获取坐标 | |
3655 | + var x = parseFloat(th.data.poster.head_x) * 2; | |
3656 | + var y = parseFloat(th.data.poster.head_y) * 2; | |
3657 | + //---绘制圆形要放在最后---- | |
3658 | + context.save(); | |
3659 | + context.beginPath(); | |
3660 | + var h_x = x * unit; | |
3661 | + var h_y = y * unit; | |
3662 | + var h_r = 40 * unit; | |
3663 | + var cx = h_x + h_r; | |
3664 | + var cy = h_y + h_r; | |
3665 | + context.arc(cx, cy, h_r, 0, Math.PI * 2, false); | |
3666 | + context.closePath(); | |
3667 | + context.fill(); | |
3668 | + context.clip(); | |
3669 | + context.drawImage(th.data.share_head, h_x, h_y, h_r * 2, h_r * 2); | |
3670 | + context.restore(); | |
3671 | + } | |
3672 | + | |
3673 | + } else { | |
3674 | + //---绘制圆形要放在最后---- | |
3675 | + context.save(); | |
3676 | + context.beginPath(); | |
3677 | + var h_x = 60 * unit; | |
3678 | + var h_y = 24 * unit; | |
3679 | + var h_r = 40 * unit; | |
3680 | + var cx = h_x + h_r; | |
3681 | + var cy = h_y + h_r; | |
3682 | + context.arc(cx, cy, h_r, 0, Math.PI * 2, false); | |
3683 | + context.closePath(); | |
3684 | + context.fill(); | |
3685 | + context.clip(); | |
3686 | + context.drawImage(th.data.share_head, h_x, h_y, h_r * 2, h_r * 2); | |
3687 | + context.restore(); | |
3688 | + } | |
3689 | + | |
3690 | + | |
3691 | + if (th.data.poster.show_time == 1 && th.data.prom_act) { | |
3692 | + var act_time = ''; | |
3693 | + act_time = "截止时间:" + ut.formatTime(th.data.prom_act.end_time); | |
3694 | + context.setFillStyle("red") | |
3695 | + getApp().draw_Text(context, act_time, 38 * unit, 880 * unit, 200 * unit, 340 * unit, unit); | |
3696 | + } | |
3697 | + | |
3698 | + //把画板内容绘制成图片,并回调 画板图片路径 | |
3699 | + context.draw(false, function () { | |
3700 | + setTimeout(function () { | |
3701 | + wx.canvasToTempFilePath({ | |
3702 | + x: 0, | |
3703 | + y: 0, | |
3704 | + width: 750, | |
3705 | + height: 1217, | |
3706 | + destWidth: 1.2 * 750 * 750 / that.data.screenWidth, | |
3707 | + destHeight: 1.2 * 1217 * 750 / that.data.screenWidth, | |
3708 | + canvasId: 'share', | |
3709 | + success: function (res) { | |
3710 | + | |
3711 | + that.setData({ | |
3712 | + shareImgPath: res.tempFilePath, | |
3713 | + canvasHidden: true | |
3714 | + }) | |
3715 | + | |
3716 | + if (!res.tempFilePath) { | |
3717 | + wx.showModal({ | |
3718 | + title: '提示', | |
3719 | + content: '图片绘制中,请稍后重试', | |
3720 | + showCancel: false | |
3721 | + }) | |
3722 | + return false; | |
3723 | + } | |
3724 | + | |
3725 | + // wx.previewImage({ | |
3726 | + // //将图片预览出来 | |
3727 | + // urls: [that.data.shareImgPath] | |
3728 | + // }); | |
3729 | + that.setData({ | |
3730 | + showPoster: true, | |
3731 | + }); | |
3732 | + wx.hideLoading(); | |
3733 | + } | |
3734 | + }) | |
3735 | + }, 500) | |
3736 | + | |
3737 | + }); | |
3738 | + }); | |
3739 | + }, | |
3740 | + fail: function (res) { | |
3741 | + console.log(res); | |
3742 | + wx.hideLoading(); | |
3743 | + | |
3744 | + } | |
3745 | + }); | |
3746 | + }, | |
3747 | + //--定义的保存图片方法,分享团--- | |
3748 | + saveImageToPhotosAlbumDef: function () { | |
3749 | + //--先判断会员状态-- | |
3750 | + // var user_info = getApp().globalData.userInfo; | |
3751 | + // if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) { | |
3752 | + // //getApp().my_warnning("请先登录",0,this); | |
3753 | + // wx.navigateTo({url: '/packageE/pages/togoin/togoin',}) | |
3754 | + // return false; | |
3755 | + // } | |
3756 | + | |
3757 | + if (this.data.share_hidden) { | |
3758 | + this.setData({share_hidden: false,}); | |
3759 | + } | |
3760 | + ; | |
3761 | + | |
3762 | + //类型 0普通商品 1秒杀商品 2商家和会员团 3阶梯团 4阶梯团 | |
3763 | + var type = this.data.prom_type || 0; | |
3764 | + console.log('商品类型-----'); | |
3765 | + console.log(type); | |
3766 | + // if (type == 2) type = -1; | |
3767 | + if (type == 4) type = 0; | |
3768 | + if (type == 8) type = 0; | |
3769 | + if (type == 2) type = 0; | |
3770 | + if (type == 6) type = 2; // 6拼团 2团购 | |
3771 | + if (type == 10) type = -1; | |
3772 | + | |
3773 | + if (this.data.prom_act && this.data.prom_act.kttype == 3) type = 3; | |
3774 | + console.log('商品类型。。。。。'); | |
3775 | + console.log(type); | |
3776 | + wx.showLoading({title: '生成中...',}) | |
3777 | + var that = this, th = that; | |
3778 | + //设置画板显示,才能开始绘图 | |
3779 | + that.setData({ | |
3780 | + canvasHidden: false | |
3781 | + }) | |
3782 | + | |
3783 | + var app = getApp(); | |
3784 | + var unit = that.data.screenWidth / 750 * 1.35; //基础单位, | |
3785 | + var path2 = that.data.data.original_img; | |
3786 | + | |
3787 | + var scene = th.data.gid; | |
3788 | + var user_id = getApp().globalData.user_id ? getApp().globalData.user_id : 0; | |
3789 | + if (user_id > 0) { | |
3790 | + scene += "_" + user_id; | |
3791 | + } | |
3792 | + //-- 如果不是会员分享过来的要分享给别人 -- | |
3793 | + if (getApp().globalData.room_id && th.data.data.goods_id == getApp().globalData.room_goods_id && !getApp().globalData.room_user_share) { | |
3794 | + //固定房间是第3个字符 | |
3795 | + if (!user_id) scene += "_0"; | |
3796 | + scene += "_" + getApp().globalData.room_id; | |
3797 | + } else { | |
3798 | + if (!user_id) scene += "_0"; | |
3799 | + scene += "_0"; | |
3800 | + } | |
3801 | + if (this.data.prom_type) { | |
3802 | + scene += "_" + this.data.prom_type + "_" + th.data.prom_id; | |
3803 | + } | |
3804 | + | |
3805 | + ///二微码 | |
3806 | + var path3 = os.url + "/api/wx/open/app/user/getWeAppEwm/" + | |
3807 | + os.stoid + "?sceneValue=" + scene + "&pageValue=packageA/pages/goodsInfo/goodsInfo"; | |
3808 | + | |
3809 | + console.log(path3); | |
3810 | + | |
3811 | + | |
3812 | + // 读取文件成功则OK-- | |
3813 | + wx.getImageInfo({ | |
3814 | + src: path3, | |
3815 | + success: function (res) { | |
3816 | + // 回调写法 | |
3817 | + th.get_head_temp(th.get_goods_temp, function () { | |
3818 | + var vpath = res.path; | |
3819 | + var context = wx.createCanvasContext('share'); | |
3820 | + // 先画背景 | |
3821 | + var pg_path = "../../../../../images/share/share_bg.png"; | |
3822 | + th.drawPoster(context, unit, th.data.share_goods_img, vpath, type); | |
3823 | + | |
3824 | + //把画板内容绘制成图片,并回调 画板图片路径 | |
3825 | + context.draw(false, function () { | |
3826 | + setTimeout(function () { | |
3827 | + wx.canvasToTempFilePath({ | |
3828 | + x: 0, | |
3829 | + y: 0, | |
3830 | + width: 750, | |
3831 | + height: 1217, | |
3832 | + destWidth: 1.2 * 750 * 750 / that.data.screenWidth, | |
3833 | + destHeight: 1.2 * 1217 * 750 / that.data.screenWidth, | |
3834 | + canvasId: 'share', | |
3835 | + success: function (res) { | |
3836 | + | |
3837 | + that.setData({ | |
3838 | + shareImgPath: res.tempFilePath, | |
3839 | + canvasHidden: true | |
3840 | + }) | |
3841 | + | |
3842 | + if (!res.tempFilePath) { | |
3843 | + wx.showModal({ | |
3844 | + title: '提示', | |
3845 | + content: '图片绘制中,请稍后重试', | |
3846 | + showCancel: false | |
3847 | + }) | |
3848 | + return false; | |
3849 | + } | |
3850 | + | |
3851 | + that.setData({ | |
3852 | + showPoster: true, | |
3853 | + }); | |
3854 | + wx.hideLoading(); | |
3855 | + } | |
3856 | + }) | |
3857 | + }, 500) | |
3858 | + | |
3859 | + }); | |
3860 | + }); | |
3861 | + }, | |
3862 | + fail: function (res) { | |
3863 | + console.log(res); | |
3864 | + wx.hideLoading(); | |
3865 | + | |
3866 | + } | |
3867 | + }); | |
3868 | + }, | |
3869 | + | |
3870 | + //文本换行 参数:1、canvas对象,2、文本 3、距离左侧的距离 4、距离顶部的距离 5、6、文本的宽度 | |
3871 | + draw_Text: function (ctx, str, leftWidth, initHeight, titleHeight, canvasWidth, unit) { | |
3872 | + var lineWidth = 0; | |
3873 | + var lastSubStrIndex = 0; //每次开始截取的字符串的索引 | |
3874 | + var han = 0; | |
3875 | + for (let i = 0; i < str.length; i++) { | |
3876 | + if (han == 2) return; | |
3877 | + //lineWidth += ctx.measureText(str[i]).width; | |
3878 | + lineWidth += ut.measureText(str[i], 21.3 * unit); | |
3879 | + if (lineWidth > canvasWidth) { | |
3880 | + han++; | |
3881 | + | |
3882 | + if (han == 2) | |
3883 | + ctx.fillText(str.substring(lastSubStrIndex, i) + '...', leftWidth, initHeight); //绘制截取部分 | |
3884 | + else | |
3885 | + ctx.fillText(str.substring(lastSubStrIndex, i), leftWidth, initHeight); | |
3886 | + | |
3887 | + initHeight += 22; //22为字体的高度 | |
3888 | + lineWidth = 0; | |
3889 | + lastSubStrIndex = i; | |
3890 | + titleHeight += 20; | |
3891 | + } | |
3892 | + if (i == str.length - 1) { //绘制剩余部分 | |
3893 | + ctx.fillText(str.substring(lastSubStrIndex, i + 1), leftWidth, initHeight); | |
3894 | + } | |
3895 | + } | |
3896 | + }, | |
3897 | + | |
3898 | + drawPoster(context, unit, img, vpath, type) { | |
3899 | + // 1.灰色背景 | |
3900 | + context.setFillStyle('#f2f1f6'); | |
3901 | + context.rect(0, 0, 554 * unit, 899 * unit); | |
3902 | + context.fill(); | |
3903 | + | |
3904 | + // 2.商城名称 | |
3905 | + let shopName = this.data.sto_sele_name_1; | |
3906 | + context.setTextAlign('center'); | |
3907 | + context.setFontSize(26 * unit); | |
3908 | + context.setFillStyle('black'); | |
3909 | + context.fillText(shopName, 277 * unit, 60 * unit); | |
3910 | + | |
3911 | + // 3.推荐来源 | |
3912 | + if (getApp().globalData.userInfo) { | |
3913 | + let fromText = `来自${getApp().globalData.userInfo.nickname}的推荐`; | |
3914 | + context.setTextAlign('center'); | |
3915 | + context.setFontSize(22 * unit); | |
3916 | + context.setFillStyle('#96959a'); | |
3917 | + context.fillText(fromText, 277 * unit, 105 * unit); | |
3918 | + } | |
3919 | + // 4.海报背景 | |
3920 | + context.setFillStyle('white'); | |
3921 | + context.fillRect(37 * unit, 157 * unit, 480 * unit, 673 * unit); | |
3922 | + | |
3923 | + // 5.商品图片 | |
3924 | + // 图片的x坐标 | |
3925 | + let bg_x = 37 * unit | |
3926 | + // 图片的y坐标 | |
3927 | + let bg_y = 157 * unit | |
3928 | + // 图片宽度 | |
3929 | + let bg_w = 480 * unit | |
3930 | + // 图片高度 | |
3931 | + let bg_h = 474 * unit | |
3932 | + // 图片圆角 | |
3933 | + let bg_r = 4 | |
3934 | + // 绘制海报背景图片圆角 | |
3935 | + context.save() | |
3936 | + context.beginPath() | |
3937 | + context.arc(bg_x + bg_r, bg_y + bg_r, bg_r, Math.PI, Math.PI * 1.5) | |
3938 | + context.arc(bg_x + bg_w - bg_r, bg_y + bg_r, bg_r, Math.PI * 1.5, Math.PI * 2) | |
3939 | + context.arc(bg_x + bg_w, bg_y + bg_h, bg_r, 0, Math.PI * 0.5) | |
3940 | + context.arc(bg_x, bg_y + bg_h, 0, Math.PI * 0.5, Math.PI) | |
3941 | + context.clip() | |
3942 | + context.drawImage(img, bg_x, bg_y, bg_w, bg_h); | |
3943 | + context.restore(); | |
3944 | + | |
3945 | + // 6.强烈推荐 | |
3946 | + let src = ''; | |
3947 | + context.beginPath(); | |
3948 | + if (type == 0) { // 普通 | |
3949 | + src = '../../../../images/share/q_tj.png'; | |
3950 | + context.drawImage(src, 54 * unit, 648 * unit, 85 * unit, 30 * unit); | |
3951 | + context.setFontSize(16 * unit) | |
3952 | + context.setFillStyle("white") | |
3953 | + context.setTextAlign('left'); | |
3954 | + context.fillText('强烈推荐', 64 * unit, 668 * unit); | |
3955 | + } | |
3956 | + if (type == 1) { // 秒杀 | |
3957 | + | |
3958 | + if (this.data.is_share_text == 1) { | |
3959 | + src = '../../../../images/share/miao_share.png'; | |
3960 | + context.drawImage(src, 54 * unit, 648 * unit, 200 * unit, 36 * unit); | |
3961 | + } | |
3962 | + context.setTextAlign('left'); | |
3963 | + } | |
3964 | + | |
3965 | + | |
3966 | + // 7.商品价格 | |
3967 | + let price = this.data.data.shop_price; | |
3968 | + if (this.data.card_field && this.data.data[this.data.card_field]) { | |
3969 | + price = this.data.data[this.data.card_field]; | |
3970 | + } | |
3971 | + if (this.data.prom_act) price = this.data.prom_price; | |
3972 | + price = parseFloat(price).toFixed(2); | |
3973 | + context.setFontSize(32 * unit); | |
3974 | + context.setFillStyle('#DE1117'); | |
3975 | + | |
3976 | + //price = this.data.presellList.presell_price | |
3977 | + context.fillText('¥' + price, 54 * unit, 735 * unit); | |
3978 | + //-- 零售价的优化 -- | |
3979 | + var wp = 62 * unit + ut.measureText('¥' + price, 32 * unit); | |
3980 | + var hp = 735 * unit | |
3981 | + this.draw_pos_price(context, wp, hp, this.data.data.show_price, unit); | |
3982 | + | |
3983 | + | |
3984 | + // 8.商品标题 | |
3985 | + context.setFontSize(20 * unit); | |
3986 | + context.setFillStyle('#898989'); | |
3987 | + getApp().draw_Text(context, this.data.data.goods_name, 54 * unit, 800 * unit, 240 * unit, 280 * unit, unit, 1); | |
3988 | + | |
3989 | + // 9.小程序码 | |
3990 | + context.drawImage(vpath, 375 * unit, 660 * unit, 120 * unit, 120 * unit); | |
3991 | + context.setFontSize(16 * unit); | |
3992 | + context.setFillStyle('#777'); | |
3993 | + context.fillText('长按识别二维码', 378 * unit, 810 * unit); | |
3994 | + | |
3995 | + // 10.竖线 | |
3996 | + context.beginPath(); | |
3997 | + context.setFillStyle('#eee'); | |
3998 | + context.rect(354 * unit, 670 * unit, 1 * unit, 130 * unit); | |
3999 | + context.fill(); | |
4000 | + }, | |
4001 | + | |
4002 | + //---市场价划掉--- | |
4003 | + draw_pos_price(context, w, h, market_price, unit) { | |
4004 | + | |
4005 | + if (!this.data.sys_switch) return false; | |
4006 | + if (!this.data.sys_switch.is_retail_price) return false; | |
4007 | + | |
4008 | + context.setFillStyle("gray") | |
4009 | + context.setFontSize(22 * unit) | |
4010 | + var pri0 = "¥" + market_price.toFixed(2); | |
4011 | + context.fillText(pri0, w, h); | |
4012 | + | |
4013 | + var c_h = h - 6; | |
4014 | + context.setStrokeStyle('gray'); | |
4015 | + context.setLineWidth(1 * unit); | |
4016 | + context.moveTo(w - 5, c_h); | |
4017 | + context.lineTo(w + ut.measureText(pri0, 22 * unit) + 5, c_h); | |
4018 | + context.stroke(); | |
4019 | + | |
4020 | + }, | |
4021 | + | |
4022 | + | |
4023 | + closePoster() { | |
4024 | + this.setData({ | |
4025 | + showPoster: false, | |
4026 | + }); | |
4027 | + }, | |
4028 | + | |
4029 | + // 保存图片到手机 | |
4030 | + savePic() { | |
4031 | + console.log('保存图片'); | |
4032 | + var self = this; | |
4033 | + // 获取用户的当前设置,返回值中有小程序已经向用户请求过的权限 | |
4034 | + this.getSetting().then((res) => { | |
4035 | + // 判断用户是否授权了保存到相册的权限,如果没有发起授权 | |
4036 | + if (!res.authSetting['scope.writePhotosAlbum']) { | |
4037 | + this.authorize().then(() => { | |
4038 | + // 同意授权后保存下载文件 | |
4039 | + this.saveImage(self.data.shareImgPath) | |
4040 | + .then(() => { | |
4041 | + self.setData({ | |
4042 | + showPoster: false | |
4043 | + }); | |
4044 | + }); | |
4045 | + }) | |
4046 | + } else { | |
4047 | + // 如果已经授权,保存下载文件 | |
4048 | + this.saveImage(self.data.shareImgPath) | |
4049 | + .then(() => { | |
4050 | + self.setData({ | |
4051 | + showPoster: false | |
4052 | + }); | |
4053 | + }); | |
4054 | + } | |
4055 | + | |
4056 | + }) | |
4057 | + }, | |
4058 | + | |
4059 | + // 发起首次授权请求 | |
4060 | + authorize() { | |
4061 | + // isFirst 用来记录是否为首次发起授权, | |
4062 | + // 如果首次授权拒绝后,isFirst赋值为1 | |
4063 | + let isFirst = wx.getStorageSync('isFirst') || 0; | |
4064 | + return new Promise((resolve, reject) => { | |
4065 | + wx.authorize({ | |
4066 | + scope: 'scope.writePhotosAlbum', | |
4067 | + // 同意授权 | |
4068 | + success: () => { | |
4069 | + resolve(); | |
4070 | + }, | |
4071 | + // 拒绝授权,这里是用户拒绝授权后的回调 | |
4072 | + fail: res => { | |
4073 | + if (isFirst === 0) { | |
4074 | + wx.setStorageSync('isFirst', 1); | |
4075 | + wx.showToast({ | |
4076 | + title: '保存失败', | |
4077 | + icon: 'none', | |
4078 | + duration: 1000 | |
4079 | + }) | |
4080 | + } else { | |
4081 | + this.showModal(); | |
4082 | + } | |
4083 | + console.log('拒绝授权'); | |
4084 | + reject(); | |
4085 | + } | |
4086 | + }) | |
4087 | + }) | |
4088 | + }, | |
4089 | + | |
4090 | + | |
4091 | + // 保存图片到系统相册 | |
4092 | + saveImage(saveUrl) { | |
4093 | + var self = this; | |
4094 | + return new Promise((resolve, reject) => { | |
4095 | + wx.saveImageToPhotosAlbum({ | |
4096 | + filePath: saveUrl, | |
4097 | + success: (res) => { | |
4098 | + wx.showToast({ | |
4099 | + title: '保存成功', | |
4100 | + duration: 1000, | |
4101 | + }); | |
4102 | + self.setData({ | |
4103 | + showPlaybill: 'true' | |
4104 | + }); | |
4105 | + resolve(); | |
4106 | + }, | |
4107 | + fail: () => { | |
4108 | + wx.showToast({ | |
4109 | + title: '保存失败', | |
4110 | + duration: 1000, | |
4111 | + }); | |
4112 | + } | |
4113 | + }) | |
4114 | + }) | |
4115 | + }, | |
4116 | + | |
4117 | + // 预览海报 | |
4118 | + previewPoster() { | |
4119 | + getApp().globalData.no_clear = 1; | |
4120 | + wx.previewImage({ | |
4121 | + current: this.data.shareImgPath, // 当前显示图片的http链接 | |
4122 | + urls: [this.data.shareImgPath], // 需要预览的图片http链接列表 | |
4123 | + }); | |
4124 | + }, | |
4125 | + | |
4126 | + | |
4127 | +}); | |
4128 | + | |
4129 | + | ... | ... |
packageG/pages/group_buy/goodsInfo/goodsInfo.json
0 → 100644
1 | +{ | |
2 | + "navigationBarTitleText": "卡项详情", | |
3 | + "enablePullDownRefresh": false, | |
4 | + "usingComponents": { | |
5 | + "nav_box": "/components/nav_box/nav_box", | |
6 | + "warn": "/components/long_warn/long_warn", | |
7 | + "serviceCard_recommend": "/components/serviceCard_list/serviceCard_list", | |
8 | + "privacy_pop": "/components/privacy_pop/privacy_pop", | |
9 | + "top_nav": "/components/diy_top_nav/diy_top_nav", | |
10 | + "share": "/components/share/share" | |
11 | + }, | |
12 | + "navigationStyle": "custom" | |
13 | +} | |
0 | 14 | \ No newline at end of file | ... | ... |
packageG/pages/group_buy/goodsInfo/goodsInfo.wxml
0 → 100644
1 | +<import src="../../../../utils/wxParse/wxParse.wxml"></import> | |
2 | +<wxs module="filters" src="../../../../utils/filter.wxs"></wxs> | |
3 | +<wxs module="g_filters" src="g_filter.wxs"></wxs> | |
4 | +<wxs module="tool" src="filter.wxs"></wxs> | |
5 | +<!-- 判断隐私是不是显示 --> | |
6 | +<privacy_pop id="privacy_pop" bind:agree_pri="agree_pri"></privacy_pop> | |
7 | +<!-- 顶开 --> | |
8 | +<top_nav wx:if="{{!istop || activeCategoryId>0}}" nav_type="{{-1}}" nav_frontColor="{{nav_frontColor}}" nav_backgroundColor="{{nav_backgroundColor}}" nav_title="{{gtitle}}"></top_nav> | |
9 | +<!-- 商品内容区域,普通商品,秒杀,拼团 --> | |
10 | +<block wx:if="{{isshow}}"> | |
11 | + <view class="container"> | |
12 | + | |
13 | + <view class="type-navbar_box"> | |
14 | + <top_nav id="my-nav" bindclickShare="clickShare" nav_type="{{nav_type}}" is_share="{{true}}" | |
15 | + nav_frontColor="{{nav_frontColor}}" istop="{{(istop && searchbox_transparent && activeCategoryId==0) ? 1 : 0 }}" nav_backgroundColor="{{nav_backgroundColor}}" nav_title="{{gtitle}}"></top_nav> | |
16 | + </view> | |
17 | + | |
18 | + <view class="type-navbar" style="top:{{top_nav?(top_nav-4):0}}px"> | |
19 | + <view class="type-box" wx:for="{{categories}}" wx:key="categories"> | |
20 | + <view bindtap="tabClick" class="type-navbar-item {{activeCategoryId==item.id?'type-item-on':''}}" id="{{item.id}}"> | |
21 | + {{item.name}} | |
22 | + </view> | |
23 | + </view> | |
24 | + </view> | |
25 | + <view class="goods-detail"> | |
26 | + <view class="goods-info" hidden="{{activeCategoryId==0?false:true}}"> | |
27 | + | |
28 | + <!-- 有视频和图片的情况 --> | |
29 | + <view id="id" bindtouchstart="handletouchtart" bindtouchmove="handletouchmove" wx:if="{{mapurl}}"> | |
30 | + <view class="xc-videos-picture rel"> | |
31 | + <swiper autoplay="{{false}}" current="{{swiperCurrent}}" class="swiper_box swiperContainer rel" duration="{{1000}}" indicatorDots="{{mapurl?false:true}}" interval="{{3000}}" vertical="{{false}}" bindchange="swiperChange"> | |
32 | + <swiper-item wx:if="{{mapurl}}"> | |
33 | + <view wx:if="{{noon == 0}}"> | |
34 | + <image class="xc-picturess" src="{{iurl+mapurl_f_img}}" mode="aspectFit"> | |
35 | + <image id="{{index}}" class="xc-play" src="{{iurl}}/miniapp/images/pofang.png" bindtap="videoPlay"></image> | |
36 | + </image> | |
37 | + </view> | |
38 | + <view wx:else> | |
39 | + <video class="xc-videos" src="{{iurl+mapurl}}" id="{{index}}" wx:if="{{_index == index}}"></video> | |
40 | + </view> | |
41 | + </swiper-item> | |
42 | + <swiper-item wx:for="{{gallery}}" wx:key="gallery" class="sty"> | |
43 | + <view class="wh100 g_img_box" style="background-image:url({{iurl +(data.image_url?data.image_url:'miniapp/images/default_g_img.gif')}});"></view> | |
44 | + </swiper-item> | |
45 | + </swiper> | |
46 | + | |
47 | + <block wx:if="{{mapurl}}"> | |
48 | + <view wx:if="{{hiddenn==1}}"> | |
49 | + <view class="xc-imageCount">{{current}}/{{gallery.length}}</view> | |
50 | + </view> | |
51 | + <view class="xc-video-picture abs"> | |
52 | + <view class="xc-video" data-vipi="0" bindtap="videopicture"> | |
53 | + <view class="{{videopicture==0 ? 'xc-video-button':'xc-video-buttons'}} {{videopicture==0 ? 'xc-sn':''}}"> | |
54 | + 视频 | |
55 | + </view> | |
56 | + </view> | |
57 | + <view class="xc-picture {{videopicture==1 ? 'xc-sn':''}}" data-vipi="1" bindtap="videopicture"> | |
58 | + <view>图片</view> | |
59 | + </view> | |
60 | + </view> | |
61 | + </block> | |
62 | + | |
63 | + </view> | |
64 | + </view> | |
65 | + | |
66 | + | |
67 | + <!-- 只有图片的情况 --> | |
68 | + <view id="id" bindtouchstart="handletouchtart" bindtouchmove="handletouchmove" wx:else> | |
69 | + <view class="xc-videos-picture rel"> | |
70 | + <swiper autoplay="{{false}}" current="{{swiperCurrent}}" class="swiper_box swiperContainer rel" duration="{{1000}}" | |
71 | + indicatorDots="{{mapurl?false:true}}" interval="{{3000}}" vertical="{{false}}" bindchange="swiperChange"> | |
72 | + <swiper-item class="sty1"> | |
73 | + <image class="wh100" src="{{iurl + (data.image_url?data.image_url:'miniapp/images/default_g_img.gif')}}" | |
74 | + binderror="bind_bnerr" mode="aspectFit" lazy-load="true" data-errorimg="gallery[{{index}}].image_url"></image> | |
75 | + </swiper-item> | |
76 | + </swiper> | |
77 | + </view> | |
78 | + </view> | |
79 | + | |
80 | + | |
81 | + <!-- --显示团购价和剩余时间 --> | |
82 | + <view class="prom_show rel" wx:if="{{prom_type==2}}"> | |
83 | + | |
84 | + <view class="abs flex fs36" style="align-items:flex-end;color: #fff; margin-top: 34rpx; margin-left: 10rpx; height: 60rpx">¥{{prom_price}} | |
85 | + | |
86 | + <view wx:if="{{is_retail_price}}" class="word-line fs24 no_line_c" style="margin-left: 10rpx;position: relative;top: -6rpx; color:#fff !important">零售价:¥{{filters.toFix(front_g.market_price,2)}}</view> | |
87 | + <view wx:else class="word-line no_line_x fs24" style="margin-left: 10rpx;position: relative;top: -6rpx;color:#fff !important">¥{{filters.toFix(front_g.shop_price,2)}}</view> | |
88 | + </view> | |
89 | + | |
90 | + <image class="abs" style="width: 120rpx;top: 32rpx; right: 220rpx;" mode="widthFix" src='{{iurl+"/miniapp/images/activity-time.png"}}'></image> | |
91 | + | |
92 | + <image class="secondkill-img" src='{{iurl+"/miniapp/images/group_img.png"}}'></image> | |
93 | + <view class="stop fs26 abs" style="color: #fff;top: 22rpx"> | |
94 | + | |
95 | + <block wx:if="{{prom_st==0 && !prom_r_null}}">开始时间</block> | |
96 | + <block wx:else>结束时间</block> | |
97 | + | |
98 | + </view> | |
99 | + <view class="secview flex abs fs24 xc-miaosha-time" style="color: #fff;top: 68rpx"> | |
100 | + <block wx:if="djs.day">{{djs.day}}天</block>{{djs.hou}}小时{{djs.min}}分{{djs.sec}}秒 | |
101 | + </view> | |
102 | + </view> | |
103 | + | |
104 | + | |
105 | + <block> | |
106 | + <view class="goods-price rel"> | |
107 | + <view class="co-red" style="overflow: hidden"> | |
108 | + <view class="market-price" style="overflow: hidden"></view> | |
109 | + </view> | |
110 | + | |
111 | + | |
112 | + <view class="flex jc_sb" style="padding-bottom: 20rpx;"> | |
113 | + <view> | |
114 | + <!-- 手店价 --> | |
115 | + <view class="co-red" wx:if="{{prom_type == 0}}"><text class="rel yuan fs28">¥</text>{{filters.toFix(data.shop_price,2)}}</view> | |
116 | + <view class="goods-title"> | |
117 | + <view class="goods-name elli">{{data.goods_name}}</view> | |
118 | + </view> | |
119 | + </view> | |
120 | + | |
121 | + <!-- 这个是分享按钮 --> | |
122 | + <view wx:if="{{isLogin}}" class="xc-share-frame t-c shrink0" bindtap="clickShare"> | |
123 | + <view class="iconfont icon-share"></view> | |
124 | + <view class="fs22 c-7b">分享</view> | |
125 | + </view> | |
126 | + </view> | |
127 | + | |
128 | + | |
129 | + <block wx:if="{{prom_type==1}}"> | |
130 | + <view class="goods-num"> | |
131 | + <block> | |
132 | + <view class="stock">总数量:{{prom_act.is_virtual_count ? prom_act.goods_num : (prom_act.goods_num+prom_act.virtual)}}件</view> | |
133 | + | |
134 | + <view class="stock" wx:if="{{prom_act.buy_limit>0}}">限购:{{prom_act.buy_limit}}件</view> | |
135 | + <view class="stock" wx:else>限购:不限</view> | |
136 | + <view class="sales">已售:{{prom_act.buy_num+prom_act.virtual}}件</view> | |
137 | + | |
138 | + </block> | |
139 | + </view> | |
140 | + </block> | |
141 | + | |
142 | + <view class="goods-num" wx:else> | |
143 | + <view class="sales">销量:{{data.sales_sum}}</view> | |
144 | + <view class="sales">有效天数:{{data.validDays?data.validDays:'不限'}}</view> | |
145 | + </view> | |
146 | + | |
147 | + </view> | |
148 | + </block> | |
149 | + | |
150 | + | |
151 | + | |
152 | + <!-- 门店收货地址 --> | |
153 | + <view class="xc-address_frame bdt16 flex-vertical xc-ash {{def_pick_store!=null?'sn_height':'on_height'}}"> | |
154 | + <view class="address_frame" bindtap="choice_store" data-ind="0"> | |
155 | + <view class="flex-vertical-between "> | |
156 | + <view class="flex-vertical select_store_height"> | |
157 | + <image class="stores-img" src="{{iurl}}/miniapp/images/stores.png"></image> | |
158 | + <view class="fs30" style="color:black;">选择门店</view> | |
159 | + </view> | |
160 | + <view hidden="{{has_def && sys_switch.is_pricing_open_store}}" class="red_bb fs26">更多门店<text class="bg_jj"></text></view> | |
161 | + </view> | |
162 | + | |
163 | + <view wx:if="{{def_pick_store && def_pick_store.pickup_name}}"> | |
164 | + <view class="flex-space-between address ai_end "> | |
165 | + <view> | |
166 | + <text class="fs30 xc-black3 shop_name">{{def_pick_store.pickup_name}}</text> | |
167 | + </view> | |
168 | + <view class="distance fs24" wx:if="{{def_pick_store.distance!=null}}"> | |
169 | + 距离:{{def_pick_store.distance>1000?filters.toFix(def_pick_store.distance/1000,2)+"km":filters.toFix(def_pick_store.distance,0)+"m"}} | |
170 | + | |
171 | + </view> | |
172 | + </view> | |
173 | + | |
174 | + <view class="no_store" wx:if="{{only_pk && !only_pk.length}}">(未找到门店)</view> | |
175 | + <block wx:else> | |
176 | + <view class="no_store" wx:if="{{def_pickpu_list && !def_pickpu_list.length}}">(未找到门店)</view> | |
177 | + <text wx:elif="{{def_pick_store.is_no_dis_act && !is_normal}}" class="no_store">(该店不可售)</text> | |
178 | + <block wx:else> | |
179 | + <view class="no_store" wx:if="{{def_pick_store && def_pick_store.is_no_dis}}">(该店不可售)</view> | |
180 | + </block> | |
181 | + </block> | |
182 | + | |
183 | + <view class="fs24 xc-ash-9f">地址:{{def_pick_store.fulladdress}}</view> | |
184 | + </view> | |
185 | + </view> | |
186 | + | |
187 | + </view> | |
188 | + | |
189 | + | |
190 | + <!-- 保障服务 --> | |
191 | + <view class="bz_view flex bdt16 ai_c" wx:if="{{store_config.service_bz}}"> | |
192 | + <image class="bzfu_img" src="{{iurl}}/miniapp/images/bzfu_w.png"></image> | |
193 | + <view class="flex f1 ai_c rel" style="position: relative;" bindtap="{{showFold ? 'clickCollapse':''}}"> | |
194 | + <view class="bz-content showArea {{flag ? '':'ellipsis-1x'}}">{{store_config.service_bz}}</view> | |
195 | + <view class="bz-content hideArea">{{store_config.service_bz}}</view> | |
196 | + <view class="cx-obtain-coupon wsize arrow" wx:if="{{showFold}}"> | |
197 | + <text class="bg_jj down {{flag ? 'up':''}}"></text> | |
198 | + </view> | |
199 | + </view> | |
200 | + </view> | |
201 | + | |
202 | + <!-- - 宝贝评价 -- --> | |
203 | + <view class="bdt16"> | |
204 | + <view class="bb_view"> | |
205 | + <view class="bold">宝贝评价({{categories3[0].num}})</view> | |
206 | + <view class="red_bb fs26" bindtap="look_pj"> | |
207 | + 查看全部 | |
208 | + <text class="bg_jj"></text> | |
209 | + </view> | |
210 | + </view> | |
211 | + <view class="xc_comment"> | |
212 | + <view class="xc_comment-have-pictures" data-val="5" bindtap="clik_evaluate"> | |
213 | + 有图({{categories3[1].num}}) | |
214 | + </view> | |
215 | + <view class="xc_comment-discuss" data-val="2" bindtap="clik_evaluate"> | |
216 | + 好评({{categories3[2].num}}) | |
217 | + </view> | |
218 | + <view class="xc_comment-discuss" data-val="3" bindtap="clik_evaluate"> | |
219 | + 中评({{categories3[3].num}}) | |
220 | + </view> | |
221 | + <view class="xc_comment-discuss" data-val="4" bindtap="clik_evaluate"> | |
222 | + 差评({{categories3[4].num}}) | |
223 | + </view> | |
224 | + </view> | |
225 | + <scroll-view scroll-x="true" class="pj_scroll"> | |
226 | + <view class="flex"> | |
227 | + <view class="xc_comment-detail" style="" wx:for="{{fir_comments}}" wx:key="{{item}}"> | |
228 | + <view class="xc_comment-left"> | |
229 | + <view class="xc_comment-user"> | |
230 | + <view class="xc_user-img"> | |
231 | + <image class="xc_imgs" src='{{item.is_anonymous!=1?item.head_pic:iurl+"/miniapp/images/hui_hear_pic.png"}}' binderror="bind_bnerr2" data-errorimg="fir_comments[{{index}}].head_pic"></image> | |
232 | + </view> | |
233 | + <view class="xc_user"> | |
234 | + <view class="xc_user-name five-level-word"> | |
235 | + {{item.is_anonymous!=1?item.username:'匿名'}} | |
236 | + </view> | |
237 | + <image class="xc_comment-img" src="{{iurl}}/miniapp/images/star-red.png" wx:for="{{item.sum_rank}}" wx:key="{{index}}"></image> | |
238 | + </view> | |
239 | + </view> | |
240 | + <view class="xc_comment-font pj_word_size ellipsis-1 pdt12"> | |
241 | + <text class="ellipsis-1">{{item.content?item.content:'此用户没有填写评价。'}}</text> | |
242 | + </view> | |
243 | + <view class="xc_comment-val"> | |
244 | + <view class="xc_comment-time">{{item.add_time}}</view> | |
245 | + </view> | |
246 | + </view> | |
247 | + <view class="xc_goods-img-frame"> | |
248 | + <image wx:if="{{item.img[0]!=undefined && item.img[0]!=null}}" class="xc_goods-img" src='{{iurl+item.img[0]}}'></image> | |
249 | + <image wx:elif="{{item.weapp_img[0]!=undefined && item.weapp_img[0]!=null}}" class="xc_goods-img" src='{{item.weapp_img[0]}}'></image> | |
250 | + <image wx:else class="xc_goods-img" src='{{gallery[0].image_url}}'></image> | |
251 | + </view> | |
252 | + </view> | |
253 | + </view> | |
254 | + </scroll-view> | |
255 | + </view> | |
256 | + | |
257 | + | |
258 | + | |
259 | + <!-- 图文详情 --> | |
260 | + <view class="t_g_info bdt16"> | |
261 | + <view class="red_shu"></view> | |
262 | + <view class="fs30 bold">卡项详情</view> | |
263 | + </view> | |
264 | + <view class="pdh20"> | |
265 | + | |
266 | + <block wx:if="{{listServiceItem && listServiceItem.length > 0}}"> | |
267 | + <view class="card fs28" wx:for="{{listServiceItem}}"> | |
268 | + <view class="flex ai_c jc_sb" style="height: 88rpx;"> | |
269 | + <view class="ellipsis-2 f1" wx:if="{{item.displayqty==1}}" >{{item.projectName}}(无限次)</view> | |
270 | + <view class="ellipsis-2 f1" wx:else>{{item.projectName}}({{item.frequency}}次)</view> | |
271 | + <view class="pdl30 t-r"> | |
272 | + <view class="rmb fs36 bold c-red">{{item.vipprice}}</view> | |
273 | + <view class="fs22 c-9 del" wx:if="{{item.showPrice}}">零售价:¥{{item.showPrice}}</view> | |
274 | + </view> | |
275 | + </view> | |
276 | + <view class="flex ai_c jc_sb fs24 c-6"> | |
277 | + <view class="ellipsis-1">备注:{{filters.show_default(item.remark, '无')}}</view> | |
278 | + <!-- 指定开始日期和结束日期 --> | |
279 | + <view class="pdl30 shrink0">有效期:{{filters.showStartAndEndDate(item, data.validDays)}}</view> | |
280 | + </view> | |
281 | + </view> | |
282 | + </block> | |
283 | + | |
284 | + <block wx:if="{{enableMeiye}}"> | |
285 | + <block wx:if="{{taoheList && taoheList.length > 0}}"> | |
286 | + <view class="taohe fs28" wx:for="{{taoheList}}"> | |
287 | + <view class="flex ai_c jc_sb" style="height: 88rpx;"> | |
288 | + <view class="ellipsis-2 f1">{{item.goods_name}} ({{item.goods_sn}}) ({{item.frequency}}个)</view> | |
289 | + <view class="pdl30 t-r"> | |
290 | + <view class="rmb fs36 bold c-red">{{item.vipprice}}</view> | |
291 | + <view class="fs22 c-9 del">零售价:¥{{item.show_price}}</view> | |
292 | + </view> | |
293 | + </view> | |
294 | + <view class="flex ai_c jc_sb fs24 c-6 pdt10"> | |
295 | + <view class="ellipsis-1">备注:{{filters.show_default(item.remark, '无')}}</view> | |
296 | + <view class="pdl30 shrink0">有效期:{{filters.showStartAndEndDate(item,data.validDays)}}</view> | |
297 | + </view> | |
298 | + </view> | |
299 | + </block> | |
300 | + </block> | |
301 | + | |
302 | + <!-- <view class="table_s" wx:if="{{service_list}}"> | |
303 | + <view class="tb_item tb-l"> | |
304 | + <view class="item_left f1"> | |
305 | + <text>项目名称</text> | |
306 | + </view> | |
307 | + <view class="item_left f1"> | |
308 | + <text>耗时(分)</text> | |
309 | + </view> | |
310 | + <view class="item_left f1"> | |
311 | + <text>次数</text> | |
312 | + </view> | |
313 | + </view> | |
314 | + <view class="tb_item tb-l" wx:for="{{service_list}}"> | |
315 | + <view class="item_right f1"> | |
316 | + <text>{{item.projectName}}</text> | |
317 | + </view> | |
318 | + <view class="item_right f1"> | |
319 | + <text>{{item.timeConsuming}}</text> | |
320 | + </view> | |
321 | + <view class="item_right f1"> | |
322 | + <text>{{item.frequency}}</text> | |
323 | + </view> | |
324 | + </view> | |
325 | + </view> --> | |
326 | + | |
327 | + <view class="wxParse"> | |
328 | + <template is="wxParse" data="{{wxParseData:content.nodes}}"></template> | |
329 | + </view> | |
330 | + | |
331 | + </view> | |
332 | + | |
333 | + <!-- 推荐商品 --> | |
334 | + <view class="flex-center rel xc-linellae-frame"> | |
335 | + <view class="xc-linellae"></view> | |
336 | + <view class="abs flex-center xc-recommend-frame "> | |
337 | + <image class=" xc-recommend" src="{{iurl}}/miniapp/images/diamond.png"></image> | |
338 | + <view class="xc-recommend-word">推荐</view> | |
339 | + </view> | |
340 | + </view> | |
341 | + <serviceCard_recommend id="goods_list"></serviceCard_recommend> | |
342 | + | |
343 | + </view> | |
344 | + | |
345 | + | |
346 | + <view class="goods-norms" hidden="{{activeCategoryId==1?false:true}}"> | |
347 | + <view class="pd20"> | |
348 | + <!-- <view class="table_s" wx:if="{{service_list}}"> | |
349 | + <view class="tb_item tb-l"> | |
350 | + <view class="item_left f1"> | |
351 | + <text>项目名称</text> | |
352 | + </view> | |
353 | + <view class="item_left f1"> | |
354 | + <text>耗时(分)</text> | |
355 | + </view> | |
356 | + <view class="item_left f1"> | |
357 | + <text>次数</text> | |
358 | + </view> | |
359 | + </view> | |
360 | + <view class="tb_item tb-l" wx:for="{{service_list}}"> | |
361 | + <view class="item_right f1"> | |
362 | + <text>{{item.projectName}}</text> | |
363 | + </view> | |
364 | + <view class="item_right f1"> | |
365 | + <text>{{item.timeConsuming}}</text> | |
366 | + </view> | |
367 | + <view class="item_right f1"> | |
368 | + <text>{{item.frequency}}</text> | |
369 | + </view> | |
370 | + </view> | |
371 | + </view> --> | |
372 | + | |
373 | + <block wx:if="{{listServiceItem && listServiceItem.length > 0}}"> | |
374 | + <view class="card fs28" wx:for="{{listServiceItem}}"> | |
375 | + <view class="flex ai_c jc_sb" style="height: 88rpx;"> | |
376 | + <view class="ellipsis-2 f1">{{item.projectName}}({{item.frequency}}次)</view> | |
377 | + <view class="pdl30 t-r"> | |
378 | + <view class="rmb fs36 bold c-red">{{item.vipprice}}</view> | |
379 | + <view class="fs22 c-9 del" wx:if="{{item.showPrice}}">零售价:¥{{item.showPrice}}</view> | |
380 | + </view> | |
381 | + </view> | |
382 | + <view class="flex ai_c jc_sb fs24 c-6"> | |
383 | + <view class="ellipsis-1">备注:{{filters.show_default(item.remark, '无')}}</view> | |
384 | + <!-- 指定开始日期和结束日期 --> | |
385 | + <view class="pdl30 shrink0">有效期:{{filters.showStartAndEndDate(item, data.validDays)}}</view> | |
386 | + </view> | |
387 | + </view> | |
388 | + </block> | |
389 | + | |
390 | + <block wx:if="{{enableMeiye}}"> | |
391 | + <block wx:if="{{taoheList && taoheList.length > 0}}"> | |
392 | + <view class="taohe fs28" wx:for="{{taoheList}}"> | |
393 | + <view class="flex ai_c jc_sb" style="height: 88rpx;"> | |
394 | + <view class="ellipsis-2 f1">{{item.goods_name}} ({{item.goods_sn}}) ({{item.frequency}}个)</view> | |
395 | + <view class="pdl30 t-r"> | |
396 | + <view class="rmb fs36 bold c-red">{{item.vipprice}}</view> | |
397 | + <view class="fs22 c-9 del">零售价:¥{{item.show_price}}</view> | |
398 | + </view> | |
399 | + </view> | |
400 | + <view class="flex ai_c jc_sb fs24 c-6 pdt10"> | |
401 | + <view class="ellipsis-1">备注:{{filters.show_default(item.remark, '无')}}</view> | |
402 | + <view class="pdl30 shrink0">有效期:{{filters.showStartAndEndDate(item,data.validDays)}}</view> | |
403 | + </view> | |
404 | + </view> | |
405 | + </block> | |
406 | + </block> | |
407 | + | |
408 | + <view class="wxParse"> | |
409 | + <template is="wxParse" data="{{wxParseData:content.nodes}}"></template> | |
410 | + </view> | |
411 | + | |
412 | + </view> | |
413 | + </view> | |
414 | + | |
415 | + <view class="goods-comment" hidden="{{activeCategoryId==2?false:true}}"> | |
416 | + <view class="topframe"> | |
417 | + <view class="topframe-top"> | |
418 | + <view class="topframe-top-content"> | |
419 | + <view>宝贝评价</view> | |
420 | + <view class="topframe-top-val">({{categories3[0].num}})</view> | |
421 | + </view> | |
422 | + <view class="topframe-praise" wx:if="{{categories3[0].num}}"> | |
423 | + 好评{{ filters.toFix(categories3[2].num/categories3[0].num*100,2) }}% | |
424 | + </view> | |
425 | + <view wx:else>好评 0%</view> | |
426 | + </view> | |
427 | + <view class="buttem-list"> | |
428 | + <view bindtap="tabClick3" id="{{item.id}}" wx:for="{{categories3}}" wx:key="categories3" class="item {{activeCategoryId3==item.id?'red':''}}"> | |
429 | + {{item.name}}({{item.num}}) | |
430 | + </view> | |
431 | + </view> | |
432 | + </view> | |
433 | + <block wx:for="{{comments}}" wx:for-index="cIdx" wx:key="{{cIdx}}"> | |
434 | + <view style='border-bottom:4rpx solid #eee;'> | |
435 | + <view class="middle"> | |
436 | + <view class="middle-img-frame"> | |
437 | + <image class="middle-img" src="{{item.is_anonymous!=1?item.head_pic:iurl+'/miniapp/images/hui_hear_pic.png'}}" binderror="bind_bnerr2" data-errorimg="comments[{{cIdx}}].head_pic"></image> | |
438 | + <view class="middle-user-frame"> | |
439 | + <view class="middle-user"> | |
440 | + {{item.username==''||item.is_anonymous==1 ?'匿名用户':item.username}} | |
441 | + </view> | |
442 | + <image class="star" src="{{iurl}}/miniapp/images/star-red.png" wx:for="{{item.sum_rank}}" wx:key="{{index}}"></image> | |
443 | + </view> | |
444 | + </view> | |
445 | + <view class="xc-pirces"> | |
446 | + <view class="middle-font {{item.seeMore==true?'ellipsis-3':''}}" style="word-break: break-all;"> | |
447 | + {{item.content?item.content:'此用户没有填写评价。'}} | |
448 | + </view> | |
449 | + </view> | |
450 | + <view wx:if='{{item.seeMore}}' data-index='{{cIdx}}' class="s_btn fs30 red-co" catchtap='toggleHandler'> | |
451 | + 全部显示 | |
452 | + </view> | |
453 | + <view wx:if='{{!item.seeMore && item.auto}}' data-index='{{cIdx}}' class="s_btn fs30 red-co" catchtap='toggleContent'> | |
454 | + 收起 | |
455 | + </view> | |
456 | + <view class="img-ul"> | |
457 | + <block wx:if="{{item.source_type==0}}"> | |
458 | + <view class="img-li" wx:for="{{item.img}}" wx:key="{{index}}"> | |
459 | + <image bindtap="previewCommentImgs" class="wh100" data-cidx="{{cIdx}}" data-img="{{iurl}}{{item}}" data-id="{{index}}" src="{{iurl}}{{item}}"></image> | |
460 | + </view> | |
461 | + </block> | |
462 | + <block wx:if="{{item.source_type==1}}"> | |
463 | + <view class="img-li" wx:for="{{item.weapp_img}}" wx:if="{{aitem.length>10}}" wx:key="{{index}}" wx:for-item="aitem"> | |
464 | + <image bindtap="previewCommentImgs_w" class="wh100" data-cidx="{{cIdx}}" data-img="{{aitem}}" data-id="{{index}}" src="{{aitem}}"></image> | |
465 | + </view> | |
466 | + </block> | |
467 | + </view> | |
468 | + <view class="z_parameter"> | |
469 | + <view class="parameter-font">{{item.add_time}}</view> | |
470 | + <view class="parameter-dian" bindtap="click_zan" data-com_id="{{item.comment_id}}" data-item_id="{{cIdx}}"> | |
471 | + <image wx:if="{{item.userZanNum==1}}" class="parameter-img" src="{{iurl}}/miniapp/images/zan_red.png"></image> | |
472 | + <image wx:else class="parameter-img" src="{{iurl}}/miniapp/images/dianzan.png"></image> | |
473 | + <view class="parameter-val" style='color:{{item.userZanNum==1? "#d60022":"#999" }}'> | |
474 | + {{item.zan_num}} | |
475 | + </view> | |
476 | + </view> | |
477 | + </view> | |
478 | + </view> | |
479 | + <view class="reply rel" wx:if="{{item.replay_list}}"> | |
480 | + <view class="line_bulge"></view> | |
481 | + <view class="shop-reply">店家回复:</view> | |
482 | + <view class="shop-font" wx:for="{{item.replay_list}}" wx:for-item="r_item" wx:key="{{index}}"> | |
483 | + {{r_item.content}} | |
484 | + </view> | |
485 | + </view> | |
486 | + </view> | |
487 | + </block> | |
488 | + <block wx:if="{{(!comments || comments.length==0) && get_c }}"> | |
489 | + <text class="no_pj_list">暂无评价</text> | |
490 | + </block> | |
491 | + <block wx:if="{{comments.length>10 && comments_no_more}}"> | |
492 | + <text class="no_pj_list">已经加载到底部</text> | |
493 | + </block> | |
494 | + </view> | |
495 | + </view> | |
496 | + </view> | |
497 | + <!---滚动到顶部----> | |
498 | + <!-- <view bindtap="doScrollTop" class="toTop" wx:if="{{supportPageScroll}}"> | |
499 | + <image class="wh100" src="{{iurl}}/miniapp/images/topup.png"></image> | |
500 | + </view> --> | |
501 | + | |
502 | + <!-- 底部按钮 --> | |
503 | + <view class="join-cart ai_c"> | |
504 | + | |
505 | + <view class="flex"> | |
506 | + <view class="custom-service cart-ico new_split pdh20" bindtap="openCS"> | |
507 | + <image class="cs-img" src="{{iurl}}/miniapp/images/custom-service.png"></image> | |
508 | + <view>客服</view> | |
509 | + </view> | |
510 | + | |
511 | + <view bindtap="collectGoods" class="custom-service cart-ico new_split t-c pdh20"> | |
512 | + <image hidden="{{is_collect}}" class="cs-img" src="{{iurl}}/miniapp/images/heart.png"></image> | |
513 | + <image hidden="{{!is_collect}}" class="cs-img" src="{{iurl}}/miniapp/images/heart-h.png"></image> | |
514 | + <view>收藏</view> | |
515 | + </view> | |
516 | + | |
517 | + <view class="shopping-cart cart-ico new_split pdh20"> | |
518 | + <navigator open-type="switchTab" url="/pages/cart/cart/cart" style="text-align: center"> | |
519 | + <image class="sc-img" src="{{iurl}}/miniapp/images/shopping-cart.png"></image> | |
520 | + <view class="cart-num ellipsis-1"> {{cartGoodsNum}} </view> | |
521 | + <view>购物车</view> | |
522 | + </navigator> | |
523 | + </view> | |
524 | + </view> | |
525 | + | |
526 | + | |
527 | + <view class="flex f1 btn-group"> | |
528 | + <!-- -----团购------ --> | |
529 | + <block wx:if="{{prom_type==2}}"> | |
530 | + <block wx:if="{{prom_st==1 && !prom_r_null}}"> | |
531 | + <view bindtap="openSpecModel" data-ind="1" class="join-btn cart-btn f1">加入购物车</view> | |
532 | + <view bindtap="openSpecModel" data-ind="2" class="buy-btn cart-btn f1">立即抢购</view> | |
533 | + </block> | |
534 | + | |
535 | + <block wx:if="{{prom_st==0 && !prom_r_null}}"> | |
536 | + <view class="buy-btn cart-btn cart-btn-lg lanse f1">即将开始</view> | |
537 | + </block> | |
538 | + <block wx:if="{{prom_r_null}}"> | |
539 | + <view class="buy-btn cart-btn cart-btn-lg huise f1">已抢光</view> | |
540 | + </block> | |
541 | + <block wx:if="{{prom_st==3 && !prom_r_null}}"> | |
542 | + <view class="buy-btn cart-btn cart-btn-lg lanse f1">活动已经结束</view> | |
543 | + </block> | |
544 | + </block> | |
545 | + | |
546 | + <!-- 从“我的服务”入口进入购买商品 --> | |
547 | + <block wx:else> | |
548 | + <view bindtap="openSpecModel" data-ind="1" class="join-btn cart-btn f1">加入购物车</view> | |
549 | + <view bindtap="openSpecModel" data-ind="2" class="buy-btn cart-btn f1">立即购买</view> | |
550 | + </block> | |
551 | + | |
552 | + </view> | |
553 | + | |
554 | + </view> | |
555 | + | |
556 | + <!-- 制作一个圆球导航 --> | |
557 | + <nav_box></nav_box> | |
558 | +</block> | |
559 | + | |
560 | +<!-- 弹起来,选择规格数量,普通商品购买和秒杀 --> | |
561 | +<view hidden="{{!openSpecModal}}"> | |
562 | + | |
563 | + <view bindtap="closeSpecModal" class="cover-layer"></view> | |
564 | + <view class="spec-model"> | |
565 | + <view class="pding"> | |
566 | + | |
567 | + <icon bindtap="closeSpecModal" class="modal-close" color="black" size="22" type="cancel"></icon> | |
568 | + | |
569 | + | |
570 | + <view class="spec-goods"> | |
571 | + <image class="wh100 spec-img" src="{{iurl}}{{data.image_url?data.image_url:'miniapp/images/default_g_img.gif'}}" | |
572 | + binderror="pop_err_img" data-errorimg="data.image_url" /> | |
573 | + <view class="spec-goods-info"> | |
574 | + <view class="spec-goods-name ellipsis-2">{{data.goods_name}}</view> | |
575 | + <view class="flex ai_end xc-val-money"> | |
576 | + <view class="spec-goods-price"> | |
577 | + <text class="fs20">¥</text> | |
578 | + <block wx:if="{{prom_type == 2}}">{{prom_price}}</block> | |
579 | + <block wx:else>{{data.shop_price}}</block> | |
580 | + </view> | |
581 | + </view> | |
582 | + </view> | |
583 | + </view> | |
584 | + | |
585 | + | |
586 | + | |
587 | + <!-- 选择门店模块 --> | |
588 | + <view class="flex-space-between address ai_end xc-width" style="padding-top: 30rpx;"> | |
589 | + <view class="flex" wx:if="{{def_pick_store && def_pick_store.pickup_name}}"> | |
590 | + <text class="fs30 xc-black3 shop_name" style="width:360rpx">{{def_pick_store.pickup_name}}</text> | |
591 | + <view class="distance fs24 xc-ash" wx:if="{{def_pick_store.distance!=null}}"> | |
592 | + 距离:{{def_pick_store.distance>1000?filters.toFix(def_pick_store.distance/1000,2)+"km":filters.toFix(def_pick_store.distance,0)+"m"}}</view> | |
593 | + </view> | |
594 | + | |
595 | + <!-- 没有门店的时候 --> | |
596 | + <view class="flex" bindtap="choice_store" wx:else> | |
597 | + <image class="stores-img" src="{{iurl}}/miniapp/images/stores.png"></image> | |
598 | + <view class="fs30" style="color:black;">选择门店</view> | |
599 | + </view> | |
600 | + <view hidden="{{has_def && sys_switch.is_pricing_open_store}}" class="red-co fs28" bindtap="choice_store">更多门店<text class="right-arrow"></text></view> | |
601 | + </view> | |
602 | + | |
603 | + | |
604 | + | |
605 | + <view wx:if="{{only_pk && !only_pk.length}}">(库存不足)</view> | |
606 | + <block wx:else> | |
607 | + <view wx:if="{{def_pickpu_list && !def_pickpu_list.length}}">(库存不足)</view> | |
608 | + <block wx:else> | |
609 | + <view class="no_store" wx:if="{{def_pick_store.is_no_dis}}">(该店不可售)</view> | |
610 | + <view class="no_store" wx:elif="{{def_pick_store.is_no_dis_act}}">(该店不可售)</view> | |
611 | + <view wx:elif="{{def_pick_store && !def_pick_store.CanOutQty && !filters.is_virtual_gd(sele_g.is_virtual) && sales_rules==2 && prom_type==0}}">(库存不足)</view> | |
612 | + </block> | |
613 | + </block> | |
614 | + | |
615 | + <view class="fs24 xc-ash-9f xc-distance-top " wx:if="{{def_pick_store && def_pick_store.fulladdress}}">地址:{{def_pick_store.fulladdress}}</view> | |
616 | + </view> | |
617 | + | |
618 | + | |
619 | + | |
620 | + <view class="b_num"> | |
621 | + <view>购买数量</view> | |
622 | + <view class="count"> | |
623 | + <view class="sub {{goodsInputNum <= 1 ? 'active':''}}" wx:if="{{goodsInputNum <= 1}}">-</view> | |
624 | + <view bindtap="subCartNum" class="sub" wx:else>-</view> | |
625 | + <input bindblur="inputCartNum" type="number" value="{{goodsInputNum}}"></input> | |
626 | + <view bindtap="addCartNum" class="add">+</view> | |
627 | + </view> | |
628 | + </view> | |
629 | + | |
630 | + | |
631 | + | |
632 | + <view class="spec-cart-btns"> | |
633 | + <view wx:if="{{def_pick_store && def_pick_store.is_no_dis}}" class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999;">该店不可售</view> | |
634 | + <view wx:elif="{{def_pick_store && def_pick_store.is_no_dis_act}}" class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999;">该店不可售</view> | |
635 | + <block wx:else> | |
636 | + | |
637 | + <!-- 根本就找不到门店 --> | |
638 | + <block wx:if="{{!only_pk && !def_pickpu_list}}"> | |
639 | + <view class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999;">库存不足</view> | |
640 | + </block> | |
641 | + <block wx:else> | |
642 | + | |
643 | + <block wx:if="{{only_pk.length && !only_pk.length}}"> | |
644 | + <view class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999;">库存不足</view> | |
645 | + </block> | |
646 | + <block wx:else> | |
647 | + <block wx:if="{{def_pickpu_list && !def_pickpu_list.length}}"> | |
648 | + <view class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999">库存不足</view> | |
649 | + </block> | |
650 | + | |
651 | + <block wx:else> | |
652 | + <block wx:if="{{!def_pick_store}}"> | |
653 | + <view class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999">请先选择门店</view> | |
654 | + </block> | |
655 | + <block wx:else> | |
656 | + | |
657 | + <view wx:if="{{openSpecModal_ind==1}}" bindtap="addCart" data-openSpecModal_ind="{{openSpecModal_ind}}" class="spec-cart-btn yellow fs32 {{!sto_sele_name?'gray':''}}" | |
658 | + data-action="add">加入购物车</view> | |
659 | + <!-- 秒杀 --> | |
660 | + <block wx:if="{{prom_type == 2}}"> | |
661 | + <view wx:if="{{openSpecModal_ind==2}}" bindtap="addCart" data-openSpecModal_ind="{{openSpecModal_ind}}" class="spec-cart-btn spec-buy {{!sto_sele_name?'gray':''}}" | |
662 | + data-action="buy" data-promtype="{{prom_type}}" data-promid="{{prom_id}}"> | |
663 | + 立即购买 | |
664 | + </view> | |
665 | + </block> | |
666 | + | |
667 | + <!-- 普通商品 --> | |
668 | + <block wx:else> | |
669 | + <view wx:if="{{openSpecModal_ind==2}}" bindtap="addCart" data-openSpecModal_ind="{{openSpecModal_ind}}" class="spec-cart-btn spec-buy {{!sto_sele_name?'gray':''}}" | |
670 | + data-action="buy"> | |
671 | + 立即购买 | |
672 | + </view> | |
673 | + </block> | |
674 | + | |
675 | + </block> | |
676 | + </block> | |
677 | + </block> | |
678 | + </block> | |
679 | + | |
680 | + </block> | |
681 | + </view> | |
682 | + | |
683 | + <view class="clear"></view> | |
684 | + </view> | |
685 | +</view> | |
686 | + | |
687 | + | |
688 | + | |
689 | +<!-- 选择门店的弹框,1.1版最新的 --> | |
690 | +<block wx:if="{{store==1}}"> | |
691 | + <view class="mongolia-layer" bindtap="close_popup"></view> | |
692 | + <view class="popup-frame"> | |
693 | + <block wx:if="{{sort_store==0}}"> | |
694 | + <!-- 头部 标题 --> | |
695 | + <view class="popup-top flex-space-between"> | |
696 | + <text class="fs32 nearby_store">{{choice_sort_store==0?'附近的门店':region_name}}</text> | |
697 | + <view> | |
698 | + <view> | |
699 | + <icon bindtap="close_popup" class="modal-closes" color="black" size="22" type="cancel"></icon> | |
700 | + </view> | |
701 | + <view class="felx choose_more" bindtap="more_store" wx:if="{{is_show_sto_cat>0}}"> | |
702 | + <text class="fs26 red-co">{{choice_sort_store==0?'更多门店':'返回'}}</text> | |
703 | + <view class="bg_rights"></view> | |
704 | + </view> | |
705 | + </view> | |
706 | + </view> | |
707 | + <view class="searchbar flex-vertical-between storeListpadd"> | |
708 | + <input class="inputstore fs28" placeholder="输入要搜索的门店" value="{{keyword}}" placeholder-class="fs28" maxlength="16" bindinput="input_store" bindconfirm="searchfn" /> | |
709 | + <view class="search flex-center" bindtap="searchfn"> | |
710 | + <view class="fs28">搜索</view> | |
711 | + </view> | |
712 | + </view> | |
713 | + <!-- 门店列表,最外层的门店列表,一开始 --> | |
714 | + <view class="store-list"> | |
715 | + <!--如果还没有点击更多门店的时候 --> | |
716 | + <block wx:if="{{choice_sort_store==0}}"> | |
717 | + <!-- 需要for循环 --> | |
718 | + <block wx:if="{{is_show_sto_cat==1}}"> | |
719 | + <view class="store_choose flex" wx:for="{{def_pickpu_list}}" bindtap="choose_for_store_fir" data-ind="{{index}}"> | |
720 | + <view class="store flex-vertical"> | |
721 | + <!-- 需要点击事件 --> | |
722 | + <block wx:if="{{index==fir_pick_index}}"> | |
723 | + <view class="circle white xc-hook fs20 red-b">Г</view> | |
724 | + </block> | |
725 | + <block wx:else> | |
726 | + <view class="circle xc-hooks"></view> | |
727 | + </block> | |
728 | + <view class="address-frame xc-ash"> | |
729 | + <view class="flex-vertical-between butttem5"> | |
730 | + <view class="flex xc-ash"> | |
731 | + <view class="fs30 xc-black3 address_name">{{item.pickup_name}} | |
732 | + <block wx:if="{{tool.is_no_dis(data.storageId,item.keyid)}}"> | |
733 | + <text class="no_store">(该店不可售)</text> | |
734 | + </block> | |
735 | + <text wx:elif="{{item.is_no_dis_act && !is_normal}}" class="no_store">(该店不可售1)</text> | |
736 | + | |
737 | + </view> | |
738 | + </view> | |
739 | + <view> | |
740 | + <view class="distance fs24 address-val" wx:if="{{item.distance!=null}}"> | |
741 | + 距离:{{item.distance>1000?filters.toFix(item.distance/1000,2)+'km':filters.toFix(item.distance,0)+"m"}}</view> | |
742 | + </view> | |
743 | + </view> | |
744 | + <view class="fs24 xc-ash-9f">地址:{{item.fulladdress}}</view> | |
745 | + </view> | |
746 | + </view> | |
747 | + </view> | |
748 | + </block> | |
749 | + <block wx:else> | |
750 | + <view class="store_choose flex" wx:for="{{only_pk}}" bindtap="choose_for_store_fir" data-ind="{{index}}"> | |
751 | + <view class="store flex-vertical"> | |
752 | + <!-- 需要点击事件 --> | |
753 | + <block wx:if="{{index==fir_pick_index}}"> | |
754 | + <view class="circle white xc-hook fs20 red-b">Г</view> | |
755 | + </block> | |
756 | + <block wx:else> | |
757 | + <view class="circle xc-hooks"></view> | |
758 | + </block> | |
759 | + | |
760 | + <view class="address-frame xc-ash"> | |
761 | + <view class="flex-vertical-between "> | |
762 | + <view class="flex xc-ash"> | |
763 | + <view class="fs30 xc-black3 address_name">{{item.pickup_name}} | |
764 | + <block wx:if="{{tool.is_no_dis(data.storageId,item.keyid)}}"> | |
765 | + <text class="no_store">(该店不可售)</text> | |
766 | + </block> | |
767 | + <text wx:elif="{{item.is_no_dis_act && !is_normal}}" class="no_store">(该店不可售)</text> | |
768 | + </view> | |
769 | + </view> | |
770 | + <view> | |
771 | + <view class="distance fs24 address-val" wx:if="{{item.distance!=null}}">距离:{{item.distance>1000?filters.toFix(item.distance/1000,2)+"km":filters.toFix(item.distance,0)+"m"}} | |
772 | + </view> | |
773 | + </view> | |
774 | + </view> | |
775 | + <view class="fs24 xc-ash-9f">地址:{{item.fulladdress}}</view> | |
776 | + </view> | |
777 | + </view> | |
778 | + </view> | |
779 | + </block> | |
780 | + </block> | |
781 | + <block wx:else> | |
782 | + <!-- 如果是点击选择门店分类后显示分类下的门店 --> | |
783 | + <view class="store_choose flex" wx:for="{{sec_sto.s_arr}}" data-ind="{{index}}" bindtap="choose_for_store"> | |
784 | + <view class="store flex-vertical"> | |
785 | + <!-- 需要点击事件 --> | |
786 | + <block wx:if="{{index==sec_pick_index}}"> | |
787 | + <view class="circle white xc-hook fs20 red-b">Г</view> | |
788 | + </block> | |
789 | + <block wx:else> | |
790 | + <view class="circle xc-hooks"></view> | |
791 | + </block> | |
792 | + | |
793 | + <view class="address-frame xc-ash"> | |
794 | + <view class="flex-vertical-between "> | |
795 | + <view class="flex xc-ash"> | |
796 | + <view class="fs28 xc-black3 address_name">{{item.pickup_name}} | |
797 | + <block wx:if="{{tool.is_no_dis(data.storageId,item.keyid)}}"> | |
798 | + <text class="no_store">(该店不可售)</text> | |
799 | + </block> | |
800 | + <text wx:elif="{{item.is_no_dis_act && !is_normal}}" class="no_store">(该店不可售)</text> | |
801 | + </view> | |
802 | + </view> | |
803 | + <view> | |
804 | + <view class="distance fs24 address-val" wx:if="{{item.distance!=null}}"> | |
805 | + 距离:{{item.distance>1000?filters.toFix(item.distance/1000,2)+"km":filters.toFix(item.distance,0)+"m"}}</view> | |
806 | + </view> | |
807 | + </view> | |
808 | + <view class="fs24 xc-ash-9f">地址:{{item.fulladdress}}</view> | |
809 | + </view> | |
810 | + </view> | |
811 | + </view> | |
812 | + </block> | |
813 | + | |
814 | + </view> | |
815 | + | |
816 | + <!-- 门店列表底部 --> | |
817 | + <view class="store-bottom-frame"> | |
818 | + <view class="store-bottom flex-vertical-between"> | |
819 | + <view class="determine red-b fs28 white t-c" bindtap="sure_pick" data-openindstore="{{open_ind_store}}">确定</view> | |
820 | + <view class="default t-c fs28" bindtap="set_def_pick" data-openindstore="{{open_ind_store}}">设为默认</view> | |
821 | + </view> | |
822 | + </view> | |
823 | + | |
824 | + </block> | |
825 | + | |
826 | + <block wx:else> | |
827 | + <view class="popup-top flex-space-between"> | |
828 | + <text class="fs32 nearby_store">门店分类选择</text> | |
829 | + <view> | |
830 | + <view> | |
831 | + <icon bindtap="close_popup" class="modal-closes" color="black" size="22" type="cancel"></icon> | |
832 | + </view> | |
833 | + <view class="felx choose_mores" bindtap="returns"> | |
834 | + <text class="fs26 red-co">返回</text> | |
835 | + </view> | |
836 | + </view> | |
837 | + </view> | |
838 | + <view class="sort_store_list"> | |
839 | + | |
840 | + <view class="sort-store-frame" wx:for="{{all_sto}}" data-index="{{index}}" bindtap="choice_sort_store" data-region="{{item.name}}"> | |
841 | + <view class="sort-store flex-vertical-between"> | |
842 | + <view class="fs30" di>{{item.name}}</view> | |
843 | + <view class="black_rights-frame"> | |
844 | + <view class="black_rights"></view> | |
845 | + </view> | |
846 | + </view> | |
847 | + </view> | |
848 | + | |
849 | + </view> | |
850 | + </block> | |
851 | + </view> | |
852 | +</block> | |
853 | +<!-- ---------------分享弹窗--------------- --> | |
854 | +<!--二维码显示页面--> | |
855 | +<canvas canvas-id='share' style='width:750rpx;height:1217rpx;background-color:white;' wx:if='{{!canvasHidden}}'></canvas> | |
856 | +<warn id="warn"></warn> | |
857 | + | |
858 | +<view wx:if="{{showPoster}}"> | |
859 | + <view class="mask" catchtap="closePoster"></view> | |
860 | + <view class="poster-container"> | |
861 | + <view class="poster-wrapper"> | |
862 | + <view class="poster" bindtap="previewPoster"> | |
863 | + <!-- <view class="poster" bindtap="previewImage"> --> | |
864 | + <image src="{{shareImgPath}}" class="poster-img" show-menu-by-longpress></image> | |
865 | + <view class="btn-close" catchtap="closePoster"> | |
866 | + <text class="iconfont icon-close"></text> | |
867 | + </view> | |
868 | + </view> | |
869 | + <view class="btn-container"> | |
870 | + <!-- <button class="btn-share" open-type="share" bindtap="">微信好友分享</button> --> | |
871 | + <button class="btn-share" bindtap="savePic">保存到相册</button> | |
872 | + </view> | |
873 | + </view> | |
874 | + </view> | |
875 | +</view> | |
876 | + | |
877 | +<!-- 弹起来,购买预热商品的普通购买 --> | |
878 | +<view hidden="{{!openSpecModal_flash_normal}}"> | |
879 | + <include src="buy_flash_normal.wxml" /> | |
880 | +</view> | |
881 | + | |
882 | + | |
883 | +<!-- 联系客服操作菜单 --> | |
884 | +<view class="action {{!hiddenCS ? 'active':''}}" hidden="{{hiddenCS}}"> | |
885 | + <view class="pd20 t-c pr"> | |
886 | + <text class="bold">联系客服</text> | |
887 | + <text class="iconfont icon-guan" bindtap="closeCS"></text> | |
888 | + </view> | |
889 | + <!-- 客服热线 --> | |
890 | + <view class="pd20 bdt fs30 btn2" bindtap="contactService" wx:if="{{store_tel}}"> | |
891 | + <text class="iconfont icon-dianhua"></text>客服热线: | |
892 | + <text class="c-red">{{store_tel}}</text> | |
893 | + </view> | |
894 | + <!-- 小程序客服 --> | |
895 | + <block wx:if="{{sys_switch.weapp_customertype == 1}}"> | |
896 | + <button class="pd20 bdt fs30 btn2" open-type="contact" session-from="wechat|{{userInfo.user_id}}|{{userInfo.nickname}}|{{userInfo.head_pic}}"> | |
897 | + <text class="iconfont icon-kefu1"></text>在线客服 | |
898 | + </button> | |
899 | + </block> | |
900 | + <!-- 微信客服 --> | |
901 | + <block wx:elif="{{sys_switch.weapp_customertype == 2}}"> | |
902 | + <view class="pd20 bdt fs30 btn2" bindtap="con_weixin"> | |
903 | + <text class="iconfont icon-kefu1"></text>在线客服 | |
904 | + </view> | |
905 | + </block> | |
906 | +</view> | |
907 | + | |
908 | +<view class="mask2" bindtap="closeCS"></view> | |
909 | +<!-- 分享控件,底部弹出 --> | |
910 | +<share id="share_button" bind:send="send" bind:cancel="cancel" bind:share_img="saveImageFn" wx:if="{{share_hidden}}"></share> | ... | ... |
packageG/pages/group_buy/goodsInfo/goodsInfo.wxss
0 → 100644
1 | +@import "../../../../utils/wxParse/wxParse.wxss"; | |
2 | +.container { margin-bottom: 100rpx; overflow: hidden;} | |
3 | +image { | |
4 | + vertical-align: top; | |
5 | +} | |
6 | +.goods-detail{ | |
7 | + /* overflow: hidden */ | |
8 | + padding-top: 78rpx; | |
9 | +} | |
10 | + | |
11 | +.type-navbar { | |
12 | + display: flex; | |
13 | + justify-content: center; | |
14 | + width: 100%; | |
15 | + position: fixed; | |
16 | + top: 0; | |
17 | + z-index: 999; | |
18 | + /* height: 80rpx; */ | |
19 | + /* margin-bottom: 20rpx; */ | |
20 | + background-color: #fff; | |
21 | + border-top: 2rpx solid #ebedf0; | |
22 | + /* border-bottom: 1rpx #fafafa solid; */ | |
23 | +} | |
24 | +.type-box { | |
25 | + width: 25%; | |
26 | + box-sizing: border-box; | |
27 | + font-size: 32rpx; | |
28 | + line-height: 76rpx; | |
29 | + padding: 0 20rpx; | |
30 | + text-align: center; | |
31 | + display: inline-block; | |
32 | + overflow: hidden; | |
33 | +} | |
34 | +.type-navbar-item { | |
35 | + /* border-bottom: 4rpx solid #fff; */ | |
36 | + display: flex; | |
37 | + justify-content: center; | |
38 | + width: 100%; | |
39 | + font-size: 26rpx; | |
40 | +} | |
41 | +.type-item-on { | |
42 | + color: #F95D74; | |
43 | + font-weight: bold; | |
44 | + /* border-bottom: 4rpx solid #F95D74; */ | |
45 | + position: relative; | |
46 | + font-size: 30rpx; | |
47 | +} | |
48 | +.type-item-on:after { | |
49 | + content: ''; | |
50 | + position: absolute; | |
51 | + width: 50%; | |
52 | + height: 4rpx; | |
53 | + background-color: #F95D74; | |
54 | + left: 0; | |
55 | + right: 0; | |
56 | + bottom: 0; | |
57 | + margin: 0 auto; | |
58 | +} | |
59 | +.swiper_box { | |
60 | + width: 100%; | |
61 | + height: 750rpx; | |
62 | + background-color: #f2f2f2; | |
63 | +} | |
64 | +.goods-title { | |
65 | + display: flex; | |
66 | + justify-content: space-between; | |
67 | + /* overflow: hidden; */ | |
68 | + /* height: 108rpx; */ | |
69 | +} | |
70 | +.goods-name { | |
71 | + /* width: 560rpx; */ | |
72 | + /* line-height: 46rpx; */ | |
73 | + font-size: 32rpx; | |
74 | + font-weight: bold; | |
75 | + color: #333; | |
76 | + /* margin-top: 30rpx; | |
77 | + margin-bottom:30rpx; */ | |
78 | + flex: 1; | |
79 | + text-align: justify; | |
80 | + margin: 10rpx 0 20rpx; | |
81 | +} | |
82 | + | |
83 | +.goods-collect { | |
84 | + width: 112rpx; | |
85 | + padding-top: 30rpx; | |
86 | +} | |
87 | + | |
88 | +.collect-img { | |
89 | + width: 50rpx; | |
90 | + height: 44rpx; | |
91 | + margin: 0 auto; | |
92 | + overflow: hidden; | |
93 | +} | |
94 | + | |
95 | +.collect-des { | |
96 | + text-align: center; | |
97 | + font-size: 24rpx; | |
98 | + color: #333; | |
99 | +} | |
100 | + | |
101 | +.goods-price { | |
102 | + font-size: 60rpx; | |
103 | + /* padding: 20rpx 34rpx; */ | |
104 | + /* padding:0rpx 34rpx; */ | |
105 | + /* line-height: 60rpx; */ | |
106 | + color: #999; | |
107 | + padding: 20rpx; | |
108 | + /* margin-top: 46rpx; */ | |
109 | + /* margin-top:26rpx; | |
110 | + padding-bottom:20rpx; */ | |
111 | +} | |
112 | + | |
113 | +.prom-info { | |
114 | + margin: 10rpx 0; | |
115 | + color: #f23030; | |
116 | +} | |
117 | + | |
118 | +.prom-info>.prom-type { | |
119 | + color: white; | |
120 | + background-color: #f23030; | |
121 | + margin-right: 14rpx; | |
122 | + padding: 2rpx 8rpx; | |
123 | + border-radius: 4rpx; | |
124 | +} | |
125 | +.market-price { | |
126 | + /* display: flex; | |
127 | + margin-left: -5rpx; */ | |
128 | +} | |
129 | + | |
130 | +.market-price .yuan{ | |
131 | + /* top:24rpx; */ | |
132 | + font-size: 30rpx | |
133 | +} | |
134 | + | |
135 | +.market-price>view>text { | |
136 | + text-decoration: line-through; | |
137 | +} | |
138 | + | |
139 | +.market-price>.yj{ | |
140 | + color: #999999; font-size: 24rpx;/* margin-left: 16rpx;position: relative;top:30rpx; */ | |
141 | + display: inline-block; | |
142 | +} | |
143 | + | |
144 | +.goods-price>.tm{ color: #999999; font-size: 26rpx;margin-top: 10rpx;} | |
145 | + | |
146 | +.goods-num { | |
147 | + display: flex; | |
148 | + font-size: 24rpx; | |
149 | + justify-content: space-between; | |
150 | + | |
151 | +} | |
152 | + | |
153 | +.goods-detail .twen{ | |
154 | + background: #fff;height: 60rpx; line-height: 60rpx; font-size: 30rpx;padding-left: 30rpx;display: flex; | |
155 | +} | |
156 | +.goods-detail .twen .img{ width: 32rpx; height: 32rpx; margin-left: 200rpx; background: #fff} | |
157 | +.goods-detail .twen image.img{vertical-align:auto;} | |
158 | + | |
159 | + | |
160 | +.logistics-item { | |
161 | + display: flex; | |
162 | + justify-content: space-between; | |
163 | + align-items: center; | |
164 | + height: 90rpx; | |
165 | + /*border-bottom: 1px solid #f5f5f5;*/ | |
166 | + font-size: 32rpx; | |
167 | + color: #666; | |
168 | +} | |
169 | +.logistics-item .small{color: #999; font-size: 24rpx;} | |
170 | + | |
171 | +.item-title { width: 180rpx;} | |
172 | +.item-mes { | |
173 | + color: #333; width: 420rpx; | |
174 | + height: 90rpx; line-height: 90rpx; | |
175 | +} | |
176 | +.item-img { width: 32rpx; height: 32rpx;} | |
177 | +.prom-item { | |
178 | + color: #f23030; | |
179 | + border: 1px solid #f23030; | |
180 | + border-radius: 18rpx; | |
181 | + line-height: 40rpx; | |
182 | + height: 40rpx; | |
183 | + padding: 2rpx 8rpx; | |
184 | +} | |
185 | + | |
186 | +.guarantee { | |
187 | + justify-content: space-around; | |
188 | +} | |
189 | + | |
190 | +.ico-item { | |
191 | + width: 32rpx; | |
192 | + height: 32rpx; | |
193 | + margin-right: 10rpx; | |
194 | +} | |
195 | + | |
196 | +.guarantee>view { | |
197 | + display: flex; | |
198 | + align-items: center; | |
199 | + height: 32rpx; | |
200 | + color: #666; | |
201 | +} | |
202 | + | |
203 | +.user-comment { | |
204 | + margin: 10rpx 0; | |
205 | + font-size: 28rpx; | |
206 | +} | |
207 | + | |
208 | +.good-comment,.comment-num { | |
209 | + display: flex; | |
210 | +} | |
211 | + | |
212 | +.recommend { | |
213 | + background-color: #fff; | |
214 | + border-bottom: 1px solid #ddd; | |
215 | + padding-bottom: 20rpx; | |
216 | +} | |
217 | + | |
218 | +.recommend-title { | |
219 | + height: 70rpx; | |
220 | + line-height: 70rpx; | |
221 | + font-size: 28rpx; | |
222 | + padding: 0 30rpx; | |
223 | +} | |
224 | + | |
225 | +.recommend-ul { | |
226 | + display: flex; | |
227 | + justify-content: flex-start; | |
228 | +} | |
229 | + | |
230 | +.recommend-ul .li { | |
231 | + width: 25%; | |
232 | + box-sizing: border-box; | |
233 | + text-align: center; | |
234 | + font-size: 28rpx; | |
235 | + color: #333; | |
236 | +} | |
237 | + | |
238 | +.li-img { | |
239 | + width: 120rpx; | |
240 | + height: 120rpx; | |
241 | + margin: 0 auto; | |
242 | +} | |
243 | + | |
244 | +.li-title { | |
245 | + height: 58rpx; | |
246 | + line-height: 30rpx; | |
247 | + margin: 10rpx 0; | |
248 | +} | |
249 | + | |
250 | +.comment-item { | |
251 | + background-color: #fff; | |
252 | + font-size: 28rpx; | |
253 | +} | |
254 | + | |
255 | +.comment-title { | |
256 | + display: flex; | |
257 | + justify-content: space-between; | |
258 | + align-items: center; | |
259 | + height: 102rpx; | |
260 | + margin: 0 30rpx; | |
261 | + color: #333; | |
262 | + border-bottom: 1px solid #eee; | |
263 | +} | |
264 | + | |
265 | +.user-name { | |
266 | + display: flex; | |
267 | + align-items: center; | |
268 | +} | |
269 | + | |
270 | +.user-pic { | |
271 | + width: 54rpx; | |
272 | + height: 54rpx; | |
273 | + margin-right: 10rpx; | |
274 | + border-radius: 50%; | |
275 | + overflow: hidden; | |
276 | +} | |
277 | + | |
278 | +.stars { | |
279 | + float: left; | |
280 | + display: flex; | |
281 | + height: 42rpx; | |
282 | + line-height: 42rpx; | |
283 | + margin: 15rpx 0; | |
284 | + width: 200rpx; | |
285 | +} | |
286 | + | |
287 | +.star { | |
288 | + width: 26rpx; | |
289 | + height: 26rpx; | |
290 | + margin-right: 5rpx; | |
291 | +} | |
292 | + | |
293 | +.state-spec { | |
294 | + margin: 15rpx 0; | |
295 | + float: right; | |
296 | + font-size: 24rpx; | |
297 | + color: #666; | |
298 | + width: 460rpx; | |
299 | + text-align: right; | |
300 | +} | |
301 | + | |
302 | +.comment-cont { | |
303 | + padding: 0 30rpx 30rpx; | |
304 | + border-bottom: 1px solid #eee; | |
305 | +} | |
306 | + | |
307 | +.comment-mes { | |
308 | + line-height: 42rpx; | |
309 | +} | |
310 | + | |
311 | +.img-ul { | |
312 | + display: flex; | |
313 | + flex-wrap: wrap; | |
314 | +} | |
315 | + | |
316 | +.img-li { | |
317 | + width: 150rpx; | |
318 | + height: 150rpx; | |
319 | + margin-top: 8rpx; | |
320 | + margin-right: 10rpx; | |
321 | +} | |
322 | + | |
323 | +.comment-btn { | |
324 | + height: 60rpx; | |
325 | + padding: 20rpx 30rpx; | |
326 | +} | |
327 | + | |
328 | +.comment-btn .btn { | |
329 | + display: flex; | |
330 | + justify-content: center; | |
331 | + align-items: center; | |
332 | + height: 60rpx; | |
333 | + width: 45%; | |
334 | + border: 1px solid #eee; | |
335 | +} | |
336 | + | |
337 | +.comment-btn .btn-img { | |
338 | + width: 30rpx; | |
339 | + height: 28rpx; | |
340 | + margin: 0 10rpx; | |
341 | +} | |
342 | + | |
343 | +.reply-ul { | |
344 | + margin-top: 20rpx; | |
345 | +} | |
346 | + | |
347 | +.reply-li { | |
348 | + color: #aaa; | |
349 | +} | |
350 | + | |
351 | +.join-cart { | |
352 | + position: fixed; | |
353 | + left: 0; | |
354 | + bottom: 0; | |
355 | + display: flex; | |
356 | + width: 100%; | |
357 | + height: 100rpx; | |
358 | + background-color: #fff; | |
359 | + z-index: 9; | |
360 | + border-top: 4rpx solid #eee; | |
361 | + | |
362 | +} | |
363 | + | |
364 | +.join-cart > view { | |
365 | + /* width: 29%; */ | |
366 | +} | |
367 | + | |
368 | +.join-cart .new_split { | |
369 | + /* width: 13%; */ | |
370 | + /* text-align: center; */ | |
371 | + /* padding: 20rpx; */ | |
372 | + /* box-sizing: border-box; */ | |
373 | + /* flex-shrink: 0; */ | |
374 | + /* padding: 0; | |
375 | + margin: 0; */ | |
376 | +} | |
377 | + | |
378 | +.cart-ico { | |
379 | + font-size: 24rpx; | |
380 | + color: #333; | |
381 | +} | |
382 | + | |
383 | +.shopping-cart { | |
384 | + position: relative; | |
385 | +} | |
386 | + | |
387 | +.cs-img { | |
388 | + width: 45rpx; | |
389 | + height: 40rpx; | |
390 | + /* margin-top: 15rpx; */ | |
391 | +} | |
392 | + | |
393 | +.sc-img { | |
394 | + width: 42rpx; | |
395 | + height: 40rpx; | |
396 | + /* margin-top: 15rpx; */ | |
397 | +} | |
398 | + | |
399 | +.cart-num { | |
400 | + position: absolute; | |
401 | + left: 50%; | |
402 | + top: 1rpx; | |
403 | + width: 40rpx; | |
404 | + height: 40rpx; | |
405 | + line-height: 40rpx; | |
406 | + text-align: center; | |
407 | + border-radius: 50%; | |
408 | + color: #fff; | |
409 | + background-color: rgba(217,81,99,0.9); | |
410 | +} | |
411 | + | |
412 | +.cart-btn { | |
413 | + font-size: 28rpx; | |
414 | + color: #fff; | |
415 | + line-height: 70rpx; | |
416 | + /* margin-top: 16rpx; */ | |
417 | + text-align: center; | |
418 | + | |
419 | + | |
420 | +} | |
421 | + | |
422 | +.join-btn { | |
423 | + background-color: #ffb03f; | |
424 | + height: 70rpx; | |
425 | +/* border-radius: 55rpx 0rpx 0rpx 55rpx; | |
426 | +margin-top: 16rpx; */ | |
427 | + | |
428 | + | |
429 | +} | |
430 | + | |
431 | +view.cart-btn-lg { | |
432 | + width: 50%; | |
433 | +} | |
434 | + | |
435 | +.buy-btn { | |
436 | + background-color: #f23030; | |
437 | + height: 70rpx; | |
438 | +/* border-radius: 0 56rpx 55rpx 0; */ | |
439 | + | |
440 | +} | |
441 | + | |
442 | +.buy-btn-all{ | |
443 | + background-color: #f23030; | |
444 | + height: 70rpx; | |
445 | + border-radius: 56rpx; | |
446 | +} | |
447 | + | |
448 | + | |
449 | +.toTop { | |
450 | + position: fixed; | |
451 | + z-index: 3; | |
452 | + right: 20rpx; | |
453 | + bottom: 160rpx; | |
454 | + width: 68rpx; | |
455 | + height: 68rpx; | |
456 | + border: 1px solid #ddd; | |
457 | + border-radius: 50%; | |
458 | + overflow: hidden; | |
459 | + cursor: pointer; | |
460 | +} | |
461 | + | |
462 | +.comment-more { | |
463 | + height: 56rpx; | |
464 | + line-height: 56rpx; | |
465 | + font-size: 26rpx; | |
466 | + color: #999; | |
467 | + text-align: center; | |
468 | + background-color: #eee; | |
469 | +} | |
470 | + | |
471 | +.goods-more { | |
472 | + background-color: #fff; | |
473 | +} | |
474 | + | |
475 | +.goods-norms { | |
476 | + background-color: #fff; | |
477 | +} | |
478 | + | |
479 | +.type-navbar2 { | |
480 | + display: flex; | |
481 | + height: 72rpx; | |
482 | + border-top: 1px solid #ddd; | |
483 | + border-bottom: 1px solid #ddd; | |
484 | +} | |
485 | + | |
486 | +.type-box2 { | |
487 | + width: 50%; | |
488 | + font-size: 26rpx; | |
489 | + line-height: 72rpx; | |
490 | + text-align: center; | |
491 | + overflow: hidden; | |
492 | +} | |
493 | + | |
494 | +.type-item2-on { | |
495 | + color: #f23030; | |
496 | +} | |
497 | + | |
498 | +.parameter { | |
499 | + padding: 40rpx 0; | |
500 | +} | |
501 | + | |
502 | +.table { | |
503 | + width: 698rpx; | |
504 | + margin: 0 auto; | |
505 | + border: 1px solid #ddd; | |
506 | + border-bottom: none; | |
507 | +} | |
508 | + | |
509 | +.tb { | |
510 | + width: 100%; | |
511 | + min-height: 69rpx; | |
512 | + line-height: 69rpx; | |
513 | + border-bottom: 1px solid #ddd; | |
514 | + font-size: 28rpx; | |
515 | + text-align: center; | |
516 | + color: #333; | |
517 | +} | |
518 | + | |
519 | +.th-thitle { | |
520 | + font-weight: bold; | |
521 | + background-color: #f5fafe; | |
522 | +} | |
523 | + | |
524 | +.td-cont { | |
525 | + display: flex; | |
526 | +} | |
527 | + | |
528 | +.td-title { | |
529 | + width: 259rpx; | |
530 | + background-color: #f5fafe; | |
531 | + border-right: 1px solid #ddd; | |
532 | +} | |
533 | + | |
534 | +.td-text { | |
535 | + width: 439rpx; | |
536 | +} | |
537 | + | |
538 | +.goods-comment { | |
539 | + background-color: #fff; | |
540 | +} | |
541 | + | |
542 | +.type-navbar3 { | |
543 | + display: flex; | |
544 | + height: 88rpx; | |
545 | + border-top: 1px solid #ddd; | |
546 | + border-bottom: 1px solid #ddd; | |
547 | + padding: 10rpx 0; | |
548 | +} | |
549 | + | |
550 | +.type-box3 { | |
551 | + width: 20%; | |
552 | + font-size: 30rpx; | |
553 | + line-height: 44rpx; | |
554 | + text-align: center; | |
555 | + overflow: hidden; | |
556 | +} | |
557 | + | |
558 | +.type-item3-on { | |
559 | + color: #f23030; | |
560 | +} | |
561 | + | |
562 | +.spec-model { | |
563 | + position: fixed; | |
564 | + bottom: 0; | |
565 | + z-index: 19; | |
566 | + background: white; | |
567 | + width: 100%; | |
568 | + /* padding: 0 30rpx; */ | |
569 | + font-size: 32rpx; | |
570 | + box-sizing: border-box; | |
571 | + border-radius: 20rpx 20rpx 0 0; | |
572 | + /* height: 72%; */ | |
573 | +} | |
574 | + | |
575 | +.spec-model .pding{padding: 0 20rpx;} | |
576 | + | |
577 | +.spec-goods { | |
578 | + padding: 30rpx 0 20rpx; | |
579 | + /* float: left; */ | |
580 | + width: 100%; | |
581 | + /* border-bottom:2rpx solid #eee; */ | |
582 | +} | |
583 | + | |
584 | +.spec-img { | |
585 | + float: left; | |
586 | + height: 186rpx; | |
587 | + width: 186rpx; | |
588 | + border: 4rpx solid #eee | |
589 | +} | |
590 | + | |
591 | +.spec-goods-info { | |
592 | + float: left; | |
593 | + padding: 0 25rpx; | |
594 | + width: 400rpx; | |
595 | +} | |
596 | + | |
597 | +.spec-goods-name { | |
598 | + font-size: 30rpx; | |
599 | + line-height: 35rpx; | |
600 | + height: 70rpx; | |
601 | + margin: 15rpx 20rpx 25rpx 0; | |
602 | + overflow: hidden; | |
603 | + text-overflow: ellipsis;color: #333; | |
604 | +} | |
605 | + | |
606 | +.spec-goods-price { | |
607 | + color: #d60021; | |
608 | + font-size: 33rpx; | |
609 | + font-weight: bold; | |
610 | +} | |
611 | + | |
612 | +.spec-goods-stock { | |
613 | + margin-top: 3rpx; | |
614 | + font-size: 24rpx; | |
615 | + color: #999999; | |
616 | + margin-right: 15rpx; | |
617 | +} | |
618 | + | |
619 | +.spec-name { | |
620 | + clear: both; | |
621 | + padding: 20rpx 0; | |
622 | + font-size: 30rpx;color: #333; | |
623 | +} | |
624 | + | |
625 | +.quhuo{font-size: 30rpx; color: #000} | |
626 | +.b_num{ | |
627 | + display: flex;font-size: 30rpx; color: #333; | |
628 | + justify-content: space-between; | |
629 | + align-items: center; | |
630 | + padding: 20rpx; | |
631 | +} | |
632 | + | |
633 | +.count { | |
634 | + /* position: fixed; */ | |
635 | + display: flex; | |
636 | + height: 50rpx; | |
637 | + /* border: 1rpx solid #000; */ | |
638 | + font-size: 28rpx; | |
639 | + right: 30rpx; | |
640 | +} | |
641 | + | |
642 | + | |
643 | +.count>view,.count>input { | |
644 | + width: 60rpx; | |
645 | + height: 50rpx; | |
646 | + line-height: 50rpx; | |
647 | + text-align: center; | |
648 | +} | |
649 | +.spec_bt{ | |
650 | + background: fff;color: #333; margin-left: 10rpx;padding: 4rpx 15rpx 4rpx; display: inline-block; | |
651 | + border-radius:30rpx;font-size: 24rpx;border: 1rpx solid #ccc; margin: 10rpx; height: 40rpx; line-height: 40rpx; | |
652 | +} | |
653 | +.spec_bt.act{background: #d60021;color: #fff;border: 1rpx solid #d60021;} | |
654 | +.sub { | |
655 | + /* border-right: 1px solid #000; */ | |
656 | +} | |
657 | +.sub.active { | |
658 | + /* background-color: #ddd; */ | |
659 | + color: #ccc; | |
660 | +} | |
661 | + | |
662 | +.sub, .add, .count>input { | |
663 | + /* border-right: 1px solid #000; */ | |
664 | + background-color: #f8f8f8; | |
665 | + border-radius: 8rpx; | |
666 | +} | |
667 | +.sub.active { | |
668 | + /* background-color: #ddd; */ | |
669 | + color: #ccc; | |
670 | +} | |
671 | +.count>input { | |
672 | + margin: 0 10rpx; | |
673 | + line-height: normal; | |
674 | +} | |
675 | + | |
676 | +.add { | |
677 | + /* border-left: 1px solid #000; */ | |
678 | +} | |
679 | + | |
680 | +.spec-btn { | |
681 | + color: black; | |
682 | + background-color: white; | |
683 | + padding: 10rpx 10rpx; | |
684 | + font-size: 26rpx; | |
685 | + line-height: 28rpx; | |
686 | + float: left; | |
687 | + border: 1rpx solid #dedede; | |
688 | + margin: 4rpx 10rpx 4rpx 0; | |
689 | + border-radius: 4rpx; | |
690 | +} | |
691 | + | |
692 | +.spec-btn-click { | |
693 | + color: white; | |
694 | + background-color: #f23030; | |
695 | + border: 1rpx solid #f23030; | |
696 | +} | |
697 | + | |
698 | +.spec-cart-btns { | |
699 | + /* width: 92%; */ | |
700 | + line-height: 70rpx; | |
701 | + /* margin: 0rpx auto; | |
702 | + margin-top: 160rpx; */ | |
703 | + /* border-radius: 20rpx; */ | |
704 | +/* position: fixed; */ | |
705 | +/* bottom: 50rpx; */ | |
706 | +/* left: 4%; */ | |
707 | + padding: 20rpx; | |
708 | +} | |
709 | + | |
710 | +.spec-cart-btn { | |
711 | + | |
712 | + width:100%; | |
713 | + font-size: 30rpx; | |
714 | + text-align: center; | |
715 | + color: white; | |
716 | + border-radius: 40rpx; | |
717 | +} | |
718 | + | |
719 | +.spec-cart-btn.w40 { | |
720 | + width: 46%; | |
721 | +} | |
722 | + | |
723 | +.spec-add-cart { | |
724 | + background-color: #ffb03f; | |
725 | +} | |
726 | + | |
727 | +.spec-buy { | |
728 | + background-color: #f23030; | |
729 | + /* margin-left: 34rpx; */ | |
730 | +} | |
731 | + | |
732 | +.spec-cart-disable { | |
733 | + background: #bbbbbb; | |
734 | +} | |
735 | + | |
736 | +.spec-cart-btn-lg { | |
737 | + width: 614rpx; | |
738 | +} | |
739 | + | |
740 | +.prom-model { | |
741 | + position: fixed; | |
742 | + bottom: 0; | |
743 | + z-index: 20; | |
744 | + background: white; | |
745 | + width: 100%; | |
746 | + padding: 0 30rpx 30rpx; | |
747 | + font-size: 32rpx; | |
748 | + box-sizing: border-box; | |
749 | + overflow-x: hidden; | |
750 | +} | |
751 | + | |
752 | +.prom-model .prom-title {text-align: center;margin: 30rpx 0;} | |
753 | +.prom-model .logistics-item {border: 0;} | |
754 | +.prom-model .item-mes {width: 500rpx;} | |
755 | +.integral-btn {width: 100%; padding: 0rpx;margin: 0rpx;} | |
756 | +.clear{clear: both;} | |
757 | +.sto_v .title,.sto_v .stitle{ border-top: 1rpx solid #dedede;border-bottom: 1rpx solid #dedede; height: 78rpx; line-height: 78rpx;} | |
758 | +.sto_v .title .tubiao,.sto_v .stitle .tubiao{width: 32rpx; height: 32rpx; margin-top: 23rpx;} | |
759 | +.itemlists .item{border-bottom: 1rpx solid #dedede; height: 72rpx; line-height: 72rpx;font-size: 28rpx; margin: 0 10rpx;} | |
760 | + | |
761 | +.cshu{margin-bottom: 30rpx; margin-top: 20rpx;} | |
762 | +.cshu view{color: #999; font-size: 30rpx; margin-left: 26rpx;} | |
763 | + | |
764 | + | |
765 | +/*---活动特殊显示---*/ | |
766 | +.prom_show{height: 120rpx; display: flex;} | |
767 | +.prom_show .secondkill-img{width: 100%; height: 100%;} | |
768 | +.prom_show .spike-img{width: 283rpx; height: 57rpx; top:35rpx; | |
769 | +left:31rpx;} | |
770 | +.prom_show .stop{ color:#d81731;top: 17rpx;right:65rpx; font-weight:600;} | |
771 | +.prom_show .start{ color:#009ae2;top: 17rpx;right:65rpx; font-weight:600;} | |
772 | +.prom_show .timeac { font-size: 32rpx; height: 120rpx; color: #333; } | |
773 | +.prom_show .timeac.left{width: 66%; color: #fff;background:#f23030;} | |
774 | +.prom_show .timeac.right{width: 34%;background-color: #d7d7d7; text-align: center} | |
775 | + | |
776 | +.prom_show .secview .day{padding-right:10rpx;} | |
777 | +.prom_show .secview .time-val{width:36rpx;height:36rpx;border-radius:7rpx; line-height: 36rpx;} | |
778 | +.prom_show .secview .time{margin-right:10rpx; margin-left:10rpx;} | |
779 | + | |
780 | + | |
781 | +.prom_show .timeac.left view{ margin-left: 20rpx} | |
782 | +.prom_show .timeac.left view.firview{margin-top: 10rpx} | |
783 | +.prom_show .timeac.left view .tr_line{ text-decoration: line-through; font-size: 28rpx;} | |
784 | +.prom_show .timeac.left view .bprice{ font-size: 50rpx; } | |
785 | + | |
786 | +.prom_show .timeac.right view.firview{margin-top:12rpx; margin-bottom: 10rpx} | |
787 | +.prom_show .timeac.right view.secview{display: flex; text-align: center; justify-content:center; flex-direction: row;} | |
788 | +.prom_show .timeac.right view .tui-conutdown-box{ | |
789 | + /* background: #6b6b6b; */ | |
790 | + width: auto; | |
791 | + /* min-width: 45rpx; */ | |
792 | + height: 45rpx; color: #c4182e; font-size: 27rpx; text-align: center; line-height: 46rpx;} | |
793 | + | |
794 | +.huise{ background:gray} | |
795 | +.lanse{background:#0199e2} | |
796 | + | |
797 | + | |
798 | +/*------拼单------*/ | |
799 | +.pt_view{ text-align: center; width: 100%; height: 100rpx; line-height: 100rpx; font-size: 26rpx} | |
800 | +.pt_view .secondkill-img{width: 100%;height: 100%;} | |
801 | +.pt_fir{ background: #fff;/* margin-bottom: 10rpx; */} | |
802 | +.pt_fir .pt_fir_title{display: flex; align-items: center; /* margin-left: 10rpx; margin-top: 20rpx; */ font-size: 28rpx; position: relative;} | |
803 | +.pt_fir .pt_fir_title .kt_type{ color: #fff;background:#e9030d; width: 100rpx; line-height: 40rpx; border-radius: 6rpx; margin: 0 10rpx; | |
804 | + height: 40rpx; font-size: 24rpx; text-align: center;} | |
805 | +.pt_fir .pt_fir_title .price{color: #e9030d;font-size: 26rpx;} | |
806 | +.pt_fir .pt_fir_title .bigw{font-size: 36rpx;} | |
807 | +.pt_fir .pt_fir_title .tprice{text-decoration: line-through;color: #949494} | |
808 | +.pt_fir .pt_fir_title .tprice.ml50{margin-left: 50rpx} | |
809 | + | |
810 | +.pt_fir .pt_fir_title .js{padding: 0 15rpx;height: 40rpx;background:#e9030d; text-align: center; border-radius: 8rpx; color: #fff; margin-left: 10rpx;} | |
811 | +.pt_fir .pt_fir_title .tuannum{color: #e9030d; position: absolute; right: 20rpx; font-size: 26rpx;} | |
812 | +.pding{padding-top: 20rpx;padding-left: 20rpx;height: 81%; | |
813 | + padding-right: 20rpx;font-size: 26rpx;color: #ea120f} | |
814 | +.pdres{margin-left: 10rpx;color: #8f8f94} | |
815 | +.ptgz{position: relative;font-size: 30rpx;padding-left: 20rpx;margin-top: 10rpx; overflow: hidden } | |
816 | +.shuxian{width: 6rpx;height: 28rpx; background: #ea120f; display: inline-block;top: 5rpx;position: relative; margin-right: 5rpx} | |
817 | +.ptgz_an{position: absolute;top:5rpx; right: 6rpx} | |
818 | +.ptgz_an .arrow-two{width:18rpx;height:18rpx;border-color:#da0b31; margin-top:30rpx;} | |
819 | + | |
820 | +.pt_fir.se{height: auto; margin-bottom: 10rpx} | |
821 | +.t_gz{padding: 10rpx 20rpx; font-size:28rpx } | |
822 | + | |
823 | +.pt_fir.se1{height: auto; margin: 0} | |
824 | +.pt_fir.se2{height: auto; margin: 0;/* border-top:6rpx solid #eeeeee;border-bottom:2rpx solid #eeeeee; */} | |
825 | + | |
826 | +.pt_hb{height:78rpx; line-height: 75rpx; position: relative; font-size: 32rpx;overflow: hidden;width:695rpx;margin-left:28rpx; | |
827 | + border-bottom: 1rpx solid #E5E5E5 } | |
828 | +.ptgz_an.xq{font-size: 32rpx; color:#d40024} | |
829 | +.wf{display: flex; padding: 20rpx 0;} | |
830 | +.wf .item{width: 24.5%; text-align: center; font-size: 26rpx; color: #666} | |
831 | +.wf .item .item_txy{position: relative;width: 60rpx; height: 60rpx; background: #ea120f; border-radius: 50%;left: 50%;margin-left: -30rpx; | |
832 | + border: 3px #dfdfdf solid; text-align: center;line-height: 60rpx; color: #fff; margin-bottom: 10rpx;} | |
833 | +.wf .item .item_txy.hs{ background: #cbcbcb;} | |
834 | +.po{margin-bottom: 20rpx;} | |
835 | + | |
836 | +.cart-btn.line-h{ line-height: 26rpx;} | |
837 | +.cart-btn .fir-v{ margin-top: 10rpx;} | |
838 | + | |
839 | +.hyt{ padding: 0 20rpx; font-size: 30rpx; display: flex; align-items:center; margin-top: 10rpx;} | |
840 | +.hyt .r_f{color: #e9120f;font-size: 26rpx;position: relative;top:3rpx} | |
841 | +.hyt .byj{color: #e9120f;font-size: 32rpx;position: relative;top:5rpx} | |
842 | + | |
843 | +.pt_fir .pt_fir_title.no-mar-b{margin-bottom: 0;padding-bottom: 10rpx; margin-left: 20rpx} | |
844 | +.pt_fir .pt_fir_title.boder-1{border-bottom: 1rpx #e7e7e7 solid} | |
845 | + | |
846 | +.jie_price{/* padding: 10rpx 30rpx; */} | |
847 | +.jie_price_title{font-size: 30rpx; color: #a26270; margin-bottom: 10rpx} | |
848 | +.price_list{display: flex; width: 100%;} | |
849 | +.price_item{width: 25%;font-size: 28rpx; color: #4c336c} | |
850 | + | |
851 | +.pt_fir.se2 .zzk-1{/* margin-top: 23rpx; */ font-size: 30rpx;position: relative; /* margin-bottom: 30rpx; */ border-left:4rpx solid red;/* margin-left:14rpx; */height:30rpx;line-height:30rpx;/* padding-left:5rpx; */} | |
852 | +.ckgd{/* position: absolute;top:0;right:57rpx; */ color:#d70025; font-size: 26rpx;} | |
853 | +.ckgd .arrow-one{width:14rpx;height:14rpx;border-color:#da0b31;/* margin-top:5rpx; */ margin:auto;} | |
854 | +.bview{ | |
855 | + position: fixed; top:0; left:0; width: 100%; height: 100%; | |
856 | + background-color: rgba(0, 0, 0, 0.5); | |
857 | +} | |
858 | +.juzhong{ | |
859 | + position: fixed; top:0; left:0; width: 100%; height: 100%; | |
860 | + display: flex; | |
861 | + flex-direction:row; | |
862 | + justify-content: center; | |
863 | + align-items: center; | |
864 | +} | |
865 | + | |
866 | +.juzhong .xq{ padding: 0 20rpx; background: #fff; font-size: 30rpx; padding-bottom: 20rpx;} | |
867 | +.juzhong .xq .title{text-align: center; margin: 20rpx 0; position: relative; height: 50rpx;} | |
868 | +.juzhong .xq .hs1{font-size: 28rpx; color: #ab8f9e} | |
869 | +.juzhong .xq .title .close{position: absolute;top: 0; right: 0; width: 45rpx; height: 45rpx;} | |
870 | + | |
871 | +.pt_qd{margin-top: 40rpx; height: auto;} | |
872 | +.spec-cart-btn.w100{width: 95%; margin-left: 0; height: 75rpx; line-height:75rpx;margin: auto; } | |
873 | + | |
874 | +.sto_v{color: #333;} | |
875 | +.ellipsis{overflow: hidden; white-space: nowrap; text-overflow: ellipsis;} | |
876 | + | |
877 | + | |
878 | +/*---多少人参加团--*/ | |
879 | +.group { | |
880 | + padding-top:20rpx; | |
881 | + padding-bottom:20rpx; | |
882 | + width: 100%; | |
883 | + /* min-height: 92rpx; */ | |
884 | + border-bottom: 2rpx solid #ebedf0; | |
885 | + | |
886 | +} | |
887 | + | |
888 | +.group .group-list { | |
889 | + display: flex; | |
890 | + align-items: center; | |
891 | + justify-content: space-around; | |
892 | + /* height: 90rpx; */ | |
893 | + /* padding: 0 130rpx 0 100rpx; */ | |
894 | + /* width: 470rpx; | |
895 | + | |
896 | + position: absolute; */ | |
897 | +} | |
898 | + | |
899 | +.group .group-list .gtou { | |
900 | + width: 70rpx; | |
901 | + height: 70rpx; | |
902 | + /* float: left; | |
903 | + position: relative; | |
904 | + top: 6rpx; | |
905 | + left: -96rpx; */ | |
906 | +} | |
907 | + | |
908 | +.group .group-list .gtou image { | |
909 | + display: block; | |
910 | + width: 100%; | |
911 | + height: 100%; | |
912 | + border-radius: 50%; | |
913 | + background-color: #f0f0f0; | |
914 | +} | |
915 | + | |
916 | +.group .group-list .gdn { | |
917 | + width: 140rpx; | |
918 | + text-align: center; | |
919 | + /* float: left; */ | |
920 | + font-size: 26rpx; | |
921 | + /* padding-left: 20rpx; */ | |
922 | + /* line-height: 48rpx; | |
923 | + height: 48rpx; | |
924 | + width: 168rpx; | |
925 | + position: relative; | |
926 | + left: -80rpx; | |
927 | + top:20rpx; */ | |
928 | + font-weight:bold; | |
929 | +} | |
930 | + | |
931 | +.group .group-list .ghaicha { | |
932 | + /* width:300rpx; */ | |
933 | + font-size: 27rpx; | |
934 | + /* margin-left:180rpx; | |
935 | + top:13rpx; | |
936 | + left:-3rpx; */ | |
937 | + font-weight: bold; | |
938 | + | |
939 | + | |
940 | +} | |
941 | + | |
942 | +.group .group-list .ghaicha .gred { | |
943 | + /* height: 48rpx; | |
944 | + width: 300rpx; */ | |
945 | +} | |
946 | + | |
947 | +.gsj { | |
948 | + float: left; | |
949 | + color: #8f8f94; | |
950 | +} | |
951 | + | |
952 | +.group .group-list .cjt { | |
953 | + height:42rpx; | |
954 | + width: 137rpx; | |
955 | + /* position: absolute; | |
956 | + right: 4rpx; | |
957 | + top:25rpx; */ | |
958 | + line-height: 42rpx; | |
959 | + font-size: 24rpx; | |
960 | + color: #fff; | |
961 | + border:2rpx solid #d60024; | |
962 | + background-color:#d60024; | |
963 | + border-radius:25rpx; | |
964 | + | |
965 | +} | |
966 | + | |
967 | +.gbody { | |
968 | + background-color: white; | |
969 | +} | |
970 | +.t_show{/* overflow: hidden; */ display: flex; /* width: 300rpx; */ color: #292929; /* line-height: 36rpx; */font-size:26rpx; | |
971 | +} | |
972 | +.join-cart>view.set_width { | |
973 | + width:58%; | |
974 | +} | |
975 | + | |
976 | +/*秒杀样式zwp*/ | |
977 | +#zwpMs{ | |
978 | + width: 31%; | |
979 | + color: #fff; | |
980 | + background: url(https://mshopimg.yolipai.net/miniapp/images/user/bgred.png) no-repeat; | |
981 | + background-size: 100% 60px; | |
982 | +} | |
983 | + | |
984 | + | |
985 | +/*--------- 修改后的样式 -----------*/ | |
986 | +.elli{ | |
987 | + overflow : hidden; | |
988 | + text-overflow: ellipsis; | |
989 | + display: -webkit-box; | |
990 | + -webkit-line-clamp: 2; | |
991 | + -webkit-box-orient: vertical; | |
992 | +} | |
993 | +.one_elli{ | |
994 | + overflow : hidden; | |
995 | + text-overflow: ellipsis; | |
996 | + white-space:nowrap; | |
997 | +} | |
998 | + | |
999 | +.tuwen_title{ /* height: 86rpx; */ background-color:#eeeeee; /* margin-bottom: 32rpx; */ position: relative; | |
1000 | + display: flex; justify-content: center;align-items: center; padding: 20rpx;} | |
1001 | + | |
1002 | +.tuwen_title .g_line{ | |
1003 | + width:496rpx; | |
1004 | + height:1rpx; | |
1005 | + border-bottom:#ababab 1rpx solid; | |
1006 | +} | |
1007 | +.tuwen_title .center_s{ | |
1008 | + width: 124rpx; position: absolute; height: 34rpx; background-color:#eeeeee; font-size: 32rpx; display: flex; | |
1009 | + overflow: hidden; justify-content: center;align-items: center; | |
1010 | +} | |
1011 | +.tuwen_title .center_s image{ width: 34rpx; height: 26rpx; margin-right: 10rpx} | |
1012 | +.t_g_info{ /* margin: 0 34rpx;margin-bottom: 20rpx; */ display: flex; align-items: center;padding: 20rpx; } | |
1013 | +.red_shu{ width: 10rpx; height: 36rpx; background-color:#da0035; margin-right: 8rpx; } | |
1014 | + | |
1015 | +.tb-l{ /* line-height: 96rpx; */} | |
1016 | +.table_s{ border:#e4e4e4 1rpx solid; box-sizing: border-box;font-size: 26rpx;border-right: none;} | |
1017 | +.tb_item{display: flex; /* height: 96rpx; */ border-bottom: 1rpx solid #e4e4e4 } | |
1018 | +.item_left{width: 210rpx; height: 100%; box-sizing:border-box; text-align: center;padding: 20rpx; background: #f9f9f9 ;border-right:2rpx solid #e4e4e4} .item_left text{ /* margin-left: 44rpx; */} | |
1019 | +.item_right{flex:1; height: 100%; overflow : hidden;white-space:nowrap;text-overflow: ellipsis; padding: 20rpx;border-right:2rpx solid #e4e4e4;text-align: center;} | |
1020 | +.item_right text{ /* margin-left: 66rpx; */} | |
1021 | + | |
1022 | +.table_s .tb-l:last-child {border-bottom: none;} | |
1023 | + | |
1024 | +.bzfu_img{ width: 164rpx; height:34rpx; /* margin-right: 18rpx; margin-left: 12rpx */ } | |
1025 | + .bz_view{ /* height:100rpx; padding: 0 34rpx 0 13rpx; */ color: #333; font-size: 28rpx; padding: 20rpx 20rpx 20rpx 10rpx; | |
1026 | + /* border-bottom: 3rpx solid #eee; */ | |
1027 | + /* border-top: 3rpx solid #eee; */} | |
1028 | + .bz_view view{ width: 520rpx; /* max-height: 70rpx; */ /* overflow: hidden; */} | |
1029 | + | |
1030 | +.bb_view{ display: flex;align-items: center;justify-content: space-between; padding: 20rpx; color: #333; | |
1031 | + font-size: 30rpx; /* height: 104rpx; line-height: 104rpx; overflow: hidden; padding-right:26rpx */ } | |
1032 | +.red_bb{ color: #d70026; /* min-width:158rpx;width: auto; */} | |
1033 | + | |
1034 | +.bg_jj { | |
1035 | + width: 14rpx; | |
1036 | + height: 14rpx; | |
1037 | + border-top: 2rpx solid #d70026; | |
1038 | + border-right: 2rpx solid #d70026; | |
1039 | + transform: rotateZ(45deg); | |
1040 | + display: inline-block; | |
1041 | + margin-bottom: 3rpx; | |
1042 | +} | |
1043 | + | |
1044 | +.bg_jj.down { | |
1045 | + transform: rotateZ(135deg); | |
1046 | +} | |
1047 | + | |
1048 | +.bg_jj.up { | |
1049 | + transform: rotateZ(-45deg); | |
1050 | + margin-top: 6rpx; | |
1051 | +} | |
1052 | + | |
1053 | +.bz-content { | |
1054 | + padding: 0 0 0 20rpx; | |
1055 | +} | |
1056 | + | |
1057 | + | |
1058 | + | |
1059 | +/* 顶部边框 */ | |
1060 | +.topframe{ | |
1061 | + width: 100%; | |
1062 | + height: 172rpx; | |
1063 | + flex-direction: row; | |
1064 | + justify-content: space-between; | |
1065 | + border-bottom: 6rpx solid #eeeeee; | |
1066 | + overflow: hidden; | |
1067 | +} | |
1068 | +/* 评价人边框*/ | |
1069 | +.topframe .topframe-top{ | |
1070 | + display: flex; | |
1071 | + margin-top: 40rpx; | |
1072 | + margin-bottom: 36rpx; | |
1073 | + color: #7d7d7d; | |
1074 | + padding-left: 20rpx; | |
1075 | + font-size: 32rpx; | |
1076 | +} | |
1077 | +/*评价人数量*/ | |
1078 | +.topframe .topframe-top .topframe-top-val{ | |
1079 | + margin-left: 15rpx; | |
1080 | + | |
1081 | +} | |
1082 | +.topframe-top-content{ | |
1083 | + display: flex; | |
1084 | + width: 36%; | |
1085 | +} | |
1086 | +/* 好评 */ | |
1087 | +.topframe-praise{ | |
1088 | + width: 61%; | |
1089 | + text-align: right; | |
1090 | + color: #dc4355; | |
1091 | + font-size: 28rpx; | |
1092 | +} | |
1093 | +/* 按钮列表 */ | |
1094 | +.buttem-list{ | |
1095 | + width: 100%; | |
1096 | + display: flex; | |
1097 | + font-size: 20rpx; | |
1098 | + overflow: hidden; | |
1099 | +} | |
1100 | + | |
1101 | +.buttem-list .item{ | |
1102 | + min-width: 17%; | |
1103 | + font-size: 24rpx; | |
1104 | + border-radius: 20rpx; | |
1105 | + background:#ffe3e2; | |
1106 | + height:38rpx; | |
1107 | + text-align: center; | |
1108 | + line-height: 38rpx; | |
1109 | + margin-left: 20rpx; | |
1110 | +} | |
1111 | + | |
1112 | +.buttem-list .item.red{ | |
1113 | + color: #fff; | |
1114 | + background: #d60022; | |
1115 | +} | |
1116 | + | |
1117 | +/* 用户评价 */ | |
1118 | +.middle{ | |
1119 | + width: 95%; | |
1120 | + margin:0 auto; | |
1121 | +} | |
1122 | +.middle-img-frame{ | |
1123 | + height:65rpx; | |
1124 | + display: flex; | |
1125 | + margin-top: 32rpx; | |
1126 | + | |
1127 | +} | |
1128 | +/* 评价的用户图片 */ | |
1129 | +.middle-img{ | |
1130 | + width:60rpx; | |
1131 | + height:60rpx; | |
1132 | + border-radius: 50%; | |
1133 | + -moz-border-radius: 50%; | |
1134 | + -webkit-border-radius: 50%; | |
1135 | + margin-right: 15rpx; | |
1136 | +} | |
1137 | +/* 评价的用户边框 */ | |
1138 | +.middle-user-frame{ | |
1139 | + height: 72rpx; | |
1140 | + overflow: hidden; | |
1141 | +} | |
1142 | +.middle-user{ | |
1143 | + height: 25; | |
1144 | + font-size: 28rpx; | |
1145 | +} | |
1146 | +/* 评价图片 */ | |
1147 | +.middle-img-two{ | |
1148 | + width: 115rpx; | |
1149 | + height: 25rpx; | |
1150 | + text-align: center; | |
1151 | + margin-bottom:20rpx; | |
1152 | + margin-left:5rpx; | |
1153 | +} | |
1154 | +.xc-pirces{ | |
1155 | + margin-top: 14rpx; | |
1156 | +} | |
1157 | +/* 评价文字 */ | |
1158 | +.middle-font{ | |
1159 | + font-size: 30rpx; | |
1160 | + | |
1161 | +} | |
1162 | +.iddle-goods-img{ | |
1163 | + width: 100%; | |
1164 | + display: flex; | |
1165 | + margin-top:22rpx; | |
1166 | +} | |
1167 | +/* 商品图片 */ | |
1168 | +.goods-img{ | |
1169 | + width: 156rpx; | |
1170 | + height: 156rpx; | |
1171 | + margin-left: 22rpx; | |
1172 | + height: 100%; | |
1173 | +} | |
1174 | +.parameter-frame{ | |
1175 | + margin-top:14rxp; | |
1176 | + margin-bottom: 14rpx; | |
1177 | + width:50%; | |
1178 | + height: 30rpx; | |
1179 | +} | |
1180 | +.z_parameter{ | |
1181 | + width:98%; | |
1182 | + height: 45rpx; | |
1183 | + display:flex; | |
1184 | + line-height: 45rpx; | |
1185 | + margin-top: 20rpx; | |
1186 | + margin-bottom: 14rpx; | |
1187 | + justify-content : space-between; | |
1188 | +} | |
1189 | +.parameter-font{ | |
1190 | + font-size: 26rpx; | |
1191 | + | |
1192 | +} | |
1193 | +/* 规格 */ | |
1194 | +.parameter-state{ | |
1195 | + width: 100rpx; | |
1196 | + font-size: 24rpx; | |
1197 | + color: #c4c4c4; | |
1198 | +} | |
1199 | +.parameter-dian{ | |
1200 | + display: flex; | |
1201 | + width: 94rpx; | |
1202 | + height: 33rpx; | |
1203 | + font-size: 20rpx; | |
1204 | + border-radius: 20rpx; | |
1205 | + line-height:33rpx; | |
1206 | + padding-left: 25rpx; | |
1207 | + border:4rpx solid #eeeeee; | |
1208 | + | |
1209 | +} | |
1210 | +/* 点赞图片 */ | |
1211 | +.parameter-img{ | |
1212 | + width: 27rpx; | |
1213 | + height: 27rpx; | |
1214 | + margin-top: 3rpx; | |
1215 | +} | |
1216 | +.parameter-val{ | |
1217 | + margin-left:25rpx; | |
1218 | + font-size: 26rpx; | |
1219 | + color: #999; | |
1220 | +} | |
1221 | +/* 回复 */ | |
1222 | +.reply{ | |
1223 | + width: 95%; | |
1224 | + /* height: 120rpx; */ | |
1225 | + padding-top: 14rpx; | |
1226 | + border-top:3rpx solid #eeeeee; | |
1227 | + margin:0 auto; | |
1228 | + | |
1229 | +} | |
1230 | +.shop-reply{ | |
1231 | + height: 30rpx; | |
1232 | + color:#d60022; | |
1233 | + font-size:24rpx; | |
1234 | + overflow: hidden; | |
1235 | +} | |
1236 | +.shop-font{ | |
1237 | + width: 94%; | |
1238 | + font-size: 24rpx; | |
1239 | + padding-top: 10rpx; | |
1240 | + | |
1241 | +} | |
1242 | +.line_bulge{ | |
1243 | + width: 17rpx; | |
1244 | + height: 17rpx; | |
1245 | + border-top: 1rpx solid #eeeeee; | |
1246 | + border-left: 1rpx solid #eeeeee; | |
1247 | + transform:rotate(45deg); | |
1248 | + position: absolute; | |
1249 | + top: -12rpx; | |
1250 | + left:50rpx; | |
1251 | + background:#fff; | |
1252 | +} | |
1253 | + | |
1254 | + | |
1255 | +.xc_comment{ | |
1256 | + display: flex; | |
1257 | + justify-content: space-around; | |
1258 | + width: 100%; | |
1259 | + box-sizing: border-box; | |
1260 | + padding: 10rpx 20rpx; | |
1261 | + /* height: 42rpx; | |
1262 | + padding-left: 34rpx; */ | |
1263 | + color: #333; | |
1264 | + | |
1265 | +} | |
1266 | +.xc_comment-have-pictures{ | |
1267 | + width: 153rpx; | |
1268 | + /* height: 42rpx; */ | |
1269 | + line-height: 42rpx; | |
1270 | + text-align: center; | |
1271 | + background: #ffe3e2; | |
1272 | + color: 28rpx; | |
1273 | + border-radius:21rpx; | |
1274 | + font-size: 24rpx; | |
1275 | +} | |
1276 | +.xc_comment-discuss{ | |
1277 | + width: 152rpx; | |
1278 | + height: 42rpx; | |
1279 | + line-height: 42rpx; | |
1280 | + text-align: center; | |
1281 | + background: #ffe3e2; | |
1282 | + color: 28rpx; | |
1283 | + border-radius:20rpx; | |
1284 | + font-size: 24rpx; | |
1285 | + margin-left: 28rpx | |
1286 | +} | |
1287 | + | |
1288 | +.xc_comment-detail{ | |
1289 | + display: flex; | |
1290 | + /* margin-top: 40rpx; */ | |
1291 | + /* width: 524rpx; */ | |
1292 | + /* margin-left: 34rpx; */ | |
1293 | + border-radius: 24rpx; | |
1294 | + border: 2rpx solid #ebedf0; | |
1295 | + margin-left: 20rpx; | |
1296 | + box-sizing: border-box; | |
1297 | + /* overflow: hidden; */ | |
1298 | +} | |
1299 | + | |
1300 | +.xc_user-img{ | |
1301 | + border-radius:50%; | |
1302 | + margin: auto 0; | |
1303 | +} | |
1304 | + | |
1305 | +.xc_comment-user{ | |
1306 | + display: flex; | |
1307 | + /* margin-top: 22rpx; | |
1308 | + margin-left: 22rpx; */ | |
1309 | +} | |
1310 | +.xc_user{ | |
1311 | + width: 170rpx; | |
1312 | + height: 60rpx; | |
1313 | + margin-left: 6rpx; | |
1314 | + overflow: hidden; | |
1315 | +} | |
1316 | +.xc_user-name{ /* height: 25rpx; */} | |
1317 | +.xc_comment-img{ | |
1318 | + width: 22rpx; | |
1319 | + height: 22rpx; | |
1320 | + /* margin-top: 14rpx; */ | |
1321 | + margin-right: 5rpx | |
1322 | +} | |
1323 | +.xc_comment-font{ | |
1324 | + /* height: 75rpx; */ | |
1325 | + /* margin-left: 22rpx; */ | |
1326 | + white-space:normal; | |
1327 | + overflow: hidden; | |
1328 | + /* margin-top: 8rpx; | |
1329 | + line-height: 38rpx; */ | |
1330 | + | |
1331 | +} | |
1332 | +.xc_comment-val{ | |
1333 | + /* width: 88%; | |
1334 | + height: 30rpx; | |
1335 | + margin-left: 22rpx; | |
1336 | + display: flex; | |
1337 | + margin-top: 15rpx; | |
1338 | + margin-bottom:15rpx; */ | |
1339 | +} | |
1340 | + | |
1341 | +.xc_comment-time{ | |
1342 | + /* height: 30rpx; */ | |
1343 | + font-size: 22rpx; | |
1344 | + color: #a5a5a5; | |
1345 | + overflow: hidden; | |
1346 | +} | |
1347 | + | |
1348 | +.xc_goods-img{ | |
1349 | + width: 190rpx; | |
1350 | + height: 190rpx; | |
1351 | +} | |
1352 | +.xc_comment-left{ | |
1353 | + display:inline-block; | |
1354 | + width: 312rpx; | |
1355 | + padding: 20rpx; | |
1356 | +} | |
1357 | +.xc_goods-img-frame{ | |
1358 | + border-radius: 0 22rpx 22rpx 0; | |
1359 | + overflow: hidden; | |
1360 | + /* display:inline-block; */ | |
1361 | + /* width: 40%; | |
1362 | + height: 90%; | |
1363 | + text-align: center; | |
1364 | + padding-top: 30rpx; | |
1365 | + vertical-align: top; */ | |
1366 | +} | |
1367 | +.xc_imgs{ | |
1368 | + width: 50rpx; | |
1369 | + height:50rpx; | |
1370 | + border-radius:50%; | |
1371 | + margin-right: 5rpx; | |
1372 | +} | |
1373 | + | |
1374 | +.pj_word_size{ font-size: 28rpx} | |
1375 | +.pj_scroll{ | |
1376 | + /* white-space: nowrap; */ | |
1377 | + /* height: 324rpx; */ | |
1378 | + /* margin-bottom: 50rpx; */ | |
1379 | + display: flex; | |
1380 | + align-items: center; | |
1381 | + padding: 20rpx 0; | |
1382 | + /* box-sizing: border-box; */ | |
1383 | + /* box-shadow: 0 8px 12px #e7e9eb; */ | |
1384 | +} | |
1385 | + | |
1386 | + | |
1387 | +/*领券*/ | |
1388 | +.three-level-word{ | |
1389 | + font-size: 25rpx; | |
1390 | +} | |
1391 | +.four-level-word{ | |
1392 | + font-size: 23rpx; | |
1393 | +} | |
1394 | +.cx-frame{ | |
1395 | + /* border-top:3rpx solid #eee; */ | |
1396 | + /* width:99%; | |
1397 | + height: 95rpx; | |
1398 | + line-height: 95rpx; | |
1399 | + padding-left:24rpx; */ | |
1400 | + padding: 20rpx; | |
1401 | +} | |
1402 | +.cx-frame .cx-sizs{ | |
1403 | + /* width: 68rpx; */ | |
1404 | + /* height: 100%; */ | |
1405 | + /* line-height: 100rpx; */ | |
1406 | + /* overflow: hidden; */ | |
1407 | + /* margin-left: 10rpx; */ | |
1408 | +} | |
1409 | +.xc-coupon-fram{ | |
1410 | + position: relative; | |
1411 | + margin-right: 16rpx; | |
1412 | + /* width:200rpx; */ | |
1413 | + /* padding-top:30rpx; */ | |
1414 | + | |
1415 | +} | |
1416 | +.xc-coupon-fram .xc-coupon{ | |
1417 | + /* width:175rpx ; | |
1418 | + height: 40rpx; | |
1419 | + line-height: 40rpx; */ | |
1420 | + background-color:#d60021 ; | |
1421 | + /* margin:0 auto; */ | |
1422 | + color:#fff; | |
1423 | + padding: 6rpx 20rpx; | |
1424 | + | |
1425 | +} | |
1426 | +.xc-coupon-fram .xc-circular{ | |
1427 | + width: 16rpx; | |
1428 | + height:16rpx; | |
1429 | + background-color: white; | |
1430 | + position:absolute; | |
1431 | + top: 50%; | |
1432 | + /* left: -10rpx; */ | |
1433 | + transform: translateY(-50%); | |
1434 | +} | |
1435 | +.xc-coupon-fram .xc-one{ | |
1436 | + left: -8rpx; | |
1437 | +} | |
1438 | +.xc-coupon-fram .xc-two{ | |
1439 | + right: -8rpx; | |
1440 | +} | |
1441 | + | |
1442 | +.cx-obtain-coupon{ | |
1443 | + /* width: 65rpx; | |
1444 | + height: 100%; | |
1445 | + padding-left:15rpx; */ | |
1446 | + color: #d70025; | |
1447 | + display: flex; | |
1448 | + align-items: center; | |
1449 | + /* position: absolute; | |
1450 | + right: 5rpx; */ | |
1451 | +} | |
1452 | + | |
1453 | +/* 自定义弹出窗口 */ | |
1454 | +.cx-popup{ | |
1455 | + width:100%; | |
1456 | + background: #fff; | |
1457 | + z-index: 35; | |
1458 | + border-top-left-radius: 25rpx; | |
1459 | + border-top-right-radius: 25rpx; | |
1460 | + position:fixed; | |
1461 | + bottom:0; | |
1462 | +} | |
1463 | + | |
1464 | +.cx-popup .top{ | |
1465 | + /* width: 90%; | |
1466 | + height:85rpx; */ | |
1467 | + font-size: 32rpx; | |
1468 | + padding: 20rpx 0; | |
1469 | + border-bottom: 2rpx solid #ebedf0; | |
1470 | + /* padding-top: 50rpx; | |
1471 | + font-weight:600; */ | |
1472 | + | |
1473 | +} | |
1474 | +.cx-popup .top-frame{ | |
1475 | + /* width: 100%; | |
1476 | + display: flex; | |
1477 | + justify-content: center; | |
1478 | + overflow: hidden; */ | |
1479 | +} | |
1480 | +.xc-valid-coupon{ | |
1481 | + width: 90%; | |
1482 | + height:40rpx; | |
1483 | + padding-top: 24rpx; | |
1484 | + overflow: hidden; | |
1485 | +} | |
1486 | +.xc-frame{ | |
1487 | + position: relative; | |
1488 | +} | |
1489 | +.xc-coupon-frame { | |
1490 | + width: 100%; | |
1491 | + max-height: 560rpx; | |
1492 | + overflow: auto; | |
1493 | + | |
1494 | +} | |
1495 | +.xc-coupon-frame .rel:not(:first-child) { | |
1496 | + margin-top: 20rpx; | |
1497 | +} | |
1498 | +.xc-coupon-frame .coupon { | |
1499 | + width:100%; | |
1500 | + height: 168rpx; | |
1501 | + border-radius: 25rpx; | |
1502 | + border:2rpx solid #ffdcdc; | |
1503 | + overflow: hidden; | |
1504 | + /* margin-top:16rpx; */ | |
1505 | + box-sizing: border-box; | |
1506 | + | |
1507 | +} | |
1508 | +/* .xc-coupon-frame .coupon ~ .coupon { | |
1509 | + margin-top:16rpx; | |
1510 | +} */ | |
1511 | +.xc-coupon-left{ | |
1512 | + width: 216rpx; | |
1513 | + /* height: 100%; */ | |
1514 | + background-color: #ffeeef; | |
1515 | + border-right: 4rpx dashed #ffdbd9; | |
1516 | + overflow: hidden; | |
1517 | + /* line-height: 100%; */ | |
1518 | + display: flex; | |
1519 | + flex-direction: column; | |
1520 | + justify-content: center; | |
1521 | + align-items: center; | |
1522 | + flex-shrink: 0; | |
1523 | +} | |
1524 | +.xc-money{ | |
1525 | + color: #f30026; | |
1526 | + text-align:center; | |
1527 | +} | |
1528 | +.xc-rmb{ | |
1529 | + /* width:44rpx; | |
1530 | + padding-top:7rpx; */ | |
1531 | +} | |
1532 | +.xc-money-frame{ | |
1533 | + /* margin-left:35rpx; | |
1534 | + margin-top:48rpx; */ | |
1535 | + | |
1536 | +} | |
1537 | +.xc-spacing{ | |
1538 | + letter-spacing:4rpx; | |
1539 | +} | |
1540 | +.xc-circular-one{ | |
1541 | + position: absolute; | |
1542 | + top:-15rpx; | |
1543 | + left:205rpx; | |
1544 | + width: 30rpx; | |
1545 | + height: 30rpx; | |
1546 | + background: #fff; | |
1547 | + overflow: hidden; | |
1548 | +} | |
1549 | +.xc-circular-two{ | |
1550 | + position: absolute; | |
1551 | + bottom: -15rpx; | |
1552 | + /* top:150rpx; */ | |
1553 | + left:205rpx; | |
1554 | + width: 30rpx; | |
1555 | + height:30rpx; | |
1556 | + background: #fff; | |
1557 | +} | |
1558 | +.xc-detail-coupon{ | |
1559 | + /* margin-left: 22rpx; | |
1560 | + overflow: hidden; | |
1561 | + padding-top: 43rpx; */ | |
1562 | + /* display: flex; | |
1563 | + align-items: center; */ | |
1564 | +} | |
1565 | +.xc-coupon-right{ | |
1566 | + /* width: 455rpx; | |
1567 | + height: 100%; */ | |
1568 | + background: #fffaf9; | |
1569 | + padding: 20rpx; | |
1570 | + box-sizing: border-box; | |
1571 | + width: 100%; | |
1572 | + justify-content: space-between; | |
1573 | + align-items: center; | |
1574 | +} | |
1575 | +.xc-below{ | |
1576 | + margin-top:20rpx; | |
1577 | + | |
1578 | +} | |
1579 | +.xc-get{ | |
1580 | + | |
1581 | + width: 140rpx; | |
1582 | + /* height: 48rpx; */ | |
1583 | + color: #fff; | |
1584 | + text-align: center; | |
1585 | + border-radius:27rpx; | |
1586 | + line-height:54rpx; | |
1587 | + /* margin-left:20rpx; */ | |
1588 | +} | |
1589 | + | |
1590 | +.background{ | |
1591 | + background:#f40028; | |
1592 | +} | |
1593 | +/*--不可使用--*/ | |
1594 | +.background.nouse{ | |
1595 | + background:gainsboro; | |
1596 | +} | |
1597 | + | |
1598 | +.xc-background{ | |
1599 | + background:#b9b9b9; | |
1600 | +} | |
1601 | + | |
1602 | + | |
1603 | +.cx-confirm{ | |
1604 | + width: 100%; | |
1605 | + padding: 20rpx; | |
1606 | + box-sizing: border-box; | |
1607 | + /* height: 160rpx; */ | |
1608 | + | |
1609 | +} | |
1610 | +.cx-confirm .confirm{ | |
1611 | + /* width: 372rpx; | |
1612 | + height: 60rpx; */ | |
1613 | + background-color: #f40026; | |
1614 | + color: #fff; | |
1615 | + border-radius:10rpx; | |
1616 | + line-height: 80rpx; | |
1617 | + font-size: 28rpx; | |
1618 | + | |
1619 | +} | |
1620 | + | |
1621 | +.up{ animation: up .7s; } | |
1622 | +.down{ animation: down 1s; } | |
1623 | +@keyframes up { 0% { transform: translateY(550rpx); } 100% { transform: translateY(0); } } | |
1624 | +@keyframes down { 0% { transform: translateY(0); } 100% { transform: translateY(550rpx); } } | |
1625 | + | |
1626 | + | |
1627 | +/* 分享 */ | |
1628 | +.icon-share { | |
1629 | + font-size: 46rpx; | |
1630 | + color: #d60021; | |
1631 | +} | |
1632 | +.xc-share-frame{ | |
1633 | + /* width: 129rpx; | |
1634 | + height: 48rpx; | |
1635 | + border-top-left-radius: 18rpx; | |
1636 | + border-bottom-left-radius: 18rpx; */ | |
1637 | + /* background: #d60021; */ | |
1638 | + /* position:absolute; | |
1639 | + left:622rpx; | |
1640 | + top:-37rpx; | |
1641 | + line-height:50rpx; | |
1642 | + margin-top:52rpx; */ | |
1643 | +} | |
1644 | +.xc-share-frame-jieti{ | |
1645 | + width: 129rpx; | |
1646 | + height: 48rpx; | |
1647 | + border-top-left-radius: 18rpx; | |
1648 | + border-bottom-left-radius: 18rpx; | |
1649 | + background: #d60021; | |
1650 | + line-height:50rpx; | |
1651 | +} | |
1652 | + | |
1653 | +.xc-share-frame .share-font,.xc-share-frame-jieti .share-font{ | |
1654 | + font-size: 32rpx; | |
1655 | + color:#fff; | |
1656 | + margin-left:10rpx; | |
1657 | + | |
1658 | +} | |
1659 | + | |
1660 | + | |
1661 | +.xc-share-frame .share-frame,.xc-share-frame-jieti .share-frame{ | |
1662 | + width: 30rpx; | |
1663 | + height: 30rpx; | |
1664 | + margin-top:9rpx; | |
1665 | + margin-left: 10rpx; | |
1666 | + | |
1667 | +} | |
1668 | +.xc-share { | |
1669 | + width:90%; | |
1670 | + height:800rpx; | |
1671 | + background:#fff; | |
1672 | + z-index:35; | |
1673 | +} | |
1674 | +.img-frame{ | |
1675 | + position: absolute; | |
1676 | + top: 175rpx; | |
1677 | + left:100rpx; | |
1678 | + z-index: 55; | |
1679 | + overflow:hidden; | |
1680 | + | |
1681 | +} | |
1682 | +.img-frame .img{ | |
1683 | + width: 100rpx; | |
1684 | + height: 100rpx; | |
1685 | + | |
1686 | +} | |
1687 | +.xc-share .top{ | |
1688 | + height: 85rpx; | |
1689 | + width: 100%; | |
1690 | + border-bottom: 4rpx dashed #f5f5f5; | |
1691 | + overflow:hidden; | |
1692 | + | |
1693 | +} | |
1694 | +.xc-share .name{ | |
1695 | + font-size: 25rpx; | |
1696 | + margin-left:180rpx; | |
1697 | + color:#000; | |
1698 | + | |
1699 | +} | |
1700 | + | |
1701 | +.xc-share .recommend{ | |
1702 | + width: 110rpx; | |
1703 | + height: 12rpx; | |
1704 | + color: #fff; | |
1705 | + background: #d60021; | |
1706 | + font-size: 20rpx; | |
1707 | + border-radius:25rpx; | |
1708 | + margin-left:10rpx; | |
1709 | + line-height:37rpx; | |
1710 | +} | |
1711 | +.xc-left-circle{ | |
1712 | + width: 40rpx; | |
1713 | + height: 25rpx; | |
1714 | + position: absolute; | |
1715 | + top:280rpx; | |
1716 | + left:29rpx; | |
1717 | + z-index: 55; | |
1718 | + background:#727272; | |
1719 | + border-radius:50rpx 50rpx 0 0; | |
1720 | + transform:rotate(90deg); | |
1721 | + | |
1722 | +} | |
1723 | +.xc-right-circle{ | |
1724 | + width: 40rpx; | |
1725 | + height: 25rpx; | |
1726 | + position: absolute; | |
1727 | + top: 280rpx; | |
1728 | + left:683rpx; | |
1729 | + z-index: 55; | |
1730 | + background:#727272; | |
1731 | + border-radius:50rpx 50rpx 0 0; | |
1732 | + transform:rotate(270deg); | |
1733 | + | |
1734 | +} | |
1735 | +.xc-circle-frame{ | |
1736 | + width: 25rpx; | |
1737 | + height: 40rpx; | |
1738 | + overflow: hidden; | |
1739 | +} | |
1740 | +.xc-goods-name{ | |
1741 | + width: 95%; | |
1742 | + font-size: 35rpx; | |
1743 | + padding-left: 75rpx; | |
1744 | + height: 50rpx; | |
1745 | + padding-top: 10rpx; | |
1746 | + color:#000; | |
1747 | + | |
1748 | +} | |
1749 | +.xc-good-img{ | |
1750 | + width: 100%; | |
1751 | + height: 381rpx; | |
1752 | + margin-top:5rpx; | |
1753 | + | |
1754 | +} | |
1755 | +.xc-good-img .img{ | |
1756 | + width: 90%; | |
1757 | + height: 381rpx; | |
1758 | +} | |
1759 | +.xc-ensure-frame{ | |
1760 | + width: 90%; | |
1761 | + height: 60rpx; | |
1762 | + border-bottom: 2rpx solid #d8d6d7; | |
1763 | +} | |
1764 | +.xc-ensure{ | |
1765 | + width: 30%; | |
1766 | + height: 60rpx; | |
1767 | + line-height: 60rpx; | |
1768 | +} | |
1769 | +xc-ensure-div{ | |
1770 | + width: 100%; | |
1771 | + height: 60rpx; | |
1772 | +} | |
1773 | +.xc-ensure .word{ | |
1774 | + font-size: 25rpx; | |
1775 | + color: #d30025; | |
1776 | + margin-left:9rpx; | |
1777 | + | |
1778 | +} | |
1779 | +.xc-ensure .img{ | |
1780 | + width: 25rpx; | |
1781 | + height: 25rpx; | |
1782 | + margin-top:18rpx; | |
1783 | + | |
1784 | +} | |
1785 | + | |
1786 | +.xc-bottmon{ | |
1787 | + width: 100%; | |
1788 | +} | |
1789 | +.xc-bottmon .xc-left{ | |
1790 | + width: 55%; | |
1791 | + margin-top:30rpx; | |
1792 | + padding-left:20rpx; | |
1793 | + | |
1794 | +} | |
1795 | +.xc-left .xc-top{ | |
1796 | + font-size: 25rpx; | |
1797 | + height:40rpx; | |
1798 | + line-height:40rpx; | |
1799 | + color:#000; | |
1800 | +} | |
1801 | +.xc-left .xc-middle{ | |
1802 | + font-size: 25rpx; | |
1803 | + color: #b2b2b2; | |
1804 | + height:30rpx; | |
1805 | + line-height:30rpx; | |
1806 | +} | |
1807 | +.xc-left .xc-buttem{ | |
1808 | + font-size: 25rpx; | |
1809 | + height:100rpx; | |
1810 | + line-height:100rpx; | |
1811 | + color:#000; | |
1812 | +} | |
1813 | +.xc-ensure-right{ | |
1814 | + width: 30%; | |
1815 | +} | |
1816 | +.xc-qrcode{ | |
1817 | + width:120rpx; | |
1818 | + height: 120rpx; | |
1819 | + margin-top:43rpx; | |
1820 | + margin-left:80rpx; | |
1821 | + | |
1822 | +} | |
1823 | +.xc-close{ | |
1824 | + width:50rpx; | |
1825 | + height:50rpx; | |
1826 | + border-radius:50%; | |
1827 | + border:3rpx solid #fff; | |
1828 | + text-align:center; | |
1829 | + line-height: 41rpx; | |
1830 | + font-size:50rpx; | |
1831 | + color:#fff; | |
1832 | + font-weight: lighter; | |
1833 | + font-family:MingLiU; | |
1834 | + transform:rotate(270deg); | |
1835 | + overflow:auto; | |
1836 | + margin-top:6rpx; | |
1837 | + margin-bottom:1rpx; | |
1838 | + | |
1839 | +} | |
1840 | +.xc-close-frame{ | |
1841 | + position:absolute; | |
1842 | + margin-top:30rpx; | |
1843 | + width:90%; | |
1844 | + display:flex; | |
1845 | + justify-content:center; | |
1846 | + overflow: auto; | |
1847 | + | |
1848 | +} | |
1849 | +.xc-guanbi{ | |
1850 | + width: 100%; | |
1851 | + height: 80rpx; | |
1852 | + overflow: hidden; | |
1853 | +} | |
1854 | + | |
1855 | + | |
1856 | +/* 自定义弹出窗口 */ | |
1857 | +.cx-popup{ | |
1858 | + width:100%; | |
1859 | + background: #fff; | |
1860 | + z-index: 35; | |
1861 | + border-top-left-radius: 10rpx; | |
1862 | + border-top-right-radius: 10rpx; | |
1863 | + position:fixed; | |
1864 | + bottom:0; | |
1865 | +} | |
1866 | + | |
1867 | +.xc-top-content{ | |
1868 | + width: 88%; | |
1869 | + height:85rpx; | |
1870 | + padding-top: 50rpx; | |
1871 | + font-size: 36rpx; | |
1872 | +} | |
1873 | + | |
1874 | + | |
1875 | +.xc-valid-coupon{ | |
1876 | + width: 90%; | |
1877 | + height:40rpx; | |
1878 | + padding-top: 24rpx; | |
1879 | + overflow: hidden; | |
1880 | +} | |
1881 | +.xc-frame { | |
1882 | + /* width: 100%; | |
1883 | + margin-top:20rpx; */ | |
1884 | + padding: 20rpx; | |
1885 | +} | |
1886 | + | |
1887 | +.xc-frame .list-frame{ | |
1888 | + width: 90%; | |
1889 | + height: 100%; | |
1890 | + overflow-y:scroll; | |
1891 | + | |
1892 | + margin-top:20rpx; | |
1893 | + | |
1894 | +} | |
1895 | +.xc-close-frame{ | |
1896 | + margin-top:30rpx; | |
1897 | + width:15%; | |
1898 | + display:flex; | |
1899 | +} | |
1900 | + | |
1901 | +.xc-close{ | |
1902 | + width:70rpx; | |
1903 | + height:70rpx; | |
1904 | + border-radius:50%; | |
1905 | + border:5rpx solid #a5a5a7; | |
1906 | + text-align:center; | |
1907 | + line-height: 55rpx; | |
1908 | + font-size:80rpx; | |
1909 | + color:#a5a5a7; | |
1910 | + font-family:"微软正黑体"; | |
1911 | + margin-top:8rpx; | |
1912 | + | |
1913 | +} | |
1914 | +.xc-money{ | |
1915 | + color: #ff0013; | |
1916 | +} | |
1917 | + | |
1918 | +.xc-money-frame{ | |
1919 | + /* margin-left:35rpx; */ | |
1920 | + | |
1921 | +} | |
1922 | +.xc-coupon-effect{ | |
1923 | + width: 99%; | |
1924 | + height: 128rpx; | |
1925 | + border-bottom:3rpx solid #ddd; | |
1926 | + | |
1927 | + | |
1928 | +} | |
1929 | +.xc-goods-coupon{ | |
1930 | + width: 80%; | |
1931 | + height:100%; | |
1932 | + | |
1933 | +} | |
1934 | +.xc-title{ | |
1935 | + width:50%; | |
1936 | + margin-left:222rpx; | |
1937 | + | |
1938 | +} | |
1939 | +.xc-coupon-money{ | |
1940 | + color: #c91e31; | |
1941 | + font-size: 35rpx; | |
1942 | + margin-top:20rpx; | |
1943 | + | |
1944 | +} | |
1945 | +.xc-coupon-time{ | |
1946 | + height: 50rpx; | |
1947 | + font-size: 27rpx; | |
1948 | + color: #a4a4a4; | |
1949 | +} | |
1950 | +.xc-coupon-time .time{ | |
1951 | + margin-left: 15rpx; | |
1952 | + font-size: 27rpx; | |
1953 | +} | |
1954 | +.xc-coupon-selection{ | |
1955 | + width:99%; | |
1956 | + height:100%; | |
1957 | + | |
1958 | + | |
1959 | +} | |
1960 | +.xc-confirm { | |
1961 | + width: 90%; | |
1962 | + height: 75rpx; | |
1963 | + margin:0 auto; | |
1964 | + background:#c41830; | |
1965 | + color:#fff; | |
1966 | + border-radius:10rpx; | |
1967 | + font-size:30rpx; | |
1968 | + margin-top: 50rpx; | |
1969 | +} | |
1970 | +.xc-not-Selection{ | |
1971 | + width: 60rpx; | |
1972 | + height: 60rpx; | |
1973 | + background: #eeeeee; | |
1974 | +} | |
1975 | + | |
1976 | +/*---------------视频图片---------------*/ | |
1977 | +.xc-imageCount { | |
1978 | + width:95rpx; | |
1979 | + height:50rpx; | |
1980 | + background-color: rgba(0, 0, 0, 0.3); | |
1981 | + border-radius:40rpx; | |
1982 | + line-height:50rpx; | |
1983 | + color:#fff; | |
1984 | + text-align:center; | |
1985 | + font-size:26rpx; | |
1986 | + position:absolute; | |
1987 | + | |
1988 | + right:23rpx; | |
1989 | + bottom:21rpx; | |
1990 | +} | |
1991 | + | |
1992 | + | |
1993 | +/* 视频图片的边框 */ | |
1994 | +.xc-videos-picture{ | |
1995 | + width: 100%; | |
1996 | + height: 750rpx; | |
1997 | +} | |
1998 | +/* 视频 */ | |
1999 | +.xc-videos{ | |
2000 | + width: 100%; | |
2001 | + height:544rpx; | |
2002 | + | |
2003 | + | |
2004 | +} | |
2005 | +/* 点击视频或图片 */ | |
2006 | +.xc-video-picture{ | |
2007 | + | |
2008 | + bottom: 20rpx; | |
2009 | + left: 0rpx; | |
2010 | + display: flex; | |
2011 | + align-items: center; | |
2012 | + justify-content:center; | |
2013 | + width: 45%; | |
2014 | + height: 60rpx; | |
2015 | + margin-left: 215rpx; | |
2016 | + | |
2017 | +} | |
2018 | +.xc-video-button:before{ | |
2019 | + content: ""; | |
2020 | + position: absolute; | |
2021 | + left: 48%; | |
2022 | + top: 40%; | |
2023 | + width: 0; | |
2024 | + height: 0; | |
2025 | + margin-left: -36rpx; | |
2026 | + margin-top: -10rpx; | |
2027 | + border-width:13rpx; | |
2028 | + border-style: dashed; | |
2029 | + border-color: transparent transparent transparent #fff; | |
2030 | + font-size: 0; | |
2031 | + line-height: 0; | |
2032 | + z-index: 2; | |
2033 | + -webkit-backface-visibility: hidden; | |
2034 | +} | |
2035 | +.xc-video-buttons:before{ | |
2036 | + content: ""; | |
2037 | + position: absolute; | |
2038 | + left: 50%; | |
2039 | + top:41%; | |
2040 | + width: 0; | |
2041 | + height: 0; | |
2042 | + margin-left: -36rpx; | |
2043 | + margin-top: -10rpx; | |
2044 | + border-width:13rpx; | |
2045 | + border-style: dashed; | |
2046 | + border-color: transparent transparent transparent #000; | |
2047 | + font-size: 0; | |
2048 | + line-height: 0; | |
2049 | + z-index: 2; | |
2050 | + -webkit-backface-visibility: hidden; | |
2051 | +} | |
2052 | + | |
2053 | +.xc-video{ | |
2054 | + /* width:100rpx; */ | |
2055 | + /* height: 50rpx; | |
2056 | + line-height: 50rpx; */ | |
2057 | + text-align: center; | |
2058 | + /* margin-left:-30rpx; */ | |
2059 | + | |
2060 | + | |
2061 | +} | |
2062 | +/* 图片 */ | |
2063 | +.xc-picture{ | |
2064 | + color: #000; | |
2065 | + background: #dcdcdc; | |
2066 | + width: 94rpx; | |
2067 | + height: 45rpx; | |
2068 | + font-size: 25rpx; | |
2069 | + border-radius: 25rpx; | |
2070 | + font-family: 'SimHei',Arial; | |
2071 | + text-align: center; | |
2072 | + line-height: 45rpx; | |
2073 | + margin-left:53rpx | |
2074 | + | |
2075 | +} | |
2076 | +/* 点击视频 */ | |
2077 | +.xc-video-button{ | |
2078 | + position: relative; | |
2079 | + color: #000; | |
2080 | + background: #dcdcdc; | |
2081 | + width: 85rpx; | |
2082 | + height: 45rpx; | |
2083 | + line-height: 45rpx; | |
2084 | + font-size: 30rpx; | |
2085 | + border-radius: 25rpx; | |
2086 | + font-family: 'SimHei',Arial; | |
2087 | + padding-left: 11rpx; | |
2088 | +} | |
2089 | + | |
2090 | + | |
2091 | +.xc-sn{ | |
2092 | + color: #fff; | |
2093 | + background: #c7161e; | |
2094 | + border-color: transparent transparent transparent #fff; | |
2095 | +} | |
2096 | +/* 图片 */ | |
2097 | +.xc-pictures{ | |
2098 | + width: 100%; | |
2099 | + height:529rpx; | |
2100 | + | |
2101 | +} | |
2102 | +/*视频封面的图片 */ | |
2103 | +.xc-picturess{ | |
2104 | + position: relative; | |
2105 | + width: 100%; | |
2106 | + height:529rpx; | |
2107 | +} | |
2108 | +/* 播放 */ | |
2109 | +.xc-play{ | |
2110 | + width: 130rpx; | |
2111 | + height: 130rpx; | |
2112 | + position: absolute; | |
2113 | + top:207rpx; | |
2114 | + left:309rpx; | |
2115 | +} | |
2116 | + | |
2117 | +.xc-video-buttons{ | |
2118 | + position: relative; | |
2119 | + color: #000; | |
2120 | + background: #dcdcdc; | |
2121 | + width: 85rpx; | |
2122 | + height: 45rpx; | |
2123 | + line-height: 45rpx; | |
2124 | + font-size: 30rpx; | |
2125 | + border-radius: 25rpx; | |
2126 | + font-family: 'SimHei',Arial; | |
2127 | + padding-left: 11rpx; | |
2128 | +} | |
2129 | + | |
2130 | + | |
2131 | +.wsize{font-size: 32rpx} | |
2132 | +.five-level-word{font-size: 24rpx;} | |
2133 | + | |
2134 | + | |
2135 | +/*-- 推荐商品 --*/ | |
2136 | +.xc-goods{ | |
2137 | + height: auto; | |
2138 | + background: #f2f2f2; | |
2139 | + padding: 0 20rpx; | |
2140 | + margin-top: -25rpx; | |
2141 | + padding-bottom: 20rpx | |
2142 | +} | |
2143 | + | |
2144 | +.xc-goods-recommend { | |
2145 | + border-radius: 20rpx; | |
2146 | + width:345rpx; | |
2147 | + height: 450rpx; | |
2148 | + margin-top: 25rpx; | |
2149 | + display: inline-block; | |
2150 | + | |
2151 | +} | |
2152 | + | |
2153 | +.xc-goods-recommend.ml{ margin-left: 22rpx} | |
2154 | + | |
2155 | +.xc-goods-recommend .xc-goods-imgs{ | |
2156 | + width: 100%; | |
2157 | + height: 325rpx; | |
2158 | + border-radius:20rpx 20rpx 0 0; | |
2159 | +} | |
2160 | + | |
2161 | +.xc-goods-bottom{ | |
2162 | + width: 345rpx; | |
2163 | + height: 134rpx; | |
2164 | + background: #fff; | |
2165 | + border-radius:0 0 20rpx 20rpx; | |
2166 | + bottom:-8rpx; | |
2167 | + left:0rpx; | |
2168 | +} | |
2169 | +.xc-goods-bottom .monry-frame{ | |
2170 | + width:283rpx; | |
2171 | +height:52rpx; | |
2172 | +padding-left:24rpx; | |
2173 | + | |
2174 | +} | |
2175 | +.xc-good-explain{ | |
2176 | + width: 283rpx; | |
2177 | + height:60rpx; | |
2178 | + word-break: normal; | |
2179 | + margin-left:30rpx; | |
2180 | + font-size: 26rpx; | |
2181 | + line-height: 30rpx; | |
2182 | + margin-top: 5rpx; | |
2183 | +} | |
2184 | +.money-color-val{ | |
2185 | + color: #c6172f; | |
2186 | +} | |
2187 | +.rmb-symbol{ | |
2188 | + line-height:81rpx; | |
2189 | + height:53rpx; | |
2190 | + font-size: 28rpx; | |
2191 | +} | |
2192 | +.xc-original-price{ | |
2193 | + color: #c0c0c0; | |
2194 | +} | |
2195 | +/* 文字中间加线条 */ | |
2196 | +.word-lines{ | |
2197 | + text-decoration:line-through; | |
2198 | + line-height:90rpx; | |
2199 | + margin-left:10rpx; | |
2200 | + font-size: 20rpx; | |
2201 | +} | |
2202 | + | |
2203 | + .xc-linellae-frame{ | |
2204 | + width: 100%; | |
2205 | + height: 80rpx; | |
2206 | + background: #f2f2f2; | |
2207 | +} | |
2208 | +.xc-linellae-frame .xc-linellae{ | |
2209 | + width: 386rpx; | |
2210 | + height: 1rpx; | |
2211 | + border-bottom: 1rpx solid #ebedf0; | |
2212 | +} | |
2213 | +.xc-recommend-frame{ | |
2214 | +background:#f2f2f2; | |
2215 | +width:97rpx; | |
2216 | +height:100%; | |
2217 | +padding-left: 10rpx; | |
2218 | +} | |
2219 | +.xc-recommend-frame .xc-recommend{ | |
2220 | + width: 35rpx; | |
2221 | + height: 27rpx; | |
2222 | +} | |
2223 | +.xc-recommend-frame .xc-recommend-word{ | |
2224 | + width:58rpx; | |
2225 | +font-size:24rpx; | |
2226 | +color: #a9a9a9; | |
2227 | +margin-left: 5rpx; | |
2228 | +margin-bottom: 5rpx; | |
2229 | +margin-top: 1rpx; | |
2230 | + | |
2231 | +} | |
2232 | +.xc-price-frame{ | |
2233 | + color: #ec0022; | |
2234 | + align-items: baseline; | |
2235 | +/* height:44rpx; */ | |
2236 | +} | |
2237 | +.xc-price-frame .sign{ | |
2238 | +margin-top:19rpx; | |
2239 | +margin-left:-4px; | |
2240 | +} | |
2241 | +.xc-val-price{ | |
2242 | +margin-left:24rpx; | |
2243 | +color: #ec0022; | |
2244 | +padding-top:13rpx; | |
2245 | +} | |
2246 | +.xc-val-price .save{ | |
2247 | + border-radius:10rpx; | |
2248 | + margin-top:5rpx; | |
2249 | + background:#fed2d9; | |
2250 | + min-width:230rpx; | |
2251 | + height:40rpx; | |
2252 | + line-height:40rpx; | |
2253 | + width: auto; | |
2254 | + padding-left:12rpx; | |
2255 | + padding-right:12rpx; | |
2256 | + | |
2257 | +} | |
2258 | +.xc-unit-price{ | |
2259 | + margin-top:25rpx; | |
2260 | +padding-left:-4rpx; | |
2261 | + | |
2262 | +} | |
2263 | +.xc-explain{ | |
2264 | + color:#292929; | |
2265 | + width:542rpx; | |
2266 | + margin: 10rpx 0 20rpx; | |
2267 | + width: 100%; | |
2268 | + font-weight: bold; | |
2269 | +} | |
2270 | +.xc-item{width: 16%; font-size: 26rpx; color: #666;margin-right:5rpx;} | |
2271 | +.xc-item .yuan{ | |
2272 | + width: 38rpx; | |
2273 | + height: 38rpx; | |
2274 | + line-height: 38rpx; | |
2275 | + border:1rpx solid #f3f1f2; | |
2276 | +margin-left:33rpx; | |
2277 | + | |
2278 | +} | |
2279 | +.xc-item .word{ | |
2280 | + width:104rpx; | |
2281 | + margin-top:16rpx; | |
2282 | + color:#363636; | |
2283 | + font-weight:600; | |
2284 | + | |
2285 | +} | |
2286 | +.xc-item .circle-color{ | |
2287 | + background: #d60024; | |
2288 | + color: #fff; | |
2289 | +} | |
2290 | +.xc-item .circle-color1{ | |
2291 | + background: #fefefe; | |
2292 | + color: #666666; | |
2293 | +} | |
2294 | +.link{ | |
2295 | +height:6rpx; | |
2296 | +width:180rpx; | |
2297 | +top:54rpx; | |
2298 | +left:32px; | |
2299 | +} | |
2300 | +.link1{ | |
2301 | +height:6rpx; | |
2302 | +width:166rpx; | |
2303 | +top:54rpx; | |
2304 | +left:264rpx; | |
2305 | +} | |
2306 | +.link2{ | |
2307 | + height:6rpx; | |
2308 | +width:157rpx; | |
2309 | +top:54rpx; | |
2310 | +right:87rpx; | |
2311 | +} | |
2312 | +.link-color-red{ | |
2313 | + background: #d60024;} | |
2314 | +.link-color{ | |
2315 | + background: #e5e5e5; | |
2316 | +} | |
2317 | +.xc-qt-price{ | |
2318 | + top:-15rpx; | |
2319 | +left:25rpx; | |
2320 | + color: #fff; | |
2321 | +} | |
2322 | +.xc-qt-price .xc-qtunit-price{ | |
2323 | + margin-left:6rpx; | |
2324 | +margin-top:-4rpx; | |
2325 | +} | |
2326 | +.xc-nanber{ | |
2327 | + top:-25rpx; | |
2328 | +left:289rpx; | |
2329 | + | |
2330 | +} | |
2331 | +.xc-qtsign{ | |
2332 | +margin-top:5rpx; | |
2333 | + | |
2334 | +} | |
2335 | +.xc-people-img{ | |
2336 | + height: 36rpx; | |
2337 | + width: 36rpx; | |
2338 | + background: #fff; | |
2339 | + border-radius: 7rpx; | |
2340 | + | |
2341 | +} | |
2342 | +.xc-people-img .imgs{ | |
2343 | + width: 28rpx; | |
2344 | + height: 28rpx; | |
2345 | + margin-top:4rpx; | |
2346 | + | |
2347 | +} | |
2348 | +.xc-people-val{ | |
2349 | + | |
2350 | + height: 32rpx; | |
2351 | + border-top: 1rpx solid #fff; | |
2352 | + border-bottom: 1rpx solid #fff; | |
2353 | + border-right: 1rpx solid #fff; | |
2354 | + border-radius:0 7rpx 7rpx 0; | |
2355 | + line-height:32rpx; | |
2356 | + margin-left:-6rpx; | |
2357 | + padding: 0 12rpx; | |
2358 | +} | |
2359 | +.word-color{ | |
2360 | + color:#d70024; | |
2361 | +} | |
2362 | +.word-color-lan{ | |
2363 | + color:#0393e1; | |
2364 | +} | |
2365 | +.pt_view .hy-stop{ | |
2366 | + top: -23rpx; | |
2367 | + right: 56rpx; | |
2368 | +} | |
2369 | +.xc-time-val{width:36rpx;height:36rpx;border-radius:7rpx; line-height: 36rpx;} | |
2370 | +.xc-time{margin-right:10rpx; margin-left:10rpx; margin-top:-32rpx; | |
2371 | +} | |
2372 | +.xc-goods-explain{ | |
2373 | + width:100%; | |
2374 | + /* padding-left:30rpx; | |
2375 | + margin-left:-9rpx; | |
2376 | + height: 150rpx */ | |
2377 | +} | |
2378 | +.xc-partner-frame{ | |
2379 | +border-bottom:2rpx solid #eee; | |
2380 | +width:100%; | |
2381 | +padding:20rpx; | |
2382 | +/* height:56rpx; */ | |
2383 | +box-sizing: border-box; | |
2384 | +} | |
2385 | +.xc-person-number{ | |
2386 | + width:120rpx; | |
2387 | + color: #999999; | |
2388 | + padding-left:8rpx; | |
2389 | + text-align: left | |
2390 | +} | |
2391 | + | |
2392 | +.xc-miaosha-time{ | |
2393 | +right:17rpx; top:55rpx; | |
2394 | +} | |
2395 | +.pd_top1{padding-top: 10rpx} | |
2396 | +.s_ms_bth{margin-top: 85rpx} | |
2397 | + | |
2398 | + | |
2399 | +.no_pj_list{text-align: center; width: 100%; color: #999; margin: 30rpx 0; display: inline-block; font-size: 28rpx} | |
2400 | +/* 门店地址 */ | |
2401 | +.xc-address_frame{ | |
2402 | + /* border-top:1rpx solid #eee; */ | |
2403 | + width: 100%; | |
2404 | + height: auto; | |
2405 | + padding: 20rpx; | |
2406 | + box-sizing: border-box; | |
2407 | +} | |
2408 | +.on_height{ | |
2409 | +height: 90rpx; | |
2410 | +} | |
2411 | +.sn_height{ | |
2412 | + /* min-height: 170rpx; height: auto;padding: 10rpx 0; */ | |
2413 | +} | |
2414 | +.xc-address_frame .address_frame{ | |
2415 | + width: 100%; | |
2416 | +/* padding-left: 10rpx; | |
2417 | +margin: auto; */ | |
2418 | + | |
2419 | +} | |
2420 | + | |
2421 | +.stores-img{ | |
2422 | + width: 28rpx; | |
2423 | + height: 28rpx; | |
2424 | + margin-right: 10rpx; | |
2425 | +} | |
2426 | +.shop_name{ | |
2427 | + margin-right: 10rpx; | |
2428 | + max-width: 370rpx; | |
2429 | +} | |
2430 | +.address{ | |
2431 | + /* width: 100%; | |
2432 | + margin-top: 5rpx; | |
2433 | + margin-bottom: 5rpx; */ | |
2434 | +} | |
2435 | +.distance{ | |
2436 | + padding-left: 20rpx; | |
2437 | + padding-right: 20rpx; | |
2438 | + background: #eee; | |
2439 | + border-radius: 20rpx; | |
2440 | + /* margin-right: 5rpx; */ | |
2441 | + color: #999; | |
2442 | + height: 38rpx; | |
2443 | +line-height: 38rpx; | |
2444 | + | |
2445 | +} | |
2446 | +/* 选择门店的弹窗 */ | |
2447 | +.mongolia-layer{ | |
2448 | + position: fixed; | |
2449 | +left: 0; | |
2450 | +top: 0; | |
2451 | +right: 0; | |
2452 | +bottom: 0; | |
2453 | +z-index: 11; | |
2454 | +background: rgba(0,0,0,0.4); | |
2455 | +width: 100%; | |
2456 | +height: 91.9%; | |
2457 | + | |
2458 | +} | |
2459 | + | |
2460 | +.popup-frame{ | |
2461 | + position: fixed; | |
2462 | +bottom:99rpx; | |
2463 | +z-index: 20; | |
2464 | +background: white; | |
2465 | +width: 100%; | |
2466 | +border-radius: 20rpx 20rpx 0 0; | |
2467 | +height: 72%; | |
2468 | +bottom: 0; | |
2469 | +} | |
2470 | +.popup-top{ | |
2471 | + border-bottom: 1rpx solid #eee; | |
2472 | + height: 155rpx; | |
2473 | + width: 95%; | |
2474 | + margin: auto; | |
2475 | + line-height: 155rpx; | |
2476 | + | |
2477 | +} | |
2478 | +.bg_rights{ | |
2479 | + border-top: 2rpx solid ; | |
2480 | + border-right: 2rpx solid ; | |
2481 | + transform: rotate(45deg); | |
2482 | + display:inline-block; | |
2483 | + width:15rpx;height:15rpx; | |
2484 | + border-color:#da0b31; | |
2485 | +} | |
2486 | +.modal-closes { | |
2487 | + position: absolute; | |
2488 | + right: 30rpx; | |
2489 | + top: -15rpx; | |
2490 | + height: 25rpx; | |
2491 | + | |
2492 | +} | |
2493 | +.choose_more{ | |
2494 | + margin-top: 40rpx; | |
2495 | + margin-right: 20rpx; | |
2496 | + | |
2497 | +} | |
2498 | +.choose_mores{ | |
2499 | + margin-top: 30rpx; | |
2500 | + margin-right: 15rpx; | |
2501 | + | |
2502 | +} | |
2503 | +.store-list{ | |
2504 | + width: 95%; | |
2505 | + height: 60%; | |
2506 | + overflow-y: scroll; | |
2507 | + margin: auto; | |
2508 | +} | |
2509 | +.store-list .store_choose{ | |
2510 | + width: 100%; | |
2511 | + height: 120rpx; | |
2512 | + line-height: 125rpx; | |
2513 | + border-bottom: 1rpx solid #eee; | |
2514 | + | |
2515 | +} | |
2516 | +.store-list .store_choose .store{ | |
2517 | +width: 100%; | |
2518 | +margin: auto; | |
2519 | +line-height: 37rpx; | |
2520 | +padding-left: 20rpx; | |
2521 | + | |
2522 | +} | |
2523 | +.xc-hook{ | |
2524 | + width: 35rpx; | |
2525 | + height: 35rpx; | |
2526 | + transform: rotate(-145deg); | |
2527 | +line-height: 37rpx; | |
2528 | +text-align: center; | |
2529 | +} | |
2530 | + .xc-hooks{ | |
2531 | + width: 30rpx; | |
2532 | + height: 30rpx; | |
2533 | + border: 1rpx solid #999; | |
2534 | + } | |
2535 | + .address-frame{ | |
2536 | + width: 93%; | |
2537 | +margin-left: 7rpx; | |
2538 | + | |
2539 | + } | |
2540 | + .nearby_store{ | |
2541 | +margin-left: 17rpx; | |
2542 | + } | |
2543 | + .address_name{ | |
2544 | + margin-right: 10rpx; | |
2545 | + max-width: 390rpx; | |
2546 | + | |
2547 | + } | |
2548 | + .address-val{ | |
2549 | + height: 38rpx; | |
2550 | +line-height: 38rpx; | |
2551 | + | |
2552 | + } | |
2553 | + .store-bottom{ | |
2554 | + width: 85%; | |
2555 | + margin: auto; | |
2556 | + height: 70rpx; | |
2557 | + } | |
2558 | + .determine{ | |
2559 | + width: 260rpx; | |
2560 | + height: 55rpx; | |
2561 | + border-radius: 50rpx; | |
2562 | + line-height: 55rpx; | |
2563 | + } | |
2564 | + .default{ | |
2565 | + width: 260rpx; | |
2566 | + height: 55rpx; | |
2567 | + border:3rpx solid #c8c8c8; | |
2568 | + border-radius: 50rpx; | |
2569 | + line-height: 55rpx; | |
2570 | + } | |
2571 | + .store-bottom-frame{ | |
2572 | + width: 95%; | |
2573 | + margin: auto; | |
2574 | + | |
2575 | + } | |
2576 | + /* 门店分类列表 */ | |
2577 | +.sort_store_list{ | |
2578 | + max-height: 700rpx; | |
2579 | + overflow: hidden; | |
2580 | + overflow-y: scroll; | |
2581 | + width: 95%; | |
2582 | + margin: auto; | |
2583 | +} | |
2584 | +.sort_store_list .sort-store-frame{ | |
2585 | + width: 100%; | |
2586 | +height: 100rpx; | |
2587 | +line-height:100rpx; | |
2588 | +border-bottom: 1rpx solid #eee; | |
2589 | + | |
2590 | +} | |
2591 | +.sort_store_list .sort-store-frame .sort-store{ | |
2592 | + width: 94.5%; | |
2593 | + margin: auto; | |
2594 | +} | |
2595 | +.black_rights-frame{ | |
2596 | +width: 50%; | |
2597 | +} | |
2598 | +.black_rights-frame .black_rights{ | |
2599 | + border-top: 3rpx solid; | |
2600 | +border-right: 3rpx solid; | |
2601 | +transform: rotate(45deg); | |
2602 | +display: inline-block; | |
2603 | +width: 20rpx; | |
2604 | +height: 20rpx; | |
2605 | +} | |
2606 | +.xc-val-money{ | |
2607 | + height:55rpx; | |
2608 | +} | |
2609 | + | |
2610 | +.xc-distance-bottom{ | |
2611 | + margin-bottom: 40rpx; | |
2612 | +} | |
2613 | +.xc-distance-top{ | |
2614 | +margin-top: 10rpx; | |
2615 | +} | |
2616 | +.xc-width{ | |
2617 | + width: 100%; | |
2618 | +} | |
2619 | +.right-arrow{ width: 15rpx; height:15rpx; | |
2620 | + border-top: 2rpx solid #d70026; | |
2621 | + border-right: 2rpx solid #d70026; | |
2622 | + transform: rotate(45deg);display:inline-block; | |
2623 | + margin-bottom:3rpx; | |
2624 | +} | |
2625 | +.xc-goods-attribute{ | |
2626 | + border-bottom: 1px solid #eee; | |
2627 | +padding-bottom: 20rpx; | |
2628 | +/* margin-bottom:40rpx; */ | |
2629 | +} | |
2630 | +.xc-val-fream{ | |
2631 | + width: 105rpx; | |
2632 | +} | |
2633 | +.is_stock{ | |
2634 | +width: 58%; | |
2635 | +height: 70rpx; | |
2636 | +border-radius: 55rpx; | |
2637 | +} | |
2638 | +.select_store_height{ | |
2639 | + height: 50rpx; | |
2640 | +} | |
2641 | +.butttem5{ | |
2642 | + margin-bottom: 5rpx; | |
2643 | +} | |
2644 | + | |
2645 | +.no_pj_list{text-align: center; width: 100%; color: #999; margin-top: 30rpx; display: inline-block; font-size: 28rpx} | |
2646 | + | |
2647 | + | |
2648 | +.join-cart>view.no_store { | |
2649 | + width: 58%; background-color: #adadad; | |
2650 | +} | |
2651 | + | |
2652 | +.s_btn{ margin-top: 25rpx; } | |
2653 | +/* 美妆价的样式 */ | |
2654 | +.beauty-makeup-frame{ | |
2655 | + /* width: 101.5%; | |
2656 | + margin: auto; */ | |
2657 | + height: 120rpx; | |
2658 | + border-radius: 15rpx; | |
2659 | + margin-top: 10px; | |
2660 | + | |
2661 | +} | |
2662 | +.beauty-makeup-frame .left{ | |
2663 | + width: 80%; | |
2664 | + height: 100%; | |
2665 | + background:#f7f7f7; | |
2666 | + border-radius: 20rpx 0rpx 0rpx 20rpx; | |
2667 | + /* padding: 0 10rpx; */ | |
2668 | +} | |
2669 | + .card-frame{ | |
2670 | + margin-top: 0rpx; | |
2671 | + /* padding-right: 23rpx; | |
2672 | + margin-right: 15rpx; */ | |
2673 | +} | |
2674 | +.advert-card{ | |
2675 | + margin-top: 0rpx!important; | |
2676 | + | |
2677 | +} | |
2678 | +.beauty-makeup-frame .right{ | |
2679 | + width: 20%; | |
2680 | + height: 100%; | |
2681 | + background:#f3efe3; | |
2682 | + border-radius: 0rpx 20rpx 20rpx 0rpx; | |
2683 | + } | |
2684 | +.grade-card-frame{ | |
2685 | + | |
2686 | + /* height:45rpx ; */ | |
2687 | + background: #3c300a; | |
2688 | + border-radius: 20rpx; | |
2689 | + /* margin-top: 10px; | |
2690 | + margin-left: 7rpx; */ | |
2691 | + justify-content: center; | |
2692 | + padding: 4rpx 12rpx; | |
2693 | +} | |
2694 | +.grade-card-frame .img{ | |
2695 | + width: 24rpx; | |
2696 | + height: 24rpx; | |
2697 | + margin-top: 2px; | |
2698 | + | |
2699 | +} | |
2700 | +.grade-card-frame .card-name{ | |
2701 | + margin-left: 8rpx; | |
2702 | + /* max-width: 120rpx; */ | |
2703 | + max-width: 165rpx; | |
2704 | +} | |
2705 | +.card-effect{ | |
2706 | + /* margin-left: 15rpx; */ | |
2707 | +} | |
2708 | +.at_once_carde{ | |
2709 | + width:65rpx; | |
2710 | + height: 75rpx; | |
2711 | + line-height:38rpx; | |
2712 | +} | |
2713 | +.bg_right{ width: 18rpx; height:18rpx; | |
2714 | + border-top: 2rpx solid #333; | |
2715 | + border-right: 2rpx solid #333; | |
2716 | + transform: rotate(45deg);display:inline-block; | |
2717 | + margin-bottom:3rpx; | |
2718 | + | |
2719 | +} | |
2720 | +.carde_frame{ | |
2721 | + height: 50rpx; | |
2722 | + line-height: 18rpx | |
2723 | +} | |
2724 | + | |
2725 | +button.custom-service { line-height: normal; border: 0;} | |
2726 | +button.custom-service::after{ | |
2727 | + border: 0; | |
2728 | +} | |
2729 | +.no_store{color:#d60021; font-size: 26rpx;} | |
2730 | +.cx_show_view{ width: 580rpx; /* line-height: 30rpx; margin-bottom: 6rpx; */ } | |
2731 | +.cx_show_view .word{ width: 400rpx} | |
2732 | +.prom_condition { | |
2733 | + color: #d60021; | |
2734 | + /* width: 180rpx; */ | |
2735 | + /* height: 30rpx; */ | |
2736 | + font-size: 20rpx; | |
2737 | + /* padding-top: 0.01rpx; */ | |
2738 | + /* display: flex; | |
2739 | + justify-content: center; | |
2740 | + align-items: center; */ | |
2741 | + border: 2rpx solid #d60021; | |
2742 | + border-radius: 10rpx; | |
2743 | + margin-right:10rpx ; | |
2744 | + /* margin-left: 10rpx; */ | |
2745 | + font-size: 24rpx; | |
2746 | + padding: 0 10rpx; | |
2747 | +} | |
2748 | +.hui_img{ width: 44rpx; height: 44rpx; margin-right: 8rpx} | |
2749 | +.order_hui{color: #444; width: 420rpx} | |
2750 | +.order_hui view{ height: 34rpx; line-height: 34rpx;} | |
2751 | +.dp_img{width: 240rpx; height: 240rpx; margin: 0 40rpx} | |
2752 | +.dp_cx_view{border-bottom: 0.02rpx solid #eee; padding-bottom: 40rpx} | |
2753 | +.act_content{ margin-top: 40rpx} | |
2754 | +.act_content view{ margin-bottom: 12rpx} | |
2755 | +.color_b{color: #ff9c00} | |
2756 | + | |
2757 | +.poster-container { | |
2758 | + box-sizing: border-box; | |
2759 | + position: fixed; | |
2760 | + top: 50%; | |
2761 | + left: 50%; | |
2762 | + transform: translate(-50%, -50%); | |
2763 | + width: calc(100% - 120rpx); | |
2764 | + z-index: 1000; | |
2765 | +} | |
2766 | +.mask { | |
2767 | + position: fixed; | |
2768 | + top: 0; | |
2769 | + left: 0; | |
2770 | + width: 100%; | |
2771 | + height: 100%; | |
2772 | + z-index: 999; | |
2773 | + background-color: rgba(0,0,0,.4); | |
2774 | +} | |
2775 | +.poster-wrapper { | |
2776 | + width: 100%; | |
2777 | +} | |
2778 | + | |
2779 | +.poster { | |
2780 | + box-sizing: border-box; | |
2781 | + width: 100%; | |
2782 | + height: 1055rpx; | |
2783 | + border-radius: 20rpx; | |
2784 | + /* box-shadow: 0 8px 12px #666; */ | |
2785 | + position: relative; | |
2786 | + z-index: 999; | |
2787 | + overflow: hidden; | |
2788 | +} | |
2789 | +.poster-img { | |
2790 | + display: block; | |
2791 | + width: 100%; | |
2792 | + height: 100%; | |
2793 | +} | |
2794 | +.btn-container { | |
2795 | + display: flex; | |
2796 | + justify-content: space-around; | |
2797 | +} | |
2798 | +.btn-share { | |
2799 | + display: block; | |
2800 | + background-color: #FE6867; | |
2801 | + color: white; | |
2802 | + border-radius: 8rpx; | |
2803 | + line-height: 80rpx; | |
2804 | + margin-top: 28rpx; | |
2805 | + padding: 0 60rpx; | |
2806 | +} | |
2807 | +/* .btn-close { | |
2808 | + background-color: rgba(0,0,0,.5); | |
2809 | + color: white; | |
2810 | + width: 40rpx; | |
2811 | + height: 40rpx; | |
2812 | + line-height: 40rpx; | |
2813 | + text-align: center; | |
2814 | + border-radius: 50%; | |
2815 | + position: absolute; | |
2816 | + right: 20rpx; | |
2817 | + top: 10rpx; | |
2818 | +} */ | |
2819 | + | |
2820 | +.goods-price .rel_txt{ | |
2821 | + position: relative; top: 32rpx; font-size: 30rpx; | |
2822 | +} | |
2823 | +.goods-price .rel_img{width: 62rpx; height: 62rpx;position: relative; top: 12rpx;} | |
2824 | + | |
2825 | +.btn-close { | |
2826 | + /* background-color: rgba(0,0,0,.5); */ | |
2827 | + color: #ccc; | |
2828 | + width: 50rpx; | |
2829 | + height: 50rpx; | |
2830 | + line-height: 50rpx; | |
2831 | + text-align: center; | |
2832 | + border-radius: 50%; | |
2833 | + position: absolute; | |
2834 | + right: 20rpx; | |
2835 | + top: 20rpx; | |
2836 | +} | |
2837 | + | |
2838 | +.icon-close { | |
2839 | + font-size: 48rpx; | |
2840 | +} | |
2841 | +.quan_price{ | |
2842 | + background-color: #ff4700; color: #fff; padding: 10rpx 25rpx; margin-left: 10rpx; border-radius: 30rpx; | |
2843 | +} | |
2844 | + | |
2845 | +/*--闪白屏--*/ | |
2846 | +.g_img_box{ | |
2847 | + background-position: center center; | |
2848 | + background-repeat: no-repeat; | |
2849 | + -webkit-background-size: cover; | |
2850 | + -moz-background-size: cover; | |
2851 | + background-size: cover; | |
2852 | +} | |
2853 | + | |
2854 | + | |
2855 | + | |
2856 | +.arrow { | |
2857 | + width: auto !important; | |
2858 | + position: absolute; | |
2859 | + right: 0; | |
2860 | + top: 50%; | |
2861 | + transform: translateY(-50%); | |
2862 | +} | |
2863 | + | |
2864 | +.stock { | |
2865 | + flex: 1; | |
2866 | +} | |
2867 | + | |
2868 | +.gray{ background-color: #dcdcdc !important;} | |
2869 | + | |
2870 | + | |
2871 | +.card, | |
2872 | +.taohe { | |
2873 | + position: relative; | |
2874 | + padding: 20rpx; | |
2875 | + margin-bottom: 20rpx; | |
2876 | + border-radius: 8rpx; | |
2877 | + background: #ffdcdc; | |
2878 | + overflow: hidden; | |
2879 | + /* background: #ffdcdc url(https://mshopimg.yolipai.net/miniapp/images/fwk/crown_bg.png) no-repeat left top; | |
2880 | + background-position: 10rpx 10rpx; | |
2881 | + background-size: 206rpx 136rpx; */ | |
2882 | +} | |
2883 | + | |
2884 | +.card::before { | |
2885 | + position: absolute; | |
2886 | + font-family: iconfont; | |
2887 | + content: '\e62a'; | |
2888 | + color: rgba(255,0,0,.1); | |
2889 | + font-size: 260rpx; | |
2890 | + /* transform: rotateZ(45deg); */ | |
2891 | + top: -110rpx; | |
2892 | + left: -70rpx; | |
2893 | +} | |
2894 | + | |
2895 | +.taohe::before { | |
2896 | + position: absolute; | |
2897 | + font-family: iconfont; | |
2898 | + content: '\e64e'; | |
2899 | + color: rgba(255,0,0,.1); | |
2900 | + font-size: 260rpx; | |
2901 | + top: -20rpx; | |
2902 | + left: -30rpx; | |
2903 | +} | |
2904 | + | |
2905 | +.rmb::before { | |
2906 | + content: '¥'; | |
2907 | + font-size: 24rpx; | |
2908 | +} | |
2909 | + | |
2910 | +.c-red { | |
2911 | + color: #f23030; | |
2912 | +} | |
2913 | + | |
2914 | +.btn-group { | |
2915 | + border-radius: 70rpx; | |
2916 | + overflow: hidden; | |
2917 | + margin-right: 10rpx; | |
2918 | +} | |
2919 | + | |
2920 | +.del { | |
2921 | + text-decoration: line-through; | |
2922 | +} | |
2923 | + | |
2924 | + | |
2925 | + | |
2926 | + | |
2927 | +.tick { | |
2928 | + position: relative; | |
2929 | +} | |
2930 | + | |
2931 | +.tick:before { | |
2932 | + content: ''; | |
2933 | + display: inline-block; | |
2934 | + vertical-align: middle; | |
2935 | + margin-top: -4rpx; | |
2936 | + margin-right: 12rpx; | |
2937 | + width: 22rpx; | |
2938 | + height: 22rpx; | |
2939 | + background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABYAAAAWCAMAAADzapwJAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAABCUExURUdwTPInDPInDPgoDfMnDPYqEvInDPInDPInDP87NPUoDv8vEvMoDPInDPIoDPMnDvInDPInDPInDPIoDPQoDfInDEON4KMAAAAVdFJOUwD45yawG4zz3gQ0DmLOfECQZpPlS54kMQ4AAAC0SURBVBjTbZFREoMgDERDS0xQQNHu/a/alEGtaIYfHrBhs0S1pujVifo40VkhC+BUHSDzQTlBhjHY8bjogXmDZ+orJKwXwMUeUoa/0PeGbH8Q4Y5CJopYOjosiOQxdpRGk1UXOkrBKdkimtN8UrKrJBVXdzsllSYSjR/0J9JaGn81WluWtonYKQ0op51P3M2L2bmZN9n8MKoVqTph/RsseyjfYxAkfgot/82CpuJVLOLSIv4Cd5AJ37BgpFwAAAAASUVORK5CYII=) no-repeat; | |
2940 | + background-size: 22rpx auto; | |
2941 | +} | |
2942 | + | |
2943 | +.details::after { | |
2944 | + content: ''; | |
2945 | + position: absolute; | |
2946 | + right: 0; | |
2947 | + top: 0; | |
2948 | + bottom: 0; | |
2949 | + margin: auto; | |
2950 | + display: inline-block; | |
2951 | + width: 40rpx; | |
2952 | + height: 40rpx; | |
2953 | + background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoBAMAAAB+0KVeAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAVUExURUdwTIyMjCYmJiYmJi0tLY+PjyYmJidnOsIAAAAGdFJOUwDt6aYcSSEXj/YAAAA8SURBVCjPY2AYBTQBLEbKDhiCTmlpKggeq2AAiDJLS0tGcBkFBUActbS0JAY4F6sgVu1YLcLnpFFAFQAATwgLKVhjC9UAAAAASUVORK5CYII=); | |
2954 | + background-repeat: no-repeat; | |
2955 | + background-size: 40rpx auto; | |
2956 | +} | |
2957 | + | |
2958 | +.lh2 { | |
2959 | + line-height: 2; | |
2960 | +} | |
2961 | + | |
2962 | +.huise { | |
2963 | + background: gray | |
2964 | +} | |
2965 | + | |
2966 | +.hideArea { | |
2967 | + position: absolute; | |
2968 | + left: -1000px; | |
2969 | + top: -1000px; | |
2970 | +} | |
2971 | + | |
2972 | +.searchbar { | |
2973 | + height: 95rpx; | |
2974 | + border-bottom: 2rpx solid rgb(238, 238, 238); | |
2975 | +} | |
2976 | +.storeListpadd { | |
2977 | + padding: 0rpx 31rpx; | |
2978 | +} | |
2979 | +.search { | |
2980 | + width: 125rpx; | |
2981 | + height: 45rpx; | |
2982 | + line-height: 45rpx; | |
2983 | + background-color: rgb(219, 27, 52); | |
2984 | + border-radius: 30rpx; | |
2985 | + color: rgb(255, 255, 255); | |
2986 | +} | |
2987 | +.inputstore { | |
2988 | + width: 510rpx; | |
2989 | + height: 43rpx; | |
2990 | + line-height: 43rpx; | |
2991 | + border-radius: 30rpx; | |
2992 | + border: 2rpx solid rgb(238, 238, 238); | |
2993 | + padding-left: 30rpx; | |
2994 | +} | |
2995 | + | |
2996 | + | |
2997 | +/*按钮变灰色的优化*/ | |
2998 | +.spec-cart-btn.gray{ background-color:gainsboro !important; } | |
2999 | + | |
3000 | +.type-navbar_box{ | |
3001 | + position: fixed; | |
3002 | + top: 0; | |
3003 | + z-index: 999; | |
3004 | + width: 100%; | |
3005 | +} | |
3006 | + | ... | ... |