Commit ef57080b3b283747a6b9c2135283fb4553ce4c1e
Merge branch 'qa' of http://git.vipzhuang.cn/wxd/MShopWeApp
Showing
33 changed files
with
9358 additions
and
203 deletions
app.json
@@ -153,7 +153,8 @@ | @@ -153,7 +153,8 @@ | ||
153 | "pages/luckyGo/luckyGo_winners/luckyGo_winners", | 153 | "pages/luckyGo/luckyGo_winners/luckyGo_winners", |
154 | "pages/luckyGo/luckyGo_members/luckyGo_members", | 154 | "pages/luckyGo/luckyGo_members/luckyGo_members", |
155 | "pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo", | 155 | "pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo", |
156 | - "pages/luckyGo/luckyGo_activityList/luckyGo_activityList" | 156 | + "pages/luckyGo/luckyGo_activityList/luckyGo_activityList", |
157 | + "pages/presell/cardInfo/goodsInfo" | ||
157 | ] | 158 | ] |
158 | }, | 159 | }, |
159 | { | 160 | { |
app.wxss
components/diy_pregoods/diy_pregoods.wxml
@@ -15,7 +15,7 @@ | @@ -15,7 +15,7 @@ | ||
15 | <view class='sp'> | 15 | <view class='sp'> |
16 | <swiper-item class="s_it" wx:for="{{goods_array}}"> | 16 | <swiper-item class="s_it" wx:for="{{goods_array}}"> |
17 | <block wx:for="{{item}}" wx:for-item="aitem" wx:for-index="aind"> | 17 | <block wx:for="{{item}}" wx:for-item="aitem" wx:for-index="aind"> |
18 | - <navigator url="/packageC/pages/presell/goodsInfo/goodsInfo?goods_id={{aitem.goods_id}}&pre_id={{aitem.id}}" class="s1_gk_a1"> | 18 | + <navigator url="/packageC/pages/presell/{{aitem.goods_type==1?'cardInfo':'goodsInfo'}}/goodsInfo?goods_id={{aitem.goods_id}}&pre_id={{aitem.id}}" class="s1_gk_a1"> |
19 | <view class='one'> | 19 | <view class='one'> |
20 | <view class='sp_top'> | 20 | <view class='sp_top'> |
21 | <view class='po'></view> | 21 | <view class='po'></view> |
@@ -75,9 +75,12 @@ | @@ -75,9 +75,12 @@ | ||
75 | </swiper> | 75 | </swiper> |
76 | 76 | ||
77 | <view class="sp2" wx:if="{{object.style==2}}"> | 77 | <view class="sp2" wx:if="{{object.style==2}}"> |
78 | + | ||
79 | + | ||
78 | <block wx:for="{{goods_array}}"> | 80 | <block wx:for="{{goods_array}}"> |
79 | <block wx:for="{{item}}" wx:for-item="aitem" wx:for-index="aind"> | 81 | <block wx:for="{{item}}" wx:for-item="aitem" wx:for-index="aind"> |
80 | - <navigator url="/packageC/pages/presell/goodsInfo/goodsInfo?goods_id={{aitem.goods_id}}&pre_id={{aitem.id}}" class="s1_gk_a1"> | 82 | + |
83 | + <navigator url="/packageC/pages/presell/{{aitem.goods_type==1?'cardInfo':'goodsInfo'}}/goodsInfo?goods_id={{aitem.goods_id}}&pre_id={{aitem.id}}" class="s1_gk_a1"> | ||
81 | <view class='one1'> | 84 | <view class='one1'> |
82 | 85 | ||
83 | <view class="o1_img"> | 86 | <view class="o1_img"> |
components/diy_public/diy_public.js
@@ -106,7 +106,7 @@ Component({ | @@ -106,7 +106,7 @@ Component({ | ||
106 | if (this.data.prom_type==8) { //预售 | 106 | if (this.data.prom_type==8) { //预售 |
107 | this.setData({ | 107 | this.setData({ |
108 | prom_text:'已售', | 108 | prom_text:'已售', |
109 | - nav1:'/packageC/pages/presell/goodsInfo/goodsInfo?', | 109 | + nav1:'/packageC/pages/presell/cardInfo/goodsInfo?', |
110 | nav2:'/packageC/pages/presell/goodsInfo/goodsInfo?' | 110 | nav2:'/packageC/pages/presell/goodsInfo/goodsInfo?' |
111 | }) | 111 | }) |
112 | } | 112 | } |
components/diy_serviceCard/diy_serviceCard.js
@@ -482,7 +482,46 @@ Component({ | @@ -482,7 +482,46 @@ Component({ | ||
482 | if (this.data.object.goodscount * this.data.page < this.data.total) { | 482 | if (this.data.object.goodscount * this.data.page < this.data.total) { |
483 | this.setLoading() | 483 | this.setLoading() |
484 | } | 484 | } |
485 | - } | 485 | + }, |
486 | + | ||
487 | + go_goods:async function(e) { | ||
488 | + var gid = e.currentTarget.dataset.gid; | ||
489 | + var rurl = '/api/weshop/activitylist/listGoodActInfo2New'; | ||
490 | + var req_d = { | ||
491 | + "store_id": getApp().globalData.setting.stoid, | ||
492 | + "goods_id": gid, | ||
493 | + "user_id": getApp().globalData.user_id, | ||
494 | + "goods_type":1 | ||
495 | + } | ||
496 | + var res= await getApp().request.promiseGet(rurl, {data: req_d}); | ||
497 | + | ||
498 | + var url = "/packageA/pages/goodsInfo/goodsInfo?goods_id=" + gid; | ||
499 | + if (res.data.code == 0 && res.data.data && res.data.data.length > 0) { | ||
500 | + var arr = res.data.data; | ||
501 | + let times = new Date().getTime(); | ||
502 | + //-- 预热也要计算 -- | ||
503 | + var arr2 = arr.filter(function (e) { | ||
504 | + return e.s_time < ut.gettimestamp() || (e.warm_uptime && e.warm_uptime < ut.gettimestamp()) | ||
505 | + }) | ||
506 | + if(arr2.length==1) { | ||
507 | + switch(arr2[0].prom_type){ | ||
508 | + case 1: | ||
509 | + url+="&prom_type=1&prom_id="+arr[0].act_id; | ||
510 | + break; | ||
511 | + case 6: | ||
512 | + url = `/packageA/pages/serviceCard_pd/goodsInfo/goodsInfo?goods_id=${gid}&prom_type=${arr2[0].prom_type}&prom_id=${arr[0].act_id}`; | ||
513 | + break; | ||
514 | + case 8: | ||
515 | + url = `/packageC/pages/presell/cardInfo/goodsInfo?goods_id=${gid}&prom_id=${arr[0].act_id}`; | ||
516 | + break; | ||
517 | + } | ||
518 | + } | ||
519 | + | ||
520 | + } | ||
521 | + | ||
522 | + | ||
523 | + getApp().goto(url); | ||
524 | + }, | ||
486 | 525 | ||
487 | 526 | ||
488 | 527 |
components/diy_serviceCard/diy_serviceCard.wxml
@@ -52,7 +52,7 @@ | @@ -52,7 +52,7 @@ | ||
52 | <block wx:for="{{goods_array}}"> | 52 | <block wx:for="{{goods_array}}"> |
53 | <view class='zs_goods {{g_filter.get_border_type(object.big_order_type)}}'> | 53 | <view class='zs_goods {{g_filter.get_border_type(object.big_order_type)}}'> |
54 | <!-- <navigator url="{{g_filter.get_url_by_type(item)}}" class="s1_gk_a1"> --> | 54 | <!-- <navigator url="{{g_filter.get_url_by_type(item)}}" class="s1_gk_a1"> --> |
55 | - <navigator url="/packageA/pages/goodsInfo/goodsInfo?goods_id={{item.goods_id}}" class="s1_gk_a1"> | 55 | + <navigator catchtap="go_goods" data-gid="{{item.goods_id}}" class="s1_gk_a1"> |
56 | <view class='zs_top rel'> | 56 | <view class='zs_top rel'> |
57 | 57 | ||
58 | <block wx:if="{{object.big_order_type==3}}"> | 58 | <block wx:if="{{object.big_order_type==3}}"> |
@@ -207,7 +207,7 @@ | @@ -207,7 +207,7 @@ | ||
207 | <view class="flex flex-wrap" wx:if="{{object.column==2}}" style="padding: 0 10rpx 20rpx 10rpx;"> | 207 | <view class="flex flex-wrap" wx:if="{{object.column==2}}" style="padding: 0 10rpx 20rpx 10rpx;"> |
208 | <block wx:for="{{goods_array}}" > | 208 | <block wx:for="{{goods_array}}" > |
209 | <view class="nav-container"> | 209 | <view class="nav-container"> |
210 | - <navigator url="/packageA/pages/goodsInfo/goodsInfo?goods_id={{item.goods_id}}" class="s1_gk_a1 {{g_filter.get_border_type(object.big_order_type)}}"> | 210 | + <navigator catchtap="go_goods" data-gid="{{item.goods_id}}" class="s1_gk_a1 {{g_filter.get_border_type(object.big_order_type)}}"> |
211 | <view class="zs_goods_wai_ban"> | 211 | <view class="zs_goods_wai_ban"> |
212 | <!-- <view class="zs_goods_ban"> --> | 212 | <!-- <view class="zs_goods_ban"> --> |
213 | <!-- <view class='zs_goods_2l'> --> | 213 | <!-- <view class='zs_goods_2l'> --> |
@@ -369,7 +369,7 @@ | @@ -369,7 +369,7 @@ | ||
369 | <view class="flex wrap pdh10"> | 369 | <view class="flex wrap pdh10"> |
370 | <block wx:for="{{goods_array}}" > | 370 | <block wx:for="{{goods_array}}" > |
371 | <view class="nav-box"> | 371 | <view class="nav-box"> |
372 | - <navigator url="/packageA/pages/goodsInfo/goodsInfo?goods_id={{item.goods_id}}" class="s1_gk_a1"> | 372 | + <navigator catchtap="go_goods" data-gid="{{item.goods_id}}" class="s1_gk_a1"> |
373 | <view class="zs_goods_wai_san {{g_filter.get_border_type(object.big_order_type)}}" > | 373 | <view class="zs_goods_wai_san {{g_filter.get_border_type(object.big_order_type)}}" > |
374 | <view class="zs_goods_san"> | 374 | <view class="zs_goods_san"> |
375 | <view class='zs_goods_3l'> | 375 | <view class='zs_goods_3l'> |
@@ -528,7 +528,7 @@ | @@ -528,7 +528,7 @@ | ||
528 | <!-- 列表显示 --> | 528 | <!-- 列表显示 --> |
529 | <view class="zs_goods_xiao_wai" wx:if='{{object.column==4}}'> | 529 | <view class="zs_goods_xiao_wai" wx:if='{{object.column==4}}'> |
530 | <block wx:for="{{goods_array}}" > | 530 | <block wx:for="{{goods_array}}" > |
531 | - <navigator url="/packageA/pages/goodsInfo/goodsInfo?goods_id={{item.goods_id}}" class="s1_gk_a1"> | 531 | + <navigator catchtap="go_goods" data-gid="{{item.goods_id}}" class="s1_gk_a1"> |
532 | <view class="{{object.noboder==0?'zs_goods_xiao_bottom':'zs_goods_xiao'}}" > | 532 | <view class="{{object.noboder==0?'zs_goods_xiao_bottom':'zs_goods_xiao'}}" > |
533 | <view class='zs_top_x'> | 533 | <view class='zs_top_x'> |
534 | <block wx:if="{{object.big_order_type==3}}"> | 534 | <block wx:if="{{object.big_order_type==3}}"> |
@@ -711,7 +711,7 @@ | @@ -711,7 +711,7 @@ | ||
711 | <view class="sp"> | 711 | <view class="sp"> |
712 | <swiper-item class="s_it" wx:for="{{goods_array}}"> | 712 | <swiper-item class="s_it" wx:for="{{goods_array}}"> |
713 | <block wx:for="{{item}}" wx:for-item="aitem" wx:for-index="aind"> | 713 | <block wx:for="{{item}}" wx:for-item="aitem" wx:for-index="aind"> |
714 | - <navigator url="/packageA/pages/goodsInfo/goodsInfo?goods_id={{aitem.goods_id}}" style="width: 32%" > | 714 | + <navigator catchtap="go_goods" data-gid="{{aitem.goods_id}}" style="width: 32%" > |
715 | <view class="one {{object.big_order_type==0?'zj':''}}{{object.big_order_type==1?'yj':''}}"> | 715 | <view class="one {{object.big_order_type==0?'zj':''}}{{object.big_order_type==1?'yj':''}}"> |
716 | <view class='sp_top'> | 716 | <view class='sp_top'> |
717 | <view class='s_img' style="position: relative; width: 100%"> | 717 | <view class='s_img' style="position: relative; width: 100%"> |
packageA/pages/cardDetails/cardDetails.js
packageA/pages/cardList/cardList.js
1 | // pages/i_service/cardList/cardList.js | 1 | // pages/i_service/cardList/cardList.js |
2 | const app = getApp(); | 2 | const app = getApp(); |
3 | -let self = null; | 3 | +let self = null,ut = require("../../../utils/util.js"); |
4 | + | ||
4 | 5 | ||
5 | Page({ | 6 | Page({ |
6 | 7 | ||
@@ -216,10 +217,43 @@ Page({ | @@ -216,10 +217,43 @@ Page({ | ||
216 | }; | 217 | }; |
217 | }, | 218 | }, |
218 | 219 | ||
219 | - go_goods: function(e) { | ||
220 | - var gid = e.currentTarget.dataset.gid; | ||
221 | - var url = "/packageA/pages/goodsInfo/goodsInfo?goods_id=" + gid; | ||
222 | - app.goto(url); | 220 | + go_goods:async function(e) { |
221 | + var gid = e.currentTarget.dataset.gid; | ||
222 | + var rurl = '/api/weshop/activitylist/listGoodActInfo2New'; | ||
223 | + var req_d = { | ||
224 | + "store_id": app.globalData.setting.stoid, | ||
225 | + "goods_id": gid, | ||
226 | + "user_id": getApp().globalData.user_id, | ||
227 | + "goods_type":1 | ||
228 | + } | ||
229 | + var res= await getApp().request.promiseGet(rurl, {data: req_d}); | ||
230 | + | ||
231 | + var url = "/packageA/pages/goodsInfo/goodsInfo?goods_id=" + gid; | ||
232 | + if (res.data.code == 0 && res.data.data && res.data.data.length > 0) { | ||
233 | + var arr = res.data.data; | ||
234 | + let times = new Date().getTime(); | ||
235 | + //-- 预热也要计算 -- | ||
236 | + var arr2 = arr.filter(function (e) { | ||
237 | + return e.s_time < ut.gettimestamp() || (e.warm_uptime && e.warm_uptime < ut.gettimestamp()) | ||
238 | + }) | ||
239 | + if(arr2.length==1) { | ||
240 | + switch(arr2[0].prom_type){ | ||
241 | + case 1: | ||
242 | + url+="&prom_type=1&prom_id="+arr[0].act_id; | ||
243 | + break; | ||
244 | + case 6: | ||
245 | + url = `/packageA/pages/serviceCard_pd/goodsInfo/goodsInfo?goods_id=${gid}&prom_type=${arr2[0].prom_type}&prom_id=${arr[0].act_id}`; | ||
246 | + break; | ||
247 | + case 8: | ||
248 | + url = `/packageC/pages/presell/cardInfo/goodsInfo?goods_id=${gid}&prom_id=${arr[0].act_id}`; | ||
249 | + break; | ||
250 | + } | ||
251 | + } | ||
252 | + | ||
253 | + } | ||
254 | + | ||
255 | + | ||
256 | + app.goto(url); | ||
223 | }, | 257 | }, |
224 | 258 | ||
225 | //图片失败,默认图片 | 259 | //图片失败,默认图片 |
packageA/pages/details_serviceCard/details_serviceCard.js
@@ -237,9 +237,44 @@ Page({ | @@ -237,9 +237,44 @@ Page({ | ||
237 | 237 | ||
238 | 238 | ||
239 | // 查看商品详情 | 239 | // 查看商品详情 |
240 | - viewDetails(e) { | 240 | + async viewDetails(e) { |
241 | let goods_id = e.currentTarget.dataset.gid; | 241 | let goods_id = e.currentTarget.dataset.gid; |
242 | let url = '/packageA/pages/goodsInfo/goodsInfo?goods_id=' + goods_id; | 242 | let url = '/packageA/pages/goodsInfo/goodsInfo?goods_id=' + goods_id; |
243 | + | ||
244 | + var rurl = '/api/weshop/activitylist/listGoodActInfo2New'; | ||
245 | + var req_d = { | ||
246 | + "store_id": os.stoid, | ||
247 | + "goods_id": goods_id, | ||
248 | + "user_id": getApp().globalData.user_id, | ||
249 | + "goods_type": 1, | ||
250 | + } | ||
251 | + var res= await getApp().request.promiseGet(rurl, {data: req_d}); | ||
252 | + | ||
253 | + | ||
254 | + if (res.data.code == 0 && res.data.data && res.data.data.length > 0) { | ||
255 | + var arr = res.data.data; | ||
256 | + let times = new Date().getTime(); | ||
257 | + //-- 预热也要计算 -- | ||
258 | + var arr2 = arr.filter(function (e) { | ||
259 | + return e.s_time < ut.gettimestamp() || (e.warm_uptime && e.warm_uptime < ut.gettimestamp()) | ||
260 | + }) | ||
261 | + if(arr2.length==1) { | ||
262 | + switch(arr2[0].prom_type){ | ||
263 | + case 1: | ||
264 | + url+="&prom_type=1&prom_id="+arr[0].act_id; | ||
265 | + break; | ||
266 | + 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}`; | ||
268 | + break; | ||
269 | + case 8: | ||
270 | + url = `/packageC/pages/presell/cardInfo/goodsInfo?goods_id=${goods_id}&prom_id=${arr[0].act_id}`; | ||
271 | + break; | ||
272 | + } | ||
273 | + } | ||
274 | + | ||
275 | + } | ||
276 | + | ||
277 | + | ||
243 | app.goto(url); | 278 | app.goto(url); |
244 | }, | 279 | }, |
245 | 280 | ||
@@ -454,6 +489,13 @@ Page({ | @@ -454,6 +489,13 @@ Page({ | ||
454 | return false; | 489 | return false; |
455 | } | 490 | } |
456 | 491 | ||
492 | + if(prom_type==8){ | ||
493 | + wx.showModal({ | ||
494 | + title: details.list[i].service_name +"预售商品不加入购物车\n" | ||
495 | + }); | ||
496 | + return false; | ||
497 | + } | ||
498 | + | ||
457 | //----先看会员在购物车中是否加入了该商品----- | 499 | //----先看会员在购物车中是否加入了该商品----- |
458 | app.request.get("/api/weshop/cartService/page", { | 500 | app.request.get("/api/weshop/cartService/page", { |
459 | data: { | 501 | data: { |
@@ -794,6 +836,102 @@ Page({ | @@ -794,6 +836,102 @@ Page({ | ||
794 | } | 836 | } |
795 | pt_act=act_details; | 837 | pt_act=act_details; |
796 | } | 838 | } |
839 | + //-- 预售 -- | ||
840 | + if (it.prom_type == 8) { | ||
841 | + | ||
842 | + let act_details = null; | ||
843 | + let promcardbuynum = 0; | ||
844 | + let qty = it.qty; | ||
845 | + let presell_id=0; | ||
846 | + | ||
847 | + var url = "/api/weshop/marketing/marketingPresellList/list" | ||
848 | + var rd = { | ||
849 | + store_id: os.stoid, | ||
850 | + presell_id: it.prom_id, | ||
851 | + goods_id: it.card_id | ||
852 | + } | ||
853 | + console.log('获取预售从表') | ||
854 | + //------获取预售从表---------- | ||
855 | + await getApp().request.promiseGet(url, { | ||
856 | + data: rd | ||
857 | + }).then(res => { | ||
858 | + if (res.data.code == 0 && res.data.data && res.data.data.length > 0) { | ||
859 | + act_details = res.data.data[0]; | ||
860 | + presell_id = act_details.presell_id; | ||
861 | + } | ||
862 | + }) | ||
863 | + | ||
864 | + //------获取预售主表---------- | ||
865 | + await getApp().request.promiseGet(`/api/weshop/marketing/marketingPresellForm/get/${os.stoid}/${presell_id}`, {}).then(res => { | ||
866 | + if (res.data.code == 0 && res.data.data) { | ||
867 | + var act_data = res.data.data; | ||
868 | + if (act_data.is_end) { | ||
869 | + wx.showToast({ title: "活动已经结束", icon: 'none', duration: 3000 }); | ||
870 | + flag = 0; | ||
871 | + return false; | ||
872 | + } | ||
873 | + if (act_data.isuse == 0) { | ||
874 | + wx.showToast({ title: "活动未启用", icon: 'none', duration: 3000 }); | ||
875 | + flag = 0; | ||
876 | + return false; | ||
877 | + } | ||
878 | + | ||
879 | + var err_txt = "活动定金时间已经结束"; | ||
880 | + var end_time = act_data.end_time; | ||
881 | + if (act_data.presell_type == 1) { | ||
882 | + err_txt = "活动时间已经结束"; | ||
883 | + } | ||
884 | + if (end_time < ut.gettimestamp()) { | ||
885 | + wx.showToast({ title: err_txt, icon: 'none', duration: 3000 }); | ||
886 | + flag = 0; | ||
887 | + return false; | ||
888 | + } | ||
889 | + | ||
890 | + if (act_data.presell_type == 0) { | ||
891 | + end_time = act_data.pay_enddate; | ||
892 | + err_txt = "活动尾款时间已经结束"; | ||
893 | + } | ||
894 | + if (end_time < ut.gettimestamp()) { | ||
895 | + wx.showToast({ title: err_txt, icon: 'none', duration: 3000 }); | ||
896 | + flag = 0; | ||
897 | + return false; | ||
898 | + } | ||
899 | + } | ||
900 | + }) | ||
901 | + | ||
902 | + if(!flag) { | ||
903 | + th.data.ser_paying=0; | ||
904 | + return false; | ||
905 | + } | ||
906 | + | ||
907 | + //-- 判断一下限购的计算 -- | ||
908 | + if(act_details.vip_butyqty>0){ | ||
909 | + await getApp().request.promiseGet("/api/weshop/recharge/rechargePresell/countBuyGoodsSum", { | ||
910 | + data: { | ||
911 | + store_id: store_id, | ||
912 | + user_id: user_id, | ||
913 | + goods_id: it.card_id, | ||
914 | + prom_id: it.prom_id | ||
915 | + } | ||
916 | + }).then(res => { | ||
917 | + if (res.data.code == 0) { | ||
918 | + console.log('已经购买的数量:', res.data.data); | ||
919 | + promcardbuynum = res.data.data.sumgoodsnum; | ||
920 | + } | ||
921 | + }) | ||
922 | + let limited = act_details.buy_limit; // 限购数量a | ||
923 | + let canBuyNum = limited - promcardbuynum; // 自己还可购买的数量c | ||
924 | + | ||
925 | + if (canBuyNum < qty ) { | ||
926 | + wx.showModal({ | ||
927 | + title: '提示', | ||
928 | + content: '您已超出活动限购数量,无法支付,请取消订单!', | ||
929 | + showCancel: false, | ||
930 | + }); | ||
931 | + flag = false; | ||
932 | + } | ||
933 | + } | ||
934 | + } | ||
797 | } | 935 | } |
798 | 936 | ||
799 | if (flag) { | 937 | if (flag) { |
@@ -806,7 +944,7 @@ Page({ | @@ -806,7 +944,7 @@ Page({ | ||
806 | }, function () { | 944 | }, function () { |
807 | app.showWarning('支付成功'); | 945 | app.showWarning('支付成功'); |
808 | 946 | ||
809 | - if(pt_act.kttype==1){ | 947 | + if(pt_act && pt_act.kttype==1){ |
810 | //--如果商家团的时候--- | 948 | //--如果商家团的时候--- |
811 | getApp().request.promisePost("/api/weshop/order/pay/vipAutoTuan", { | 949 | getApp().request.promisePost("/api/weshop/order/pay/vipAutoTuan", { |
812 | data: {orderSn:order_sn,storeId:os.stoid } | 950 | data: {orderSn:order_sn,storeId:os.stoid } |
packageA/pages/goodsInfo/goodsInfo.wxml
@@ -34,7 +34,7 @@ | @@ -34,7 +34,7 @@ | ||
34 | </view> | 34 | </view> |
35 | </swiper-item> | 35 | </swiper-item> |
36 | <swiper-item wx:for="{{gallery}}" wx:key="gallery" class="sty"> | 36 | <swiper-item wx:for="{{gallery}}" wx:key="gallery" class="sty"> |
37 | - <view class="wh100 g_img_box" style="background-image:url({{data.image_url?data.image_url:'miniapp/images/default_g_img.gif'}});"></view> | 37 | + <view class="wh100 g_img_box" style="background-image:url({{iurl +(data.image_url?data.image_url:'miniapp/images/default_g_img.gif')}});"></view> |
38 | </swiper-item> | 38 | </swiper-item> |
39 | </swiper> | 39 | </swiper> |
40 | 40 |
packageA/pages/goodsInfo/goodsInfo.wxss
@@ -1136,7 +1136,7 @@ left:31rpx;} | @@ -1136,7 +1136,7 @@ left:31rpx;} | ||
1136 | } | 1136 | } |
1137 | /* 评价的用户边框 */ | 1137 | /* 评价的用户边框 */ |
1138 | .middle-user-frame{ | 1138 | .middle-user-frame{ |
1139 | - height: 65rpx; | 1139 | + height: 72rpx; |
1140 | overflow: hidden; | 1140 | overflow: hidden; |
1141 | } | 1141 | } |
1142 | .middle-user{ | 1142 | .middle-user{ |
packageC/pages/presell/cardInfo/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 | +module.exports = { | ||
12 | + is_has: is_has, | ||
13 | + format_tt:format_tt | ||
14 | +} |
packageC/pages/presell/cardInfo/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 | + return parseFloat(value); | ||
97 | + } else { | ||
98 | + return value.toFixed(0); | ||
99 | + }; | ||
100 | + }, | ||
101 | + | ||
102 | + //跳转的接口 | ||
103 | + get_goods_url:function(item){ | ||
104 | + | ||
105 | + console.log(item,111) | ||
106 | + var url1="/pages/goods/goodsInfo/goodsInfo?goods_id="+item.goods_id | ||
107 | + if(item.prom_type==8){ | ||
108 | + url1="/packageC/pages/presell/goodsInfo/goodsInfo?goods_id="+item.goods_id+"&pre_id="+item.id | ||
109 | + } | ||
110 | + return url1; | ||
111 | + } | ||
112 | + | ||
113 | + | ||
114 | +} | ||
115 | +module.exports = { | ||
116 | + is_has_rank:g_filters.is_has_rank, | ||
117 | + get_card_price:g_filters.get_card_price, | ||
118 | + num:g_filters.num, | ||
119 | + get_goods_url:g_filters.get_goods_url, | ||
120 | +} | ||
0 | \ No newline at end of file | 121 | \ No newline at end of file |
packageC/pages/presell/cardInfo/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 | + | ||
31 | + gid: "", | ||
32 | + stoid: o.stoid, | ||
33 | + url: o.url, | ||
34 | + resourceUrl: o.h5_url, //公众号那边的图片文件域名 | ||
35 | + iurl: o.imghost, | ||
36 | + defaultAvatar: o.resourceUrl + "/static/images/user68.jpg", | ||
37 | + | ||
38 | + data: null, | ||
39 | + content: "", //商品详情 | ||
40 | + | ||
41 | + gallery: null, //图片滚动 | ||
42 | + is_collect: 0, | ||
43 | + collect_id: 0, | ||
44 | + cartGoodsNum: 0, | ||
45 | + specSelect: 0, | ||
46 | + optionItemId: 0, | ||
47 | + goodsInputNum: 1, | ||
48 | + openSpecModal: !1, | ||
49 | + | ||
50 | + activeCategoryId: 0, | ||
51 | + supportPageScroll: !1, | ||
52 | + address: { | ||
53 | + address: "", | ||
54 | + district: 0, | ||
55 | + }, | ||
56 | + shipping: "", | ||
57 | + shippingCost: 0, | ||
58 | + enterAddressPage: !1, | ||
59 | + categories: [{ | ||
60 | + name: "卡项", | ||
61 | + id: 0 | ||
62 | + }, { | ||
63 | + name: "详情", | ||
64 | + id: 1 | ||
65 | + },{ | ||
66 | + name: "评价", | ||
67 | + id: 2 | ||
68 | + }], | ||
69 | + activeCategoryId2: 0, | ||
70 | + categories2: [{ | ||
71 | + name: "商品详情", | ||
72 | + id: 0 | ||
73 | + }, { | ||
74 | + name: "规格参数", | ||
75 | + id: 1 | ||
76 | + }], | ||
77 | + activeCategoryId3: 1, // 点击评价-全部、有图、好评、中评时对应的id | ||
78 | + categories3: [{ | ||
79 | + name: "全部", | ||
80 | + id: 1, | ||
81 | + num: 0 | ||
82 | + }, | ||
83 | + { | ||
84 | + name: "有图", | ||
85 | + id: 5, | ||
86 | + num: 0 | ||
87 | + }, | ||
88 | + | ||
89 | + { | ||
90 | + name: "好评", | ||
91 | + id: 2, | ||
92 | + num: 0 | ||
93 | + }, { | ||
94 | + name: "中评", | ||
95 | + id: 3, | ||
96 | + num: 0 | ||
97 | + }, { | ||
98 | + name: "差评", | ||
99 | + id: 4, | ||
100 | + num: 0 | ||
101 | + }, | ||
102 | + ], | ||
103 | + | ||
104 | + select: { | ||
105 | + price: 0, | ||
106 | + stock: 0, | ||
107 | + specName: "", | ||
108 | + activity: null | ||
109 | + }, | ||
110 | + | ||
111 | + | ||
112 | + //门店相关 | ||
113 | + ismend: 0, | ||
114 | + is_sec_mend: 0, | ||
115 | + sto_sele_name: "", //选中的门店名称 | ||
116 | + sto_sele_id: "", //选中的门店id | ||
117 | + sto_sele_keyid:'', //选中的门店线下 | ||
118 | + sto_sele_distr: "", //选择的门店的配送方式 | ||
119 | + is_show_sto_cat: 1, //是否显示门店分类 | ||
120 | + only_pk: null, | ||
121 | + all_sto: null, | ||
122 | + sec_sto: null, //选择了的门店分类 | ||
123 | + pickpu_list: null, //读出的所有门店list | ||
124 | + def_pickpu_list: null, //一开始5个门店list | ||
125 | + sec_pick_index: 0, //第二级门店选择ID | ||
126 | + fir_pick_index: 0, //第一级门店选择ID | ||
127 | + all_pick_list:null,//所有的门店先记录起来 | ||
128 | + | ||
129 | + //联系电话 | ||
130 | + mobile: '', | ||
131 | + //商品的活动类型 0普通 1秒杀 2团购 3优惠 4 积分购 6拼单 | ||
132 | + timer: [], | ||
133 | + | ||
134 | + //商品的购买次数 | ||
135 | + prom_buy_num: -1, | ||
136 | + g_buy_num: null, | ||
137 | + | ||
138 | + //会员自己的购买的拼单商品的情况 | ||
139 | + //购买的订单 | ||
140 | + buy_order: null, | ||
141 | + //1加入购物车 2立即购买 | ||
142 | + openSpecModal_ind: 0, | ||
143 | + | ||
144 | + //---计时器开关---- | ||
145 | + is_timer: 1, | ||
146 | + isshow: 0, | ||
147 | + bconfig: null, //基础配置 | ||
148 | + | ||
149 | + //会员分享的头像 | ||
150 | + share_head: "", | ||
151 | + share_goods_img: "", | ||
152 | + | ||
153 | + //----------视频图片data参数--------- | ||
154 | + current: 0, //图片计数 | ||
155 | + swiperCurrent: 0, //轮播的下标 | ||
156 | + hiddenn: 0, //控制轮播计数显示 | ||
157 | + | ||
158 | + currentTab: 0, // 选择器控制参数 | ||
159 | + mapurl: "", | ||
160 | + mapurl_f_img: "", | ||
161 | + videopicture: 0, //视频图片的控制 | ||
162 | + | ||
163 | + video: 0, //视频图片切换器 | ||
164 | + index: 0, | ||
165 | + noon: 0, //开始视频的隐藏 | ||
166 | + | ||
167 | + screenWidth: 0, | ||
168 | + canvasHidden: 1, | ||
169 | + | ||
170 | + //--推荐-- | ||
171 | + store_config: null, | ||
172 | + is_show_pl: 0, //是否品类 | ||
173 | + is_show_pp: 0, //是否品牌 | ||
174 | + is_show_gb: 0, //是否国别 | ||
175 | + is_closecoupon: 0, | ||
176 | + | ||
177 | + | ||
178 | + select_store: 0, //选择更多 | ||
179 | + index: 1, | ||
180 | + more_store: 0, //选择门店 | ||
181 | + sort_store: 0, //门店分类 | ||
182 | + choice_sort_store: 0, //选择分类门店 | ||
183 | + new_user: 0, //新用户 | ||
184 | + | ||
185 | + def_pick_store: null, // 默认的门店 | ||
186 | + fir_def_store:null, //客户默认的门店的 | ||
187 | + lat: null, //维度 | ||
188 | + lon: null, //经度 | ||
189 | + | ||
190 | + is_get_local_ok: 0, //获取坐标是否完成 | ||
191 | + region_name: "门店分类", //区域的名字 | ||
192 | + is_gps: 1, | ||
193 | + open_ind_store: 0, //哪里打开的门店列表的控制属性 | ||
194 | + default_store: {}, //创建添加默认门店地址的对象 | ||
195 | + | ||
196 | + comments_no_more:0, | ||
197 | + | ||
198 | + is_collect_load:0, //是不是处理 | ||
199 | + is_newsales_rules:0, //是否开启最新的门店规则,此时会新读门店,当点击选择门店时会触发读取线下库存 | ||
200 | + sales_rules:1, //默认是线上销售 | ||
201 | + | ||
202 | + wait_for_user_store:null, | ||
203 | + poster:null, //自定义海报 | ||
204 | + share_b_img:'', //自定义分享的背景 | ||
205 | + showPoster: false, | ||
206 | + hui_condition:null, | ||
207 | + sto_sele_name_1:'',//分享的门店名称 | ||
208 | + | ||
209 | + // 秒杀 | ||
210 | + prom_st: null, | ||
211 | + prom_r_null: 0, | ||
212 | + | ||
213 | + hiddenCS: true, //控制客服操作菜单显示和控制 | ||
214 | + | ||
215 | + openSpecModal_flash_normal: 0, | ||
216 | + keyword:'', //门店搜索 | ||
217 | + sec_i:-1,//选中分类门店 下标 | ||
218 | + | ||
219 | + c_curr_p:1 | ||
220 | + }, | ||
221 | + | ||
222 | + //------初始化加载---------- | ||
223 | + onLoad:function(t) { | ||
224 | + self = this; | ||
225 | + | ||
226 | + this.setData({ | ||
227 | + options: t, | ||
228 | + }); | ||
229 | + | ||
230 | + var ee = this, | ||
231 | + that = ee, | ||
232 | + th = ee, | ||
233 | + pre_id = t.pre_id, | ||
234 | + presell_id = t.prom_id, | ||
235 | + gid = t.goods_id, | ||
236 | + first_leader=t.first_leader, | ||
237 | + room_id = t.room_id, | ||
238 | + room_user_share = t.room_user_share; //如果是会员分享带有room_id的话,那么接下来会员分享就不传room_id | ||
239 | + | ||
240 | + var share_openid= t.share_openid; | ||
241 | + | ||
242 | + //检查测肤 | ||
243 | + getApp().check_skin_face(t,1,gid); | ||
244 | + | ||
245 | + //---获取手机地址坐标-- | ||
246 | + //--如果tg_id是空的话,分享回来-- | ||
247 | + if (gid == undefined || gid == null || gid == "") { | ||
248 | + var gid_str = decodeURIComponent(t.scene); | ||
249 | + gid_str=gid_str.split("_"); | ||
250 | + gid=gid_str[0]; | ||
251 | + if(gid_str.length>1){ | ||
252 | + first_leader=gid_str[1]; | ||
253 | + } | ||
254 | + //-- 如果有room_id的获取 -- | ||
255 | + if(gid_str.length>2 && gid_str[2]) { | ||
256 | + room_id=gid_str[2]; | ||
257 | + room_user_share=1; | ||
258 | + }; | ||
259 | + }; | ||
260 | + | ||
261 | + ee.setData({ gid: gid, pre_id: pre_id, presell_id: presell_id}); | ||
262 | + | ||
263 | + if(first_leader) { | ||
264 | + getApp().globalData.first_leader=first_leader; | ||
265 | + //调用接口判断是不是会员 | ||
266 | + getApp().request.promiseGet("/api/weshop/shoppingGuide/get/"+os.stoid+"/"+first_leader,{}).then(res=>{ | ||
267 | + if(res.data.code==0) { | ||
268 | + getApp().globalData.guide_id=res.data.data.id; | ||
269 | + getApp().globalData.guide_pick_id= res.data.data.pickup_id | ||
270 | + } | ||
271 | + }) | ||
272 | + } | ||
273 | + | ||
274 | + //-- 如果有房间号 -- | ||
275 | + if (room_id) { | ||
276 | + getApp().globalData.room_id = room_id; | ||
277 | + getApp().globalData.room_goods_id = gid; | ||
278 | + //如果是会员分享过来的要记录 | ||
279 | + if (room_user_share) | ||
280 | + getApp().globalData.room_user_share = room_user_share; | ||
281 | + | ||
282 | + if (share_openid) { | ||
283 | + this.get_room_share_guide(share_openid); | ||
284 | + } | ||
285 | + } | ||
286 | + | ||
287 | + | ||
288 | + var c_guide_id=t.c_guide_id; | ||
289 | + if(c_guide_id){ | ||
290 | + th.data.c_guide_id=c_guide_id; | ||
291 | + } | ||
292 | + | ||
293 | + getApp().getConfig(function(e) { | ||
294 | + ee.setData({sto_sele_name_1:e.store_name}) | ||
295 | + }) | ||
296 | + | ||
297 | + //----获取系统参数----- | ||
298 | + getApp().getConfig2(function (e) { | ||
299 | + ee.setData({ | ||
300 | + bconfig: e, | ||
301 | + sales_rules: e.sales_rules, | ||
302 | + }); | ||
303 | + | ||
304 | + if (e.categoryset.indexOf("," + 1 + ",") != -1) { | ||
305 | + ee.setData({ | ||
306 | + is_show_pl: 1 | ||
307 | + }); | ||
308 | + } | ||
309 | + if (e.categoryset.indexOf("," + 3 + ",") != -1) { | ||
310 | + ee.setData({ | ||
311 | + is_show_pp: 1 | ||
312 | + }); | ||
313 | + } | ||
314 | + if (e.categoryset.indexOf("," + 2 + ",") != -1) { | ||
315 | + ee.setData({ | ||
316 | + is_show_gb: 1 | ||
317 | + }); | ||
318 | + } | ||
319 | + // console.log(e); | ||
320 | + var json_d = JSON.parse(e.switch_list); | ||
321 | + ee.setData({ | ||
322 | + store_config: e, | ||
323 | + sys_switch: json_d, | ||
324 | + is_closecoupon: json_d.is_closecoupon, | ||
325 | + is_newsales_rules: json_d.is_newsales_rules | ||
326 | + }); | ||
327 | + ee.init(gid); | ||
328 | + | ||
329 | + //------几人评价------- | ||
330 | + //n.init(th, "", "comments"); | ||
331 | + wx.pageScrollTo && th.setData({ | ||
332 | + supportPageScroll: !0 | ||
333 | + }); | ||
334 | + | ||
335 | + }, 1); | ||
336 | + | ||
337 | + //获取用户设备信息,屏幕宽度 | ||
338 | + wx.getSystemInfo({ | ||
339 | + success: res => { | ||
340 | + that.setData({ | ||
341 | + screenWidth: res.screenWidth | ||
342 | + }) | ||
343 | + } | ||
344 | + }); | ||
345 | + | ||
346 | + }, | ||
347 | + | ||
348 | + //-- 获取直播的分享人的导购信息 -- | ||
349 | + async get_room_share_guide(share_openid) { | ||
350 | + | ||
351 | + var url = "/api/weshop/users/page"; | ||
352 | + var first_leader = 0; | ||
353 | + | ||
354 | + //调用接口判断是不是会员 | ||
355 | + await getApp().request.promiseGet(url, { | ||
356 | + data: { | ||
357 | + stoid: os.stoid, | ||
358 | + weapp_openid: share_openid | ||
359 | + } | ||
360 | + }).then(res => { | ||
361 | + if (ut.ajax_ok(res)) { | ||
362 | + first_leader = res.data.data.pageData[0].user_id; | ||
363 | + getApp().globalData.guide_id = res.data.data.id; | ||
364 | + } | ||
365 | + }) | ||
366 | + | ||
367 | + if (!first_leader) return false; | ||
368 | + | ||
369 | + getApp().globalData.first_leader = first_leader; | ||
370 | + | ||
371 | + //调用接口判断是不是会员 | ||
372 | + await getApp().request.promiseGet("/api/weshop/shoppingGuide/get/" + os.stoid + "/" + first_leader, {}).then(res => { | ||
373 | + if (res.data.code == 0) { | ||
374 | + getApp().globalData.guide_id = res.data.data.id; | ||
375 | + getApp().globalData.guide_pick_id= res.data.data.pickup_id | ||
376 | + } | ||
377 | + }) | ||
378 | + | ||
379 | + }, | ||
380 | + | ||
381 | + | ||
382 | + onReady() { | ||
383 | + // 用于控制保障服务折叠图标的显示 | ||
384 | + setTimeout(() => { | ||
385 | + wx.createSelectorQuery().selectAll(".showArea, .hideArea").boundingClientRect(res => { | ||
386 | + | ||
387 | + if(res.length != 0) { | ||
388 | + this.setData({ | ||
389 | + showFold: res[0].height < res[1].height, | ||
390 | + }); | ||
391 | + }; | ||
392 | + | ||
393 | + }).exec(); | ||
394 | + }, 1000); | ||
395 | + | ||
396 | + }, | ||
397 | + | ||
398 | + | ||
399 | + //------------程序初始化入口------------- | ||
400 | + async init(gid) { | ||
401 | + var ee = this, | ||
402 | + th = ee, | ||
403 | + gallery = null, | ||
404 | + is_collect = 0, | ||
405 | + collect_id = 0, | ||
406 | + categories3 = ee.data.categories3, | ||
407 | + fir_com = null, | ||
408 | + fir_quan = null, | ||
409 | + mapurl = null, | ||
410 | + mapurl_f_img = null; | ||
411 | + | ||
412 | + | ||
413 | + //------图片滚动---------- | ||
414 | + // await getApp().request.promiseGet("/api/weshop/goodsimages/page", { | ||
415 | + // data: { | ||
416 | + // store_id: os.stoid, | ||
417 | + // goods_id: gid, | ||
418 | + // }, | ||
419 | + // }).then(res => { | ||
420 | + | ||
421 | + // var t = res; | ||
422 | + // var g = t.data.data.pageData; | ||
423 | + // if (g.length == 0) { | ||
424 | + // var ie = { | ||
425 | + // "image_url": o.imghost + "/public/images/default_goods_image_240.gif" | ||
426 | + // }; | ||
427 | + // g.push(ie); | ||
428 | + // gallery = g; | ||
429 | + // return; | ||
430 | + // } | ||
431 | + // for (var i = 0; i < g.length; i++) { | ||
432 | + // if (g[i].image_url.indexOf(o.imghost) == -1) | ||
433 | + // g[i].image_url = o.imghost + g[i].image_url; | ||
434 | + // } | ||
435 | + // gallery = g; | ||
436 | + // }) | ||
437 | + | ||
438 | + | ||
439 | + // <---- 秒杀 | ||
440 | + | ||
441 | + //------是否收藏---------- | ||
442 | + await getApp().request.promiseGet("/api/weshop/goodscollect/page", { | ||
443 | + data: { | ||
444 | + store_id: os.stoid, | ||
445 | + goods_id: gid, | ||
446 | + user_id: oo.user_id, | ||
447 | + } | ||
448 | + }).then(res => { | ||
449 | + var t = res; | ||
450 | + var data = t.data.data.pageData; | ||
451 | + if (data && data.length > 0) { | ||
452 | + //ee.setData({ is_collect: 1, collect_id: data[0].collect_id, }); | ||
453 | + is_collect = 1; | ||
454 | + collect_id = data[0].collect_id; | ||
455 | + } | ||
456 | + }) | ||
457 | + | ||
458 | + //------获取评价的统计数量---- | ||
459 | + await getApp().request.promiseGet("/api/weshop/serviceComment/countlist/", { | ||
460 | + data: { | ||
461 | + store_id: os.stoid, | ||
462 | + service_id: gid | ||
463 | + }, | ||
464 | + }).then(res => { | ||
465 | + console.log('get评价统计数量', res.data.data); | ||
466 | + var t = res; | ||
467 | + var g = t.data.data[0]; | ||
468 | + if (g != null && g != undefined) { | ||
469 | + var allnum = g.c0 + g.c1 + g.c2 + g.c3 + g.c4 + g.c5; | ||
470 | + var num2 = g.c4 + g.c5; | ||
471 | + var num3 = g.c3; | ||
472 | + var num4 = g.c0 + g.c1 + g.c2; | ||
473 | + | ||
474 | + var dd = ee.data.categories3; | ||
475 | + dd[0].num = allnum; | ||
476 | + dd[1].num = g.cimg; | ||
477 | + dd[2].num = num2; | ||
478 | + dd[3].num = num3; | ||
479 | + dd[4].num = num4; | ||
480 | + | ||
481 | + categories3 = dd; | ||
482 | + } | ||
483 | + }); | ||
484 | + | ||
485 | + //----获取详情页的评价---- | ||
486 | + await getApp().request.promiseGet("/api/weshop/serviceComment/pageComment", { | ||
487 | + data: { | ||
488 | + store_id: os.stoid, | ||
489 | + service_id: gid, | ||
490 | + pageSize: 3, | ||
491 | + parent_id: 0, | ||
492 | + page: 1, | ||
493 | + is_show: 1, | ||
494 | + }, | ||
495 | + }).then(res => { | ||
496 | + console.log('get详情页评价', res.data.data); | ||
497 | + fir_com = res.data.data.pageData; | ||
498 | + }); | ||
499 | + | ||
500 | + if (fir_com) { | ||
501 | + for (var ind in fir_com) { | ||
502 | + if (fir_com[ind].head_pic == "") fir_com[ind].head_pic = ee.data.iurl + "/miniapp/images/hui_hear_pic.png"; | ||
503 | + if (fir_com[ind].img) fir_com[ind].img = ut.unserialize(fir_com[ind].img); | ||
504 | + if (fir_com[ind].weapp_img) fir_com[ind].weapp_img = JSON.parse(fir_com[ind].weapp_img); | ||
505 | + } | ||
506 | + }; | ||
507 | + | ||
508 | + | ||
509 | + // if (th.data.is_closecoupon != 1 && (!th.data.fir_quan || th.data.fir_quan.length<=0)) { | ||
510 | + // //----获取详情页的券的数量---- | ||
511 | + // await getApp().request.promiseGet("/api/weshop/prom/coupon/pageCouponList", { | ||
512 | + // data: { | ||
513 | + // store_id: os.stoid, | ||
514 | + // type: 1, | ||
515 | + // pageSize: 3, | ||
516 | + // page: 1, | ||
517 | + // is_share: 0, | ||
518 | + // }, | ||
519 | + // }).then(res1 => { | ||
520 | + // fir_quan = res1.data.data.pageData; | ||
521 | + // }) | ||
522 | + // } | ||
523 | + | ||
524 | + | ||
525 | + //this.getHistoryBuy(); //获取历史购买 | ||
526 | + ee.setData({ | ||
527 | + is_collect: is_collect, | ||
528 | + collect_id: collect_id, | ||
529 | + categories3: categories3, | ||
530 | + fir_quan: fir_quan, | ||
531 | + fir_comments: fir_com, | ||
532 | + // cardComments: fir_com, | ||
533 | + }); | ||
534 | + | ||
535 | + }, | ||
536 | + | ||
537 | + //检测有没有导购分享的门店 | ||
538 | + check_guide(func){ | ||
539 | + var first_leader=getApp().globalData.first_leader; | ||
540 | + if(!first_leader){ | ||
541 | + func(); | ||
542 | + return false; | ||
543 | + } | ||
544 | + if(this.data.is_geted_guide_pick){ | ||
545 | + func(); | ||
546 | + return false; | ||
547 | + } | ||
548 | + | ||
549 | + if(getApp().globalData.guide_pick_id){ | ||
550 | + func(); | ||
551 | + return false; | ||
552 | + } | ||
553 | + var th=this; | ||
554 | + getApp().request.promiseGet("/api/weshop/shoppingGuide/get/" + os.stoid + "/" + first_leader, {}).then(res => { | ||
555 | + if (res.data.code == 0) { | ||
556 | + getApp().globalData.guide_pick_id= res.data.data.pickup_id; | ||
557 | + } | ||
558 | + th.data.is_geted_guide_pick=1; | ||
559 | + func(); | ||
560 | + }) | ||
561 | + }, | ||
562 | + | ||
563 | + //---展示--- | ||
564 | + // gid 在onload阶段已经保存在this.data中 | ||
565 | + onShow: function() { | ||
566 | + | ||
567 | + //-- 看一下隐私政策要不要显示 -- | ||
568 | + var privacy_pop = this.selectComponent("#privacy_pop"); //组件的id | ||
569 | + if (privacy_pop) { | ||
570 | + privacy_pop.check_pri_show(); | ||
571 | + } | ||
572 | + | ||
573 | + getApp().check_can_share(); | ||
574 | + | ||
575 | + var that=this;var th=this; | ||
576 | + var ee = this,gid = this.data.gid, i = getApp().request; | ||
577 | + | ||
578 | + //判断是不是要跳转到拼团服务卡 | ||
579 | + getApp().check_go_fw(gid,function (act,url){ | ||
580 | + | ||
581 | + if(act){ | ||
582 | + wx.redirectTo({ | ||
583 | + url:url | ||
584 | + }) | ||
585 | + return false; | ||
586 | + } | ||
587 | + | ||
588 | + th.data.is_timer = 1; | ||
589 | + //获取用户的默认门店 | ||
590 | + th.check_guide(()=>{ | ||
591 | + getApp().get_user_store(function(e) { | ||
592 | + if(!e) { | ||
593 | + th.data.fir_def_store={}; //赋值空对象 | ||
594 | + return false; | ||
595 | + } | ||
596 | + | ||
597 | + if(getApp().globalData.is_dj_pk) th.setData({has_def:1}) | ||
598 | + | ||
599 | + var ee=JSON.parse(JSON.stringify(e)); | ||
600 | + console.log(e); | ||
601 | + | ||
602 | + //--定时器推迟一下-- | ||
603 | + var appd=getApp().globalData; | ||
604 | + var w_time = setInterval(function() { | ||
605 | + if (that.data.is_get_local_ok == 0) return false; | ||
606 | + if(!th.data.data){ | ||
607 | + return false; | ||
608 | + } | ||
609 | + var ser_card=th.data.data; | ||
610 | + //--如果默认门店不在等级卡的默认们店以内 | ||
611 | + if(ser_card.storageId!=null && ser_card.storageId!="" && ser_card.storageId.indexOf(ee.keyid)==-1){ | ||
612 | + ee.is_no_dis=1; | ||
613 | + } | ||
614 | + | ||
615 | + | ||
616 | + clearInterval(w_time); | ||
617 | + var distance = null; | ||
618 | + var e=JSON.parse(JSON.stringify(ee)); | ||
619 | + | ||
620 | + //如果有开启近距离的话,同时距离优不一样了 | ||
621 | + if (that.data.lat != null) { | ||
622 | + //如果经纬度有变化的话 | ||
623 | + if(e && appd.lat==that.data.lat && appd.lon==that.data.lon && e.distance>0 ){ | ||
624 | + that.data.fir_def_store=e; | ||
625 | + that.setData({ | ||
626 | + def_pick_store: e, | ||
627 | + sto_sele_name: e.pickup_name, | ||
628 | + sto_sele_id: e.pickup_id, | ||
629 | + sto_sele_distr: e.distr_type, | ||
630 | + sto_sele_keyid:e.keyid, | ||
631 | + }) | ||
632 | + }else{ | ||
633 | + //要用接口是获取距离,js的计算不准 | ||
634 | + getApp().request.promiseGet("/api/weshop/pickup/list",{ | ||
635 | + data:{store_id:os.stoid,pickup_id:e.pickup_id,lat:th.data.lat,lon: th.data.lon, is_pos: 1}, | ||
636 | + }).then(res=>{ | ||
637 | + if(ut.ajax_ok(res)){ | ||
638 | + e=res.data.data.pageData[0]; | ||
639 | + if (e){ | ||
640 | + e.is_no_dis=ee.is_no_dis; | ||
641 | + appd.pk_store=e; | ||
642 | + that.data.fir_def_store=e; | ||
643 | + | ||
644 | + console.log('get_user_store--2'); | ||
645 | + console.log(e); | ||
646 | + | ||
647 | + that.setData({ | ||
648 | + def_pick_store: e, | ||
649 | + sto_sele_name: e.pickup_name, | ||
650 | + sto_sele_id: e.pickup_id, | ||
651 | + sto_sele_distr: e.distr_type, | ||
652 | + sto_sele_keyid:e.keyid, | ||
653 | + }) | ||
654 | + } | ||
655 | + | ||
656 | + } | ||
657 | + }) | ||
658 | + } | ||
659 | + | ||
660 | + //e.distance = distance; | ||
661 | + appd.lat=that.data.lat; | ||
662 | + appd.lon=that.data.lon; | ||
663 | + | ||
664 | + } else { | ||
665 | + if (e) { | ||
666 | + | ||
667 | + console.log('get_user_store3---'); | ||
668 | + console.log(e); | ||
669 | + | ||
670 | + e.distance = null; | ||
671 | + that.data.fir_def_store=e; | ||
672 | + that.setData({ | ||
673 | + def_pick_store: e, | ||
674 | + sto_sele_name: e.pickup_name, | ||
675 | + sto_sele_id: e.pickup_id, | ||
676 | + sto_sele_distr: e.distr_type, | ||
677 | + sto_sele_keyid:e.keyid, | ||
678 | + }) | ||
679 | + } | ||
680 | + } | ||
681 | + }, 200) | ||
682 | + | ||
683 | + | ||
684 | + }); | ||
685 | + }) | ||
686 | + | ||
687 | + th.wait_for_store_config(); | ||
688 | + | ||
689 | + th.get_pre_prom(()=>{ | ||
690 | + i.get("/api/weshop/serviceCard/get/" + o.stoid + "/" + ee.data.gid, { | ||
691 | + failRollback: !0, | ||
692 | + success: function(t) { | ||
693 | + if (t.data.code == 0) { | ||
694 | + // console.log('GET pic and video'); | ||
695 | + if(t.data.data.listServiceVideos && t.data.data.listServiceVideos[0] && t.data.data.listServiceVideos[0].video_url) { | ||
696 | + that.setData({ | ||
697 | + mapurl: t.data.data.listServiceVideos[0].video_url, | ||
698 | + }); | ||
699 | + }; | ||
700 | + if(t.data.data.listServiceVideos && t.data.data.listServiceVideos[0] && t.data.data.listServiceVideos[0].video_img) { | ||
701 | + that.setData({ | ||
702 | + mapurl_f_img: t.data.data.listServiceVideos[0].video_img, | ||
703 | + }); | ||
704 | + }; | ||
705 | + if(t.data.data.listServiceImages) { | ||
706 | + that.setData({ | ||
707 | + gallery: t.data.data.listServiceImages, | ||
708 | + }); | ||
709 | + }; | ||
710 | + if(t.data.data.listServiceItem) { | ||
711 | + that.setData({ | ||
712 | + listServiceItem: t.data.data.listServiceItem, | ||
713 | + }); | ||
714 | + }; | ||
715 | + | ||
716 | + var data={ | ||
717 | + 'goods_name': t.data.data.serviceName, | ||
718 | + 'shop_price': t.data.data.money, | ||
719 | + 'show_price': t.data.data.show_price, | ||
720 | + 'validDays': t.data.data.validDays, | ||
721 | + 'serviceContent': t.data.data.serviceContent, | ||
722 | + 'image_url': t.data.data.imgUrl, | ||
723 | + 'goods_id': t.data.data.id, | ||
724 | + 'id': t.data.data.id, | ||
725 | + 'sales_sum': t.data.data.sales_sum, | ||
726 | + 'storageId':t.data.data.storageId, | ||
727 | + 'service_sn':t.data.data.serviceSn, | ||
728 | + 'goods_sn':t.data.data.serviceSn, | ||
729 | + 'listServiceVideos': t.data.data.listServiceVideos, | ||
730 | + 'erpItemID': t.data.data.erpItemID, | ||
731 | + } | ||
732 | + | ||
733 | + that.setData({ | ||
734 | + data:data, | ||
735 | + sele_g:data | ||
736 | + }); | ||
737 | + | ||
738 | + that.getTaohe(); | ||
739 | + that.get_sto(); | ||
740 | + // ----> 预售 | ||
741 | + let prom_type = th.data.options.prom_type; | ||
742 | + | ||
743 | + let goods_id = th.data.options.goods_id; | ||
744 | + if(!goods_id) goods_id = th.data.data.goods_id; | ||
745 | + | ||
746 | + //-----商品详情--- | ||
747 | + if(!t.data.data.serviceContent) t.data.data.serviceContent=" "; | ||
748 | + a.wxParse("content", "html", ut.format_content(t.data.data.serviceContent), ee, 6); | ||
749 | + e.wxParseAddFullImageUrl(ee, "content"); | ||
750 | + | ||
751 | + //获取重表 | ||
752 | + getApp().promiseGet("/api/weshop/serviceItem/list",{ | ||
753 | + data:{store_id:o.stoid,service_id:t.data.data.id} | ||
754 | + }).then(res=>{ | ||
755 | + if(res.data.code==0){ | ||
756 | + var list=res.data.data; | ||
757 | + that.setData({service_list:list}) | ||
758 | + } | ||
759 | + }) | ||
760 | + | ||
761 | + } else { | ||
762 | + wx.showModal({ | ||
763 | + title: t.data.msg, | ||
764 | + showCancel: !1, | ||
765 | + complete: function() { | ||
766 | + wx.navigateBack(); | ||
767 | + } | ||
768 | + }); | ||
769 | + }; | ||
770 | + } | ||
771 | + }); | ||
772 | + | ||
773 | + th.data.enterAddressPage && (this.data.enterAddressPage = !1); | ||
774 | + | ||
775 | + }) | ||
776 | + | ||
777 | + | ||
778 | + }) | ||
779 | + }, | ||
780 | + | ||
781 | + enterAddress: function() { | ||
782 | + this.data.enterAddressPage = !0, wx.navigateTo({ | ||
783 | + url: "/packageF/pages/user/address_list/address_list?operate=selectAddress" | ||
784 | + }); | ||
785 | + }, | ||
786 | + | ||
787 | + onUnload: function() { | ||
788 | + // for(var i = 1; i < 100; i++) { | ||
789 | + // clearInterval(i); | ||
790 | + // } | ||
791 | + }, | ||
792 | + | ||
793 | + onHide: function() { | ||
794 | + this.data.is_timer = 0; | ||
795 | + // for(var i = 1; i < 100; i++) { | ||
796 | + // clearInterval(i); | ||
797 | + // } | ||
798 | + }, | ||
799 | + //----------三个选项按钮----------- | ||
800 | + tabClick: function(t) { | ||
801 | + var e = t.currentTarget.id; | ||
802 | + this.setData({ | ||
803 | + activeCategoryId: e | ||
804 | + }), 1 == e ? this.tabGoodsContent() : 2 == e && this.tabComment(); | ||
805 | + }, | ||
806 | + | ||
807 | + // tabClick2: function(t) { | ||
808 | + // this.setData({ | ||
809 | + // activeCategoryId2: t.currentTarget.id | ||
810 | + // }); | ||
811 | + // }, | ||
812 | + | ||
813 | + tabClick3: function(t) { | ||
814 | + var e = this; | ||
815 | + if (t.currentTarget.id != this.data.activeCategoryId3) { | ||
816 | + e.data.c_curr_p = 1; | ||
817 | + this.setData({ | ||
818 | + activeCategoryId3: t.currentTarget.id, | ||
819 | + comments: null,comments_no_more:0,get_c:0, | ||
820 | + }); | ||
821 | + this.requestComments_new(); | ||
822 | + } | ||
823 | + }, | ||
824 | + | ||
825 | + // doScrollTop: function() { | ||
826 | + // wx.pageScrollTo({ | ||
827 | + // scrollTop: 0 | ||
828 | + // }); | ||
829 | + // }, | ||
830 | + | ||
831 | + tabComment: function() { | ||
832 | + this.setData({ | ||
833 | + activeCategoryId: 2,comments_no_more:0,get_c:0 | ||
834 | + }), this.data.comments || this.requestComments_new(); | ||
835 | + }, | ||
836 | + | ||
837 | + //商品详情的时候调用 | ||
838 | + tabGoodsContent: function() { | ||
839 | + var th = this, | ||
840 | + i = getApp().request; | ||
841 | + this.setData({ | ||
842 | + activeCategoryId: 1 | ||
843 | + }); | ||
844 | + }, | ||
845 | + | ||
846 | + | ||
847 | + | ||
848 | + | ||
849 | + //------------加入购物车-------------- | ||
850 | + addCart: function (t) { | ||
851 | + var th = this; | ||
852 | + var ind = t.currentTarget.dataset.openSpecModal_ind; | ||
853 | + if (!ind) ind = t.currentTarget.dataset.openspecmodal_ind; | ||
854 | + th.setData({ | ||
855 | + open_ind_store: ind | ||
856 | + }); | ||
857 | + | ||
858 | + th.add_cart_func(t); | ||
859 | + | ||
860 | + }, | ||
861 | + | ||
862 | + | ||
863 | + //-- 加入购物的函数 -- | ||
864 | + add_cart_func: function (t) { | ||
865 | + var i = getApp().request; | ||
866 | + if (oo.user_id == null) { | ||
867 | + return s.my_warnning("还未登录!", 0, this); | ||
868 | + } | ||
869 | + | ||
870 | + if (!getApp().globalData.userInfo) { | ||
871 | + return s.my_warnning("还未登录!", 0, this); | ||
872 | + } | ||
873 | + | ||
874 | + var e = this, th = e, o = this.data.sele_g, a = o.goods_id; | ||
875 | + //----------添加到购物车时,要判断限购数量,-------- | ||
876 | + e.get_buy_num2(function (ee) { | ||
877 | + //---判断商品是否超出限购--- | ||
878 | + if (th.data.g_buy_num != null && th.data.sele_g.viplimited > 0) { | ||
879 | + if (th.data.goodsInputNum + th.data.g_buy_num.get(th.data.sele_g.goods_id) > th.data.sele_g.viplimited) { | ||
880 | + wx.showModal({ | ||
881 | + title: '提示', | ||
882 | + content: '超出商品限购' | ||
883 | + }); | ||
884 | + return false; | ||
885 | + } | ||
886 | + } | ||
887 | + //---判断商品是否超出活动限购--- | ||
888 | + if (th.data.prom_buy_num != -1 && th.data.prom_buy_limit > 0) { | ||
889 | + if (th.data.goodsInputNum + th.data.prom_buy_num > th.data.prom_buy_limit) { | ||
890 | + wx.showModal({ | ||
891 | + title: '提示', | ||
892 | + content: '超出商品活动限购' | ||
893 | + }); | ||
894 | + return false; | ||
895 | + } | ||
896 | + } | ||
897 | + | ||
898 | + if (th.data.goodsInputNum <= 0) return s.my_warnning("商品数量不能为0", 0, th); | ||
899 | + if (th.data.sto_sele_name == null || th.data.sto_sele_name == undefined) | ||
900 | + th.setData({ | ||
901 | + sto_sele_name: "" | ||
902 | + }); | ||
903 | + if (th.data.sto_sele_name == "") return s.my_warnning("请选择门店", 0, th); | ||
904 | + | ||
905 | + //--------------此时操作的数据------------ | ||
906 | + var newd = { | ||
907 | + goods_id: o.id, | ||
908 | + goods_num: th.data.goodsInputNum, | ||
909 | + pick_id: th.data.sto_sele_id, | ||
910 | + user_id: oo.user_id, | ||
911 | + store_id: th.data.stoid, | ||
912 | + goods_price: o.shop_price, | ||
913 | + member_goods_price: o.shop_price, | ||
914 | + goods_name: o.goods_name, | ||
915 | + goods_sn: o.goods_sn, | ||
916 | + presell_list_id: th.data.presellList.id, | ||
917 | + erpItemID: o.erpItemID, | ||
918 | + keyid: th.data.sto_sele_keyid, | ||
919 | + }; | ||
920 | + | ||
921 | + //---是不是从收藏夹出来的--- | ||
922 | + if (th.data.c_guide_id) { | ||
923 | + newd['guide_id'] = th.data.c_guide_id; | ||
924 | + newd['guide_type'] = 2; | ||
925 | + if ("add" == t.currentTarget.dataset.action) newd['guide_type'] = 3; | ||
926 | + } else { | ||
927 | + if (getApp().globalData.guide_id) { | ||
928 | + newd['guide_id'] = getApp().globalData.guide_id; | ||
929 | + newd['guide_type'] = 0; | ||
930 | + if ("add" == t.currentTarget.dataset.action) newd['guide_type'] = 1; | ||
931 | + } | ||
932 | + } | ||
933 | + | ||
934 | + if(getApp().globalData.groupchat_id){ | ||
935 | + newd['groupchat_id'] = getApp().globalData.groupchat_id; | ||
936 | + } | ||
937 | + | ||
938 | + //让商品带上房间号 | ||
939 | + if (th.data.sys_switch.is_skuroom_id == 1) { | ||
940 | + if (th.data.data.goods_id == getApp().globalData.room_goods_id) { | ||
941 | + newd.room_id = getApp().globalData.room_id; | ||
942 | + } | ||
943 | + } else { | ||
944 | + if (newd.goods_id == getApp().globalData.room_goods_id) newd.room_id = getApp().globalData.room_id; | ||
945 | + } | ||
946 | + | ||
947 | + | ||
948 | + //如果有线下取价 | ||
949 | + if (o.offline_price) { | ||
950 | + newd.offline_price = o.offline_price; | ||
951 | + newd.pricing_type = o.pricing_type; | ||
952 | + } | ||
953 | + | ||
954 | + newd.goods_price = th.data.prom_price; | ||
955 | + newd.member_goods_price = th.data.prom_price, | ||
956 | + newd.prom_type = 8; | ||
957 | + newd.prom_id = th.data.presell_id; | ||
958 | + | ||
959 | + if (o.store_count <= 0) return s.my_warnning("库存已为空!", 0, th); | ||
960 | + if (o.store_count < e.data.goodsInputNum) return s.my_warnning("库存不足!", 0, th); | ||
961 | + th.add_cart_next(e, t, a, o, newd); //加入购物车下一步 | ||
962 | + | ||
963 | + | ||
964 | + }) | ||
965 | + }, | ||
966 | + | ||
967 | + //---加入购物车的最后一步--- | ||
968 | + add_cart_next(e, t, a, o, newd, CanOutQty) { | ||
969 | + var th = this, i = getApp().request; | ||
970 | + newd['pick_name'] = th.data.sto_sele_name; | ||
971 | + newd['pick_dis'] = th.data.sto_sele_distr; | ||
972 | + newd['fwk'] = 1 | ||
973 | + th.buyNow(newd); | ||
974 | + | ||
975 | + }, | ||
976 | + | ||
977 | + //----------立即购买----------- | ||
978 | + buyNow: function (e) { | ||
979 | + | ||
980 | + this.setData({ | ||
981 | + openSpecModal: 0, | ||
982 | + openSpecModal_inte: 0, | ||
983 | + openSpecModal_inte_normal: 0, | ||
984 | + openSpecModal_pt: 0, | ||
985 | + }) | ||
986 | + | ||
987 | + getApp().set_b_now(e); | ||
988 | + | ||
989 | + //如果是全额付款的话 | ||
990 | + if (this.data.presellForm.presell_type == 1) { | ||
991 | + getApp().goto("/packageC/pages/presell/cart/cart2") | ||
992 | + } else { | ||
993 | + getApp().goto("/packageC/pages/presell/cart/cart2_pre"); | ||
994 | + } | ||
995 | + }, | ||
996 | + | ||
997 | + | ||
998 | + | ||
999 | + | ||
1000 | + //----------增加购买数量----------- | ||
1001 | + addCartNum: function(t) { | ||
1002 | + this.checkCartNum(this.data.goodsInputNum + 1); | ||
1003 | + }, | ||
1004 | + //----------减少购买数量----------- | ||
1005 | + subCartNum: function(t) { | ||
1006 | + this.checkCartNum(this.data.goodsInputNum - 1); | ||
1007 | + }, | ||
1008 | + //----------输入框输入购买数量----------- | ||
1009 | + inputCartNum: function(t) { | ||
1010 | + this.checkCartNum(Number(t.detail.value)); | ||
1011 | + }, | ||
1012 | + | ||
1013 | + //------检查数量是不是超出限购------ | ||
1014 | + checkCartNum: async function(t) { | ||
1015 | + var th = this; | ||
1016 | + | ||
1017 | + if(!th.data.def_pick_store) { | ||
1018 | + wx.showModal({title: '请选择门店',}); | ||
1019 | + return false; | ||
1020 | + }; | ||
1021 | + | ||
1022 | + // 非秒杀活动 | ||
1023 | + if(this.data.prom_type != 1) { | ||
1024 | + this.setData({ | ||
1025 | + goodsInputNum: t, | ||
1026 | + }); | ||
1027 | + }; | ||
1028 | + | ||
1029 | + // 秒杀活动 | ||
1030 | + if(this.data.prom_type == 1) { | ||
1031 | + // 如果是秒杀活动下的单独购买,is_normal为1 | ||
1032 | + if(this.data.openSpecModal_flash_normal) this.data.is_normal = 1; | ||
1033 | + | ||
1034 | + if(this.data.is_normal) {// 单独购买 | ||
1035 | + this.setData({ | ||
1036 | + goodsInputNum: t, | ||
1037 | + }); | ||
1038 | + } else {// 秒杀购买 | ||
1039 | + | ||
1040 | + // 获取redis当前可以购买的数量 | ||
1041 | + // 如果数量为0,设置和显示已抢光 | ||
1042 | + // 否则,进一步判断是否超出限购或超出库存 | ||
1043 | + await this.getactLen().then(async function(res) { | ||
1044 | + // res: redis可购买数量 | ||
1045 | + // console.log('当前可以购买的数量:', res); | ||
1046 | + if(res <= 0) { | ||
1047 | + // 可购买数量<=0, 设置和显示已抢光 | ||
1048 | + th.setData({ | ||
1049 | + prom_r_null: 1, | ||
1050 | + }); | ||
1051 | + } else { | ||
1052 | + // 可购买数量>0 | ||
1053 | + // 计算自己还可以购买的数量 | ||
1054 | + // 自己还可购买的数量c = 每人活动限购数量a - 自己已经购买的数量b | ||
1055 | + // 如果限购数量a>redis可购买数量d,当增加数量t>d, 提示超出库存 | ||
1056 | + // 如果限购数量a<=redis可购买数量d, 当增加数量t>a,提示超出限购 | ||
1057 | + let actInfo = th.data.sele_g; | ||
1058 | + th.get_buy_num2(function (data) { | ||
1059 | + let limited = actInfo.buy_limit==0?100000:actInfo.buy_limit; // 限购数量a | ||
1060 | + let promcardbuynum = data.data.data.promcardbuynum; | ||
1061 | + let buyedNum = promcardbuynum; // 自己已经购买的数量b | ||
1062 | + let canBuyNum = limited - buyedNum; // 自己还可购买的数量c | ||
1063 | + | ||
1064 | + if(canBuyNum <= 0) { | ||
1065 | + canBuyNum = 0; | ||
1066 | + }; | ||
1067 | + | ||
1068 | + if(limited > res) { | ||
1069 | + if(t > res) { // t当前增减的数量 | ||
1070 | + // wx.showModal({ | ||
1071 | + // title: '超出活动库存', | ||
1072 | + // }); | ||
1073 | + getApp().my_warnning('超出活动库存', 0, self); | ||
1074 | + th.setData({ | ||
1075 | + goodsInputNum: res || 1, | ||
1076 | + }); | ||
1077 | + return false; | ||
1078 | + }; | ||
1079 | + }; | ||
1080 | + | ||
1081 | + if(limited <= res) { | ||
1082 | + if(t>canBuyNum) { | ||
1083 | + // wx.showModal({ | ||
1084 | + // title: '超出限购数量', | ||
1085 | + // }); | ||
1086 | + getApp().my_warnning('超出限购数量', 0, self); | ||
1087 | + th.setData({ | ||
1088 | + goodsInputNum: canBuyNum || 1, | ||
1089 | + }); | ||
1090 | + return false; | ||
1091 | + }; | ||
1092 | + }; | ||
1093 | + | ||
1094 | + th.setData({ | ||
1095 | + goodsInputNum: t, | ||
1096 | + }); | ||
1097 | + }); | ||
1098 | + }; | ||
1099 | + }); | ||
1100 | + | ||
1101 | + } | ||
1102 | + | ||
1103 | + | ||
1104 | + }; | ||
1105 | + | ||
1106 | + | ||
1107 | + | ||
1108 | + | ||
1109 | + | ||
1110 | + | ||
1111 | + | ||
1112 | + | ||
1113 | + | ||
1114 | + | ||
1115 | + | ||
1116 | + // var e = th.data.sele_g.goods_num; | ||
1117 | + // var p_type = th.data.prom_type; //&& p_type!=1 && p_type!=4 | ||
1118 | + // if (th.data.sales_rules == 2 && (p_type != 1 && p_type != 4 && p_type != 6 || th.data.openSpecModal_inte_normal == 1 || th.data.is_normal == 1)) { | ||
1119 | + // if (!th.data.def_pick_store) { | ||
1120 | + // wx.showModal({title: '请选择门店',}); | ||
1121 | + // return false; | ||
1122 | + // } else { | ||
1123 | + // e = th.data.def_pick_store.CanOutQty; | ||
1124 | + // } | ||
1125 | + // } | ||
1126 | + | ||
1127 | + | ||
1128 | + // th.setData({goodsInputNum: t}); | ||
1129 | + | ||
1130 | + // }); | ||
1131 | + | ||
1132 | + | ||
1133 | + }, | ||
1134 | + | ||
1135 | + | ||
1136 | + closeSpecModal: function() { | ||
1137 | + this.setData({ | ||
1138 | + openSpecModal: !1, | ||
1139 | + openSpecModal_pt: !1, | ||
1140 | + openSpecModal_flash_normal: !1, | ||
1141 | + }); | ||
1142 | + }, | ||
1143 | + | ||
1144 | + openSpecModel: function(t) { | ||
1145 | + var th=this; var open_store = t.currentTarget.dataset.ind; | ||
1146 | + if(getApp().is_sp_hao() && open_store==1){ | ||
1147 | + wx.showToast({ | ||
1148 | + title: "视频号商品不允许加入购物车", | ||
1149 | + icon: 'none', | ||
1150 | + duration: 2000 | ||
1151 | + }); | ||
1152 | + return false; | ||
1153 | + } | ||
1154 | + | ||
1155 | + | ||
1156 | + //--先判断会员状态-- | ||
1157 | + var user_info = getApp().globalData.userInfo; | ||
1158 | + if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) { | ||
1159 | + wx.navigateTo({ | ||
1160 | + url: '/packageE/pages/togoin/togoin', | ||
1161 | + }) | ||
1162 | + return false; | ||
1163 | + } | ||
1164 | + | ||
1165 | + this.setData({ | ||
1166 | + store: 0, | ||
1167 | + choice_sort_store: 0, | ||
1168 | + sort_store: 0, | ||
1169 | + open_ind_store: open_store, | ||
1170 | + }) | ||
1171 | + | ||
1172 | + | ||
1173 | + var ind = t.currentTarget.dataset.ind; | ||
1174 | + this.setData({ | ||
1175 | + openSpecModal: !0, | ||
1176 | + openSpecModal_ind: ind, | ||
1177 | + }); | ||
1178 | + | ||
1179 | + }, | ||
1180 | + | ||
1181 | + //---------点击收藏和不收藏------------ | ||
1182 | + collectGoods: function() { | ||
1183 | + var t = this,i = getApp().request; | ||
1184 | + var user_id = s.globalData.user_id; | ||
1185 | + if (user_id == '') { | ||
1186 | + getApp().getUserFir(function() {}); | ||
1187 | + getApp().showWarning("未登录"); | ||
1188 | + return false; | ||
1189 | + } else { | ||
1190 | + | ||
1191 | + if(t.data.is_collect_load) return false; | ||
1192 | + t.data.is_collect_load=1; | ||
1193 | + | ||
1194 | + if (t.data.is_collect == 1) { //删除收藏 | ||
1195 | + i.delete("/api/weshop/goodscollect/del/" + o.stoid + "/" + t.data.collect_id, { | ||
1196 | + success: function(e) { | ||
1197 | + t.data.is_collect_load=0; | ||
1198 | + if (e.data.code == 0) { | ||
1199 | + t.setData({ | ||
1200 | + is_collect: 0, | ||
1201 | + collect_id: 0, | ||
1202 | + }); | ||
1203 | + } | ||
1204 | + } | ||
1205 | + }); | ||
1206 | + } else { | ||
1207 | + var timestamp = Date.parse(new Date()); | ||
1208 | + timestamp = timestamp / 1000; | ||
1209 | + var d = { | ||
1210 | + goods_id: t.data.data.goods_id, | ||
1211 | + user_id: s.globalData.user_id, | ||
1212 | + store_id: o.stoid, | ||
1213 | + add_time: timestamp, | ||
1214 | + type: 1, | ||
1215 | + }; | ||
1216 | + //加入收藏夹就是导购的ID | ||
1217 | + if(getApp().globalData.guide_id){ | ||
1218 | + d.guide_id=getApp().globalData.guide_id; | ||
1219 | + d.guide_type=2; | ||
1220 | + } | ||
1221 | + if(getApp().globalData.groupchat_id){ | ||
1222 | + d.groupchat_id = getApp().globalData.groupchat_id; | ||
1223 | + } | ||
1224 | + i.post("/api/weshop/goodscollect/save", { //添加收藏 | ||
1225 | + data: d, | ||
1226 | + success: function(e) { | ||
1227 | + t.data.is_collect_load=0; | ||
1228 | + if (e.data.code == 0) { | ||
1229 | + t.setData({ | ||
1230 | + is_collect: 1, | ||
1231 | + collect_id: e.data.data.collect_id, | ||
1232 | + }); | ||
1233 | + } | ||
1234 | + } | ||
1235 | + }); | ||
1236 | + } | ||
1237 | + } | ||
1238 | + }, | ||
1239 | + //---------联系客服------------ | ||
1240 | + contactService: function () { | ||
1241 | + this.getTel() | ||
1242 | + .then(() => { | ||
1243 | + if(self.data.store_tel) { | ||
1244 | + wx.showModal({ | ||
1245 | + title: '联系客服', | ||
1246 | + content: '客服热线:' + self.data.store_tel, | ||
1247 | + confirmText: '拨打', | ||
1248 | + success(res) { | ||
1249 | + if(res.confirm) { | ||
1250 | + wx.makePhoneCall({ | ||
1251 | + phoneNumber: self.data.store_tel, | ||
1252 | + }) | ||
1253 | + }; | ||
1254 | + }, | ||
1255 | + }); | ||
1256 | + }; | ||
1257 | + }); | ||
1258 | + }, | ||
1259 | + // 获取客服电话 | ||
1260 | + getTel() { | ||
1261 | + return new Promise((resolve, reject) => { | ||
1262 | + s.getConfig(function (t) { | ||
1263 | + if (t.store_tel == undefined) { | ||
1264 | + getApp().request.get("/api/weshop/store/get/" + os.stoid, { | ||
1265 | + isShowLoading: 1, | ||
1266 | + data: {}, | ||
1267 | + success: function (rs) { | ||
1268 | + getApp().globalData.config = rs.data.data; | ||
1269 | + if (rs.data.data.store_tel == null && rs.data.data.store_tel == undefined) { | ||
1270 | + getApp().my_warnning("商家未设置电话", 0, th); | ||
1271 | + return false; | ||
1272 | + } | ||
1273 | + self.setData({ | ||
1274 | + store_tel: rs.data.data.store_tel, | ||
1275 | + }); | ||
1276 | + // s.confirmBox("请联系客服:" + rs.data.data.store_tel); | ||
1277 | + } | ||
1278 | + }) | ||
1279 | + } else { | ||
1280 | + self.setData({ | ||
1281 | + store_tel: t.store_tel, | ||
1282 | + }); | ||
1283 | + // s.confirmBox("请联系客服:" + t.store_tel); | ||
1284 | + }; | ||
1285 | + resolve(); | ||
1286 | + }); | ||
1287 | + }); | ||
1288 | + }, | ||
1289 | + //-------获取购物车数量---------- | ||
1290 | + requestCardNum: function() { | ||
1291 | + var t = this; | ||
1292 | + getApp().request.get("/api/weshop/cart/page", { | ||
1293 | + data: { | ||
1294 | + store_id: o.stoid, | ||
1295 | + user_id: s.globalData.user_id, | ||
1296 | + state:0, | ||
1297 | + is_gift:0 | ||
1298 | + }, | ||
1299 | + success: function(e) { | ||
1300 | + var num = 0; | ||
1301 | + for (var i = 0; i < e.data.data.pageData.length; i++) { | ||
1302 | + num += e.data.data.pageData[i].goods_num; | ||
1303 | + } | ||
1304 | + | ||
1305 | + /*-- | ||
1306 | + t.setData({ | ||
1307 | + cartGoodsNum: num | ||
1308 | + });--*/ | ||
1309 | + | ||
1310 | + //-- 读取服务卡的数量 -- | ||
1311 | + getApp().promiseGet("/api/weshop/cartService/page",{ | ||
1312 | + data:{ | ||
1313 | + store_id: s.globalData.setting.stoid, | ||
1314 | + user_id: s.globalData.user_id, | ||
1315 | + } | ||
1316 | + }).then(res=>{ | ||
1317 | + for (var i = 0; i < res.data.data.pageData.length; i++) { | ||
1318 | + num += res.data.data.pageData[i].goods_num; | ||
1319 | + } | ||
1320 | + t.setData({cartGoodsNum:num}); | ||
1321 | + }) | ||
1322 | + | ||
1323 | + | ||
1324 | + } | ||
1325 | + }); | ||
1326 | + }, | ||
1327 | + | ||
1328 | + //--点击分享事件--- | ||
1329 | + onShareAppMessage: function(t) { | ||
1330 | + | ||
1331 | + var th = this; | ||
1332 | + var price = th.data.data.shop_price; | ||
1333 | + | ||
1334 | + var title= th.data.data.service_name; | ||
1335 | + var img=th.data.iurl+th.data.data.img_url; | ||
1336 | + | ||
1337 | + | ||
1338 | + | ||
1339 | + var url="/packageA/pages/goodsInfo/goodsInfo?goods_id=" + th.data.gid; | ||
1340 | + if(th.data.prom_act){ | ||
1341 | + title=th.data.prom_act.share_title; | ||
1342 | + img=th.data.iurl+th.data.prom_act.share_img; | ||
1343 | + url="/packageC/pages/presell/cardInfo/goodsInfo?goods_id=" + th.data.gid+"&pre_id="+th.data.presellList.id; | ||
1344 | + price= th.data.presellList.presell_price; | ||
1345 | + } | ||
1346 | + | ||
1347 | + if(getApp().globalData.user_id) { | ||
1348 | + url+="&first_leader="+getApp().globalData.user_id; | ||
1349 | + } | ||
1350 | + | ||
1351 | + //-- 如果房间分享,且不是会员分享的 -- | ||
1352 | + if(getApp().globalData.room_id && | ||
1353 | + th.data.data.goods_id==getApp().globalData.room_goods_id && | ||
1354 | + !getApp().globalData.room_user_share | ||
1355 | + ){ | ||
1356 | + url+="&room_id="+getApp().globalData.room_id+"&room_user_share=1"; | ||
1357 | + } | ||
1358 | + | ||
1359 | + var ob={ | ||
1360 | + title: price + "元 " +title, | ||
1361 | + path:url, | ||
1362 | + imageUrl: img, | ||
1363 | + }; | ||
1364 | + | ||
1365 | + return ob; | ||
1366 | + | ||
1367 | + }, | ||
1368 | + | ||
1369 | + //-----图片失败,默认图片----- | ||
1370 | + bind_bnerr: function(e) { | ||
1371 | + var _errImg = e.target.dataset.errorimg; | ||
1372 | + var _errObj = {}; | ||
1373 | + _errObj[_errImg] = this.data.iurl + "/miniapp/images/default_g_img.gif"; | ||
1374 | + this.setData(_errObj) //注意这里的赋值方式,只是将数据列表中的此项图片路径值替换掉 ; | ||
1375 | + }, | ||
1376 | + | ||
1377 | + //-----图片失败,默认图片----- | ||
1378 | + bind_bnerr2: function(e) { | ||
1379 | + | ||
1380 | + var _errImg = e.target.dataset.errorimg; | ||
1381 | + var _errObj = {}; | ||
1382 | + _errObj[_errImg] = this.data.iurl + "/miniapp/images/hui_hear_pic.png" | ||
1383 | + this.setData(_errObj) //注意这里的赋值方式,只是将数据列表中的此项图片路径值替换掉 ; | ||
1384 | + }, | ||
1385 | + | ||
1386 | + | ||
1387 | + //---------拿出门店分类和门店------------ | ||
1388 | + get_sto(e) { | ||
1389 | + var is_normal=e; | ||
1390 | + var th = this,that=this; | ||
1391 | + | ||
1392 | + if (e == 1) { | ||
1393 | + th.setData({ | ||
1394 | + is_normal: 1 | ||
1395 | + }) | ||
1396 | + } else { | ||
1397 | + th.setData({ | ||
1398 | + is_normal: 0 | ||
1399 | + }) | ||
1400 | + } | ||
1401 | + | ||
1402 | + var timer_get = setInterval(function() { | ||
1403 | + if (th.data.is_get_local_ok == 0) return false; | ||
1404 | + if (!th.data.fir_def_store) return false; | ||
1405 | + var i = getApp().request; | ||
1406 | + if (!th.data.data) return false; | ||
1407 | + var dd= { | ||
1408 | + store_id: o.stoid, | ||
1409 | + isstop: 0, | ||
1410 | + is_pos: 1, | ||
1411 | + pageSize: 2000 | ||
1412 | + } | ||
1413 | + //如果有距离的话 | ||
1414 | + if (th.data.lat != null) { | ||
1415 | + dd.lat = th.data.lat; | ||
1416 | + dd.lon = th.data.lon; | ||
1417 | + } | ||
1418 | + clearInterval(timer_get); | ||
1419 | + | ||
1420 | + //如果会员是有默认的门店话 | ||
1421 | + if(!th.data.def_pick_store && th.data.fir_def_store){ | ||
1422 | + th.setData({def_pick_store:th.data.fir_def_store}); | ||
1423 | + } | ||
1424 | + | ||
1425 | + wx.showLoading({ | ||
1426 | + title:'加载中.' | ||
1427 | + }); | ||
1428 | + //----------获取门店---------------- | ||
1429 | + getApp().request.promiseGet("/api/weshop/pickup/list", { | ||
1430 | + data: dd, | ||
1431 | + }).then(res => { | ||
1432 | + var e = res; | ||
1433 | + if (e.data.code == 0 && e.data.data && e.data.data.pageData && e.data.data.pageData.length>0) { | ||
1434 | + | ||
1435 | + var his_cate_num=0; | ||
1436 | + for(let i in e.data.data.pageData){ | ||
1437 | + let item=e.data.data.pageData[i]; | ||
1438 | + if(item.category_id>0){ | ||
1439 | + his_cate_num=1;break; | ||
1440 | + } | ||
1441 | + } | ||
1442 | + e.his_cate_num=his_cate_num; | ||
1443 | + | ||
1444 | + //--普通门店排版,服务卡项有指定门店才能使用,所以要筛选一下-- | ||
1445 | + setTimeout(function(){ | ||
1446 | + var sto_list=th.data.data.storageId; | ||
1447 | + if(sto_list){ | ||
1448 | + for (var k = 0; k < e.data.data.pageData.length; k++) { | ||
1449 | + var it=e.data.data.pageData[k]; | ||
1450 | + if (sto_list.indexOf(it.keyid)==-1) { | ||
1451 | + //删除 | ||
1452 | + e.data.data.pageData.splice(k--, 1); | ||
1453 | + } | ||
1454 | + } | ||
1455 | + } | ||
1456 | + | ||
1457 | + //如果有秒杀的指定门店 | ||
1458 | + if(th.data.presellForm && th.data.presellForm.pick_up_lists && e.data.data.pageData.length && !is_normal){ | ||
1459 | + var pick_up_lists=th.data.presellForm.pick_up_lists; | ||
1460 | + for (var kq = 0; kq < e.data.data.pageData.length; kq++) { | ||
1461 | + var it0=e.data.data.pageData[kq]; | ||
1462 | + var idx0=pick_up_lists.findIndex(function (e){ | ||
1463 | + return e.pickup_id==it0.pickup_id; | ||
1464 | + }) | ||
1465 | + if (idx0<0) { | ||
1466 | + //删除 | ||
1467 | + e.data.data.pageData.splice(kq--, 1); | ||
1468 | + } | ||
1469 | + } | ||
1470 | + | ||
1471 | + if (th.data.def_pick_store && JSON.stringify(th.data.def_pick_store)!='{}'){ | ||
1472 | + //-- 查找一下门店有没有在 -- | ||
1473 | + var idx1=pick_up_lists.findIndex(function (e){ | ||
1474 | + return e.pickup_id==th.data.def_pick_store.pickup_id; | ||
1475 | + }) | ||
1476 | + if(idx1<0){ | ||
1477 | + //如果是秒杀的指定门店,就要设置秒杀的 | ||
1478 | + th.data.def_pick_store.is_no_dis_act=1; | ||
1479 | + that.setData({ | ||
1480 | + def_pick_store: th.data.def_pick_store | ||
1481 | + }) | ||
1482 | + } | ||
1483 | + } | ||
1484 | + | ||
1485 | + } | ||
1486 | + | ||
1487 | + //-- 如果门店过滤后,还会是数量 -- | ||
1488 | + if(e.data.data.pageData.length){ | ||
1489 | + //如果有开启距离的功能,没有设置默认门店,要用最近的门店作为默认门店 | ||
1490 | + if(dd.lat && (!th.data.def_pick_store || JSON.stringify(th.data.def_pick_store)=='{}') && th.data.bconfig && th.data.bconfig.is_sort_storage){ | ||
1491 | + th.setData({ | ||
1492 | + def_pick_store:e.data.data.pageData[0], | ||
1493 | + sto_sele_name: e.data.data.pageData[0].pickup_name, | ||
1494 | + sto_sele_id: e.data.data.pageData[0].pickup_id, | ||
1495 | + sto_sele_distr: e.data.data.pageData[0].distr_type, | ||
1496 | + sto_sele_keyid: e.data.data.pageData[0].keyid, | ||
1497 | + }); | ||
1498 | + th.data.fir_def_store=e.data.data.pageData[0]; | ||
1499 | + } | ||
1500 | + | ||
1501 | + //-- 如果有默认选择门店的时候,要把默认门店放在第一位,修改不要配送方式的判断 -- | ||
1502 | + if (th.data.def_pick_store && JSON.stringify(th.data.def_pick_store)!='{}'){ | ||
1503 | + for (var k = 0; k < e.data.data.pageData.length; k++) { | ||
1504 | + if (e.data.data.pageData[k].pickup_id == th.data.def_pick_store.pickup_id) { | ||
1505 | + e.data.data.pageData.splice(k, 1); //删除 | ||
1506 | + break; | ||
1507 | + } | ||
1508 | + } | ||
1509 | + e.data.data.pageData.splice(0, 0, th.data.def_pick_store); //添加 | ||
1510 | + } | ||
1511 | + | ||
1512 | + th.setData({all_pick_list:e.data.data.pageData,isshow:1}); | ||
1513 | + th.deal_pickup(e); | ||
1514 | + } | ||
1515 | + else{ | ||
1516 | + th.setData({ | ||
1517 | + isshow:1 | ||
1518 | + }) | ||
1519 | + wx.hideLoading(); | ||
1520 | + } | ||
1521 | + | ||
1522 | + | ||
1523 | + },800) | ||
1524 | + | ||
1525 | + } | ||
1526 | + }) | ||
1527 | + }, 200) | ||
1528 | + }, | ||
1529 | + //获取搜索门店输入的值 | ||
1530 | + input_store: function(e) { | ||
1531 | + this.setData({ | ||
1532 | + keyword: e.detail.value | ||
1533 | + }) | ||
1534 | + }, | ||
1535 | + //搜索门店 | ||
1536 | + searchfn(){ | ||
1537 | + let choice_sort_store = this.data.choice_sort_store | ||
1538 | + if (choice_sort_store==0) { //全局搜索 | ||
1539 | + let all_pick_list = this.data.all_pick_list | ||
1540 | + let def_pickpu_list = this.data.def_pickpu_list | ||
1541 | + let keyword = this.data.keyword | ||
1542 | + if (keyword) { | ||
1543 | + let arr=all_pick_list.filter( item =>{ | ||
1544 | + let i = item.pickup_name.indexOf(keyword) | ||
1545 | + if (i > -1) { | ||
1546 | + return true | ||
1547 | + }else{ | ||
1548 | + return false | ||
1549 | + } | ||
1550 | + }) | ||
1551 | + if (arr && arr.length>0) { | ||
1552 | + if(this.data.is_show_sto_cat==1){ | ||
1553 | + this.setData({ | ||
1554 | + def_pickpu_list:arr | ||
1555 | + }) | ||
1556 | + }else{ | ||
1557 | + this.setData({ | ||
1558 | + only_pk:arr | ||
1559 | + }) | ||
1560 | + } | ||
1561 | + }else{ | ||
1562 | + wx.showToast({ | ||
1563 | + title: '没有搜索到门店', | ||
1564 | + icon: 'none', | ||
1565 | + duration: 2000 | ||
1566 | + }) | ||
1567 | + } | ||
1568 | + }else{ | ||
1569 | + if (this.data.is_show_sto_cat==1) { | ||
1570 | + this.setData({ | ||
1571 | + def_pickpu_list:all_pick_list.slice(0,10) | ||
1572 | + }) | ||
1573 | + }else{ | ||
1574 | + this.setData({ | ||
1575 | + only_pk:all_pick_list | ||
1576 | + }) | ||
1577 | + } | ||
1578 | + | ||
1579 | + } | ||
1580 | + }else{ //分类下搜索 | ||
1581 | + let sec_i=this.data.sec_i | ||
1582 | + let all_sto = this.data.all_sto | ||
1583 | + let old_all_sto = this.data.old_all_sto | ||
1584 | + if (!old_all_sto) { | ||
1585 | + this.setData({ | ||
1586 | + old_all_sto:JSON.parse(JSON.stringify(all_sto)) | ||
1587 | + }) | ||
1588 | + } | ||
1589 | + let sec_sto= this.data.sec_sto | ||
1590 | + let sec_arr = this.data.old_all_sto[sec_i].s_arr | ||
1591 | + let keyword = this.data.keyword | ||
1592 | + let text='sec_sto.s_arr' | ||
1593 | + if (keyword) { | ||
1594 | + let arr=sec_arr.filter( item =>{ | ||
1595 | + let i = item.pickup_name.indexOf(keyword) | ||
1596 | + if (i > -1) { | ||
1597 | + return true | ||
1598 | + }else{ | ||
1599 | + return false | ||
1600 | + } | ||
1601 | + }) | ||
1602 | + if (arr && arr.length>0) { | ||
1603 | + this.setData({ | ||
1604 | + [text]:arr | ||
1605 | + }) | ||
1606 | + }else{ | ||
1607 | + wx.showToast({ | ||
1608 | + title: '没有搜索到门店', | ||
1609 | + icon: 'none', | ||
1610 | + duration: 2000 | ||
1611 | + }) | ||
1612 | + } | ||
1613 | + }else{ | ||
1614 | + if(this.data.old_all_sto){ | ||
1615 | + this.setData({ | ||
1616 | + [text]: this.data.old_all_sto[sec_i].s_arr | ||
1617 | + }) | ||
1618 | + }else{ | ||
1619 | + this.setData({ | ||
1620 | + [text]: all_sto[sec_i].s_arr | ||
1621 | + }) | ||
1622 | + } | ||
1623 | + } | ||
1624 | + | ||
1625 | + | ||
1626 | + } | ||
1627 | + }, | ||
1628 | + | ||
1629 | + | ||
1630 | + //------------处理门店--------------- | ||
1631 | + deal_pickup(e){ | ||
1632 | + var th=this; | ||
1633 | + if(!th.data.data) return false | ||
1634 | + wx.hideLoading(); | ||
1635 | + //单总量超出5个的时候 | ||
1636 | + if (e.data.data.total > 10 && e.his_cate_num) { | ||
1637 | + getApp().request.get("/api/weshop/storagecategory/page", { | ||
1638 | + data: { | ||
1639 | + store_id: o.stoid, | ||
1640 | + pageSize: 1000, | ||
1641 | + orderField:"sort", | ||
1642 | + orderType:'asc', | ||
1643 | + }, | ||
1644 | + success: function(ee) { | ||
1645 | + if (ee.data.code == 0) { | ||
1646 | + | ||
1647 | + var check_all_cate=0; | ||
1648 | + if (ee.data.data && ee.data.data.pageData && ee.data.data.pageData.length > 0){ | ||
1649 | + for(let i in ee.data.data.pageData){ | ||
1650 | + let item=ee.data.data.pageData[i]; | ||
1651 | + if(item.is_show==1){ | ||
1652 | + check_all_cate=1;break | ||
1653 | + } | ||
1654 | + } | ||
1655 | + } | ||
1656 | + | ||
1657 | + if (check_all_cate) { | ||
1658 | + | ||
1659 | + | ||
1660 | + var sto_cate = ee.data.data.pageData; | ||
1661 | + var sto_arr = e.data.data.pageData; | ||
1662 | + var newarr = new Array(); | ||
1663 | + var qita = new Array(); | ||
1664 | + | ||
1665 | + var is_del_pk=0; | ||
1666 | + | ||
1667 | + //----要进行门店分组-------- | ||
1668 | + for (var i = 0; i < sto_arr.length; i++) { | ||
1669 | + //找一下这个门店有没有在分类数组内 | ||
1670 | + var find2 = 0, find2name = "",sort=0; | ||
1671 | + is_del_pk=0; | ||
1672 | + for (var m = 0; m < sto_cate.length; m++) { | ||
1673 | + if (sto_arr[i].category_id == sto_cate[m].cat_id) { | ||
1674 | + if (sto_cate[m].is_show != 1) { | ||
1675 | + is_del_pk = 1; | ||
1676 | + sto_arr.splice(i, 1); | ||
1677 | + i--; | ||
1678 | + } else { | ||
1679 | + find2 = sto_cate[m].cat_id; | ||
1680 | + find2name = sto_cate[m].cat_name; | ||
1681 | + sort = sto_cate[m].sort; | ||
1682 | + is_del_pk = 0; | ||
1683 | + } | ||
1684 | + break; | ||
1685 | + } | ||
1686 | + } | ||
1687 | + if(is_del_pk) continue; | ||
1688 | + | ||
1689 | + if (newarr.length > 0) { | ||
1690 | + var find = 0; | ||
1691 | + //如果有找到,那门店就在这个分组内,否则,分类就要排在其他 | ||
1692 | + if (find2 != 0) { | ||
1693 | + for (var ii = 0; ii < newarr.length; ii++) { | ||
1694 | + if (sto_arr[i].category_id == newarr[ii].cat_id) { | ||
1695 | + newarr[ii].s_arr.push(sto_arr[i]); | ||
1696 | + find = 1; | ||
1697 | + break; | ||
1698 | + } | ||
1699 | + } | ||
1700 | + if (find == 0) { | ||
1701 | + var arr0 = new Array(); | ||
1702 | + arr0.push(sto_arr[i]); | ||
1703 | + var item = { | ||
1704 | + cat_id: find2, | ||
1705 | + name: find2name, | ||
1706 | + sort:sort, | ||
1707 | + s_arr: arr0 | ||
1708 | + }; | ||
1709 | + newarr.push(item); | ||
1710 | + } | ||
1711 | + } else { | ||
1712 | + qita.push(sto_arr[i]); | ||
1713 | + } | ||
1714 | + } else { | ||
1715 | + //如果有找到,那门店就在这个分组内,否则,分类就要排在其他 | ||
1716 | + if (find2 != 0) { | ||
1717 | + var arr0 = new Array(); | ||
1718 | + arr0.push(sto_arr[i]); | ||
1719 | + var item = { | ||
1720 | + cat_id: find2, | ||
1721 | + name: find2name, | ||
1722 | + sort:sort, | ||
1723 | + s_arr: arr0 | ||
1724 | + }; | ||
1725 | + newarr.push(item); | ||
1726 | + } else { | ||
1727 | + qita.push(sto_arr[i]); | ||
1728 | + } | ||
1729 | + } | ||
1730 | + } | ||
1731 | + | ||
1732 | + var def_arr = new Array(); | ||
1733 | + //-- 开始就看10个门店 -- | ||
1734 | + for (var k = 0; k < 10; k++) { | ||
1735 | + if (k == sto_arr.length) break; | ||
1736 | + def_arr.push(sto_arr[k]); | ||
1737 | + } | ||
1738 | + | ||
1739 | + th.setData({ | ||
1740 | + def_pickpu_list: def_arr, | ||
1741 | + pickpu_list: ee.data.data.pageData | ||
1742 | + }); | ||
1743 | + | ||
1744 | + //门店分类要排序下 | ||
1745 | + function compare(property){ | ||
1746 | + return function(a,b){ | ||
1747 | + var value1 = a[property]; | ||
1748 | + var value2 = b[property]; | ||
1749 | + return value1 - value2; | ||
1750 | + } | ||
1751 | + } | ||
1752 | + if(newarr.length>0) | ||
1753 | + newarr.sort(compare("sort")); | ||
1754 | + | ||
1755 | + //----安排其他的分类----- | ||
1756 | + if (qita.length > 0) { | ||
1757 | + var item = { | ||
1758 | + cat_id: -1, | ||
1759 | + name: "其他", | ||
1760 | + s_arr: qita | ||
1761 | + }; | ||
1762 | + newarr.push(item); | ||
1763 | + } | ||
1764 | + | ||
1765 | + var sd={ | ||
1766 | + all_sto: newarr, | ||
1767 | + is_show_sto_cat:1 | ||
1768 | + } | ||
1769 | + if(!sto_arr || sto_arr.length<=10){ | ||
1770 | + sd.is_show_sto_cat=-1; | ||
1771 | + sd.only_pk=sto_arr; | ||
1772 | + } | ||
1773 | + th.setData(sd); | ||
1774 | + | ||
1775 | + } else { | ||
1776 | + th.setData({ | ||
1777 | + is_show_sto_cat: -1, | ||
1778 | + only_pk: e.data.data.pageData | ||
1779 | + }); | ||
1780 | + //-----如果没有默认门店,要取第一个门店作为默认店.此时没有门店分类的情况------ | ||
1781 | + if (!th.data.def_pick_store) { | ||
1782 | + th.setData({def_pick_store:e.data.data.pageData[0]}) | ||
1783 | + } | ||
1784 | + } | ||
1785 | + } else { | ||
1786 | + th.setData({ | ||
1787 | + is_show_sto_cat: -1, | ||
1788 | + only_pk: e.data.data.pageData | ||
1789 | + }); | ||
1790 | + //-----如果没有默认门店,要取第一个门店作为默认店.此时没有门店分类的情况------ | ||
1791 | + if (!th.data.def_pick_store) { | ||
1792 | + th.setData({def_pick_store:e.data.data.pageData[0]}) | ||
1793 | + } | ||
1794 | + | ||
1795 | + } | ||
1796 | + } | ||
1797 | + }); | ||
1798 | + } else { | ||
1799 | + th.setData({ | ||
1800 | + is_show_sto_cat: 0, | ||
1801 | + only_pk: e.data.data.pageData | ||
1802 | + }); | ||
1803 | + //-----如果没有默认门店,要取第一个门店作为默认店------ | ||
1804 | + if (!th.data.def_pick_store && th.data.bconfig && th.data.bconfig.is_sort_storage) { | ||
1805 | + | ||
1806 | + if(e.data.data && e.data.data.pageData && e.data.data.pageData.length>0){ | ||
1807 | + th.setData({ | ||
1808 | + def_pick_store:e.data.data.pageData[0], | ||
1809 | + sto_sele_name: e.data.data.pageData[0].pickup_name, | ||
1810 | + sto_sele_id: e.data.data.pageData[0].pickup_id, | ||
1811 | + sto_sele_distr: e.data.data.pageData[0].distr_type, | ||
1812 | + sto_sele_keyid:e.data.data.pageData[0].keyid, | ||
1813 | + }) | ||
1814 | + } | ||
1815 | + | ||
1816 | + } | ||
1817 | + } | ||
1818 | + }, | ||
1819 | + | ||
1820 | + //加载更多是靠这个函数 | ||
1821 | + onReachBottom: function() { | ||
1822 | + if (this.data.activeCategoryId == 2){ | ||
1823 | + if(!this.data.comments_no_more) this.requestComments_new(); | ||
1824 | + } | ||
1825 | + | ||
1826 | + var goods_list = this.selectComponent("#goods_list"); //组件的id | ||
1827 | + if (goods_list) goods_list.get_list(); | ||
1828 | + }, | ||
1829 | + | ||
1830 | + | ||
1831 | + //---小于10的格式化函数---- | ||
1832 | + timeFormat(param) { | ||
1833 | + return param < 10 ? '0' + param : param; | ||
1834 | + }, | ||
1835 | + | ||
1836 | + | ||
1837 | + //--定义的保存图片方法,分享团--- | ||
1838 | + saveImageToPhotosAlbum: function() { | ||
1839 | + //--先判断会员状态-- | ||
1840 | + var user_info = getApp().globalData.userInfo; | ||
1841 | + if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) { | ||
1842 | + //getApp().my_warnning("请先登录",0,this); | ||
1843 | + wx.navigateTo({ url: '/packageE/pages/togoin/togoin', }) | ||
1844 | + return false; | ||
1845 | + } | ||
1846 | + | ||
1847 | + //类型 0普通商品 1秒杀商品 2商家和会员团 3阶梯团 4阶梯团 | ||
1848 | + var type = this.data.prom_type; | ||
1849 | + if (type == 6) type = 2; | ||
1850 | + if (this.data.prom_act && this.data.prom_act.kttype == 3) type = 3; | ||
1851 | + | ||
1852 | + wx.showLoading({ | ||
1853 | + title: '生成中...', | ||
1854 | + }) | ||
1855 | + var that = this, | ||
1856 | + th = that; | ||
1857 | + //设置画板显示,才能开始绘图 | ||
1858 | + that.setData({ | ||
1859 | + canvasHidden: false | ||
1860 | + }) | ||
1861 | + | ||
1862 | + var app = getApp(); | ||
1863 | + var unit = that.data.screenWidth / 750 * 1.35; //基础单位, | ||
1864 | + var path2 = that.data.data.original_img; | ||
1865 | + var scene = th.data.gid+""; | ||
1866 | + var user_id = getApp().globalData.user_id?getApp().globalData.user_id:0; | ||
1867 | + if(user_id>0) { | ||
1868 | + scene+="_"+user_id; | ||
1869 | + } | ||
1870 | + //-- 如果不是会员分享过来的要分享给别人 -- | ||
1871 | + if(getApp().globalData.room_id && th.data.data.goods_id==getApp().globalData.room_goods_id && !getApp().globalData.room_user_share) { | ||
1872 | + //固定房间是第3个字符 | ||
1873 | + if(!user_id) scene+="_0"; | ||
1874 | + scene+="_"+getApp().globalData.room_id ; | ||
1875 | + } | ||
1876 | + ///二微码 | ||
1877 | + var path3 = os.url + "/api/wx/open/app/user/getWeAppEwm/" + | ||
1878 | + os.stoid + "?sceneValue=" + scene + "&pageValue=pages/goods/goodsInfo/goodsInfo"; | ||
1879 | + | ||
1880 | + console.log(path3); | ||
1881 | + | ||
1882 | + //读取文件成功则OK-- | ||
1883 | + wx.getImageInfo({ | ||
1884 | + src: path3, | ||
1885 | + success: function(res) { | ||
1886 | + //回调写法 | ||
1887 | + th.get_head_temp(th.get_goods_temp, function() { | ||
1888 | + var vpath = res.path; | ||
1889 | + var context = wx.createCanvasContext('share'); | ||
1890 | + //先画背景 | ||
1891 | + var pg_path = "../../../images/share/share_bg.png"; | ||
1892 | + | ||
1893 | + // context.fillStyle="#FFFFFF"; | ||
1894 | + // context.fillRect(0,0,554 * unit, 899 * unit); | ||
1895 | + | ||
1896 | + //-- 如果有自定义海报的时候,判断背景的图片 -- | ||
1897 | + if(th.data.share_b_img){ | ||
1898 | + pg_path=th.data.share_b_img; | ||
1899 | + } | ||
1900 | + context.drawImage(pg_path, 0, 0, 554 * unit, 899 * unit); | ||
1901 | + | ||
1902 | + //-- 是自定义海报的情况下 -- | ||
1903 | + if(th.data.poster && parseInt(th.data.poster.style)==2) { | ||
1904 | + //在线上分享人的情况下 | ||
1905 | + if(parseInt(th.data.poster.show_headpic)){ | ||
1906 | + //获取坐标 | ||
1907 | + var x=parseFloat(th.data.poster.head_x)*2; | ||
1908 | + var y=parseFloat(th.data.poster.head_y)*2; | ||
1909 | + var x1=(x+90) *unit; | ||
1910 | + var y1=(y+50) *unit; | ||
1911 | + //--昵称--- | ||
1912 | + context.setFontSize(24 * unit) | ||
1913 | + context.setFillStyle("black") | ||
1914 | + context.fillText(app.globalData.userInfo.nickname, x1, y1); | ||
1915 | + var width = 24 * app.globalData.userInfo.nickname.length * unit + 4 * unit; | ||
1916 | + //强烈推荐 改许程 | ||
1917 | + var tj_path = "../../../images/share/q_tj.png"; | ||
1918 | + context.drawImage(tj_path, x1 + width, y1-22*unit, 85 * unit, 30 * unit); | ||
1919 | + context.setFontSize(16 * unit) | ||
1920 | + context.setLineJoin('round'); //交点设置成圆角 | ||
1921 | + context.setFillStyle("white") | ||
1922 | + context.fillText('强烈推荐', x1 + width+8*unit, y1-1*unit); | ||
1923 | + | ||
1924 | + //context.setFillStyle("black") | ||
1925 | + //context.setFontSize(24 * unit) | ||
1926 | + //context.fillText(getApp().globalData.config.store_name, 40 * unit, 130 * unit); | ||
1927 | + } | ||
1928 | + } else { | ||
1929 | + //--昵称--- | ||
1930 | + context.setFontSize(24 * unit) | ||
1931 | + context.setFillStyle("black") | ||
1932 | + context.fillText(app.globalData.userInfo.nickname, 152 * unit, 76 * unit); | ||
1933 | + var width = 24 * app.globalData.userInfo.nickname.length * unit + 2 * unit; | ||
1934 | + //强烈推荐 改许程 | ||
1935 | + var tj_path = "../../../images/share/q_tj.png"; | ||
1936 | + context.drawImage(tj_path, 152 * unit + width, 54 * unit, 85 * unit, 30 * unit); | ||
1937 | + context.setFontSize(16 * unit); | ||
1938 | + context.setLineJoin('round'); //交点设置成圆角 | ||
1939 | + context.setFillStyle("white"); | ||
1940 | + context.fillText('强烈推荐', 149 * unit + width + 15 * unit, 75 * unit); | ||
1941 | + } | ||
1942 | + | ||
1943 | + | ||
1944 | + //---产品名称--- | ||
1945 | + //文本换行 参数:1、canvas对象,2、文本 3、距离左侧的距离 4、距离顶部的距离 5、6、文本的宽度 | ||
1946 | + if(type!=4){ | ||
1947 | + context.setFillStyle("black"); | ||
1948 | + context.setFontSize(21.3 * unit) | ||
1949 | + th.draw_Text(context, th.data.data.goods_name, | ||
1950 | + 38 * unit, 180 * unit, 200 * unit, 279 * unit, unit); | ||
1951 | + //------产品的价格------- | ||
1952 | + context.setFontSize(23 * unit) | ||
1953 | + context.setFillStyle("red") | ||
1954 | + context.fillText("¥", 416 * unit, 185 * unit); | ||
1955 | + context.setFontSize(31 * unit) | ||
1956 | + var pri0 = th.data.data.shop_price; | ||
1957 | + if (th.data.prom_act) | ||
1958 | + pri0 = th.data.prom_act.price; | ||
1959 | + pri0 = parseFloat(pri0).toFixed(2); | ||
1960 | + context.fillText(pri0, 438 * unit, 185 * unit); | ||
1961 | + //---市场价划掉--- | ||
1962 | + context.setFillStyle("gray") | ||
1963 | + context.setFontSize(22 * unit) | ||
1964 | + context.fillText("¥" + th.data.data.market_price, 426 * unit, 213 * unit); | ||
1965 | + context.setStrokeStyle('gray'); | ||
1966 | + context.setLineWidth(1 * unit); | ||
1967 | + context.moveTo(426 * unit, 206 * unit); | ||
1968 | + context.lineTo(510 * unit, 206 * unit); | ||
1969 | + context.stroke(); | ||
1970 | + | ||
1971 | + }else{ | ||
1972 | + context.setFillStyle("black"); | ||
1973 | + context.setFontSize(21.3 * unit) | ||
1974 | + th.draw_Text(context, th.data.data.goods_name, | ||
1975 | + 38 * unit, 170 * unit, 20 * unit, 300*unit, unit); | ||
1976 | + //------ 产品的价格 ----- | ||
1977 | + var pri0 = th.data.prom_act.addmoney; | ||
1978 | + var integral=th.data.prom_act.integral; | ||
1979 | + var text= ""; | ||
1980 | + if(integral){text=integral+"积分"; } | ||
1981 | + if(pri0 && integral){ text+="+";} | ||
1982 | + if(pri0){ text+="¥"+pri0;} | ||
1983 | + | ||
1984 | + if(!pri0 && !integral){ text="0积分";} | ||
1985 | + context.setFillStyle("red"); | ||
1986 | + context.fillText(text, 38 * unit, 235 * unit); | ||
1987 | + | ||
1988 | + } | ||
1989 | + | ||
1990 | + //---中间大图--- | ||
1991 | + context.drawImage(th.data.share_goods_img, 70 * unit, 250 * unit, 408 * unit, 408 * unit); | ||
1992 | + //-------大图后面就不一样了----------- | ||
1993 | + switch (type) { | ||
1994 | + case 0: //普通商品的展示 | ||
1995 | + case 4: | ||
1996 | + //中间的几个字 | ||
1997 | + if(th.data.poster && parseInt(th.data.poster.style)==2 ){ | ||
1998 | + if(parseInt(th.data.poster.show_quality)){ | ||
1999 | + var g_path = "../../../images/share/s_gou.png"; | ||
2000 | + context.drawImage(g_path, 56 * unit, 670 * unit, 22 * unit, 22 * unit); | ||
2001 | + context.setFillStyle("red") | ||
2002 | + context.setFontSize(18 * unit) | ||
2003 | + context.fillText("正品保证", 84 * unit, 690 * unit); | ||
2004 | + | ||
2005 | + context.drawImage(g_path, 218 * unit, 670 * unit, 22 * unit, 22 * unit); | ||
2006 | + context.setFillStyle("red") | ||
2007 | + context.setFontSize(18 * unit) | ||
2008 | + context.fillText("纯实体店", 246 * unit, 690 * unit); | ||
2009 | + | ||
2010 | + context.drawImage(g_path, 388 * unit, 670 * unit, 22 * unit, 22 * unit); | ||
2011 | + context.setFillStyle("red") | ||
2012 | + context.setFontSize(18 * unit) | ||
2013 | + context.fillText("官方验证", 420 * unit, 690 * unit); | ||
2014 | + } | ||
2015 | + | ||
2016 | + }else{ | ||
2017 | + var g_path = "../../../images/share/s_gou.png"; | ||
2018 | + context.drawImage(g_path, 56 * unit, 670 * unit, 22 * unit, 22 * unit); | ||
2019 | + context.setFillStyle("red") | ||
2020 | + context.setFontSize(18 * unit) | ||
2021 | + context.fillText("正品保证", 84 * unit, 690 * unit); | ||
2022 | + | ||
2023 | + context.drawImage(g_path, 218 * unit, 670 * unit, 22 * unit, 22 * unit); | ||
2024 | + context.setFillStyle("red") | ||
2025 | + context.setFontSize(18 * unit) | ||
2026 | + context.fillText("纯实体店", 246 * unit, 690 * unit); | ||
2027 | + | ||
2028 | + context.drawImage(g_path, 388 * unit, 670 * unit, 22 * unit, 22 * unit); | ||
2029 | + context.setFillStyle("red") | ||
2030 | + context.setFontSize(18 * unit) | ||
2031 | + context.fillText("官方验证", 420 * unit, 690 * unit); | ||
2032 | + } | ||
2033 | + | ||
2034 | + | ||
2035 | + //---画线--- | ||
2036 | + context.setLineWidth(1 * unit) | ||
2037 | + context.moveTo(32 * unit, 710 * unit) | ||
2038 | + context.lineTo(520 * unit, 710 * unit) | ||
2039 | + context.stroke(); | ||
2040 | + | ||
2041 | + //---文字--- | ||
2042 | + context.setFillStyle("black") | ||
2043 | + context.setFontSize(22 * unit) | ||
2044 | + | ||
2045 | + if(type==0){ | ||
2046 | + // 原来start ---> | ||
2047 | + context.setFontSize(24 * unit) | ||
2048 | + context.fillText(th.data.sto_sele_name_1, 40 * unit, 766 * unit); | ||
2049 | + | ||
2050 | + context.setFontSize(22 * unit) | ||
2051 | + context.fillText("优惠乐翻天,精彩就在你身边", 40 * unit, 806 * unit); | ||
2052 | + context.fillText("长按识别二维码,立即开始抢购", 40 * unit, 846 * unit); | ||
2053 | + | ||
2054 | + }else{ | ||
2055 | + context.setFontSize(24 * unit) | ||
2056 | + context.fillText(th.data.sto_sele_name_1, 40 * unit, 766 * unit); | ||
2057 | + context.setFontSize(22 * unit) | ||
2058 | + context.fillText("长按识别二维码", 40 * unit, 806 * unit); | ||
2059 | + context.fillText("立即开始兑换", 40 * unit, 846 * unit); | ||
2060 | + | ||
2061 | + | ||
2062 | + } | ||
2063 | + | ||
2064 | + //---二维吗图--- | ||
2065 | + //-- 自定义海报 -- | ||
2066 | + if(th.data.poster){ | ||
2067 | + var erm_x= parseFloat(th.data.poster.ewm_x)*2; | ||
2068 | + var erm_y= parseFloat(th.data.poster.ewm_y)*2; | ||
2069 | + context.drawImage(vpath, erm_x * unit, erm_y * unit, 120 * unit, 120 * unit); | ||
2070 | + }else{ | ||
2071 | + //---二维吗图--- | ||
2072 | + context.drawImage(vpath, 410 * unit, 726 * unit, 115 * unit, 125 * unit); | ||
2073 | + } | ||
2074 | + | ||
2075 | + break; | ||
2076 | + case 1: //秒杀商品的展示 | ||
2077 | + //---画线--- | ||
2078 | + context.setLineWidth(1 * unit) | ||
2079 | + context.moveTo(32 * unit, 670 * unit) | ||
2080 | + context.lineTo(520 * unit, 670 * unit) | ||
2081 | + context.stroke(); | ||
2082 | + | ||
2083 | + //画秒杀的图片 | ||
2084 | + var miaos_path = '../../../images/share/miao_share.png'; | ||
2085 | + context.drawImage(miaos_path, 43 * unit, 700 * unit, 222 * unit, 40 * unit); | ||
2086 | + | ||
2087 | + context.setFillStyle("black") | ||
2088 | + context.setFontSize(24 * unit) | ||
2089 | + context.fillText(th.data.sto_sele_name_1, 40 * unit, 786 * unit); | ||
2090 | + //---文字--- | ||
2091 | + context.setFontSize(22 * unit) | ||
2092 | + context.setFillStyle("black") | ||
2093 | + context.fillText("特惠好物,限时秒杀", 40 * unit, 826 * unit); | ||
2094 | + context.fillText("长按识别二维码,立即开始抢购", 40 * unit, 866 * unit); | ||
2095 | + | ||
2096 | + | ||
2097 | + //---二维吗图--- | ||
2098 | + //-- 自定义海报 -- | ||
2099 | + if(th.data.poster){ | ||
2100 | + var erm_x= parseFloat(th.data.poster.ewm_x)*2; | ||
2101 | + var erm_y= parseFloat(th.data.poster.ewm_y)*2; | ||
2102 | + context.drawImage(vpath, erm_x * unit, erm_y * unit, 120 * unit, 120 * unit); | ||
2103 | + }else{ | ||
2104 | + //---二维吗图--- | ||
2105 | + context.drawImage(vpath, 420 * unit, 726 * unit, 120 * unit, 120 * unit); | ||
2106 | + } | ||
2107 | + break; | ||
2108 | + | ||
2109 | + case 2: //会员团和商家团的展示 | ||
2110 | + //---画线--- | ||
2111 | + context.setLineWidth(1 * unit) | ||
2112 | + context.moveTo(32 * unit, 670 * unit) | ||
2113 | + context.lineTo(520 * unit, 670 * unit) | ||
2114 | + context.stroke(); | ||
2115 | + //---文字--- | ||
2116 | + | ||
2117 | + context.setFillStyle("black") | ||
2118 | + context.setFontSize(24 * unit) | ||
2119 | + context.fillText(th.data.sto_sele_name_1, 40 * unit, 720 * unit); | ||
2120 | + | ||
2121 | + //绘制成团图片 | ||
2122 | + var ct_img = "../../../images/share/ct_num.png"; | ||
2123 | + context.drawImage(ct_img, 40 * unit, 740 * unit, 120 * unit, 30 * unit); | ||
2124 | + var ct_num = th.data.prom_act.ct_num; | ||
2125 | + context.setFontSize(14 * unit) | ||
2126 | + context.font = 'normal'; | ||
2127 | + context.setFillStyle("red") | ||
2128 | + if (ct_num < 10) { | ||
2129 | + context.fillText(ct_num + "人拼团", 92 * unit, 760 * unit); | ||
2130 | + } else { | ||
2131 | + context.fillText(ct_num + "人拼团", 86 * unit, 760 * unit); | ||
2132 | + } | ||
2133 | + context.setFontSize(22 * unit) | ||
2134 | + context.fillText("已拼" + th.data.prom_act.buy_num + "份", 166 * unit, 763 * unit); | ||
2135 | + | ||
2136 | + context.setFillStyle("gray") | ||
2137 | + context.fillText("快来和我一起拼团吧!", 40 * unit, 806 * unit); | ||
2138 | + context.setFillStyle("black") | ||
2139 | + context.font = 'normal bold 18px sans-serif'; | ||
2140 | + context.setFontSize(21.3 * unit) | ||
2141 | + context.fillText("长按识别二维码,立即参团", 40 * unit, 836 * unit); | ||
2142 | + | ||
2143 | + | ||
2144 | + //---二维吗图--- | ||
2145 | + //-- 自定义海报 -- | ||
2146 | + if(th.data.poster){ | ||
2147 | + var erm_x= parseFloat(th.data.poster.ewm_x)*2; | ||
2148 | + var erm_y= parseFloat(th.data.poster.ewm_y)*2; | ||
2149 | + context.drawImage(vpath, erm_x * unit, erm_y * unit, 120 * unit, 120 * unit); | ||
2150 | + }else{ | ||
2151 | + //---二维吗图--- | ||
2152 | + context.drawImage(vpath, 420 * unit, 726 * unit, 120 * unit, 120 * unit); | ||
2153 | + } | ||
2154 | + break | ||
2155 | + case 3: //阶梯团的展示 | ||
2156 | + //---画线--- | ||
2157 | + context.setLineWidth(1 * unit) | ||
2158 | + context.moveTo(32 * unit, 670 * unit) | ||
2159 | + context.lineTo(520 * unit, 670 * unit) | ||
2160 | + context.stroke(); | ||
2161 | + //---文字--- | ||
2162 | + | ||
2163 | + context.setFillStyle("black") | ||
2164 | + context.setFontSize(24 * unit) | ||
2165 | + context.fillText(th.data.sto_sele_name_1, 40 * unit, 720 * unit); | ||
2166 | + | ||
2167 | + //---绘制中间阶梯的价格--- | ||
2168 | + var list = th.data.prom_act.ct_rylist; | ||
2169 | + for (var i = 0; i < list.length; i++) { | ||
2170 | + var item = list[i]; | ||
2171 | + var wi = i * 90 * unit; | ||
2172 | + context.font = 'normal'; | ||
2173 | + context.setFontSize(16 * unit) | ||
2174 | + context.setFillStyle("red") | ||
2175 | + context.fillText("¥", 40 * unit + wi, 756 * unit); | ||
2176 | + context.setFontSize(22 * unit) | ||
2177 | + var pri = parseFloat(item.price).toFixed(2); | ||
2178 | + context.fillText(pri, 56 * unit + wi, 756 * unit); | ||
2179 | + context.setFillStyle("gray") | ||
2180 | + context.fillText("满" + item.rynum + "人", 40 * unit + wi, 786 * unit); | ||
2181 | + } | ||
2182 | + //----------------下面部分---------------- | ||
2183 | + // context.setFillStyle("gray") | ||
2184 | + // context.fillText("快来和我一起拼团吧!", 40 * unit, 830 * unit); | ||
2185 | + // context.setFillStyle("black") | ||
2186 | + // context.font = 'normal bold 18px sans-serif'; | ||
2187 | + // context.setFontSize(22 * unit) | ||
2188 | + // context.fillText("长按识别二维码,立即参团", 40 * unit, 860 * unit); | ||
2189 | + //context.setFillStyle("gray") | ||
2190 | + context.setFillStyle("black") | ||
2191 | + context.fillText("快来和我一起拼团吧!", 40 * unit, 820 * unit); | ||
2192 | + //context.font = 'normal bold 18px sans-serif'; | ||
2193 | + context.setFontSize(22 * unit) | ||
2194 | + context.fillText("长按识别二维码,立即参团", 40 * unit, 850 * unit); | ||
2195 | + | ||
2196 | + | ||
2197 | + //-- 自定义海报 -- | ||
2198 | + if(th.data.poster){ | ||
2199 | + var erm_x= parseFloat(th.data.poster.ewm_x)*2; | ||
2200 | + var erm_y= parseFloat(th.data.poster.ewm_y)*2; | ||
2201 | + context.drawImage(vpath, erm_x * unit, erm_y * unit, 120 * unit, 120 * unit); | ||
2202 | + }else{ | ||
2203 | + //---二维吗图--- | ||
2204 | + context.drawImage(vpath, 420 * unit, 726 * unit, 120 * unit, 120 * unit); | ||
2205 | + } | ||
2206 | + break | ||
2207 | + | ||
2208 | + | ||
2209 | + } | ||
2210 | + | ||
2211 | + | ||
2212 | + //--- 如果是自定义海报的时候 --- | ||
2213 | + if(th.data.poster && parseInt(th.data.poster.style)==2){ | ||
2214 | + | ||
2215 | + //如果显示会员信息的话 | ||
2216 | + if(parseInt(th.data.poster.show_headpic)){ | ||
2217 | + //获取坐标 | ||
2218 | + var x= parseFloat(th.data.poster.head_x)*2; | ||
2219 | + var y=parseFloat(th.data.poster.head_y)*2; | ||
2220 | + //---绘制圆形要放在最后---- | ||
2221 | + context.save(); | ||
2222 | + context.beginPath(); | ||
2223 | + var h_x = x* unit; | ||
2224 | + var h_y = y * unit; | ||
2225 | + var h_r = 40 * unit; | ||
2226 | + var cx = h_x + h_r; | ||
2227 | + var cy = h_y + h_r; | ||
2228 | + context.arc(cx, cy, h_r, 0, Math.PI * 2, false); | ||
2229 | + context.closePath(); | ||
2230 | + context.fill(); | ||
2231 | + context.clip(); | ||
2232 | + context.drawImage(th.data.share_head, h_x, h_y, h_r * 2, h_r * 2); | ||
2233 | + context.restore(); | ||
2234 | + } | ||
2235 | + | ||
2236 | + }else{ | ||
2237 | + //---绘制圆形要放在最后---- | ||
2238 | + context.save(); | ||
2239 | + context.beginPath(); | ||
2240 | + var h_x = 60 * unit; | ||
2241 | + var h_y = 24 * unit; | ||
2242 | + var h_r = 40 * unit; | ||
2243 | + var cx = h_x + h_r; | ||
2244 | + var cy = h_y + h_r; | ||
2245 | + context.arc(cx, cy, h_r, 0, Math.PI * 2, false); | ||
2246 | + context.closePath(); | ||
2247 | + context.fill(); | ||
2248 | + context.clip(); | ||
2249 | + context.drawImage(th.data.share_head, h_x, h_y, h_r * 2, h_r * 2); | ||
2250 | + context.restore(); | ||
2251 | + } | ||
2252 | + | ||
2253 | + | ||
2254 | + //把画板内容绘制成图片,并回调 画板图片路径 | ||
2255 | + context.draw(false, function() { | ||
2256 | + setTimeout(function() { | ||
2257 | + wx.canvasToTempFilePath({ | ||
2258 | + x: 0, | ||
2259 | + y: 0, | ||
2260 | + width: 750, | ||
2261 | + height: 1217, | ||
2262 | + destWidth: 1.2 * 750 * 750 / that.data.screenWidth, | ||
2263 | + destHeight: 1.2 * 1217 * 750 / that.data.screenWidth, | ||
2264 | + canvasId: 'share', | ||
2265 | + success: function(res) { | ||
2266 | + that.setData({ | ||
2267 | + shareImgPath: res.tempFilePath, | ||
2268 | + canvasHidden: true | ||
2269 | + }) | ||
2270 | + if (!res.tempFilePath) { | ||
2271 | + wx.showModal({ | ||
2272 | + title: '提示', | ||
2273 | + content: '图片绘制中,请稍后重试', | ||
2274 | + showCancel: false | ||
2275 | + }) | ||
2276 | + return false; | ||
2277 | + } | ||
2278 | + // wx.previewImage({ | ||
2279 | + // //将图片预览出来 | ||
2280 | + // urls: [that.data.shareImgPath] | ||
2281 | + // }); | ||
2282 | + that.setData({ | ||
2283 | + showPoster: true, | ||
2284 | + }); | ||
2285 | + wx.hideLoading(); | ||
2286 | + } | ||
2287 | + }) | ||
2288 | + }, 500) | ||
2289 | + | ||
2290 | + }); | ||
2291 | + }); | ||
2292 | + } | ||
2293 | + }); | ||
2294 | + }, | ||
2295 | + | ||
2296 | + | ||
2297 | + //文本换行 参数:1、canvas对象,2、文本 3、距离左侧的距离 4、距离顶部的距离 5、6、文本的宽度 | ||
2298 | + draw_Text: function(ctx, str, leftWidth, initHeight, titleHeight, canvasWidth, unit) { | ||
2299 | + var lineWidth = 0; | ||
2300 | + var lastSubStrIndex = 0; //每次开始截取的字符串的索引 | ||
2301 | + var han = 0; | ||
2302 | + for (let i = 0; i < str.length; i++) { | ||
2303 | + if (han == 2) return; | ||
2304 | + //lineWidth += ctx.measureText(str[i]).width; | ||
2305 | + lineWidth += ut.measureText(str[i], 21.3 * unit); | ||
2306 | + if (lineWidth > canvasWidth) { | ||
2307 | + han++; | ||
2308 | + | ||
2309 | + if (han == 2) | ||
2310 | + ctx.fillText(str.substring(lastSubStrIndex, i) + '...', leftWidth, initHeight); //绘制截取部分 | ||
2311 | + else | ||
2312 | + ctx.fillText(str.substring(lastSubStrIndex, i), leftWidth, initHeight); | ||
2313 | + | ||
2314 | + initHeight += 22; //22为字体的高度 | ||
2315 | + lineWidth = 0; | ||
2316 | + lastSubStrIndex = i; | ||
2317 | + titleHeight += 20; | ||
2318 | + } | ||
2319 | + if (i == str.length - 1) { //绘制剩余部分 | ||
2320 | + ctx.fillText(str.substring(lastSubStrIndex, i + 1), leftWidth, initHeight); | ||
2321 | + } | ||
2322 | + } | ||
2323 | + }, | ||
2324 | + | ||
2325 | + // ----视频图片---- | ||
2326 | + // 图片计数器 | ||
2327 | + swiperChange: function (e) { | ||
2328 | + var that = this; | ||
2329 | + if (e.detail.current > 0) { | ||
2330 | + that.setData({ | ||
2331 | + hiddenn: 1, | ||
2332 | + videopicture: 1, | ||
2333 | + }) | ||
2334 | + } else { | ||
2335 | + that.setData({ | ||
2336 | + hiddenn: 0, | ||
2337 | + videopicture: 0, | ||
2338 | + }) | ||
2339 | + } | ||
2340 | + if (e.detail.source == 'touch') { | ||
2341 | + that.setData({ | ||
2342 | + current: e.detail.current | ||
2343 | + }) | ||
2344 | + } | ||
2345 | + }, | ||
2346 | + | ||
2347 | + /*---视频相关--*/ | ||
2348 | + videopicture: function (e) { | ||
2349 | + var vipi = e.currentTarget.dataset.vipi; | ||
2350 | + this.setData({ | ||
2351 | + videopicture: vipi, | ||
2352 | + swiperCurrent: vipi, | ||
2353 | + noon: 0, | ||
2354 | + current: 1 | ||
2355 | + }); | ||
2356 | + }, | ||
2357 | + | ||
2358 | + videoPlay: function (e) { | ||
2359 | + var _index = e.currentTarget.id | ||
2360 | + this.setData({ | ||
2361 | + _index: _index, | ||
2362 | + noon: 1 | ||
2363 | + }) | ||
2364 | + | ||
2365 | + setTimeout(function () { | ||
2366 | + //将点击视频进行播放 | ||
2367 | + var videoContext = wx.createVideoContext(_index) | ||
2368 | + videoContext.play(); | ||
2369 | + }, 500) | ||
2370 | + }, | ||
2371 | + | ||
2372 | + //--获取头像的本地缓存,回调写法-- | ||
2373 | + get_head_temp: function(tt, func) { | ||
2374 | + var ee = this; | ||
2375 | + if (ee.data.share_head) { | ||
2376 | + tt(func); | ||
2377 | + return false; | ||
2378 | + } | ||
2379 | + //---获取分享图片的本地地址,头像和商品图片---- | ||
2380 | + var path2 = getApp().globalData.userInfo.head_pic; | ||
2381 | + if (path2 == "") { | ||
2382 | + ee.data.share_head = "../../../images/share/hui_hear_pic.png"; | ||
2383 | + tt(func); | ||
2384 | + } else { | ||
2385 | + path2 = path2.replace("http://thirdwx.qlogo.cn", "https://wx.qlogo.cn"); | ||
2386 | + path2 = path2.replace("https://thirdwx.qlogo.cn", "https://wx.qlogo.cn"); | ||
2387 | + wx.getImageInfo({ | ||
2388 | + src: path2, | ||
2389 | + success: function(res) { | ||
2390 | + //res.path是网络图片的本地地址 | ||
2391 | + ee.data.share_head = res.path; | ||
2392 | + tt(func); | ||
2393 | + }, | ||
2394 | + fail: function(res) { | ||
2395 | + ee.data.share_head = "../../../images/share/hui_hear_pic.png"; //分享的图片不能用网络的 | ||
2396 | + tt(func); | ||
2397 | + } | ||
2398 | + }); | ||
2399 | + } | ||
2400 | + }, | ||
2401 | + //--获取商品图片的本地缓存,回调写法-- | ||
2402 | + get_goods_temp: function(tt) { | ||
2403 | + var ee = this; | ||
2404 | + if (ee.data.share_goods_img) { | ||
2405 | + tt(); | ||
2406 | + return false; | ||
2407 | + } | ||
2408 | + //获取商品是分享图信息 | ||
2409 | + wx.getImageInfo({ | ||
2410 | + src: ee.data.data.original_img, | ||
2411 | + success: function(res) { | ||
2412 | + //res.path是网络图片的本地地址 | ||
2413 | + ee.data.share_goods_img = res.path; | ||
2414 | + tt(); | ||
2415 | + }, | ||
2416 | + fail: function(res) { | ||
2417 | + //获取默认空白图 | ||
2418 | + wx.getImageInfo({ | ||
2419 | + src: ee.data.iurl+'/miniapp/images/default_g_img.gif', | ||
2420 | + success: function(res) { | ||
2421 | + ee.data.share_goods_img = res.path; //分享的图片不能用网络的 | ||
2422 | + tt(); | ||
2423 | + } | ||
2424 | + }) | ||
2425 | + | ||
2426 | + } | ||
2427 | + }); | ||
2428 | + }, | ||
2429 | + | ||
2430 | + | ||
2431 | + //--跳转到商品详情页面 -- | ||
2432 | + go_goods: function(e) { | ||
2433 | + var gid = e.currentTarget.dataset.gid; | ||
2434 | + var url = "/pages/goods/goodsInfo/goodsInfo?goods_id=" + gid; | ||
2435 | + getApp().goto(url); | ||
2436 | + }, | ||
2437 | + | ||
2438 | + | ||
2439 | + pop_err_img: function(e) { | ||
2440 | + var txt = e.currentTarget.dataset.errorimg; | ||
2441 | + var ob = {}; | ||
2442 | + ob[txt] = this.data.iurl + "/miniapp/images/default_g_img.gif"; | ||
2443 | + this.setData(ob); | ||
2444 | + }, | ||
2445 | + | ||
2446 | + // 选择门店 | ||
2447 | + choice_store: function(ee) { | ||
2448 | + this.setData({ | ||
2449 | + keyword:'' | ||
2450 | + }) | ||
2451 | + var th = this; | ||
2452 | + var ind=ee.currentTarget.dataset.ind; | ||
2453 | + var bconfig = th.data.bconfig; | ||
2454 | + | ||
2455 | + //--先判断会员状态-- | ||
2456 | + var user_info = getApp().globalData.userInfo; | ||
2457 | + if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) { | ||
2458 | + wx.navigateTo({ | ||
2459 | + url: '/packageE/pages/togoin/togoin', | ||
2460 | + }) | ||
2461 | + return false; | ||
2462 | + } | ||
2463 | + | ||
2464 | + | ||
2465 | + //如果开启了,则不在选择门店 | ||
2466 | + if(this.data.sys_switch.is_pricing_open_store && getApp().globalData.pk_store){ | ||
2467 | + return false; | ||
2468 | + } | ||
2469 | + if(!th.data.only_pk && !th.data.def_pickpu_list){ | ||
2470 | + getApp().confirmBox("暂无可售门店", null, 25000, !1); | ||
2471 | + return false; | ||
2472 | + } | ||
2473 | + | ||
2474 | + if(th.data.only_pk && !th.data.only_pk.length){ | ||
2475 | + getApp().confirmBox("暂无可售门店", null, 25000, !1); | ||
2476 | + return false; | ||
2477 | + } | ||
2478 | + if(th.data.def_pickpu_list && !th.data.def_pickpu_list.length){ | ||
2479 | + getApp().confirmBox("暂无可售门店", null, 25000, !1); | ||
2480 | + return false; | ||
2481 | + } | ||
2482 | + | ||
2483 | + | ||
2484 | + if (bconfig && bconfig.is_sort_storage) { | ||
2485 | + wx.getLocation({ | ||
2486 | + type: 'gcj02', | ||
2487 | + success: function(res) { | ||
2488 | + | ||
2489 | + th.data.lat = res.latitude; | ||
2490 | + th.data.lon = res.longitude; | ||
2491 | + th.data.is_get_local_ok = 1; | ||
2492 | + th.setData({ is_gps: 1 }); | ||
2493 | + th.get_sto(th.data.is_normal); | ||
2494 | + }, | ||
2495 | + fail: function(res) { | ||
2496 | + | ||
2497 | + th.data.is_get_local_ok = 1; | ||
2498 | + th.get_sto(th.data.is_normal); | ||
2499 | + if (res.errCode == 2) { | ||
2500 | + th.setData({is_gps: 0}); | ||
2501 | + if (th.data.is_gps == 0) { | ||
2502 | + getApp().confirmBox("请开启GPS定位", null, 25000, !1); | ||
2503 | + } | ||
2504 | + } else { | ||
2505 | + th.setData({ is_gps: "3" }); | ||
2506 | + } | ||
2507 | + | ||
2508 | + } | ||
2509 | + }) | ||
2510 | + }else{ | ||
2511 | + th.data.is_get_local_ok = 1; | ||
2512 | + th.get_sto(th.data.is_normal); | ||
2513 | + } | ||
2514 | + | ||
2515 | + if(ind!=undefined && ind!=null ){ | ||
2516 | + this.setData({ | ||
2517 | + open_ind_store: ind, | ||
2518 | + store: 1, | ||
2519 | + openSpecModal: !1, | ||
2520 | + openSpecModal_pt: !1 | ||
2521 | + }) | ||
2522 | + }else{ | ||
2523 | + this.setData({ | ||
2524 | + store: 1, | ||
2525 | + openSpecModal: !1, | ||
2526 | + openSpecModal_pt: !1 | ||
2527 | + }) | ||
2528 | + } | ||
2529 | + }, | ||
2530 | + //关闭选择门店 | ||
2531 | + close_popup: function(e) { | ||
2532 | + var th=this; | ||
2533 | + this.setData({ | ||
2534 | + store: 0, | ||
2535 | + choice_sort_store: 0, | ||
2536 | + sort_store: 0, | ||
2537 | + fir_pick_index:0, | ||
2538 | + sec_pick_index:0 | ||
2539 | + }) | ||
2540 | + | ||
2541 | + var openindstore=this.data.open_ind_store; | ||
2542 | + if (openindstore == 1) { | ||
2543 | + th.setData({ | ||
2544 | + openSpecModal: !0, | ||
2545 | + openSpecModal_ind: openindstore, | ||
2546 | + }); | ||
2547 | + } else if (openindstore == 2) { | ||
2548 | + th.setData({ | ||
2549 | + openSpecModal: !0, | ||
2550 | + openSpecModal_ind: openindstore, | ||
2551 | + }); | ||
2552 | + } | ||
2553 | + else if (openindstore == 4) { //4就是拼团 | ||
2554 | + th.setData({ | ||
2555 | + openSpecModal_pt: 1, //打开拼团购买界面 | ||
2556 | + store: 0, //关闭门店 | ||
2557 | + choice_sort_store: 0, //关闭门店2级 | ||
2558 | + sort_store: 0, //关闭门店2级 | ||
2559 | + }); | ||
2560 | + } | ||
2561 | + else { | ||
2562 | + th.setData({ | ||
2563 | + store: 0, | ||
2564 | + choice_sort_store: 0, | ||
2565 | + sort_store: 0 | ||
2566 | + }) | ||
2567 | + } | ||
2568 | + }, | ||
2569 | + | ||
2570 | + //选择更多门店 | ||
2571 | + more_store: function() { | ||
2572 | + this.setData({ | ||
2573 | + sort_store: 1 | ||
2574 | + }); | ||
2575 | + }, | ||
2576 | + | ||
2577 | + sort_store: function() { }, | ||
2578 | + // 返回按钮 | ||
2579 | + returns: function() { | ||
2580 | + this.setData({ | ||
2581 | + sort_store: 0, | ||
2582 | + choice_sort_store: 0 | ||
2583 | + }); | ||
2584 | + }, | ||
2585 | + //---选择分类门店--- | ||
2586 | + choice_sort_store: function(e) { | ||
2587 | + var index = e.currentTarget.dataset.index; | ||
2588 | + var region_name = e.currentTarget.dataset.region; | ||
2589 | + var item = this.data.all_sto[index]; | ||
2590 | + this.setData({ | ||
2591 | + region_name: region_name, | ||
2592 | + sort_store: 0, | ||
2593 | + choice_sort_store: 1, | ||
2594 | + sec_sto: item, | ||
2595 | + sec_i:index, | ||
2596 | + sec_pick_index: 0 | ||
2597 | + }); | ||
2598 | + }, | ||
2599 | + | ||
2600 | + choose_for_store_fir: function(e) { | ||
2601 | + var index_c = e.currentTarget.dataset.ind; | ||
2602 | + var th=this; | ||
2603 | + th.setData({ | ||
2604 | + fir_pick_index: index_c | ||
2605 | + }) | ||
2606 | + | ||
2607 | + }, | ||
2608 | + | ||
2609 | + //确定def_pick为选择的门店 | ||
2610 | + sure_pick: function(e) { | ||
2611 | + var th = this; | ||
2612 | + var item = null; | ||
2613 | + var openindstore = th.data.open_ind_store; | ||
2614 | + | ||
2615 | + if (th.data.choice_sort_store == 0) { | ||
2616 | + var index = th.data.fir_pick_index; | ||
2617 | + if (th.data.is_show_sto_cat == 1) { | ||
2618 | + item = th.data.def_pickpu_list[index]; | ||
2619 | + } else { | ||
2620 | + item = th.data.only_pk?th.data.only_pk[index]:null; //当没有门店分类的时候 | ||
2621 | + } | ||
2622 | + | ||
2623 | + } else { | ||
2624 | + var index = th.data.sec_pick_index; | ||
2625 | + item = th.data.sec_sto.s_arr[index]; | ||
2626 | + } | ||
2627 | + | ||
2628 | + if(!item) return false; | ||
2629 | + | ||
2630 | + | ||
2631 | + var ser_card=this.data.data; | ||
2632 | + //判断门店的配送方式是不是匹配 | ||
2633 | + if(ser_card.storageId!=null && ser_card.storageId!="" && ser_card.storageId.indexOf(item.keyid)==-1){ | ||
2634 | + wx.showToast({ | ||
2635 | + title: "该门店无此服务项目,请重新选择!", | ||
2636 | + icon: 'none', | ||
2637 | + duration: 2000 | ||
2638 | + }); | ||
2639 | + return false; | ||
2640 | + } | ||
2641 | + | ||
2642 | + if(!item) return false; | ||
2643 | + | ||
2644 | + th.setData({ | ||
2645 | + def_pick_store: item, | ||
2646 | + sto_sele_name: item.pickup_name, | ||
2647 | + sto_sele_id: item.pickup_id, | ||
2648 | + sto_sele_keyid: item.keyid, | ||
2649 | + sto_sele_distr: item.distr_type, | ||
2650 | + store: 0, | ||
2651 | + choice_sort_store: 0, | ||
2652 | + fir_pick_index: 0 | ||
2653 | + }); | ||
2654 | + | ||
2655 | + if (openindstore == 1) { | ||
2656 | + th.setData({ | ||
2657 | + openSpecModal: !0, | ||
2658 | + openSpecModal_ind: openindstore, | ||
2659 | + }); | ||
2660 | + } else if (openindstore == 2) { | ||
2661 | + th.setData({ | ||
2662 | + openSpecModal: !0, | ||
2663 | + openSpecModal_ind: openindstore, | ||
2664 | + }); | ||
2665 | + } | ||
2666 | + else if(openindstore == 4) { //4就是拼团 | ||
2667 | + th.setData({ | ||
2668 | + openSpecModal_pt: 1, //打开拼团购买界面 | ||
2669 | + store: 0, //关闭门店 | ||
2670 | + choice_sort_store: 0, //关闭门店2级 | ||
2671 | + sort_store: 0, //关闭门店2级 | ||
2672 | + }); | ||
2673 | + } | ||
2674 | + else { | ||
2675 | + th.setData({ | ||
2676 | + store: 0, | ||
2677 | + choice_sort_store: 0, | ||
2678 | + sort_store: 0 | ||
2679 | + }) | ||
2680 | + } | ||
2681 | + }, | ||
2682 | + | ||
2683 | + //---点击二级之后的选择--- | ||
2684 | + choose_for_store: function(e) { | ||
2685 | + var index_c = e.currentTarget.dataset.ind; | ||
2686 | + var th=this; | ||
2687 | + th.setData({ | ||
2688 | + sec_pick_index: index_c, | ||
2689 | + fir_pick_index: index_c | ||
2690 | + }) | ||
2691 | + | ||
2692 | + }, | ||
2693 | + //把选择的门店设置成默认的门店def_pick | ||
2694 | + set_def_pick: function(e) { | ||
2695 | + var th = this; | ||
2696 | + var item = null; | ||
2697 | + if (th.data.choice_sort_store == 0) { | ||
2698 | + var index = th.data.fir_pick_index; | ||
2699 | + if (th.data.is_show_sto_cat == 1) { | ||
2700 | + item = th.data.def_pickpu_list[index]; | ||
2701 | + } else { | ||
2702 | + item = th.data.only_pk?th.data.only_pk[index]:null; //当没有门店分类的时候 | ||
2703 | + } | ||
2704 | + } else { | ||
2705 | + var index = th.data.sec_pick_index; | ||
2706 | + item = th.data.sec_sto.s_arr[index]; | ||
2707 | + } | ||
2708 | + | ||
2709 | + if(!item) return false; | ||
2710 | + | ||
2711 | + //判断门店的配送方式是不是匹配 | ||
2712 | + var ser_card=this.data.data; | ||
2713 | + //判断门店的配送方式是不是匹配 | ||
2714 | + if(ser_card.storageId!=null && ser_card.storageId!="" && ser_card.storageId.indexOf(item.keyid)==-1){ | ||
2715 | + wx.showToast({ | ||
2716 | + title: "该门店无此服务项目,请重新选择!", | ||
2717 | + icon: 'none', | ||
2718 | + duration: 2000 | ||
2719 | + }); | ||
2720 | + return false; | ||
2721 | + } | ||
2722 | + | ||
2723 | + | ||
2724 | + | ||
2725 | + var store_id = o.stoid; | ||
2726 | + var user_id = getApp().globalData.user_id; | ||
2727 | + var def_pickup_id = item.pickup_id; | ||
2728 | + | ||
2729 | + getApp().request.put('/api/weshop/users/update', { | ||
2730 | + data: { | ||
2731 | + user_id:user_id, | ||
2732 | + def_pickup_id:def_pickup_id | ||
2733 | + }, | ||
2734 | + success: function(res) { | ||
2735 | + if (res.data.code == 0) { | ||
2736 | + if (th.data.choice_sort_store == 0) th.setData({ | ||
2737 | + fir_pick_index: 0 | ||
2738 | + }); | ||
2739 | + getApp().globalData.pk_store = item; | ||
2740 | + } else { | ||
2741 | + //s.showWarning("设置默认门店地址失败", null, 500, !1); | ||
2742 | + getApp().my_warnning("设置默认门店地址失败",0,th) | ||
2743 | + } | ||
2744 | + | ||
2745 | + } | ||
2746 | + }); | ||
2747 | + | ||
2748 | + | ||
2749 | + if(!item) return false; | ||
2750 | + | ||
2751 | + th.setData({ | ||
2752 | + def_pick_store: item, | ||
2753 | + sto_sele_name: item.pickup_name, | ||
2754 | + sto_sele_id: item.pickup_id, | ||
2755 | + sto_sele_keyid: item.keyid, | ||
2756 | + sto_sele_distr: item.distr_type, | ||
2757 | + store: 0, | ||
2758 | + choice_sort_store: 0 | ||
2759 | + }); | ||
2760 | + | ||
2761 | + var openindstore = th.data.open_ind_store; | ||
2762 | + if (openindstore == 1) { | ||
2763 | + th.setData({ | ||
2764 | + openSpecModal: !0, | ||
2765 | + openSpecModal_ind: openindstore, | ||
2766 | + store: 0, | ||
2767 | + choice_sort_store: 0, | ||
2768 | + sort_store: 0, | ||
2769 | + }); | ||
2770 | + } else if (openindstore == 2) { | ||
2771 | + th.setData({ | ||
2772 | + openSpecModal: !0, | ||
2773 | + openSpecModal_ind: openindstore, | ||
2774 | + store: 0, | ||
2775 | + choice_sort_store: 0, | ||
2776 | + sort_store: 0, | ||
2777 | + }); | ||
2778 | + } | ||
2779 | + else if (openindstore == 4) { //4就是拼团 | ||
2780 | + th.setData({ | ||
2781 | + openSpecModal_pt: 1, //打开拼团购买界面 | ||
2782 | + store: 0, //关闭门店 | ||
2783 | + choice_sort_store: 0, //关闭门店2级 | ||
2784 | + sort_store: 0, //关闭门店2级 | ||
2785 | + }); | ||
2786 | + } | ||
2787 | + | ||
2788 | + else { | ||
2789 | + th.setData({ | ||
2790 | + store: 0, | ||
2791 | + choice_sort_store: 0, | ||
2792 | + sort_store: 0, | ||
2793 | + }) | ||
2794 | + } | ||
2795 | + | ||
2796 | + }, | ||
2797 | + | ||
2798 | + wait_for_store_config: function() { | ||
2799 | + var th = this; | ||
2800 | + var t_time = setInterval(function() { | ||
2801 | + if (th.data.bconfig == null) false; | ||
2802 | + var e = th.data.bconfig; | ||
2803 | + if (e && e.is_sort_storage) { | ||
2804 | + wx.getLocation({ | ||
2805 | + type: 'gcj02', | ||
2806 | + success: function(res) { | ||
2807 | + th.data.lat = res.latitude; | ||
2808 | + th.data.lon = res.longitude; | ||
2809 | + th.data.is_get_local_ok = 1; | ||
2810 | + }, | ||
2811 | + fail: function(res) { | ||
2812 | + if (res.errCode == 2) { | ||
2813 | + th.setData({ | ||
2814 | + is_gps: 0 | ||
2815 | + }); | ||
2816 | + if (th.data.is_gps == 0) { | ||
2817 | + getApp().confirmBox("请开启GPS定位", null, 10000, !1); | ||
2818 | + } | ||
2819 | + | ||
2820 | + } else { | ||
2821 | + th.setData({ | ||
2822 | + is_gps: "3" | ||
2823 | + }); | ||
2824 | + } | ||
2825 | + | ||
2826 | + th.data.is_get_local_ok = 1; | ||
2827 | + } | ||
2828 | + }) | ||
2829 | + } else { | ||
2830 | + th.data.is_get_local_ok = 1; | ||
2831 | + } | ||
2832 | + clearInterval(t_time); | ||
2833 | + }, 500) | ||
2834 | + }, | ||
2835 | + | ||
2836 | + | ||
2837 | + //-- 根据ID拿出门店 -- | ||
2838 | + get_pick_from_list(pid){ | ||
2839 | + var all_pick_list=this.data.all_pick_list; | ||
2840 | + for(var i in all_pick_list){ | ||
2841 | + var item=all_pick_list[i]; | ||
2842 | + if(item.pickup_id==pid){ return item;} | ||
2843 | + } | ||
2844 | + }, | ||
2845 | + | ||
2846 | + closePoster() { | ||
2847 | + this.setData({ | ||
2848 | + showPoster: false, | ||
2849 | + }); | ||
2850 | + }, | ||
2851 | + | ||
2852 | + // 保存图片到手机 | ||
2853 | + savePic() { | ||
2854 | + console.log('保存图片'); | ||
2855 | + var self = this; | ||
2856 | + // 获取用户的当前设置,返回值中有小程序已经向用户请求过的权限 | ||
2857 | + this.getSetting().then((res) => { | ||
2858 | + // 判断用户是否授权了保存到相册的权限,如果没有发起授权 | ||
2859 | + if (!res.authSetting['scope.writePhotosAlbum']) { | ||
2860 | + this.authorize().then(() => { | ||
2861 | + // 同意授权后保存下载文件 | ||
2862 | + this.saveImage(self.data.shareImgPath) | ||
2863 | + .then(() => { | ||
2864 | + self.setData({ | ||
2865 | + showPoster: false | ||
2866 | + }); | ||
2867 | + }); | ||
2868 | + }) | ||
2869 | + } else { | ||
2870 | + // 如果已经授权,保存下载文件 | ||
2871 | + this.saveImage(self.data.shareImgPath) | ||
2872 | + .then(() => { | ||
2873 | + self.setData({ showPoster: false }); | ||
2874 | + }); | ||
2875 | + } | ||
2876 | + | ||
2877 | + }) | ||
2878 | + }, | ||
2879 | + | ||
2880 | + // 获取用户已经授予了哪些权限 | ||
2881 | + getSetting() { | ||
2882 | + return new Promise((resolve, reject) => { | ||
2883 | + wx.getSetting({ | ||
2884 | + success: res => { | ||
2885 | + resolve(res) | ||
2886 | + } | ||
2887 | + }) | ||
2888 | + }) | ||
2889 | + }, | ||
2890 | + | ||
2891 | + // 发起首次授权请求 | ||
2892 | + authorize() { | ||
2893 | + // isFirst 用来记录是否为首次发起授权, | ||
2894 | + // 如果首次授权拒绝后,isFirst赋值为1 | ||
2895 | + let isFirst = wx.getStorageSync('isFirst') || 0; | ||
2896 | + return new Promise((resolve, reject) => { | ||
2897 | + wx.authorize({ | ||
2898 | + scope: 'scope.writePhotosAlbum', | ||
2899 | + // 同意授权 | ||
2900 | + success: () => { | ||
2901 | + resolve(); | ||
2902 | + }, | ||
2903 | + // 拒绝授权,这里是用户拒绝授权后的回调 | ||
2904 | + fail: res => { | ||
2905 | + if(isFirst === 0) { | ||
2906 | + wx.setStorageSync('isFirst', 1); | ||
2907 | + wx.showToast({ | ||
2908 | + title: '保存失败', | ||
2909 | + icon: 'none', | ||
2910 | + duration: 1000 | ||
2911 | + }) | ||
2912 | + } else { | ||
2913 | + this.showModal(); | ||
2914 | + } | ||
2915 | + console.log('拒绝授权'); | ||
2916 | + reject(); | ||
2917 | + } | ||
2918 | + }) | ||
2919 | + }) | ||
2920 | + }, | ||
2921 | + | ||
2922 | + // 保存图片到系统相册 | ||
2923 | + saveImage(saveUrl) { | ||
2924 | + var self = this; | ||
2925 | + return new Promise((resolve, reject) => { | ||
2926 | + wx.saveImageToPhotosAlbum({ | ||
2927 | + filePath: saveUrl, | ||
2928 | + success: (res) => { | ||
2929 | + wx.showToast({ | ||
2930 | + title: '保存成功', | ||
2931 | + duration: 1000, | ||
2932 | + }); | ||
2933 | + self.setData({ | ||
2934 | + showPlaybill: 'true' | ||
2935 | + }); | ||
2936 | + resolve(); | ||
2937 | + }, | ||
2938 | + fail: () => { | ||
2939 | + wx.showToast({ | ||
2940 | + title: '保存失败', | ||
2941 | + duration: 1000, | ||
2942 | + }); | ||
2943 | + } | ||
2944 | + }) | ||
2945 | + }) | ||
2946 | + }, | ||
2947 | + | ||
2948 | + previewImage() { | ||
2949 | + getApp().pre_img(this.data.shareImgPath); | ||
2950 | + }, | ||
2951 | + | ||
2952 | + onShareTimeline() { | ||
2953 | + getApp().globalData.no_clear=1 | ||
2954 | + | ||
2955 | + var th = this; | ||
2956 | + var price = th.data.presellList.presell_price; | ||
2957 | + var title= th.data.prom_act.share_title; | ||
2958 | + var img=th.data.iurl+th.data.prom_act.share_img; | ||
2959 | + | ||
2960 | + var url="goods_id=" + th.data.gid+"&pre_id="+th.data.presellList.id; | ||
2961 | + if(getApp().globalData.user_id) { | ||
2962 | + url+="&first_leader="+getApp().globalData.user_id; | ||
2963 | + } | ||
2964 | + | ||
2965 | + //-- 如果房间分享,且不是会员分享的 -- | ||
2966 | + if(getApp().globalData.room_id && | ||
2967 | + th.data.data.goods_id==getApp().globalData.room_goods_id && | ||
2968 | + !getApp().globalData.room_user_share | ||
2969 | + ){ | ||
2970 | + url+="&room_id="+getApp().globalData.room_id+"&room_user_share=1"; | ||
2971 | + } | ||
2972 | + | ||
2973 | + // 如果服务卡参加秒杀活动,且后台设置了分享标题和分享图片 | ||
2974 | + if(th.data.prom_type == 1) { | ||
2975 | + if(th.data.sele_g && th.data.sele_g.share_imgurl) { | ||
2976 | + img = th.data.iurl + th.data.sele_g.share_imgurl; | ||
2977 | + }; | ||
2978 | + }; | ||
2979 | + | ||
2980 | + return { | ||
2981 | + title:price + "元 " +title, | ||
2982 | + imageUrl:img, | ||
2983 | + query: url | ||
2984 | + } | ||
2985 | + }, | ||
2986 | + | ||
2987 | + | ||
2988 | + | ||
2989 | + clickCollapse() { | ||
2990 | + this.setData({ | ||
2991 | + flag: !this.data.flag, | ||
2992 | + }) | ||
2993 | + }, | ||
2994 | + | ||
2995 | + //---------联系微信客服------------ | ||
2996 | + con_weixin:function () { | ||
2997 | + var url=this.data.sys_switch.weapp_customertype_url; | ||
2998 | + var id=this.data.sys_switch.weapp_customertype_appid; | ||
2999 | + wx.openCustomerServiceChat({ | ||
3000 | + extInfo: {url: url}, | ||
3001 | + corpId: id, | ||
3002 | + success(res) {} | ||
3003 | + }) | ||
3004 | + }, | ||
3005 | + | ||
3006 | + //评论的调用 | ||
3007 | + requestComments_new: async function () { | ||
3008 | + var e = this, th = e, ee = e; var tp = e.data.activeCategoryId3; | ||
3009 | + var t = '/api/weshop/serviceComment/pageComment?page=' + e.data.c_curr_p; | ||
3010 | + | ||
3011 | + wx.showLoading(); | ||
3012 | + var req_where = { | ||
3013 | + store_id: o.stoid, pageSize: 5, is_show: 1, | ||
3014 | + parent_id: 0, goods_id: th.data.gid, commenttype: tp, | ||
3015 | + service_id: this.data.gid, | ||
3016 | + } | ||
3017 | + if (getApp().globalData.userInfo) { | ||
3018 | + req_where.userId = getApp().globalData.user_id; | ||
3019 | + } | ||
3020 | + | ||
3021 | + var rs_data = null; | ||
3022 | + await getApp().request.promiseGet(t, { data: req_where }).then(res => { | ||
3023 | + var tot = res.data.data.total; | ||
3024 | + e.data.c_curr_p++; | ||
3025 | + e.setData({ | ||
3026 | + com_num: tot, //已经有加载 | ||
3027 | + }); | ||
3028 | + if (res.data.data && res.data.data.pageData && res.data.data.pageData.length > 0) { | ||
3029 | + rs_data = res.data.data.pageData; | ||
3030 | + } else { | ||
3031 | + th.setData({ comments_no_more: 1, auto: 1 }); | ||
3032 | + } | ||
3033 | + }) | ||
3034 | + | ||
3035 | + if (rs_data) { | ||
3036 | + //var cda = th.data.comments; | ||
3037 | + var cda = rs_data, com_data = th.data.comments; | ||
3038 | + for (var ind in cda) { | ||
3039 | + var ep = cda[ind]; | ||
3040 | + if (cda[ind].head_pic == '') { | ||
3041 | + cda[ind].head_pic = th.data.iurl + "/miniapp/images/hui_hear_pic.png"; | ||
3042 | + } | ||
3043 | + if (ep.weapp_img != "" && ut.isString(ep.weapp_img)) { | ||
3044 | + cda[ind].weapp_img = JSON.parse(ep.weapp_img); | ||
3045 | + } | ||
3046 | + if (ep.img != "" && ut.isString(ep.img)) { | ||
3047 | + cda[ind].img = ut.unserialize(ep.img); | ||
3048 | + } | ||
3049 | + | ||
3050 | + //--测量多有字的宽带,计算有多少行-- | ||
3051 | + var widh = ut.measureText(ep.content, 30); | ||
3052 | + var lines = widh / 712; | ||
3053 | + cda[ind].seeMore = false; | ||
3054 | + if (lines > 3) cda[ind].seeMore = true; | ||
3055 | + | ||
3056 | + await getApp().request.promiseGet("/api/weshop/serviceComment/pageComment", { | ||
3057 | + data: { | ||
3058 | + store_id: o.stoid, | ||
3059 | + parent_id: ep.comment_id, | ||
3060 | + service_id: this.data.gid, | ||
3061 | + } | ||
3062 | + }).then(res => { | ||
3063 | + if (res.data.data.pageData && res.data.data.pageData.length > 0) { | ||
3064 | + cda[ind].replay_list = res.data.data.pageData; | ||
3065 | + } | ||
3066 | + }) | ||
3067 | + } | ||
3068 | + | ||
3069 | + if (!com_data) com_data = cda; | ||
3070 | + else com_data = com_data.concat(cda); | ||
3071 | + | ||
3072 | + th.setData({ comments: com_data }); | ||
3073 | + } | ||
3074 | + th.setData({ get_c: 1 }); | ||
3075 | + wx.hideLoading(); | ||
3076 | + }, | ||
3077 | + | ||
3078 | + | ||
3079 | + | ||
3080 | + //--点赞功能-- | ||
3081 | + click_zan: function (e) { | ||
3082 | + var com_id = e.currentTarget.dataset.com_id; | ||
3083 | + var item_id = e.currentTarget.dataset.item_id; | ||
3084 | + var app = getApp(), | ||
3085 | + th = this; | ||
3086 | + | ||
3087 | + if (app.globalData.userInfo == null || app.globalData.userInfo == undefined) { | ||
3088 | + app.confirmBox("您还未登录"); | ||
3089 | + return false; | ||
3090 | + } | ||
3091 | + | ||
3092 | + var iszan = th.data.comments[item_id].userZanNum; | ||
3093 | + if (this.data.iszaning) return false; | ||
3094 | + this.data.iszaning = 1; | ||
3095 | + | ||
3096 | + | ||
3097 | + app.request.post("/api/weshop/serviceCommentZan/save", { | ||
3098 | + data: { | ||
3099 | + store_id: o.stoid, | ||
3100 | + user_id: app.globalData.user_id, | ||
3101 | + goods_id: th.data.gid, | ||
3102 | + service_id: th.data.gid, | ||
3103 | + comment_id: com_id | ||
3104 | + }, | ||
3105 | + success: function (ee) { | ||
3106 | + | ||
3107 | + if (ee.data.code == "-1") { | ||
3108 | + app.my_warnning("不能给自己点赞", 0, th); | ||
3109 | + th.data.iszaning = 0; | ||
3110 | + return; | ||
3111 | + } | ||
3112 | + | ||
3113 | + if (ee.data.code == 0 && iszan != 1) { | ||
3114 | + var num = th.data.comments[item_id].zan_num; | ||
3115 | + num++; | ||
3116 | + var text = "comments[" + item_id + "].zan_num"; | ||
3117 | + var text1 = "comments[" + item_id + "].userZanNum"; | ||
3118 | + var _errObj = {}; | ||
3119 | + _errObj[text] = num; | ||
3120 | + _errObj[text1] = 1; | ||
3121 | + th.setData(_errObj); | ||
3122 | + | ||
3123 | + } else { | ||
3124 | + var num = th.data.comments[item_id].zan_num; | ||
3125 | + num--; | ||
3126 | + var text = "comments[" + item_id + "].zan_num"; | ||
3127 | + var text1 = "comments[" + item_id + "].userZanNum"; | ||
3128 | + var _errObj = {}; | ||
3129 | + _errObj[text] = num; | ||
3130 | + _errObj[text1] = 0; | ||
3131 | + th.setData(_errObj); | ||
3132 | + } | ||
3133 | + | ||
3134 | + setTimeout(function () { | ||
3135 | + th.data.iszaning = 0; | ||
3136 | + }, 500) | ||
3137 | + | ||
3138 | + } | ||
3139 | + }) | ||
3140 | + }, | ||
3141 | + | ||
3142 | + | ||
3143 | + //--外侧评价的点击效果--- | ||
3144 | + clik_evaluate: function (e) { | ||
3145 | + var val = e.currentTarget.dataset.val; | ||
3146 | + this.setData({ | ||
3147 | + activeCategoryId: 2, | ||
3148 | + activeCategoryId3: val, | ||
3149 | + comments: null | ||
3150 | + }); | ||
3151 | + this.requestComments_new(); | ||
3152 | + }, | ||
3153 | + | ||
3154 | + | ||
3155 | + //显示全部 | ||
3156 | + toggleHandler: function (e) { | ||
3157 | + var that = this, | ||
3158 | + index = e.currentTarget.dataset.index; | ||
3159 | + for (var i = 0; i < that.data.comments.length; i++) { | ||
3160 | + if (index == i) { | ||
3161 | + for (var i = 0; i < that.data.comments.length; i++) { | ||
3162 | + that.data.comments[index].auto = true; | ||
3163 | + that.data.comments[index].seeMore = false; | ||
3164 | + } | ||
3165 | + } | ||
3166 | + } | ||
3167 | + that.setData({ | ||
3168 | + comments: that.data.comments | ||
3169 | + }) | ||
3170 | + }, | ||
3171 | + | ||
3172 | + //收起更多 | ||
3173 | + toggleContent: function (e) { | ||
3174 | + var that = this, | ||
3175 | + index = e.currentTarget.dataset.index; | ||
3176 | + for (var i = 0; i < that.data.comments.length; i++) { | ||
3177 | + if (index == i) { | ||
3178 | + that.data.comments[index].auto = true; | ||
3179 | + that.data.comments[index].seeMore = true; | ||
3180 | + } | ||
3181 | + } | ||
3182 | + that.setData({ | ||
3183 | + comments: that.data.comments | ||
3184 | + }) | ||
3185 | + }, | ||
3186 | + | ||
3187 | + //--查看评价-- | ||
3188 | + look_pj: function () { | ||
3189 | + this.tabComment(); | ||
3190 | + this.doScrollTop(); | ||
3191 | + }, | ||
3192 | + | ||
3193 | + previewCommentImgs_w: function (t) { | ||
3194 | + var e = this.data.comments[t.currentTarget.dataset.cidx].weapp_img; | ||
3195 | + var b = e.slice() | ||
3196 | + // for (var i in b) { | ||
3197 | + // b[i] = this.data.iurl + e[i]; | ||
3198 | + // } | ||
3199 | + this.data.show_prew_img = 1; | ||
3200 | + wx.previewImage({ | ||
3201 | + current: b[t.currentTarget.dataset.id], | ||
3202 | + urls: b | ||
3203 | + }); | ||
3204 | + }, | ||
3205 | + | ||
3206 | + | ||
3207 | + // 判断是否开启美业,获取套盒列表 | ||
3208 | + getTaohe() { | ||
3209 | + // 判断是否开启美业 | ||
3210 | + getApp().promiseGet('/api/weshop/store/getTabSys/' + os.stoid, {}).then(res => { | ||
3211 | + if(res.data.code == 0) { | ||
3212 | + let enableMeiye = res.data.data.EnableMeiye; | ||
3213 | + self.setData({ | ||
3214 | + enableMeiye, | ||
3215 | + }); | ||
3216 | + | ||
3217 | + if(enableMeiye) { // 开启美业 | ||
3218 | + // 获取套盒列表 | ||
3219 | + let url = '/api/weshop/serviceGoods/list' | ||
3220 | + let data = { | ||
3221 | + store_id: getApp().globalData.setting.stoid, | ||
3222 | + service_id: this.data.data.id, | ||
3223 | + }; | ||
3224 | + // 请求数据 | ||
3225 | + getApp().promiseGet(url, { | ||
3226 | + data: data, | ||
3227 | + }).then(res => { | ||
3228 | + if (res.data.code == 0) { | ||
3229 | + console.log('请求成功套盒列表', res); | ||
3230 | + self.setData({ | ||
3231 | + taoheList: res.data.data, | ||
3232 | + }); | ||
3233 | + } else { | ||
3234 | + throw (res); | ||
3235 | + }; | ||
3236 | + }).catch(err => {}); | ||
3237 | + | ||
3238 | + }; | ||
3239 | + }; | ||
3240 | + }); | ||
3241 | + }, | ||
3242 | + | ||
3243 | + | ||
3244 | + | ||
3245 | + | ||
3246 | + //---小于10的格式化函数---- | ||
3247 | + // timeFormat(param) { | ||
3248 | + // return param < 10 ? '0' + param : param; | ||
3249 | + // }, | ||
3250 | + | ||
3251 | + //----倒计时函数----- | ||
3252 | + countDown(time, prom_st) { | ||
3253 | + if (!this.data.is_timer) return false; | ||
3254 | + var th = this; | ||
3255 | + // 获取当前时间,同时得到活动结束时间数组 | ||
3256 | + var endTime = time; | ||
3257 | + var newTime = ut.gettimestamp(); | ||
3258 | + // 对结束时间进行处理渲染到页面 | ||
3259 | + var obj = null; | ||
3260 | + // 如果活动未结束,对时间进行处理 | ||
3261 | + if (endTime - newTime > 0) { | ||
3262 | + var time = (endTime - newTime); | ||
3263 | + // 获取天、时、分、秒 | ||
3264 | + var day = parseInt(time / (60 * 60 * 24)); | ||
3265 | + var hou = parseInt(time % (60 * 60 * 24) / 3600); | ||
3266 | + var min = parseInt(time % (60 * 60 * 24) % 3600 / 60); | ||
3267 | + var sec = parseInt(time % (60 * 60 * 24) % 3600 % 60); | ||
3268 | + obj = { | ||
3269 | + day: this.timeFormat(day), | ||
3270 | + hou: this.timeFormat(hou), | ||
3271 | + min: this.timeFormat(min), | ||
3272 | + sec: this.timeFormat(sec) | ||
3273 | + } | ||
3274 | + } else { | ||
3275 | + if (th.data.prom_st == 0) { | ||
3276 | + //var endTime2 = new Date(th.data.prom_end_time).getTime(); | ||
3277 | + var endTime2 = th.data.prom_act.end_time; | ||
3278 | + th.setData({ | ||
3279 | + prom_time_text: '距结束还剩:', | ||
3280 | + prom_st: 1 | ||
3281 | + }) | ||
3282 | + setTimeout(function () { | ||
3283 | + th.countDown(endTime2) | ||
3284 | + }, 1000); | ||
3285 | + return false; | ||
3286 | + | ||
3287 | + } else { | ||
3288 | + //活动已结束,全部设置为'00' | ||
3289 | + obj = { | ||
3290 | + day: '00', | ||
3291 | + hou: '00', | ||
3292 | + min: '00', | ||
3293 | + sec: '00' | ||
3294 | + } | ||
3295 | + th.setData({ | ||
3296 | + prom_time_text: '活动已经结束:', | ||
3297 | + prom_st: 3 | ||
3298 | + }) | ||
3299 | + th.setData({ | ||
3300 | + djs: obj | ||
3301 | + }); | ||
3302 | + return false; | ||
3303 | + } | ||
3304 | + } | ||
3305 | + | ||
3306 | + th.setData({ | ||
3307 | + djs: obj | ||
3308 | + }); | ||
3309 | + setTimeout(function () { | ||
3310 | + th.countDown(endTime) | ||
3311 | + }, 1000); | ||
3312 | + }, | ||
3313 | + | ||
3314 | + | ||
3315 | + get_normal(gid) { | ||
3316 | + this.setData({ | ||
3317 | + prom_type: 0, | ||
3318 | + }); | ||
3319 | + // this.get_sku(os.stoid, this.data.data, gid); | ||
3320 | + this.get_sto(); | ||
3321 | + // this.check_is_youhui(gid, 1); | ||
3322 | + this.data.is_normal = 1; | ||
3323 | + }, | ||
3324 | + | ||
3325 | + | ||
3326 | + //获取redis中的数量 | ||
3327 | + async getactLen() { | ||
3328 | + let prom_type = this.data.options.prom_type; | ||
3329 | + let prom_id = this.data.options.prom_id; | ||
3330 | + return await getApp().request.promiseGet("/api/weshop/activitylist/getActLen/" + os.stoid + "/" + prom_type + "/" + prom_id, { | ||
3331 | + 1: 1 | ||
3332 | + }).then(res => { | ||
3333 | + if (res.data.code == 0) { | ||
3334 | + // 当前可以购买的数量 | ||
3335 | + let r_num = res.data.data; | ||
3336 | + return r_num; | ||
3337 | + }; | ||
3338 | + }) | ||
3339 | + }, | ||
3340 | + | ||
3341 | + | ||
3342 | + | ||
3343 | + | ||
3344 | + | ||
3345 | + | ||
3346 | + | ||
3347 | + viewFlash(e) { | ||
3348 | + let prom_type = e.currentTarget.dataset.promtype; | ||
3349 | + let prom_id = e.currentTarget.dataset.promid; | ||
3350 | + let goods_id = this.data.data.goods_id; | ||
3351 | + let url = `/packageA/pages/goodsInfo/goodsInfo?goods_id=${goods_id}&prom_type=${prom_type}&prom_id=${prom_id}`; | ||
3352 | + if(prom_type==6){ | ||
3353 | + url = `/packageA/pages/serviceCard_pd/goodsInfo/goodsInfo?goods_id=${goods_id}&prom_type=${prom_type}&prom_id=${prom_id}`; | ||
3354 | + } | ||
3355 | + getApp().goto(url); | ||
3356 | + }, | ||
3357 | + | ||
3358 | + | ||
3359 | + | ||
3360 | + //获取更多秒杀 | ||
3361 | + get_more_flash: async function (func) { | ||
3362 | + var f_more = false; | ||
3363 | + var user_id = getApp().globalData.user_id; | ||
3364 | + if (!user_id) user_id = 0; | ||
3365 | + | ||
3366 | + var url = "/api/weshop/goods/listSkuFlash?store_id=" + os.stoid + "&goods_id=" + this.data.options.goods_id + "&user_id=" + user_id; | ||
3367 | + //获取秒杀的多规格 | ||
3368 | + await getApp().request.promiseGet(url, {}).then(res => { | ||
3369 | + if (res.data.code == 0 && res.data.data && res.data.data.length > 0) { | ||
3370 | + f_more = res.data.data; | ||
3371 | + } | ||
3372 | + }) | ||
3373 | + if (!f_more) { | ||
3374 | + func(false); | ||
3375 | + return false; | ||
3376 | + } | ||
3377 | + //-- 秒杀的价格要更新 -- | ||
3378 | + for (let i in f_more) { | ||
3379 | + | ||
3380 | + let item = f_more[i]; | ||
3381 | + f_more[i].prom_id = item.act_id; | ||
3382 | + f_more[i].prom_type = 1; | ||
3383 | + if (item.goods_id == this.data.data.goods_id) { | ||
3384 | + continue; | ||
3385 | + } | ||
3386 | + var url = "/api/ms/flash_sale/getNew/" + os.stoid + "/" + user_id + "/" + item.act_id; | ||
3387 | + await getApp().request.promiseGet(url, {}).then(rs => { | ||
3388 | + if (rs.data.code == 0) { | ||
3389 | + f_more[i].price = rs.data.data.user_price; | ||
3390 | + | ||
3391 | + } | ||
3392 | + }) | ||
3393 | + } | ||
3394 | + func(f_more); | ||
3395 | + | ||
3396 | + }, | ||
3397 | + | ||
3398 | + | ||
3399 | + get_buy_num2: async function (func) { | ||
3400 | + // var map = this.data.g_buy_num, | ||
3401 | + var th = this,user_id = getApp().globalData.user_id; | ||
3402 | + // if (user_id == null) { | ||
3403 | + // // map.set(gd.goods_id, 0); | ||
3404 | + // th.setData({ | ||
3405 | + // // g_buy_num: map, | ||
3406 | + // prom_buy_num: 0, | ||
3407 | + // }); | ||
3408 | + // "function" == typeof func && func(); | ||
3409 | + // return false; | ||
3410 | + // } | ||
3411 | + | ||
3412 | + | ||
3413 | + getApp().request.get("/api/weshop/recharge/rechargePresell/countBuyGoodsSum", { | ||
3414 | + data: { store_id: os.stoid, user_id: user_id, goods_id: th.data.options.goods_id, prom_id: th.data.presellForm.id }, | ||
3415 | + success: function (e) { | ||
3416 | + if (e.data.code == 0) { | ||
3417 | + | ||
3418 | + th.setData({ prom_buy_num: e.data.data.sumgoodsnum,promcardbuynum: e.data.data.sumgoodsnum }) | ||
3419 | + | ||
3420 | + let dd={promcardbuynum: e.data.data.sumgoodsnum } | ||
3421 | + | ||
3422 | + "function" == typeof func && func(dd); | ||
3423 | + } else { | ||
3424 | + let dd={promcardbuynum: 0 } | ||
3425 | + th.setData({ prom_buy_num: 0,promcardbuynum:0 }) | ||
3426 | + "function" == typeof func && func(dd); | ||
3427 | + } | ||
3428 | + | ||
3429 | + } | ||
3430 | + }); | ||
3431 | + | ||
3432 | + }, | ||
3433 | + | ||
3434 | + | ||
3435 | + | ||
3436 | + | ||
3437 | + | ||
3438 | + // 促销 -> 送礼包 -> 查看详情 | ||
3439 | + viewLbDetails(e) { | ||
3440 | + let id = e.currentTarget.dataset.id; // 获取礼包id | ||
3441 | + let url = `/packageA/pages/myGiftDetails/myGiftDetails?btn=0&index=0&id=${id}`; // btn=0 控制跳转到的页面不显示按钮 | ||
3442 | + // console.log('myurl', url); | ||
3443 | + getApp().goto(url); | ||
3444 | + }, | ||
3445 | + | ||
3446 | + go_more_ladder: function (e) { | ||
3447 | + var prom_id = e.currentTarget.dataset.id; | ||
3448 | + getApp().goto("/pages/goods/goodsList/goodsList?ladder_id=" + prom_id); | ||
3449 | + }, | ||
3450 | + | ||
3451 | + getHistoryBuy() { | ||
3452 | + let _this = this; | ||
3453 | + let req_data = { | ||
3454 | + store_id: os.stoid, | ||
3455 | + goods_id: this.data.gid, | ||
3456 | + pay_status: 1, | ||
3457 | + rndid: 1 | ||
3458 | + }; | ||
3459 | + getApp().request.promiseGet('/api/weshop/ordergoods/list', { | ||
3460 | + data: req_data, | ||
3461 | + }) | ||
3462 | + .then(res => { | ||
3463 | + if (t.ajax_ok(res)) { | ||
3464 | + _this.setData({ | ||
3465 | + historyBuyInfo: res.data.data.pageData, | ||
3466 | + }) | ||
3467 | + } | ||
3468 | + }) | ||
3469 | + }, | ||
3470 | + | ||
3471 | + | ||
3472 | + | ||
3473 | + //-- 秒杀的普通购买 -- | ||
3474 | + openSpecModel_Nor: function () { | ||
3475 | + var th=this; | ||
3476 | + | ||
3477 | + // 是否授权登陆 | ||
3478 | + var user_info = getApp().globalData.userInfo; | ||
3479 | + if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) { | ||
3480 | + wx.navigateTo({ | ||
3481 | + url: '/packageE/pages/togoin/togoin', | ||
3482 | + }) | ||
3483 | + return false; | ||
3484 | + } | ||
3485 | + this.data.g_buy_num = new Map(); | ||
3486 | + var th = this; | ||
3487 | + this.setData({open_ind_store: 5, goodsInputNum: 1});//拼团直接给4 | ||
3488 | + | ||
3489 | + this.setData({openSpecModal_flash_normal: 1}); | ||
3490 | + this.get_sto(1) | ||
3491 | + | ||
3492 | + | ||
3493 | + // if (th.data.sku_g_pt) { | ||
3494 | + // // this.get_sto(1) | ||
3495 | + // this.setData({openSpecModal_flash_normal: 1}); | ||
3496 | + // } else { | ||
3497 | + // th.get_sto(1); | ||
3498 | + // th.get_sku(o.stoid, th.data.data, th.data.gid, 1, function () { | ||
3499 | + // th.setData({ | ||
3500 | + // openSpecModal_flash_normal: 1 | ||
3501 | + // }); | ||
3502 | + // }); | ||
3503 | + // } | ||
3504 | + // this.check_is_youhui(th.data.gid, 1); | ||
3505 | + }, | ||
3506 | + | ||
3507 | + closeSpecModal_flash_normal: function () { | ||
3508 | + this.setData({openSpecModal_flash_normal: 0,is_normal:0}); | ||
3509 | + }, | ||
3510 | + | ||
3511 | + | ||
3512 | + //打开客服操作菜单 | ||
3513 | + openCS() { | ||
3514 | + // 判断会员状态 | ||
3515 | + let user_info = getApp().globalData.userInfo; | ||
3516 | + if (user_info == null || user_info.mobile == undefined || user_info.mobile == '' || user_info.mobile == null) { | ||
3517 | + wx.navigateTo({ | ||
3518 | + url: '/packageE/pages/togoin/togoin', | ||
3519 | + }) | ||
3520 | + return false; | ||
3521 | + }; | ||
3522 | + // csType/在线客服设置: | ||
3523 | + // 0关闭(如果有设置热线电话,则显示拨打热线电话)、 | ||
3524 | + // 1小程序客服、 | ||
3525 | + // 2企业微信客服 | ||
3526 | + if(this.data.sys_switch) { | ||
3527 | + let csType = this.data.sys_switch.weapp_customertype; | ||
3528 | + if(csType == 0) { | ||
3529 | + // 拨打电话号码 | ||
3530 | + this.contactService(); | ||
3531 | + } else { | ||
3532 | + this.getTel() | ||
3533 | + .then(() => { | ||
3534 | + self.setData({ | ||
3535 | + hiddenCS: false, | ||
3536 | + }); | ||
3537 | + }); | ||
3538 | + }; | ||
3539 | + }; | ||
3540 | + | ||
3541 | + }, | ||
3542 | + | ||
3543 | + //关闭客服操作菜单 | ||
3544 | + closeCS() { | ||
3545 | + this.setData({ | ||
3546 | + hiddenCS: true, | ||
3547 | + }); | ||
3548 | + }, | ||
3549 | + | ||
3550 | + | ||
3551 | + click_contact:function () { | ||
3552 | + getApp().globalData.no_clear=1; | ||
3553 | + }, | ||
3554 | + | ||
3555 | + //打开客服操作菜单 | ||
3556 | + openCS() { | ||
3557 | + // csType/在线客服设置: | ||
3558 | + // 0关闭(如果有设置热线电话,则显示拨打热线电话)、 | ||
3559 | + // 1小程序客服、 | ||
3560 | + // 2企业微信客服 | ||
3561 | + let csType = this.data.sys_switch.weapp_customertype; | ||
3562 | + if(csType == 0) { | ||
3563 | + // 获取电话号码 | ||
3564 | + this.contactService(); | ||
3565 | + } else { | ||
3566 | + this.getTel() | ||
3567 | + .then(() => { | ||
3568 | + self.setData({ | ||
3569 | + hiddenCS: false, | ||
3570 | + }); | ||
3571 | + }); | ||
3572 | + | ||
3573 | + }; | ||
3574 | + }, | ||
3575 | + | ||
3576 | + //关闭客服操作菜单 | ||
3577 | + closeCS() { | ||
3578 | + this.setData({ | ||
3579 | + hiddenCS: true, | ||
3580 | + }); | ||
3581 | + }, | ||
3582 | + | ||
3583 | + | ||
3584 | + //-- 弹出框的同意的优化,重新获取定位 --- | ||
3585 | + agree_pri:function (){ | ||
3586 | + var th=this; | ||
3587 | + var bconfig = th.data.bconfig; | ||
3588 | + if (bconfig && bconfig.is_sort_storage) { | ||
3589 | + wx.getLocation({ | ||
3590 | + type: 'gcj02', | ||
3591 | + success: function (res) { | ||
3592 | + | ||
3593 | + th.data.lat = res.latitude; | ||
3594 | + th.data.lon = res.longitude; | ||
3595 | + th.data.is_get_local_ok = 1; | ||
3596 | + th.setData({is_gps: 1}); | ||
3597 | + th.get_sto(); | ||
3598 | + }, | ||
3599 | + fail: function (res) { | ||
3600 | + th.data.is_get_local_ok = 1; | ||
3601 | + th.get_sto(); | ||
3602 | + if (res.errCode == 2) { | ||
3603 | + th.setData({is_gps: 0}); | ||
3604 | + if (th.data.is_gps == 0) { | ||
3605 | + getApp().confirmBox("请开启GPS定位", null, 25000, !1); | ||
3606 | + } | ||
3607 | + } else { | ||
3608 | + th.setData({is_gps: "3"}); | ||
3609 | + } | ||
3610 | + | ||
3611 | + } | ||
3612 | + }) | ||
3613 | + } | ||
3614 | + }, | ||
3615 | + | ||
3616 | + | ||
3617 | + //-- 获取预售的信息 -- | ||
3618 | + async get_pre_prom(func) { | ||
3619 | + var th = this; | ||
3620 | + var presell_id = null; | ||
3621 | + var pre_arr = null; | ||
3622 | + | ||
3623 | + if (!th.data.pre_id) { | ||
3624 | + var presell_id = th.data.presell_id; | ||
3625 | + var url = "/api/weshop/marketing/marketingPresellList/list" | ||
3626 | + var rd = { | ||
3627 | + store_id: os.stoid, | ||
3628 | + presell_id: presell_id, | ||
3629 | + goods_id: th.data.gid | ||
3630 | + } | ||
3631 | + console.log('获取预售从表') | ||
3632 | + //------获取预售从表---------- | ||
3633 | + await getApp().request.promiseGet(url, { | ||
3634 | + data: rd | ||
3635 | + }).then(res => { | ||
3636 | + if (res.data.code == 0 && res.data.data && res.data.data.length > 0) { | ||
3637 | + var arr = res.data.data[0]; | ||
3638 | + presell_id = arr.presell_id; | ||
3639 | + th.setData({ | ||
3640 | + presellList: arr, | ||
3641 | + }) | ||
3642 | + } | ||
3643 | + }) | ||
3644 | + | ||
3645 | + } else { | ||
3646 | + console.log('获取预售从表', 'pre_id', th.data.pre_id) | ||
3647 | + //------获取预售从表---------- | ||
3648 | + await getApp().request.promiseGet("/api/weshop/marketing/marketingPresellList/get/" + os.stoid + "/" + th.data.pre_id, {}).then(res => { | ||
3649 | + if (res.data.code == 0 && res.data.data) { | ||
3650 | + var arr = res.data.data; | ||
3651 | + presell_id = arr.presell_id; | ||
3652 | + th.data.presell_id=presell_id; | ||
3653 | + th.setData({ | ||
3654 | + presellList: arr, | ||
3655 | + }) | ||
3656 | + } | ||
3657 | + }) | ||
3658 | + } | ||
3659 | + | ||
3660 | + if (!presell_id) { | ||
3661 | + wx.showToast({ title: "未找到活动商品", icon: 'none', duration: 3000 }); | ||
3662 | + ut.wx_back(); | ||
3663 | + return false; | ||
3664 | + } | ||
3665 | + | ||
3666 | + var gnext = 1; | ||
3667 | + //------获取预售主表---------- | ||
3668 | + await getApp().request.promiseGet(`/api/weshop/marketing/marketingPresellForm/get/${os.stoid}/${presell_id}`, {}).then(res => { | ||
3669 | + if (res.data.code == 0 && res.data.data) { | ||
3670 | + var act_data = res.data.data; | ||
3671 | + if (act_data.is_end) { | ||
3672 | + wx.showToast({ title: "活动已经结束", icon: 'none', duration: 3000 }); | ||
3673 | + setTimeout(function () { | ||
3674 | + ut.wx_back(); | ||
3675 | + }, 2000) | ||
3676 | + gnext = 0; | ||
3677 | + return false; | ||
3678 | + } | ||
3679 | + if (act_data.isuse == 0) { | ||
3680 | + wx.showToast({ title: "活动未启用", icon: 'none', duration: 3000 }); | ||
3681 | + setTimeout(function () { | ||
3682 | + ut.wx_back(); | ||
3683 | + }, 2000) | ||
3684 | + gnext = 0; | ||
3685 | + return false; | ||
3686 | + } | ||
3687 | + | ||
3688 | + var err_txt = "活动定金时间已经结束"; | ||
3689 | + var end_time = act_data.end_time; | ||
3690 | + if (act_data.presell_type == 1) { | ||
3691 | + err_txt = "活动时间已经结束"; | ||
3692 | + } | ||
3693 | + if (end_time < ut.gettimestamp()) { | ||
3694 | + wx.showToast({ title: err_txt, icon: 'none', duration: 3000 }); | ||
3695 | + setTimeout(function () { | ||
3696 | + getApp().goto("/pages/index/index/index"); | ||
3697 | + }, 2000) | ||
3698 | + gnext = 0; | ||
3699 | + return false; | ||
3700 | + } | ||
3701 | + | ||
3702 | + if (act_data.presell_type == 0) { | ||
3703 | + end_time = act_data.pay_enddate; | ||
3704 | + err_txt = "活动尾款时间已经结束"; | ||
3705 | + } | ||
3706 | + if (end_time < ut.gettimestamp()) { | ||
3707 | + wx.showToast({ title: err_txt, icon: 'none', duration: 3000 }); | ||
3708 | + setTimeout(function () { | ||
3709 | + ut.wx_back(); | ||
3710 | + }, 2000) | ||
3711 | + gnext = 0; | ||
3712 | + return false; | ||
3713 | + } | ||
3714 | + | ||
3715 | + if (act_data.start_time > ut.gettimestamp()) { | ||
3716 | + // wx.showToast({ title: "活动还未开始", icon: 'none', duration: 3000 }); | ||
3717 | + // setTimeout(function () { | ||
3718 | + // ut.wx_back(); | ||
3719 | + // }, 2000) | ||
3720 | + // gnext = 0; | ||
3721 | + th.setData({ type: 0 }); | ||
3722 | + // return false; | ||
3723 | + }else{ | ||
3724 | + th.setData({ type: 1 }); | ||
3725 | + } | ||
3726 | + | ||
3727 | + th.setData({ | ||
3728 | + presellForm: res.data.data, | ||
3729 | + }); | ||
3730 | + | ||
3731 | + th.data.prom_act=res.data.data; | ||
3732 | + th.countDown(res.data.data.end_time) | ||
3733 | + } | ||
3734 | + }) | ||
3735 | + | ||
3736 | + // console.log('是否继续查询', gnext) | ||
3737 | + if (!gnext) { | ||
3738 | + return false; | ||
3739 | + } | ||
3740 | + // console.log('继续查询') | ||
3741 | + | ||
3742 | + var userInfo = getApp().globalData.userInfo; | ||
3743 | + // timetype: 1, | ||
3744 | + var pre_data = { store_id: os.stoid, is_end: 0, isuse: 1,presell_id: presell_id, pageSize: 1000 }; | ||
3745 | + if (userInfo) { | ||
3746 | + pre_data.user_id = userInfo.user_id; | ||
3747 | + } | ||
3748 | + await getApp().request.promiseGet("/api/weshop/marketing/marketingPresellList/page", { | ||
3749 | + data: pre_data, | ||
3750 | + }).then(e => { | ||
3751 | + // console.log('查询marketingPresellList', e) | ||
3752 | + if (e.data.code == 0 && e.data.data.pageData && e.data.data.pageData.length > 0) { | ||
3753 | + // console.log('匹配resellList') | ||
3754 | + th.data.all_pre_goods = e.data.data.pageData; | ||
3755 | + var idx = e.data.data.pageData.findIndex(function (ele) { | ||
3756 | + return ele.id == th.data.presellList.id; | ||
3757 | + }) | ||
3758 | + | ||
3759 | + pre_arr = e.data.data.pageData[idx]; | ||
3760 | + th.setData({ pre_arr: pre_arr, show: 1 }) | ||
3761 | + th.data.prom_buy_limit = pre_arr.vip_butyqty; | ||
3762 | + th.data.prom_price=pre_arr.presell_price; //定义一下活动的价格 | ||
3763 | + } | ||
3764 | + }) | ||
3765 | + if (!pre_arr) { | ||
3766 | + // wx.showToast({ title: "当前会员身份不符或者时间已过期,无法参与", icon: 'none', duration: 3000 }); | ||
3767 | + // setTimeout(function () { | ||
3768 | + // ut.wx_back(); | ||
3769 | + // }, 2000) | ||
3770 | + th.setData({ show: true }); | ||
3771 | + // return false; | ||
3772 | + } | ||
3773 | + if (func) { | ||
3774 | + func(); | ||
3775 | + } | ||
3776 | + }, | ||
3777 | + | ||
3778 | + | ||
3779 | + | ||
3780 | + | ||
3781 | +}); | ||
3782 | + | ||
3783 | + |
packageC/pages/presell/cardInfo/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 | + "goods_recommend": "/components/goods_list/goods_list", | ||
8 | + "share": "/components/share/share", | ||
9 | + "privacy_pop": "/components/privacy_pop/privacy_pop" | ||
10 | + } | ||
11 | +} | ||
0 | \ No newline at end of file | 12 | \ No newline at end of file |
packageC/pages/presell/cardInfo/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 | +<!-- 判断隐私是不是显示 --> | ||
7 | +<privacy_pop id="privacy_pop" bind:agree_pri="agree_pri"></privacy_pop> | ||
8 | + | ||
9 | +<block wx:if="{{show}}"> | ||
10 | +<!-- 商品内容区域,普通商品,秒杀,拼团 --> | ||
11 | +<view class="container"> | ||
12 | + <view class="type-navbar"> | ||
13 | + <view class="type-box" wx:for="{{categories}}" wx:key="categories"> | ||
14 | + <view bindtap="tabClick" class="type-navbar-item {{activeCategoryId==item.id?'type-item-on':''}}" id="{{item.id}}"> | ||
15 | + {{item.name}} | ||
16 | + </view> | ||
17 | + </view> | ||
18 | + </view> | ||
19 | + <view class="goods-detail"> | ||
20 | + <view class="goods-info" hidden="{{activeCategoryId==0?false:true}}"> | ||
21 | + | ||
22 | + <!-- 左上角轮播 历史购买记录 --> | ||
23 | + <view class="swiper-container" wx:if="{{historyBuyInfo.length}}"> | ||
24 | + <swiper class="swiper" autoplay="true" circular="true" vertical="true" interval="3000"> | ||
25 | + <swiper-item class="swiper-item" wx:for="{{historyBuyInfo}}" wx:key="order_id"> | ||
26 | + <view class="item"> | ||
27 | + <view class="avatar-container"> | ||
28 | + <image src="{{item.head_pic}}"></image> | ||
29 | + </view> | ||
30 | + <view class="flex ai_c pd10"> | ||
31 | + <view class="nickname ellipsis-1x">{{item.nickname}}下单成功</view> | ||
32 | + </view> | ||
33 | + </view> | ||
34 | + </swiper-item> | ||
35 | + </swiper> | ||
36 | + </view> | ||
37 | + | ||
38 | + <!-- 视频 --> | ||
39 | + <!-- <swiper bindchange="swiperChange"class="xc-pictures swiperContainer rel" current="{{swiperCurrent}}" | ||
40 | + indicator-dots="{{indicatorDots}}" autoplay="{{autoplay}}" interval="{{interval}}" duration="{{duration}}"> --> | ||
41 | + <view id="id" bindtouchstart="handletouchtart" bindtouchmove="handletouchmove"> | ||
42 | + <view class="xc-videos-picture rel"> | ||
43 | + <swiper autoplay="{{false}}" current="{{swiperCurrent}}" class="swiper_box swiperContainer rel" duration="{{1000}}" indicatorDots="{{mapurl?false:true}}" interval="{{3000}}" vertical="{{false}}" bindchange="swiperChange"> | ||
44 | + <swiper-item wx:if="{{mapurl}}"> | ||
45 | + <view wx:if="{{noon == 0}}"> | ||
46 | + <image class="xc-picturess" src="{{iurl+mapurl_f_img}}" mode="aspectFit"> | ||
47 | + <image id="{{index}}" class="xc-play" src="{{iurl}}/miniapp/images/pofang.png" bindtap="videoPlay"></image> | ||
48 | + </image> | ||
49 | + </view> | ||
50 | + <view wx:else> | ||
51 | + <video class="xc-videos" src="{{iurl+mapurl}}" id="{{index}}" wx:if="{{_index == index}}"></video> | ||
52 | + </view> | ||
53 | + </swiper-item> | ||
54 | + <swiper-item wx:for="{{gallery}}" wx:key="gallery"> | ||
55 | + <!-- <image class="wh100" src="{{item.image_url}}" mode="aspectFit" binderror="bind_bnerr" lazy-load="true" data-errorimg="gallery[{{index}}].image_url"></image> --> | ||
56 | + <view class="wh100 g_img_box" style="background-image:url({{iurl +(item.image_url?item.image_url:'miniapp/images/default_g_img.gif')}});"></view> | ||
57 | + </swiper-item> | ||
58 | + </swiper> | ||
59 | + <block wx:if="{{mapurl}}"> | ||
60 | + <view wx:if="{{hiddenn==1}}"> | ||
61 | + <view class="xc-imageCount">{{current}}/{{gallery.length}}</view> | ||
62 | + </view> | ||
63 | + <view class="xc-video-picture abs"> | ||
64 | + <view class="xc-video" data-vipi="0" bindtap="videopicture"> | ||
65 | + <view class="{{videopicture==0 ? 'xc-video-button':'xc-video-buttons'}} {{videopicture==0 ? 'xc-sn':''}}"> | ||
66 | + 视频 | ||
67 | + </view> | ||
68 | + </view> | ||
69 | + <view class="xc-picture {{videopicture==1 ? 'xc-sn':''}}" data-vipi="1" bindtap="videopicture"> | ||
70 | + <view>图片</view> | ||
71 | + </view> | ||
72 | + </view> | ||
73 | + </block> | ||
74 | + </view> | ||
75 | + </view> | ||
76 | + <view class="goo"> | ||
77 | + <view class="pt_view rel"> | ||
78 | + <!-- 许程 7. 24 --> | ||
79 | + <image wx:if="{{type == 0}}" class="secondkill-img" src="{{iurl?iurl+'miniapp/images/blue_ks.png':''}}" /> | ||
80 | + <image wx:else class="secondkill-img" src="{{iurl?iurl+'miniapp/images/red_jx.png':''}}" /> | ||
81 | + <!-- <view class=""> --> | ||
82 | + <!-- <view class="flex" style='height:40rpx; margin-top:5rpx;'> --> | ||
83 | + <view class="abs xc-qt-price fs28 xc-qtsign">预售价</view> | ||
84 | + <view class="abs flex presell_price"> | ||
85 | + <view class="fs28 val" style="margin-right:60rpx">¥{{presellList.presell_price}}</view> | ||
86 | + <view wx:if="{{is_retail_price}}" class="word-line fs26 xc-qtunit-price"> | ||
87 | + 零售价¥{{filters.toFix(data.market_price,2)}} | ||
88 | + </view> | ||
89 | + </view> | ||
90 | + | ||
91 | + | ||
92 | + <block> | ||
93 | + <!-- </view> --> | ||
94 | + <view class="hy-stop word-color fs26 abs cl_r {{type==0?'pre_cl':''}}">距活动{{type==0?'开始':'结束'}}还有</view> | ||
95 | + <view class="secview flex abs fs24 " style="color: black;right: 3px; top:46rpx;"> | ||
96 | + <block wx:if="djs.day"> | ||
97 | + <view class="day-val cl_r {{type==0?'pre_cl':''}}" style="margin-top:-34rpx;"> | ||
98 | + {{djs.day}} | ||
99 | + </view> | ||
100 | + <view class="day cl_r {{type==0?'pre_cl':''}}" style="margin-top:-34rpx;margin-right:10rpx;"> | ||
101 | + 天 | ||
102 | + </view> | ||
103 | + </block> | ||
104 | + <view class="xc-time-val white t-c {{type==0?'pre_ba':''}}" > | ||
105 | + {{djs.hou}} | ||
106 | + </view> | ||
107 | + <view class="xc-time {{type==0?'pre_cl':''}}">时</view> | ||
108 | + <view class="xc-time-val white t-c {{type==0?'pre_ba':''}}" > | ||
109 | + {{djs.min}} | ||
110 | + </view> | ||
111 | + <view class="xc-time {{type==0?'pre_cl':''}}">分</view> | ||
112 | + <view class="xc-time-val white t-c {{type==0?'pre_ba':''}}" > | ||
113 | + {{djs.sec}} | ||
114 | + </view> | ||
115 | + <view class="xc-time {{type==0?'pre_cl':''}}">秒</view> | ||
116 | + </view> | ||
117 | + </block> | ||
118 | + </view> | ||
119 | + <view class="pt_fir pd20"> | ||
120 | + <!-- --显示团类型和团价格-- --> | ||
121 | + <view class="pt_fir_title "> | ||
122 | + <view class="xc-goods-explain flex-vertical-between"> | ||
123 | + <view class="xc-explain fs32 ellipsis-2"> | ||
124 | + {{data.goods_name}} | ||
125 | + </view> | ||
126 | + <!-- 这个是分享按钮 --> | ||
127 | + <view wx:if="{{isLogin}}" class="xc-share-frame t-c" bindtap="clickShare"> | ||
128 | + <view class="iconfont icon-share"></view> | ||
129 | + <view class="fs22 c-7b">分享</view> | ||
130 | + </view> | ||
131 | + </view> | ||
132 | + </view> | ||
133 | + <view wx:if="{{presellForm.presell_type==0}}" class="fs24" style="padding-bottom:20rpx"> | ||
134 | + <view class="stock" style="color:#999">尾款:{{filters.format_time(presellForm.pay_begindate,1)}}-{{filters.format_time(presellForm.pay_enddate,1)}}</view> | ||
135 | + </view> | ||
136 | + <view class="goods-num"> | ||
137 | + <block wx:if="{{presellList.virtual_qty && type !=0}}"> | ||
138 | + <view class="stock">总数量:{{presellList.presell_sumqty+presellList.virtual_qty}}件</view> | ||
139 | + <view class="stock" wx:if="{{presellList.vip_butyqty}}">限购:{{presellList.vip_butyqty}}件</view> | ||
140 | + <view class="stock" wx:else>限购:不限</view> | ||
141 | + <view class="sales">已购:{{presellList.buy_goodnum+presellList.virtual_qty}}件</view> | ||
142 | + </block> | ||
143 | + <block wx:else> | ||
144 | + <view class="stock">总数量:{{presellList.presell_sumqty}}件</view> | ||
145 | + <view class="stock" wx:if="{{presellList.vip_butyqty}}">限购:{{presellList.vip_butyqty}}件</view> | ||
146 | + <view class="stock" wx:else>限购:不限</view> | ||
147 | + <view class="sales">已购:{{presellList.buy_goodnum}}件</view> | ||
148 | + </block> | ||
149 | + </view> | ||
150 | + </view> | ||
151 | + <view class="t_gz" wx:if="{{is_show_gz==1}}">{{prom_act.remark}}</view> | ||
152 | + </view> | ||
153 | + <!-- 许程 7.24暂时注释 --> | ||
154 | + <view class="bdt16" wx:if="{{ prom_type!=1 && prom_act.kttype!=3&&prom_act.kttype!=2&&prom_act.kttype!=1 && is_closecoupon!=1 && sele_g.is_xz_yh !=1}}"> | ||
155 | + <view class="cx-frame flex" style="position: relative" wx:if="{{fir_quan.length>0}}"> | ||
156 | + <view class="cx-sizs fs30">领券</view> | ||
157 | + <view class="flex ai_c f1 pdh20"> | ||
158 | + <view class="xc-coupon-fram" wx:for="{{fir_quan}}" wx:key="id"> | ||
159 | + <view class="circle xc-circular xc-one"></view> | ||
160 | + <view class="xc-coupon t-c four-level-word"> | ||
161 | + 满{{item.condition}}减{{item.money}} | ||
162 | + </view> | ||
163 | + <view class="circle xc-circular xc-two"></view> | ||
164 | + </view> | ||
165 | + </view> | ||
166 | + <view data-coupon="1" bindtap="switchCoupon" class="cx-obtain-coupon wsize"> | ||
167 | + <text class="bg_jj"></text> | ||
168 | + </view> | ||
169 | + </view> | ||
170 | + </view> | ||
171 | + <!-- 门店收货地址 --> | ||
172 | + <view class="xc-address_frame bdt16 flex-vertical xc-ash {{def_pick_store!=null?'sn_height':'on_height'}}"> | ||
173 | + <view class="address_frame" bindtap="choice_store" data-ind="0"> | ||
174 | + <view class="flex-vertical-between "> | ||
175 | + <view class="flex-vertical select_store_height"> | ||
176 | + <image class="stores-img" src="{{iurl}}/miniapp/images/stores.png"></image> | ||
177 | + <view class="fs30" style="color:black;">选择门店</view> | ||
178 | + </view> | ||
179 | + <view hidden="{{has_def && sys_switch.is_pricing_open_store}}" class="red_bb fs26">更多门店<text class="bg_jj"></text></view> | ||
180 | + </view> | ||
181 | + <view wx:if="{{def_pick_store && def_pick_store.pickup_name}}"> | ||
182 | + <view class="flex-space-between address ai_end pdv10"> | ||
183 | + <view> | ||
184 | + <text class="fs30 xc-black3 shop_name bold">{{def_pick_store.pickup_name}}</text> | ||
185 | + </view> | ||
186 | + <view class="distance fs24" wx:if="{{def_pick_store.distance!=null}}"> | ||
187 | + 距离:{{def_pick_store.distance>1000?filters.toFix(def_pick_store.distance/1000,2)+"km":filters.toFix(def_pick_store.distance,0)+"m"}} | ||
188 | + </view> | ||
189 | + </view> | ||
190 | + <view class="no_store" wx:if="{{only_pk && !only_pk.length}}">(库存不足)</view> | ||
191 | + <block wx:else> | ||
192 | + <view class="no_store" wx:if="{{def_pickpu_list && !def_pickpu_list.length}}"> | ||
193 | + (库存不足) | ||
194 | + </view> | ||
195 | + <block wx:else> | ||
196 | + <view class="no_store" wx:if="{{def_pick_store && def_pick_store.is_no_dis}}"> | ||
197 | + (配送不匹配) | ||
198 | + </view> | ||
199 | + <view class="no_store" wx:elif="{{def_pick_store && def_pick_store.is_no_dis_act}}"> | ||
200 | + (该店不可售) | ||
201 | + </view> | ||
202 | + <view class="no_store" wx:elif="{{def_pick_store && !def_pick_store.CanOutQty && sales_rules>=2 && prom_type==0}}"> | ||
203 | + (库存不足) | ||
204 | + </view> | ||
205 | + </block> | ||
206 | + </block> | ||
207 | + <view class="fs24 xc-ash-9f">地址:{{def_pick_store.fulladdress}}</view> | ||
208 | + </view> | ||
209 | + </view> | ||
210 | + </view> | ||
211 | + | ||
212 | + | ||
213 | + <!-- - 宝贝评价 -- --> | ||
214 | + <view class="bdt16"> | ||
215 | + <view class="bb_view"> | ||
216 | + <view class="bold">宝贝评价({{categories3[0].num}})</view> | ||
217 | + <view class="red_bb fs26" bindtap="look_pj"> | ||
218 | + 查看全部 | ||
219 | + <text class="bg_jj"></text> | ||
220 | + </view> | ||
221 | + </view> | ||
222 | + <view class="xc_comment"> | ||
223 | + <view class="xc_comment-have-pictures" data-val="5" bindtap="clik_evaluate"> | ||
224 | + 有图({{categories3[1].num}}) | ||
225 | + </view> | ||
226 | + <view class="xc_comment-discuss" data-val="2" bindtap="clik_evaluate"> | ||
227 | + 好评({{categories3[2].num}}) | ||
228 | + </view> | ||
229 | + <view class="xc_comment-discuss" data-val="3" bindtap="clik_evaluate"> | ||
230 | + 中评({{categories3[3].num}}) | ||
231 | + </view> | ||
232 | + <view class="xc_comment-discuss" data-val="4" bindtap="clik_evaluate"> | ||
233 | + 差评({{categories3[4].num}}) | ||
234 | + </view> | ||
235 | + </view> | ||
236 | + <scroll-view scroll-x="true" class="pj_scroll"> | ||
237 | + <view class="flex"> | ||
238 | + <view class="xc_comment-detail" wx:for="{{fir_comments}}" wx:key="fir_comments"> | ||
239 | + <view class="xc_comment-left"> | ||
240 | + <view class="xc_comment-user"> | ||
241 | + <view class="xc_user-img"> | ||
242 | + <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> | ||
243 | + </view> | ||
244 | + <view class="xc_user"> | ||
245 | + <view class="xc_user-name five-level-word"> | ||
246 | + {{item.is_anonymous!=1?item.username:'匿名'}} | ||
247 | + </view> | ||
248 | + <image class="xc_comment-img" src="{{iurl}}/miniapp/images/star-red.png" wx:for="{{item.sum_rank}}" wx:key="rank"></image> | ||
249 | + </view> | ||
250 | + </view> | ||
251 | + <view class="xc_comment-font pj_word_size ellipsis-1 pdt12"> | ||
252 | + <text class="ellipsis-1">{{item.content?item.content:'此用户没有填写评价。'}}</text> | ||
253 | + </view> | ||
254 | + <view class="xc_comment-val"> | ||
255 | + <view class="xc_comment-time">{{item.add_time}}</view> | ||
256 | + </view> | ||
257 | + </view> | ||
258 | + <view class="xc_goods-img-frame"> | ||
259 | + <image wx:if="{{item.img[0]!=undefined && item.img[0]!=null}}" class="xc_goods-img" src='{{iurl+item.img[0]}}'></image> | ||
260 | + <image wx:elif="{{item.weapp_img[0]!=undefined && item.weapp_img[0]!=null}}" class="xc_goods-img" src='{{item.weapp_img[0]}}'></image> | ||
261 | + <image wx:else class="xc_goods-img" src='{{gallery[0].image_url}}'></image> | ||
262 | + </view> | ||
263 | + </view> | ||
264 | + </view> | ||
265 | + </scroll-view> | ||
266 | + </view> | ||
267 | + | ||
268 | + | ||
269 | + <!-- 图文详情 --> | ||
270 | + <view class="t_g_info bdt16"> | ||
271 | + <view class="red_shu"></view> | ||
272 | + <view class="fs30 bold">卡项详情</view> | ||
273 | + </view> | ||
274 | + <view class="pdh20"> | ||
275 | + | ||
276 | + <block wx:if="{{listServiceItem && listServiceItem.length > 0}}"> | ||
277 | + <view class="card fs28" wx:for="{{listServiceItem}}"> | ||
278 | + <view class="flex ai_c jc_sb" style="height: 88rpx;"> | ||
279 | + <view class="ellipsis-2 f1" wx:if="{{item.displayqty==1}}" >{{item.projectName}}(无限次)</view> | ||
280 | + <view class="ellipsis-2 f1" wx:else>{{item.projectName}}({{item.frequency}}次)</view> | ||
281 | + <view class="pdl30 t-r"> | ||
282 | + <view class="rmb fs36 bold c-red">{{item.vipprice}}</view> | ||
283 | + <view class="fs22 c-9 del" wx:if="{{item.showPrice}}">零售价:¥{{item.showPrice}}</view> | ||
284 | + </view> | ||
285 | + </view> | ||
286 | + <view class="flex ai_c jc_sb fs24 c-6"> | ||
287 | + <view class="ellipsis-1">备注:{{filters.show_default(item.remark, '无')}}</view> | ||
288 | + <!-- 指定开始日期和结束日期 --> | ||
289 | + <view class="pdl30 shrink0">有效期:{{filters.showStartAndEndDate(item, data.validDays)}}</view> | ||
290 | + </view> | ||
291 | + </view> | ||
292 | + </block> | ||
293 | + | ||
294 | + <block wx:if="{{enableMeiye}}"> | ||
295 | + <block wx:if="{{taoheList && taoheList.length > 0}}"> | ||
296 | + <view class="taohe fs28" wx:for="{{taoheList}}"> | ||
297 | + <view class="flex ai_c jc_sb" style="height: 88rpx;"> | ||
298 | + <view class="ellipsis-2 f1">{{item.goods_name}} ({{item.goods_sn}}) ({{item.frequency}}个)</view> | ||
299 | + <view class="pdl30 t-r"> | ||
300 | + <view class="rmb fs36 bold c-red">{{item.vipprice}}</view> | ||
301 | + <view class="fs22 c-9 del">零售价:¥{{item.show_price}}</view> | ||
302 | + </view> | ||
303 | + </view> | ||
304 | + <view class="flex ai_c jc_sb fs24 c-6 pdt10"> | ||
305 | + <view class="ellipsis-1">备注:{{filters.show_default(item.remark, '无')}}</view> | ||
306 | + <view class="pdl30 shrink0">有效期:{{filters.showStartAndEndDate(item,data.validDays)}}</view> | ||
307 | + </view> | ||
308 | + </view> | ||
309 | + </block> | ||
310 | + </block> | ||
311 | + | ||
312 | + <!-- <view class="table_s" wx:if="{{service_list}}"> | ||
313 | +<view class="tb_item tb-l"> | ||
314 | +<view class="item_left f1"> | ||
315 | + <text>项目名称</text> | ||
316 | +</view> | ||
317 | + <view class="item_left f1"> | ||
318 | + <text>耗时(分)</text> | ||
319 | + </view> | ||
320 | + <view class="item_left f1"> | ||
321 | + <text>次数</text> | ||
322 | + </view> | ||
323 | +</view> | ||
324 | +<view class="tb_item tb-l" wx:for="{{service_list}}"> | ||
325 | +<view class="item_right f1"> | ||
326 | + <text>{{item.projectName}}</text> | ||
327 | +</view> | ||
328 | + <view class="item_right f1"> | ||
329 | + <text>{{item.timeConsuming}}</text> | ||
330 | + </view> | ||
331 | + <view class="item_right f1"> | ||
332 | + <text>{{item.frequency}}</text> | ||
333 | + </view> | ||
334 | +</view> | ||
335 | +</view> --> | ||
336 | + | ||
337 | + <view class="wxParse"> | ||
338 | + <template is="wxParse" data="{{wxParseData:content.nodes}}"></template> | ||
339 | + </view> | ||
340 | + | ||
341 | + </view> | ||
342 | + | ||
343 | + <!-- 推荐商品 --> | ||
344 | + <view class="flex-center rel xc-linellae-frame"> | ||
345 | + <view class="xc-linellae"></view> | ||
346 | + <view class="abs flex-center xc-recommend-frame "> | ||
347 | + <image class=" xc-recommend" src="{{iurl}}/miniapp/images/diamond.png"></image> | ||
348 | + <view class="xc-recommend-word">推荐</view> | ||
349 | + </view> | ||
350 | + </view> | ||
351 | + <goods_recommend id="goods_list"></goods_recommend> | ||
352 | + <!-- 技术支持 --> | ||
353 | + <view class="logo-container t-c"> | ||
354 | + <view class="flex ai_c fs24 jc-center pdv30 white"> | ||
355 | + <image src="{{iurl + 'miniapp/images/luckDraw/logo.png?v=3'}}" class="logo" lazy-load></image> | ||
356 | + 提供技术支持 | ||
357 | + </view> | ||
358 | + </view> | ||
359 | + </view> | ||
360 | + | ||
361 | + <view class="goods-norms" hidden="{{activeCategoryId==1?false:true}}"> | ||
362 | + <view class="pd20"> | ||
363 | + <!-- <view class="table_s" wx:if="{{service_list}}"> | ||
364 | + <view class="tb_item tb-l"> | ||
365 | + <view class="item_left f1"> | ||
366 | + <text>项目名称</text> | ||
367 | + </view> | ||
368 | + <view class="item_left f1"> | ||
369 | + <text>耗时(分)</text> | ||
370 | + </view> | ||
371 | + <view class="item_left f1"> | ||
372 | + <text>次数</text> | ||
373 | + </view> | ||
374 | + </view> | ||
375 | + <view class="tb_item tb-l" wx:for="{{service_list}}"> | ||
376 | + <view class="item_right f1"> | ||
377 | + <text>{{item.projectName}}</text> | ||
378 | + </view> | ||
379 | + <view class="item_right f1"> | ||
380 | + <text>{{item.timeConsuming}}</text> | ||
381 | + </view> | ||
382 | + <view class="item_right f1"> | ||
383 | + <text>{{item.frequency}}</text> | ||
384 | + </view> | ||
385 | + </view> | ||
386 | + </view> --> | ||
387 | + | ||
388 | + <block wx:if="{{listServiceItem && listServiceItem.length > 0}}"> | ||
389 | + <view class="card fs28" wx:for="{{listServiceItem}}"> | ||
390 | + <view class="flex ai_c jc_sb" style="height: 88rpx;"> | ||
391 | + <view class="ellipsis-2 f1">{{item.projectName}}({{item.frequency}}次)</view> | ||
392 | + <view class="pdl30 t-r"> | ||
393 | + <view class="rmb fs36 bold c-red">{{item.vipprice}}</view> | ||
394 | + <view class="fs22 c-9 del" wx:if="{{item.showPrice}}">零售价:¥{{item.showPrice}}</view> | ||
395 | + </view> | ||
396 | + </view> | ||
397 | + <view class="flex ai_c jc_sb fs24 c-6"> | ||
398 | + <view class="ellipsis-1">备注:{{filters.show_default(item.remark, '无')}}</view> | ||
399 | + <!-- 指定开始日期和结束日期 --> | ||
400 | + <view class="pdl30 shrink0">有效期:{{filters.showStartAndEndDate(item, data.validDays)}}</view> | ||
401 | + </view> | ||
402 | + </view> | ||
403 | + </block> | ||
404 | + | ||
405 | + <block wx:if="{{enableMeiye}}"> | ||
406 | + <block wx:if="{{taoheList && taoheList.length > 0}}"> | ||
407 | + <view class="taohe fs28" wx:for="{{taoheList}}"> | ||
408 | + <view class="flex ai_c jc_sb" style="height: 88rpx;"> | ||
409 | + <view class="ellipsis-2 f1">{{item.goods_name}} ({{item.goods_sn}}) ({{item.frequency}}个)</view> | ||
410 | + <view class="pdl30 t-r"> | ||
411 | + <view class="rmb fs36 bold c-red">{{item.vipprice}}</view> | ||
412 | + <view class="fs22 c-9 del">零售价:¥{{item.show_price}}</view> | ||
413 | + </view> | ||
414 | + </view> | ||
415 | + <view class="flex ai_c jc_sb fs24 c-6 pdt10"> | ||
416 | + <view class="ellipsis-1">备注:{{filters.show_default(item.remark, '无')}}</view> | ||
417 | + <view class="pdl30 shrink0">有效期:{{filters.showStartAndEndDate(item,data.validDays)}}</view> | ||
418 | + </view> | ||
419 | + </view> | ||
420 | + </block> | ||
421 | + </block> | ||
422 | + | ||
423 | + <view class="wxParse"> | ||
424 | + <template is="wxParse" data="{{wxParseData:content.nodes}}"></template> | ||
425 | + </view> | ||
426 | + | ||
427 | + </view> | ||
428 | + </view> | ||
429 | + | ||
430 | + <view class="goods-comment" hidden="{{activeCategoryId==2?false:true}}"> | ||
431 | + <view class="topframe"> | ||
432 | + <view class="topframe-top"> | ||
433 | + <view class="topframe-top-content"> | ||
434 | + <view>宝贝评价</view> | ||
435 | + <view class="topframe-top-val">({{categories3[0].num}})</view> | ||
436 | + </view> | ||
437 | + <view class="topframe-praise" wx:if="{{categories3[0].num}}"> | ||
438 | + 好评{{ filters.toFix(categories3[2].num/categories3[0].num*100,2) }}% | ||
439 | + </view> | ||
440 | + <view wx:else>好评 0%</view> | ||
441 | + </view> | ||
442 | + <view class="buttem-list"> | ||
443 | + <view bindtap="tabClick3" id="{{item.id}}" wx:for="{{categories3}}" wx:key="categories3" class="item {{activeCategoryId3==item.id?'red':''}}"> | ||
444 | + {{item.name}}({{item.num}}) | ||
445 | + </view> | ||
446 | + </view> | ||
447 | + </view> | ||
448 | + <block wx:for="{{comments}}" wx:for-index="cIdx" wx:key="{{cIdx}}"> | ||
449 | + <view style='border-bottom:4rpx solid #eee;'> | ||
450 | + <view class="middle"> | ||
451 | + <view class="middle-img-frame"> | ||
452 | + <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> | ||
453 | + <view class="middle-user-frame"> | ||
454 | + <view class="middle-user"> | ||
455 | + {{item.username==''||item.is_anonymous==1 ?'匿名用户':item.username}} | ||
456 | + </view> | ||
457 | + <image class="star" src="{{iurl}}/miniapp/images/star-red.png" wx:for="{{item.sum_rank}}" wx:key="{{index}}"></image> | ||
458 | + </view> | ||
459 | + </view> | ||
460 | + <view class="xc-pirces"> | ||
461 | + <view class="middle-font {{item.seeMore==true?'ellipsis-3':''}}" style="word-break: break-all;"> | ||
462 | + {{item.content?item.content:'此用户没有填写评价。'}} | ||
463 | + </view> | ||
464 | + </view> | ||
465 | + <view wx:if='{{item.seeMore}}' data-index='{{cIdx}}' class="s_btn fs30 red-co" catchtap='toggleHandler'> | ||
466 | + 全部显示 | ||
467 | + </view> | ||
468 | + <view wx:if='{{!item.seeMore && item.auto}}' data-index='{{cIdx}}' class="s_btn fs30 red-co" catchtap='toggleContent'> | ||
469 | + 收起 | ||
470 | + </view> | ||
471 | + <view class="img-ul"> | ||
472 | + <block wx:if="{{item.source_type==0}}"> | ||
473 | + <view class="img-li" wx:for="{{item.img}}" wx:key="{{index}}"> | ||
474 | + <image bindtap="previewCommentImgs" class="wh100" data-cidx="{{cIdx}}" data-img="{{iurl}}{{item}}" data-id="{{index}}" src="{{iurl}}{{item}}"></image> | ||
475 | + </view> | ||
476 | + </block> | ||
477 | + <block wx:if="{{item.source_type==1}}"> | ||
478 | + <view class="img-li" wx:for="{{item.weapp_img}}" wx:if="{{aitem.length>10}}" wx:key="{{index}}" wx:for-item="aitem"> | ||
479 | + <image bindtap="previewCommentImgs_w" class="wh100" data-cidx="{{cIdx}}" data-img="{{aitem}}" data-id="{{index}}" src="{{aitem}}"></image> | ||
480 | + </view> | ||
481 | + </block> | ||
482 | + </view> | ||
483 | + <view class="z_parameter"> | ||
484 | + <view class="parameter-font">{{item.add_time}}</view> | ||
485 | + <view class="parameter-dian" bindtap="click_zan" data-com_id="{{item.comment_id}}" data-item_id="{{cIdx}}"> | ||
486 | + <image wx:if="{{item.userZanNum==1}}" class="parameter-img" src="{{iurl}}/miniapp/images/zan_red.png"></image> | ||
487 | + <image wx:else class="parameter-img" src="{{iurl}}/miniapp/images/dianzan.png"></image> | ||
488 | + <view class="parameter-val" style='color:{{item.userZanNum==1? "#d60022":"#999" }}'> | ||
489 | + {{item.zan_num}} | ||
490 | + </view> | ||
491 | + </view> | ||
492 | + </view> | ||
493 | + </view> | ||
494 | + <view class="reply rel" wx:if="{{item.replay_list}}"> | ||
495 | + <view class="line_bulge"></view> | ||
496 | + <view class="shop-reply">店家回复:</view> | ||
497 | + <view class="shop-font" wx:for="{{item.replay_list}}" wx:for-item="r_item" wx:key="{{index}}"> | ||
498 | + {{r_item.content}} | ||
499 | + </view> | ||
500 | + </view> | ||
501 | + </view> | ||
502 | + </block> | ||
503 | + <block wx:if="{{(!comments || comments.length==0) && get_c }}"> | ||
504 | + <text class="no_pj_list">暂无评价</text> | ||
505 | + </block> | ||
506 | + <block wx:if="{{comments.length>10 && comments_no_more}}"> | ||
507 | + <text class="no_pj_list">已经加载到底部</text> | ||
508 | + </block> | ||
509 | + </view> | ||
510 | + | ||
511 | + </view> | ||
512 | +</view> | ||
513 | +<!-- -滚动到顶部-- --> | ||
514 | +<view bindtap="doScrollTop" class="toTop" wx:if="{{supportPageScroll}}"> | ||
515 | + <image class="wh100" src="{{iurl}}/miniapp/images/topup.png"></image> | ||
516 | +</view> | ||
517 | +<!-- -----------------底部按钮------------------ --> | ||
518 | +<view class="join-cart"> | ||
519 | + <!-- bindtap="contactService" --> | ||
520 | + <!-- <button wx:if="{{sys_switch.weapp_customertype==1}}" class="custom-service cart-ico new_split" bindtap="click_contact" open-type="contact" session-from="wechat|{{userInfo.user_id}}|{{userInfo.nickname}}|{{userInfo.head_pic}}"> | ||
521 | + <image class="cs-img" src="{{iurl}}/miniapp/images/custom-service.png"></image> | ||
522 | + <view>客服</view> | ||
523 | + </button> | ||
524 | + | ||
525 | + <view wx:elif="{{sys_switch.weapp_customertype==2}}" class="custom-service cart-ico new_split" bindtap="con_weixin"> | ||
526 | + <image class="cs-img" src="{{iurl}}/miniapp/images/custom-service.png"></image> | ||
527 | + <view>客服</view> | ||
528 | + </view> | ||
529 | + | ||
530 | + <view wx:else class="custom-service cart-ico new_split" bindtap="contactService"> | ||
531 | + <image class="cs-img" src="{{iurl}}/miniapp/images/custom-service.png"></image> | ||
532 | + <view>客服</view> | ||
533 | + </view> --> | ||
534 | + | ||
535 | + <view class="custom-service cart-ico new_split" bindtap="openCS"> | ||
536 | + <image class="cs-img" src="{{iurl}}/miniapp/images/custom-service.png"></image> | ||
537 | + <view>客服</view> | ||
538 | + </view> | ||
539 | + | ||
540 | + <view bindtap="collectGoods" class="custom-service cart-ico new_split"> | ||
541 | + <image hidden="{{is_collect}}" class="cs-img" src="{{iurl}}/miniapp/images/heart.png"></image> | ||
542 | + <image hidden="{{!is_collect}}" class="cs-img" src="{{iurl}}/miniapp/images/heart-h.png"></image> | ||
543 | + <view>收藏</view> | ||
544 | + </view> | ||
545 | + <view class="shopping-cart cart-ico new_split"> | ||
546 | + <navigator open-type="switchTab" url="/pages/cart/cart/cart"> | ||
547 | + <image class="sc-img" src="{{iurl}}/miniapp/images/shopping-cart.png"></image> | ||
548 | + <!-- <view class="cart-num ellipsis-1">{{cartGoodsNum}}</view> --> | ||
549 | + <view>购物车</view> | ||
550 | + </navigator> | ||
551 | + </view> | ||
552 | + | ||
553 | + <view wx:if="{{type == 0}}" class="buy-btn cart-btn cart-btn-lg lanse set_width" style="border-radius: 56rpx;">即将开始</view> | ||
554 | + <view wx:else class="fs24 f1 flex ai-center bg-FF4732 t-c white" style="border-radius:10rpx;justify-content: center"> | ||
555 | + <view style="padding: 0 6rpx"> | ||
556 | + <view class="">{{filters.format_time(presellForm.end_time,2)}} 预售结束</view> | ||
557 | + <!-- <view class="">08.30 23:59:59 开始发货</view> --> | ||
558 | + <view class="" wx:if="{{presellForm.delivery_type==1}}">{{filters.format_time(presellForm.delivery_date,2)}} 开始发货</view> | ||
559 | + <view class="" wx:else>付款{{presellForm.delivery_daynum}} 天内发货</view> | ||
560 | + </view> | ||
561 | + | ||
562 | + <view class="line" bindtap="openSpecModel" data-ind="2" style="margin-left: 10rpx; padding-left: 10rpx"> | ||
563 | + <block wx:if="{{presellForm.presell_type==0}}"> | ||
564 | + <view class="">支付定金</view> | ||
565 | + <view class="flex"> | ||
566 | + 定金 | ||
567 | + <text class="rmb">{{presellList.presell_money}}</text> | ||
568 | + </view> | ||
569 | + </block> | ||
570 | + <block wx:else> | ||
571 | + <view class="">支付金额</view> | ||
572 | + <view class="flex"> | ||
573 | + <text class="rmb" style="margin-left:10rpx;">{{presellList.presell_price}}</text> | ||
574 | + </view> | ||
575 | + </block> | ||
576 | + </view> | ||
577 | + </view> | ||
578 | +</view> | ||
579 | +<!-- 制作一个圆球导航 --> | ||
580 | +<nav_box></nav_box> | ||
581 | +</block> | ||
582 | + | ||
583 | + | ||
584 | + | ||
585 | +<!-- --弹起来,选择规格数量,普通商品购买和秒杀---- --> | ||
586 | +<view hidden="{{!openSpecModal}}"> | ||
587 | + <view bindtap="closeSpecModal" class="cover-layer"></view> | ||
588 | + <view class="spec-model"> | ||
589 | + <view class="pding"> | ||
590 | + <icon bindtap="closeSpecModal" class="modal-close" color="black" size="22" type="cancel"></icon> | ||
591 | + <view class="spec-goods"> | ||
592 | + <image class="wh100 spec-img xc-distance-bottom" bindtap="previewImage" src="{{iurl+sele_g.image_url}}" binderror="pop_err_img" data-errorimg="sele_g.image_url"></image> | ||
593 | + <view class="spec-goods-info"> | ||
594 | + <view class="spec-goods-name ellipsis-2">{{sele_g.goods_name}}</view> | ||
595 | + <view class="flex ai_end xc-val-money"> | ||
596 | + | ||
597 | + <view class="spec-goods-price tag"> | ||
598 | + <text class="fs20">¥</text>{{pre_arr.presell_money}} | ||
599 | + </view> | ||
600 | + <!-- 显示线下价格 --> | ||
601 | + <view wx:if="{{sele_g.offline_price}}" class="quan_price flex ai-center jc-center"> | ||
602 | + 券后¥<text class="fs32">{{sele_g.offline_price}}</text> | ||
603 | + </view> | ||
604 | + </view> | ||
605 | + | ||
606 | + <view class="flex"> | ||
607 | + <view class="spec-goods-stock"> | ||
608 | + 已售:{{pre_arr.buy_goodnum+pre_arr.virtual_qty}} | ||
609 | + </view> | ||
610 | + <view class="spec-goods-stock">可售:{{pre_arr.presell_sumqty-pre_arr.buy_goodnum}}</view> | ||
611 | + </view> | ||
612 | + | ||
613 | + | ||
614 | + </view> | ||
615 | + <!-- 选择门店模块 --> | ||
616 | + <view class="flex-space-between address ai_end xc-width "> | ||
617 | + <view class="flex ai_end" wx:if="{{def_pick_store && def_pick_store.pickup_name}}"> | ||
618 | + <text class="fs30 xc-black3 shop_name bold">{{def_pick_store.pickup_name}}</text> | ||
619 | + <view class="distance fs24 xc-ash" wx:if="{{def_pick_store.distance!=null}}"> | ||
620 | + 距离:{{def_pick_store.distance>1000?filters.toFix(def_pick_store.distance/1000,2)+"km":filters.toFix(def_pick_store.distance,0)+"m"}} | ||
621 | + </view> | ||
622 | + </view> | ||
623 | + <!-- 没有门店的时候 --> | ||
624 | + <view class="flex" bindtap="choice_store" wx:else> | ||
625 | + <image class="stores-img" src="{{iurl}}/miniapp/images/stores.png"></image> | ||
626 | + <view class="fs30" style="color:black;">选择门店</view> | ||
627 | + </view> | ||
628 | + <view hidden="{{has_def && sys_switch.is_pricing_open_store}}" class="red-co fs28" bindtap="choice_store">更多门店<text class="right-arrow"></text></view> | ||
629 | + </view> | ||
630 | + <view wx:if="{{only_pk && !only_pk.length}}">(库存不足)</view> | ||
631 | + <block wx:else> | ||
632 | + <view wx:if="{{def_pickpu_list && !def_pickpu_list.length}}">(库存不足)</view> | ||
633 | + <block wx:else> | ||
634 | + <view class="no_store" wx:if="{{def_pick_store.is_no_dis}}">(配送不匹配)</view> | ||
635 | + <view class="no_store" wx:elif="{{def_pick_store.is_no_dis_act}}">(该店不可售)</view> | ||
636 | + <view wx:elif="{{def_pick_store && !def_pick_store.CanOutQty && !filters.is_virtual_gd(sele_g.is_virtual) && sales_rules>=2 && prom_type==0}}"> | ||
637 | + (库存不足) | ||
638 | + </view> | ||
639 | + </block> | ||
640 | + </block> | ||
641 | + <view class="fs24 xc-ash-9f xc-distance-top " wx:if="{{def_pick_store && def_pick_store.fulladdress}}"> | ||
642 | + 地址:{{def_pick_store.fulladdress}} | ||
643 | + </view> | ||
644 | + </view> | ||
645 | + <!-- 商品的属性项目 --> | ||
646 | + <view class="xc-goods-attribute"> | ||
647 | + <view hidden="{{ismend==1}}" class="spec-name">商品规格</view> | ||
648 | + <view hidden="{{ismend==1}}" style="max-height: 120rpx;overflow-y: auto;"> | ||
649 | + <view class="spec_bt {{gid==item.goods_id?'act':''}}" bindtap="sele_spec" data-gid='{{item.goods_id}}' wx:for="{{sku_g}}" wx:key="sku_g"> | ||
650 | + {{item.gg}} | ||
651 | + </view> | ||
652 | + </view> | ||
653 | + </view> | ||
654 | + <view class="b_num"> | ||
655 | + <view>购买数量</view> | ||
656 | + <view class="count"> | ||
657 | + <view bindtap="{{goodsInputNum <= 1 ? '':'subCartNum'}}" class="sub {{goodsInputNum <= 1 ? 'active':''}}"> | ||
658 | + - | ||
659 | + </view> | ||
660 | + <input bindblur="inputCartNum" type="number" value="{{goodsInputNum}}"></input> | ||
661 | + <view bindtap="addCartNum" class="add">+</view> | ||
662 | + </view> | ||
663 | + </view> | ||
664 | + <!-- 提示再买多少优惠 --> | ||
665 | + <view style="margin-top: 35rpx;color:#333;font-size:28rpx;" wx:if="{{hui_condition && openSpecModal_ind==2}}"> | ||
666 | + 再买{{hui_condition.need}} | ||
667 | + <text wx:if="{{hui_condition.money}}">,免{{hui_condition.money}}元</text> | ||
668 | + <text wx:if="{{hui_condition.sale}}">,打{{hui_condition.sale}}折</text> | ||
669 | + <text wx:if="{{hui_condition.past==1}}">,包邮</text> | ||
670 | + <text wx:if="{{hui_condition.intValue>0}}">,送{{hui_condition.intValue}}积分</text> | ||
671 | + <text wx:if="{{hui_condition.couponId>0}}">,送优惠券</text> | ||
672 | + <text wx:if="{{hui_condition.gift_id>0}}">,送赠品</text> | ||
673 | + <text wx:if="{{hui_condition.lb_id>0}}">,送礼包</text> | ||
674 | + </view> | ||
675 | + </view> | ||
676 | + <view class="spec-cart-btns"> | ||
677 | + <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;"> | ||
678 | + 门店的不匹配 | ||
679 | + </view> | ||
680 | + <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;"> | ||
681 | + 该门店不可售 | ||
682 | + </view> | ||
683 | + | ||
684 | + <block wx:else> | ||
685 | + <!-- 根本就找不到门店 --> | ||
686 | + <block wx:if="{{!only_pk && !def_pickpu_list}}"> | ||
687 | + <view class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999;">未找到门店</view> | ||
688 | + </block> | ||
689 | + <block wx:else> | ||
690 | + <block wx:if="{{only_pk.length && !only_pk.length}}"> | ||
691 | + <view class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999;">未找到门店</view> | ||
692 | + </block> | ||
693 | + <block wx:else> | ||
694 | + <block wx:if="{{def_pickpu_list && !def_pickpu_list.length}}"> | ||
695 | + <view class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999">未找到门店</view> | ||
696 | + </block> | ||
697 | + <block wx:else> | ||
698 | + <block wx:if="{{!def_pick_store}}"> | ||
699 | + <view class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999"> | ||
700 | + 请先选择门店 | ||
701 | + </view> | ||
702 | + </block> | ||
703 | + <block wx:else> | ||
704 | + | ||
705 | + <!-- 线上销售 --> | ||
706 | + <block wx:if="{{sele_g.store_count<=0 || pre_arr.presell_sumqty<=pre_arr.buy_goodnum }}"> | ||
707 | + <view class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999">库存不足</view> | ||
708 | + </block> | ||
709 | + <block wx:else> | ||
710 | + <view wx:if="{{openSpecModal_ind==2}}" bindtap="addCart" | ||
711 | + data-openSpecModal_ind="{{openSpecModal_ind}}" class="spec-cart-btn spec-buy" data-action="buy"> | ||
712 | + <text wx:if="{{presellForm.presell_type==0}}">支付定金(¥{{pre_arr.presell_money}})</text> | ||
713 | + <text wx:else>支付金额(¥{{pre_arr.presell_price}})</text> | ||
714 | + </view> | ||
715 | + </block> | ||
716 | + | ||
717 | + </block> | ||
718 | + </block> | ||
719 | + </block> | ||
720 | + </block> | ||
721 | + </block> | ||
722 | + </view> | ||
723 | + | ||
724 | + | ||
725 | + <view class="clear"></view> | ||
726 | + <!-- 选择门店的列表 --> | ||
727 | + <view hidden="{{ismend==0}}" class="sto_v"> | ||
728 | + <view class="title" hidden="{{is_sec_mend==1}}" bindtap="hidemend"> | ||
729 | + <image class="tubiao" src="{{iurl}}/miniapp/images/icon-left.png"></image> | ||
730 | + 选择门店 | ||
731 | + </view> | ||
732 | + <!-- ---第一级显示---- --> | ||
733 | + <view class="itemlists" hidden="{{is_sec_mend==1}}"> | ||
734 | + <block wx:if="{{is_show_sto_cat}}"> | ||
735 | + <view wx:for="{{all_sto}}" wx:key="all_sto" class="item" bindtap="show_sec" data-index="{{index}}"> | ||
736 | + {{item.name}} | ||
737 | + </view> | ||
738 | + </block> | ||
739 | + <block wx:else> | ||
740 | + <view wx:for="{{only_pk}}" wx:key="only_pk" class="item" bindtap="hidemend" data-p_id="{{item.pickup_id}}" data-p_name="{{item.pickup_name}}" data-p_dis="{{item.distr_type}}"> | ||
741 | + {{item.pickup_name}} | ||
742 | + </view> | ||
743 | + </block> | ||
744 | + </view> | ||
745 | + <!-- ---第二级显示---- --> | ||
746 | + <view class="stitle" hidden="{{is_sec_mend==0}}" bindtap="hide_sec_mend"> | ||
747 | + <image class="tubiao" src="{{iurl}}/miniapp/images/icon-left.png"></image> | ||
748 | + {{sec_sto.name}} | ||
749 | + </view> | ||
750 | + <view class="itemlists" hidden="{{is_sec_mend==0}}"> | ||
751 | + <view wx:for="{{sec_sto.s_arr}}" wx:key="index" class="item" bindtap="hidemend" data-p_id="{{item.pickup_id}}" data-p_name="{{item.pickup_name}}" data-p_dis="{{item.distr_type}}"> | ||
752 | + {{item.pickup_name}} | ||
753 | + </view> | ||
754 | + </view> | ||
755 | + </view> | ||
756 | + </view> | ||
757 | +</view> | ||
758 | + | ||
759 | +<!-- --弹起来优惠信息---- --> | ||
760 | +<view hidden="{{!openPromModal}}"> | ||
761 | + <view bindtap="closePromModal" class="cover-layer"></view> | ||
762 | + <view class="prom-model"> | ||
763 | + <icon bindtap="closePromModal" class="modal-close" color="gray" size="22" type="cancel"></icon> | ||
764 | + <view class="prom-title">优惠信息</view> | ||
765 | + <view class="logistics-item" wx:for="{{select.activity.data}}" wx:key="index"> | ||
766 | + <view class="item-title"> | ||
767 | + <text class="prom-item">{{item.title}}</text> | ||
768 | + </view> | ||
769 | + <view class="item-mes ellipsis-1">{{item.content}}</view> | ||
770 | + </view> | ||
771 | + </view> | ||
772 | +</view> | ||
773 | + | ||
774 | +<!-- --弹起领券-- --> | ||
775 | +<view wx:if='{{coupon==1}}'> | ||
776 | + <view class="cover-layer flex-center" data-coupon='0' bindtap="switchCoupon"></view> | ||
777 | + <view class="cx-popup {{coupon== true ? 'up' : 'down'}} "> | ||
778 | + <view class="top-frame"> | ||
779 | + <!-- <view class="top two-level-word t-c"> --> | ||
780 | + <view class="top t-c">优惠券领取</view> | ||
781 | + </view> | ||
782 | + <!-- <view class="top-frame"> | ||
783 | + <view class="xc-valid-coupon four-level-word">可以领优惠券</view> | ||
784 | + </view> --> | ||
785 | + <view class="xc-frame"> | ||
786 | + <view class="top-frame"> | ||
787 | + <view class="xc-coupon-frame "> | ||
788 | + <!-- -单张的券- --> | ||
789 | + <view class="rel" wx:for="{{quan_list}}" wx:key="index"> | ||
790 | + <view class="coupon flex"> | ||
791 | + <view class="circle xc-circular-one"></view> | ||
792 | + <view class="xc-coupon-left "> | ||
793 | + <view class="flex ai_c xc-money-frame"> | ||
794 | + <text class="xc-money two-level-word xc-rmb">¥</text> | ||
795 | + <text class="one-level-word xc-money">{{item.money}}</text> | ||
796 | + </view> | ||
797 | + <view class="xc-money four-level-word xc-spacing">满{{item.condition}}元可用</view> | ||
798 | + </view> | ||
799 | + <view class="xc-coupon-right flex"> | ||
800 | + <view class="xc-detail-coupon"> | ||
801 | + <view class="four-level-word">订单金额满{{item.condition}}元可用</view> | ||
802 | + <view class="four-level-word xc-below"> | ||
803 | + {{filters.replace_time2(item.start)}} 至 {{filters.replace_time2(item.end)}} | ||
804 | + </view> | ||
805 | + </view> | ||
806 | + <view class="flex-vertical"> | ||
807 | + <view class="three-level-word xc-get background {{item.everyone_num>0 && item.lqnum>=item.everyone_num?'nouse':''}}" data-ind="{{index}}" data-cid="{{item.id}}" bindtap="get_quan"> | ||
808 | + {{ item.linging==1?'领取中':'领取'}} | ||
809 | + </view> | ||
810 | + </view> | ||
811 | + </view> | ||
812 | + <view class="circle xc-circular-two"></view> | ||
813 | + </view> | ||
814 | + </view> | ||
815 | + </view> | ||
816 | + </view> | ||
817 | + </view> | ||
818 | + <view class="cx-confirm pd20" data-coupon='0' bindtap="switchCoupon"> | ||
819 | + <view class="confirm t-c">关闭</view> | ||
820 | + </view> | ||
821 | + </view> | ||
822 | +</view> | ||
823 | + | ||
824 | +<!-- 选择门店的弹框,1.1版最新的 --> | ||
825 | +<block wx:if="{{store==1}}"> | ||
826 | + <view class="mongolia-layer" bindtap="close_popup"></view> | ||
827 | + <view class="popup-frame"> | ||
828 | + <block wx:if="{{sort_store==0}}"> | ||
829 | + <!-- 头部 标题 --> | ||
830 | + <view class="popup-top flex-space-between"> | ||
831 | + <text class="fs32 nearby_store">{{choice_sort_store==0?'附近的门店':region_name}}</text> | ||
832 | + <view> | ||
833 | + <view> | ||
834 | + <icon bindtap="close_popup" class="modal-closes" color="black" size="22" type="cancel"></icon> | ||
835 | + </view> | ||
836 | + <view class="felx choose_more" bindtap="more_store" wx:if="{{is_show_sto_cat>0}}" > | ||
837 | + <text class="fs26 red-co" >{{choice_sort_store==0?'更多门店':'返回'}}</text> | ||
838 | + <view class="bg_rights"></view> | ||
839 | + </view> | ||
840 | + </view> | ||
841 | + </view> | ||
842 | + <view class="searchbar flex-vertical-between storeListpadd"> | ||
843 | + <input class="inputstore fs28" placeholder="输入要搜索的门店" value="{{keyword}}" placeholder-class="fs28" maxlength="16" bindinput="input_store" bindconfirm="searchfn" /> | ||
844 | + <view class="search flex-center" bindtap="searchfn"> | ||
845 | + <view class="fs28">搜索</view> | ||
846 | + </view> | ||
847 | + </view> | ||
848 | + <!-- 门店列表,最外层的门店列表,一开始 --> | ||
849 | + <view class="store-list"> | ||
850 | + <!-- 如果还没有点击更多门店的时候 --> | ||
851 | + <block wx:if="{{choice_sort_store==0}}"> | ||
852 | + <!-- 需要for循环 --> | ||
853 | + <block wx:if="{{is_show_sto_cat==1}}"> | ||
854 | + <view class="store_choose flex" wx:for="{{def_pickpu_list}}" wx:key="dpl" bindtap="choose_for_store_fir" data-ind="{{index}}"> | ||
855 | + <view class="store flex-vertical"> | ||
856 | + <!-- 需要点击事件 --> | ||
857 | + <block wx:if="{{index==fir_pick_index}}"> | ||
858 | + <view class="circle white xc-hook fs20 red-b">Г</view> | ||
859 | + </block> | ||
860 | + <block wx:else> | ||
861 | + <view class="circle xc-hooks"></view> | ||
862 | + </block> | ||
863 | + <view class="address-frame xc-ash"> | ||
864 | + <view class="flex-vertical-between butttem5"> | ||
865 | + <view class="flex xc-ash"> | ||
866 | + <view class="fs30 xc-black3 address_name">{{item.pickup_name}} | ||
867 | + <text class="c-red22" wx:if="{{item.is_no_dis}}">(配送不匹配)</text> | ||
868 | + <text class="c-red22" wx:elif="{{item.is_no_dis_act}}">(该店不可售)</text> | ||
869 | + </view> | ||
870 | + </view> | ||
871 | + <view> | ||
872 | + <view class="distance fs24 address-val" wx:if="{{item.distance!=null}}"> | ||
873 | + 距离:{{item.distance>1000?filters.toFix(item.distance/1000,2)+'km':filters.toFix(item.distance,0)+"m"}} | ||
874 | + </view> | ||
875 | + </view> | ||
876 | + </view> | ||
877 | + <view class="fs24 xc-ash-9f">地址:{{item.fulladdress}}</view> | ||
878 | + </view> | ||
879 | + </view> | ||
880 | + </view> | ||
881 | + </block> | ||
882 | + <block wx:else> | ||
883 | + <view class="store_choose flex" wx:for="{{only_pk}}" wx:key="olpk" bindtap="choose_for_store_fir" data-ind="{{index}}"> | ||
884 | + <view class="store flex-vertical"> | ||
885 | + <!-- 需要点击事件 --> | ||
886 | + <block wx:if="{{index==fir_pick_index}}"> | ||
887 | + <view class="circle white xc-hook fs20 red-b">Г</view> | ||
888 | + </block> | ||
889 | + <block wx:else> | ||
890 | + <view class="circle xc-hooks"></view> | ||
891 | + </block> | ||
892 | + <view class="address-frame xc-ash"> | ||
893 | + <view class="flex-vertical-between "> | ||
894 | + <view class="flex xc-ash"> | ||
895 | + <view class="fs30 xc-black3 address_name">{{item.pickup_name}} | ||
896 | + <text class="c-red22" wx:if="{{item.is_no_dis}}">(配送不匹配)</text> | ||
897 | + <text class="c-red22" wx:elif="{{item.is_no_dis_act}}">(该店不可售)</text> | ||
898 | + </view> | ||
899 | + </view> | ||
900 | + <view> | ||
901 | + <view class="distance fs24 address-val" wx:if="{{item.distance!=null}}"> | ||
902 | + 距离:{{item.distance>1000?filters.toFix(item.distance/1000,2)+"km":filters.toFix(item.distance,0)+"m"}} | ||
903 | + </view> | ||
904 | + </view> | ||
905 | + </view> | ||
906 | + <view class="fs24 xc-ash-9f">地址:{{item.fulladdress}}</view> | ||
907 | + </view> | ||
908 | + </view> | ||
909 | + </view> | ||
910 | + </block> | ||
911 | + </block> | ||
912 | + <block wx:else> | ||
913 | + <!-- 如果是点击选择门店分类后显示分类下的门店 --> | ||
914 | + <view class="store_choose flex" wx:for="{{sec_sto.s_arr}}" wx:key="sec_arr" data-ind="{{index}}" bindtap="choose_for_store"> | ||
915 | + <view class="store flex-vertical"> | ||
916 | + <!-- 需要点击事件 --> | ||
917 | + <block wx:if="{{index==sec_pick_index}}"> | ||
918 | + <view class="circle white xc-hook fs20 red-b">Г</view> | ||
919 | + </block> | ||
920 | + <block wx:else> | ||
921 | + <view class="circle xc-hooks"></view> | ||
922 | + </block> | ||
923 | + <view class="address-frame xc-ash"> | ||
924 | + <view class="flex-vertical-between "> | ||
925 | + <view class="flex xc-ash"> | ||
926 | + <view class="fs28 xc-black3 address_name">{{item.pickup_name}} | ||
927 | + <text class="c-red22" wx:if="{{item.is_no_dis}}">(配送不匹配)</text> | ||
928 | + <text class="c-red22" wx:elif="{{item.is_no_dis_act}}">(该店不可售)</text> | ||
929 | + </view> | ||
930 | + </view> | ||
931 | + <view> | ||
932 | + <view class="distance fs24 address-val" wx:if="{{item.distance!=null}}"> | ||
933 | + 距离:{{item.distance>1000?filters.toFix(item.distance/1000,2)+"km":filters.toFix(item.distance,0)+"m"}} | ||
934 | + </view> | ||
935 | + </view> | ||
936 | + </view> | ||
937 | + <view class="fs24 xc-ash-9f">地址:{{item.fulladdress}}</view> | ||
938 | + </view> | ||
939 | + </view> | ||
940 | + </view> | ||
941 | + </block> | ||
942 | + </view> | ||
943 | + <!-- 门店列表底部 --> | ||
944 | + <view class="store-bottom-frame"> | ||
945 | + <view class="store-bottom flex-vertical-between"> | ||
946 | + <view class="determine red-b fs28 white t-c" bindtap="sure_pick" data-openindstore="{{open_ind_store}}"> | ||
947 | + 确定 | ||
948 | + </view> | ||
949 | + <view class="default t-c fs28" bindtap="set_def_pick" data-openindstore="{{open_ind_store}}"> | ||
950 | + 设为默认 | ||
951 | + </view> | ||
952 | + </view> | ||
953 | + </view> | ||
954 | + </block> | ||
955 | + <block wx:else> | ||
956 | + <view class="popup-top flex-space-between"> | ||
957 | + <text class="fs32 nearby_store">门店分类选择</text> | ||
958 | + <view> | ||
959 | + <view> | ||
960 | + <icon bindtap="close_popup" class="modal-closes" color="black" size="22" type="cancel"></icon> | ||
961 | + </view> | ||
962 | + <view class="felx choose_mores" bindtap="returns"> | ||
963 | + <text class="fs26 red-co">返回</text> | ||
964 | + </view> | ||
965 | + </view> | ||
966 | + </view> | ||
967 | + <view class="sort_store_list"> | ||
968 | + <view class="sort-store-frame" wx:for="{{all_sto}}" wx:key="all_sto" data-index="{{index}}" bindtap="choice_sort_store" data-region="{{item.name}}"> | ||
969 | + <view class="sort-store flex-vertical-between"> | ||
970 | + <view class="fs30" di>{{item.name}}</view> | ||
971 | + <view class="black_rights-frame"> | ||
972 | + <view class="black_rights"></view> | ||
973 | + </view> | ||
974 | + </view> | ||
975 | + </view> | ||
976 | + </view> | ||
977 | + </block> | ||
978 | + </view> | ||
979 | +</block> | ||
980 | +<!-- ---------------分享弹窗--------------- --> | ||
981 | +<!-- 二维码显示页面 --> | ||
982 | +<canvas canvas-id='share' style='width:750rpx;height:1217rpx;background-color:white;' wx:if='{{!canvasHidden}}'></canvas> | ||
983 | +<warn id="warn"></warn> | ||
984 | +<!-- 分享控件,底部弹出 --> | ||
985 | +<share id="share_button" bind:send="send" bind:cancel="cancel" bind:share_img="saveImageFn" wx:if="{{share_hidden}}"></share> | ||
986 | +<view wx:if="{{showPoster}}"> | ||
987 | + <view class="mask" catchtap="closePoster"></view> | ||
988 | + <view class="poster-container"> | ||
989 | + <view class="poster-wrapper"> | ||
990 | + <view class="poster" bindtap="previewPoster"> | ||
991 | + <!-- <view class="poster" bindtap="previewImage"> --> | ||
992 | + <image src="{{shareImgPath}}" class="poster-img" show-menu-by-longpress></image> | ||
993 | + <view class="btn-close" catchtap="closePoster"> | ||
994 | + <text class="iconfont icon-close"></text> | ||
995 | + </view> | ||
996 | + </view> | ||
997 | + <view class="btn-container"> | ||
998 | + <!-- <button class="btn-share" open-type="share" bindtap="">微信好友分享</button> --> | ||
999 | + <button class="btn-share" bindtap="savePic">保存到相册</button> | ||
1000 | + </view> | ||
1001 | + </view> | ||
1002 | + </view> | ||
1003 | +</view> | ||
1004 | + | ||
1005 | +<include src="../../../../components/com_servicer/com_servicer.wxml"/> | ||
1006 | + | ||
1007 | + |
packageC/pages/presell/cardInfo/goodsInfo.wxss
0 → 100644
1 | +@import "../../../../utils/wxParse/wxParse.wxss"; | ||
2 | +.container { margin-bottom: 100rpx; overflow: hidden;padding-top: 80rpx;} | ||
3 | +image { | ||
4 | + vertical-align: top; | ||
5 | +} | ||
6 | +.goods-detail{overflow: hidden} | ||
7 | + | ||
8 | +.type-navbar { | ||
9 | + display: flex; | ||
10 | + justify-content: center; | ||
11 | + width: 100%; | ||
12 | + position: fixed; | ||
13 | + top: 0; | ||
14 | + z-index: 999; | ||
15 | + /* height: 80rpx; */ | ||
16 | + /* margin-bottom: 20rpx; */ | ||
17 | + background-color: #fff; | ||
18 | + border-top: 2rpx solid #ebedf0; | ||
19 | + /* border-bottom: 1rpx #fafafa solid; */ | ||
20 | +} | ||
21 | +.type-box { | ||
22 | + width: 25%; | ||
23 | + box-sizing: border-box; | ||
24 | + font-size: 32rpx; | ||
25 | + line-height: 76rpx; | ||
26 | + padding: 0 20rpx; | ||
27 | + text-align: center; | ||
28 | + display: inline-block; | ||
29 | + overflow: hidden; | ||
30 | +} | ||
31 | +.type-navbar-item { | ||
32 | + /* border-bottom: 4rpx solid #fff; */ | ||
33 | + display: flex; | ||
34 | + justify-content: center; | ||
35 | + width: 100%; | ||
36 | + font-size: 26rpx; | ||
37 | +} | ||
38 | +.type-item-on { | ||
39 | + color: #F95D74; | ||
40 | + font-weight: bold; | ||
41 | + /* border-bottom: 4rpx solid #F95D74; */ | ||
42 | + position: relative; | ||
43 | + font-size: 30rpx; | ||
44 | +} | ||
45 | +.type-item-on:after { | ||
46 | + content: ''; | ||
47 | + position: absolute; | ||
48 | + width: 50%; | ||
49 | + height: 4rpx; | ||
50 | + background-color: #F95D74; | ||
51 | + left: 0; | ||
52 | + right: 0; | ||
53 | + bottom: 0; | ||
54 | + margin: 0 auto; | ||
55 | +} | ||
56 | +.swiper_box { | ||
57 | + width: 100%; | ||
58 | + height: 750rpx; | ||
59 | +} | ||
60 | +.goods-title { | ||
61 | + display: flex; | ||
62 | + justify-content: space-between; | ||
63 | + /* overflow: hidden; */ | ||
64 | + /* height: 108rpx; */ | ||
65 | +} | ||
66 | +.goods-name { | ||
67 | + /* width: 560rpx; */ | ||
68 | + /* line-height: 46rpx; */ | ||
69 | + font-size: 32rpx; | ||
70 | + font-weight: bold; | ||
71 | + color: #333; | ||
72 | + /* margin-top: 30rpx; | ||
73 | + margin-bottom:30rpx; */ | ||
74 | + flex: 1; | ||
75 | + text-align: justify; | ||
76 | + margin: 10rpx 0 20rpx; | ||
77 | +} | ||
78 | + | ||
79 | +.goods-collect { | ||
80 | + width: 112rpx; | ||
81 | + padding-top: 30rpx; | ||
82 | +} | ||
83 | + | ||
84 | +.collect-img { | ||
85 | + width: 50rpx; | ||
86 | + height: 44rpx; | ||
87 | + margin: 0 auto; | ||
88 | + overflow: hidden; | ||
89 | +} | ||
90 | + | ||
91 | +.collect-des { | ||
92 | + text-align: center; | ||
93 | + font-size: 24rpx; | ||
94 | + color: #333; | ||
95 | +} | ||
96 | + | ||
97 | +.goods-price { | ||
98 | + font-size: 60rpx; | ||
99 | + /* padding: 20rpx 34rpx; */ | ||
100 | + /* padding:0rpx 34rpx; */ | ||
101 | + /* line-height: 60rpx; */ | ||
102 | + color: #999; | ||
103 | + padding: 20rpx; | ||
104 | + /* margin-top: 46rpx; */ | ||
105 | + /* margin-top:26rpx; | ||
106 | + padding-bottom:20rpx; */ | ||
107 | +} | ||
108 | + | ||
109 | +.prom-info { | ||
110 | + margin: 10rpx 0; | ||
111 | + color: #f23030; | ||
112 | +} | ||
113 | + | ||
114 | +.prom-info>.prom-type { | ||
115 | + color: white; | ||
116 | + background-color: #f23030; | ||
117 | + margin-right: 14rpx; | ||
118 | + padding: 2rpx 8rpx; | ||
119 | + border-radius: 4rpx; | ||
120 | +} | ||
121 | +.market-price { | ||
122 | + /* display: flex; | ||
123 | + margin-left: -5rpx; */ | ||
124 | +} | ||
125 | + | ||
126 | +.market-price .yuan{ | ||
127 | + /* top:24rpx; */ | ||
128 | + font-size: 30rpx | ||
129 | +} | ||
130 | + | ||
131 | +.market-price>view>text { | ||
132 | + text-decoration: line-through; | ||
133 | +} | ||
134 | + | ||
135 | +.market-price>.yj{ | ||
136 | + color: #999999; font-size: 24rpx;/* margin-left: 16rpx;position: relative;top:30rpx; */ | ||
137 | + display: inline-block; | ||
138 | +} | ||
139 | + | ||
140 | +.goods-price>.tm{ color: #999999; font-size: 26rpx;margin-top: 10rpx;} | ||
141 | + | ||
142 | +.goods-num { | ||
143 | + color: #999; | ||
144 | + display: flex; | ||
145 | + font-size: 24rpx; | ||
146 | + justify-content: space-between; | ||
147 | +} | ||
148 | + | ||
149 | +.goods-detail .twen{ | ||
150 | + background: #fff;height: 60rpx; line-height: 60rpx; font-size: 30rpx;padding-left: 30rpx;display: flex; | ||
151 | +} | ||
152 | +.goods-detail .twen .img{ width: 32rpx; height: 32rpx; margin-left: 200rpx; background: #fff} | ||
153 | +.goods-detail .twen image.img{vertical-align:auto;} | ||
154 | + | ||
155 | + | ||
156 | +.logistics-item { | ||
157 | + display: flex; | ||
158 | + justify-content: space-between; | ||
159 | + align-items: center; | ||
160 | + height: 90rpx; | ||
161 | + /*border-bottom: 1px solid #f5f5f5;*/ | ||
162 | + font-size: 32rpx; | ||
163 | + color: #666; | ||
164 | +} | ||
165 | +.logistics-item .small{color: #999; font-size: 24rpx;} | ||
166 | + | ||
167 | +.item-title { width: 180rpx;} | ||
168 | +.item-mes { | ||
169 | + color: #333; width: 420rpx; | ||
170 | + height: 90rpx; line-height: 90rpx; | ||
171 | +} | ||
172 | +.item-img { width: 32rpx; height: 32rpx;} | ||
173 | +.prom-item { | ||
174 | + color: #f23030; | ||
175 | + border: 1px solid #f23030; | ||
176 | + border-radius: 18rpx; | ||
177 | + line-height: 40rpx; | ||
178 | + height: 40rpx; | ||
179 | + padding: 2rpx 8rpx; | ||
180 | +} | ||
181 | + | ||
182 | +.guarantee { | ||
183 | + justify-content: space-around; | ||
184 | +} | ||
185 | + | ||
186 | +.ico-item { | ||
187 | + width: 32rpx; | ||
188 | + height: 32rpx; | ||
189 | + margin-right: 10rpx; | ||
190 | +} | ||
191 | + | ||
192 | +.guarantee>view { | ||
193 | + display: flex; | ||
194 | + align-items: center; | ||
195 | + height: 32rpx; | ||
196 | + color: #666; | ||
197 | +} | ||
198 | + | ||
199 | +.user-comment { | ||
200 | + margin: 10rpx 0; | ||
201 | + font-size: 28rpx; | ||
202 | +} | ||
203 | + | ||
204 | +.good-comment,.comment-num { | ||
205 | + display: flex; | ||
206 | +} | ||
207 | + | ||
208 | +.recommend { | ||
209 | + background-color: #fff; | ||
210 | + border-bottom: 1px solid #ddd; | ||
211 | + padding-bottom: 20rpx; | ||
212 | +} | ||
213 | + | ||
214 | +.recommend-title { | ||
215 | + height: 70rpx; | ||
216 | + line-height: 70rpx; | ||
217 | + font-size: 28rpx; | ||
218 | + padding: 0 30rpx; | ||
219 | +} | ||
220 | + | ||
221 | +.recommend-ul { | ||
222 | + display: flex; | ||
223 | + justify-content: flex-start; | ||
224 | +} | ||
225 | + | ||
226 | +.recommend-ul .li { | ||
227 | + width: 25%; | ||
228 | + box-sizing: border-box; | ||
229 | + text-align: center; | ||
230 | + font-size: 28rpx; | ||
231 | + color: #333; | ||
232 | +} | ||
233 | + | ||
234 | +.li-img { | ||
235 | + width: 120rpx; | ||
236 | + height: 120rpx; | ||
237 | + margin: 0 auto; | ||
238 | +} | ||
239 | + | ||
240 | +.li-title { | ||
241 | + height: 58rpx; | ||
242 | + line-height: 30rpx; | ||
243 | + margin: 10rpx 0; | ||
244 | +} | ||
245 | + | ||
246 | +.comment-item { | ||
247 | + background-color: #fff; | ||
248 | + font-size: 28rpx; | ||
249 | +} | ||
250 | + | ||
251 | +.comment-title { | ||
252 | + display: flex; | ||
253 | + justify-content: space-between; | ||
254 | + align-items: center; | ||
255 | + height: 102rpx; | ||
256 | + margin: 0 30rpx; | ||
257 | + color: #333; | ||
258 | + border-bottom: 1px solid #eee; | ||
259 | +} | ||
260 | + | ||
261 | +.user-name { | ||
262 | + display: flex; | ||
263 | + align-items: center; | ||
264 | +} | ||
265 | + | ||
266 | +.user-pic { | ||
267 | + width: 54rpx; | ||
268 | + height: 54rpx; | ||
269 | + margin-right: 10rpx; | ||
270 | + border-radius: 50%; | ||
271 | + overflow: hidden; | ||
272 | +} | ||
273 | + | ||
274 | +.stars { | ||
275 | + float: left; | ||
276 | + display: flex; | ||
277 | + height: 42rpx; | ||
278 | + line-height: 42rpx; | ||
279 | + margin: 15rpx 0; | ||
280 | + width: 200rpx; | ||
281 | +} | ||
282 | + | ||
283 | +.star { | ||
284 | + width: 26rpx; | ||
285 | + height: 26rpx; | ||
286 | + margin-right: 5rpx; | ||
287 | +} | ||
288 | + | ||
289 | +.state-spec { | ||
290 | + margin: 15rpx 0; | ||
291 | + float: right; | ||
292 | + font-size: 24rpx; | ||
293 | + color: #666; | ||
294 | + width: 460rpx; | ||
295 | + text-align: right; | ||
296 | +} | ||
297 | + | ||
298 | +.comment-cont { | ||
299 | + padding: 0 30rpx 30rpx; | ||
300 | + border-bottom: 1px solid #eee; | ||
301 | +} | ||
302 | + | ||
303 | +.comment-mes { | ||
304 | + line-height: 42rpx; | ||
305 | +} | ||
306 | + | ||
307 | +.img-ul { | ||
308 | + display: flex; | ||
309 | + flex-wrap: wrap; | ||
310 | +} | ||
311 | + | ||
312 | +.img-li { | ||
313 | + width: 150rpx; | ||
314 | + height: 150rpx; | ||
315 | + margin-top: 8rpx; | ||
316 | + margin-right: 10rpx; | ||
317 | +} | ||
318 | + | ||
319 | +.comment-btn { | ||
320 | + height: 60rpx; | ||
321 | + padding: 20rpx 30rpx; | ||
322 | +} | ||
323 | + | ||
324 | +.comment-btn .btn { | ||
325 | + display: flex; | ||
326 | + justify-content: center; | ||
327 | + align-items: center; | ||
328 | + height: 60rpx; | ||
329 | + width: 45%; | ||
330 | + border: 1px solid #eee; | ||
331 | +} | ||
332 | + | ||
333 | +.comment-btn .btn-img { | ||
334 | + width: 30rpx; | ||
335 | + height: 28rpx; | ||
336 | + margin: 0 10rpx; | ||
337 | +} | ||
338 | + | ||
339 | +.reply-ul { | ||
340 | + margin-top: 20rpx; | ||
341 | +} | ||
342 | + | ||
343 | +.reply-li { | ||
344 | + color: #aaa; | ||
345 | +} | ||
346 | + | ||
347 | +.join-cart { | ||
348 | + position: fixed; | ||
349 | + left: 0; | ||
350 | + bottom: 0; | ||
351 | + display: flex; | ||
352 | + width: 100%; | ||
353 | + height: 100rpx; | ||
354 | + background-color: #fff; | ||
355 | + z-index: 9; | ||
356 | + border-top: 4rpx solid #eee; | ||
357 | + | ||
358 | +} | ||
359 | + | ||
360 | +.join-cart>view { | ||
361 | + width: 29%; | ||
362 | +} | ||
363 | + | ||
364 | +.join-cart>.new_split { | ||
365 | + width: 13%; | ||
366 | + text-align: center; | ||
367 | + padding: 0; | ||
368 | + margin: 0; | ||
369 | +} | ||
370 | + | ||
371 | +.cart-ico { | ||
372 | + font-size: 24rpx; | ||
373 | + color: #333; | ||
374 | +} | ||
375 | + | ||
376 | +.shopping-cart { | ||
377 | + position: relative; | ||
378 | +} | ||
379 | + | ||
380 | +.cs-img { | ||
381 | + width: 45rpx; | ||
382 | + height: 40rpx; | ||
383 | + margin-top: 15rpx; | ||
384 | +} | ||
385 | + | ||
386 | +.sc-img { | ||
387 | + width: 42rpx; | ||
388 | + height: 40rpx; | ||
389 | + margin-top: 15rpx; | ||
390 | +} | ||
391 | + | ||
392 | +.cart-num { | ||
393 | + position: absolute; | ||
394 | + left: 50%; | ||
395 | + top: 1rpx; | ||
396 | + width: 40rpx; | ||
397 | + height: 40rpx; | ||
398 | + line-height: 40rpx; | ||
399 | + text-align: center; | ||
400 | + border-radius: 50%; | ||
401 | + color: #fff; | ||
402 | + background-color: rgba(217,81,99,0.9); | ||
403 | +} | ||
404 | + | ||
405 | +.cart-btn { | ||
406 | + font-size: 28rpx; | ||
407 | + color: #fff; | ||
408 | + line-height: 70rpx; | ||
409 | + margin-top: 16rpx; | ||
410 | + text-align: center; | ||
411 | + | ||
412 | + | ||
413 | +} | ||
414 | + | ||
415 | +.join-btn { | ||
416 | + background-color: #ffb03f; | ||
417 | + height: 70rpx; | ||
418 | +border-radius: 55rpx 0rpx 0rpx 55rpx; | ||
419 | +margin-top: 16rpx; | ||
420 | + | ||
421 | + | ||
422 | +} | ||
423 | + | ||
424 | +view.cart-btn-lg { | ||
425 | + width: 50%; | ||
426 | +} | ||
427 | + | ||
428 | +.buy-btn { | ||
429 | + background-color: #f23030; | ||
430 | + height: 70rpx; | ||
431 | +border-radius: 0 56rpx 55rpx 0; | ||
432 | + | ||
433 | +} | ||
434 | + | ||
435 | +.buy-btn-all{ | ||
436 | + background-color: #f23030; | ||
437 | + height: 70rpx; | ||
438 | + border-radius: 56rpx; | ||
439 | +} | ||
440 | + | ||
441 | + | ||
442 | +.toTop { | ||
443 | + position: fixed; | ||
444 | + z-index: 3; | ||
445 | + right: 20rpx; | ||
446 | + bottom: 160rpx; | ||
447 | + width: 68rpx; | ||
448 | + height: 68rpx; | ||
449 | + border: 1px solid #ddd; | ||
450 | + border-radius: 50%; | ||
451 | + overflow: hidden; | ||
452 | + cursor: pointer; | ||
453 | +} | ||
454 | + | ||
455 | +.comment-more { | ||
456 | + height: 56rpx; | ||
457 | + line-height: 56rpx; | ||
458 | + font-size: 26rpx; | ||
459 | + color: #999; | ||
460 | + text-align: center; | ||
461 | + background-color: #eee; | ||
462 | +} | ||
463 | + | ||
464 | +.goods-more { | ||
465 | + background-color: #fff; | ||
466 | +} | ||
467 | + | ||
468 | +.goods-norms { | ||
469 | + background-color: #fff; | ||
470 | +} | ||
471 | + | ||
472 | +.type-navbar2 { | ||
473 | + display: flex; | ||
474 | + height: 72rpx; | ||
475 | + border-top: 1px solid #ddd; | ||
476 | + border-bottom: 1px solid #ddd; | ||
477 | +} | ||
478 | + | ||
479 | +.type-box2 { | ||
480 | + width: 50%; | ||
481 | + font-size: 26rpx; | ||
482 | + line-height: 72rpx; | ||
483 | + text-align: center; | ||
484 | + overflow: hidden; | ||
485 | +} | ||
486 | + | ||
487 | +.type-item2-on { | ||
488 | + color: #f23030; | ||
489 | +} | ||
490 | + | ||
491 | +.parameter { | ||
492 | + padding: 40rpx 0; | ||
493 | +} | ||
494 | + | ||
495 | +.table { | ||
496 | + width: 698rpx; | ||
497 | + margin: 0 auto; | ||
498 | + border: 1px solid #ddd; | ||
499 | + border-bottom: none; | ||
500 | +} | ||
501 | + | ||
502 | +.tb { | ||
503 | + width: 100%; | ||
504 | + min-height: 69rpx; | ||
505 | + line-height: 69rpx; | ||
506 | + border-bottom: 1px solid #ddd; | ||
507 | + font-size: 28rpx; | ||
508 | + text-align: center; | ||
509 | + color: #333; | ||
510 | +} | ||
511 | + | ||
512 | +.th-thitle { | ||
513 | + font-weight: bold; | ||
514 | + background-color: #f5fafe; | ||
515 | +} | ||
516 | + | ||
517 | +.td-cont { | ||
518 | + display: flex; | ||
519 | +} | ||
520 | + | ||
521 | +.td-title { | ||
522 | + width: 259rpx; | ||
523 | + background-color: #f5fafe; | ||
524 | + border-right: 1px solid #ddd; | ||
525 | +} | ||
526 | + | ||
527 | +.td-text { | ||
528 | + width: 439rpx; | ||
529 | +} | ||
530 | + | ||
531 | +.goods-comment { | ||
532 | + background-color: #fff; | ||
533 | +} | ||
534 | + | ||
535 | +.type-navbar3 { | ||
536 | + display: flex; | ||
537 | + height: 88rpx; | ||
538 | + border-top: 1px solid #ddd; | ||
539 | + border-bottom: 1px solid #ddd; | ||
540 | + padding: 10rpx 0; | ||
541 | +} | ||
542 | + | ||
543 | +.type-box3 { | ||
544 | + width: 20%; | ||
545 | + font-size: 30rpx; | ||
546 | + line-height: 44rpx; | ||
547 | + text-align: center; | ||
548 | + overflow: hidden; | ||
549 | +} | ||
550 | + | ||
551 | +.type-item3-on { | ||
552 | + color: #f23030; | ||
553 | +} | ||
554 | + | ||
555 | +.spec-model { | ||
556 | + position: fixed; | ||
557 | + bottom: 0; | ||
558 | + z-index: 20; | ||
559 | + background: white; | ||
560 | + width: 100%; | ||
561 | + /* padding: 0 30rpx; */ | ||
562 | + font-size: 32rpx; | ||
563 | + box-sizing: border-box; | ||
564 | + border-radius: 20rpx 20rpx 0 0; | ||
565 | + /* height: 72%; */ | ||
566 | +} | ||
567 | + | ||
568 | +.spec-model .pding{padding: 0 20rpx;} | ||
569 | + | ||
570 | +.spec-goods { | ||
571 | + padding: 30rpx 0 20rpx; | ||
572 | + /* float: left; */ | ||
573 | + width: 100%; | ||
574 | + /* border-bottom:2rpx solid #eee; */ | ||
575 | +} | ||
576 | + | ||
577 | +.spec-img { | ||
578 | + float: left; | ||
579 | + height: 186rpx; | ||
580 | + width: 186rpx; | ||
581 | + border: 4rpx solid #eee | ||
582 | +} | ||
583 | + | ||
584 | +.spec-goods-info { | ||
585 | + float: left; | ||
586 | + padding: 0 25rpx; | ||
587 | + width: 400rpx; | ||
588 | +} | ||
589 | + | ||
590 | +.spec-goods-name { | ||
591 | + font-size: 30rpx; | ||
592 | + line-height: 35rpx; | ||
593 | + height: 70rpx; | ||
594 | + margin: 15rpx 20rpx 25rpx 0; | ||
595 | + overflow: hidden; | ||
596 | + text-overflow: ellipsis;color: #333; | ||
597 | +} | ||
598 | + | ||
599 | +.spec-goods-price { | ||
600 | + color: #d60021; | ||
601 | + font-size: 33rpx; | ||
602 | + font-weight: bold; | ||
603 | + | ||
604 | +} | ||
605 | + | ||
606 | +.spec-goods-price.tag { | ||
607 | + position: relative; | ||
608 | +} | ||
609 | + | ||
610 | +.spec-goods-price.tag::before { | ||
611 | + content: '预售'; | ||
612 | + color: white; | ||
613 | + background-color: #FF4732; | ||
614 | + font-size: 24rpx; | ||
615 | + border-radius: 4rpx; | ||
616 | + padding: 0 6rpx; | ||
617 | +} | ||
618 | + | ||
619 | +.spec-goods-stock { | ||
620 | + margin-top: 3rpx; | ||
621 | + font-size: 24rpx; | ||
622 | + color: #999999; | ||
623 | + margin-right: 15rpx; | ||
624 | +} | ||
625 | + | ||
626 | +.spec-name { | ||
627 | + clear: both; | ||
628 | + padding: 20rpx 0; | ||
629 | + font-size: 30rpx;color: #333; | ||
630 | +} | ||
631 | + | ||
632 | +.quhuo{font-size: 30rpx; color: #000} | ||
633 | +.b_num{ | ||
634 | + display: flex;font-size: 30rpx; color: #333; | ||
635 | + justify-content: space-between; | ||
636 | + align-items: center; | ||
637 | + padding: 20rpx 0; | ||
638 | +} | ||
639 | + | ||
640 | +.count { | ||
641 | + /* position: fixed; */ | ||
642 | + display: flex; | ||
643 | + height: 50rpx; | ||
644 | + /* border: 1rpx solid #000; */ | ||
645 | + font-size: 28rpx; | ||
646 | + right: 30rpx; | ||
647 | +} | ||
648 | + | ||
649 | + | ||
650 | +.count>view,.count>input { | ||
651 | + width: 60rpx; | ||
652 | + height: 50rpx; | ||
653 | + line-height: 50rpx; | ||
654 | + text-align: center; | ||
655 | +} | ||
656 | +.spec_bt{ | ||
657 | + background: fff;color: #333; margin-left: 10rpx;padding: 4rpx 15rpx 4rpx; display: inline-block; | ||
658 | + border-radius:30rpx;font-size: 24rpx;border: 1rpx solid #ccc; margin: 10rpx; height: 40rpx; line-height: 40rpx; | ||
659 | +} | ||
660 | +.spec_bt.act{background: #d60021;color: #fff;border: 1rpx solid #d60021;} | ||
661 | +.sub, .add, .count>input { | ||
662 | + /* border-right: 1px solid #000; */ | ||
663 | + background-color: #f8f8f8; | ||
664 | + border-radius: 8rpx; | ||
665 | +} | ||
666 | +.sub.active { | ||
667 | + /* background-color: #ddd; */ | ||
668 | + color: #ccc; | ||
669 | +} | ||
670 | +.count>input { | ||
671 | + margin: 0 10rpx; | ||
672 | +} | ||
673 | + | ||
674 | +.add { | ||
675 | + /* background-color: #f8f8f8; */ | ||
676 | + /* border-left: 1px solid #000; */ | ||
677 | +} | ||
678 | + | ||
679 | +.spec-btn { | ||
680 | + color: black; | ||
681 | + background-color: white; | ||
682 | + padding: 10rpx 10rpx; | ||
683 | + font-size: 26rpx; | ||
684 | + line-height: 28rpx; | ||
685 | + float: left; | ||
686 | + border: 1rpx solid #dedede; | ||
687 | + margin: 4rpx 10rpx 4rpx 0; | ||
688 | + border-radius: 4rpx; | ||
689 | +} | ||
690 | + | ||
691 | +.spec-btn-click { | ||
692 | + color: white; | ||
693 | + background-color: #f23030; | ||
694 | + border: 1rpx solid #f23030; | ||
695 | +} | ||
696 | + | ||
697 | +.spec-cart-btns { | ||
698 | + /* width: 92%; */ | ||
699 | + line-height: 70rpx; | ||
700 | + /* margin: 0rpx auto; | ||
701 | + margin-top: 160rpx; */ | ||
702 | + /* border-radius: 20rpx; */ | ||
703 | +/* position: fixed; */ | ||
704 | +/* bottom: 50rpx; */ | ||
705 | +/* left: 4%; */ | ||
706 | + padding: 20rpx; | ||
707 | +} | ||
708 | + | ||
709 | +.spec-cart-btn { | ||
710 | + | ||
711 | + width:100%; | ||
712 | + font-size: 30rpx; | ||
713 | + text-align: center; | ||
714 | + color: white; | ||
715 | + border-radius: 40rpx; | ||
716 | +} | ||
717 | + | ||
718 | +.spec-cart-btn.w40 { | ||
719 | + width: 46%; | ||
720 | +} | ||
721 | + | ||
722 | +.spec-add-cart { | ||
723 | + background-color: #ffb03f; | ||
724 | +} | ||
725 | + | ||
726 | +.spec-buy { | ||
727 | + background-color: #f23030; | ||
728 | + /* margin-left: 34rpx; */ | ||
729 | +} | ||
730 | + | ||
731 | +.spec-cart-disable { | ||
732 | + background: #bbbbbb; | ||
733 | +} | ||
734 | + | ||
735 | +.spec-cart-btn-lg { | ||
736 | + width: 614rpx; | ||
737 | +} | ||
738 | + | ||
739 | +.prom-model { | ||
740 | + position: fixed; | ||
741 | + bottom: 0; | ||
742 | + z-index: 20; | ||
743 | + background: white; | ||
744 | + width: 100%; | ||
745 | + padding: 0 30rpx 30rpx; | ||
746 | + font-size: 32rpx; | ||
747 | + box-sizing: border-box; | ||
748 | + overflow-x: hidden; | ||
749 | +} | ||
750 | + | ||
751 | +.prom-model .prom-title {text-align: center;margin: 30rpx 0;} | ||
752 | +.prom-model .logistics-item {border: 0;} | ||
753 | +.prom-model .item-mes {width: 500rpx;} | ||
754 | +.integral-btn {width: 100%; padding: 0rpx;margin: 0rpx;} | ||
755 | +.clear{clear: both;} | ||
756 | +.sto_v .title,.sto_v .stitle{ border-top: 1rpx solid #dedede;border-bottom: 1rpx solid #dedede; height: 78rpx; line-height: 78rpx;} | ||
757 | +.sto_v .title .tubiao,.sto_v .stitle .tubiao{width: 32rpx; height: 32rpx; margin-top: 23rpx;} | ||
758 | +.itemlists .item{border-bottom: 1rpx solid #dedede; height: 72rpx; line-height: 72rpx;font-size: 28rpx; margin: 0 10rpx;} | ||
759 | + | ||
760 | +.cshu{margin-bottom: 30rpx; margin-top: 20rpx;} | ||
761 | +.cshu view{color: #999; font-size: 30rpx; margin-left: 26rpx;} | ||
762 | + | ||
763 | + | ||
764 | +/*---活动特殊显示---*/ | ||
765 | +.prom_show{height: 120rpx; display: flex;} | ||
766 | +.prom_show .secondkill-img{width: 100%; height: 100%;} | ||
767 | +.prom_show .spike-img{width: 283rpx; height: 57rpx; top:35rpx; | ||
768 | +left:31rpx;} | ||
769 | +.prom_show .stop{ color:#d81731;top: 17rpx;right:65rpx; font-weight:600;} | ||
770 | +.prom_show .start{ color:#009ae2;top: 17rpx;right:65rpx; font-weight:600;} | ||
771 | +.prom_show .timeac { font-size: 32rpx; height: 120rpx; color: #333; } | ||
772 | +.prom_show .timeac.left{width: 66%; color: #fff;background:#f23030;} | ||
773 | +.prom_show .timeac.right{width: 34%;background-color: #d7d7d7; text-align: center} | ||
774 | + | ||
775 | +.prom_show .secview .day{padding-right:10rpx;} | ||
776 | +.prom_show .secview .time-val{width:36rpx;height:36rpx;border-radius:7rpx; line-height: 36rpx;} | ||
777 | +.prom_show .secview .time{margin-right:10rpx; margin-left:10rpx;} | ||
778 | + | ||
779 | + | ||
780 | +.prom_show .timeac.left view{ margin-left: 20rpx} | ||
781 | +.prom_show .timeac.left view.firview{margin-top: 10rpx} | ||
782 | +.prom_show .timeac.left view .tr_line{ text-decoration: line-through; font-size: 28rpx;} | ||
783 | +.prom_show .timeac.left view .bprice{ font-size: 50rpx; } | ||
784 | + | ||
785 | +.prom_show .timeac.right view.firview{margin-top:12rpx; margin-bottom: 10rpx} | ||
786 | +.prom_show .timeac.right view.secview{display: flex; text-align: center; justify-content:center; flex-direction: row;} | ||
787 | +.prom_show .timeac.right view .tui-conutdown-box{ | ||
788 | + /* background: #6b6b6b; */ | ||
789 | + width: auto; | ||
790 | + /* min-width: 45rpx; */ | ||
791 | + height: 45rpx; color: #c4182e; font-size: 27rpx; text-align: center; line-height: 46rpx;} | ||
792 | + | ||
793 | +.huise{ background:gray} | ||
794 | +.lanse{background:#0199e2} | ||
795 | + | ||
796 | + | ||
797 | +/*------拼单------*/ | ||
798 | +.pt_view{ text-align: center; width: 100%; height: 100rpx; line-height: 100rpx; font-size: 26rpx} | ||
799 | +.pt_view .secondkill-img{width: 100%;height: 100%;} | ||
800 | +.pt_fir{ background: #fff;/* margin-bottom: 10rpx; */} | ||
801 | +.pt_fir .pt_fir_title{display: flex; align-items: center; /* margin-left: 10rpx; margin-top: 20rpx; */ font-size: 28rpx; position: relative;} | ||
802 | +.pt_fir .pt_fir_title .kt_type{ color: #fff;background:#e9030d; width: 100rpx; line-height: 40rpx; border-radius: 6rpx; margin: 0 10rpx; | ||
803 | + height: 40rpx; font-size: 24rpx; text-align: center;} | ||
804 | +.pt_fir .pt_fir_title .price{color: #e9030d;font-size: 26rpx;} | ||
805 | +.pt_fir .pt_fir_title .bigw{font-size: 36rpx;} | ||
806 | +.pt_fir .pt_fir_title .tprice{text-decoration: line-through;color: #949494} | ||
807 | +.pt_fir .pt_fir_title .tprice.ml50{margin-left: 50rpx} | ||
808 | + | ||
809 | +.pt_fir .pt_fir_title .js{padding: 0 15rpx;height: 40rpx;background:#e9030d; text-align: center; border-radius: 8rpx; color: #fff; margin-left: 10rpx;} | ||
810 | +.pt_fir .pt_fir_title .tuannum{color: #e9030d; position: absolute; right: 20rpx; font-size: 26rpx;} | ||
811 | +.pding{padding-top: 20rpx;padding-left: 20rpx;height: 81%; | ||
812 | + padding-right: 20rpx;font-size: 26rpx;color: #ea120f} | ||
813 | +.pdres{margin-left: 10rpx;color: #8f8f94} | ||
814 | +.ptgz{position: relative;font-size: 30rpx;padding-left: 20rpx;margin-top: 10rpx; overflow: hidden } | ||
815 | +.shuxian{width: 6rpx;height: 28rpx; background: #ea120f; display: inline-block;top: 5rpx;position: relative; margin-right: 5rpx} | ||
816 | +.ptgz_an{position: absolute;top:5rpx; right: 6rpx} | ||
817 | +.ptgz_an .arrow-two{width:18rpx;height:18rpx;border-color:#da0b31; margin-top:30rpx;} | ||
818 | + | ||
819 | +.pt_fir.se{height: auto; margin-bottom: 10rpx} | ||
820 | +.t_gz{padding: 10rpx 20rpx; font-size:28rpx } | ||
821 | + | ||
822 | +.pt_fir.se1{height: auto; margin: 0} | ||
823 | +.pt_fir.se2{height: auto; margin: 0;/* border-top:6rpx solid #eeeeee;border-bottom:2rpx solid #eeeeee; */} | ||
824 | + | ||
825 | +.pt_hb{height:78rpx; line-height: 75rpx; position: relative; font-size: 32rpx;overflow: hidden;width:695rpx;margin-left:28rpx; | ||
826 | + border-bottom: 1rpx solid #E5E5E5 } | ||
827 | +.ptgz_an.xq{font-size: 32rpx; color:#d40024} | ||
828 | +.wf{display: flex; padding: 20rpx 0;} | ||
829 | +.wf .item{width: 24.5%; text-align: center; font-size: 26rpx; color: #666} | ||
830 | +.wf .item .item_txy{position: relative;width: 60rpx; height: 60rpx; background: #ea120f; border-radius: 50%;left: 50%;margin-left: -30rpx; | ||
831 | + border: 3px #dfdfdf solid; text-align: center;line-height: 60rpx; color: #fff; margin-bottom: 10rpx;} | ||
832 | +.wf .item .item_txy.hs{ background: #cbcbcb;} | ||
833 | +.po{margin-bottom: 20rpx;} | ||
834 | + | ||
835 | +.cart-btn.line-h{ line-height: 26rpx;} | ||
836 | +.cart-btn .fir-v{ margin-top: 10rpx;} | ||
837 | + | ||
838 | +.hyt{ padding: 0 20rpx; font-size: 30rpx; display: flex; align-items:center; margin-top: 10rpx;} | ||
839 | +.hyt .r_f{color: #e9120f;font-size: 26rpx;position: relative;top:3rpx} | ||
840 | +.hyt .byj{color: #e9120f;font-size: 32rpx;position: relative;top:5rpx} | ||
841 | + | ||
842 | +.pt_fir .pt_fir_title.no-mar-b{margin-bottom: 0;padding-bottom: 10rpx; margin-left: 20rpx} | ||
843 | +.pt_fir .pt_fir_title.boder-1{border-bottom: 1rpx #e7e7e7 solid} | ||
844 | + | ||
845 | +.jie_price{/* padding: 10rpx 30rpx; */} | ||
846 | +.jie_price_title{font-size: 30rpx; color: #a26270; margin-bottom: 10rpx} | ||
847 | +.price_list{display: flex; width: 100%;} | ||
848 | +.price_item{width: 25%;font-size: 28rpx; color: #4c336c} | ||
849 | + | ||
850 | +.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; */} | ||
851 | +.ckgd{/* position: absolute;top:0;right:57rpx; */ color:#d70025; font-size: 26rpx;} | ||
852 | +.ckgd .arrow-one{width:14rpx;height:14rpx;border-color:#da0b31;/* margin-top:5rpx; */ margin:auto;} | ||
853 | +.bview{ | ||
854 | + position: fixed; top:0; left:0; width: 100%; height: 100%; | ||
855 | + background-color: rgba(0, 0, 0, 0.5); | ||
856 | +} | ||
857 | +.juzhong{ | ||
858 | + position: fixed; top:0; left:0; width: 100%; height: 100%; | ||
859 | + display: flex; | ||
860 | + flex-direction:row; | ||
861 | + justify-content: center; | ||
862 | + align-items: center; | ||
863 | +} | ||
864 | + | ||
865 | +.juzhong .xq{ padding: 0 20rpx; background: #fff; font-size: 30rpx; padding-bottom: 20rpx;} | ||
866 | +.juzhong .xq .title{text-align: center; margin: 20rpx 0; position: relative; height: 50rpx;} | ||
867 | +.juzhong .xq .hs1{font-size: 28rpx; color: #ab8f9e} | ||
868 | +.juzhong .xq .title .close{position: absolute;top: 0; right: 0; width: 45rpx; height: 45rpx;} | ||
869 | + | ||
870 | +.pt_qd{/* margin-top: 40rpx; height: auto; */padding: 20rpx;} | ||
871 | +.spec-cart-btn.w100{width: 95%; margin-left: 0; height: 75rpx; line-height:75rpx;margin: auto; } | ||
872 | + | ||
873 | +.sto_v{color: #333;} | ||
874 | +.ellipsis{overflow: hidden; white-space: nowrap; text-overflow: ellipsis;} | ||
875 | + | ||
876 | + | ||
877 | +/*---多少人参加团--*/ | ||
878 | +.group { | ||
879 | + padding-top:20rpx; | ||
880 | + padding-bottom:20rpx; | ||
881 | + width: 100%; | ||
882 | + /* min-height: 92rpx; */ | ||
883 | + border-bottom: 2rpx solid #ebedf0; | ||
884 | + | ||
885 | +} | ||
886 | + | ||
887 | +.group .group-list { | ||
888 | + display: flex; | ||
889 | + align-items: center; | ||
890 | + justify-content: space-around; | ||
891 | + /* height: 90rpx; */ | ||
892 | + /* padding: 0 130rpx 0 100rpx; */ | ||
893 | + /* width: 470rpx; | ||
894 | + | ||
895 | + position: absolute; */ | ||
896 | +} | ||
897 | + | ||
898 | +.group .group-list .gtou { | ||
899 | + width: 70rpx; | ||
900 | + height: 70rpx; | ||
901 | + /* float: left; | ||
902 | + position: relative; | ||
903 | + top: 6rpx; | ||
904 | + left: -96rpx; */ | ||
905 | +} | ||
906 | + | ||
907 | +.group .group-list .gtou image { | ||
908 | + display: block; | ||
909 | + width: 100%; | ||
910 | + height: 100%; | ||
911 | + border-radius: 50%; | ||
912 | + background-color: #f0f0f0; | ||
913 | +} | ||
914 | + | ||
915 | +.group .group-list .gdn { | ||
916 | + width: 140rpx; | ||
917 | + text-align: center; | ||
918 | + /* float: left; */ | ||
919 | + font-size: 26rpx; | ||
920 | + /* padding-left: 20rpx; */ | ||
921 | + /* line-height: 48rpx; | ||
922 | + height: 48rpx; | ||
923 | + width: 168rpx; | ||
924 | + position: relative; | ||
925 | + left: -80rpx; | ||
926 | + top:20rpx; */ | ||
927 | + font-weight:bold; | ||
928 | +} | ||
929 | + | ||
930 | +.group .group-list .ghaicha { | ||
931 | + /* width:300rpx; */ | ||
932 | + font-size: 27rpx; | ||
933 | + /* margin-left:180rpx; | ||
934 | + top:13rpx; | ||
935 | + left:-3rpx; */ | ||
936 | + font-weight: bold; | ||
937 | + | ||
938 | + | ||
939 | +} | ||
940 | + | ||
941 | +.group .group-list .ghaicha .gred { | ||
942 | + /* height: 48rpx; | ||
943 | + width: 300rpx; */ | ||
944 | +} | ||
945 | + | ||
946 | +.gsj { | ||
947 | + float: left; | ||
948 | + color: #8f8f94; | ||
949 | +} | ||
950 | + | ||
951 | +.group .group-list .cjt { | ||
952 | + height:42rpx; | ||
953 | + width: 137rpx; | ||
954 | + /* position: absolute; | ||
955 | + right: 4rpx; | ||
956 | + top:25rpx; */ | ||
957 | + line-height: 42rpx; | ||
958 | + font-size: 24rpx; | ||
959 | + color: #fff; | ||
960 | + border:2rpx solid #d60024; | ||
961 | + background-color:#d60024; | ||
962 | + border-radius:25rpx; | ||
963 | + | ||
964 | +} | ||
965 | + | ||
966 | +.gbody { | ||
967 | + background-color: white; | ||
968 | +} | ||
969 | +.t_show{/* overflow: hidden; */ display: flex; /* width: 300rpx; */ color: #292929; /* line-height: 36rpx; */font-size:26rpx; | ||
970 | +} | ||
971 | +.join-cart>view.set_width { | ||
972 | + width:58%; | ||
973 | +} | ||
974 | + | ||
975 | +/*秒杀样式zwp*/ | ||
976 | +#zwpMs{ | ||
977 | + width: 31%; | ||
978 | + color: #fff; | ||
979 | + background: url(https://mshopimg.yolipai.net/miniapp/images/user/bgred.png) no-repeat; | ||
980 | + background-size: 100% 60px; | ||
981 | +} | ||
982 | + | ||
983 | + | ||
984 | +/*--------- 修改后的样式 -----------*/ | ||
985 | +.elli{ | ||
986 | + overflow : hidden; | ||
987 | + text-overflow: ellipsis; | ||
988 | + display: -webkit-box; | ||
989 | + -webkit-line-clamp: 2; | ||
990 | + -webkit-box-orient: vertical; | ||
991 | +} | ||
992 | +.one_elli{ | ||
993 | + overflow : hidden; | ||
994 | + text-overflow: ellipsis; | ||
995 | + white-space:nowrap; | ||
996 | +} | ||
997 | + | ||
998 | +.tuwen_title{ /* height: 86rpx; */ background-color:#eeeeee; /* margin-bottom: 32rpx; */ position: relative; | ||
999 | + display: flex; justify-content: center;align-items: center; padding: 20rpx;} | ||
1000 | + | ||
1001 | +.tuwen_title .g_line{ | ||
1002 | + width:496rpx; | ||
1003 | + height:1rpx; | ||
1004 | + border-bottom:#ababab 1rpx solid; | ||
1005 | +} | ||
1006 | +.tuwen_title .center_s{ | ||
1007 | + width: 124rpx; position: absolute; height: 34rpx; background-color:#eeeeee; font-size: 32rpx; display: flex; | ||
1008 | + overflow: hidden; justify-content: center;align-items: center; | ||
1009 | +} | ||
1010 | +.tuwen_title .center_s image{ width: 34rpx; height: 26rpx; margin-right: 10rpx} | ||
1011 | +.t_g_info{ /* margin: 0 34rpx;margin-bottom: 20rpx; */ display: flex; align-items: center;padding: 20rpx; } | ||
1012 | +.red_shu{ width: 10rpx; height: 36rpx; background-color:#da0035; margin-right: 8rpx; } | ||
1013 | + | ||
1014 | +.tb-l{ /* line-height: 96rpx; */} | ||
1015 | +.table_s{ border:#e4e4e4 1rpx solid; box-sizing: border-box;font-size: 26rpx;} | ||
1016 | +.tb_item{display: flex; /* height: 96rpx; */ border-bottom: 1rpx solid #e4e4e4 } | ||
1017 | +.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; */} | ||
1018 | +.item_right{flex:1; height: 100%; overflow : hidden;white-space:nowrap;text-overflow: ellipsis; padding: 20rpx;} | ||
1019 | +.item_right text{ /* margin-left: 66rpx; */} | ||
1020 | + | ||
1021 | +.table_s .tb-l:last-child {border-bottom: none;} | ||
1022 | + | ||
1023 | +.bzfu_img{ width: 164rpx; height:34rpx; /* margin-right: 18rpx; margin-left: 12rpx */ } | ||
1024 | + .bz_view{ /* height:100rpx; padding: 0 34rpx 0 13rpx; */ color: #333; font-size: 28rpx; padding: 20rpx 20rpx 20rpx 10rpx; | ||
1025 | + /* border-bottom: 3rpx solid #eee; */ | ||
1026 | + /* border-top: 3rpx solid #eee; */} | ||
1027 | + .bz_view view{ width: 460rpx; /* max-height: 70rpx; */ /* overflow: hidden; */} | ||
1028 | + | ||
1029 | +.bb_view{ display: flex;align-items: center;justify-content: space-between; padding: 20rpx; color: #333; | ||
1030 | + font-size: 30rpx; /* height: 104rpx; line-height: 104rpx; overflow: hidden; padding-right:26rpx */ } | ||
1031 | +.red_bb{ color: #d70026; /* min-width:158rpx;width: auto; */} | ||
1032 | +.bg_jj{ width: 14rpx; height:14rpx; | ||
1033 | + border-top: 2rpx solid #d70026; | ||
1034 | + border-right: 2rpx solid #d70026; | ||
1035 | + transform: rotate(45deg);display:inline-block; | ||
1036 | + margin-bottom:3rpx; | ||
1037 | +} | ||
1038 | +.bg_jj.down1{transform: rotate(135deg);} | ||
1039 | + | ||
1040 | +.bz-content { | ||
1041 | + flex-grow: 1; | ||
1042 | + text-align: justify; | ||
1043 | + padding: 0 30rpx 0 20rpx; | ||
1044 | +} | ||
1045 | + | ||
1046 | +/* 顶部边框 */ | ||
1047 | +.topframe{ | ||
1048 | + width: 100%; | ||
1049 | + height: 172rpx; | ||
1050 | + flex-direction: row; | ||
1051 | + justify-content: space-between; | ||
1052 | + border-bottom: 6rpx solid #eeeeee; | ||
1053 | + overflow: hidden; | ||
1054 | +} | ||
1055 | +/* 评价人边框*/ | ||
1056 | +.topframe .topframe-top{ | ||
1057 | + display: flex; | ||
1058 | + margin-top: 40rpx; | ||
1059 | + margin-bottom: 36rpx; | ||
1060 | + color: #7d7d7d; | ||
1061 | + padding-left: 20rpx; | ||
1062 | + font-size: 32rpx; | ||
1063 | +} | ||
1064 | +/*评价人数量*/ | ||
1065 | +.topframe .topframe-top .topframe-top-val{ | ||
1066 | + margin-left: 15rpx; | ||
1067 | + | ||
1068 | +} | ||
1069 | +.topframe-top-content{ | ||
1070 | + display: flex; | ||
1071 | + width: 36%; | ||
1072 | +} | ||
1073 | +/* 好评 */ | ||
1074 | +.topframe-praise{ | ||
1075 | + width: 61%; | ||
1076 | + text-align: right; | ||
1077 | + color: #dc4355; | ||
1078 | + font-size: 28rpx; | ||
1079 | +} | ||
1080 | +/* 按钮列表 */ | ||
1081 | +.buttem-list{ | ||
1082 | + width: 100%; | ||
1083 | + display: flex; | ||
1084 | + font-size: 20rpx; | ||
1085 | + overflow: hidden; | ||
1086 | +} | ||
1087 | + | ||
1088 | +.buttem-list .item{ | ||
1089 | + min-width: 17%; | ||
1090 | + font-size: 24rpx; | ||
1091 | + border-radius: 20rpx; | ||
1092 | + background:#ffe3e2; | ||
1093 | + height:38rpx; | ||
1094 | + text-align: center; | ||
1095 | + line-height: 38rpx; | ||
1096 | + margin-left: 20rpx; | ||
1097 | +} | ||
1098 | + | ||
1099 | +.buttem-list .item.red{ | ||
1100 | + color: #fff; | ||
1101 | + background: #d60022; | ||
1102 | +} | ||
1103 | + | ||
1104 | +/* 用户评价 */ | ||
1105 | +.middle{ | ||
1106 | + width: 95%; | ||
1107 | + margin:0 auto; | ||
1108 | +} | ||
1109 | +.middle-img-frame{ | ||
1110 | + height:65rpx; | ||
1111 | + display: flex; | ||
1112 | + margin-top: 32rpx; | ||
1113 | + | ||
1114 | +} | ||
1115 | +/* 评价的用户图片 */ | ||
1116 | +.middle-img{ | ||
1117 | + width:60rpx; | ||
1118 | + height:60rpx; | ||
1119 | + border-radius: 50%; | ||
1120 | + -moz-border-radius: 50%; | ||
1121 | + -webkit-border-radius: 50%; | ||
1122 | + margin-right: 15rpx; | ||
1123 | +} | ||
1124 | +/* 评价的用户边框 */ | ||
1125 | +.middle-user-frame{ | ||
1126 | + height: 72rpx; | ||
1127 | + overflow: hidden; | ||
1128 | +} | ||
1129 | +.middle-user{ | ||
1130 | + height: 25; | ||
1131 | + font-size: 28rpx; | ||
1132 | +} | ||
1133 | +/* 评价图片 */ | ||
1134 | +.middle-img-two{ | ||
1135 | + width: 115rpx; | ||
1136 | + height: 25rpx; | ||
1137 | + text-align: center; | ||
1138 | + margin-bottom:20rpx; | ||
1139 | + margin-left:5rpx; | ||
1140 | +} | ||
1141 | +.xc-pirces{ | ||
1142 | + margin-top: 14rpx; | ||
1143 | +} | ||
1144 | +/* 评价文字 */ | ||
1145 | +.middle-font{ | ||
1146 | + font-size: 30rpx; | ||
1147 | + | ||
1148 | +} | ||
1149 | +.iddle-goods-img{ | ||
1150 | + width: 100%; | ||
1151 | + display: flex; | ||
1152 | + margin-top:22rpx; | ||
1153 | +} | ||
1154 | +/* 商品图片 */ | ||
1155 | +.goods-img{ | ||
1156 | + width: 156rpx; | ||
1157 | + height: 156rpx; | ||
1158 | + margin-left: 22rpx; | ||
1159 | + height: 100%; | ||
1160 | +} | ||
1161 | +.parameter-frame{ | ||
1162 | + margin-top:14rxp; | ||
1163 | + margin-bottom: 14rpx; | ||
1164 | + width:50%; | ||
1165 | + height: 30rpx; | ||
1166 | +} | ||
1167 | +.z_parameter{ | ||
1168 | + width:98%; | ||
1169 | + height: 45rpx; | ||
1170 | + display:flex; | ||
1171 | + line-height: 45rpx; | ||
1172 | + margin-top: 20rpx; | ||
1173 | + margin-bottom: 14rpx; | ||
1174 | + justify-content : space-between; | ||
1175 | +} | ||
1176 | +.parameter-font{ | ||
1177 | + font-size: 26rpx; | ||
1178 | + | ||
1179 | +} | ||
1180 | +/* 规格 */ | ||
1181 | +.parameter-state{ | ||
1182 | + width: 100rpx; | ||
1183 | + font-size: 24rpx; | ||
1184 | + color: #c4c4c4; | ||
1185 | +} | ||
1186 | +.parameter-dian{ | ||
1187 | + display: flex; | ||
1188 | + width: 94rpx; | ||
1189 | + height: 33rpx; | ||
1190 | + font-size: 20rpx; | ||
1191 | + border-radius: 20rpx; | ||
1192 | + line-height:33rpx; | ||
1193 | + padding-left: 25rpx; | ||
1194 | + border:4rpx solid #eeeeee; | ||
1195 | + | ||
1196 | +} | ||
1197 | +/* 点赞图片 */ | ||
1198 | +.parameter-img{ | ||
1199 | + width: 27rpx; | ||
1200 | + height: 27rpx; | ||
1201 | + margin-top: 3rpx; | ||
1202 | +} | ||
1203 | +.parameter-val{ | ||
1204 | + margin-left:25rpx; | ||
1205 | + font-size: 26rpx; | ||
1206 | + color: #999; | ||
1207 | +} | ||
1208 | +/* 回复 */ | ||
1209 | +.reply{ | ||
1210 | + width: 95%; | ||
1211 | + height: 120rpx; | ||
1212 | + padding-top: 14rpx; | ||
1213 | + border-top:3rpx solid #eeeeee; | ||
1214 | + margin:0 auto; | ||
1215 | + | ||
1216 | +} | ||
1217 | +.shop-reply{ | ||
1218 | + height: 30rpx; | ||
1219 | + color:#d60022; | ||
1220 | + font-size:24rpx; | ||
1221 | + overflow: hidden; | ||
1222 | +} | ||
1223 | +.shop-font{ | ||
1224 | + width: 94%; | ||
1225 | + font-size: 24rpx; | ||
1226 | + padding-top: 10rpx; | ||
1227 | + | ||
1228 | +} | ||
1229 | +.line_bulge{ | ||
1230 | + width: 17rpx; | ||
1231 | + height: 17rpx; | ||
1232 | + border-top: 1rpx solid #eeeeee; | ||
1233 | + border-left: 1rpx solid #eeeeee; | ||
1234 | + transform:rotate(45deg); | ||
1235 | + position: absolute; | ||
1236 | + top: -12rpx; | ||
1237 | + left:50rpx; | ||
1238 | + background:#fff; | ||
1239 | +} | ||
1240 | + | ||
1241 | + | ||
1242 | +.xc_comment{ | ||
1243 | + display: flex; | ||
1244 | + justify-content: space-around; | ||
1245 | + width: 100%; | ||
1246 | + box-sizing: border-box; | ||
1247 | + padding: 10rpx 20rpx; | ||
1248 | + /* height: 42rpx; | ||
1249 | + padding-left: 34rpx; */ | ||
1250 | + color: #333; | ||
1251 | + | ||
1252 | +} | ||
1253 | +.xc_comment-have-pictures{ | ||
1254 | + width: 153rpx; | ||
1255 | + /* height: 42rpx; */ | ||
1256 | + line-height: 42rpx; | ||
1257 | + text-align: center; | ||
1258 | + background: #ffe3e2; | ||
1259 | + color: 28rpx; | ||
1260 | + border-radius:21rpx; | ||
1261 | + font-size: 24rpx; | ||
1262 | +} | ||
1263 | +.xc_comment-discuss{ | ||
1264 | + width: 152rpx; | ||
1265 | + height: 42rpx; | ||
1266 | + line-height: 42rpx; | ||
1267 | + text-align: center; | ||
1268 | + background: #ffe3e2; | ||
1269 | + color: 28rpx; | ||
1270 | + border-radius:20rpx; | ||
1271 | + font-size: 24rpx; | ||
1272 | + margin-left: 28rpx | ||
1273 | +} | ||
1274 | + | ||
1275 | +.xc_comment-detail{ | ||
1276 | + display: flex; | ||
1277 | + /* margin-top: 40rpx; */ | ||
1278 | + /* width: 524rpx; */ | ||
1279 | + /* margin-left: 34rpx; */ | ||
1280 | + border-radius: 24rpx; | ||
1281 | + border: 2rpx solid #ebedf0; | ||
1282 | + margin-left: 20rpx; | ||
1283 | + box-sizing: border-box; | ||
1284 | + /* overflow: hidden; */ | ||
1285 | +} | ||
1286 | + | ||
1287 | +.xc_user-img{ | ||
1288 | + border-radius:50%; | ||
1289 | + margin: auto 0; | ||
1290 | +} | ||
1291 | + | ||
1292 | +.xc_comment-user{ | ||
1293 | + display: flex; | ||
1294 | + /* margin-top: 22rpx; | ||
1295 | + margin-left: 22rpx; */ | ||
1296 | +} | ||
1297 | +.xc_user{ | ||
1298 | + width: 170rpx; | ||
1299 | + height: 60rpx; | ||
1300 | + margin-left: 6rpx; | ||
1301 | + overflow: hidden; | ||
1302 | +} | ||
1303 | +.xc_user-name{ /* height: 25rpx; */} | ||
1304 | +.xc_comment-img{ | ||
1305 | + width: 22rpx; | ||
1306 | + height: 22rpx; | ||
1307 | + /* margin-top: 14rpx; */ | ||
1308 | + margin-right: 5rpx | ||
1309 | +} | ||
1310 | +.xc_comment-font{ | ||
1311 | + /* height: 75rpx; */ | ||
1312 | + /* margin-left: 22rpx; */ | ||
1313 | + white-space:normal; | ||
1314 | + overflow: hidden; | ||
1315 | + /* margin-top: 8rpx; | ||
1316 | + line-height: 38rpx; */ | ||
1317 | + | ||
1318 | +} | ||
1319 | +.xc_comment-val{ | ||
1320 | + /* width: 88%; | ||
1321 | + height: 30rpx; | ||
1322 | + margin-left: 22rpx; | ||
1323 | + display: flex; | ||
1324 | + margin-top: 15rpx; | ||
1325 | + margin-bottom:15rpx; */ | ||
1326 | +} | ||
1327 | + | ||
1328 | +.xc_comment-time{ | ||
1329 | + /* height: 30rpx; */ | ||
1330 | + font-size: 22rpx; | ||
1331 | + color: #a5a5a5; | ||
1332 | + overflow: hidden; | ||
1333 | +} | ||
1334 | + | ||
1335 | +.xc_goods-img{ | ||
1336 | + width: 180rpx;height: 180rpx; | ||
1337 | +} | ||
1338 | +.xc_comment-left{ | ||
1339 | + display:inline-block; | ||
1340 | + width: 312rpx; | ||
1341 | + padding: 20rpx; | ||
1342 | +} | ||
1343 | +.xc_goods-img-frame{ | ||
1344 | + border-radius: 0 22rpx 22rpx 0; | ||
1345 | + overflow: hidden; | ||
1346 | + /* display:inline-block; */ | ||
1347 | + /* width: 40%; | ||
1348 | + height: 90%; | ||
1349 | + text-align: center; | ||
1350 | + padding-top: 30rpx; | ||
1351 | + vertical-align: top; */ | ||
1352 | +} | ||
1353 | +.xc_imgs{ | ||
1354 | + width: 50rpx; | ||
1355 | + height:50rpx; | ||
1356 | + border-radius:50%; | ||
1357 | + margin-right: 5rpx; | ||
1358 | +} | ||
1359 | + | ||
1360 | +.pj_word_size{ font-size: 28rpx} | ||
1361 | +.pj_scroll{ | ||
1362 | + /* white-space: nowrap; */ | ||
1363 | + /* height: 324rpx; */ | ||
1364 | + /* margin-bottom: 50rpx; */ | ||
1365 | + display: flex; | ||
1366 | + align-items: center; | ||
1367 | + padding: 20rpx 0; | ||
1368 | + /* box-sizing: border-box; */ | ||
1369 | + /* box-shadow: 0 8px 12px #e7e9eb; */ | ||
1370 | +} | ||
1371 | + | ||
1372 | + | ||
1373 | +/*领券*/ | ||
1374 | +.three-level-word{ | ||
1375 | + font-size: 25rpx; | ||
1376 | +} | ||
1377 | +.four-level-word{ | ||
1378 | + font-size: 23rpx; | ||
1379 | +} | ||
1380 | +.cx-frame{ | ||
1381 | + /* border-top:3rpx solid #eee; */ | ||
1382 | + /* width:99%; | ||
1383 | + height: 95rpx; | ||
1384 | + line-height: 95rpx; | ||
1385 | + padding-left:24rpx; */ | ||
1386 | + padding: 20rpx; | ||
1387 | +} | ||
1388 | +.cx-frame .cx-sizs{ | ||
1389 | + /* width: 68rpx; */ | ||
1390 | + /* height: 100%; */ | ||
1391 | + /* line-height: 100rpx; */ | ||
1392 | + /* overflow: hidden; */ | ||
1393 | + /* margin-left: 10rpx; */ | ||
1394 | +} | ||
1395 | +.xc-coupon-fram{ | ||
1396 | + position: relative; | ||
1397 | + margin-right: 16rpx; | ||
1398 | + /* width:200rpx; */ | ||
1399 | + /* padding-top:30rpx; */ | ||
1400 | + | ||
1401 | +} | ||
1402 | +.xc-coupon-fram .xc-coupon{ | ||
1403 | + /* width:175rpx ; | ||
1404 | + height: 40rpx; | ||
1405 | + line-height: 40rpx; */ | ||
1406 | + background-color:#d60021 ; | ||
1407 | + /* margin:0 auto; */ | ||
1408 | + color:#fff; | ||
1409 | + padding: 6rpx 20rpx; | ||
1410 | + | ||
1411 | +} | ||
1412 | +.xc-coupon-fram .xc-circular{ | ||
1413 | + width: 16rpx; | ||
1414 | + height:16rpx; | ||
1415 | + background-color: white; | ||
1416 | + position:absolute; | ||
1417 | + top: 50%; | ||
1418 | + /* left: -10rpx; */ | ||
1419 | + transform: translateY(-50%); | ||
1420 | +} | ||
1421 | +.xc-coupon-fram .xc-one{ | ||
1422 | + left: -8rpx; | ||
1423 | +} | ||
1424 | +.xc-coupon-fram .xc-two{ | ||
1425 | + right: -8rpx; | ||
1426 | +} | ||
1427 | + | ||
1428 | +.cx-obtain-coupon{ | ||
1429 | + /* width: 65rpx; | ||
1430 | + height: 100%; | ||
1431 | + padding-left:15rpx; */ | ||
1432 | + color: #d70025; | ||
1433 | + display: flex; | ||
1434 | + align-items: center; | ||
1435 | + /* position: absolute; | ||
1436 | + right: 5rpx; */ | ||
1437 | +} | ||
1438 | + | ||
1439 | +/* 自定义弹出窗口 */ | ||
1440 | +.cx-popup{ | ||
1441 | + width:100%; | ||
1442 | + background: #fff; | ||
1443 | + z-index: 35; | ||
1444 | + border-top-left-radius: 25rpx; | ||
1445 | + border-top-right-radius: 25rpx; | ||
1446 | + position:fixed; | ||
1447 | + bottom:0; | ||
1448 | +} | ||
1449 | + | ||
1450 | +.cx-popup .top{ | ||
1451 | + /* width: 90%; | ||
1452 | + height:85rpx; */ | ||
1453 | + font-size: 32rpx; | ||
1454 | + padding: 20rpx 0; | ||
1455 | + border-bottom: 2rpx solid #ebedf0; | ||
1456 | + /* padding-top: 50rpx; | ||
1457 | + font-weight:600; */ | ||
1458 | + | ||
1459 | +} | ||
1460 | +.cx-popup .top-frame{ | ||
1461 | + /* width: 100%; | ||
1462 | + display: flex; | ||
1463 | + justify-content: center; | ||
1464 | + overflow: hidden; */ | ||
1465 | +} | ||
1466 | +.xc-valid-coupon{ | ||
1467 | + width: 90%; | ||
1468 | + height:40rpx; | ||
1469 | + padding-top: 24rpx; | ||
1470 | + overflow: hidden; | ||
1471 | +} | ||
1472 | +.xc-frame{ | ||
1473 | + position: relative; | ||
1474 | +} | ||
1475 | +.xc-coupon-frame { | ||
1476 | + width: 100%; | ||
1477 | + max-height: 560rpx; | ||
1478 | + overflow: auto; | ||
1479 | + | ||
1480 | +} | ||
1481 | +.xc-coupon-frame .rel:not(:first-child) { | ||
1482 | + margin-top: 20rpx; | ||
1483 | +} | ||
1484 | +.xc-coupon-frame .coupon { | ||
1485 | + width:100%; | ||
1486 | + height: 168rpx; | ||
1487 | + border-radius: 25rpx; | ||
1488 | + border:2rpx solid #ffdcdc; | ||
1489 | + overflow: hidden; | ||
1490 | + /* margin-top:16rpx; */ | ||
1491 | + box-sizing: border-box; | ||
1492 | + | ||
1493 | +} | ||
1494 | +/* .xc-coupon-frame .coupon ~ .coupon { | ||
1495 | + margin-top:16rpx; | ||
1496 | +} */ | ||
1497 | +.xc-coupon-left{ | ||
1498 | + width: 216rpx; | ||
1499 | + /* height: 100%; */ | ||
1500 | + background-color: #ffeeef; | ||
1501 | + border-right: 4rpx dashed #ffdbd9; | ||
1502 | + overflow: hidden; | ||
1503 | + /* line-height: 100%; */ | ||
1504 | + display: flex; | ||
1505 | + flex-direction: column; | ||
1506 | + justify-content: center; | ||
1507 | + align-items: center; | ||
1508 | + flex-shrink: 0; | ||
1509 | +} | ||
1510 | +.xc-money{ | ||
1511 | + color: #f30026; | ||
1512 | + text-align:center; | ||
1513 | +} | ||
1514 | +.xc-rmb{ | ||
1515 | + /* width:44rpx; | ||
1516 | + padding-top:7rpx; */ | ||
1517 | +} | ||
1518 | +.xc-money-frame{ | ||
1519 | + /* margin-left:35rpx; | ||
1520 | + margin-top:48rpx; */ | ||
1521 | + | ||
1522 | +} | ||
1523 | +.xc-spacing{ | ||
1524 | + letter-spacing:4rpx; | ||
1525 | +} | ||
1526 | +.xc-circular-one{ | ||
1527 | + position: absolute; | ||
1528 | + top:-15rpx; | ||
1529 | + left:205rpx; | ||
1530 | + width: 30rpx; | ||
1531 | + height: 30rpx; | ||
1532 | + background: #fff; | ||
1533 | + overflow: hidden; | ||
1534 | +} | ||
1535 | +.xc-circular-two{ | ||
1536 | + position: absolute; | ||
1537 | + bottom: -15rpx; | ||
1538 | + /* top:150rpx; */ | ||
1539 | + left:205rpx; | ||
1540 | + width: 30rpx; | ||
1541 | + height:30rpx; | ||
1542 | + background: #fff; | ||
1543 | +} | ||
1544 | +.xc-detail-coupon{ | ||
1545 | + /* margin-left: 22rpx; | ||
1546 | + overflow: hidden; | ||
1547 | + padding-top: 43rpx; */ | ||
1548 | + /* display: flex; | ||
1549 | + align-items: center; */ | ||
1550 | +} | ||
1551 | +.xc-coupon-right{ | ||
1552 | + /* width: 455rpx; | ||
1553 | + height: 100%; */ | ||
1554 | + background: #fffaf9; | ||
1555 | + padding: 20rpx; | ||
1556 | + box-sizing: border-box; | ||
1557 | + width: 100%; | ||
1558 | + justify-content: space-between; | ||
1559 | + align-items: center; | ||
1560 | +} | ||
1561 | +.xc-below{ | ||
1562 | + margin-top:20rpx; | ||
1563 | + | ||
1564 | +} | ||
1565 | +.xc-get{ | ||
1566 | + | ||
1567 | + width: 140rpx; | ||
1568 | + /* height: 48rpx; */ | ||
1569 | + color: #fff; | ||
1570 | + text-align: center; | ||
1571 | + border-radius:27rpx; | ||
1572 | + line-height:54rpx; | ||
1573 | + /* margin-left:20rpx; */ | ||
1574 | +} | ||
1575 | + | ||
1576 | +.background{ | ||
1577 | + background:#f40028; | ||
1578 | +} | ||
1579 | +/*--不可使用--*/ | ||
1580 | +.background.nouse{ | ||
1581 | + background:gainsboro; | ||
1582 | +} | ||
1583 | + | ||
1584 | +.xc-background{ | ||
1585 | + background:#b9b9b9; | ||
1586 | +} | ||
1587 | + | ||
1588 | + | ||
1589 | +.cx-confirm{ | ||
1590 | + width: 100%; | ||
1591 | + padding: 20rpx; | ||
1592 | + box-sizing: border-box; | ||
1593 | + /* height: 160rpx; */ | ||
1594 | + | ||
1595 | +} | ||
1596 | +.cx-confirm .confirm{ | ||
1597 | + /* width: 372rpx; | ||
1598 | + height: 60rpx; */ | ||
1599 | + background-color: #f40026; | ||
1600 | + color: #fff; | ||
1601 | + border-radius:10rpx; | ||
1602 | + line-height: 80rpx; | ||
1603 | + font-size: 28rpx; | ||
1604 | + | ||
1605 | +} | ||
1606 | + | ||
1607 | +.up{ animation: up .7s; } | ||
1608 | +.down{ animation: down 1s; } | ||
1609 | +@keyframes up { 0% { transform: translateY(550rpx); } 100% { transform: translateY(0); } } | ||
1610 | +@keyframes down { 0% { transform: translateY(0); } 100% { transform: translateY(550rpx); } } | ||
1611 | + | ||
1612 | + | ||
1613 | +/* 分享 */ | ||
1614 | +.icon-share { | ||
1615 | + font-size: 46rpx; | ||
1616 | + color: #d60021; | ||
1617 | +} | ||
1618 | +.xc-share-frame{ | ||
1619 | + /* width: 129rpx; | ||
1620 | + height: 48rpx; | ||
1621 | + border-top-left-radius: 18rpx; | ||
1622 | + border-bottom-left-radius: 18rpx; */ | ||
1623 | + /* background: #d60021; */ | ||
1624 | + /* position:absolute; | ||
1625 | + left:622rpx; | ||
1626 | + top:-37rpx; | ||
1627 | + line-height:50rpx; | ||
1628 | + margin-top:52rpx; */ | ||
1629 | +} | ||
1630 | +.xc-share-frame-jieti{ | ||
1631 | + width: 129rpx; | ||
1632 | + height: 48rpx; | ||
1633 | + border-top-left-radius: 18rpx; | ||
1634 | + border-bottom-left-radius: 18rpx; | ||
1635 | + background: #d60021; | ||
1636 | + line-height:50rpx; | ||
1637 | +} | ||
1638 | + | ||
1639 | +.xc-share-frame .share-font,.xc-share-frame-jieti .share-font{ | ||
1640 | + font-size: 32rpx; | ||
1641 | + color:#fff; | ||
1642 | + margin-left:10rpx; | ||
1643 | + | ||
1644 | +} | ||
1645 | + | ||
1646 | + | ||
1647 | +.xc-share-frame .share-frame,.xc-share-frame-jieti .share-frame{ | ||
1648 | + width: 30rpx; | ||
1649 | + height: 30rpx; | ||
1650 | + margin-top:9rpx; | ||
1651 | + margin-left: 10rpx; | ||
1652 | + | ||
1653 | +} | ||
1654 | +.xc-share { | ||
1655 | + width:90%; | ||
1656 | + height:800rpx; | ||
1657 | + background:#fff; | ||
1658 | + z-index:35; | ||
1659 | +} | ||
1660 | +.img-frame{ | ||
1661 | + position: absolute; | ||
1662 | + top: 175rpx; | ||
1663 | + left:100rpx; | ||
1664 | + z-index: 55; | ||
1665 | + overflow:hidden; | ||
1666 | + | ||
1667 | +} | ||
1668 | +.img-frame .img{ | ||
1669 | + width: 100rpx; | ||
1670 | + height: 100rpx; | ||
1671 | + | ||
1672 | +} | ||
1673 | +.xc-share .top{ | ||
1674 | + height: 85rpx; | ||
1675 | + width: 100%; | ||
1676 | + border-bottom: 4rpx dashed #f5f5f5; | ||
1677 | + overflow:hidden; | ||
1678 | + | ||
1679 | +} | ||
1680 | +.xc-share .name{ | ||
1681 | + font-size: 25rpx; | ||
1682 | + margin-left:180rpx; | ||
1683 | + color:#000; | ||
1684 | + | ||
1685 | +} | ||
1686 | + | ||
1687 | +.xc-share .recommend{ | ||
1688 | + width: 110rpx; | ||
1689 | + height: 12rpx; | ||
1690 | + color: #fff; | ||
1691 | + background: #d60021; | ||
1692 | + font-size: 20rpx; | ||
1693 | + border-radius:25rpx; | ||
1694 | + margin-left:10rpx; | ||
1695 | + line-height:37rpx; | ||
1696 | +} | ||
1697 | +.xc-left-circle{ | ||
1698 | + width: 40rpx; | ||
1699 | + height: 25rpx; | ||
1700 | + position: absolute; | ||
1701 | + top:280rpx; | ||
1702 | + left:29rpx; | ||
1703 | + z-index: 55; | ||
1704 | + background:#727272; | ||
1705 | + border-radius:50rpx 50rpx 0 0; | ||
1706 | + transform:rotate(90deg); | ||
1707 | + | ||
1708 | +} | ||
1709 | +.xc-right-circle{ | ||
1710 | + width: 40rpx; | ||
1711 | + height: 25rpx; | ||
1712 | + position: absolute; | ||
1713 | + top: 280rpx; | ||
1714 | + left:683rpx; | ||
1715 | + z-index: 55; | ||
1716 | + background:#727272; | ||
1717 | + border-radius:50rpx 50rpx 0 0; | ||
1718 | + transform:rotate(270deg); | ||
1719 | + | ||
1720 | +} | ||
1721 | +.xc-circle-frame{ | ||
1722 | + width: 25rpx; | ||
1723 | + height: 40rpx; | ||
1724 | + overflow: hidden; | ||
1725 | +} | ||
1726 | +.xc-goods-name{ | ||
1727 | + width: 95%; | ||
1728 | + font-size: 35rpx; | ||
1729 | + padding-left: 75rpx; | ||
1730 | + height: 50rpx; | ||
1731 | + padding-top: 10rpx; | ||
1732 | + color:#000; | ||
1733 | + | ||
1734 | +} | ||
1735 | +.xc-good-img{ | ||
1736 | + width: 100%; | ||
1737 | + height: 381rpx; | ||
1738 | + margin-top:5rpx; | ||
1739 | + | ||
1740 | +} | ||
1741 | +.xc-good-img .img{ | ||
1742 | + width: 90%; | ||
1743 | + height: 381rpx; | ||
1744 | +} | ||
1745 | +.xc-ensure-frame{ | ||
1746 | + width: 90%; | ||
1747 | + height: 60rpx; | ||
1748 | + border-bottom: 2rpx solid #d8d6d7; | ||
1749 | +} | ||
1750 | +.xc-ensure{ | ||
1751 | + width: 30%; | ||
1752 | + height: 60rpx; | ||
1753 | + line-height: 60rpx; | ||
1754 | +} | ||
1755 | +xc-ensure-div{ | ||
1756 | + width: 100%; | ||
1757 | + height: 60rpx; | ||
1758 | +} | ||
1759 | +.xc-ensure .word{ | ||
1760 | + font-size: 25rpx; | ||
1761 | + color: #d30025; | ||
1762 | + margin-left:9rpx; | ||
1763 | + | ||
1764 | +} | ||
1765 | +.xc-ensure .img{ | ||
1766 | + width: 25rpx; | ||
1767 | + height: 25rpx; | ||
1768 | + margin-top:18rpx; | ||
1769 | + | ||
1770 | +} | ||
1771 | + | ||
1772 | +.xc-bottmon{ | ||
1773 | + width: 100%; | ||
1774 | +} | ||
1775 | +.xc-bottmon .xc-left{ | ||
1776 | + width: 55%; | ||
1777 | + margin-top:30rpx; | ||
1778 | + padding-left:20rpx; | ||
1779 | + | ||
1780 | +} | ||
1781 | +.xc-left .xc-top{ | ||
1782 | + font-size: 25rpx; | ||
1783 | + height:40rpx; | ||
1784 | + line-height:40rpx; | ||
1785 | + color:#000; | ||
1786 | +} | ||
1787 | +.xc-left .xc-middle{ | ||
1788 | + font-size: 25rpx; | ||
1789 | + color: #b2b2b2; | ||
1790 | + height:30rpx; | ||
1791 | + line-height:30rpx; | ||
1792 | +} | ||
1793 | +.xc-left .xc-buttem{ | ||
1794 | + font-size: 25rpx; | ||
1795 | + height:100rpx; | ||
1796 | + line-height:100rpx; | ||
1797 | + color:#000; | ||
1798 | +} | ||
1799 | +.xc-ensure-right{ | ||
1800 | + width: 30%; | ||
1801 | +} | ||
1802 | +.xc-qrcode{ | ||
1803 | + width:120rpx; | ||
1804 | + height: 120rpx; | ||
1805 | + margin-top:43rpx; | ||
1806 | + margin-left:80rpx; | ||
1807 | + | ||
1808 | +} | ||
1809 | +.xc-close{ | ||
1810 | + width:50rpx; | ||
1811 | + height:50rpx; | ||
1812 | + border-radius:50%; | ||
1813 | + border:3rpx solid #fff; | ||
1814 | + text-align:center; | ||
1815 | + line-height: 41rpx; | ||
1816 | + font-size:50rpx; | ||
1817 | + color:#fff; | ||
1818 | + font-weight: lighter; | ||
1819 | + font-family:MingLiU; | ||
1820 | + transform:rotate(270deg); | ||
1821 | + overflow:auto; | ||
1822 | + margin-top:6rpx; | ||
1823 | + margin-bottom:1rpx; | ||
1824 | + | ||
1825 | +} | ||
1826 | +.xc-close-frame{ | ||
1827 | + position:absolute; | ||
1828 | + margin-top:30rpx; | ||
1829 | + width:90%; | ||
1830 | + display:flex; | ||
1831 | + justify-content:center; | ||
1832 | + overflow: auto; | ||
1833 | + | ||
1834 | +} | ||
1835 | +.xc-guanbi{ | ||
1836 | + width: 100%; | ||
1837 | + height: 80rpx; | ||
1838 | + overflow: hidden; | ||
1839 | +} | ||
1840 | + | ||
1841 | + | ||
1842 | +/* 自定义弹出窗口 */ | ||
1843 | +.cx-popup{ | ||
1844 | + width:100%; | ||
1845 | + background: #fff; | ||
1846 | + z-index: 35; | ||
1847 | + border-top-left-radius: 10rpx; | ||
1848 | + border-top-right-radius: 10rpx; | ||
1849 | + position:fixed; | ||
1850 | + bottom:0; | ||
1851 | +} | ||
1852 | + | ||
1853 | +.xc-top-content{ | ||
1854 | + width: 88%; | ||
1855 | + height:85rpx; | ||
1856 | + padding-top: 50rpx; | ||
1857 | + font-size: 36rpx; | ||
1858 | +} | ||
1859 | + | ||
1860 | + | ||
1861 | +.xc-valid-coupon{ | ||
1862 | + width: 90%; | ||
1863 | + height:40rpx; | ||
1864 | + padding-top: 24rpx; | ||
1865 | + overflow: hidden; | ||
1866 | +} | ||
1867 | +.xc-frame { | ||
1868 | + /* width: 100%; | ||
1869 | + margin-top:20rpx; */ | ||
1870 | + padding: 20rpx; | ||
1871 | +} | ||
1872 | + | ||
1873 | +.xc-frame .list-frame{ | ||
1874 | + width: 90%; | ||
1875 | + height: 100%; | ||
1876 | + overflow-y:scroll; | ||
1877 | + | ||
1878 | + margin-top:20rpx; | ||
1879 | + | ||
1880 | +} | ||
1881 | +.xc-close-frame{ | ||
1882 | + margin-top:30rpx; | ||
1883 | + width:15%; | ||
1884 | + display:flex; | ||
1885 | +} | ||
1886 | + | ||
1887 | +.xc-close{ | ||
1888 | + width:70rpx; | ||
1889 | + height:70rpx; | ||
1890 | + border-radius:50%; | ||
1891 | + border:5rpx solid #a5a5a7; | ||
1892 | + text-align:center; | ||
1893 | + line-height: 55rpx; | ||
1894 | + font-size:80rpx; | ||
1895 | + color:#a5a5a7; | ||
1896 | + font-family:"微软正黑体"; | ||
1897 | + margin-top:8rpx; | ||
1898 | + | ||
1899 | +} | ||
1900 | +.xc-money{ | ||
1901 | + color: #ff0013; | ||
1902 | +} | ||
1903 | + | ||
1904 | +.xc-money-frame{ | ||
1905 | + /* margin-left:35rpx; */ | ||
1906 | + | ||
1907 | +} | ||
1908 | +.xc-coupon-effect{ | ||
1909 | + width: 99%; | ||
1910 | + height: 128rpx; | ||
1911 | + border-bottom:3rpx solid #ddd; | ||
1912 | + | ||
1913 | + | ||
1914 | +} | ||
1915 | +.xc-goods-coupon{ | ||
1916 | + width: 80%; | ||
1917 | + height:100%; | ||
1918 | + | ||
1919 | +} | ||
1920 | +.xc-title{ | ||
1921 | + width:50%; | ||
1922 | + margin-left:222rpx; | ||
1923 | + | ||
1924 | +} | ||
1925 | +.xc-coupon-money{ | ||
1926 | + color: #c91e31; | ||
1927 | + font-size: 35rpx; | ||
1928 | + margin-top:20rpx; | ||
1929 | + | ||
1930 | +} | ||
1931 | +.xc-coupon-time{ | ||
1932 | + height: 50rpx; | ||
1933 | + font-size: 27rpx; | ||
1934 | + color: #a4a4a4; | ||
1935 | +} | ||
1936 | +.xc-coupon-time .time{ | ||
1937 | + margin-left: 15rpx; | ||
1938 | + font-size: 27rpx; | ||
1939 | +} | ||
1940 | +.xc-coupon-selection{ | ||
1941 | + width:99%; | ||
1942 | + height:100%; | ||
1943 | + | ||
1944 | + | ||
1945 | +} | ||
1946 | +.xc-confirm { | ||
1947 | + width: 90%; | ||
1948 | + height: 75rpx; | ||
1949 | + margin:0 auto; | ||
1950 | + background:#c41830; | ||
1951 | + color:#fff; | ||
1952 | + border-radius:10rpx; | ||
1953 | + font-size:30rpx; | ||
1954 | + margin-top: 50rpx; | ||
1955 | +} | ||
1956 | +.xc-not-Selection{ | ||
1957 | + width: 60rpx; | ||
1958 | + height: 60rpx; | ||
1959 | + background: #eeeeee; | ||
1960 | +} | ||
1961 | + | ||
1962 | +/*---------------视频图片---------------*/ | ||
1963 | +.xc-imageCount { | ||
1964 | + width:95rpx; | ||
1965 | + height:50rpx; | ||
1966 | + background-color: rgba(0, 0, 0, 0.3); | ||
1967 | + border-radius:40rpx; | ||
1968 | + line-height:50rpx; | ||
1969 | + color:#fff; | ||
1970 | + text-align:center; | ||
1971 | + font-size:26rpx; | ||
1972 | + position:absolute; | ||
1973 | + | ||
1974 | + right:23rpx; | ||
1975 | + bottom:21rpx; | ||
1976 | +} | ||
1977 | + | ||
1978 | + | ||
1979 | +/* 视频图片的边框 */ | ||
1980 | +.xc-videos-picture{ | ||
1981 | + width: 100%; | ||
1982 | + height: 750rpx; | ||
1983 | +} | ||
1984 | +/* 视频 */ | ||
1985 | +.xc-videos{ | ||
1986 | + width: 100%; | ||
1987 | + height:544rpx; | ||
1988 | + | ||
1989 | + | ||
1990 | +} | ||
1991 | +/* 点击视频或图片 */ | ||
1992 | +.xc-video-picture{ | ||
1993 | + | ||
1994 | + bottom: 20rpx; | ||
1995 | + left: 0rpx; | ||
1996 | + display: flex; | ||
1997 | + align-items: center; | ||
1998 | + justify-content:center; | ||
1999 | + width: 45%; | ||
2000 | + height: 60rpx; | ||
2001 | + margin-left: 215rpx; | ||
2002 | + | ||
2003 | +} | ||
2004 | +.xc-video-button:before{ | ||
2005 | + content: ""; | ||
2006 | + position: absolute; | ||
2007 | + left: 48%; | ||
2008 | + top: 40%; | ||
2009 | + width: 0; | ||
2010 | + height: 0; | ||
2011 | + margin-left: -36rpx; | ||
2012 | + margin-top: -10rpx; | ||
2013 | + border-width:13rpx; | ||
2014 | + border-style: dashed; | ||
2015 | + border-color: transparent transparent transparent #fff; | ||
2016 | + font-size: 0; | ||
2017 | + line-height: 0; | ||
2018 | + z-index: 2; | ||
2019 | + -webkit-backface-visibility: hidden; | ||
2020 | +} | ||
2021 | +.xc-video-buttons:before{ | ||
2022 | + content: ""; | ||
2023 | + position: absolute; | ||
2024 | + left: 50%; | ||
2025 | + top:41%; | ||
2026 | + width: 0; | ||
2027 | + height: 0; | ||
2028 | + margin-left: -36rpx; | ||
2029 | + margin-top: -10rpx; | ||
2030 | + border-width:13rpx; | ||
2031 | + border-style: dashed; | ||
2032 | + border-color: transparent transparent transparent #000; | ||
2033 | + font-size: 0; | ||
2034 | + line-height: 0; | ||
2035 | + z-index: 2; | ||
2036 | + -webkit-backface-visibility: hidden; | ||
2037 | +} | ||
2038 | + | ||
2039 | +.xc-video{ | ||
2040 | + /* width:100rpx; */ | ||
2041 | + /* height: 50rpx; | ||
2042 | + line-height: 50rpx; */ | ||
2043 | + text-align: center; | ||
2044 | + /* margin-left:-30rpx; */ | ||
2045 | + | ||
2046 | + | ||
2047 | +} | ||
2048 | +/* 图片 */ | ||
2049 | +.xc-picture{ | ||
2050 | + color: #000; | ||
2051 | + background: #dcdcdc; | ||
2052 | + width: 94rpx; | ||
2053 | + height: 45rpx; | ||
2054 | + font-size: 25rpx; | ||
2055 | + border-radius: 25rpx; | ||
2056 | + font-family: 'SimHei',Arial; | ||
2057 | + text-align: center; | ||
2058 | + line-height: 45rpx; | ||
2059 | + margin-left:53rpx | ||
2060 | + | ||
2061 | +} | ||
2062 | +/* 点击视频 */ | ||
2063 | +.xc-video-button{ | ||
2064 | + position: relative; | ||
2065 | + color: #000; | ||
2066 | + background: #dcdcdc; | ||
2067 | + width: 85rpx; | ||
2068 | + height: 45rpx; | ||
2069 | + line-height: 45rpx; | ||
2070 | + font-size: 30rpx; | ||
2071 | + border-radius: 25rpx; | ||
2072 | + font-family: 'SimHei',Arial; | ||
2073 | + padding-left: 11rpx; | ||
2074 | +} | ||
2075 | + | ||
2076 | + | ||
2077 | +.xc-sn{ | ||
2078 | + color: #fff; | ||
2079 | + background: #c7161e; | ||
2080 | + border-color: transparent transparent transparent #fff; | ||
2081 | +} | ||
2082 | +/* 图片 */ | ||
2083 | +.xc-pictures{ | ||
2084 | + width: 100%; | ||
2085 | + height:529rpx; | ||
2086 | + | ||
2087 | +} | ||
2088 | +/*视频封面的图片 */ | ||
2089 | +.xc-picturess{ | ||
2090 | + position: relative; | ||
2091 | + width: 100%; | ||
2092 | + height:529rpx; | ||
2093 | +} | ||
2094 | +/* 播放 */ | ||
2095 | +.xc-play{ | ||
2096 | + width: 130rpx; | ||
2097 | + height: 130rpx; | ||
2098 | + position: absolute; | ||
2099 | + top:207rpx; | ||
2100 | + left:309rpx; | ||
2101 | +} | ||
2102 | + | ||
2103 | +.xc-video-buttons{ | ||
2104 | + position: relative; | ||
2105 | + color: #000; | ||
2106 | + background: #dcdcdc; | ||
2107 | + width: 85rpx; | ||
2108 | + height: 45rpx; | ||
2109 | + line-height: 45rpx; | ||
2110 | + font-size: 30rpx; | ||
2111 | + border-radius: 25rpx; | ||
2112 | + font-family: 'SimHei',Arial; | ||
2113 | + padding-left: 11rpx; | ||
2114 | +} | ||
2115 | + | ||
2116 | + | ||
2117 | +.wsize{font-size: 32rpx} | ||
2118 | +.five-level-word{font-size: 24rpx;} | ||
2119 | + | ||
2120 | + | ||
2121 | +/*-- 推荐商品 --*/ | ||
2122 | +.xc-goods{ | ||
2123 | + height: auto; | ||
2124 | + background: #f2f2f2; | ||
2125 | + padding: 0 20rpx; | ||
2126 | + margin-top: -25rpx; | ||
2127 | + padding-bottom: 20rpx | ||
2128 | +} | ||
2129 | + | ||
2130 | +.xc-goods-recommend { | ||
2131 | + border-radius: 20rpx; | ||
2132 | + width:345rpx; | ||
2133 | + height: 450rpx; | ||
2134 | + margin-top: 25rpx; | ||
2135 | + display: inline-block; | ||
2136 | + | ||
2137 | +} | ||
2138 | + | ||
2139 | +.xc-goods-recommend.ml{ margin-left: 22rpx} | ||
2140 | + | ||
2141 | +.xc-goods-recommend .xc-goods-imgs{ | ||
2142 | + width: 100%; | ||
2143 | + height: 325rpx; | ||
2144 | + border-radius:20rpx 20rpx 0 0; | ||
2145 | +} | ||
2146 | + | ||
2147 | +.xc-goods-bottom{ | ||
2148 | + width: 345rpx; | ||
2149 | + height: 134rpx; | ||
2150 | + background: #fff; | ||
2151 | + border-radius:0 0 20rpx 20rpx; | ||
2152 | + bottom:-8rpx; | ||
2153 | + left:0rpx; | ||
2154 | +} | ||
2155 | +.xc-goods-bottom .monry-frame{ | ||
2156 | + width:283rpx; | ||
2157 | +height:52rpx; | ||
2158 | +padding-left:24rpx; | ||
2159 | + | ||
2160 | +} | ||
2161 | +.xc-good-explain{ | ||
2162 | + width: 283rpx; | ||
2163 | + height:60rpx; | ||
2164 | + word-break: normal; | ||
2165 | + margin-left:30rpx; | ||
2166 | + font-size: 26rpx; | ||
2167 | + line-height: 30rpx; | ||
2168 | + margin-top: 5rpx; | ||
2169 | +} | ||
2170 | +.money-color-val{ | ||
2171 | + color: #c6172f; | ||
2172 | +} | ||
2173 | +.rmb-symbol{ | ||
2174 | + line-height:81rpx; | ||
2175 | + height:53rpx; | ||
2176 | + font-size: 28rpx; | ||
2177 | +} | ||
2178 | +.xc-original-price{ | ||
2179 | + color: #c0c0c0; | ||
2180 | +} | ||
2181 | +/* 文字中间加线条 */ | ||
2182 | +.word-lines{ | ||
2183 | + text-decoration:line-through; | ||
2184 | + line-height:90rpx; | ||
2185 | + margin-left:10rpx; | ||
2186 | + font-size: 20rpx; | ||
2187 | +} | ||
2188 | + | ||
2189 | + .xc-linellae-frame{ | ||
2190 | + width: 100%; | ||
2191 | + height: 70rpx; | ||
2192 | + background: #f2f2f2; | ||
2193 | +} | ||
2194 | +.xc-linellae-frame .xc-linellae{ | ||
2195 | + width: 386rpx; | ||
2196 | + height: 1rpx; | ||
2197 | + border-bottom: 1rpx solid #ebedf0; | ||
2198 | +} | ||
2199 | +.xc-recommend-frame{ | ||
2200 | +background:#f2f2f2; | ||
2201 | +width:97rpx; | ||
2202 | +height:100%; | ||
2203 | +padding-left: 10rpx; | ||
2204 | +} | ||
2205 | +.xc-recommend-frame .xc-recommend{ | ||
2206 | + width: 35rpx; | ||
2207 | + height: 27rpx; | ||
2208 | +} | ||
2209 | +.xc-recommend-frame .xc-recommend-word{ | ||
2210 | + width:58rpx; | ||
2211 | +font-size:24rpx; | ||
2212 | +color: #a9a9a9; | ||
2213 | +margin-left: 5rpx; | ||
2214 | +margin-bottom: 5rpx; | ||
2215 | +margin-top: 1rpx; | ||
2216 | + | ||
2217 | +} | ||
2218 | +.xc-price-frame{ | ||
2219 | + color: #ec0022; | ||
2220 | + align-items: baseline; | ||
2221 | +/* height:44rpx; */ | ||
2222 | +} | ||
2223 | +.xc-price-frame .sign{ | ||
2224 | +margin-top:19rpx; | ||
2225 | +margin-left:-4px; | ||
2226 | +} | ||
2227 | +.xc-val-price{ | ||
2228 | +margin-left:24rpx; | ||
2229 | +color: #ec0022; | ||
2230 | +padding-top:13rpx; | ||
2231 | +} | ||
2232 | +.xc-val-price .save{ | ||
2233 | + border-radius:10rpx; | ||
2234 | + margin-top:5rpx; | ||
2235 | + background:#fed2d9; | ||
2236 | + min-width:230rpx; | ||
2237 | + height:40rpx; | ||
2238 | + line-height:40rpx; | ||
2239 | + width: auto; | ||
2240 | + padding-left:12rpx; | ||
2241 | + padding-right:12rpx; | ||
2242 | + | ||
2243 | +} | ||
2244 | +.xc-unit-price{ | ||
2245 | + margin-top:25rpx; | ||
2246 | +padding-left:-4rpx; | ||
2247 | + | ||
2248 | +} | ||
2249 | +.xc-explain{ | ||
2250 | + color:#292929; | ||
2251 | + width:542rpx; | ||
2252 | + margin: 10rpx 0 20rpx; | ||
2253 | + width: 100%; | ||
2254 | + font-weight: bold; | ||
2255 | +} | ||
2256 | +.xc-item{width: 16%; font-size: 26rpx; color: #666;margin-right:5rpx;} | ||
2257 | +.xc-item .yuan{ | ||
2258 | + width: 38rpx; | ||
2259 | + height: 38rpx; | ||
2260 | + line-height: 38rpx; | ||
2261 | + border:1rpx solid #f3f1f2; | ||
2262 | +margin-left:33rpx; | ||
2263 | + | ||
2264 | +} | ||
2265 | +.xc-item .word{ | ||
2266 | + width:104rpx; | ||
2267 | + margin-top:16rpx; | ||
2268 | + color:#363636; | ||
2269 | + font-weight:600; | ||
2270 | + | ||
2271 | +} | ||
2272 | +.xc-item .circle-color{ | ||
2273 | + background: #d60024; | ||
2274 | + color: #fff; | ||
2275 | +} | ||
2276 | +.xc-item .circle-color1{ | ||
2277 | + background: #fefefe; | ||
2278 | + color: #666666; | ||
2279 | +} | ||
2280 | +.link{ | ||
2281 | +height:6rpx; | ||
2282 | +width:180rpx; | ||
2283 | +top:54rpx; | ||
2284 | +left:32px; | ||
2285 | +} | ||
2286 | +.link1{ | ||
2287 | +height:6rpx; | ||
2288 | +width:166rpx; | ||
2289 | +top:54rpx; | ||
2290 | +left:264rpx; | ||
2291 | +} | ||
2292 | +.link2{ | ||
2293 | + height:6rpx; | ||
2294 | +width:157rpx; | ||
2295 | +top:54rpx; | ||
2296 | +right:87rpx; | ||
2297 | +} | ||
2298 | +.link-color-red{ | ||
2299 | + background: #d60024;} | ||
2300 | +.link-color{ | ||
2301 | + background: #e5e5e5; | ||
2302 | +} | ||
2303 | +.xc-qt-price{ | ||
2304 | + /* font-style: italic; */ | ||
2305 | + top:-23rpx; | ||
2306 | +left:40rpx; | ||
2307 | + color: #fff; | ||
2308 | +} | ||
2309 | +.presell_price{ | ||
2310 | + /* font-style: italic; */ | ||
2311 | + | ||
2312 | + top: 23rpx; | ||
2313 | + left:40rpx; | ||
2314 | + color: #fff; | ||
2315 | + justify-content: space-between; | ||
2316 | +} | ||
2317 | +.xc-qt-price .xc-qtunit-price{ | ||
2318 | + margin-left:6rpx; | ||
2319 | +margin-top:-4rpx; | ||
2320 | +} | ||
2321 | +.xc-nanber{ | ||
2322 | + top:-25rpx; | ||
2323 | +left:289rpx; | ||
2324 | + | ||
2325 | +} | ||
2326 | +.xc-qtsign{ | ||
2327 | +margin-top:5rpx; | ||
2328 | + | ||
2329 | +} | ||
2330 | +.xc-people-img{ | ||
2331 | + height: 36rpx; | ||
2332 | + width: 36rpx; | ||
2333 | + background: #fff; | ||
2334 | + border-radius: 7rpx; | ||
2335 | + | ||
2336 | +} | ||
2337 | +.xc-people-img .imgs{ | ||
2338 | + width: 28rpx; | ||
2339 | + height: 28rpx; | ||
2340 | + margin-top:4rpx; | ||
2341 | + | ||
2342 | +} | ||
2343 | +.xc-people-val{ | ||
2344 | + | ||
2345 | + height: 32rpx; | ||
2346 | + border-top: 1rpx solid #fff; | ||
2347 | + border-bottom: 1rpx solid #fff; | ||
2348 | + border-right: 1rpx solid #fff; | ||
2349 | + border-radius:0 7rpx 7rpx 0; | ||
2350 | + line-height:32rpx; | ||
2351 | + margin-left:-6rpx; | ||
2352 | + padding: 0 12rpx; | ||
2353 | +} | ||
2354 | +.word-color{ | ||
2355 | + color:#d70024; | ||
2356 | +} | ||
2357 | +.word-color-lan{ | ||
2358 | + color:#0393e1; | ||
2359 | +} | ||
2360 | +.pt_view .hy-stop{ | ||
2361 | + top: -23rpx; | ||
2362 | + right: 56rpx; | ||
2363 | +} | ||
2364 | +.xc-time-val{ | ||
2365 | + width:36rpx; | ||
2366 | + height:36rpx; | ||
2367 | + border-radius:7rpx; | ||
2368 | + line-height: 36rpx; | ||
2369 | + background:#d40022; | ||
2370 | +} | ||
2371 | +.xc-time{ | ||
2372 | + margin-right:10rpx; | ||
2373 | + margin-left:10rpx; | ||
2374 | + margin-top:-32rpx; | ||
2375 | + color: #d40022; | ||
2376 | +} | ||
2377 | +.ba_r { | ||
2378 | + background:#d40022; | ||
2379 | +} | ||
2380 | +.cl_r { | ||
2381 | + color: #d40022; | ||
2382 | +} | ||
2383 | +.pre_ba { | ||
2384 | + background:#0097e0; | ||
2385 | +} | ||
2386 | +.pre_cl { | ||
2387 | + color: #0097e0; | ||
2388 | +} | ||
2389 | +.xc-goods-explain{ | ||
2390 | + width:100%; | ||
2391 | + /* padding-left:30rpx; | ||
2392 | + margin-left:-9rpx; | ||
2393 | + height: 150rpx */ | ||
2394 | +} | ||
2395 | +.xc-partner-frame{ | ||
2396 | +border-bottom:2rpx solid #eee; | ||
2397 | +width:100%; | ||
2398 | +padding:20rpx; | ||
2399 | +/* height:56rpx; */ | ||
2400 | +box-sizing: border-box; | ||
2401 | +} | ||
2402 | +.xc-person-number{ | ||
2403 | + width:120rpx; | ||
2404 | + color: #999999; | ||
2405 | + padding-left:8rpx; | ||
2406 | + text-align: left | ||
2407 | +} | ||
2408 | + | ||
2409 | +.xc-miaosha-time{ | ||
2410 | +right:17rpx; top:55rpx; | ||
2411 | +} | ||
2412 | +.pd_top1{padding-top: 10rpx} | ||
2413 | +.s_ms_bth{margin-top: 85rpx} | ||
2414 | + | ||
2415 | + | ||
2416 | +.no_pj_list{text-align: center; width: 100%; color: #999; margin: 30rpx 0; display: inline-block; font-size: 28rpx} | ||
2417 | +/* 门店地址 */ | ||
2418 | +.xc-address_frame{ | ||
2419 | + /* border-top:1rpx solid #eee; */ | ||
2420 | + width: 100%; | ||
2421 | + height: auto; | ||
2422 | + padding: 20rpx; | ||
2423 | + box-sizing: border-box; | ||
2424 | +} | ||
2425 | +.on_height{ | ||
2426 | +height: 90rpx; | ||
2427 | +} | ||
2428 | +.sn_height{ | ||
2429 | + /* min-height: 170rpx; height: auto;padding: 10rpx 0; */ | ||
2430 | +} | ||
2431 | +.xc-address_frame .address_frame{ | ||
2432 | + width: 100%; | ||
2433 | +/* padding-left: 10rpx; | ||
2434 | +margin: auto; */ | ||
2435 | + | ||
2436 | +} | ||
2437 | +.shop_name{ | ||
2438 | + | ||
2439 | +} | ||
2440 | +.stores-img{ | ||
2441 | + width: 28rpx; | ||
2442 | + height: 28rpx; | ||
2443 | + margin-right: 10rpx; | ||
2444 | +} | ||
2445 | +.shop_name{ | ||
2446 | + margin-right: 10rpx; | ||
2447 | +} | ||
2448 | +.address{ | ||
2449 | + /* width: 100%; | ||
2450 | + margin-top: 5rpx; | ||
2451 | + margin-bottom: 5rpx; */ | ||
2452 | +} | ||
2453 | +.distance{ | ||
2454 | + padding-left: 20rpx; | ||
2455 | + padding-right: 20rpx; | ||
2456 | + background: #eee; | ||
2457 | + border-radius: 20rpx; | ||
2458 | + /* margin-right: 5rpx; */ | ||
2459 | + color: #999; | ||
2460 | + height: 38rpx; | ||
2461 | +line-height: 38rpx; | ||
2462 | + | ||
2463 | +} | ||
2464 | +/* 选择门店的弹窗 */ | ||
2465 | +.mongolia-layer{ | ||
2466 | + position: fixed; | ||
2467 | +left: 0; | ||
2468 | +top: 0; | ||
2469 | +right: 0; | ||
2470 | +bottom: 0; | ||
2471 | +z-index: 11; | ||
2472 | +background: rgba(0,0,0,0.4); | ||
2473 | +width: 100%; | ||
2474 | +height: 91.9%; | ||
2475 | + | ||
2476 | +} | ||
2477 | + | ||
2478 | +.popup-frame{ | ||
2479 | +position: fixed; | ||
2480 | +z-index: 20; | ||
2481 | +background: white; | ||
2482 | +width: 100%; | ||
2483 | +border-radius: 20rpx 20rpx 0 0; | ||
2484 | +height: auto; | ||
2485 | +bottom: 0; | ||
2486 | +} | ||
2487 | +.popup-top{ | ||
2488 | + border-bottom: 1rpx solid #eee; | ||
2489 | + height: 155rpx; | ||
2490 | + width: 95%; | ||
2491 | + margin: auto; | ||
2492 | + line-height: 155rpx; | ||
2493 | + | ||
2494 | +} | ||
2495 | +.bg_rights{ | ||
2496 | + border-top: 2rpx solid ; | ||
2497 | + border-right: 2rpx solid ; | ||
2498 | + transform: rotate(45deg); | ||
2499 | + display:inline-block; | ||
2500 | + width:15rpx;height:15rpx; | ||
2501 | + border-color:#da0b31; | ||
2502 | +} | ||
2503 | +.modal-closes { | ||
2504 | + position: absolute; | ||
2505 | + right: 30rpx; | ||
2506 | + top: -15rpx; | ||
2507 | + height: 25rpx; | ||
2508 | + | ||
2509 | +} | ||
2510 | +.choose_more{ | ||
2511 | + margin-top: 40rpx; | ||
2512 | + margin-right: 20rpx; | ||
2513 | + | ||
2514 | +} | ||
2515 | +.choose_mores{ | ||
2516 | + margin-top: 30rpx; | ||
2517 | + margin-right: 15rpx; | ||
2518 | + | ||
2519 | +} | ||
2520 | +.store-list{ | ||
2521 | + width: 95%; | ||
2522 | + min-height: 300rpx; | ||
2523 | + overflow-y: scroll; | ||
2524 | + margin: auto; | ||
2525 | + max-height: 610rpx; | ||
2526 | +} | ||
2527 | +.store-list .store_choose{ | ||
2528 | + width: 100%; | ||
2529 | + height: 120rpx; | ||
2530 | + line-height: 125rpx; | ||
2531 | + border-bottom: 1rpx solid #eee; | ||
2532 | + | ||
2533 | +} | ||
2534 | +.store-list .store_choose .store{ | ||
2535 | +width: 100%; | ||
2536 | +margin: auto; | ||
2537 | +line-height: 37rpx; | ||
2538 | +padding-left: 20rpx; | ||
2539 | + | ||
2540 | +} | ||
2541 | +.xc-hook{ | ||
2542 | + width: 35rpx; | ||
2543 | + height: 35rpx; | ||
2544 | + transform: rotate(-145deg); | ||
2545 | +line-height: 37rpx; | ||
2546 | +text-align: center; | ||
2547 | +} | ||
2548 | + .xc-hooks{ | ||
2549 | + width: 30rpx; | ||
2550 | + height: 30rpx; | ||
2551 | + border: 1rpx solid #999; | ||
2552 | + } | ||
2553 | + .address-frame{ | ||
2554 | + width: 93%; | ||
2555 | +margin-left: 7rpx; | ||
2556 | + | ||
2557 | + } | ||
2558 | + .nearby_store{ | ||
2559 | +margin-left: 17rpx; | ||
2560 | + } | ||
2561 | + .address_name{ | ||
2562 | + margin-right: 10rpx; | ||
2563 | + | ||
2564 | + } | ||
2565 | + .address-val{ | ||
2566 | + height: 38rpx; | ||
2567 | +line-height: 38rpx; | ||
2568 | + | ||
2569 | + } | ||
2570 | + .store-bottom{ | ||
2571 | + width: 85%; | ||
2572 | + margin: auto; | ||
2573 | + height: 90rpx; | ||
2574 | + } | ||
2575 | + .determine{ | ||
2576 | + width: 260rpx; | ||
2577 | + height: 55rpx; | ||
2578 | + border-radius: 50rpx; | ||
2579 | + line-height: 55rpx; | ||
2580 | + } | ||
2581 | + .default{ | ||
2582 | + width: 260rpx; | ||
2583 | + height: 55rpx; | ||
2584 | + border:3rpx solid #c8c8c8; | ||
2585 | + border-radius: 50rpx; | ||
2586 | + line-height: 55rpx; | ||
2587 | + } | ||
2588 | + .store-bottom-frame{ | ||
2589 | + width: 95%; | ||
2590 | + margin: auto; | ||
2591 | + | ||
2592 | + } | ||
2593 | + /* 门店分类列表 */ | ||
2594 | +.sort_store_list{ | ||
2595 | + max-height: 700rpx; | ||
2596 | + overflow: hidden; | ||
2597 | + overflow-y: scroll; | ||
2598 | + width: 95%; | ||
2599 | + margin: auto; | ||
2600 | +} | ||
2601 | +.sort_store_list .sort-store-frame{ | ||
2602 | + width: 100%; | ||
2603 | +height: 100rpx; | ||
2604 | +line-height:100rpx; | ||
2605 | +border-bottom: 1rpx solid #eee; | ||
2606 | + | ||
2607 | +} | ||
2608 | +.sort_store_list .sort-store-frame .sort-store{ | ||
2609 | + width: 94.5%; | ||
2610 | + margin: auto; | ||
2611 | +} | ||
2612 | +.black_rights-frame{ | ||
2613 | +width: 50%; | ||
2614 | +} | ||
2615 | +.black_rights-frame .black_rights{ | ||
2616 | + border-top: 3rpx solid; | ||
2617 | +border-right: 3rpx solid; | ||
2618 | +transform: rotate(45deg); | ||
2619 | +display: inline-block; | ||
2620 | +width: 20rpx; | ||
2621 | +height: 20rpx; | ||
2622 | +} | ||
2623 | +.xc-val-money{ | ||
2624 | + height:55rpx; | ||
2625 | +} | ||
2626 | + | ||
2627 | +.xc-distance-bottom{ | ||
2628 | + margin-bottom: 40rpx; | ||
2629 | +} | ||
2630 | +.xc-distance-top{ | ||
2631 | +margin-top: 10rpx; | ||
2632 | +} | ||
2633 | +.xc-width{ | ||
2634 | + width: 100%; | ||
2635 | +} | ||
2636 | +.right-arrow{ width: 15rpx; height:15rpx; | ||
2637 | + border-top: 2rpx solid #d70026; | ||
2638 | + border-right: 2rpx solid #d70026; | ||
2639 | + transform: rotate(45deg);display:inline-block; | ||
2640 | + margin-bottom:3rpx; | ||
2641 | +} | ||
2642 | +.xc-goods-attribute{ | ||
2643 | + border-bottom: 1px solid #eee; | ||
2644 | +padding-bottom: 20rpx; | ||
2645 | +/* margin-bottom:40rpx; */ | ||
2646 | +} | ||
2647 | +.xc-val-fream{ | ||
2648 | + width: 105rpx; | ||
2649 | +} | ||
2650 | +.is_stock{ | ||
2651 | +width: 58%; | ||
2652 | +height: 70rpx; | ||
2653 | +border-radius: 55rpx; | ||
2654 | +} | ||
2655 | +.select_store_height{ | ||
2656 | + height: 50rpx; | ||
2657 | +} | ||
2658 | +.butttem5{ | ||
2659 | + margin-bottom: 5rpx; | ||
2660 | +} | ||
2661 | + | ||
2662 | +.no_pj_list{text-align: center; width: 100%; color: #999; margin-top: 30rpx; display: inline-block; font-size: 28rpx} | ||
2663 | + | ||
2664 | + | ||
2665 | +.join-cart>view.no_store { | ||
2666 | + width: 58%; background-color: #adadad; | ||
2667 | +} | ||
2668 | + | ||
2669 | +.s_btn{ margin-top: 25rpx; } | ||
2670 | +/* 美妆价的样式 */ | ||
2671 | +.beauty-makeup-frame{ | ||
2672 | + /* width: 101.5%; | ||
2673 | + margin: auto; */ | ||
2674 | + height: 120rpx; | ||
2675 | + border-radius: 15rpx; | ||
2676 | + margin-top: 10px; | ||
2677 | + | ||
2678 | +} | ||
2679 | +.beauty-makeup-frame .left{ | ||
2680 | + width: 80%; | ||
2681 | + height: 100%; | ||
2682 | + background:#f7f7f7; | ||
2683 | + border-radius: 20rpx 0rpx 0rpx 20rpx; | ||
2684 | + /* padding: 0 10rpx; */ | ||
2685 | +} | ||
2686 | + .card-frame{ | ||
2687 | + margin-top: 0rpx; | ||
2688 | + /* padding-right: 23rpx; | ||
2689 | + margin-right: 15rpx; */ | ||
2690 | +} | ||
2691 | +.advert-card{ | ||
2692 | + margin-top: 0rpx!important; | ||
2693 | + | ||
2694 | +} | ||
2695 | +.beauty-makeup-frame .right{ | ||
2696 | + width: 20%; | ||
2697 | + height: 100%; | ||
2698 | + background:#f3efe3; | ||
2699 | + border-radius: 0rpx 20rpx 20rpx 0rpx; | ||
2700 | + } | ||
2701 | +.grade-card-frame{ | ||
2702 | + | ||
2703 | + /* height:45rpx ; */ | ||
2704 | + background: #3c300a; | ||
2705 | + border-radius: 20rpx; | ||
2706 | + /* margin-top: 10px; | ||
2707 | + margin-left: 7rpx; */ | ||
2708 | + justify-content: center; | ||
2709 | + padding: 4rpx 12rpx; | ||
2710 | +} | ||
2711 | +.grade-card-frame .img{ | ||
2712 | + width: 24rpx; | ||
2713 | + height: 24rpx; | ||
2714 | + margin-top: 2px; | ||
2715 | + | ||
2716 | +} | ||
2717 | +.grade-card-frame .card-name{ | ||
2718 | + margin-left: 8rpx; | ||
2719 | + /* max-width: 120rpx; */ | ||
2720 | + max-width: 165rpx; | ||
2721 | +} | ||
2722 | +.card-effect{ | ||
2723 | + /* margin-left: 15rpx; */ | ||
2724 | +} | ||
2725 | +.at_once_carde{ | ||
2726 | + width:65rpx; | ||
2727 | + height: 75rpx; | ||
2728 | + line-height:38rpx; | ||
2729 | +} | ||
2730 | +.bg_right{ width: 18rpx; height:18rpx; | ||
2731 | + border-top: 2rpx solid #333; | ||
2732 | + border-right: 2rpx solid #333; | ||
2733 | + transform: rotate(45deg);display:inline-block; | ||
2734 | + margin-bottom:3rpx; | ||
2735 | + | ||
2736 | +} | ||
2737 | +.carde_frame{ | ||
2738 | + height: 50rpx; | ||
2739 | + line-height: 18rpx | ||
2740 | +} | ||
2741 | + | ||
2742 | +button.custom-service { line-height: normal; border: 0;} | ||
2743 | +button.custom-service::after{ | ||
2744 | + border: 0; | ||
2745 | +} | ||
2746 | +.no_store{color:#d60021; font-size: 26rpx;} | ||
2747 | +.cx_show_view{ width: 580rpx; /* line-height: 30rpx; margin-bottom: 6rpx; */ } | ||
2748 | +.cx_show_view .word{ width: 400rpx} | ||
2749 | +.prom_condition { | ||
2750 | + color: #d60021; | ||
2751 | + /* width: 180rpx; */ | ||
2752 | + /* height: 30rpx; */ | ||
2753 | + font-size: 20rpx; | ||
2754 | + /* padding-top: 0.01rpx; */ | ||
2755 | + /* display: flex; | ||
2756 | + justify-content: center; | ||
2757 | + align-items: center; */ | ||
2758 | + border: 2rpx solid #d60021; | ||
2759 | + border-radius: 10rpx; | ||
2760 | + margin-right:10rpx ; | ||
2761 | + /* margin-left: 10rpx; */ | ||
2762 | + font-size: 24rpx; | ||
2763 | + padding: 0 10rpx; | ||
2764 | +} | ||
2765 | +.hui_img{ width: 44rpx; height: 44rpx; margin-right: 8rpx} | ||
2766 | +.order_hui{color: #444; width: 420rpx} | ||
2767 | +.order_hui view{ height: 34rpx; line-height: 34rpx;} | ||
2768 | +.dp_img{width: 240rpx; height: 240rpx; margin: 0 40rpx} | ||
2769 | +.dp_cx_view{border-bottom: 0.02rpx solid #eee; padding-bottom: 40rpx} | ||
2770 | +.act_content{ margin-top: 40rpx} | ||
2771 | +.act_content view{ margin-bottom: 12rpx} | ||
2772 | +.color_b{color: #ff9c00} | ||
2773 | + | ||
2774 | +.poster-container { | ||
2775 | + box-sizing: border-box; | ||
2776 | + position: fixed; | ||
2777 | + top: 50%; | ||
2778 | + left: 50%; | ||
2779 | + transform: translate(-50%, -50%); | ||
2780 | + width: calc(100% - 120rpx); | ||
2781 | + z-index: 1000; | ||
2782 | +} | ||
2783 | +.mask { | ||
2784 | + position: fixed; | ||
2785 | + top: 0; | ||
2786 | + left: 0; | ||
2787 | + width: 100%; | ||
2788 | + height: 100%; | ||
2789 | + z-index: 999; | ||
2790 | + background-color: rgba(0,0,0,.4); | ||
2791 | +} | ||
2792 | +.poster-wrapper { | ||
2793 | + width: 100%; | ||
2794 | +} | ||
2795 | + | ||
2796 | +.poster { | ||
2797 | + box-sizing: border-box; | ||
2798 | + width: 100%; | ||
2799 | + height: 1055rpx; | ||
2800 | + border-radius: 20rpx; | ||
2801 | + /* box-shadow: 0 8px 12px #666; */ | ||
2802 | + position: relative; | ||
2803 | + z-index: 999; | ||
2804 | + overflow: hidden; | ||
2805 | +} | ||
2806 | +.poster-img { | ||
2807 | + display: block; | ||
2808 | + width: 100%; | ||
2809 | + height: 100%; | ||
2810 | +} | ||
2811 | +.btn-container { | ||
2812 | + display: flex; | ||
2813 | + justify-content: space-around; | ||
2814 | +} | ||
2815 | +.btn-share { | ||
2816 | + display: block; | ||
2817 | + background-color: #FE6867; | ||
2818 | + color: white; | ||
2819 | + border-radius: 8rpx; | ||
2820 | + line-height: 80rpx; | ||
2821 | + margin-top: 28rpx; | ||
2822 | + padding: 0 60rpx; | ||
2823 | +} | ||
2824 | +/* .btn-close { | ||
2825 | + background-color: rgba(0,0,0,.5); | ||
2826 | + color: white; | ||
2827 | + width: 40rpx; | ||
2828 | + height: 40rpx; | ||
2829 | + line-height: 40rpx; | ||
2830 | + text-align: center; | ||
2831 | + border-radius: 50%; | ||
2832 | + position: absolute; | ||
2833 | + right: 20rpx; | ||
2834 | + top: 10rpx; | ||
2835 | +} */ | ||
2836 | + | ||
2837 | +.goods-price .rel_txt{ | ||
2838 | + /* position: relative; top: 32rpx; */ | ||
2839 | + font-size: 30rpx; | ||
2840 | +} | ||
2841 | +.goods-price .rel_img{width: 62rpx; height: 62rpx;position: relative; top: 8rpx;} | ||
2842 | + | ||
2843 | +.btn-close { | ||
2844 | + /* background-color: rgba(0,0,0,.5); */ | ||
2845 | + color: #ccc; | ||
2846 | + width: 50rpx; | ||
2847 | + height: 50rpx; | ||
2848 | + line-height: 50rpx; | ||
2849 | + text-align: center; | ||
2850 | + border-radius: 50%; | ||
2851 | + position: absolute; | ||
2852 | + right: 20rpx; | ||
2853 | + top: 20rpx; | ||
2854 | +} | ||
2855 | + | ||
2856 | +.icon-close { | ||
2857 | + font-size: 48rpx; | ||
2858 | +} | ||
2859 | +.quan_price{ | ||
2860 | + background-color: #ff4700; color: #fff; padding: 10rpx 25rpx; margin-left: 10rpx; border-radius: 30rpx; | ||
2861 | +} | ||
2862 | + | ||
2863 | +/*--闪白屏--*/ | ||
2864 | +.g_img_box{ | ||
2865 | + background-position: center center; | ||
2866 | + background-repeat: no-repeat; | ||
2867 | + -webkit-background-size: cover; | ||
2868 | + -moz-background-size: cover; | ||
2869 | + background-size: cover; | ||
2870 | +} | ||
2871 | + | ||
2872 | + | ||
2873 | + | ||
2874 | +.arrow { | ||
2875 | + width: auto !important; | ||
2876 | + position: absolute; | ||
2877 | + right: 0; | ||
2878 | + top: 10rpx; | ||
2879 | +} | ||
2880 | + | ||
2881 | + | ||
2882 | + | ||
2883 | + | ||
2884 | + | ||
2885 | + | ||
2886 | + | ||
2887 | +/* 支付预售定金 */ | ||
2888 | +.price-container { | ||
2889 | + top: 50%; | ||
2890 | + padding-left: 40rpx; | ||
2891 | + transform: translateY(-50%); | ||
2892 | + color: white; | ||
2893 | + font-weight: bold; | ||
2894 | +} | ||
2895 | + | ||
2896 | +.rmb { | ||
2897 | + display: relative; | ||
2898 | +} | ||
2899 | + | ||
2900 | +.rmb::before { | ||
2901 | + content: '¥'; | ||
2902 | + font-size: 24rpx; | ||
2903 | +} | ||
2904 | + | ||
2905 | +.no-bold { | ||
2906 | + font-weight: normal; | ||
2907 | +} | ||
2908 | + | ||
2909 | +.bg-FF4732 { | ||
2910 | + background-color: #FF4732; | ||
2911 | +} | ||
2912 | + | ||
2913 | +.line { | ||
2914 | + position: relative; | ||
2915 | +} | ||
2916 | + | ||
2917 | +.line::before { | ||
2918 | + position: absolute; | ||
2919 | + left: 0; | ||
2920 | + top: 50%; | ||
2921 | + transform: translateY(-50%); | ||
2922 | + content: ''; | ||
2923 | + width: 2rpx; | ||
2924 | + height: 60%; | ||
2925 | + background-color: rgba(255,255,255,.4); | ||
2926 | +} | ||
2927 | + | ||
2928 | + | ||
2929 | +.logo-container { | ||
2930 | + -webkit-filter: brightness(80%); | ||
2931 | + filter: brightness(80%); | ||
2932 | +} | ||
2933 | + | ||
2934 | +.logo { | ||
2935 | + width: 132rpx; | ||
2936 | + height: 37rpx; | ||
2937 | + margin-right: 10rpx; | ||
2938 | +} | ||
2939 | + | ||
2940 | + | ||
2941 | +.swiper-container { | ||
2942 | + position: absolute; | ||
2943 | + top: 70rpx; | ||
2944 | + left: 0; | ||
2945 | + padding: 20rpx 10rpx; | ||
2946 | + width: 100%; | ||
2947 | + box-sizing: border-box; | ||
2948 | + z-index: 98; | ||
2949 | +} | ||
2950 | + | ||
2951 | +.swiper { | ||
2952 | + height: 60rpx; | ||
2953 | + color: white; | ||
2954 | + font-size: 26rpx; | ||
2955 | +} | ||
2956 | + | ||
2957 | +.swiper-item { | ||
2958 | + /* width: auto !important; | ||
2959 | + background-color: rgba(0,0,0,.4); | ||
2960 | + border-radius: 60rpx; */ | ||
2961 | + position: relative; | ||
2962 | +} | ||
2963 | + | ||
2964 | +.swiper-item .item { | ||
2965 | + position: absolute; | ||
2966 | +} | ||
2967 | + | ||
2968 | +.item { | ||
2969 | + /* position: absolute; */ | ||
2970 | + display: flex; | ||
2971 | + align-items: center; | ||
2972 | + justify-content: center; | ||
2973 | + border-radius: 60rpx; | ||
2974 | + background-color: rgba(0,0,0,.4); | ||
2975 | + /* position: absolute; */ | ||
2976 | +} | ||
2977 | + | ||
2978 | +.avatar-container { | ||
2979 | + width: 60rpx; | ||
2980 | + height: 60rpx; | ||
2981 | + border-radius: 50%; | ||
2982 | + overflow: hidden; | ||
2983 | + flex-shrink: 0; | ||
2984 | +} | ||
2985 | +.avatar-container image { | ||
2986 | + width: 100%; | ||
2987 | + height: 100%; | ||
2988 | +} | ||
2989 | + | ||
2990 | +.hideArea { | ||
2991 | + position: absolute; | ||
2992 | + left: -1000px; | ||
2993 | + top: -1000px; | ||
2994 | +} | ||
2995 | + | ||
2996 | +.searchbar { | ||
2997 | + height: 95rpx; | ||
2998 | + border-bottom: 2rpx solid rgb(238, 238, 238); | ||
2999 | +} | ||
3000 | +.storeListpadd { | ||
3001 | + padding: 0rpx 31rpx; | ||
3002 | +} | ||
3003 | +.search { | ||
3004 | + width: 125rpx; | ||
3005 | + height: 45rpx; | ||
3006 | + line-height: 45rpx; | ||
3007 | + background-color: rgb(219, 27, 52); | ||
3008 | + border-radius: 30rpx; | ||
3009 | + color: rgb(255, 255, 255); | ||
3010 | +} | ||
3011 | +.inputstore { | ||
3012 | + width: 510rpx; | ||
3013 | + height: 43rpx; | ||
3014 | + line-height: 43rpx; | ||
3015 | + border-radius: 30rpx; | ||
3016 | + border: 2rpx solid rgb(238, 238, 238); | ||
3017 | + padding-left: 30rpx; | ||
3018 | +} | ||
3019 | +.c-red22{ | ||
3020 | + color: #d60021 | ||
3021 | +} | ||
3022 | + | ||
3023 | + | ||
3024 | + | ||
3025 | +.card, | ||
3026 | +.taohe { | ||
3027 | + position: relative; | ||
3028 | + padding: 20rpx; | ||
3029 | + margin-bottom: 20rpx; | ||
3030 | + border-radius: 8rpx; | ||
3031 | + background: #ffdcdc; | ||
3032 | + overflow: hidden; | ||
3033 | + /* background: #ffdcdc url(https://mshopimg.yolipai.net/miniapp/images/fwk/crown_bg.png) no-repeat left top; | ||
3034 | + background-position: 10rpx 10rpx; | ||
3035 | + background-size: 206rpx 136rpx; */ | ||
3036 | +} | ||
3037 | + | ||
3038 | +.card::before { | ||
3039 | + position: absolute; | ||
3040 | + font-family: iconfont; | ||
3041 | + content: '\e62a'; | ||
3042 | + color: rgba(255,0,0,.1); | ||
3043 | + font-size: 260rpx; | ||
3044 | + /* transform: rotateZ(45deg); */ | ||
3045 | + top: -110rpx; | ||
3046 | + left: -70rpx; | ||
3047 | +} | ||
3048 | + | ||
3049 | +.taohe::before { | ||
3050 | + position: absolute; | ||
3051 | + font-family: iconfont; | ||
3052 | + content: '\e64e'; | ||
3053 | + color: rgba(255,0,0,.1); | ||
3054 | + font-size: 260rpx; | ||
3055 | + top: -20rpx; | ||
3056 | + left: -30rpx; | ||
3057 | +} | ||
3058 | + | ||
3059 | +.rmb::before { | ||
3060 | + content: '¥'; | ||
3061 | + font-size: 24rpx; | ||
3062 | +} | ||
3063 | + | ||
3064 | +.c-red { | ||
3065 | + color: #f23030; | ||
3066 | +} | ||
0 | \ No newline at end of file | 3067 | \ No newline at end of file |
packageC/pages/presell/cart/cart.js
@@ -4,6 +4,7 @@ var t = getApp(), app = t, a = t.request, e = require("../../../../utils/common. | @@ -4,6 +4,7 @@ var t = getApp(), app = t, a = t.request, e = require("../../../../utils/common. | ||
4 | var oo = t.globalData.setting, os = oo; | 4 | var oo = t.globalData.setting, os = oo; |
5 | var regeneratorRuntime = require('../../../../utils/runtime.js'); | 5 | var regeneratorRuntime = require('../../../../utils/runtime.js'); |
6 | var util_pay = require("../../../../utils/pay.js"); | 6 | var util_pay = require("../../../../utils/pay.js"); |
7 | +const t_pay = require("../../../../utils/pay2.js"); | ||
7 | 8 | ||
8 | 9 | ||
9 | Page({ | 10 | Page({ |
@@ -121,6 +122,8 @@ Page({ | @@ -121,6 +122,8 @@ Page({ | ||
121 | same_ok:1, //同城配送按钮控制 | 122 | same_ok:1, //同城配送按钮控制 |
122 | bconfig: null, | 123 | bconfig: null, |
123 | showFold:true, | 124 | showFold:true, |
125 | + | ||
126 | + is_fwk:0, //-- 是不是服务卡项的购买 -- | ||
124 | }, | 127 | }, |
125 | 128 | ||
126 | 129 | ||
@@ -153,6 +156,10 @@ Page({ | @@ -153,6 +156,10 @@ Page({ | ||
153 | if (t.order_id) this.data.order_id = t.order_id; | 156 | if (t.order_id) this.data.order_id = t.order_id; |
154 | if (t.order_sn) this.data.order_sn = t.order_sn; | 157 | if (t.order_sn) this.data.order_sn = t.order_sn; |
155 | 158 | ||
159 | + if(t.is_fwk){ | ||
160 | + this.setData({is_fwk:1}); | ||
161 | + } | ||
162 | + | ||
156 | wx.setNavigationBarTitle({ title: "订单详情", }) | 163 | wx.setNavigationBarTitle({ title: "订单详情", }) |
157 | var th = this; | 164 | var th = this; |
158 | getApp().getConfig2(function (e) { | 165 | getApp().getConfig2(function (e) { |
@@ -210,10 +217,15 @@ Page({ | @@ -210,10 +217,15 @@ Page({ | ||
210 | }else{ | 217 | }else{ |
211 | 218 | ||
212 | console.log('onshow-3333'); | 219 | console.log('onshow-3333'); |
220 | + let o_list="/pages/user/order_list/order_list"; | ||
221 | + if(this.data.is_fwk){ | ||
222 | + o_list='/pages/user/order_list/order_list?index=2&tabindex=1'; | ||
223 | + } | ||
213 | //-- 富友支付的 -- | 224 | //-- 富友支付的 -- |
214 | - var fy= ut.fy_back("/pages/user/order_list/order_list",1); | 225 | + var fy= ut.fy_back(o_list,1); |
215 | if(fy) return false; | 226 | if(fy) return false; |
216 | util_pay.set_fir(); | 227 | util_pay.set_fir(); |
228 | + t_pay.set_fir(); | ||
217 | 229 | ||
218 | //-- 通联的第三方支付的返回优化 -- | 230 | //-- 通联的第三方支付的返回优化 -- |
219 | ut.is_pay_ok(th.data.ok_order_sn,"back","back",function (){ | 231 | ut.is_pay_ok(th.data.ok_order_sn,"back","back",function (){ |
@@ -222,8 +234,20 @@ Page({ | @@ -222,8 +234,20 @@ Page({ | ||
222 | console.log(th.data.ok_order_sn); | 234 | console.log(th.data.ok_order_sn); |
223 | 235 | ||
224 | if(!th.data.ok_order_sn) return false; | 236 | if(!th.data.ok_order_sn) return false; |
225 | - getApp().request.promiseGet("/api/weshop/order/page", | ||
226 | - {data:{store_id:os.stoid,parent_sn:th.data.ok_order_sn}}).then(res=>{ | 237 | + |
238 | + let ord_url=''; | ||
239 | + let ord_req={}; | ||
240 | + //-- 如果是服务卡项的时候 -- | ||
241 | + if(th.data.is_fwk){ | ||
242 | + ord_url="/api/weshop/recharge/user/page"; | ||
243 | + ord_req={store_id:os.stoid,order_sn:th.data.ok_order_sn,user_id:getApp().globalData.user_id}; | ||
244 | + }else{ | ||
245 | + ord_url="/api/weshop/order/page"; | ||
246 | + ord_req={store_id:os.stoid,parent_sn:th.data.ok_order_sn}; | ||
247 | + } | ||
248 | + | ||
249 | + getApp().request.promiseGet(ord_url, | ||
250 | + {data:ord_req}).then(res=>{ | ||
227 | if(ut.ajax_ok(res)){ | 251 | if(ut.ajax_ok(res)){ |
228 | 252 | ||
229 | console.log('onshow-444'); | 253 | console.log('onshow-444'); |
@@ -463,6 +487,15 @@ Page({ | @@ -463,6 +487,15 @@ Page({ | ||
463 | 487 | ||
464 | //-----获取商品------ | 488 | //-----获取商品------ |
465 | async get_buy_goods(ord, o_sn) { | 489 | async get_buy_goods(ord, o_sn) { |
490 | + | ||
491 | + console.log('is_fwk'); | ||
492 | + console.log(this.data.is_fwk); | ||
493 | + | ||
494 | + if(this.data.is_fwk){ | ||
495 | + this.get_buy_card(o_sn,ord); | ||
496 | + return false; | ||
497 | + } | ||
498 | + | ||
466 | var order = null, | 499 | var order = null, |
467 | order_goods = null, | 500 | order_goods = null, |
468 | goods = null, | 501 | goods = null, |
@@ -474,7 +507,6 @@ Page({ | @@ -474,7 +507,6 @@ Page({ | ||
474 | act = null, //订单内容 | 507 | act = null, //订单内容 |
475 | th = this; | 508 | th = this; |
476 | 509 | ||
477 | - | ||
478 | if (o_sn) { | 510 | if (o_sn) { |
479 | //获取order信息根据订单编号order_sn | 511 | //获取order信息根据订单编号order_sn |
480 | await getApp().request.promiseGet("/api/weshop/order/page", { | 512 | await getApp().request.promiseGet("/api/weshop/order/page", { |
@@ -491,6 +523,8 @@ Page({ | @@ -491,6 +523,8 @@ Page({ | ||
491 | order = res.data.data; | 523 | order = res.data.data; |
492 | }); | 524 | }); |
493 | } | 525 | } |
526 | + | ||
527 | + | ||
494 | //---获取订单从表--- | 528 | //---获取订单从表--- |
495 | await getApp().request.promiseGet("/api/weshop/ordergoods/page", { | 529 | await getApp().request.promiseGet("/api/weshop/ordergoods/page", { |
496 | data: { | 530 | data: { |
@@ -793,7 +827,203 @@ Page({ | @@ -793,7 +827,203 @@ Page({ | ||
793 | }, | 827 | }, |
794 | 828 | ||
795 | 829 | ||
796 | - async calculatePrice2() { | 830 | + //-- 服务卡项购买的时候 -- |
831 | + async get_buy_card(o_sn,ord){ | ||
832 | + | ||
833 | + let order = null, | ||
834 | + order_goods = null, | ||
835 | + goods = null, | ||
836 | + pickup = null, | ||
837 | + distr_type = 0, | ||
838 | + exp_type = 0, | ||
839 | + presell = null, //订单从表 | ||
840 | + pre_arr = null, //订单内容 | ||
841 | + act = null, //订单内容 | ||
842 | + th = this; | ||
843 | + | ||
844 | + let url = '/api/weshop/recharge/user/page' | ||
845 | + let data = { | ||
846 | + store_id: os.stoid, | ||
847 | + user_id: getApp().globalData.user_id, | ||
848 | + order_sn: o_sn, | ||
849 | + }; | ||
850 | + | ||
851 | + if(!o_sn){ | ||
852 | + delete data.order_sn; | ||
853 | + data.order_id=ord; | ||
854 | + } | ||
855 | + | ||
856 | + | ||
857 | + | ||
858 | + // 请求数据 | ||
859 | + let res= await app.promiseGet(url, { | ||
860 | + data: data, | ||
861 | + }); | ||
862 | + | ||
863 | + if(!ut.ajax_ok(res)){ | ||
864 | + getApp().confirmBox("未找到订单"); | ||
865 | + return false; | ||
866 | + } | ||
867 | + | ||
868 | + order= res.data.data.pageData[0]; | ||
869 | + //---获取订单从表--- | ||
870 | + await getApp().request.promiseGet("/api/weshop/rechargeServicelist/page", { | ||
871 | + data: { | ||
872 | + store_id: os.stoid, | ||
873 | + order_id: order.order_id | ||
874 | + } | ||
875 | + }).then(res => { | ||
876 | + order_goods = res.data.data.pageData[0]; | ||
877 | + }); | ||
878 | + | ||
879 | + order_goods.goods_num=order_goods.qty; | ||
880 | + | ||
881 | + await getApp().request.promiseGet("/api/weshop/recharge/rechargePresell/get/" + oo.stoid + "/" + order.order_id, {}).then(res => { | ||
882 | + presell = res.data.data; | ||
883 | + }); | ||
884 | + | ||
885 | + //等待定金 | ||
886 | + if (order.order_status < 2 && presell.deposit_pay_time <= 0) { | ||
887 | + th.setData({ wait_dj: 1 }) | ||
888 | + } | ||
889 | + //等待尾款 | ||
890 | + if (order.order_status < 2 && presell.deposit_pay_time > 0 && presell.tail_pay_state == 0 && presell.presell_type != 1) { | ||
891 | + th.setData({ wait_wk: 1 }) | ||
892 | + wx.setNavigationBarTitle({ title: "支付尾款", }) | ||
893 | + } | ||
894 | + //等待发货 | ||
895 | + if (order.pay_status == 1 && order.shipping_status == 0) { | ||
896 | + th.setData({ wait_fh: 1 }) | ||
897 | + } | ||
898 | + | ||
899 | + if (order.pay_status == 1 && order.shipping_status == 1 && order.order_status < 2) { | ||
900 | + th.setData({ wait_sh: 1 }) | ||
901 | + } | ||
902 | + //------获取预售主表---------- | ||
903 | + await getApp().request.promiseGet("/api/weshop/marketing/marketingPresellForm/get/" + os.stoid + "/" + presell.prom_id, {}).then(res => { | ||
904 | + if (res.data.code == 0 && res.data.data) { | ||
905 | + act = res.data.data; | ||
906 | + th.setData({ | ||
907 | + act: res.data.data, | ||
908 | + }); | ||
909 | + } | ||
910 | + }) | ||
911 | + | ||
912 | + //-- 判断一下会员的身份 -- | ||
913 | + if (order.pay_status == 0) { | ||
914 | + var pre_data = { store_id: os.stoid, presell_id: presell.prom_id, timetype: 12, goods_id: order_goods.card_id }; | ||
915 | + pre_data.user_id = order.user_id; | ||
916 | + var isok = 1; | ||
917 | + await getApp().request.promiseGet("/api/weshop/marketing/marketingPresellList/page", { | ||
918 | + data: pre_data, | ||
919 | + }).then(e => { | ||
920 | + if (e.data.code == 0 && e.data.data.pageData && e.data.data.pageData.length > 0) { | ||
921 | + pre_arr = e.data.data.pageData[0]; | ||
922 | + } else { | ||
923 | + isok = 0; | ||
924 | + } | ||
925 | + }) | ||
926 | + | ||
927 | + if (!isok) { | ||
928 | + getApp().confirmBox("会员身份不符合"); | ||
929 | + return false; | ||
930 | + } | ||
931 | + | ||
932 | + if (th.data.wait_dj) { | ||
933 | + if (act.is_end) { | ||
934 | + getApp().confirmBox("活动已经结束"); | ||
935 | + return false; | ||
936 | + } | ||
937 | + if (!act.isuse) { | ||
938 | + getApp().confirmBox("活动未启用"); | ||
939 | + return false; | ||
940 | + } | ||
941 | + if (th.data.act.end_time < ut.gettimestamp()) { | ||
942 | + getApp().confirmBox("活动的定金时间已经结束", function () { | ||
943 | + ut.wx_back(); | ||
944 | + }); | ||
945 | + return false; | ||
946 | + } | ||
947 | + | ||
948 | + } | ||
949 | + if (th.data.wait_wk) { | ||
950 | + if (th.data.act.pay_enddate < ut.gettimestamp()) { | ||
951 | + getApp().confirmBox("活动的尾款时间已经结束", function () { | ||
952 | + ut.wx_back(); | ||
953 | + }); | ||
954 | + return false; | ||
955 | + } | ||
956 | + } | ||
957 | + } | ||
958 | + else { | ||
959 | + await getApp().request.promiseGet("/api/weshop/marketing/marketingPresellList/list", { | ||
960 | + data: { store_id: os.stoid, goods_id: order_goods.card_id, presell_id: order_goods.prom_id } | ||
961 | + }).then(re => { | ||
962 | + if (re.data.code == 0 && re.data.data && re.data.data.length > 0) { | ||
963 | + pre_arr = re.data.data[0]; | ||
964 | + } | ||
965 | + }) | ||
966 | + | ||
967 | + if (!pre_arr) { | ||
968 | + getApp().confirmBox("未找到商品"); | ||
969 | + return false; | ||
970 | + } | ||
971 | + } | ||
972 | + | ||
973 | + //---获取商品--- | ||
974 | + await getApp().request.promiseGet("/api/weshop/serviceCard/get/" + oo.stoid + "/" + order_goods.card_id, {}).then(res => { | ||
975 | + goods = res.data.data; | ||
976 | + order.market_price = goods.show_price; | ||
977 | + order.show_img = oo.imghost + goods.imgUrl; | ||
978 | + goods.original_img =goods.imgUrl; | ||
979 | + goods.goods_name =goods.serviceName; | ||
980 | + }); | ||
981 | + | ||
982 | + var g_url = "/packageC/pages/presell/cardInfo/goodsInfo?goods_id=" + order_goods.card_id + "&pre_id=" + pre_arr.id; | ||
983 | + if (act.is_end || th.data.act.end_time < ut.gettimestamp()) { | ||
984 | + g_url = "/packageA/pages/goods/goodsInfo/goodsInfo?goods_id=" + order_goods.card_id; | ||
985 | + } | ||
986 | + | ||
987 | + //---获取门店--- | ||
988 | + await getApp().request.promiseGet("/api/weshop/pickup/get/" + oo.stoid + "/" + order_goods.pickup_id, {}).then(res => { | ||
989 | + pickup = res.data.data; | ||
990 | + }); | ||
991 | + | ||
992 | + order['is_all_return'] = 0; | ||
993 | + var price = presell.presell_price; | ||
994 | + if (!goods) return false; | ||
995 | + | ||
996 | + | ||
997 | + //等待发货的时候 | ||
998 | + if (th.data.wait_fh) { | ||
999 | + var send_time = th.data.act.delivery_date; | ||
1000 | + if (th.data.act.delivery_type == 2) { | ||
1001 | + send_time = ut.gettimestamp() + th.data.act.delivery_daynum * 3600 * 24; | ||
1002 | + } | ||
1003 | + } | ||
1004 | + | ||
1005 | + order.order_goods = order_goods; | ||
1006 | + var tail_pay = pre_arr.presell_price * order_goods.goods_num - presell.presell_deposit; | ||
1007 | + this.setData({ | ||
1008 | + order: order, | ||
1009 | + pickup: pickup, | ||
1010 | + goods: goods, | ||
1011 | + presell: presell, | ||
1012 | + pre_arr: pre_arr, | ||
1013 | + userInfo: getApp().globalData.userInfo, | ||
1014 | + tail_pay: tail_pay, | ||
1015 | + order_goods: order_goods, | ||
1016 | + all_price: pre_arr.presell_price * order_goods.goods_num, | ||
1017 | + pickup_id: pickup.pickup_id, | ||
1018 | + send_time: send_time, | ||
1019 | + g_url: g_url | ||
1020 | + }); | ||
1021 | + th.get_diff(); | ||
1022 | + //统一进行计算金额 | ||
1023 | + th.calculatePrice2(); | ||
1024 | + }, | ||
1025 | + | ||
1026 | + async calculatePrice2() { | ||
797 | var th = this; | 1027 | var th = this; |
798 | if (!this.data.pre_arr) return false; | 1028 | if (!this.data.pre_arr) return false; |
799 | th.setData({ show_submit: 0,disabled_btn:0 }) | 1029 | th.setData({ show_submit: 0,disabled_btn:0 }) |
@@ -2466,6 +2696,13 @@ Page({ | @@ -2466,6 +2696,13 @@ Page({ | ||
2466 | 2696 | ||
2467 | //显示支付选择 | 2697 | //显示支付选择 |
2468 | show_pay: function () { | 2698 | show_pay: function () { |
2699 | + | ||
2700 | + //-- 服务卡项没有余额支付 -- | ||
2701 | + if(this.data.is_fwk){ | ||
2702 | + this.to_pay_type(0); | ||
2703 | + return false; | ||
2704 | + } | ||
2705 | + | ||
2469 | //不用钱直接支付 | 2706 | //不用钱直接支付 |
2470 | if (this.data.order_m <= 0) { | 2707 | if (this.data.order_m <= 0) { |
2471 | this.to_pay_type(1); | 2708 | this.to_pay_type(1); |
@@ -2516,14 +2753,21 @@ Page({ | @@ -2516,14 +2753,21 @@ Page({ | ||
2516 | tail_pay_type: ind,//0微信支付 1余额支付 | 2753 | tail_pay_type: ind,//0微信支付 1余额支付 |
2517 | }; | 2754 | }; |
2518 | 2755 | ||
2519 | - if (th.data.exp_type == 0 || th.data.exp_type==2 ) { | ||
2520 | - var index = th.data.index; | ||
2521 | - dd.shipping_code = th.data.wu_arr[index].code; | ||
2522 | - dd.shipping_name = th.data.wu_arr[index].name; | ||
2523 | - dd.shipping_price = parseFloat(th.data.exp_price); | ||
2524 | - dd.addressid = th.data.user_addr.address_id; | ||
2525 | - } | ||
2526 | 2756 | ||
2757 | + //尾款支付的网址 | ||
2758 | + var wk_url=oo.url + '/api/weshop/order/pay/payPresellWk'; | ||
2759 | + if(!th.data.is_fwk){ | ||
2760 | + if (th.data.exp_type == 0 || th.data.exp_type==2 ) { | ||
2761 | + var index = th.data.index; | ||
2762 | + dd.shipping_code = th.data.wu_arr[index].code; | ||
2763 | + dd.shipping_name = th.data.wu_arr[index].name; | ||
2764 | + dd.shipping_price = parseFloat(th.data.exp_price); | ||
2765 | + dd.addressid = th.data.user_addr.address_id; | ||
2766 | + } | ||
2767 | + }else{ | ||
2768 | + delete dd.exp_type; | ||
2769 | + wk_url=oo.url + '/api/weshop/order/pay/payPresellWkCard'; | ||
2770 | + } | ||
2527 | 2771 | ||
2528 | if(dd.exp_type==2){ | 2772 | if(dd.exp_type==2){ |
2529 | dd.lon=th.data.lon?th.data.lon:0; | 2773 | dd.lon=th.data.lon?th.data.lon:0; |
@@ -2563,7 +2807,7 @@ Page({ | @@ -2563,7 +2807,7 @@ Page({ | ||
2563 | 2807 | ||
2564 | console.log(JSON.stringify(dd)); | 2808 | console.log(JSON.stringify(dd)); |
2565 | wx.request({ | 2809 | wx.request({ |
2566 | - url: oo.url + '/api/weshop/order/pay/payPresellWk', | 2810 | + url: wk_url, |
2567 | data: JSON.stringify(dd), | 2811 | data: JSON.stringify(dd), |
2568 | method: 'POST', | 2812 | method: 'POST', |
2569 | header: { | 2813 | header: { |
packageC/pages/presell/cart/cart.wxml
@@ -31,11 +31,13 @@ | @@ -31,11 +31,13 @@ | ||
31 | <view>等待买家付尾款</view> | 31 | <view>等待买家付尾款</view> |
32 | <view class="fs22">请于{{days}}天{{hours}}小时{{minutes}}分{{seconds}}秒内付款完成,超时订单将自动取消</view> | 32 | <view class="fs22">请于{{days}}天{{hours}}小时{{minutes}}分{{seconds}}秒内付款完成,超时订单将自动取消</view> |
33 | </view> | 33 | </view> |
34 | - <view wx:if="{{wait_fh && order.order_status!=6}}"> | 34 | + <view wx:if="{{wait_fh && order.order_status!=6 && is_fwk==0}}"> |
35 | <view>等待商家发货</view> | 35 | <view>等待商家发货</view> |
36 | <view class="fs22">将在{{filters.format_time(send_time,1)}}后发货</view> | 36 | <view class="fs22">将在{{filters.format_time(send_time,1)}}后发货</view> |
37 | </view> | 37 | </view> |
38 | - <view wx:if="{{order.order_status==2}}"> | 38 | + |
39 | + | ||
40 | + <view wx:if="{{order.order_status==2 || (is_fwk==1 && order.pay_status==1)}}"> | ||
39 | <view>待评价</view> | 41 | <view>待评价</view> |
40 | <view>{{order.order_sn}}</view> | 42 | <view>{{order.order_sn}}</view> |
41 | </view> | 43 | </view> |
@@ -108,7 +110,7 @@ | @@ -108,7 +110,7 @@ | ||
108 | </view> | 110 | </view> |
109 | </view>--> | 111 | </view>--> |
110 | 112 | ||
111 | - <block wx:if="{{wait_wk && show_submit}}"> | 113 | + <block wx:if="{{wait_wk && show_submit && !is_fwk}}"> |
112 | <!-- 立即购买的时候 --> | 114 | <!-- 立即购买的时候 --> |
113 | <view class="tab-wrapper"> | 115 | <view class="tab-wrapper"> |
114 | <view hidden="{{distr_type==2}}" bindtap='set_wuliu' data-type='1' | 116 | <view hidden="{{distr_type==2}}" bindtap='set_wuliu' data-type='1' |
@@ -129,7 +131,7 @@ | @@ -129,7 +131,7 @@ | ||
129 | </view> | 131 | </view> |
130 | <!----要进行判断地址是否显示----> | 132 | <!----要进行判断地址是否显示----> |
131 | <view bindtap="enterAddressPage" class="user-mes mgt20" | 133 | <view bindtap="enterAddressPage" class="user-mes mgt20" |
132 | - hidden='{{exp_type==1 }}'> | 134 | + hidden='{{exp_type==1 || is_fwk }}'> |
133 | <!-----默认地址显示----> | 135 | <!-----默认地址显示----> |
134 | <block wx:if="{{user_addr!=null}}"> | 136 | <block wx:if="{{user_addr!=null}}"> |
135 | <view class="user-contact"> | 137 | <view class="user-contact"> |
@@ -158,7 +160,7 @@ | @@ -158,7 +160,7 @@ | ||
158 | </view> | 160 | </view> |
159 | </block> | 161 | </block> |
160 | 162 | ||
161 | - <view class="user-mes" style="margin-top: 20rpx" wx:if="{{order.pay_status==1 && order.exp_type==0}}"> | 163 | + <view class="user-mes" style="margin-top: 20rpx" wx:if="{{order.pay_status==1 && order.exp_type==0 && !is_fwk}}"> |
162 | <view class="user-contact" style=" margin-left: 20rpx"> | 164 | <view class="user-contact" style=" margin-left: 20rpx"> |
163 | {{order.consignee}}{{' '}}{{order.mobile}} | 165 | {{order.consignee}}{{' '}}{{order.mobile}} |
164 | </view> | 166 | </view> |
@@ -233,7 +235,7 @@ | @@ -233,7 +235,7 @@ | ||
233 | {{order.store_prom}} | 235 | {{order.store_prom}} |
234 | </view> | 236 | </view> |
235 | 237 | ||
236 | - <view class="xc-coupon-frame flex-center" data-bn="1" bindtap="open_coupon_list" data-pickid="{{pickup_id}}" | 238 | + <view class="xc-coupon-frame flex-center" data-bn="1" bindtap="open_coupon_list" data-pickid="{{pickup_id}}" hidden="{{is_fwk}}" |
237 | wx:if="{{(selected_quan_list && selected_quan_list.length>0) || get_by_quan_list!=null}}"> | 239 | wx:if="{{(selected_quan_list && selected_quan_list.length>0) || get_by_quan_list!=null}}"> |
238 | <view class="work-frame flex-space-between"> | 240 | <view class="work-frame flex-space-between"> |
239 | <view class="work"> | 241 | <view class="work"> |
@@ -253,7 +255,7 @@ | @@ -253,7 +255,7 @@ | ||
253 | </view> | 255 | </view> |
254 | </view> | 256 | </view> |
255 | 257 | ||
256 | - <view class="xc-coupon-frame" wx:if="{{bn_exp_type==0 && !is_default_logistics}}"> | 258 | + <view class="xc-coupon-frame" wx:if="{{bn_exp_type==0 && !is_default_logistics && !is_fwk}}"> |
257 | <view class="flex-space-between" style="padding: 20rpx 25rpx; font-size: 30rpx;"> | 259 | <view class="flex-space-between" style="padding: 20rpx 25rpx; font-size: 30rpx;"> |
258 | <view>选择物流</view> | 260 | <view>选择物流</view> |
259 | <view class="flex-vertical" bindtap="show_wu_arr" data-txt='index' style="margin-right: 12rpx;"> | 261 | <view class="flex-vertical" bindtap="show_wu_arr" data-txt='index' style="margin-right: 12rpx;"> |
@@ -308,7 +310,7 @@ | @@ -308,7 +310,7 @@ | ||
308 | 310 | ||
309 | 311 | ||
310 | <!-----使用佣金--- 佣金必须要小于尾款的支付的金额 ,同时订单优惠---> | 312 | <!-----使用佣金--- 佣金必须要小于尾款的支付的金额 ,同时订单优惠---> |
311 | - <view class="set-mes bdr_t-14" wx:if="{{goods.use_commission>0 && can_commission && util.get_sum(tail_pay,exp_price,order_prom_amount)>goods.use_commission}}"> | 313 | + <view class="set-mes bdr_t-14" wx:if="{{!is_fwk && goods.use_commission>0 && can_commission && util.get_sum(tail_pay,exp_price,order_prom_amount)>goods.use_commission}}"> |
312 | <view class="use-item" bindtap='set_bn_commission'> | 314 | <view class="use-item" bindtap='set_bn_commission'> |
313 | <icon color="{{bn_use_commission?'red':'gray'}}" size="16" type="success"></icon> | 315 | <icon color="{{bn_use_commission?'red':'gray'}}" size="16" type="success"></icon> |
314 | <view class="yu_er">使用佣金 :¥{{goods.use_commission}} </view> | 316 | <view class="yu_er">使用佣金 :¥{{goods.use_commission}} </view> |
@@ -412,8 +414,8 @@ | @@ -412,8 +414,8 @@ | ||
412 | data-order_id="{{order.order_id}}" | 414 | data-order_id="{{order.order_id}}" |
413 | data-url="/packageG/pages/user/express/express?order_id={{order.order_id}}">查看物流</navigator> | 415 | data-url="/packageG/pages/user/express/express?order_id={{order.order_id}}">查看物流</navigator> |
414 | 416 | ||
415 | - | ||
416 | - <block wx:if="{{order.return_btn==undefined && order.is_all_return!=1}}"> | 417 | + <!-- 服务卡项的不能申请退款 --> |
418 | + <block wx:if="{{order.return_btn==undefined && order.is_all_return!=1 && !is_fwk}}"> | ||
417 | <navigator class="tips-btn2" wx:if="{{(order.order_status==0&&order.pay_status==1) && !order.is_bedistri}}" url="/pages/order/refund_order/refund_order?order_id={{order.order_id}}">申请退款</navigator> | 419 | <navigator class="tips-btn2" wx:if="{{(order.order_status==0&&order.pay_status==1) && !order.is_bedistri}}" url="/pages/order/refund_order/refund_order?order_id={{order.order_id}}">申请退款</navigator> |
418 | <navigator class="tips-btn2" wx:if="{{(order.order_status==1&&order.pay_status==1) && !order.is_bedistri}}" url="/pages/order/refund_order/refund_order?order_id={{order.order_id}}">申请退款</navigator> | 420 | <navigator class="tips-btn2" wx:if="{{(order.order_status==1&&order.pay_status==1) && !order.is_bedistri}}" url="/pages/order/refund_order/refund_order?order_id={{order.order_id}}">申请退款</navigator> |
419 | </block> | 421 | </block> |
packageC/pages/presell/cart/cart2.js
@@ -4,6 +4,7 @@ var t = getApp(), app = t, a = t.request, e = require("../../../../utils/common. | @@ -4,6 +4,7 @@ var t = getApp(), app = t, a = t.request, e = require("../../../../utils/common. | ||
4 | var oo = t.globalData.setting, os = oo; | 4 | var oo = t.globalData.setting, os = oo; |
5 | var regeneratorRuntime = require('../../../../utils/runtime.js'); | 5 | var regeneratorRuntime = require('../../../../utils/runtime.js'); |
6 | var util_pay = require("../../../../utils/pay.js"); | 6 | var util_pay = require("../../../../utils/pay.js"); |
7 | +const t_pay = require("../../../../utils/pay2.js"); | ||
7 | 8 | ||
8 | 9 | ||
9 | Page({ | 10 | Page({ |
@@ -132,6 +133,8 @@ Page({ | @@ -132,6 +133,8 @@ Page({ | ||
132 | appoint_pick_keyid: '', | 133 | appoint_pick_keyid: '', |
133 | bconfig:null, | 134 | bconfig:null, |
134 | showFold:true, | 135 | showFold:true, |
136 | + | ||
137 | + is_fwk:0 //-- 判断是不是服务卡项订单 -- | ||
135 | }, | 138 | }, |
136 | 139 | ||
137 | 140 | ||
@@ -180,6 +183,12 @@ Page({ | @@ -180,6 +183,12 @@ Page({ | ||
180 | //判断是不是佣金抵扣 | 183 | //判断是不是佣金抵扣 |
181 | getApp().is_distribut(this); | 184 | getApp().is_distribut(this); |
182 | 185 | ||
186 | + var gg = to.get_b_now(); | ||
187 | + if(gg.fwk){ | ||
188 | + this.setData({is_fwk: 1}); | ||
189 | + } | ||
190 | + | ||
191 | + | ||
183 | }, | 192 | }, |
184 | onUnload: function () { | 193 | onUnload: function () { |
185 | this.setData({ isclose: 1 }) | 194 | this.setData({ isclose: 1 }) |
@@ -211,27 +220,54 @@ Page({ | @@ -211,27 +220,54 @@ Page({ | ||
211 | }) | 220 | }) |
212 | if(fy) return false; | 221 | if(fy) return false; |
213 | util_pay.set_fir(); | 222 | util_pay.set_fir(); |
223 | + t_pay.set_fir(); | ||
224 | + | ||
225 | + let err_url="/pages/user/order_list/order_list"; | ||
226 | + let ok_url="/pages/payment/pay_success/pay_success?type=2&order_sn=" + this.data.ok_order_sn; | ||
227 | + | ||
228 | + if(th.data.is_fwk){ | ||
229 | + err_url='/pages/user/order_list/order_list?index=2&tabindex=1'; | ||
230 | + ok_url="/pages/payment/pay_success/pay_success?card=1&order_id=" + this.data.order_id; | ||
231 | + } | ||
214 | 232 | ||
215 | //-- 通联的第三方支付的返回优化 -- | 233 | //-- 通联的第三方支付的返回优化 -- |
216 | - ut.is_pay_ok(th.data.ok_order_sn,"/pages/payment/pay_success/pay_success?type=2&order_sn=" + this.data.ok_order_sn, | ||
217 | - "/pages/user/order_list/order_list",function (){ | 234 | + ut.is_pay_ok(th.data.ok_order_sn,ok_url,err_url,function (){ |
218 | if(!th.data.ok_order_sn) return false; | 235 | if(!th.data.ok_order_sn) return false; |
219 | - getApp().request.promiseGet("/api/weshop/order/page", | ||
220 | - {data:{store_id:os.stoid,parent_sn:th.data.ok_order_sn}}).then(res=>{ | 236 | + |
237 | + let ord_url=''; | ||
238 | + let ord_req={}; | ||
239 | + | ||
240 | + //如果是服务卡项的时候 | ||
241 | + if(th.data.is_fwk){ | ||
242 | + ord_url="/api/weshop/recharge/user/page"; | ||
243 | + ord_req={store_id:os.stoid,order_sn:th.data.ok_order_sn,user_id:getApp().globalData.user_id}; | ||
244 | + }else{ | ||
245 | + ord_url="/api/weshop/order/page" | ||
246 | + ord_req={store_id:os.stoid,parent_sn:th.data.ok_order_sn}; | ||
247 | + } | ||
248 | + | ||
249 | + getApp().request.promiseGet(ord_url, | ||
250 | + {data:ord_req}).then(res=>{ | ||
251 | + | ||
252 | + console.log(ord_url); | ||
253 | + console.log(ord_req); | ||
254 | + console.log(res); | ||
255 | + | ||
256 | + | ||
221 | if(ut.ajax_ok(res)){ | 257 | if(ut.ajax_ok(res)){ |
222 | var item=res.data.data.pageData[0]; | 258 | var item=res.data.data.pageData[0]; |
223 | if(item.pay_status==1){ | 259 | if(item.pay_status==1){ |
224 | //支付支付,返回首页 | 260 | //支付支付,返回首页 |
225 | ut.m_toast('支付成功'); | 261 | ut.m_toast('支付成功'); |
226 | setTimeout(()=>{ | 262 | setTimeout(()=>{ |
227 | - getApp().re_to("/pages/payment/pay_success/pay_success?type=2&order_sn=" + th.data.ok_order_sn); | 263 | + getApp().re_to(ok_url); |
228 | },1000) | 264 | },1000) |
229 | 265 | ||
230 | }else{ | 266 | }else{ |
231 | //支付支付,返回首页 | 267 | //支付支付,返回首页 |
232 | ut.m_toast('支付失败'); | 268 | ut.m_toast('支付失败'); |
233 | setTimeout(()=>{ | 269 | setTimeout(()=>{ |
234 | - getApp().goto("/pages/index/index/index"); | 270 | + getApp().re_to(err_url); |
235 | },1000) | 271 | },1000) |
236 | } | 272 | } |
237 | } | 273 | } |
@@ -467,11 +503,58 @@ Page({ | @@ -467,11 +503,58 @@ Page({ | ||
467 | }, | 503 | }, |
468 | 504 | ||
469 | //-----获取立即购买的商品信息,入口---- | 505 | //-----获取立即购买的商品信息,入口---- |
470 | - get_buy_goods: function (e) { | 506 | + get_buy_goods:async function (e) { |
471 | var th = this; | 507 | var th = this; |
472 | th.data.gg = to.get_b_now(); | 508 | th.data.gg = to.get_b_now(); |
509 | + | ||
510 | + //定义变量 | ||
511 | + var gg = th.data.gg, act = null, prelist = null; | ||
512 | + var url = "/api/weshop/marketing/marketingPresellForm/get/" + os.stoid + "/" + gg.prom_id; | ||
513 | + await getApp().request.promiseGet(url, {}).then(res => { | ||
514 | + if (res.data.code == 0) { | ||
515 | + act = res.data.data; | ||
516 | + } | ||
517 | + }) | ||
518 | + if (!act) { | ||
519 | + wx.showToast({ title: "未找到活动", icon: 'none', duration: 3000 }); | ||
520 | + return false; | ||
521 | + } | ||
522 | + if (act.is_end == 1) { | ||
523 | + wx.showToast({ title: '活动已经结束', icon: 'none', duration: 3000 }); | ||
524 | + return false; | ||
525 | + } | ||
526 | + if (ut.gettimestamp() > act.end_time) { | ||
527 | + wx.showToast({ title: "活动定金支付时间已过期", icon: 'none', duration: 3000 }); | ||
528 | + return false; | ||
529 | + } | ||
530 | + | ||
531 | + var url = "/api/weshop/marketing/marketingPresellList/get/" + os.stoid + "/" + gg.presell_list_id; | ||
532 | + await getApp().request.promiseGet(url, {}).then(res => { | ||
533 | + if (res.data.code == 0) { | ||
534 | + prelist = res.data.data; | ||
535 | + } | ||
536 | + }) | ||
537 | + if (!prelist) { | ||
538 | + wx.showToast({ title: "未找到商品", icon: 'none', duration: 3000 }); | ||
539 | + return false; | ||
540 | + } | ||
541 | + | ||
542 | + //如果是服务卡是时候 | ||
543 | + if(gg.fwk){ | ||
544 | + th.get_card_detail(act, prelist,gg); | ||
545 | + } | ||
546 | + //如果是商品的时候 | ||
547 | + else{ | ||
548 | + th.get_goods_detail(act, prelist,gg); | ||
549 | + } | ||
550 | + }, | ||
551 | + | ||
552 | + //-- 获取到服务卡项的详情 -- | ||
553 | + get_card_detail(act, prelist,gg){ | ||
554 | + var th = this; | ||
473 | //--------如果goods_id一样,就是要立即购买----- | 555 | //--------如果goods_id一样,就是要立即购买----- |
474 | - getApp().request.get("/api/weshop/goods/get/" + oo.stoid + "/" + th.data.gg.goods_id, { | 556 | + var cd_url="/api/weshop/serviceCard/get/" + oo.stoid + "/" + th.data.gg.goods_id |
557 | + getApp().request.get(cd_url, { | ||
475 | success: async function (t) { | 558 | success: async function (t) { |
476 | var gd = t.data.data; | 559 | var gd = t.data.data; |
477 | if (!gd) return false; | 560 | if (!gd) return false; |
@@ -486,9 +569,52 @@ Page({ | @@ -486,9 +569,52 @@ Page({ | ||
486 | th.setData({show_same_city:1}) | 569 | th.setData({show_same_city:1}) |
487 | } | 570 | } |
488 | } | 571 | } |
489 | - | ||
490 | }) | 572 | }) |
573 | + } | ||
574 | + | ||
575 | + t.data.data.original_img = oo.imghost + t.data.data.imgUrl; | ||
576 | + t.data.data['buynum'] = th.data.gg.goods_num; | ||
577 | + t.data.data.prom_id=th.data.gg.prom_id; | ||
578 | + t.data.data.prom_type=8; | ||
579 | + t.data.data.goods_name=t.data.data.serviceName; | ||
580 | + | ||
581 | + | ||
582 | + //这个位置要拿活动的预售价 | ||
583 | + t.data.data.shop_price = prelist.presell_money; | ||
584 | + th.setData({ | ||
585 | + bn_goods: t.data.data, | ||
586 | + bn_pickname: gg.pick_name, | ||
587 | + bn_pick: gg.pick_id, | ||
588 | + act: act, | ||
589 | + }); | ||
590 | + | ||
591 | + //计算价格 | ||
592 | + th.calculatePrice2(); | ||
593 | + | ||
594 | + }, | ||
595 | + }); | ||
596 | + }, | ||
597 | + | ||
598 | + //-- 获取到服务卡项的详情 -- | ||
599 | + get_goods_detail(act, prelist,gg){ | ||
600 | + var th = this; | ||
601 | + //--------如果goods_id一样,就是要立即购买----- | ||
602 | + getApp().request.get("/api/weshop/goods/get/" + oo.stoid + "/" + th.data.gg.goods_id, { | ||
603 | + success: async function (t) { | ||
604 | + var gd = t.data.data; | ||
605 | + if (!gd) return false; | ||
606 | + | ||
607 | + //-- 如果商品有同城配送的参数的时候,一件代发商品不能显示同城配送按钮 -- | ||
608 | + if(gd.is_same_city && th.data.is_same_city && gd.whsle_id<=0){ | ||
491 | 609 | ||
610 | + await getApp().request.promiseGet("/api/weshop/pickup/get/"+os.stoid+"/"+th.data.gg.pick_id, {}).then(res=>{ | ||
611 | + if(res.data.code==0){ | ||
612 | + var pk=res.data.data; | ||
613 | + if(pk && pk.is_same_city){ | ||
614 | + th.setData({show_same_city:1}) | ||
615 | + } | ||
616 | + } | ||
617 | + }) | ||
492 | } | 618 | } |
493 | 619 | ||
494 | t.data.data.original_img = oo.imghost + t.data.data.original_img; | 620 | t.data.data.original_img = oo.imghost + t.data.data.original_img; |
@@ -578,38 +704,6 @@ Page({ | @@ -578,38 +704,6 @@ Page({ | ||
578 | } | 704 | } |
579 | } | 705 | } |
580 | 706 | ||
581 | - //定义变量 | ||
582 | - var gg = th.data.gg, act = null, prelist = null; | ||
583 | - var url = "/api/weshop/marketing/marketingPresellForm/get/" + os.stoid + "/" + gg.prom_id; | ||
584 | - await getApp().request.promiseGet(url, {}).then(res => { | ||
585 | - if (res.data.code == 0) { | ||
586 | - act = res.data.data; | ||
587 | - } | ||
588 | - }) | ||
589 | - if (!act) { | ||
590 | - wx.showToast({ title: "未找到活动", icon: 'none', duration: 3000 }); | ||
591 | - return false; | ||
592 | - } | ||
593 | - if (act.is_end == 1) { | ||
594 | - wx.showToast({ title: '活动已经结束', icon: 'none', duration: 3000 }); | ||
595 | - return false; | ||
596 | - } | ||
597 | - if (ut.gettimestamp() > act.end_time) { | ||
598 | - wx.showToast({ title: "活动定金支付时间已过期", icon: 'none', duration: 3000 }); | ||
599 | - return false; | ||
600 | - } | ||
601 | - | ||
602 | - var url = "/api/weshop/marketing/marketingPresellList/get/" + os.stoid + "/" + gg.presell_list_id; | ||
603 | - await getApp().request.promiseGet(url, {}).then(res => { | ||
604 | - if (res.data.code == 0) { | ||
605 | - prelist = res.data.data; | ||
606 | - } | ||
607 | - }) | ||
608 | - if (!prelist) { | ||
609 | - wx.showToast({ title: "未找到商品", icon: 'none', duration: 3000 }); | ||
610 | - return false; | ||
611 | - } | ||
612 | - | ||
613 | 707 | ||
614 | //如果有开启佣金抵扣,同时会员是分销商的时候 | 708 | //如果有开启佣金抵扣,同时会员是分销商的时候 |
615 | if(getApp().globalData.userInfo.is_distribut | 709 | if(getApp().globalData.userInfo.is_distribut |
@@ -652,16 +746,13 @@ Page({ | @@ -652,16 +746,13 @@ Page({ | ||
652 | th.data.check_quan_ware_list = t.data.data.erpwareid + ""; | 746 | th.data.check_quan_ware_list = t.data.data.erpwareid + ""; |
653 | } | 747 | } |
654 | 748 | ||
655 | - | ||
656 | //计算价格 | 749 | //计算价格 |
657 | th.calculatePrice2(); | 750 | th.calculatePrice2(); |
658 | //获取优惠券,如果有券的钱,就调用 | 751 | //获取优惠券,如果有券的钱,就调用 |
659 | if (th.data.ckeck_quan_price > 0) th.get_buy_now_quan(); | 752 | if (th.data.ckeck_quan_price > 0) th.get_buy_now_quan(); |
660 | 753 | ||
661 | - | ||
662 | }, | 754 | }, |
663 | }); | 755 | }); |
664 | - | ||
665 | }, | 756 | }, |
666 | 757 | ||
667 | //---------------检查是否有收货地址------------------- | 758 | //---------------检查是否有收货地址------------------- |
@@ -820,8 +911,8 @@ Page({ | @@ -820,8 +911,8 @@ Page({ | ||
820 | }) | 911 | }) |
821 | } | 912 | } |
822 | 913 | ||
823 | - //-----------当地址不为空,且是物流时,计算物流费用,并同时商品不是优惠活动的包邮---------- | ||
824 | - if (th.data.user_addr != null && th.data.bn_exp_type == 0 && good.is_past != 1) { | 914 | + //-----------当地址不为空,且是物流时,计算物流费用,并同时商品不是优惠活动的包邮,同时商品购买时候,服务卡项购买不计算运费---------- |
915 | + if (th.data.user_addr != null && th.data.bn_exp_type == 0 && good.is_past != 1 && act.goods_type==0) { | ||
825 | //看是不是有调用过包邮券 | 916 | //看是不是有调用过包邮券 |
826 | if (!th.data.isget_by_quan[th.data.bn_pick] && good.is_xz_yh != 1) { | 917 | if (!th.data.isget_by_quan[th.data.bn_pick] && good.is_xz_yh != 1) { |
827 | var condition = allpice - cut_price - quan_price; | 918 | var condition = allpice - cut_price - quan_price; |
@@ -1171,8 +1262,168 @@ Page({ | @@ -1171,8 +1262,168 @@ Page({ | ||
1171 | 1262 | ||
1172 | }, | 1263 | }, |
1173 | 1264 | ||
1265 | + | ||
1266 | + //-- 服务卡项的支付的下一步 -- | ||
1267 | + submitForm_card_next: async function() { | ||
1268 | + | ||
1269 | + if (this.data.is_summit_ing == 1) return false; //--提交中退出-- | ||
1270 | + this.data.is_summit_ing = 1; | ||
1271 | + var th = this,pdata = new Array(); | ||
1272 | + | ||
1273 | + var item = { | ||
1274 | + 'user_id': to.globalData.user_id, | ||
1275 | + 'account': th.data.formData.order_amount, //使用余额 | ||
1276 | + 'store_id': oo.stoid, //商家 | ||
1277 | + 'list': new Array(), | ||
1278 | + }; | ||
1279 | + | ||
1280 | + //判断是不是购物车购买还是立即购买 | ||
1281 | + var gg = th.data.gg; | ||
1282 | + if (!gg.pick_id) { | ||
1283 | + getApp().showWarning("未找到门店"); | ||
1284 | + return false; | ||
1285 | + } | ||
1286 | + var goods = { | ||
1287 | + 'card_id': th.data.bn_goods.id, | ||
1288 | + 'itemid': th.data.bn_goods.erpItemID, | ||
1289 | + 'qty': gg.goods_num, | ||
1290 | + 'price': th.data.bn_goods.shop_price, | ||
1291 | + // 'price': th.data.formData.order_amount, | ||
1292 | + 'pickup_id': gg.pick_id, | ||
1293 | + 'pickup_keyid': gg.keyid, | ||
1294 | + 'prom_type': 8, //促销活动类型 | ||
1295 | + 'prom_id': this.data.act.id, //促销活动id | ||
1296 | + }; | ||
1297 | + | ||
1298 | + | ||
1299 | + if(getApp().globalData.skinface_id){ | ||
1300 | + goods.skinface_id=getApp().globalData.skinface_id; | ||
1301 | + } | ||
1302 | + | ||
1303 | + if(this.data.postdata && this.data.postdata.is_pd_normal==1){ | ||
1304 | + goods.is_pd_normal=1; | ||
1305 | + } | ||
1306 | + | ||
1307 | + | ||
1308 | + //--导购分享过来的id-- | ||
1309 | + if (gg.guide_id) { | ||
1310 | + goods.guide_id = gg.guide_id; | ||
1311 | + goods.guide_type = gg.guide_type; | ||
1312 | + //调用接口判断是不是会员 | ||
1313 | + await getApp().request.promiseGet("/api/weshop/shoppingGuide/getId/" + oo.stoid + "/" + gg.guide_id, {}).then( | ||
1314 | + res => { | ||
1315 | + if (res.data.code == 0) { | ||
1316 | + goods.guide_name = res.data.data.salesman; | ||
1317 | + goods.guide_sn = res.data.data.salesman_no; | ||
1318 | + } | ||
1319 | + }) | ||
1320 | + } | ||
1321 | + | ||
1322 | + if(gg.groupchat_id){ | ||
1323 | + goods.groupchat_id=gg.groupchat_id | ||
1324 | + } | ||
1325 | + item.list.push(goods); | ||
1326 | + | ||
1327 | + pdata = item; | ||
1328 | + var str = JSON.stringify(pdata); | ||
1329 | + console.log("支付数据"); | ||
1330 | + console.log(str); | ||
1331 | + //return false; | ||
1332 | + wx.showLoading({ | ||
1333 | + title: "加载中" | ||
1334 | + }); | ||
1335 | + wx.request({ | ||
1336 | + url: oo.url + '/api/weshop/recharge/saveRecharge', | ||
1337 | + data: str, | ||
1338 | + method: 'POST', | ||
1339 | + header: { | ||
1340 | + 'content-type': 'application/json' | ||
1341 | + }, // 设置请求的 header | ||
1342 | + success: function(res) { | ||
1343 | + | ||
1344 | + wx.hideLoading(); | ||
1345 | + if (res.statusCode == 200) { | ||
1346 | + var data = res.data; | ||
1347 | + if (data.code == 0) { | ||
1348 | + th.data.order_id = data.data.order_id; | ||
1349 | + th.data.ok_order_sn = data.data.order_sn; | ||
1350 | + // console.log('myyyyyyyyyyyyyyyyyy', data.data); | ||
1351 | + if (th.data.is_cart) { | ||
1352 | + var list = th.data.cartlist_y; | ||
1353 | + for (var i = 0; i < list.length; i++) { | ||
1354 | + //删除购物车 | ||
1355 | + a.delete("/api/weshop/cartService/del/" + oo.stoid + "/" + list[i].id, {}); | ||
1356 | + } | ||
1357 | + } | ||
1358 | + var order_amount = pdata.account; | ||
1359 | + //要进行判断,如果是用微信支付,就要跳转到支付界面 | ||
1360 | + if (order_amount > 0) { | ||
1361 | + th.setData({ | ||
1362 | + isclose: 0 | ||
1363 | + }); | ||
1364 | + | ||
1365 | + t_pay.set_pay_url("/api/weshop/order/pay/createRechargeOrder") | ||
1366 | + t_pay.pay( | ||
1367 | + { | ||
1368 | + parentSn: data.data.order_sn, | ||
1369 | + store_id: oo.stoid | ||
1370 | + },function (){ | ||
1371 | + wx.showToast({ | ||
1372 | + title: '购买成功', | ||
1373 | + icon: 'success', | ||
1374 | + duration: 2000 | ||
1375 | + }); | ||
1376 | + setTimeout(function () { | ||
1377 | + wx.reLaunch({ | ||
1378 | + url: "/pages/payment/pay_success/pay_success?card=1&order_id=" + th.data.order_id, | ||
1379 | + }) | ||
1380 | + }, 1000) | ||
1381 | + | ||
1382 | + },function (e){ | ||
1383 | + | ||
1384 | + console.log('kkkkkkk'); | ||
1385 | + | ||
1386 | + wx.showToast({ | ||
1387 | + title: e, | ||
1388 | + icon: 'none', | ||
1389 | + duration: 2000 | ||
1390 | + }); | ||
1391 | + | ||
1392 | + setTimeout(function () { | ||
1393 | + wx.reLaunch({ | ||
1394 | + url: "/pages/user/order_list/order_list?index=2&tabindex=1", | ||
1395 | + }) | ||
1396 | + }, 1000) | ||
1397 | + | ||
1398 | + } | ||
1399 | + ) | ||
1400 | + } | ||
1401 | + } else { | ||
1402 | + th.data.is_summit_ing = 0; //是否提交中 | ||
1403 | + getApp().confirmBox(data.msg); | ||
1404 | + } | ||
1405 | + } else { | ||
1406 | + th.data.is_summit_ing = 0; //是否提交中 | ||
1407 | + console.log("index.js wx.request CheckCallUser statusCode" + res.statusCode); | ||
1408 | + } | ||
1409 | + }, | ||
1410 | + fail: function() { | ||
1411 | + th.data.is_summit_ing = 0; //是否提交中 | ||
1412 | + wx.hideLoading(); | ||
1413 | + console.log("index.js wx.request CheckCallUser fail"); | ||
1414 | + }, | ||
1415 | + complete: function() {} | ||
1416 | + }) | ||
1417 | + }, | ||
1418 | + | ||
1174 | //--------------------提交订单----------------------- | 1419 | //--------------------提交订单----------------------- |
1175 | async submitForm(t) { | 1420 | async submitForm(t) { |
1421 | + | ||
1422 | + if(this.data.is_fwk==1){ | ||
1423 | + this.submitForm_card_next(); | ||
1424 | + return false; | ||
1425 | + } | ||
1426 | + | ||
1176 | var sub_value = t; | 1427 | var sub_value = t; |
1177 | 1428 | ||
1178 | if (this.data.is_summit_ing == 1) return false; //--提交中退出-- | 1429 | if (this.data.is_summit_ing == 1) return false; //--提交中退出-- |
@@ -2916,6 +3167,18 @@ Page({ | @@ -2916,6 +3167,18 @@ Page({ | ||
2916 | var index = e.currentTarget.dataset.index; | 3167 | var index = e.currentTarget.dataset.index; |
2917 | var txt = "cartlist[" + index + "].focus"; | 3168 | var txt = "cartlist[" + index + "].focus"; |
2918 | this.setData({ [txt]: 0 }) | 3169 | this.setData({ [txt]: 0 }) |
3170 | + }, | ||
3171 | + | ||
3172 | + go_detail:function(e){ | ||
3173 | + var gid=e.currentTarget.dataset.gid; | ||
3174 | + var act=this.data.act; | ||
3175 | + var url=''; | ||
3176 | + if(this.data.is_fwk){ | ||
3177 | + url = `/packageC/pages/presell/cardInfo/goodsInfo?goods_id=${gid}&prom_id=${act.id}`; | ||
3178 | + }else{ | ||
3179 | + url= "/pages/goods/goodsInfo/goodsInfo?goods_id="+gid; | ||
3180 | + } | ||
3181 | + getApp().goto(url); | ||
2919 | } | 3182 | } |
2920 | 3183 | ||
2921 | 3184 |
packageC/pages/presell/cart/cart2.wxml
@@ -6,7 +6,7 @@ | @@ -6,7 +6,7 @@ | ||
6 | <view class="container"> | 6 | <view class="container"> |
7 | 7 | ||
8 | <!-- 立即购买的时候 --> | 8 | <!-- 立即购买的时候 --> |
9 | - <view class="tab-container" wx:if="{{show_submit}}"> | 9 | + <view class="tab-container" wx:if="{{show_submit && act.goods_type==0 && !is_fwk}}"> |
10 | <view class="tab-wrapper"> | 10 | <view class="tab-wrapper"> |
11 | <view hidden="{{bn_t_exp_t==2}}" bindtap='setexptype' data-t='1' class="tab {{bn_exp_type == 1? 'active':''}}" | 11 | <view hidden="{{bn_t_exp_t==2}}" bindtap='setexptype' data-t='1' class="tab {{bn_exp_type == 1? 'active':''}}" |
12 | data-txt='cartlist[0].exp_type' data-wl_txt='cartlist[0].wind' data-index="{{index}}" >门店自提</view> | 12 | data-txt='cartlist[0].exp_type' data-wl_txt='cartlist[0].wind' data-index="{{index}}" >门店自提</view> |
@@ -22,7 +22,7 @@ | @@ -22,7 +22,7 @@ | ||
22 | </view> | 22 | </view> |
23 | 23 | ||
24 | <!--要进行判断地址是否显示----> | 24 | <!--要进行判断地址是否显示----> |
25 | - <view bindtap="enterAddressPage" class="user-mes mgt20" hidden='{{bn_exp_type==1 && is_b_now==1}}'> | 25 | + <view bindtap="enterAddressPage" class="user-mes mgt20" wx:if="{{!is_fwk}}" hidden='{{bn_exp_type==1 && is_b_now==1 && act.goods_type==0}}'> |
26 | <!---默认地址显示------> | 26 | <!---默认地址显示------> |
27 | <block wx:if="{{user_addr!=null}}"> | 27 | <block wx:if="{{user_addr!=null}}"> |
28 | <view class="user-contact"> | 28 | <view class="user-contact"> |
@@ -62,7 +62,7 @@ | @@ -62,7 +62,7 @@ | ||
62 | <view class="goods-img"> | 62 | <view class="goods-img"> |
63 | <image class="wh100 bdr14" src="{{bn_goods.original_img}}" binderror='cart_set_err' data-err="bn_goods.original_img"></image> | 63 | <image class="wh100 bdr14" src="{{bn_goods.original_img}}" binderror='cart_set_err' data-err="bn_goods.original_img"></image> |
64 | </view> | 64 | </view> |
65 | - <navigator class="order-cont" url="/pages/goods/goodsInfo/goodsInfo?goods_id={{bn_goods.goods_id}}"> | 65 | + <navigator catchtap="go_detail" class="order-cont" data-gid="{{bn_goods.goods_id}}"> |
66 | <view class="goods-name ellipsis-2">{{bn_goods.goods_name}}</view> | 66 | <view class="goods-name ellipsis-2">{{bn_goods.goods_name}}</view> |
67 | <!-- 商品属性 --> | 67 | <!-- 商品属性 --> |
68 | <view class="flex-vertical fs28 xc-ash color-gray n_guige"> | 68 | <view class="flex-vertical fs28 xc-ash color-gray n_guige"> |
@@ -150,7 +150,8 @@ | @@ -150,7 +150,8 @@ | ||
150 | <icon color="#f23030" size="16" type="info"></icon>{{order.store_prom}} | 150 | <icon color="#f23030" size="16" type="info"></icon>{{order.store_prom}} |
151 | </view> | 151 | </view> |
152 | 152 | ||
153 | - <view class="xc-coupon-frame flex-center" data-bn="1" bindtap="open_coupon_list" data-pickid="{{bn_pick}}" wx:if="{{(selected_quan_list && selected_quan_list.length>0) || get_by_quan_list!=null}}"> | 153 | + <view class="xc-coupon-frame flex-center" data-bn="1" bindtap="open_coupon_list" data-pickid="{{bn_pick}}" hidden="{{is_fwk}}" |
154 | + wx:if="{{(selected_quan_list && selected_quan_list.length>0) || get_by_quan_list!=null}}"> | ||
154 | <view class="work-frame flex-space-between"> | 155 | <view class="work-frame flex-space-between"> |
155 | <view class="work"> | 156 | <view class="work"> |
156 | 优惠券 <text class="quan_num_show">{{(selected_quan_list?selected_quan_list.length:0)+ (get_by_quan_list?get_by_quan_list.length:0)}}张可用</text> | 157 | 优惠券 <text class="quan_num_show">{{(selected_quan_list?selected_quan_list.length:0)+ (get_by_quan_list?get_by_quan_list.length:0)}}张可用</text> |
@@ -166,7 +167,7 @@ | @@ -166,7 +167,7 @@ | ||
166 | </view> | 167 | </view> |
167 | </view> | 168 | </view> |
168 | 169 | ||
169 | - <view class="xc-coupon-frame" wx:if="{{bn_exp_type==0 && !is_default_logistics}}"> | 170 | + <view class="xc-coupon-frame" wx:if="{{bn_exp_type==0 && !is_default_logistics && !is_fwk}}"> |
170 | <view class="flex-space-between" style="padding: 20rpx 25rpx; font-size: 30rpx;"> | 171 | <view class="flex-space-between" style="padding: 20rpx 25rpx; font-size: 30rpx;"> |
171 | <view>选择物流</view> | 172 | <view>选择物流</view> |
172 | <view class="flex-vertical" bindtap="show_wu_arr" data-txt='index' style="margin-right: 12rpx;"> | 173 | <view class="flex-vertical" bindtap="show_wu_arr" data-txt='index' style="margin-right: 12rpx;"> |
@@ -214,7 +215,7 @@ | @@ -214,7 +215,7 @@ | ||
214 | </view> | 215 | </view> |
215 | 216 | ||
216 | <!-----使用佣金------> | 217 | <!-----使用佣金------> |
217 | - <view class="set-mes bdr_t-14" wx:if="{{bn_goods.use_commission>0 && can_commission}}"> | 218 | + <view class="set-mes bdr_t-14" wx:if="{{bn_goods.use_commission>0 && can_commission && !is_fwk}}"> |
218 | <view class="use-item" bindtap='set_bn_commission'> | 219 | <view class="use-item" bindtap='set_bn_commission'> |
219 | <icon color="{{bn_use_commission?'red':'gray'}}" size="16" type="success"></icon> | 220 | <icon color="{{bn_use_commission?'red':'gray'}}" size="16" type="success"></icon> |
220 | <view class="yu_er">使用佣金 :¥{{bn_goods.use_commission}} </view> | 221 | <view class="yu_er">使用佣金 :¥{{bn_goods.use_commission}} </view> |
@@ -223,7 +224,7 @@ | @@ -223,7 +224,7 @@ | ||
223 | 224 | ||
224 | 225 | ||
225 | <!-----使用余额------> | 226 | <!-----使用余额------> |
226 | - <view class="set-mes bdr_t-14" wx:if="{{yuer>0}}"> | 227 | + <view class="set-mes bdr_t-14" wx:if="{{yuer>0 && !is_fwk}}"> |
227 | <view class="use-item" bindtap='set_bn_useyuer'> | 228 | <view class="use-item" bindtap='set_bn_useyuer'> |
228 | <icon color="{{bn_use_money?'red':'gray'}}" size="16" type="success"></icon> | 229 | <icon color="{{bn_use_money?'red':'gray'}}" size="16" type="success"></icon> |
229 | <view class="yu_er">使用余额 :¥{{yuer}} </view> | 230 | <view class="yu_er">使用余额 :¥{{yuer}} </view> |
packageC/pages/presell/cart/cart2_pre.js
@@ -3,6 +3,7 @@ var t = getApp(), app = t, a = t.request, ut = require("../../../../utils/util.j | @@ -3,6 +3,7 @@ var t = getApp(), app = t, a = t.request, ut = require("../../../../utils/util.j | ||
3 | var os = t.globalData.setting; | 3 | var os = t.globalData.setting; |
4 | var regeneratorRuntime = require('../../../../utils/runtime.js'); | 4 | var regeneratorRuntime = require('../../../../utils/runtime.js'); |
5 | var util_pay = require("../../../../utils/pay.js"); | 5 | var util_pay = require("../../../../utils/pay.js"); |
6 | +const t_pay = require("../../../../utils/pay2.js"); | ||
6 | 7 | ||
7 | Page({ | 8 | Page({ |
8 | data: { | 9 | data: { |
@@ -57,6 +58,8 @@ Page({ | @@ -57,6 +58,8 @@ Page({ | ||
57 | is_pre_cut:0, //是否可以使用预存 0是不可以1的可以 | 58 | is_pre_cut:0, //是否可以使用预存 0是不可以1的可以 |
58 | bconfig: null, | 59 | bconfig: null, |
59 | showFold:true, | 60 | showFold:true, |
61 | + | ||
62 | + is_fwk:0, //判断服务卡项的类型 | ||
60 | }, | 63 | }, |
61 | onReady() { | 64 | onReady() { |
62 | setTimeout(() => { | 65 | setTimeout(() => { |
@@ -93,6 +96,12 @@ Page({ | @@ -93,6 +96,12 @@ Page({ | ||
93 | }); | 96 | }); |
94 | }, 1); | 97 | }, 1); |
95 | 98 | ||
99 | + var gg = getApp().get_b_now(); | ||
100 | + debugger; | ||
101 | + if(gg.fwk){ | ||
102 | + this.setData({is_fwk: 1}); | ||
103 | + } | ||
104 | + | ||
96 | }, | 105 | }, |
97 | onUnload: function () { this.setData({ isclose: 1 }) }, | 106 | onUnload: function () { this.setData({ isclose: 1 }) }, |
98 | 107 | ||
@@ -208,6 +217,48 @@ Page({ | @@ -208,6 +217,48 @@ Page({ | ||
208 | wx.showToast({ title: "未找到商品", icon: 'none', duration: 3000 }); | 217 | wx.showToast({ title: "未找到商品", icon: 'none', duration: 3000 }); |
209 | return false; | 218 | return false; |
210 | } | 219 | } |
220 | + | ||
221 | + if(gg.fwk){ | ||
222 | + th.get_card_detail(prelist,act,gg); | ||
223 | + }else{ | ||
224 | + th.get_goods_detail(prelist,act,gg); | ||
225 | + } | ||
226 | + | ||
227 | + }, | ||
228 | + | ||
229 | + //获取服务卡项的详情 | ||
230 | + get_card_detail(prelist,act,gg){ | ||
231 | + var th=this; | ||
232 | + //--------如果goods_id一样,就是要立即购买----- | ||
233 | + var cd_url="/api/weshop/serviceCard/get/" + os.stoid + "/" + gg.goods_id | ||
234 | + //-- 调用商品 -- | ||
235 | + a.get(cd_url, { | ||
236 | + success: function (t) { | ||
237 | + var gd = t.data.data; | ||
238 | + if (!gd) return false; | ||
239 | + | ||
240 | + t.data.data.original_img = os.imghost + t.data.data.imgUrl; | ||
241 | + t.data.data['buynum'] = gg.goods_num; | ||
242 | + t.data.data.prom_type=8; | ||
243 | + t.data.data.prom_id=gg.prom_id; | ||
244 | + t.data.data.goods_name=t.data.data.serviceName; | ||
245 | + | ||
246 | + var distr_t = 0, et = 1; | ||
247 | + | ||
248 | + t.data.data.shop_price = prelist.presell_money; | ||
249 | + th.setData({ | ||
250 | + bn_goods: t.data.data, bn_pickname: gg.pick_name, prelist: prelist, act: act, | ||
251 | + bn_pick: gg.pick_id, bn_t_exp_t: distr_t, bn_exp_type: et,fwk:1 | ||
252 | + }); | ||
253 | + //计算价格 | ||
254 | + th.calculatePrice2(); | ||
255 | + } | ||
256 | + }); | ||
257 | + }, | ||
258 | + | ||
259 | + //获取商品的详情 | ||
260 | + get_goods_detail(prelist,act,gg){ | ||
261 | + var th=this; | ||
211 | //-- 调用商品 -- | 262 | //-- 调用商品 -- |
212 | a.get("/api/weshop/goods/get/" + os.stoid + "/" + gg.goods_id, { | 263 | a.get("/api/weshop/goods/get/" + os.stoid + "/" + gg.goods_id, { |
213 | success: function (t) { | 264 | success: function (t) { |
@@ -281,9 +332,18 @@ Page({ | @@ -281,9 +332,18 @@ Page({ | ||
281 | //----------子页返回父页触发---------- | 332 | //----------子页返回父页触发---------- |
282 | onShow: function () { | 333 | onShow: function () { |
283 | 334 | ||
284 | - var fy=ut.fy_back("/pages/user/order_list/order_list",1); | 335 | + |
336 | + let o_list="/pages/user/order_list/order_list"; | ||
337 | + if(this.data.is_fwk){ | ||
338 | + o_list='/pages/user/order_list/order_list?index=2&tabindex=1'; | ||
339 | + } | ||
340 | + | ||
341 | + var fy=ut.fy_back(o_list,1); | ||
285 | if(fy) return false; | 342 | if(fy) return false; |
343 | + | ||
286 | util_pay.set_fir(); | 344 | util_pay.set_fir(); |
345 | + t_pay.set_fir(); | ||
346 | + | ||
287 | var th = this; | 347 | var th = this; |
288 | //判断是不是第一次进入 | 348 | //判断是不是第一次进入 |
289 | if(this.data.fir_in){ | 349 | if(this.data.fir_in){ |
@@ -293,29 +353,55 @@ Page({ | @@ -293,29 +353,55 @@ Page({ | ||
293 | //-- 支付完成后的跳转的时间 -- | 353 | //-- 支付完成后的跳转的时间 -- |
294 | var ok_url = "/packageC/pages/presell/cart/cart?order_sn=" +this.data.ok_order_sn; | 354 | var ok_url = "/packageC/pages/presell/cart/cart?order_sn=" +this.data.ok_order_sn; |
295 | var err_url="/pages/user/order_list/order_list"; | 355 | var err_url="/pages/user/order_list/order_list"; |
356 | + if(this.data.is_fwk){ | ||
357 | + err_url='/pages/user/order_list/order_list?index=2&tabindex=1'; | ||
358 | + ok_url+="&is_fwk=1"; | ||
359 | + } | ||
360 | + | ||
296 | //-- 通联的第三方支付的返回优化 -- | 361 | //-- 通联的第三方支付的返回优化 -- |
297 | ut.is_pay_ok(th.data.ok_order_sn,ok_url,err_url,function (){ | 362 | ut.is_pay_ok(th.data.ok_order_sn,ok_url,err_url,function (){ |
298 | if(!th.data.ok_order_sn) return false; | 363 | if(!th.data.ok_order_sn) return false; |
299 | - getApp().request.promiseGet("/api/weshop/order/page", | ||
300 | - {data:{store_id:os.stoid,parent_sn:th.data.ok_order_sn}}).then(res=>{ | ||
301 | - if(ut.ajax_ok(res)){ | ||
302 | - var item=res.data.data.pageData[0]; | ||
303 | - if(item.pay_time){ | ||
304 | - //支付支付,返回首页 | ||
305 | - ut.m_toast('支付成功'); | ||
306 | - setTimeout(()=>{ | ||
307 | - getApp().re_to(ok_url); | ||
308 | - },1000) | ||
309 | - | ||
310 | - }else{ | ||
311 | - //支付支付,返回首页 | ||
312 | - ut.m_toast('支付失败'); | ||
313 | - setTimeout(()=>{ | ||
314 | - getApp().re_to(err_url); | ||
315 | - },1000) | ||
316 | - } | 364 | + |
365 | + let ord_url=''; | ||
366 | + let ord_req={}; | ||
367 | + | ||
368 | + //如果是服务卡项的时候 | ||
369 | + if(th.data.is_fwk){ | ||
370 | + ord_url="/api/weshop/recharge/user/page"; | ||
371 | + ord_req={store_id:os.stoid,order_sn:th.data.ok_order_sn,user_id:getApp().globalData.user_id}; | ||
372 | + }else{ | ||
373 | + ord_url="/api/weshop/order/page"; | ||
374 | + ord_req={store_id:os.stoid,parent_sn:th.data.ok_order_sn}; | ||
375 | + } | ||
376 | + | ||
377 | + | ||
378 | + console.log('onshow-py-1111'); | ||
379 | + console.log(ord_url); | ||
380 | + console.log(ord_req); | ||
381 | + | ||
382 | + | ||
383 | + getApp().request.promiseGet(ord_url, | ||
384 | + {data:ord_req}).then(res=>{ | ||
385 | + if(ut.ajax_ok(res)){ | ||
386 | + var item=res.data.data.pageData[0]; | ||
387 | + if(item.pay_time){ | ||
388 | + //支付支付,返回首页 | ||
389 | + ut.m_toast('支付成功'); | ||
390 | + setTimeout(()=>{ | ||
391 | + getApp().re_to(ok_url); | ||
392 | + },1000) | ||
393 | + | ||
394 | + }else{ | ||
395 | + //支付支付,返回首页 | ||
396 | + ut.m_toast('支付失败'); | ||
397 | + setTimeout(()=>{ | ||
398 | + getApp().re_to(err_url); | ||
399 | + },1000) | ||
317 | } | 400 | } |
401 | + } | ||
318 | }) | 402 | }) |
403 | + | ||
404 | + | ||
319 | }); | 405 | }); |
320 | } | 406 | } |
321 | 407 | ||
@@ -771,7 +857,155 @@ Page({ | @@ -771,7 +857,155 @@ Page({ | ||
771 | 857 | ||
772 | }, | 858 | }, |
773 | 859 | ||
774 | - // -- 支付的下一步 -- | 860 | + |
861 | + //-- 服务卡项的支付的下一步 -- | ||
862 | + submitForm_card_next: async function() { | ||
863 | + | ||
864 | + if (this.data.is_summit_ing == 1) return false; //--提交中退出-- | ||
865 | + this.data.is_summit_ing = 1; | ||
866 | + var th = this,pdata = new Array(); | ||
867 | + | ||
868 | + var item = { | ||
869 | + 'user_id': getApp().globalData.user_id, | ||
870 | + 'account': th.data.formData.order_amount, //使用余额 | ||
871 | + 'store_id': os.stoid, //商家 | ||
872 | + 'list': new Array(), | ||
873 | + }; | ||
874 | + | ||
875 | + //判断是不是购物车购买还是立即购买 | ||
876 | + var gg = app.get_b_now(); | ||
877 | + if (!gg.pick_id) { | ||
878 | + getApp().showWarning("未找到门店"); | ||
879 | + return false; | ||
880 | + } | ||
881 | + var goods = { | ||
882 | + 'card_id': th.data.bn_goods.id, | ||
883 | + 'itemid': th.data.bn_goods.erpItemID, | ||
884 | + 'qty': gg.goods_num, | ||
885 | + 'price': th.data.bn_goods.shop_price, | ||
886 | + // 'price': th.data.formData.order_amount, | ||
887 | + 'pickup_id': gg.pick_id, | ||
888 | + 'pickup_keyid': gg.keyid, | ||
889 | + 'prom_type': this.data.postdata.prom_type, //促销活动类型 | ||
890 | + 'prom_id': this.data.postdata.prom_id, //促销活动id | ||
891 | + }; | ||
892 | + | ||
893 | + if(getApp().globalData.skinface_id){ | ||
894 | + goods.skinface_id=getApp().globalData.skinface_id; | ||
895 | + } | ||
896 | + | ||
897 | + if(this.data.postdata && this.data.postdata.is_pd_normal==1){ | ||
898 | + goods.is_pd_normal=1; | ||
899 | + } | ||
900 | + | ||
901 | + | ||
902 | + //--导购分享过来的id-- | ||
903 | + if (gg.guide_id) { | ||
904 | + goods.guide_id = gg.guide_id; | ||
905 | + goods.guide_type = gg.guide_type; | ||
906 | + //调用接口判断是不是会员 | ||
907 | + await getApp().request.promiseGet("/api/weshop/shoppingGuide/getId/" + os.stoid + "/" + gg.guide_id, {}).then( | ||
908 | + res => { | ||
909 | + if (res.data.code == 0) { | ||
910 | + goods.guide_name = res.data.data.salesman; | ||
911 | + goods.guide_sn = res.data.data.salesman_no; | ||
912 | + } | ||
913 | + }) | ||
914 | + } | ||
915 | + | ||
916 | + if(gg.groupchat_id){ | ||
917 | + goods.groupchat_id=gg.groupchat_id | ||
918 | + } | ||
919 | + item.list.push(goods); | ||
920 | + | ||
921 | + pdata = item; | ||
922 | + var str = JSON.stringify(pdata); | ||
923 | + console.log("支付数据"); | ||
924 | + console.log(str); | ||
925 | + //return false; | ||
926 | + wx.showLoading({ | ||
927 | + title: "加载中" | ||
928 | + }); | ||
929 | + wx.request({ | ||
930 | + url: os.url + '/api/weshop/recharge/saveRecharge', | ||
931 | + data: str, | ||
932 | + method: 'POST', | ||
933 | + header: { | ||
934 | + 'content-type': 'application/json' | ||
935 | + }, // 设置请求的 header | ||
936 | + success: function(res) { | ||
937 | + | ||
938 | + wx.hideLoading(); | ||
939 | + if (res.statusCode == 200) { | ||
940 | + var data = res.data; | ||
941 | + if (data.code == 0) { | ||
942 | + th.data.order_id = data.data.order_id; | ||
943 | + th.data.ok_order_sn = data.data.order_sn; | ||
944 | + | ||
945 | + var order_amount = pdata.account; | ||
946 | + //要进行判断,如果是用微信支付,就要跳转到支付界面 | ||
947 | + if (order_amount > 0) { | ||
948 | + th.setData({ | ||
949 | + isclose: 0 | ||
950 | + }); | ||
951 | + | ||
952 | + t_pay.set_pay_url("/api/weshop/order/pay/createRechargeOrder") | ||
953 | + t_pay.pay( | ||
954 | + { | ||
955 | + parentSn: data.data.order_sn, | ||
956 | + store_id: os.stoid | ||
957 | + },function (){ | ||
958 | + wx.showToast({ | ||
959 | + title: '购买成功', | ||
960 | + icon: 'success', | ||
961 | + duration: 2000 | ||
962 | + }); | ||
963 | + | ||
964 | + var rurl = "/packageC/pages/presell/cart/cart?is_fwk=1&order_sn=" + data.data.order_sn; | ||
965 | + setTimeout(function () { | ||
966 | + wx.reLaunch({ | ||
967 | + url: rurl, | ||
968 | + }) | ||
969 | + }, 1000) | ||
970 | + | ||
971 | + },function (e){ | ||
972 | + | ||
973 | + console.log('kkkkkkk'); | ||
974 | + | ||
975 | + wx.showToast({ | ||
976 | + title: e, | ||
977 | + icon: 'none', | ||
978 | + duration: 2000 | ||
979 | + }); | ||
980 | + | ||
981 | + setTimeout(function () { | ||
982 | + wx.reLaunch({ | ||
983 | + url: "/pages/user/order_list/order_list?index=2&tabindex=1", | ||
984 | + }) | ||
985 | + }, 1000) | ||
986 | + | ||
987 | + } | ||
988 | + ) | ||
989 | + } | ||
990 | + } else { | ||
991 | + th.data.is_summit_ing = 0; //是否提交中 | ||
992 | + getApp().confirmBox(data.msg); | ||
993 | + } | ||
994 | + } else { | ||
995 | + th.data.is_summit_ing = 0; //是否提交中 | ||
996 | + console.log("index.js wx.request CheckCallUser statusCode" + res.statusCode); | ||
997 | + } | ||
998 | + }, | ||
999 | + fail: function() { | ||
1000 | + th.data.is_summit_ing = 0; //是否提交中 | ||
1001 | + wx.hideLoading(); | ||
1002 | + console.log("index.js wx.request CheckCallUser fail"); | ||
1003 | + }, | ||
1004 | + complete: function() {} | ||
1005 | + }) | ||
1006 | + }, | ||
1007 | + | ||
1008 | + // -- 商品支付的下一步 -- | ||
775 | submitForm_next: async function (t) { | 1009 | submitForm_next: async function (t) { |
776 | if (this.data.is_summit_ing == 1) return false; //--提交中退出-- | 1010 | if (this.data.is_summit_ing == 1) return false; //--提交中退出-- |
777 | this.data.is_summit_ing = 1; | 1011 | this.data.is_summit_ing = 1; |
@@ -987,14 +1221,11 @@ Page({ | @@ -987,14 +1221,11 @@ Page({ | ||
987 | setTimeout(function () { | 1221 | setTimeout(function () { |
988 | th.setData({ isclose: 0 }); | 1222 | th.setData({ isclose: 0 }); |
989 | 1223 | ||
990 | - | ||
991 | var url = "/packageC/pages/presell/cart/cart?order_sn=" + data.data; | 1224 | var url = "/packageC/pages/presell/cart/cart?order_sn=" + data.data; |
992 | wx.reLaunch({ | 1225 | wx.reLaunch({ |
993 | url: url | 1226 | url: url |
994 | }) | 1227 | }) |
995 | 1228 | ||
996 | - | ||
997 | - | ||
998 | }, 1000) | 1229 | }, 1000) |
999 | } | 1230 | } |
1000 | }); | 1231 | }); |
@@ -1018,29 +1249,35 @@ Page({ | @@ -1018,29 +1249,35 @@ Page({ | ||
1018 | }) | 1249 | }) |
1019 | }, | 1250 | }, |
1020 | 1251 | ||
1021 | - | ||
1022 | //--------------------提交订单----------------------- | 1252 | //--------------------提交订单----------------------- |
1023 | submitForm: function (t) { | 1253 | submitForm: function (t) { |
1024 | var th = this; | 1254 | var th = this; |
1025 | //如果是部分定金,商家不同意退定金, | 1255 | //如果是部分定金,商家不同意退定金, |
1026 | if (this.data.act.presell_type != 1 && !this.data.act.is_refundmoney && !th.agree_no_ref) { | 1256 | if (this.data.act.presell_type != 1 && !this.data.act.is_refundmoney && !th.agree_no_ref) { |
1027 | - wx.showModal({ | ||
1028 | - content: ' 预售商品不允许退定金!是否继续下单?', | ||
1029 | - showCancel: true,//是否显示取消按钮 | ||
1030 | - cancelText: "我在想想",//默认是“取消” | ||
1031 | - confirmText: "继续下单",//默认是“确定” | ||
1032 | - success: function (res) { | ||
1033 | - if (res.cancel) { | ||
1034 | - //点击取消,默认隐藏弹框 | ||
1035 | - } else { | ||
1036 | - th.setData({ agree_no_ref: 1 }) | ||
1037 | - th.submitForm_next(t) | ||
1038 | - } | ||
1039 | - }, | ||
1040 | - }) | ||
1041 | - | 1257 | + wx.showModal({ |
1258 | + content: ' 预售商品不允许退定金!是否继续下单?', | ||
1259 | + showCancel: true,//是否显示取消按钮 | ||
1260 | + cancelText: "我在想想",//默认是“取消” | ||
1261 | + confirmText: "继续下单",//默认是“确定” | ||
1262 | + success: function (res) { | ||
1263 | + if (res.cancel) { | ||
1264 | + //点击取消,默认隐藏弹框 | ||
1265 | + } else { | ||
1266 | + th.setData({ agree_no_ref: 1 }) | ||
1267 | + if(th.data.fwk==1){ | ||
1268 | + th.submitForm_card_next(t) | ||
1269 | + }else{ | ||
1270 | + th.submitForm_next(t) | ||
1271 | + } | ||
1272 | + } | ||
1273 | + }, | ||
1274 | + }) | ||
1042 | } else { | 1275 | } else { |
1043 | - this.submitForm_next(t); | 1276 | + if(th.data.fwk==1){ |
1277 | + th.submitForm_card_next(t) | ||
1278 | + }else{ | ||
1279 | + th.submitForm_next(t) | ||
1280 | + } | ||
1044 | } | 1281 | } |
1045 | }, | 1282 | }, |
1046 | 1283 | ||
@@ -1269,6 +1506,18 @@ Page({ | @@ -1269,6 +1506,18 @@ Page({ | ||
1269 | switchChange: function (e) { | 1506 | switchChange: function (e) { |
1270 | console.log(e, 111); | 1507 | console.log(e, 111); |
1271 | this.setData({ agree_no_ref: e.detail.value }); | 1508 | this.setData({ agree_no_ref: e.detail.value }); |
1509 | + }, | ||
1510 | + | ||
1511 | + go_detail:function(e){ | ||
1512 | + var gid=e.currentTarget.dataset.gid; | ||
1513 | + var act=this.data.act; | ||
1514 | + var url=''; | ||
1515 | + if(this.data.is_fwk){ | ||
1516 | + url = `/packageC/pages/presell/cardInfo/goodsInfo?goods_id=${gid}&prom_id=${act.id}`; | ||
1517 | + }else{ | ||
1518 | + url= "/pages/goods/goodsInfo/goodsInfo?goods_id="+gid; | ||
1519 | + } | ||
1520 | + getApp().goto(url); | ||
1272 | } | 1521 | } |
1273 | 1522 | ||
1274 | }); | 1523 | }); |
packageC/pages/presell/cart/cart2_pre.wxml
@@ -48,7 +48,7 @@ | @@ -48,7 +48,7 @@ | ||
48 | <image class="wh100 bdr14" src="{{bn_goods.original_img}}" | 48 | <image class="wh100 bdr14" src="{{bn_goods.original_img}}" |
49 | binderror='cart_set_err' data-err="bn_goods.original_img"></image> | 49 | binderror='cart_set_err' data-err="bn_goods.original_img"></image> |
50 | </view> | 50 | </view> |
51 | - <navigator class="order-cont" url="/pages/goods/goodsInfo/goodsInfo?goods_id={{bn_goods.goods_id}}"> | 51 | + <navigator catchtap="go_detail" class="order-cont" data-gid="{{bn_goods.goods_id}}"> |
52 | <view class="goods-name ellipsis-2">{{bn_goods.goods_name}}</view> | 52 | <view class="goods-name ellipsis-2">{{bn_goods.goods_name}}</view> |
53 | <!-- 商品属性 --> | 53 | <!-- 商品属性 --> |
54 | <view class="flex-vertical fs28 color-gray n_guige"> | 54 | <view class="flex-vertical fs28 color-gray n_guige"> |
@@ -92,7 +92,7 @@ | @@ -92,7 +92,7 @@ | ||
92 | </view> | 92 | </view> |
93 | 93 | ||
94 | <!--阶梯团是不显示的--> | 94 | <!--阶梯团是不显示的--> |
95 | - <block wx:if="{{bn_exp_type==0 && !is_default_logistics}}"> | 95 | + <block wx:if="{{bn_exp_type==0 && !is_default_logistics && !is_fwk}}"> |
96 | <view class="use-item flex-space-between" wx:if="{{kt_type!=3 || is_normal==1}}"> | 96 | <view class="use-item flex-space-between" wx:if="{{kt_type!=3 || is_normal==1}}"> |
97 | <view>选择物流</view> | 97 | <view>选择物流</view> |
98 | <view class="flex-vertical" bindtap="show_wu_arr" data-txt='index' style="margin-right: 8rpx;"> | 98 | <view class="flex-vertical" bindtap="show_wu_arr" data-txt='index' style="margin-right: 8rpx;"> |
@@ -143,14 +143,14 @@ | @@ -143,14 +143,14 @@ | ||
143 | 143 | ||
144 | <view class="information bdr14"> | 144 | <view class="information bdr14"> |
145 | <!-----使用预存------> | 145 | <!-----使用预存------> |
146 | - <view class="set-mes" wx:if="{{bn_goods.yck_off}}"> | 146 | + <view class="set-mes" wx:if="{{bn_goods.yck_off && !is_fwk}}"> |
147 | <view class="use-item" bindtap='prestore2' style="padding-left:0;padding-right:0;"> | 147 | <view class="use-item" bindtap='prestore2' style="padding-left:0;padding-right:0;"> |
148 | <icon color="{{bn_goods.yck_off==2 ? 'red' : '#808080'}}" size="16" type="success"></icon> | 148 | <icon color="{{bn_goods.yck_off==2 ? 'red' : '#808080'}}" size="16" type="success"></icon> |
149 | <view class="yu_er">使用预存 </view> | 149 | <view class="yu_er">使用预存 </view> |
150 | </view> | 150 | </view> |
151 | </view> | 151 | </view> |
152 | <!-----使用余额------> | 152 | <!-----使用余额------> |
153 | - <view class="set-mes" wx:if="{{userinfo.user_money>0 && yuer>0}}"> | 153 | + <view class="set-mes" wx:if="{{userinfo.user_money>0 && yuer>0 && !is_fwk}}"> |
154 | <view class="use-item" bindtap='set_bn_useyuer' style="padding-left:0;padding-right:0;"> | 154 | <view class="use-item" bindtap='set_bn_useyuer' style="padding-left:0;padding-right:0;"> |
155 | <icon color="{{bn_use_money?'red':'gray'}}" size="16" type="success"></icon> | 155 | <icon color="{{bn_use_money?'red':'gray'}}" size="16" type="success"></icon> |
156 | <view class="yu_er">使用余额 :¥{{yuer}} </view> | 156 | <view class="yu_er">使用余额 :¥{{yuer}} </view> |
packageC/pages/presell/goodsInfo/goodsInfo.js
@@ -261,6 +261,8 @@ Page({ | @@ -261,6 +261,8 @@ Page({ | ||
261 | keyword:'', //门店搜索 | 261 | keyword:'', //门店搜索 |
262 | sec_i:-1,//选中分类门店 下标 | 262 | sec_i:-1,//选中分类门店 下标 |
263 | goodInfo_ad:'',//商品详情广告 | 263 | goodInfo_ad:'',//商品详情广告 |
264 | + | ||
265 | + c_curr_p:1 | ||
264 | }, | 266 | }, |
265 | 267 | ||
266 | //------初始化加载---------- | 268 | //------初始化加载---------- |
packageC/pages/presell/goodsInfo/goodsInfo.wxss
@@ -1123,7 +1123,7 @@ left:31rpx;} | @@ -1123,7 +1123,7 @@ left:31rpx;} | ||
1123 | } | 1123 | } |
1124 | /* 评价的用户边框 */ | 1124 | /* 评价的用户边框 */ |
1125 | .middle-user-frame{ | 1125 | .middle-user-frame{ |
1126 | - height: 65rpx; | 1126 | + height: 72rpx; |
1127 | overflow: hidden; | 1127 | overflow: hidden; |
1128 | } | 1128 | } |
1129 | .middle-user{ | 1129 | .middle-user{ |
packageC/pages/presell/list/list.wxml
@@ -27,13 +27,13 @@ | @@ -27,13 +27,13 @@ | ||
27 | 27 | ||
28 | <view class="kill-list seckill_list"> | 28 | <view class="kill-list seckill_list"> |
29 | <view class="kill-item" wx:for="{{goodlist}}" wx:key="gs"> | 29 | <view class="kill-item" wx:for="{{goodlist}}" wx:key="gs"> |
30 | - <navigator class="kill-pic rel" url="/packageC/pages/presell/goodsInfo/goodsInfo?goods_id={{item.goods_id}}&pre_id={{item.id}}"> | 30 | + <navigator class="kill-pic rel" url="/packageC/pages/presell/{{item.goods_type?'cardInfo':'goodsInfo'}}/goodsInfo?goods_id={{item.goods_id}}&pre_id={{item.id}}"> |
31 | <image class="wh100" src="{{url+item.original_img}}" data-val="{{item.original_img}}" | 31 | <image class="wh100" src="{{url+item.original_img}}" data-val="{{item.original_img}}" |
32 | data-errorimg="goodlist[{{index}}].original_img" binderror="bind_bnerr2" lazy-load="true"></image> | 32 | data-errorimg="goodlist[{{index}}].original_img" binderror="bind_bnerr2" lazy-load="true"></image> |
33 | </navigator> | 33 | </navigator> |
34 | <view class="kill-cont"> | 34 | <view class="kill-cont"> |
35 | <navigator class="goods-name ellipsis-2" | 35 | <navigator class="goods-name ellipsis-2" |
36 | - url="/packageC/pages/presell/goodsInfo/goodsInfo?goods_id={{item.goods_id}}&pre_id={{item.id}}">{{item.goods_name}}</navigator> | 36 | + url="/packageC/pages/presell/{{item.goods_type?'cardInfo':'goodsInfo'}}/goodsInfo?goods_id={{item.goods_id}}&pre_id={{item.id}}">{{item.goods_name}}</navigator> |
37 | <view class="flex-vertical xc-strip-frame"> | 37 | <view class="flex-vertical xc-strip-frame"> |
38 | <view class="xc-strip-blank rel"> | 38 | <view class="xc-strip-blank rel"> |
39 | 39 | ||
@@ -66,9 +66,9 @@ | @@ -66,9 +66,9 @@ | ||
66 | </view> | 66 | </view> |
67 | </view> | 67 | </view> |
68 | <view class="kill-btn "> | 68 | <view class="kill-btn "> |
69 | - <navigator wx:if="{{item.type==1}}" url="/packageC/pages/presell/goodsInfo/goodsInfo?goods_id={{item.goods_id}}&pre_id={{item.id}}">去抢购</navigator> | 69 | + <navigator wx:if="{{item.type==1}}" url="/packageC/pages/presell/{{item.goods_type?'cardInfo':'goodsInfo'}}/goodsInfo?goods_id={{item.goods_id}}&pre_id={{item.id}}">去抢购</navigator> |
70 | <!-- <navigator wx:else url="/packageC/pages/presell/pregoodsInfo/goodsInfo?goods_id={{item.goods_id}}&pre_id={{item.id}}" style="background:#059de5;"><view style="color:#fff;">即将开始</view></navigator> --> | 70 | <!-- <navigator wx:else url="/packageC/pages/presell/pregoodsInfo/goodsInfo?goods_id={{item.goods_id}}&pre_id={{item.id}}" style="background:#059de5;"><view style="color:#fff;">即将开始</view></navigator> --> |
71 | - <navigator wx:else url="/packageC/pages/presell/goodsInfo/goodsInfo?goods_id={{item.goods_id}}&pre_id={{item.id}}" style="background:#059de5;"><view style="color:#fff;">即将开始</view></navigator> | 71 | + <navigator wx:else url="/packageC/pages/presell/{{item.goods_type?'cardInfo':'goodsInfo'}}/goodsInfo?goods_id={{item.goods_id}}&pre_id={{item.id}}" style="background:#059de5;"><view style="color:#fff;">即将开始</view></navigator> |
72 | </view> | 72 | </view> |
73 | 73 | ||
74 | </view> | 74 | </view> |
packageE/pages/user/monthgiftbag/giftpackinfo/giftpackinfo.wxml
@@ -183,6 +183,11 @@ | @@ -183,6 +183,11 @@ | ||
183 | <text class="data-v-3a5b7e36">立即兑换</text> | 183 | <text class="data-v-3a5b7e36">立即兑换</text> |
184 | </view> | 184 | </view> |
185 | </block> | 185 | </block> |
186 | + <block wx:if="{{monthgiftbag.lbPrice<=0 && monthgiftbag.payIntegral<=0}}"> | ||
187 | + <view style="{{scene==1154 ? 'background:#b9b5b5':''}}" class="foot_button_buy data-v-3a5b7e36 " bindtap="GetFree" data-id="{{lbId}}"> | ||
188 | + <text class="data-v-3a5b7e36">免费领取</text> | ||
189 | + </view> | ||
190 | + </block> | ||
186 | </block> | 191 | </block> |
187 | 192 | ||
188 | </view> | 193 | </view> |
@@ -243,7 +248,6 @@ | @@ -243,7 +248,6 @@ | ||
243 | <canvas canvas-id='share' style='width:750rpx;height:1217rpx;background-color:white;' wx:if="{{!canvasHidden}}"></canvas> | 248 | <canvas canvas-id='share' style='width:750rpx;height:1217rpx;background-color:white;' wx:if="{{!canvasHidden}}"></canvas> |
244 | <share id="share_button" bind:send="send" bind:cancel="cancel" bind:share_img="saveImageToPhotosAlbum" wx:if="{{share_hidden}}"></share> | 249 | <share id="share_button" bind:send="send" bind:cancel="cancel" bind:share_img="saveImageToPhotosAlbum" wx:if="{{share_hidden}}"></share> |
245 | 250 | ||
246 | - | ||
247 | <view wx:if="{{showPoster}}"> | 251 | <view wx:if="{{showPoster}}"> |
248 | <view class="mask" catchtap="closePoster"></view> | 252 | <view class="mask" catchtap="closePoster"></view> |
249 | <view class="poster-container"> | 253 | <view class="poster-container"> |
packageE/pages/user/monthgiftbag/giftpacklist/giftpacklist.js
@@ -400,6 +400,7 @@ Page({ | @@ -400,6 +400,7 @@ Page({ | ||
400 | }) | 400 | }) |
401 | }, | 401 | }, |
402 | 402 | ||
403 | + | ||
403 | GetBuyGiftList: function () { | 404 | GetBuyGiftList: function () { |
404 | var _this2 = this; | 405 | var _this2 = this; |
405 | var th = this.data; | 406 | var th = this.data; |
@@ -440,10 +441,14 @@ Page({ | @@ -440,10 +441,14 @@ Page({ | ||
440 | var isStart = 0; | 441 | var isStart = 0; |
441 | var now = ut.gettimestamp(); | 442 | var now = ut.gettimestamp(); |
442 | 443 | ||
443 | - var str = res.data.data.starTime; | ||
444 | - var start = Date.parse(new Date(str)); | ||
445 | - start = start / 1000; | ||
446 | - if (start < now) isStart = 1; | 444 | + if(res.data.data.starTime){ |
445 | + var str = res.data.data.starTime; | ||
446 | + var start = Date.parse(new Date(str)); | ||
447 | + start = start / 1000; | ||
448 | + if (start < now) isStart = 1; | ||
449 | + }else{ | ||
450 | + isStart = 1; | ||
451 | + } | ||
447 | 452 | ||
448 | _this2.setData({ | 453 | _this2.setData({ |
449 | giftDate: res.data.data.endTime, | 454 | giftDate: res.data.data.endTime, |
pages/index/index/index.wxml
@@ -218,7 +218,7 @@ | @@ -218,7 +218,7 @@ | ||
218 | <view class="seckill-list"> | 218 | <view class="seckill-list"> |
219 | <swiper class="s_prom" indicator-dots="{{false}}" bindchange="flashSwiperChange" next-margin="25rpx"> | 219 | <swiper class="s_prom" indicator-dots="{{false}}" bindchange="flashSwiperChange" next-margin="25rpx"> |
220 | <swiper-item wx:for="{{preGoods}}" wx:key="*this" class="p_swiper"> | 220 | <swiper-item wx:for="{{preGoods}}" wx:key="*this" class="p_swiper"> |
221 | - <navigator bindtap="go_pre" class="nav" hover-class="none" data-url="/packageC/pages/presell/goodsInfo/goodsInfo?goods_id={{aitem.goods_id}}&pre_id={{aitem.id}}" wx:for="{{item}}" wx:key="item" wx:for-item="aitem" wx:for-index="aind"> | 221 | + <navigator bindtap="go_pre" class="nav" hover-class="none" data-url="{{aitem.goods_type == 0?'/packageC/pages/presell/goodsInfo/goodsInfo':'/packageC/pages/presell/cardInfo/goodsInfo'}}?goods_id={{aitem.goods_id}}&pre_id={{aitem.id}}" wx:for="{{item}}" wx:key="item" wx:for-item="aitem" wx:for-index="aind"> |
222 | <!-- <view class="imgview presell"> --> | 222 | <!-- <view class="imgview presell"> --> |
223 | <view class="imgview"> | 223 | <view class="imgview"> |
224 | <image src="{{url+aitem.original_img}}" mode="aspectFill" lazy-load="true" data-errorimg="preGoods[{{index}}][{{aind}}].original_img" binderror="bind_bnerr3" data-img="{{aitem.original_img}}"></image> | 224 | <image src="{{url+aitem.original_img}}" mode="aspectFill" lazy-load="true" data-errorimg="preGoods[{{index}}][{{aind}}].original_img" binderror="bind_bnerr3" data-img="{{aitem.original_img}}"></image> |
pages/user/order_list/ofilter.wxs
0 → 100644
1 | +module.exports = { | ||
2 | + card_url:function (item){ | ||
3 | + var url='/packageA/pages/details_serviceCard/details_serviceCard?order_id='+item.order_id; | ||
4 | + if(item.presell && item.presell.presell_type==0 && item.order_status<3 && item.presell.deposit_pay_time>0 && item.presell.tail_pay_state==0) | ||
5 | + url='/packageC/pages/presell/cart/cart?is_fwk=1&order_id='+item.order_id | ||
6 | + return url; | ||
7 | + } | ||
8 | +} | ||
0 | \ No newline at end of file | 9 | \ No newline at end of file |
pages/user/order_list/order_list.js
@@ -2511,7 +2511,7 @@ Page({ | @@ -2511,7 +2511,7 @@ Page({ | ||
2511 | 2511 | ||
2512 | app.request.promiseGet(url, { | 2512 | app.request.promiseGet(url, { |
2513 | data: data | 2513 | data: data |
2514 | - }).then(res => { | 2514 | + }).then(async res => { |
2515 | // 关闭加载状态 | 2515 | // 关闭加载状态 |
2516 | th.data.is_load2 = 0; | 2516 | th.data.is_load2 = 0; |
2517 | // 请求成功 | 2517 | // 请求成功 |
@@ -2530,15 +2530,38 @@ Page({ | @@ -2530,15 +2530,38 @@ Page({ | ||
2530 | }; | 2530 | }; |
2531 | if (currentIndex == 2) { // 卡项订单 | 2531 | if (currentIndex == 2) { // 卡项订单 |
2532 | list = th.data.cardList; | 2532 | list = th.data.cardList; |
2533 | - var new_data= data.map((item,index)=>{ | ||
2534 | - if(item.list && item.list.length){ | ||
2535 | - item.pt_status=item.list[0].pt_status; | ||
2536 | - item.pt_tail_money=item.list[0].pt_tail_money; | ||
2537 | - item.prom_id=item.list[0].prom_id; | ||
2538 | - item.prom_type=item.list[0].prom_type; | ||
2539 | - } | ||
2540 | - return item; | ||
2541 | - }) | 2533 | + // var new_data= data.map((item,index)=>{ |
2534 | + // if(item.list && item.list.length){ | ||
2535 | + // item.pt_status=item.list[0].pt_status; | ||
2536 | + // item.pt_tail_money=item.list[0].pt_tail_money; | ||
2537 | + // item.prom_id=item.list[0].prom_id; | ||
2538 | + // item.prom_type=item.list[0].prom_type; | ||
2539 | + // } | ||
2540 | + // return item; | ||
2541 | + // }) | ||
2542 | + | ||
2543 | + var new_data=[]; | ||
2544 | + for (let ir = 0; ir <data.length ; ir++) { | ||
2545 | + var item=data[ir]; | ||
2546 | + if(item.list && item.list.length){ | ||
2547 | + item.pt_status=item.list[0].pt_status; | ||
2548 | + item.pt_tail_money=item.list[0].pt_tail_money; | ||
2549 | + item.prom_id=item.list[0].prom_id; | ||
2550 | + item.prom_type=item.list[0].prom_type; | ||
2551 | + } | ||
2552 | + | ||
2553 | + if(item.prom_type==8){ | ||
2554 | + await getApp().request.promiseGet('/api/weshop/recharge/rechargePresell/get/' + os.stoid + '/' + item.order_id, { | ||
2555 | + }).then(rr => { | ||
2556 | + if (rr.data.code == 0) { | ||
2557 | + item['presell'] = rr.data.data; | ||
2558 | + item['ord_url'] = '/packageC/pages/presell/cart/cart'; | ||
2559 | + } | ||
2560 | + }) | ||
2561 | + } | ||
2562 | + | ||
2563 | + new_data.push(item); | ||
2564 | + } | ||
2542 | 2565 | ||
2543 | list = list.concat(new_data); | 2566 | list = list.concat(new_data); |
2544 | th.setData({ cardList: list }); | 2567 | th.setData({ cardList: list }); |
@@ -2820,14 +2843,17 @@ Page({ | @@ -2820,14 +2843,17 @@ Page({ | ||
2820 | switch (currentIndex) { | 2843 | switch (currentIndex) { |
2821 | case 0: { // 全部 | 2844 | case 0: { // 全部 |
2822 | delete data.order_status; | 2845 | delete data.order_status; |
2846 | + delete data.pay_status; | ||
2823 | break; | 2847 | break; |
2824 | }; | 2848 | }; |
2825 | case 1: { // 待支付 | 2849 | case 1: { // 待支付 |
2826 | data.order_status = 0; | 2850 | data.order_status = 0; |
2851 | + delete data.pay_status; | ||
2827 | break; | 2852 | break; |
2828 | }; | 2853 | }; |
2829 | case 2: { // 待评价 | 2854 | case 2: { // 待评价 |
2830 | - data.order_status = 1; | 2855 | + data.pay_status = 1; |
2856 | + data.order_status=1; | ||
2831 | break; | 2857 | break; |
2832 | }; | 2858 | }; |
2833 | }; | 2859 | }; |
@@ -2883,6 +2909,7 @@ Page({ | @@ -2883,6 +2909,7 @@ Page({ | ||
2883 | var pt_act=null; //-- 拼团活动的优化 -- | 2909 | var pt_act=null; //-- 拼团活动的优化 -- |
2884 | 2910 | ||
2885 | for (const it of list) { | 2911 | for (const it of list) { |
2912 | + //秒杀 | ||
2886 | if (it.prom_type == 1) { | 2913 | if (it.prom_type == 1) { |
2887 | let act_details = null; | 2914 | let act_details = null; |
2888 | let redis_num = 0; | 2915 | let redis_num = 0; |
@@ -2970,7 +2997,7 @@ Page({ | @@ -2970,7 +2997,7 @@ Page({ | ||
2970 | } | 2997 | } |
2971 | 2998 | ||
2972 | }; | 2999 | }; |
2973 | - | 3000 | + //-- 拼团 -- |
2974 | if (it.prom_type == 6) { | 3001 | if (it.prom_type == 6) { |
2975 | let act_details = null; | 3002 | let act_details = null; |
2976 | let redis_num = 0; | 3003 | let redis_num = 0; |
@@ -3027,7 +3054,6 @@ Page({ | @@ -3027,7 +3054,6 @@ Page({ | ||
3027 | } | 3054 | } |
3028 | } | 3055 | } |
3029 | 3056 | ||
3030 | - | ||
3031 | } | 3057 | } |
3032 | }); | 3058 | }); |
3033 | 3059 | ||
@@ -3062,6 +3088,102 @@ Page({ | @@ -3062,6 +3088,102 @@ Page({ | ||
3062 | pt_act=act_details; | 3088 | pt_act=act_details; |
3063 | 3089 | ||
3064 | } | 3090 | } |
3091 | + //-- 预售 -- | ||
3092 | + if (it.prom_type == 8) { | ||
3093 | + | ||
3094 | + let act_details = null; | ||
3095 | + let promcardbuynum = 0; | ||
3096 | + let qty = it.qty; | ||
3097 | + let presell_id=0; | ||
3098 | + | ||
3099 | + var url = "/api/weshop/marketing/marketingPresellList/list" | ||
3100 | + var rd = { | ||
3101 | + store_id: os.stoid, | ||
3102 | + presell_id: it.prom_id, | ||
3103 | + goods_id: it.card_id | ||
3104 | + } | ||
3105 | + console.log('获取预售从表') | ||
3106 | + //------获取预售从表---------- | ||
3107 | + await getApp().request.promiseGet(url, { | ||
3108 | + data: rd | ||
3109 | + }).then(res => { | ||
3110 | + if (res.data.code == 0 && res.data.data && res.data.data.length > 0) { | ||
3111 | + act_details = res.data.data[0]; | ||
3112 | + presell_id = act_details.presell_id; | ||
3113 | + } | ||
3114 | + }) | ||
3115 | + | ||
3116 | + //------获取预售主表---------- | ||
3117 | + await getApp().request.promiseGet(`/api/weshop/marketing/marketingPresellForm/get/${os.stoid}/${presell_id}`, {}).then(res => { | ||
3118 | + if (res.data.code == 0 && res.data.data) { | ||
3119 | + var act_data = res.data.data; | ||
3120 | + if (act_data.is_end) { | ||
3121 | + wx.showToast({ title: "活动已经结束", icon: 'none', duration: 3000 }); | ||
3122 | + flag = 0; | ||
3123 | + return false; | ||
3124 | + } | ||
3125 | + if (act_data.isuse == 0) { | ||
3126 | + wx.showToast({ title: "活动未启用", icon: 'none', duration: 3000 }); | ||
3127 | + flag = 0; | ||
3128 | + return false; | ||
3129 | + } | ||
3130 | + | ||
3131 | + var err_txt = "活动定金时间已经结束"; | ||
3132 | + var end_time = act_data.end_time; | ||
3133 | + if (act_data.presell_type == 1) { | ||
3134 | + err_txt = "活动时间已经结束"; | ||
3135 | + } | ||
3136 | + if (end_time < ut.gettimestamp()) { | ||
3137 | + wx.showToast({ title: err_txt, icon: 'none', duration: 3000 }); | ||
3138 | + flag = 0; | ||
3139 | + return false; | ||
3140 | + } | ||
3141 | + | ||
3142 | + if (act_data.presell_type == 0) { | ||
3143 | + end_time = act_data.pay_enddate; | ||
3144 | + err_txt = "活动尾款时间已经结束"; | ||
3145 | + } | ||
3146 | + if (end_time < ut.gettimestamp()) { | ||
3147 | + wx.showToast({ title: err_txt, icon: 'none', duration: 3000 }); | ||
3148 | + flag = 0; | ||
3149 | + return false; | ||
3150 | + } | ||
3151 | + } | ||
3152 | + }) | ||
3153 | + | ||
3154 | + if(!flag) { | ||
3155 | + th.data.ser_paying=0; | ||
3156 | + return false; | ||
3157 | + } | ||
3158 | + | ||
3159 | + //-- 判断一下限购的计算 -- | ||
3160 | + if(act_details.vip_butyqty>0){ | ||
3161 | + await getApp().request.promiseGet("/api/weshop/recharge/rechargePresell/countBuyGoodsSum", { | ||
3162 | + data: { | ||
3163 | + store_id: store_id, | ||
3164 | + user_id: user_id, | ||
3165 | + goods_id: it.card_id, | ||
3166 | + prom_id: it.prom_id, | ||
3167 | + } | ||
3168 | + }).then(res => { | ||
3169 | + if (res.data.code == 0) { | ||
3170 | + console.log('已经购买的数量:', res.data.data); | ||
3171 | + promcardbuynum = res.data.data.sumgoodsnum; | ||
3172 | + } | ||
3173 | + }) | ||
3174 | + let limited = act_details.buy_limit; // 限购数量a | ||
3175 | + let canBuyNum = limited - promcardbuynum; // 自己还可购买的数量c | ||
3176 | + | ||
3177 | + if (canBuyNum < qty ) { | ||
3178 | + wx.showModal({ | ||
3179 | + title: '提示', | ||
3180 | + content: '您已超出活动限购数量,无法支付,请取消订单!', | ||
3181 | + showCancel: false, | ||
3182 | + }); | ||
3183 | + flag = false; | ||
3184 | + } | ||
3185 | + } | ||
3186 | + } | ||
3065 | 3187 | ||
3066 | } | 3188 | } |
3067 | 3189 | ||
@@ -3079,7 +3201,7 @@ Page({ | @@ -3079,7 +3201,7 @@ Page({ | ||
3079 | duration: 2000 | 3201 | duration: 2000 |
3080 | }); | 3202 | }); |
3081 | 3203 | ||
3082 | - if(pt_act.kttype==1){ | 3204 | + if(pt_act && pt_act.kttype==1){ |
3083 | 3205 | ||
3084 | //--如果商家团的时候,这个要改,要用服务卡的接口--- | 3206 | //--如果商家团的时候,这个要改,要用服务卡的接口--- |
3085 | getApp().request.promisePost("/api/weshop/rechargeServicelist/vipAutoTuan", { | 3207 | getApp().request.promisePost("/api/weshop/rechargeServicelist/vipAutoTuan", { |
pages/user/order_list/order_list.wxml
1 | <wxs module="filters" src="../../../utils/filter.wxs"></wxs> | 1 | <wxs module="filters" src="../../../utils/filter.wxs"></wxs> |
2 | +<wxs module="ofil" src="ofilter.wxs"></wxs> | ||
2 | 3 | ||
3 | <view class="container"> | 4 | <view class="container"> |
4 | <!-- 一级tabbar --> | 5 | <!-- 一级tabbar --> |
@@ -321,52 +322,80 @@ | @@ -321,52 +322,80 @@ | ||
321 | <view class="Commodity_number flex-vertical-between fs24 padding border_bottom"> | 322 | <view class="Commodity_number flex-vertical-between fs24 padding border_bottom"> |
322 | <!--商品编号 --> | 323 | <!--商品编号 --> |
323 | <text selectable='true'>订单编号:{{item.order_sn}}</text> | 324 | <text selectable='true'>订单编号:{{item.order_sn}}</text> |
324 | - <!-- 订单状态 --> | ||
325 | - <view class="flex-center c-r"> | ||
326 | - <view wx:if="{{item.pay_status == 0 && item.order_status<2 }}"> | ||
327 | - <block wx:if="{{item.prom_type==6}}"> | ||
328 | - <block wx:if="{{item.pt_status==0}}" >未支付</block> | ||
329 | - <block wx:if="{{item.pt_status==1}}" >组团中</block> | ||
330 | - | ||
331 | - </block> | ||
332 | - <block wx:else> | ||
333 | - 待支付 | ||
334 | - </block> | ||
335 | - </view> | ||
336 | - <view wx:if="{{item.order_status<2}}"> | ||
337 | - <block wx:if="{{item.pt_status==2 && item.pt_tail_money>0}}">待支付尾款</block> | ||
338 | - </view> | ||
339 | 325 | ||
340 | - <view wx:if="{{item.order_status == 1 && item.pay_status==1}}" class="flex-center">待评价 | ||
341 | - <view class="lin"></view> | ||
342 | - <image src="{{iurl}}miniapp/images/trash.png" bindtap="deleteSerOrderData" | ||
343 | - data-index="{{index}}" data-orderid="{{item.order_id}}" data-ordersn="{{item.order_sn}}"> | 326 | + <!-- 这是预售的 --> |
327 | + <block wx:if="{{item.presell}}"> | ||
328 | + <block wx:if="{{item.order_status==3}}"> | ||
329 | + <text wx:if="{{item.presell.tail_pay_state==2}}">尾款支付失败</text> | ||
330 | + </block> | ||
331 | + <block wx:else> | ||
332 | + <text wx:if="{{item.presell.presell_type==0 && !item.presell.deposit_pay_time}}">待支付定金</text> | ||
333 | + <text wx:if="{{item.presell.presell_type!=1 && item.presell.deposit_pay_time && !item.presell.tail_pay_state}}">待尾款</text> | ||
334 | + <text wx:if="{{item.presell.presell_type==1 && item.order_status<2 && item.pay_status<1 }}">未支付</text> | ||
335 | + </block> | ||
344 | 336 | ||
345 | - </image> | 337 | + <view wx:if="{{(item.order_status==1 && item.pay_status==1)}}" class="flex-center">待评价<view class="lin"></view> |
338 | + <image src="{{iurl}}miniapp/images/trash.png" bindtap="deleteSerOrderData" data-index="{{index}}" data-order_id="{{item.order_id}}"></image> | ||
346 | </view> | 339 | </view> |
347 | - <view wx:if="{{item.order_status == 2}}" class="flex-center">已评价 | ||
348 | - <view class="lin"></view> | ||
349 | - <image src="{{iurl}}miniapp/images/trash.png" bindtap="deleteSerOrderData" data-index="{{index}}" | ||
350 | - data-orderid="{{item.order_id}}" data-ordersn="{{item.order_sn}}"></image> | 340 | + <view wx:if="{{item.order_status==2}}" class="flex-center">已评价<view class="lin"></view> |
341 | + <image src="{{iurl}}miniapp/images/trash.png" bindtap="deleteSerOrderData" data-index="{{index}}" data-order_id="{{item.order_id}}"></image> | ||
342 | + </view> | ||
343 | + <view wx:if="{{item.order_status==3 && item.pt_status!=6}}" class="flex-center" >已取消<view class="lin"></view> | ||
344 | + <image src="{{iurl}}miniapp/images/trash.png" bindtap="deleteSerOrderData" data-index="{{index}}" data-order_id="{{item.order_id}}"></image> | ||
351 | </view> | 345 | </view> |
352 | 346 | ||
353 | - | ||
354 | - <!-- 要判断支付尾款失败 --> | ||
355 | - <view wx:if="{{item.order_status == 3 && item.pt_status!=6}}" class="c-a9" class="flex-center">已取消 | ||
356 | - <view class="lin"></view> | ||
357 | - <image src="{{iurl}}miniapp/images/trash.png" bindtap="deleteSerOrderData" data-index="{{index}}" | ||
358 | - data-orderid="{{item.order_id}}" data-ordersn="{{item.order_sn}}"></image> | 347 | + </block> |
348 | + | ||
349 | + <block wx:else> | ||
350 | + <!-- 订单状态 --> | ||
351 | + <view class="flex-center c-r"> | ||
352 | + <view wx:if="{{item.pay_status == 0 && item.order_status<2 }}"> | ||
353 | + <block wx:if="{{item.prom_type==6}}"> | ||
354 | + <block wx:if="{{item.pt_status==0}}" >未支付</block> | ||
355 | + <block wx:if="{{item.pt_status==1}}" >组团中</block> | ||
356 | + | ||
357 | + </block> | ||
358 | + <block wx:else> | ||
359 | + 待支付 | ||
360 | + </block> | ||
361 | + </view> | ||
362 | + <view wx:if="{{item.order_status<2}}"> | ||
363 | + <block wx:if="{{item.pt_status==2 && item.pt_tail_money>0}}">待支付尾款</block> | ||
364 | + </view> | ||
365 | + | ||
366 | + <view wx:if="{{item.order_status == 1 && item.pay_status==1}}" class="flex-center">待评价 | ||
367 | + <view class="lin"></view> | ||
368 | + <image src="{{iurl}}miniapp/images/trash.png" bindtap="deleteSerOrderData" | ||
369 | + data-index="{{index}}" data-orderid="{{item.order_id}}" data-ordersn="{{item.order_sn}}"> | ||
370 | + | ||
371 | + </image> | ||
372 | + </view> | ||
373 | + <view wx:if="{{item.order_status == 2}}" class="flex-center">已评价 | ||
374 | + <view class="lin"></view> | ||
375 | + <image src="{{iurl}}miniapp/images/trash.png" bindtap="deleteSerOrderData" data-index="{{index}}" | ||
376 | + data-orderid="{{item.order_id}}" data-ordersn="{{item.order_sn}}"></image> | ||
377 | + </view> | ||
378 | + | ||
379 | + | ||
380 | + <!-- 要判断支付尾款失败 --> | ||
381 | + <view wx:if="{{item.order_status == 3 && item.pt_status!=6}}" class="c-a9" class="flex-center">已取消 | ||
382 | + <view class="lin"></view> | ||
383 | + <image src="{{iurl}}miniapp/images/trash.png" bindtap="deleteSerOrderData" data-index="{{index}}" | ||
384 | + data-orderid="{{item.order_id}}" data-ordersn="{{item.order_sn}}"></image> | ||
385 | + </view> | ||
386 | + <view wx:if="{{item.order_status == 5}}">已作废</view> | ||
387 | + <view wx:if="{{item.pt_status==6}}"><text style="font-size: 26rpx;">支付尾款失败</text></view> | ||
359 | </view> | 388 | </view> |
360 | - <view wx:if="{{item.order_status == 5}}">已作废</view> | ||
361 | - <view wx:if="{{item.pt_status==6}}"><text style="font-size: 26rpx;">支付尾款失败</text></view> | ||
362 | - </view> | 389 | + </block> |
390 | + | ||
391 | + | ||
363 | </view> | 392 | </view> |
364 | 393 | ||
365 | <!-- 商品详情集合 --> | 394 | <!-- 商品详情集合 --> |
366 | <view class="detail_commoditys"> | 395 | <view class="detail_commoditys"> |
367 | <!-- 单个商品 --> | 396 | <!-- 单个商品 --> |
368 | <view> | 397 | <view> |
369 | - <navigator class="detail_commodity flex-vertical padding" wx:for="{{item.list}}" wx:for-item="goods" wx:for-index="pinx" url="/packageA/pages/details_serviceCard/details_serviceCard?order_id={{item.order_id}}"> | 398 | + <navigator class="detail_commodity flex-vertical padding" wx:for="{{item.list}}" wx:for-item="goods" wx:for-index="pinx" url="{{ofil.card_url(item)}}"> |
370 | <!-- 商品图片 --> | 399 | <!-- 商品图片 --> |
371 | <navigator class="rel"> | 400 | <navigator class="rel"> |
372 | <image src="{{resourceUrl+goods.img_url}}" binderror="bind_bnerr" lazy-load="{{true}}" data-errorimg="orderList[{{index}}].list[{{pinx}}].img_url"></image> | 401 | <image src="{{resourceUrl+goods.img_url}}" binderror="bind_bnerr" lazy-load="{{true}}" data-errorimg="orderList[{{index}}].list[{{pinx}}].img_url"></image> |
@@ -429,8 +458,10 @@ | @@ -429,8 +458,10 @@ | ||
429 | <image wx:if="{{(item.order_status==1&&item.pay_status==1 && item.shipping_status==0 && item.exp_type==1 && !(item.order_goods[0].prom_type==9))}}" class="code" src="{{iurl}}miniapp/images/order/code.png" bindtap="code_show" data-order_sn="{{item.order_sn}}"></image> | 458 | <image wx:if="{{(item.order_status==1&&item.pay_status==1 && item.shipping_status==0 && item.exp_type==1 && !(item.order_goods[0].prom_type==9))}}" class="code" src="{{iurl}}miniapp/images/order/code.png" bindtap="code_show" data-order_sn="{{item.order_sn}}"></image> |
430 | <view bindtap="cancle" class="commodity_To_evaluate flex-level View_evaluation" data-id="{{tabIndex}}" data-orderid="{{item.order_id}}" data-ordersn="{{item.order_sn}}" wx:if="{{(item.order_status==0)}}" data-index="{{tabIndex}}">取消订单</view> | 459 | <view bindtap="cancle" class="commodity_To_evaluate flex-level View_evaluation" data-id="{{tabIndex}}" data-orderid="{{item.order_id}}" data-ordersn="{{item.order_sn}}" wx:if="{{(item.order_status==0)}}" data-index="{{tabIndex}}">取消订单</view> |
431 | 460 | ||
432 | - | ||
433 | - <navigator class="commodity_To_evaluate flex-level View_evaluation" url="/packageA/pages/details_serviceCard/details_serviceCard?order_id={{item.order_id}}">订单详情</navigator> | 461 | + <!-- 尾款的支付时候,不显示订单详情 --> |
462 | + <navigator class="commodity_To_evaluate flex-level View_evaluation" | ||
463 | + hidden="{{item.presell && item.presell.presell_type==0 && item.order_status<3 && item.presell.deposit_pay_time>0 && item.presell.tail_pay_state==0}}" | ||
464 | + url="/packageA/pages/details_serviceCard/details_serviceCard?order_id={{item.order_id}}">订单详情</navigator> | ||
434 | 465 | ||
435 | 466 | ||
436 | <block wx:if="{{item.order_status==1 && item.pay_status==1}}"> | 467 | <block wx:if="{{item.order_status==1 && item.pay_status==1}}"> |
@@ -440,8 +471,14 @@ | @@ -440,8 +471,14 @@ | ||
440 | url="/packageB/pages/user/add_comment/add_comment?card=1&goods_id={{item.list[0].card_id}}&order_id={{item.list[0].order_id}}&price={{item.list[0].price}}">评价</navigator> | 471 | url="/packageB/pages/user/add_comment/add_comment?card=1&goods_id={{item.list[0].card_id}}&order_id={{item.list[0].order_id}}&price={{item.list[0].price}}">评价</navigator> |
441 | </block> | 472 | </block> |
442 | 473 | ||
474 | + | ||
475 | + <block wx:if="{{item.presell && item.presell.presell_type==0 && item.order_status<3 && item.presell.deposit_pay_time>0 && item.presell.tail_pay_state==0}}"> | ||
476 | + <navigator class="commodity_To_evaluate flex-level comment_go" url="/packageC/pages/presell/cart/cart?order_id={{item.order_id}}&is_fwk=1" data-idx="{{index}}" >支付尾款</navigator> | ||
477 | + | ||
478 | + </block> | ||
479 | + | ||
443 | <navigator class="commodity_To_evaluate flex-level comment_go" | 480 | <navigator class="commodity_To_evaluate flex-level comment_go" |
444 | - bindtap="pay" data-index="{{index}}" wx:if="{{item.prom_type!=6 && item.pay_status==0 && item.order_status<2}}">立即支付</navigator> | 481 | + bindtap="pay" data-index="{{index}}" wx:if="{{item.prom_type!=6 && item.order_status==0 && item.pay_status==0 && item.order_status<2}}">立即支付</navigator> |
445 | 482 | ||
446 | <navigator class="commodity_To_evaluate flex-level comment_go" | 483 | <navigator class="commodity_To_evaluate flex-level comment_go" |
447 | bindtap="pay" data-index="{{index}}" wx:if="{{item.prom_type==6 && item.pt_status==0 && item.order_status<2}}">立即支付</navigator> | 484 | bindtap="pay" data-index="{{index}}" wx:if="{{item.prom_type==6 && item.pt_status==0 && item.order_status<2}}">立即支付</navigator> |
utils/LoadMore.js
@@ -72,7 +72,7 @@ var e = function() { | @@ -72,7 +72,7 @@ var e = function() { | ||
72 | 72 | ||
73 | //格式化 | 73 | //格式化 |
74 | var glist=""; | 74 | var glist=""; |
75 | - if(g) { | 75 | + if(g && g.length) { |
76 | for (var ii = 0; ii < g.length; ii++) { | 76 | for (var ii = 0; ii < g.length; ii++) { |
77 | //if(g[i].prom_type == 1 || g[i].prom_type == 2 || g[i].prom_type == 6) { | 77 | //if(g[i].prom_type == 1 || g[i].prom_type == 2 || g[i].prom_type == 6) { |
78 | if (g[ii].prom_type && g[ii].prom_type == 1) { | 78 | if (g[ii].prom_type && g[ii].prom_type == 1) { |