Commit 3e188ac99b8982d1d2ab122a2ecb53bdfa62b768
Merge branch 'dev_oa_fu30' into dev
Showing
11 changed files
with
400 additions
and
167 deletions
packageC/pages/luckyGo/luckyGo_goodsInfo/buy_pt.wxml
@@ -200,7 +200,7 @@ | @@ -200,7 +200,7 @@ | ||
200 | <view class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999">请先选择门店</view> | 200 | <view class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999">请先选择门店</view> |
201 | </block> | 201 | </block> |
202 | <block wx:else> | 202 | <block wx:else> |
203 | - <block wx:if="{{data.store_count<=0}}"> | 203 | + <block wx:if="{{sele_g.store_count<=0}}"> |
204 | <view class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999">库存不足</view> | 204 | <view class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999">库存不足</view> |
205 | </block> | 205 | </block> |
206 | <block wx:else> | 206 | <block wx:else> |
packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo.js
@@ -297,7 +297,11 @@ Page({ | @@ -297,7 +297,11 @@ Page({ | ||
297 | nav_backgroundColor: "#ffffff", | 297 | nav_backgroundColor: "#ffffff", |
298 | nav_type: 2, //导航类型 | 298 | nav_type: 2, //导航类型 |
299 | istop: 0, //是否置顶风格为1 | 299 | istop: 0, //是否置顶风格为1 |
300 | - searchbox_transparent: 1 | 300 | + searchbox_transparent: 1, |
301 | + | ||
302 | + front_g:null, | ||
303 | + fir_set_sto:1, //最初始的一下,获取门店 | ||
304 | + front_pick:null, //在详情页面上显示的门店 | ||
301 | 305 | ||
302 | }, | 306 | }, |
303 | 307 | ||
@@ -1145,7 +1149,8 @@ Page({ | @@ -1145,7 +1149,8 @@ Page({ | ||
1145 | ee.setData({ | 1149 | ee.setData({ |
1146 | data: t.data.data, | 1150 | data: t.data.data, |
1147 | sele_g: t.data.data, | 1151 | sele_g: t.data.data, |
1148 | - userInfo: getApp().globalData.userInfo | 1152 | + userInfo: getApp().globalData.userInfo, |
1153 | + front_g:ut.deep_cp(t.data.data) | ||
1149 | }); | 1154 | }); |
1150 | 1155 | ||
1151 | 1156 | ||
@@ -2332,12 +2337,11 @@ Page({ | @@ -2332,12 +2337,11 @@ Page({ | ||
2332 | if (this.data.openSpecModal_pt && this.data.is_normal) { | 2337 | if (this.data.openSpecModal_pt && this.data.is_normal) { |
2333 | this.get_sto(); | 2338 | this.get_sto(); |
2334 | this.setData({ | 2339 | this.setData({ |
2335 | - sele_g: this.data.data, | ||
2336 | - gid: this.data.data.goods_id | 2340 | + sele_g: this.data.front_g, |
2341 | + gid: this.data.front_g.goods_id | ||
2337 | }) | 2342 | }) |
2338 | 2343 | ||
2339 | this.sele_spec_chech_activity(); | 2344 | this.sele_spec_chech_activity(); |
2340 | - | ||
2341 | } | 2345 | } |
2342 | 2346 | ||
2343 | this.setData({ | 2347 | this.setData({ |
@@ -3369,6 +3373,27 @@ Page({ | @@ -3369,6 +3373,27 @@ Page({ | ||
3369 | } | 3373 | } |
3370 | }, | 3374 | }, |
3371 | 3375 | ||
3376 | + | ||
3377 | + //-- 处理首页的显示门店 --- | ||
3378 | + deal_front_pk(){ | ||
3379 | + var th=this; | ||
3380 | + if(this.data.fir_set_sto==1){ | ||
3381 | + this.data.fir_set_sto=0; | ||
3382 | + var cp_data=null | ||
3383 | + if(th.data.def_pick_store && th.data.def_pick_store.pickup_id){ | ||
3384 | + cp_data=JSON.parse(JSON.stringify(th.data.def_pick_store)); | ||
3385 | + } | ||
3386 | + th.setData({ | ||
3387 | + front_pick:cp_data, | ||
3388 | + front_only_pk:th.data.only_pk, | ||
3389 | + front_def_pickpu_list:th.data.def_pickpu_list, | ||
3390 | + front_pickpu_listt:th.data.pickpu_list, | ||
3391 | + front_all_sto:th.data.all_sto, | ||
3392 | + front_is_show_sto_cat:th.data.is_show_sto_cat, | ||
3393 | + }) | ||
3394 | + } | ||
3395 | + }, | ||
3396 | + | ||
3372 | //------------处理门店--------------- | 3397 | //------------处理门店--------------- |
3373 | deal_pickup(e) { | 3398 | deal_pickup(e) { |
3374 | var th = this; | 3399 | var th = this; |
@@ -3502,15 +3527,21 @@ Page({ | @@ -3502,15 +3527,21 @@ Page({ | ||
3502 | th.setData({ def_pick_store: e.data.data.pageData[0] }) | 3527 | th.setData({ def_pick_store: e.data.data.pageData[0] }) |
3503 | } | 3528 | } |
3504 | } | 3529 | } |
3530 | + | ||
3531 | + //-- 设置商品详情页面的门店显示情况 --- | ||
3532 | + th.deal_front_pk(); | ||
3533 | + | ||
3505 | } else { | 3534 | } else { |
3506 | - th.setData({ | ||
3507 | - is_show_sto_cat: -1, | ||
3508 | - only_pk: e.data.data.pageData | ||
3509 | - }); | ||
3510 | - //-----如果没有默认门店,要取第一个门店作为默认店.此时没有门店分类的情况------ | ||
3511 | - if (!th.data.def_pick_store) { | ||
3512 | - th.setData({ def_pick_store: e.data.data.pageData[0] }) | ||
3513 | - } | 3535 | + th.setData({ |
3536 | + is_show_sto_cat: -1, | ||
3537 | + only_pk: e.data.data.pageData | ||
3538 | + }); | ||
3539 | + //-----如果没有默认门店,要取第一个门店作为默认店.此时没有门店分类的情况------ | ||
3540 | + if (!th.data.def_pick_store) { | ||
3541 | + th.setData({ def_pick_store: e.data.data.pageData[0] }) | ||
3542 | + } | ||
3543 | + //-- 设置商品详情页面的门店显示情况 --- | ||
3544 | + th.deal_front_pk(); | ||
3514 | 3545 | ||
3515 | } | 3546 | } |
3516 | } | 3547 | } |
@@ -3529,6 +3560,9 @@ Page({ | @@ -3529,6 +3560,9 @@ Page({ | ||
3529 | sto_sele_distr: e.data.data.pageData[0].distr_type | 3560 | sto_sele_distr: e.data.data.pageData[0].distr_type |
3530 | }) | 3561 | }) |
3531 | } | 3562 | } |
3563 | + | ||
3564 | + //-- 设置商品详情页面的门店显示情况 --- | ||
3565 | + th.deal_front_pk(); | ||
3532 | } | 3566 | } |
3533 | }, | 3567 | }, |
3534 | 3568 | ||
@@ -3998,6 +4032,7 @@ Page({ | @@ -3998,6 +4032,7 @@ Page({ | ||
3998 | } | 4032 | } |
3999 | 4033 | ||
4000 | if(prom_type==9){ | 4034 | if(prom_type==9){ |
4035 | + ee.get_sto(); | ||
4001 | this.setData({ isshow: 1, }); | 4036 | this.setData({ isshow: 1, }); |
4002 | } | 4037 | } |
4003 | 4038 | ||
@@ -4500,6 +4535,7 @@ Page({ | @@ -4500,6 +4535,7 @@ Page({ | ||
4500 | var th = this; | 4535 | var th = this; |
4501 | var ind = parseInt(e.currentTarget.dataset.ind); | 4536 | var ind = parseInt(e.currentTarget.dataset.ind); |
4502 | 4537 | ||
4538 | + th.setData({def_pick_store: ut.deep_cp(th.data.front_pick)}); | ||
4503 | 4539 | ||
4504 | //ind == 1是普通购买 | 4540 | //ind == 1是普通购买 |
4505 | if (ind == 1) { | 4541 | if (ind == 1) { |
@@ -5940,7 +5976,10 @@ Page({ | @@ -5940,7 +5976,10 @@ Page({ | ||
5940 | 5976 | ||
5941 | var th = this; | 5977 | var th = this; |
5942 | var ind = ee.currentTarget.dataset.ind; | 5978 | var ind = ee.currentTarget.dataset.ind; |
5979 | + var isfront = ee.currentTarget.dataset.isfront; | ||
5943 | var bconfig = th.data.bconfig; | 5980 | var bconfig = th.data.bconfig; |
5981 | + th.data.isfront=0; | ||
5982 | + if(isfront) th.data.isfront=1; | ||
5944 | 5983 | ||
5945 | //如果开启了,则不在选择门店 | 5984 | //如果开启了,则不在选择门店 |
5946 | if(this.data.sys_switch.is_pricing_open_store && getApp().globalData.pk_store){ | 5985 | if(this.data.sys_switch.is_pricing_open_store && getApp().globalData.pk_store){ |
@@ -6187,6 +6226,10 @@ Page({ | @@ -6187,6 +6226,10 @@ Page({ | ||
6187 | if (!th.data.sele_g) return false; | 6226 | if (!th.data.sele_g) return false; |
6188 | //判断门店的配送方式是不是匹配 | 6227 | //判断门店的配送方式是不是匹配 |
6189 | var g_distr_type = th.data.sele_g.distr_type; | 6228 | var g_distr_type = th.data.sele_g.distr_type; |
6229 | + if(th.data.isfront==1){ | ||
6230 | + g_distr_type = th.data.data.distr_type; | ||
6231 | + } | ||
6232 | + | ||
6190 | if (item.distr_type != 0 && g_distr_type != 0 && item.distr_type != g_distr_type) { | 6233 | if (item.distr_type != 0 && g_distr_type != 0 && item.distr_type != g_distr_type) { |
6191 | wx.showToast({ | 6234 | wx.showToast({ |
6192 | title: "门店配送方式不匹配", | 6235 | title: "门店配送方式不匹配", |
@@ -6208,6 +6251,12 @@ Page({ | @@ -6208,6 +6251,12 @@ Page({ | ||
6208 | fir_pick_index: 0 | 6251 | fir_pick_index: 0 |
6209 | }); | 6252 | }); |
6210 | 6253 | ||
6254 | + if(th.data.isfront){ | ||
6255 | + th.setData({ | ||
6256 | + front_pick: ut.deep_cp(item) | ||
6257 | + }) | ||
6258 | + } | ||
6259 | + | ||
6211 | if (openindstore == 1) { | 6260 | if (openindstore == 1) { |
6212 | th.setData({ | 6261 | th.setData({ |
6213 | openSpecModal: !0, | 6262 | openSpecModal: !0, |
packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo.wxml
@@ -418,8 +418,8 @@ | @@ -418,8 +418,8 @@ | ||
418 | 418 | ||
419 | </block> | 419 | </block> |
420 | <!-- 门店收货地址 --> | 420 | <!-- 门店收货地址 --> |
421 | - <view class="xc-address_frame bdt16 flex-vertical xc-ash {{def_pick_store!=null?'sn_height':'on_height'}}"> | ||
422 | - <view class="address_frame" bindtap="choice_store" data-ind="0"> | 421 | + <view class="xc-address_frame bdt16 flex-vertical xc-ash {{front_pick!=null?'sn_height':'on_height'}}"> |
422 | + <view class="address_frame" bindtap="choice_store" data-ind="0" data-isfront="1" > | ||
423 | <view class="flex-vertical-between "> | 423 | <view class="flex-vertical-between "> |
424 | <view class="flex-vertical select_store_height"> | 424 | <view class="flex-vertical select_store_height"> |
425 | <image class="stores-img" src="{{iurl}}/miniapp/images/stores.png"></image> | 425 | <image class="stores-img" src="{{iurl}}/miniapp/images/stores.png"></image> |
@@ -427,30 +427,30 @@ | @@ -427,30 +427,30 @@ | ||
427 | </view> | 427 | </view> |
428 | <view hidden="{{has_def && sys_switch.is_pricing_open_store}}" class="red_bb fs26">更多门店<text class="bg_jj"></text></view> | 428 | <view hidden="{{has_def && sys_switch.is_pricing_open_store}}" class="red_bb fs26">更多门店<text class="bg_jj"></text></view> |
429 | </view> | 429 | </view> |
430 | - <view wx:if="{{def_pick_store && def_pick_store.pickup_name}}"> | 430 | + <view wx:if="{{front_pick && front_pick.pickup_name}}"> |
431 | <view class="flex-space-between address ai_end pdv10"> | 431 | <view class="flex-space-between address ai_end pdv10"> |
432 | <view> | 432 | <view> |
433 | - <text class="fs30 xc-black3 shop_name bold">{{def_pick_store.pickup_name}}</text> | 433 | + <text class="fs30 xc-black3 shop_name bold">{{front_pick.pickup_name}}</text> |
434 | </view> | 434 | </view> |
435 | - <view class="distance fs24" wx:if="{{def_pick_store.distance!=null}}"> | ||
436 | - 距离:{{def_pick_store.distance>1000?filters.toFix(def_pick_store.distance/1000,2)+"km":filters.toFix(def_pick_store.distance,0)+"m"}} | 435 | + <view class="distance fs24" wx:if="{{front_pick.distance!=null}}"> |
436 | + 距离:{{front_pick.distance>1000?filters.toFix(front_pick.distance/1000,2)+"km":filters.toFix(front_pick.distance,0)+"m"}} | ||
437 | </view> | 437 | </view> |
438 | </view> | 438 | </view> |
439 | - <view class="no_store" wx:if="{{only_pk && !only_pk.length}}">(库存不足)</view> | 439 | + <view class="no_store" wx:if="{{front_only_pk && !front_only_pk.length}}">(库存不足)</view> |
440 | <block wx:else> | 440 | <block wx:else> |
441 | - <view class="no_store" wx:if="{{def_pickpu_list && !def_pickpu_list.length}}"> | 441 | + <view class="no_store" wx:if="{{front_def_pickpu_list && !front_def_pickpu_list.length}}"> |
442 | (库存不足) | 442 | (库存不足) |
443 | </view> | 443 | </view> |
444 | <block wx:else> | 444 | <block wx:else> |
445 | - <view class="no_store" wx:if="{{def_pick_store && def_pick_store.is_no_dis}}"> | 445 | + <view class="no_store" wx:if="{{front_pick && front_pick.is_no_dis}}"> |
446 | (配送不匹配) | 446 | (配送不匹配) |
447 | </view> | 447 | </view> |
448 | - <view class="no_store" wx:elif="{{def_pick_store && !def_pick_store.CanOutQty && !filters.is_virtual_gd(sele_g.is_virtual) && sales_rules>=2 && prom_type==0}}"> | 448 | + <view class="no_store" wx:elif="{{front_pick && !front_pick.CanOutQty && !filters.is_virtual_gd(front_g.is_virtual) && sales_rules>=2 && prom_type==0}}"> |
449 | (库存不足) | 449 | (库存不足) |
450 | </view> | 450 | </view> |
451 | </block> | 451 | </block> |
452 | </block> | 452 | </block> |
453 | - <view class="fs24 xc-ash-9f">地址:{{def_pick_store.fulladdress}}</view> | 453 | + <view class="fs24 xc-ash-9f">地址:{{front_pick.fulladdress}}</view> |
454 | </view> | 454 | </view> |
455 | </view> | 455 | </view> |
456 | </view> | 456 | </view> |
packageE/pages/cart/cart2/cart2.js
@@ -1510,6 +1510,11 @@ Page({ | @@ -1510,6 +1510,11 @@ Page({ | ||
1510 | item1.is_post_temp=1; | 1510 | item1.is_post_temp=1; |
1511 | //如果是秒杀,团购的时候,优惠促销和搭配购的时候 | 1511 | //如果是秒杀,团购的时候,优惠促销和搭配购的时候 |
1512 | if([1,2,3,5,6,7,10].indexOf(item1.prom_type)>-1){ | 1512 | if([1,2,3,5,6,7,10].indexOf(item1.prom_type)>-1){ |
1513 | + | ||
1514 | + if(item1.prom_type==1 || item1.prom_type==6) { | ||
1515 | + item1.is_quan=0; | ||
1516 | + } | ||
1517 | + | ||
1513 | var url= "/api/weshop/activitylist/getSJGoodsPriceNew/" + os.stoid | 1518 | var url= "/api/weshop/activitylist/getSJGoodsPriceNew/" + os.stoid |
1514 | + "/" + item1.goods_id + "/"+item1.prom_type+"/" + item1.prom_id + "/" + app.globalData.user_id; | 1519 | + "/" + item1.goods_id + "/"+item1.prom_type+"/" + item1.prom_id + "/" + app.globalData.user_id; |
1515 | await app.request.promiseGet(url,{}).then(res=>{ | 1520 | await app.request.promiseGet(url,{}).then(res=>{ |
@@ -1522,6 +1527,11 @@ Page({ | @@ -1522,6 +1527,11 @@ Page({ | ||
1522 | }else item1.is_order_yh=0; | 1527 | }else item1.is_order_yh=0; |
1523 | 1528 | ||
1524 | item1.is_post_temp=res.data.data.is_post_temp; | 1529 | item1.is_post_temp=res.data.data.is_post_temp; |
1530 | + | ||
1531 | + if(item1.prom_type==1 || item1.prom_type==6) { | ||
1532 | + item1.is_quan=res.data.data.is_quan; | ||
1533 | + } | ||
1534 | + | ||
1525 | } | 1535 | } |
1526 | }) | 1536 | }) |
1527 | } | 1537 | } |
@@ -2008,7 +2018,6 @@ Page({ | @@ -2008,7 +2018,6 @@ Page({ | ||
2008 | //t.data.data.shop_price = tt.data.data.prom_price; | 2018 | //t.data.data.shop_price = tt.data.data.prom_price; |
2009 | gd.shop_price=t.data.data.shop_price = tt.data.data.prom_user_price; | 2019 | gd.shop_price=t.data.data.shop_price = tt.data.data.prom_user_price; |
2010 | th.data.ckeck_quan_price = 0; | 2020 | th.data.ckeck_quan_price = 0; |
2011 | - gd.is_xz_yh = 1; | ||
2012 | 2021 | ||
2013 | t.data.data.fir_rate = tt.data.data.fir_rate; | 2022 | t.data.data.fir_rate = tt.data.data.fir_rate; |
2014 | t.data.data.sec_rate = tt.data.data.sec_rate; | 2023 | t.data.data.sec_rate = tt.data.data.sec_rate; |
@@ -2046,6 +2055,14 @@ Page({ | @@ -2046,6 +2055,14 @@ Page({ | ||
2046 | 2055 | ||
2047 | } | 2056 | } |
2048 | 2057 | ||
2058 | + if (tt.data.data.is_quan) { | ||
2059 | + th.data.ckeck_quan_price = t.data.data.shop_price * gg.goods_num; | ||
2060 | + th.data.check_quan_price_list = t.data.data.shop_price * gg.goods_num + ""; | ||
2061 | + th.data.check_quan_ware_list = t.data.data.erpwareid + ""; | ||
2062 | + } else { | ||
2063 | + gd.is_xz_yh = 1; | ||
2064 | + } | ||
2065 | + | ||
2049 | 2066 | ||
2050 | th.setData({ | 2067 | th.setData({ |
2051 | bn_goods: gd, | 2068 | bn_goods: gd, |
@@ -3911,6 +3928,7 @@ Page({ | @@ -3911,6 +3928,7 @@ Page({ | ||
3911 | is_by_quan = 1; | 3928 | is_by_quan = 1; |
3912 | } | 3929 | } |
3913 | } | 3930 | } |
3931 | + | ||
3914 | if (!is_by_quan) { | 3932 | if (!is_by_quan) { |
3915 | var user_addr = th.data.user_addr; | 3933 | var user_addr = th.data.user_addr; |
3916 | var req_d = { | 3934 | var req_d = { |
@@ -6410,7 +6428,7 @@ Page({ | @@ -6410,7 +6428,7 @@ Page({ | ||
6410 | for (var i in goodlist) { | 6428 | for (var i in goodlist) { |
6411 | var gd = goodlist[i]; | 6429 | var gd = goodlist[i]; |
6412 | //--如果是秒杀就跳出,如果是赠品,如果是组合购限制使用优惠券-- | 6430 | //--如果是秒杀就跳出,如果是赠品,如果是组合购限制使用优惠券-- |
6413 | - if (gd.whsle_id == 1 || gd.prom_type == 1 || gd.is_gift || (gd.prom_type == 7 && gd.act && gd.act.is_xz_yh) || gd.is_xz_yh == 1) { | 6431 | + if (gd.whsle_id == 1 || gd.is_gift || (gd.prom_type == 7 && gd.act && gd.act.is_xz_yh) || gd.is_xz_yh == 1) { |
6414 | continue; | 6432 | continue; |
6415 | } | 6433 | } |
6416 | 6434 | ||
@@ -6421,6 +6439,10 @@ Page({ | @@ -6421,6 +6439,10 @@ Page({ | ||
6421 | } | 6439 | } |
6422 | } | 6440 | } |
6423 | 6441 | ||
6442 | + //--如果是秒杀,要判断有没有限制使用优惠券 | ||
6443 | + if (gd.prom_type == 1 && !gd.is_quan) { | ||
6444 | + continue; | ||
6445 | + } | ||
6424 | 6446 | ||
6425 | //--如果是团购,要判断有没有限制使用优惠券 | 6447 | //--如果是团购,要判断有没有限制使用优惠券 |
6426 | if (gd.prom_type == 2) { | 6448 | if (gd.prom_type == 2) { |
pages/goods/goodsInfo/buy_com_pop.wxml
@@ -72,7 +72,7 @@ | @@ -72,7 +72,7 @@ | ||
72 | <view class="xc-goods-attribute"> | 72 | <view class="xc-goods-attribute"> |
73 | <view hidden="{{ismend==1}}" class="spec-name">商品规格</view> | 73 | <view hidden="{{ismend==1}}" class="spec-name">商品规格</view> |
74 | <view hidden="{{ismend==1}}" style="max-height: 120rpx;overflow-y: auto;"> | 74 | <view hidden="{{ismend==1}}" style="max-height: 120rpx;overflow-y: auto;"> |
75 | - <view class="spec_bt {{gid==item.goods_id?'act':''}}" bindtap="sele_spec" data-nor="1" | 75 | + <view class="spec_bt {{sele_g.goods_id==item.goods_id?'act':''}}" bindtap="sele_spec" data-nor="1" |
76 | data-gid='{{item.goods_id}}' wx:for="{{sku_g_pt}}" wx:key="sku_g"> | 76 | data-gid='{{item.goods_id}}' wx:for="{{sku_g_pt}}" wx:key="sku_g"> |
77 | {{item.gg}} | 77 | {{item.gg}} |
78 | </view> | 78 | </view> |
pages/goods/goodsInfo/buy_integral.wxml
@@ -3,9 +3,9 @@ | @@ -3,9 +3,9 @@ | ||
3 | <view class="pding"> | 3 | <view class="pding"> |
4 | <icon bindtap="closeSpecModal_inte" class="modal-close" color="black" size="22" type="cancel"></icon> | 4 | <icon bindtap="closeSpecModal_inte" class="modal-close" color="black" size="22" type="cancel"></icon> |
5 | <view class="spec-goods"> | 5 | <view class="spec-goods"> |
6 | - <image class="wh100 spec-img xc-distance-bottom" bindtap="previewImage" src="{{data.original_img}}" binderror="pop_err_img" data-errorimg="data.original_img"></image> | 6 | + <image class="wh100 spec-img xc-distance-bottom" bindtap="previewImage" src="{{front_g.original_img}}" binderror="pop_err_img" data-errorimg="data.original_img"></image> |
7 | <view class="spec-goods-info"> | 7 | <view class="spec-goods-info"> |
8 | - <view class="spec-goods-name ellipsis-2">{{data.goods_name}}</view> | 8 | + <view class="spec-goods-name ellipsis-2">{{front_g.goods_name}}</view> |
9 | <view class="flex ai_end xc-val-money"> | 9 | <view class="flex ai_end xc-val-money"> |
10 | <view class="spec-goods-price"> | 10 | <view class="spec-goods-price"> |
11 | <text wx:if="{{prom_integral}}">{{prom_integral}}积分</text> | 11 | <text wx:if="{{prom_integral}}">{{prom_integral}}积分</text> |
@@ -61,7 +61,7 @@ | @@ -61,7 +61,7 @@ | ||
61 | <view class="xc-goods-attribute"> | 61 | <view class="xc-goods-attribute"> |
62 | <view hidden="{{ismend==1}}" class="spec-name">商品规格</view> | 62 | <view hidden="{{ismend==1}}" class="spec-name">商品规格</view> |
63 | <view hidden="{{ismend==1}}" style="max-height: 120rpx;overflow-y: auto;"> | 63 | <view hidden="{{ismend==1}}" style="max-height: 120rpx;overflow-y: auto;"> |
64 | - <view class="spec_bt {{gid==item.goods_id?'act':''}}" bindtap="sele_spec" data-gid='{{item.goods_id}}' wx:for="{{sku_g}}" wx:key="sku_g"> | 64 | + <view class="spec_bt {{sele_g.goods_id==item.goods_id?'act':''}}" bindtap="sele_spec" data-gid='{{item.goods_id}}' wx:for="{{sku_g}}" wx:key="sku_g"> |
65 | {{item.gg}} | 65 | {{item.gg}} |
66 | </view> | 66 | </view> |
67 | </view> | 67 | </view> |
@@ -105,7 +105,7 @@ | @@ -105,7 +105,7 @@ | ||
105 | <view class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999">请先选择门店</view> | 105 | <view class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999">请先选择门店</view> |
106 | </block> | 106 | </block> |
107 | <block wx:else> | 107 | <block wx:else> |
108 | - <block wx:if="{{data.store_count<=0}}"> | 108 | + <block wx:if="{{sele_g.store_count<=0}}"> |
109 | <view class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999">库存不足</view> | 109 | <view class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999">库存不足</view> |
110 | </block> | 110 | </block> |
111 | <block wx:else> | 111 | <block wx:else> |
pages/goods/goodsInfo/buy_pt.wxml
@@ -85,7 +85,7 @@ | @@ -85,7 +85,7 @@ | ||
85 | <view hidden="{{ismend==1}}" class="spec-name">商品规格</view> | 85 | <view hidden="{{ismend==1}}" class="spec-name">商品规格</view> |
86 | <block wx:if="{{is_normal==0}}"> | 86 | <block wx:if="{{is_normal==0}}"> |
87 | <view hidden="{{ismend==1}}" class="flex"> | 87 | <view hidden="{{ismend==1}}" class="flex"> |
88 | - <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">{{item.gg}} | 88 | + <view class="spec_bt {{sele_g.goods_id==item.goods_id?'act':''}}" bindtap="sele_spec" data-gid='{{item.goods_id}}' wx:for="{{sku_g}}" wx:key="sku_g">{{item.gg}} |
89 | </view> | 89 | </view> |
90 | </view> | 90 | </view> |
91 | </block> | 91 | </block> |
pages/goods/goodsInfo/goodsInfo.js
@@ -154,7 +154,10 @@ Page({ | @@ -154,7 +154,10 @@ Page({ | ||
154 | prom_buy_limit: 0, | 154 | prom_buy_limit: 0, |
155 | djs: null, | 155 | djs: null, |
156 | prom_st: 0, | 156 | prom_st: 0, |
157 | + f_prom_st: 0, | ||
157 | prom_r_null: 0, | 158 | prom_r_null: 0, |
159 | + f_prom_r_null: 0, | ||
160 | + | ||
158 | prom_end_time: null, | 161 | prom_end_time: null, |
159 | prom_start_time: null, | 162 | prom_start_time: null, |
160 | prom_act: null, | 163 | prom_act: null, |
@@ -285,6 +288,9 @@ Page({ | @@ -285,6 +288,9 @@ Page({ | ||
285 | istop: 0, //是否置顶风格为1 | 288 | istop: 0, //是否置顶风格为1 |
286 | searchbox_transparent: 1, | 289 | searchbox_transparent: 1, |
287 | template_id:[],//订阅消息id | 290 | template_id:[],//订阅消息id |
291 | + | ||
292 | + fir_set_sto:1, //最初始的一下,获取门店 | ||
293 | + front_pick:null, //在详情页面上显示的门店 | ||
288 | }, | 294 | }, |
289 | 295 | ||
290 | //------初始化加载---------- | 296 | //------初始化加载---------- |
@@ -1020,6 +1026,10 @@ Page({ | @@ -1020,6 +1026,10 @@ Page({ | ||
1020 | var ee = this, | 1026 | var ee = this, |
1021 | gid = this.data.gid, | 1027 | gid = this.data.gid, |
1022 | i = getApp().request; | 1028 | i = getApp().request; |
1029 | + if(this.data.front_g){ | ||
1030 | + gid = this.data.front_g.goods_id; | ||
1031 | + } | ||
1032 | + | ||
1023 | 1033 | ||
1024 | this.wait_for_store_config(); | 1034 | this.wait_for_store_config(); |
1025 | //先检验一下商品的活动情况 | 1035 | //先检验一下商品的活动情况 |
@@ -1192,7 +1202,8 @@ Page({ | @@ -1192,7 +1202,8 @@ Page({ | ||
1192 | ee.setData({ | 1202 | ee.setData({ |
1193 | data: t.data.data, | 1203 | data: t.data.data, |
1194 | sele_g: t.data.data, | 1204 | sele_g: t.data.data, |
1195 | - userInfo: getApp().globalData.userInfo | 1205 | + userInfo: getApp().globalData.userInfo, |
1206 | + front_g: ut.deep_cp(t.data.data), | ||
1196 | }); | 1207 | }); |
1197 | 1208 | ||
1198 | //获取统一条形码,普通商品和优惠促销的商品 | 1209 | //获取统一条形码,普通商品和优惠促销的商品 |
@@ -1224,8 +1235,13 @@ Page({ | @@ -1224,8 +1235,13 @@ Page({ | ||
1224 | } | 1235 | } |
1225 | ee.data.g_buy_num = new Map(); | 1236 | ee.data.g_buy_num = new Map(); |
1226 | 1237 | ||
1238 | + | ||
1239 | + //再返回的时候,prom_id要以f_prom_act为准 | ||
1240 | + var c_prom_id=ee.data.data.prom_id; | ||
1241 | + if(ee.data.f_prom_act) c_prom_id=ee.data.f_prom_act.id; | ||
1242 | + | ||
1227 | //-- 增加相同的活动 -- | 1243 | //-- 增加相同的活动 -- |
1228 | - ee.check_prom(gid, ee.data.data.prom_type, ee.data.data.prom_id); | 1244 | + ee.check_prom(gid, ee.data.data.prom_type, c_prom_id); |
1229 | 1245 | ||
1230 | var th = ee; | 1246 | var th = ee; |
1231 | if (ee.data.cat_name == '') { | 1247 | if (ee.data.cat_name == '') { |
@@ -2272,6 +2288,7 @@ Page({ | @@ -2272,6 +2288,7 @@ Page({ | ||
2272 | openSpecModal_inte: 0, | 2288 | openSpecModal_inte: 0, |
2273 | openSpecModal_inte_normal: 0, | 2289 | openSpecModal_inte_normal: 0, |
2274 | openSpecModal_pt: 0, | 2290 | openSpecModal_pt: 0, |
2291 | + openSpecModal_flash_normal:0 | ||
2275 | }) | 2292 | }) |
2276 | 2293 | ||
2277 | if (e.prom_type == 4) { | 2294 | if (e.prom_type == 4) { |
@@ -2710,11 +2727,11 @@ Page({ | @@ -2710,11 +2727,11 @@ Page({ | ||
2710 | 2727 | ||
2711 | closeSpecModal: function () { | 2728 | closeSpecModal: function () { |
2712 | if (this.data.openSpecModal_pt && this.data.is_normal) { | 2729 | if (this.data.openSpecModal_pt && this.data.is_normal) { |
2713 | - this.get_sto(); | ||
2714 | this.setData({ | 2730 | this.setData({ |
2715 | - sele_g: this.data.data, | ||
2716 | - gid: this.data.data.goods_id | 2731 | + sele_g: this.data.front_g, |
2732 | + gid: this.data.front_g.goods_id | ||
2717 | }) | 2733 | }) |
2734 | + this.get_sto(); | ||
2718 | this.sele_spec_chech_activity(1); | 2735 | this.sele_spec_chech_activity(1); |
2719 | } | 2736 | } |
2720 | 2737 | ||
@@ -2738,6 +2755,8 @@ Page({ | @@ -2738,6 +2755,8 @@ Page({ | ||
2738 | return false; | 2755 | return false; |
2739 | } | 2756 | } |
2740 | 2757 | ||
2758 | + th.setData({def_pick_store: ut.deep_cp(th.data.front_pick)}); | ||
2759 | + | ||
2741 | this.setData({ | 2760 | this.setData({ |
2742 | store: 0, | 2761 | store: 0, |
2743 | choice_sort_store: 0, | 2762 | choice_sort_store: 0, |
@@ -3466,8 +3485,9 @@ Page({ | @@ -3466,8 +3485,9 @@ Page({ | ||
3466 | item['disc'] = txt; | 3485 | item['disc'] = txt; |
3467 | if (item) this.setData({ | 3486 | if (item) this.setData({ |
3468 | sele_g: item, | 3487 | sele_g: item, |
3469 | - gid: gid, | ||
3470 | data: item, | 3488 | data: item, |
3489 | + //gid: gid, //只去掉gid的更新 | ||
3490 | + | ||
3471 | }); | 3491 | }); |
3472 | 3492 | ||
3473 | 3493 | ||
@@ -3914,21 +3934,23 @@ Page({ | @@ -3914,21 +3934,23 @@ Page({ | ||
3914 | } | 3934 | } |
3915 | if(func) func(); | 3935 | if(func) func(); |
3916 | }else{ | 3936 | }else{ |
3917 | - | ||
3918 | if(func) func(); | 3937 | if(func) func(); |
3919 | th.setData({sp_seleing:0}) | 3938 | th.setData({sp_seleing:0}) |
3920 | wx.hideLoading(); | 3939 | wx.hideLoading(); |
3940 | + th.data.fir_set_sto=0; | ||
3921 | } | 3941 | } |
3922 | } else { | 3942 | } else { |
3923 | if(func) func(); | 3943 | if(func) func(); |
3924 | th.setData({sp_seleing:0}) | 3944 | th.setData({sp_seleing:0}) |
3925 | wx.hideLoading(); | 3945 | wx.hideLoading(); |
3946 | + th.data.fir_set_sto=0; | ||
3926 | } | 3947 | } |
3927 | },err=>{ | 3948 | },err=>{ |
3928 | ut.m_toast('网络繁忙,请稍后重试'); | 3949 | ut.m_toast('网络繁忙,请稍后重试'); |
3929 | if(func) func(); | 3950 | if(func) func(); |
3930 | th.setData({sp_seleing:0}) | 3951 | th.setData({sp_seleing:0}) |
3931 | wx.hideLoading(); | 3952 | wx.hideLoading(); |
3953 | + th.data.fir_set_sto=0; | ||
3932 | }) | 3954 | }) |
3933 | }, 200) | 3955 | }, 200) |
3934 | 3956 | ||
@@ -4035,6 +4057,28 @@ Page({ | @@ -4035,6 +4057,28 @@ Page({ | ||
4035 | } | 4057 | } |
4036 | }, | 4058 | }, |
4037 | 4059 | ||
4060 | + | ||
4061 | + | ||
4062 | + //处理首页的显示门店 | ||
4063 | + deal_front_pk(){ | ||
4064 | + var th=this; | ||
4065 | + if(this.data.fir_set_sto==1){ | ||
4066 | + this.data.fir_set_sto=0; | ||
4067 | + var cp_data=null | ||
4068 | + if(th.data.def_pick_store && th.data.def_pick_store.pickup_id){ | ||
4069 | + cp_data=JSON.parse(JSON.stringify(th.data.def_pick_store)); | ||
4070 | + } | ||
4071 | + th.setData({ | ||
4072 | + front_pick:cp_data, | ||
4073 | + front_only_pk:th.data.only_pk, | ||
4074 | + front_def_pickpu_list:th.data.def_pickpu_list, | ||
4075 | + front_pickpu_listt:th.data.pickpu_list, | ||
4076 | + front_all_sto:th.data.all_sto, | ||
4077 | + front_is_show_sto_cat:th.data.is_show_sto_cat, | ||
4078 | + }) | ||
4079 | + } | ||
4080 | + }, | ||
4081 | + | ||
4038 | //------------处理门店--------------- | 4082 | //------------处理门店--------------- |
4039 | deal_pickup(e) { | 4083 | deal_pickup(e) { |
4040 | var th = this; | 4084 | var th = this; |
@@ -4227,6 +4271,11 @@ Page({ | @@ -4227,6 +4271,11 @@ Page({ | ||
4227 | }) | 4271 | }) |
4228 | } | 4272 | } |
4229 | } | 4273 | } |
4274 | + | ||
4275 | + | ||
4276 | + //-- 设置商品详情页面的门店显示情况 --- | ||
4277 | + th.deal_front_pk(); | ||
4278 | + | ||
4230 | } else { | 4279 | } else { |
4231 | th.setData({ | 4280 | th.setData({ |
4232 | is_show_sto_cat: -1, | 4281 | is_show_sto_cat: -1, |
@@ -4242,6 +4291,9 @@ Page({ | @@ -4242,6 +4291,9 @@ Page({ | ||
4242 | }) | 4291 | }) |
4243 | } | 4292 | } |
4244 | 4293 | ||
4294 | + //-- 设置商品详情页面的门店显示情况 --- | ||
4295 | + th.deal_front_pk(); | ||
4296 | + | ||
4245 | } | 4297 | } |
4246 | } | 4298 | } |
4247 | }); | 4299 | }); |
@@ -4259,7 +4311,11 @@ Page({ | @@ -4259,7 +4311,11 @@ Page({ | ||
4259 | sto_sele_distr: e.data.data.pageData[0].distr_type | 4311 | sto_sele_distr: e.data.data.pageData[0].distr_type |
4260 | }) | 4312 | }) |
4261 | } | 4313 | } |
4314 | + | ||
4315 | + //-- 设置商品详情页面的门店显示情况 --- | ||
4316 | + th.deal_front_pk(); | ||
4262 | } | 4317 | } |
4318 | + | ||
4263 | }, | 4319 | }, |
4264 | 4320 | ||
4265 | //------------处理线下门店库存-------- | 4321 | //------------处理线下门店库存-------- |
@@ -4366,6 +4422,7 @@ Page({ | @@ -4366,6 +4422,7 @@ Page({ | ||
4366 | 4422 | ||
4367 | 4423 | ||
4368 | } else { | 4424 | } else { |
4425 | + th.data.fir_set_sto=0; | ||
4369 | th.setData({ | 4426 | th.setData({ |
4370 | all_sto: null, | 4427 | all_sto: null, |
4371 | only_pk: null, | 4428 | only_pk: null, |
@@ -4463,7 +4520,8 @@ Page({ | @@ -4463,7 +4520,8 @@ Page({ | ||
4463 | th.deal_pickup(em); | 4520 | th.deal_pickup(em); |
4464 | 4521 | ||
4465 | } else { | 4522 | } else { |
4466 | - | 4523 | + |
4524 | + th.data.fir_set_sto=0; | ||
4467 | th.setData({ | 4525 | th.setData({ |
4468 | all_sto: null, | 4526 | all_sto: null, |
4469 | only_pk: null, | 4527 | only_pk: null, |
@@ -4473,6 +4531,7 @@ Page({ | @@ -4473,6 +4531,7 @@ Page({ | ||
4473 | 4531 | ||
4474 | } else { | 4532 | } else { |
4475 | 4533 | ||
4534 | + th.data.fir_set_sto=0; | ||
4476 | th.setData({ | 4535 | th.setData({ |
4477 | all_sto: null, | 4536 | all_sto: null, |
4478 | only_pk: null, | 4537 | only_pk: null, |
@@ -4749,7 +4808,9 @@ Page({ | @@ -4749,7 +4808,9 @@ Page({ | ||
4749 | if (em.data.code == 0) { | 4808 | if (em.data.code == 0) { |
4750 | 4809 | ||
4751 | if (em.data.data <= 0) ee.setData({ | 4810 | if (em.data.data <= 0) ee.setData({ |
4752 | - prom_r_null: 1,pro_null:1 | 4811 | + prom_r_null: 1, |
4812 | + f_prom_r_null: 1, | ||
4813 | + pro_null:1, | ||
4753 | }); | 4814 | }); |
4754 | //拿取价格并且判断时间-- | 4815 | //拿取价格并且判断时间-- |
4755 | getApp().request.get("/api/ms/flash_sale/getNew/" + os.stoid + "/" + user_id + "/" + prom_id, { | 4816 | getApp().request.get("/api/ms/flash_sale/getNew/" + os.stoid + "/" + user_id + "/" + prom_id, { |
@@ -4788,6 +4849,7 @@ Page({ | @@ -4788,6 +4849,7 @@ Page({ | ||
4788 | prom_id: prom_id, | 4849 | prom_id: prom_id, |
4789 | prom_buy_limit: t.data.data.buy_limit, | 4850 | prom_buy_limit: t.data.data.buy_limit, |
4790 | prom_act: t.data.data, | 4851 | prom_act: t.data.data, |
4852 | + f_prom_act: t.data.data, | ||
4791 | prom_end_time: prom_end_time, | 4853 | prom_end_time: prom_end_time, |
4792 | prom_start_time: prom_start_time, | 4854 | prom_start_time: prom_start_time, |
4793 | isshow: 1, | 4855 | isshow: 1, |
@@ -4806,7 +4868,8 @@ Page({ | @@ -4806,7 +4868,8 @@ Page({ | ||
4806 | if (endTime2 > newTime) { | 4868 | if (endTime2 > newTime) { |
4807 | ee.setData({ | 4869 | ee.setData({ |
4808 | prom_time_text: '距秒杀结束还有', | 4870 | prom_time_text: '距秒杀结束还有', |
4809 | - prom_st: 1 | 4871 | + prom_st: 1, |
4872 | + f_prom_st: 1 | ||
4810 | }) | 4873 | }) |
4811 | ee.countDown(endTime2); | 4874 | ee.countDown(endTime2); |
4812 | } | 4875 | } |
@@ -5248,7 +5311,8 @@ Page({ | @@ -5248,7 +5311,8 @@ Page({ | ||
5248 | var endTime2 = th.data.prom_act.end_time; | 5311 | var endTime2 = th.data.prom_act.end_time; |
5249 | th.setData({ | 5312 | th.setData({ |
5250 | prom_time_text: '距结束还剩:', | 5313 | prom_time_text: '距结束还剩:', |
5251 | - prom_st: 1 | 5314 | + prom_st: 1, |
5315 | + f_prom_st: 1, | ||
5252 | }) | 5316 | }) |
5253 | setTimeout(function () { | 5317 | setTimeout(function () { |
5254 | th.countDown(endTime2) | 5318 | th.countDown(endTime2) |
@@ -5265,7 +5329,8 @@ Page({ | @@ -5265,7 +5329,8 @@ Page({ | ||
5265 | } | 5329 | } |
5266 | th.setData({ | 5330 | th.setData({ |
5267 | prom_time_text: '活动已经结束:', | 5331 | prom_time_text: '活动已经结束:', |
5268 | - prom_st: 3 | 5332 | + prom_st: 3, |
5333 | + f_prom_st: 3 | ||
5269 | }) | 5334 | }) |
5270 | th.setData({ | 5335 | th.setData({ |
5271 | djs: obj | 5336 | djs: obj |
@@ -5416,9 +5481,9 @@ Page({ | @@ -5416,9 +5481,9 @@ Page({ | ||
5416 | //如果是拼单活动的普通购买 | 5481 | //如果是拼单活动的普通购买 |
5417 | if (ind == 1) { | 5482 | if (ind == 1) { |
5418 | 5483 | ||
5419 | - | ||
5420 | - //要把不匹配还原 | ||
5421 | - if (th.data.def_pick_store && JSON.stringify(th.data.def_pick_store) != '{}'){ | 5484 | + if(th.data.front_pick){ |
5485 | + th.setData({def_pick_store: ut.deep_cp(th.data.front_pick)}); | ||
5486 | + }else if (th.data.def_pick_store && JSON.stringify(th.data.def_pick_store) != '{}'){ //要把不匹配还原 | ||
5422 | th.data.def_pick_store.is_no_dis_nor=0; | 5487 | th.data.def_pick_store.is_no_dis_nor=0; |
5423 | th.setData({def_pick_store:th.data.def_pick_store}) | 5488 | th.setData({def_pick_store:th.data.def_pick_store}) |
5424 | } | 5489 | } |
@@ -5870,6 +5935,14 @@ Page({ | @@ -5870,6 +5935,14 @@ Page({ | ||
5870 | //----------立即购买_pt----------- | 5935 | //----------立即购买_pt----------- |
5871 | buyNow_pt: function (e) { | 5936 | buyNow_pt: function (e) { |
5872 | 5937 | ||
5938 | + this.setData({ | ||
5939 | + openSpecModal: 0, | ||
5940 | + openSpecModal_inte: 0, | ||
5941 | + openSpecModal_inte_normal: 0, | ||
5942 | + openSpecModal_pt: 0, | ||
5943 | + openSpecModal_flash_normal:0 | ||
5944 | + }) | ||
5945 | + | ||
5873 | wxlog.info(getApp().globalData.user_id+'-拼团立即购买:'+JSON.stringify(e)); | 5946 | wxlog.info(getApp().globalData.user_id+'-拼团立即购买:'+JSON.stringify(e)); |
5874 | 5947 | ||
5875 | s.set_b_now(e); | 5948 | s.set_b_now(e); |
@@ -5994,7 +6067,7 @@ Page({ | @@ -5994,7 +6067,7 @@ Page({ | ||
5994 | } else { | 6067 | } else { |
5995 | console.log(222, goods_id) | 6068 | console.log(222, goods_id) |
5996 | wx.navigateTo({ | 6069 | wx.navigateTo({ |
5997 | - url: "/pages/team/team_show/team_show?tg_id=" + id + "&goods_id=" + goods_id, | 6070 | + url: "/packageG/pages/team/team_show/team_show?tg_id=" + id + "&goods_id=" + goods_id, |
5998 | }); | 6071 | }); |
5999 | } | 6072 | } |
6000 | } | 6073 | } |
@@ -6002,7 +6075,7 @@ Page({ | @@ -6002,7 +6075,7 @@ Page({ | ||
6002 | else { | 6075 | else { |
6003 | console.log(1111, th.data.goods_id) | 6076 | console.log(1111, th.data.goods_id) |
6004 | wx.navigateTo({ | 6077 | wx.navigateTo({ |
6005 | - url: "/pages/team/team_show/team_show?tg_id=" + id + "&goods_id=" + goods_id, | 6078 | + url: "/packageG/pages/team/team_show/team_show?tg_id=" + id + "&goods_id=" + goods_id, |
6006 | }); | 6079 | }); |
6007 | } | 6080 | } |
6008 | } | 6081 | } |
@@ -7299,6 +7372,11 @@ Page({ | @@ -7299,6 +7372,11 @@ Page({ | ||
7299 | choice_store: function (ee) { | 7372 | choice_store: function (ee) { |
7300 | var th = this; | 7373 | var th = this; |
7301 | var ind = ee.currentTarget.dataset.ind; | 7374 | var ind = ee.currentTarget.dataset.ind; |
7375 | + var isfront = ee.currentTarget.dataset.isfront; | ||
7376 | + | ||
7377 | + th.data.isfront=0; | ||
7378 | + if(isfront) th.data.isfront=1; | ||
7379 | + | ||
7302 | var bconfig = th.data.bconfig; | 7380 | var bconfig = th.data.bconfig; |
7303 | this.setData({ | 7381 | this.setData({ |
7304 | keyword:'' | 7382 | keyword:'' |
@@ -7318,40 +7396,92 @@ Page({ | @@ -7318,40 +7396,92 @@ Page({ | ||
7318 | return false; | 7396 | return false; |
7319 | } | 7397 | } |
7320 | 7398 | ||
7321 | - if (!th.data.only_pk && !th.data.def_pickpu_list && !th.data.change) { | ||
7322 | - // getApp().confirmBox("门店库存不足", null, 25000, !1); | ||
7323 | - wx.showToast({ | ||
7324 | - title: '门店库存不足', | ||
7325 | - icon: 'none', | ||
7326 | - }); | ||
7327 | - return false; | ||
7328 | - } | ||
7329 | - th.data.change = 0; | 7399 | + if(th.data.isfront==1){ |
7330 | 7400 | ||
7331 | - if (th.data.only_pk && !th.data.only_pk.length) { | ||
7332 | - // getApp().confirmBox("门店库存不足", null, 25000, !1); | ||
7333 | - wx.showToast({ | ||
7334 | - title: '门店库存不足', | ||
7335 | - icon: 'none', | ||
7336 | - }); | ||
7337 | - return false; | ||
7338 | - } | ||
7339 | - if (th.data.def_pickpu_list && !th.data.def_pickpu_list.length) { | ||
7340 | - // getApp().confirmBox("门店库存不足", null, 25000, !1); | ||
7341 | - wx.showToast({ | ||
7342 | - title: '门店库存不足', | ||
7343 | - icon: 'none', | ||
7344 | - }); | ||
7345 | - return false; | ||
7346 | - } | 7401 | + if (!th.data.front_only_pk && !th.data.front_def_pickpu_list && !th.data.change) { |
7402 | + // getApp().confirmBox("门店库存不足", null, 25000, !1); | ||
7403 | + wx.showToast({ | ||
7404 | + title: '门店库存不足', | ||
7405 | + icon: 'none', | ||
7406 | + }); | ||
7407 | + return false; | ||
7408 | + } | ||
7409 | + th.data.change = 0; | ||
7410 | + | ||
7411 | + if (th.data.front_only_pk && !th.data.front_only_pk.length) { | ||
7412 | + // getApp().confirmBox("门店库存不足", null, 25000, !1); | ||
7413 | + wx.showToast({ | ||
7414 | + title: '门店库存不足', | ||
7415 | + icon: 'none', | ||
7416 | + }); | ||
7417 | + return false; | ||
7418 | + } | ||
7419 | + if (th.data.front_def_pickpu_list && !th.data.front_def_pickpu_list.length) { | ||
7420 | + // getApp().confirmBox("门店库存不足", null, 25000, !1); | ||
7421 | + wx.showToast({ | ||
7422 | + title: '门店库存不足', | ||
7423 | + icon: 'none', | ||
7424 | + }); | ||
7425 | + return false; | ||
7426 | + } | ||
7427 | + | ||
7428 | + //-- 把默认的数据拿过来,数据传递要用深拷贝 -- | ||
7429 | + th.setData({ | ||
7430 | + def_pick_store: ut.deep_cp(th.data.front_pick), | ||
7431 | + only_pk:ut.deep_cp(th.data.front_only_pk), | ||
7432 | + def_pickpu_list:ut.deep_cp(th.data.front_def_pickpu_list), | ||
7433 | + pickpu_list:ut.deep_cp(th.data.front_pickpu_listt), | ||
7434 | + all_sto:ut.deep_cp(th.data.front_all_sto), | ||
7435 | + is_show_sto_cat:th.data.front_is_show_sto_cat | ||
7436 | + }) | ||
7437 | + | ||
7438 | + | ||
7439 | + this.setData({ | ||
7440 | + open_ind_store: ind, | ||
7441 | + store: 1, | ||
7442 | + openSpecModal: !1, | ||
7443 | + openSpecModal_pt: !1, | ||
7444 | + openSpecModal_flash_normal: !1, | ||
7445 | + }) | ||
7347 | 7446 | ||
7348 | - //如果开启了,则不在选择门店 | ||
7349 | - if (th.data.sys_switch.is_pricing_open_store && getApp().globalData.pk_store) { | ||
7350 | return false; | 7447 | return false; |
7448 | + | ||
7449 | + | ||
7450 | + }else{ | ||
7451 | + if (!th.data.only_pk && !th.data.def_pickpu_list && !th.data.change) { | ||
7452 | + // getApp().confirmBox("门店库存不足", null, 25000, !1); | ||
7453 | + wx.showToast({ | ||
7454 | + title: '门店库存不足', | ||
7455 | + icon: 'none', | ||
7456 | + }); | ||
7457 | + return false; | ||
7458 | + } | ||
7459 | + th.data.change = 0; | ||
7460 | + | ||
7461 | + if (th.data.only_pk && !th.data.only_pk.length) { | ||
7462 | + // getApp().confirmBox("门店库存不足", null, 25000, !1); | ||
7463 | + wx.showToast({ | ||
7464 | + title: '门店库存不足', | ||
7465 | + icon: 'none', | ||
7466 | + }); | ||
7467 | + return false; | ||
7468 | + } | ||
7469 | + if (th.data.def_pickpu_list && !th.data.def_pickpu_list.length) { | ||
7470 | + // getApp().confirmBox("门店库存不足", null, 25000, !1); | ||
7471 | + wx.showToast({ | ||
7472 | + title: '门店库存不足', | ||
7473 | + icon: 'none', | ||
7474 | + }); | ||
7475 | + return false; | ||
7476 | + } | ||
7477 | + | ||
7351 | } | 7478 | } |
7352 | 7479 | ||
7353 | 7480 | ||
7354 | 7481 | ||
7482 | + | ||
7483 | + | ||
7484 | + | ||
7355 | if (bconfig && bconfig.is_sort_storage) { | 7485 | if (bconfig && bconfig.is_sort_storage) { |
7356 | wx.getLocation({ | 7486 | wx.getLocation({ |
7357 | type: 'gcj02', | 7487 | type: 'gcj02', |
@@ -7496,12 +7626,18 @@ Page({ | @@ -7496,12 +7626,18 @@ Page({ | ||
7496 | check_the_pick(item, func) { | 7626 | check_the_pick(item, func) { |
7497 | var th = this; | 7627 | var th = this; |
7498 | var goodsinfo = th.data.sele_g; | 7628 | var goodsinfo = th.data.sele_g; |
7629 | + | ||
7630 | + if(th.data.isfront){ | ||
7631 | + goodsinfo=this.data.front_g; | ||
7632 | + } | ||
7633 | + | ||
7634 | + | ||
7499 | var erpwareid = goodsinfo.erpwareid; | 7635 | var erpwareid = goodsinfo.erpwareid; |
7500 | var plist = null; | 7636 | var plist = null; |
7501 | var lock = 0; | 7637 | var lock = 0; |
7502 | 7638 | ||
7503 | //---如果是活动的时候,同时不是普通购买--- | 7639 | //---如果是活动的时候,同时不是普通购买--- |
7504 | - if (getApp().is_virtual(th.data.sele_g) || th.data.sele_g.whsle_id || ([1, 2, 4, 6, 8, 9].indexOf(th.data.prom_type) > -1 && !th.data.is_normal)) { | 7640 | + if (getApp().is_virtual(goodsinfo) || goodsinfo.whsle_id || ([1, 2, 4, 6, 8, 9].indexOf(th.data.prom_type) > -1 && !th.data.is_normal)) { |
7505 | func(); | 7641 | func(); |
7506 | return false; | 7642 | return false; |
7507 | } | 7643 | } |
@@ -7630,6 +7766,10 @@ Page({ | @@ -7630,6 +7766,10 @@ Page({ | ||
7630 | if (!th.data.sele_g) return false; | 7766 | if (!th.data.sele_g) return false; |
7631 | //判断门店的配送方式是不是匹配 | 7767 | //判断门店的配送方式是不是匹配 |
7632 | var g_distr_type = th.data.sele_g.distr_type; | 7768 | var g_distr_type = th.data.sele_g.distr_type; |
7769 | + if(th.data.isfront==1){ | ||
7770 | + g_distr_type = th.data.data.distr_type; | ||
7771 | + } | ||
7772 | + | ||
7633 | if (item.distr_type != 0 && g_distr_type != 0 && item.distr_type != g_distr_type) { | 7773 | if (item.distr_type != 0 && g_distr_type != 0 && item.distr_type != g_distr_type) { |
7634 | wx.showToast({ | 7774 | wx.showToast({ |
7635 | title: "门店配送方式不匹配,请选择其他门店", | 7775 | title: "门店配送方式不匹配,请选择其他门店", |
@@ -7651,6 +7791,14 @@ Page({ | @@ -7651,6 +7791,14 @@ Page({ | ||
7651 | fir_pick_index: 0 | 7791 | fir_pick_index: 0 |
7652 | }); | 7792 | }); |
7653 | 7793 | ||
7794 | + | ||
7795 | + if(th.data.isfront){ | ||
7796 | + th.setData({ | ||
7797 | + front_pick: ut.deep_cp(item) | ||
7798 | + }) | ||
7799 | + } | ||
7800 | + | ||
7801 | + | ||
7654 | switch (openindstore) { | 7802 | switch (openindstore) { |
7655 | case 1: | 7803 | case 1: |
7656 | th.setData({ | 7804 | th.setData({ |
@@ -8345,8 +8493,12 @@ Page({ | @@ -8345,8 +8493,12 @@ Page({ | ||
8345 | 8493 | ||
8346 | }, | 8494 | }, |
8347 | 8495 | ||
8348 | - //-- 积分购 -- | 8496 | + //-- 积分购购买弹出框 -- |
8349 | go_pay_integral: function () { | 8497 | go_pay_integral: function () { |
8498 | + | ||
8499 | + //-- 在打开弹出框的时候,front_pk门店要赋值 -- | ||
8500 | + this.setData({def_pick_store: ut.deep_cp(this.data.front_pick)}); | ||
8501 | + | ||
8350 | this.data.g_buy_num = new Map(); | 8502 | this.data.g_buy_num = new Map(); |
8351 | this.get_sto(0) | 8503 | this.get_sto(0) |
8352 | this.setData({ | 8504 | this.setData({ |
@@ -8355,14 +8507,15 @@ Page({ | @@ -8355,14 +8507,15 @@ Page({ | ||
8355 | }); | 8507 | }); |
8356 | }, | 8508 | }, |
8357 | 8509 | ||
8358 | - //-- 积分购普通购买 -- | 8510 | + //-- 积分购普通购买弹出框 -- |
8359 | go_pay_integral_normal:async function () { | 8511 | go_pay_integral_normal:async function () { |
8360 | 8512 | ||
8361 | this.data.g_buy_num = new Map(); | 8513 | this.data.g_buy_num = new Map(); |
8362 | var th = this; | 8514 | var th = this; |
8363 | 8515 | ||
8364 | - //要把不匹配还原 | ||
8365 | - if (th.data.def_pick_store && JSON.stringify(th.data.def_pick_store) != '{}'){ | 8516 | + if(th.data.front_pick){ |
8517 | + th.setData({def_pick_store: ut.deep_cp(th.data.front_pick)}); | ||
8518 | + }else if (th.data.def_pick_store && JSON.stringify(th.data.def_pick_store) != '{}'){ //要把不匹配还原 | ||
8366 | th.data.def_pick_store.is_no_dis_nor=0; | 8519 | th.data.def_pick_store.is_no_dis_nor=0; |
8367 | th.setData({def_pick_store:th.data.def_pick_store}) | 8520 | th.setData({def_pick_store:th.data.def_pick_store}) |
8368 | } | 8521 | } |
@@ -8400,13 +8553,12 @@ Page({ | @@ -8400,13 +8553,12 @@ Page({ | ||
8400 | this.setData({ | 8553 | this.setData({ |
8401 | openSpecModal_inte_normal: 0 | 8554 | openSpecModal_inte_normal: 0 |
8402 | }); | 8555 | }); |
8403 | - //要进行还原 | ||
8404 | - this.get_sto(); | 8556 | + //要进行还原 |
8405 | this.setData({ | 8557 | this.setData({ |
8406 | - sele_g: this.data.data, | ||
8407 | - gid: this.data.data.goods_id | 8558 | + sele_g: ut.deep_cp(this.data.front_g), |
8559 | + gid: this.data.front_g.goods_id | ||
8408 | }) | 8560 | }) |
8409 | - | 8561 | + this.get_sto(); |
8410 | this.sele_spec_chech_activity(); | 8562 | this.sele_spec_chech_activity(); |
8411 | }, | 8563 | }, |
8412 | 8564 |
pages/goods/goodsInfo/goodsInfo.wxml
@@ -115,8 +115,8 @@ | @@ -115,8 +115,8 @@ | ||
115 | 115 | ||
116 | <view class="abs flex fs36" style="align-items:flex-end;color: #fff; margin-top: 34rpx; margin-left: 10rpx; height: 60rpx">¥{{prom_price}} | 116 | <view class="abs flex fs36" style="align-items:flex-end;color: #fff; margin-top: 34rpx; margin-left: 10rpx; height: 60rpx">¥{{prom_price}} |
117 | 117 | ||
118 | - <view wx:if="{{is_retail_price}}" class="word-line fs24 no_line_c" style="margin-left: 10rpx;position: relative;top: -6rpx; color:#fff !important">零售价:¥{{filters.toFix(data.market_price,2)}}</view> | ||
119 | - <view wx:else class="word-line no_line_x fs24" style="margin-left: 10rpx;position: relative;top: -6rpx;color:#fff !important">¥{{filters.toFix(data.shop_price,2)}}</view> | 118 | + <view wx:if="{{is_retail_price}}" class="word-line fs24 no_line_c" style="margin-left: 10rpx;position: relative;top: -6rpx; color:#fff !important">零售价:¥{{filters.toFix(front_g.market_price,2)}}</view> |
119 | + <view wx:else class="word-line no_line_x fs24" style="margin-left: 10rpx;position: relative;top: -6rpx;color:#fff !important">¥{{filters.toFix(front_g.shop_price,2)}}</view> | ||
120 | </view> | 120 | </view> |
121 | 121 | ||
122 | <image class="abs" style="width: 120rpx;top: 32rpx; right: 220rpx;" mode="widthFix" src='{{iurl+"/miniapp/images/activity-time.png"}}'></image> | 122 | <image class="abs" style="width: 120rpx;top: 32rpx; right: 220rpx;" mode="widthFix" src='{{iurl+"/miniapp/images/activity-time.png"}}'></image> |
@@ -143,8 +143,8 @@ | @@ -143,8 +143,8 @@ | ||
143 | <view class="flex fs35 xc-qtsign">¥</view> | 143 | <view class="flex fs35 xc-qtsign">¥</view> |
144 | <view class="fs50 val">{{prom_price}}</view> | 144 | <view class="fs50 val">{{prom_price}}</view> |
145 | </view> | 145 | </view> |
146 | - <view wx:if="{{is_retail_price}}" class="word-line fs20 xc-qtunit-price no_line_c" style="color:#fff !important ">零售价:¥{{filters.toFix(data.market_price,2)}}</view> | ||
147 | - <view wx:else class="word-line no_line_x fs20 xc-qtunit-price" style="color:#fff !important ">¥{{filters.toFix(data.shop_price,2)}}</view> | 146 | + <view wx:if="{{is_retail_price}}" class="word-line fs20 xc-qtunit-price no_line_c" style="color:#fff !important ">零售价:¥{{filters.toFix(front_g.market_price,2)}}</view> |
147 | + <view wx:else class="word-line no_line_x fs20 xc-qtunit-price" style="color:#fff !important ">¥{{filters.toFix(front_g.shop_price,2)}}</view> | ||
148 | </view> | 148 | </view> |
149 | 149 | ||
150 | <view class="abs white xc-nanber"> | 150 | <view class="abs white xc-nanber"> |
@@ -199,7 +199,7 @@ | @@ -199,7 +199,7 @@ | ||
199 | <!-- 许程 商家团主页 --> | 199 | <!-- 许程 商家团主页 --> |
200 | <view class="xc-goods-explain flex-vertical-between"> | 200 | <view class="xc-goods-explain flex-vertical-between"> |
201 | <view class="xc-explain fs32 ellipsis-2" wx:if="{{prom_type!=0 }}"> | 201 | <view class="xc-explain fs32 ellipsis-2" wx:if="{{prom_type!=0 }}"> |
202 | - {{data.goods_name}} | 202 | + {{front_g.goods_name}} |
203 | </view> | 203 | </view> |
204 | <!-- 这个是分享按钮 --> | 204 | <!-- 这个是分享按钮 --> |
205 | <view wx:if="{{isLogin}}" class="xc-share-frame t-c shrink0" bindtap="clickShare"> | 205 | <view wx:if="{{isLogin}}" class="xc-share-frame t-c shrink0" bindtap="clickShare"> |
@@ -236,7 +236,7 @@ | @@ -236,7 +236,7 @@ | ||
236 | 236 | ||
237 | <block wx:for="{{teamgroup}}" wx:for-index="t_ind"> | 237 | <block wx:for="{{teamgroup}}" wx:for-index="t_ind"> |
238 | <view class='group' wx:if="{{item.open_num>0}}" > | 238 | <view class='group' wx:if="{{item.open_num>0}}" > |
239 | - <view class='group-list' bindtap="go_cj_team" data-ind="{{t_ind}}" data-goodsid="{{data.goods_id}}"> | 239 | + <view class='group-list' bindtap="go_cj_team" data-ind="{{t_ind}}" data-goodsid="{{front_g.goods_id}}"> |
240 | <!-- <view class="flex ai_c"> --> | 240 | <!-- <view class="flex ai_c"> --> |
241 | <!-- //选项框头像 --> | 241 | <!-- //选项框头像 --> |
242 | <view class='gtou'> | 242 | <view class='gtou'> |
@@ -283,11 +283,11 @@ | @@ -283,11 +283,11 @@ | ||
283 | <text class="rel_txt" wx:if="{{!prom_integral && !prom_price}}">0积分</text> | 283 | <text class="rel_txt" wx:if="{{!prom_integral && !prom_price}}">0积分</text> |
284 | 284 | ||
285 | <text wx:if="{{is_retail_price}}" class="rel_txt fs22 no_line_x" decode="{{true}}" space="{{true}}" style="color: #999; text-decoration: line-through;"> | 285 | <text wx:if="{{is_retail_price}}" class="rel_txt fs22 no_line_x" decode="{{true}}" space="{{true}}" style="color: #999; text-decoration: line-through;"> |
286 | - 零售价:¥{{filters.toFix(data.market_price,2)}} | 286 | + 零售价:¥{{filters.toFix(front_g.market_price,2)}} |
287 | </text> | 287 | </text> |
288 | 288 | ||
289 | <text wx:else class="rel_txt fs22" decode="{{true}}" space="{{true}}" style="color: #999; text-decoration: line-through;"> | 289 | <text wx:else class="rel_txt fs22" decode="{{true}}" space="{{true}}" style="color: #999; text-decoration: line-through;"> |
290 | - ¥{{filters.toFix(data.shop_price,2)}} | 290 | + ¥{{filters.toFix(front_g.shop_price,2)}} |
291 | </text> | 291 | </text> |
292 | 292 | ||
293 | </view> | 293 | </view> |
@@ -304,13 +304,13 @@ | @@ -304,13 +304,13 @@ | ||
304 | {{prom_act.show_time_off}}开始兑换 | 304 | {{prom_act.show_time_off}}开始兑换 |
305 | </view> | 305 | </view> |
306 | <view class="goods-title"> | 306 | <view class="goods-title"> |
307 | - <image wx:if="{{data.commission > 0}}" style="width: 25rpx;height: 25rpx;margin-right: 6rpx;" src="https://mshop-lib.yolipai.net/template/mobile/new/static/images/addmoney.png"></image> | ||
308 | - <view class="goods-name elli">{{data.goods_name}}</view> | 307 | + <image wx:if="{{front_g.commission > 0}}" style="width: 25rpx;height: 25rpx;margin-right: 6rpx;" src="https://mshop-lib.yolipai.net/template/mobile/new/static/images/addmoney.png"></image> |
308 | + <view class="goods-name elli">{{front_g.goods_name}}</view> | ||
309 | </view> | 309 | </view> |
310 | <view class="goods-num"> | 310 | <view class="goods-num"> |
311 | <view class="sales">销量:{{prom_act.buy_num+prom_act.virtual}}件</view> | 311 | <view class="sales">销量:{{prom_act.buy_num+prom_act.virtual}}件</view> |
312 | <view class="stock"> | 312 | <view class="stock"> |
313 | - 折扣:{{g_filters.num((prom_price?prom_price:0)*10/data.shop_price)}}折 | 313 | + 折扣:{{g_filters.num((prom_price?prom_price:0)*10/front_g.shop_price)}}折 |
314 | </view> | 314 | </view> |
315 | <view class="stock">{{categories3[0].num}}人评价</view> | 315 | <view class="stock">{{categories3[0].num}}人评价</view> |
316 | </view> | 316 | </view> |
@@ -327,21 +327,21 @@ | @@ -327,21 +327,21 @@ | ||
327 | <view class="co-red" wx:if="{{prom_type==0 || prom_type==3}}"> | 327 | <view class="co-red" wx:if="{{prom_type==0 || prom_type==3}}"> |
328 | 328 | ||
329 | <view class="market-price flex" style="align-items: baseline;"> | 329 | <view class="market-price flex" style="align-items: baseline;"> |
330 | - <block wx:if="{{card_field && data[card_field]>0}}"> | 330 | + <block wx:if="{{card_field && front_g[card_field]>0}}"> |
331 | <view class="flex ai-center grade-card-frame"> | 331 | <view class="flex ai-center grade-card-frame"> |
332 | <image class="img" src="{{iurl}}/miniapp/images/userinfo/userinfo/privilege_t.png"></image> | 332 | <image class="img" src="{{iurl}}/miniapp/images/userinfo/userinfo/privilege_t.png"></image> |
333 | <view class="fs24 white view card-name ellipsis-1">{{card_name}}</view> | 333 | <view class="fs24 white view card-name ellipsis-1">{{card_name}}</view> |
334 | </view> | 334 | </view> |
335 | <text class="rel yuan">¥</text> | 335 | <text class="rel yuan">¥</text> |
336 | - {{filters.toFix(data[card_field],2)}} | 336 | + {{filters.toFix(front_g[card_field],2)}} |
337 | </block> | 337 | </block> |
338 | 338 | ||
339 | <block wx:else > | 339 | <block wx:else > |
340 | - <text class="rel yuan">¥</text>{{filters.toFix(data.shop_price,2)}} | 340 | + <text class="rel yuan">¥</text>{{filters.toFix(front_g.shop_price,2)}} |
341 | </block> | 341 | </block> |
342 | 342 | ||
343 | <view wx:if="{{is_retail_price}}" class='yj' style="margin-left:10rpx"> | 343 | <view wx:if="{{is_retail_price}}" class='yj' style="margin-left:10rpx"> |
344 | - <text class="no_line_x">零售价:¥{{filters.toFix(data.market_price,2)}}</text> | 344 | + <text class="no_line_x">零售价:¥{{filters.toFix(front_g.market_price,2)}}</text> |
345 | </view> | 345 | </view> |
346 | 346 | ||
347 | </view> | 347 | </view> |
@@ -355,33 +355,33 @@ | @@ -355,33 +355,33 @@ | ||
355 | </view> | 355 | </view> |
356 | <!-- 不是秒杀 --> | 356 | <!-- 不是秒杀 --> |
357 | <!-- 等级卡的价格,不是等级卡会员,且商品又有设置等级级价,商家后台有开通升级卡同能 --> | 357 | <!-- 等级卡的价格,不是等级卡会员,且商品又有设置等级级价,商家后台有开通升级卡同能 --> |
358 | - <view class="flex ai_and" wx:if="{{!card_field && is_no_plus && g_filters.is_has_rank(rank_switch,data) && prom_type!=1 && prom_type!=2 && prom_type!=4 && card_list && card_list.length>0 && g_filters.get_card_price(data,card_list,1)!=''}}"> | 358 | + <view class="flex ai_and" wx:if="{{!card_field && is_no_plus && g_filters.is_has_rank(rank_switch,front_g) && prom_type!=1 && prom_type!=2 && prom_type!=4 && card_list && card_list.length>0 && g_filters.get_card_price(front_g,card_list,1)!=''}}"> |
359 | <view class="flex ai-center grade-card-frame card-frame"> | 359 | <view class="flex ai-center grade-card-frame card-frame"> |
360 | <image class="img" src="{{iurl}}/miniapp/images/userinfo/userinfo/privilege_t.png"></image> | 360 | <image class="img" src="{{iurl}}/miniapp/images/userinfo/userinfo/privilege_t.png"></image> |
361 | <view class="fs24 white view card-name ellipsis-1"> | 361 | <view class="fs24 white view card-name ellipsis-1"> |
362 | - {{g_filters.get_card_price(data,card_list,1)}} | 362 | + {{g_filters.get_card_price(front_g,card_list,1)}} |
363 | </view> | 363 | </view> |
364 | </view> | 364 | </view> |
365 | <view class="fs32 xc-black3 ai_and carde_frame"> | 365 | <view class="fs32 xc-black3 ai_and carde_frame"> |
366 | - <text class="fs26">¥</text>{{g_filters.get_card_price(data,card_list,0)}} | 366 | + <text class="fs26">¥</text>{{g_filters.get_card_price(front_g,card_list,0)}} |
367 | </view> | 367 | </view> |
368 | </view> | 368 | </view> |
369 | <!-- 等级卡的显示,购买, 等级卡近30天要显示续费 --> | 369 | <!-- 等级卡的显示,购买, 等级卡近30天要显示续费 --> |
370 | - <block wx:if="{{g_filters.is_has_rank(rank_switch,data) && is_no_plus}}"> | 370 | + <block wx:if="{{g_filters.is_has_rank(rank_switch,front_g) && is_no_plus}}"> |
371 | <!-- 不是秒杀,且会员不是等级会员 --> | 371 | <!-- 不是秒杀,且会员不是等级会员 --> |
372 | - <view wx:if="{{!card_field && prom_type!=1 && prom_type!=2 && card_list && card_list.length>0 && g_filters.get_card_price(data,card_list,1)!=''}}"> | 372 | + <view wx:if="{{!card_field && prom_type!=1 && prom_type!=2 && card_list && card_list.length>0 && g_filters.get_card_price(front_g,card_list,1)!=''}}"> |
373 | <view class="beauty-makeup-frame flex ai-center"> | 373 | <view class="beauty-makeup-frame flex ai-center"> |
374 | <view class="left flex ai-center jc_sa"> | 374 | <view class="left flex ai-center jc_sa"> |
375 | <view class="flex ai-center grade-card-frame card-frame advert-card"> | 375 | <view class="flex ai-center grade-card-frame card-frame advert-card"> |
376 | <image class="img" src="{{iurl}}/miniapp/images/userinfo/userinfo/privilege_t.png"></image> | 376 | <image class="img" src="{{iurl}}/miniapp/images/userinfo/userinfo/privilege_t.png"></image> |
377 | <view class="fs24 white view card-name ellipsis-1"> | 377 | <view class="fs24 white view card-name ellipsis-1"> |
378 | - {{g_filters.get_card_price(data,card_list,1)}} | 378 | + {{g_filters.get_card_price(front_g,card_list,1)}} |
379 | </view> | 379 | </view> |
380 | </view> | 380 | </view> |
381 | <view class="card-effect"> | 381 | <view class="card-effect"> |
382 | <view class="fs24 xc-black3"> | 382 | <view class="fs24 xc-black3"> |
383 | - 成为{{g_filters.get_card_price(data,card_list,1)}}立 | ||
384 | - <text class="co-red">省{{filters.toFix(data.shop_price-g_filters.get_card_price(data,card_list,0),2)}}</text>元 | 383 | + 成为{{g_filters.get_card_price(front_g,card_list,1)}}立 |
384 | + <text class="co-red">省{{filters.toFix(front_g.shop_price-g_filters.get_card_price(front_g,card_list,0),2)}}</text>元 | ||
385 | </view> | 385 | </view> |
386 | <view class="fs22 xc-ash">开通会员 尽享更多优惠</view> | 386 | <view class="fs22 xc-ash">开通会员 尽享更多优惠</view> |
387 | </view> | 387 | </view> |
@@ -393,7 +393,7 @@ | @@ -393,7 +393,7 @@ | ||
393 | </view> | 393 | </view> |
394 | </view> | 394 | </view> |
395 | <!-- 立即续费的显示 --> | 395 | <!-- 立即续费的显示 --> |
396 | - <view wx:elif="{{is_near_date && data[card_field]>0 && prom_type!=1 && prom_type!=2 && card_name!=''}}"> | 396 | + <view wx:elif="{{is_near_date && front_g[card_field]>0 && prom_type!=1 && prom_type!=2 && card_name!=''}}"> |
397 | <view class="beauty-makeup-frame flex ai-center"> | 397 | <view class="beauty-makeup-frame flex ai-center"> |
398 | <view class="left flex ai-center jc_sa"> | 398 | <view class="left flex ai-center jc_sa"> |
399 | <view class="flex ai-center grade-card-frame card-frame advert-card"> | 399 | <view class="flex ai-center grade-card-frame card-frame advert-card"> |
@@ -404,7 +404,7 @@ | @@ -404,7 +404,7 @@ | ||
404 | <view class="fs24 xc-black3"> | 404 | <view class="fs24 xc-black3"> |
405 | 成为{{card_name}}立 | 405 | 成为{{card_name}}立 |
406 | <text class="co-red"> | 406 | <text class="co-red"> |
407 | - 省{{filters.toFix(data.shop_price[card_field],2)}} | 407 | + 省{{filters.toFix(front_g.shop_price[card_field],2)}} |
408 | </text> | 408 | </text> |
409 | 元 | 409 | 元 |
410 | </view> | 410 | </view> |
@@ -422,13 +422,13 @@ | @@ -422,13 +422,13 @@ | ||
422 | <!-- 许程商品名字 --> | 422 | <!-- 许程商品名字 --> |
423 | <view wx:if="{{prom_type!=1 && prom_type!=2 }}"> | 423 | <view wx:if="{{prom_type!=1 && prom_type!=2 }}"> |
424 | <view class="goods-title"> | 424 | <view class="goods-title"> |
425 | - <image wx:if="{{data.commission > 0}}" style="width: 25rpx;height: 25rpx;margin-right: 6rpx;" src="https://mshop-lib.yolipai.net/template/mobile/new/static/images/addmoney.png"></image> | ||
426 | - <view class="goods-name elli">{{data.goods_name}}</view> | 425 | + <image wx:if="{{front_g.commission > 0}}" style="width: 25rpx;height: 25rpx;margin-right: 6rpx;" src="https://mshop-lib.yolipai.net/template/mobile/new/static/images/addmoney.png"></image> |
426 | + <view class="goods-name elli">{{front_g.goods_name}}</view> | ||
427 | </view> | 427 | </view> |
428 | </view> | 428 | </view> |
429 | <view class="goods-num" wx:if="{{prom_type!=1 && prom_type!=2}}"> | 429 | <view class="goods-num" wx:if="{{prom_type!=1 && prom_type!=2}}"> |
430 | - <view class="sales">销量:{{data.sales_sum}}件</view> | ||
431 | - <view class="stock">折扣:{{g_filters.num(data.disc)}}折</view> | 430 | + <view class="sales">销量:{{front_g.sales_sum}}件</view> |
431 | + <view class="stock">折扣:{{g_filters.num(front_g.disc)}}折</view> | ||
432 | <view class="stock">{{categories3[0].num}}人评价</view> | 432 | <view class="stock">{{categories3[0].num}}人评价</view> |
433 | </view> | 433 | </view> |
434 | 434 | ||
@@ -439,8 +439,8 @@ | @@ -439,8 +439,8 @@ | ||
439 | <text class="fs30">¥</text> | 439 | <text class="fs30">¥</text> |
440 | {{prom_price}} | 440 | {{prom_price}} |
441 | </view> | 441 | </view> |
442 | - <view wx:if="{{is_retail_price}}" class="word-line fs24 no_line_x">零售价:¥{{filters.toFix(data.market_price,2)}}</view> | ||
443 | - <view wx:else class="word-line no_line_x fs24">¥{{filters.toFix(data.shop_price,2)}}</view> | 442 | + <view wx:if="{{is_retail_price}}" class="word-line fs24 no_line_x">零售价:¥{{filters.toFix(front_g.market_price,2)}}</view> |
443 | + <view wx:else class="word-line no_line_x fs24">¥{{filters.toFix(front_g.shop_price,2)}}</view> | ||
444 | </view> | 444 | </view> |
445 | <!-- 这个是分享按钮 --> | 445 | <!-- 这个是分享按钮 --> |
446 | <view wx:if="{{isLogin}}" class="xc-share-frame t-c shrink0" bindtap="clickShare"> | 446 | <view wx:if="{{isLogin}}" class="xc-share-frame t-c shrink0" bindtap="clickShare"> |
@@ -453,11 +453,11 @@ | @@ -453,11 +453,11 @@ | ||
453 | 453 | ||
454 | <!-- 秒杀的活动名称 --> | 454 | <!-- 秒杀的活动名称 --> |
455 | <view class="xc-explain fs32 ellipsis-2" wx:if="{{prom_type!=0 && prom_type!=4 && prom_type!=2}}"> | 455 | <view class="xc-explain fs32 ellipsis-2" wx:if="{{prom_type!=0 && prom_type!=4 && prom_type!=2}}"> |
456 | - {{sele_g.goods_name}} | 456 | + {{front_g.goods_name}} |
457 | </view> | 457 | </view> |
458 | 458 | ||
459 | <view class="xc-explain flex jc_sb" wx:if="{{prom_type==2}}"> | 459 | <view class="xc-explain flex jc_sb" wx:if="{{prom_type==2}}"> |
460 | - <view class="fs32 ellipsis-2" style="max-width:80%; max-height: 90rpx;">{{sele_g.goods_name}}</view> | 460 | + <view class="fs32 ellipsis-2" style="max-width:80%; max-height: 90rpx;">{{front_g.goods_name}}</view> |
461 | <!-- 这个是分享按钮 --> | 461 | <!-- 这个是分享按钮 --> |
462 | <view wx:if="{{isLogin}}" class="xc-share-frame t-c shrink0" bindtap="clickShare" style="flex-shrink:0;position: relative;top: -22rpx;"> | 462 | <view wx:if="{{isLogin}}" class="xc-share-frame t-c shrink0" bindtap="clickShare" style="flex-shrink:0;position: relative;top: -22rpx;"> |
463 | <view class="iconfont icon-share"></view> | 463 | <view class="iconfont icon-share"></view> |
@@ -465,26 +465,26 @@ | @@ -465,26 +465,26 @@ | ||
465 | </view> | 465 | </view> |
466 | </view> | 466 | </view> |
467 | 467 | ||
468 | - <!-- 许程 7.24 暂时注释 --> | 468 | + <!-- 许程 7.24 暂时注释,秒杀才有多规格--> |
469 | <view wx:if="{{prom_type==1}}"> | 469 | <view wx:if="{{prom_type==1}}"> |
470 | <view class="goods-num"> | 470 | <view class="goods-num"> |
471 | - <block wx:if="prom_st>0"> | ||
472 | - <view class="stock">总数量:{{prom_act.is_virtual_count ? prom_act.goods_num : (prom_act.goods_num+prom_act.virtual)}}件</view> | ||
473 | - <view class="stock" wx:if="{{prom_act.buy_limit>0}}">限购:{{prom_act.buy_limit}}件</view> | 471 | + <block wx:if="f_prom_st>0"> |
472 | + <view class="stock">总数量:{{f_prom_act.is_virtual_count ? f_prom_act.goods_num : (f_prom_act.goods_num+f_prom_act.virtual)}}件</view> | ||
473 | + <view class="stock" wx:if="{{f_prom_act.buy_limit>0}}">限购:{{f_prom_act.buy_limit}}件</view> | ||
474 | <view class="stock" wx:else>限购:不限</view> | 474 | <view class="stock" wx:else>限购:不限</view> |
475 | 475 | ||
476 | - <block wx:if="{{prom_st==0}}"> | 476 | + <block wx:if="{{f_prom_st==0}}"> |
477 | <view class="sales">已购:0件</view> | 477 | <view class="sales">已购:0件</view> |
478 | </block> | 478 | </block> |
479 | <block wx:else> | 479 | <block wx:else> |
480 | - <view class="sales">已购:{{prom_act.buy_num+prom_act.virtual}}件</view> | 480 | + <view class="sales">已购:{{f_prom_act.buy_num+f_prom_act.virtual}}件</view> |
481 | </block> | 481 | </block> |
482 | </block> | 482 | </block> |
483 | <block wx:else> | 483 | <block wx:else> |
484 | - <view class="stock">总数量:{{prom_act.goods_num}}件</view> | ||
485 | - <view class="stock" wx:if="{{prom_act.buy_limit>0}}">限购:{{prom_act.buy_limit}}件</view> | 484 | + <view class="stock">总数量:{{f_prom_act.goods_num}}件</view> |
485 | + <view class="stock" wx:if="{{f_prom_act.buy_limit>0}}">限购:{{f_prom_act.buy_limit}}件</view> | ||
486 | <view class="stock" wx:else>限购:不限</view> | 486 | <view class="stock" wx:else>限购:不限</view> |
487 | - <view class="sales">已购:{{prom_act.buy_num}}件</view> | 487 | + <view class="sales">已购:{{f_prom_act.buy_num}}件</view> |
488 | </block> | 488 | </block> |
489 | </view> | 489 | </view> |
490 | </view> | 490 | </view> |
@@ -676,7 +676,7 @@ | @@ -676,7 +676,7 @@ | ||
676 | 676 | ||
677 | 677 | ||
678 | <!-- 许程 7.24暂时注释 --> | 678 | <!-- 许程 7.24暂时注释 --> |
679 | - <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 && fir_quan.length>0 }}"> | 679 | + <view class="bdt16" wx:if="{{ prom_type!=1 && prom_act.kttype!=3&&prom_act.kttype!=2&&prom_act.kttype!=1 && is_closecoupon!=1 && front_g.is_xz_yh !=1 && fir_quan.length>0 }}"> |
680 | <view data-coupon="1" bindtap="switchCoupon" class="cx-frame flex" style="position: relative"> | 680 | <view data-coupon="1" bindtap="switchCoupon" class="cx-frame flex" style="position: relative"> |
681 | <view class="cx-sizs fs30">领券</view> | 681 | <view class="cx-sizs fs30">领券</view> |
682 | <view class="flex ai_c f1 pdh20"> | 682 | <view class="flex ai_c f1 pdh20"> |
@@ -695,8 +695,8 @@ | @@ -695,8 +695,8 @@ | ||
695 | </view> | 695 | </view> |
696 | 696 | ||
697 | <!-- 门店收货地址 --> | 697 | <!-- 门店收货地址 --> |
698 | - <view class="xc-address_frame bdt16 flex-vertical xc-ash {{def_pick_store!=null?'sn_height':'on_height'}}"> | ||
699 | - <view class="address_frame" bindtap="choice_store" data-ind="0"> | 698 | + <view class="xc-address_frame bdt16 flex-vertical xc-ash {{front_pick!=null?'sn_height':'on_height'}}"> |
699 | + <view class="address_frame" bindtap="choice_store" data-ind="0" data-isfront="1" > | ||
700 | <view class="flex-vertical-between "> | 700 | <view class="flex-vertical-between "> |
701 | <view class="flex-vertical select_store_height"> | 701 | <view class="flex-vertical select_store_height"> |
702 | <image class="stores-img" src="{{iurl}}/miniapp/images/stores.png"></image> | 702 | <image class="stores-img" src="{{iurl}}/miniapp/images/stores.png"></image> |
@@ -704,36 +704,36 @@ | @@ -704,36 +704,36 @@ | ||
704 | </view> | 704 | </view> |
705 | <view hidden="{{has_def && sys_switch.is_pricing_open_store}}" class="red_bb fs26">更多门店<text class="bg_jj"></text></view> | 705 | <view hidden="{{has_def && sys_switch.is_pricing_open_store}}" class="red_bb fs26">更多门店<text class="bg_jj"></text></view> |
706 | </view> | 706 | </view> |
707 | - <view wx:if="{{def_pick_store && def_pick_store.pickup_name}}"> | 707 | + <view wx:if="{{front_pick && front_pick.pickup_name}}"> |
708 | <view class="flex-space-between address ai_end pdv10"> | 708 | <view class="flex-space-between address ai_end pdv10"> |
709 | <view> | 709 | <view> |
710 | - <text class="fs30 xc-black3 shop_name bold">{{def_pick_store.pickup_name}}</text> | 710 | + <text class="fs30 xc-black3 shop_name bold">{{front_pick.pickup_name}}</text> |
711 | </view> | 711 | </view> |
712 | - <view class="distance fs24" wx:if="{{def_pick_store.distance!=null}}"> | ||
713 | - 距离:{{def_pick_store.distance>1000?filters.toFix(def_pick_store.distance/1000,2)+"km":filters.toFix(def_pick_store.distance,0)+"m"}} | 712 | + <view class="distance fs24" wx:if="{{front_pick.distance!=null}}"> |
713 | + 距离:{{front_pick.distance>1000?filters.toFix(front_pick.distance/1000,2)+"km":filters.toFix(front_pick.distance,0)+"m"}} | ||
714 | </view> | 714 | </view> |
715 | </view> | 715 | </view> |
716 | - <view class="no_store" wx:if="{{only_pk && !only_pk.length}}">(库存不足)</view> | 716 | + <view class="no_store" wx:if="{{front_only_pk && !front_only_pk.length}}">(库存不足)</view> |
717 | <block wx:else> | 717 | <block wx:else> |
718 | - <view class="no_store" wx:if="{{def_pickpu_list && !def_pickpu_list.length}}"> | 718 | + <view class="no_store" wx:if="{{front_def_pickpu_list && !front_def_pickpu_list.length}}"> |
719 | (库存不足) | 719 | (库存不足) |
720 | </view> | 720 | </view> |
721 | <block wx:else> | 721 | <block wx:else> |
722 | - <view class="no_store" wx:if="{{def_pick_store && def_pick_store.is_no_dis}}"> | 722 | + <view class="no_store" wx:if="{{front_pick && front_pick.is_no_dis}}"> |
723 | (配送不匹配) | 723 | (配送不匹配) |
724 | </view> | 724 | </view> |
725 | - <view class="no_store" wx:elif="{{def_pick_store && def_pick_store.is_no_dis_nor && prom_type==0}}"> | 725 | + <view class="no_store" wx:elif="{{front_pick && front_pick.is_no_dis_nor && prom_type==0}}"> |
726 | (该店不可售) | 726 | (该店不可售) |
727 | </view> | 727 | </view> |
728 | - <view class="no_store" wx:elif="{{def_pick_store && def_pick_store.is_no_dis_act}}"> | 728 | + <view class="no_store" wx:elif="{{front_pick && front_pick.is_no_dis_act}}"> |
729 | (该店不可售) | 729 | (该店不可售) |
730 | </view> | 730 | </view> |
731 | - <view class="no_store" wx:elif="{{def_pick_store && !def_pick_store.CanOutQty && sales_rules>=2 && prom_type==0 && !sele_g.whsle_id}}"> | 731 | + <view class="no_store" wx:elif="{{front_pick && !front_pick.CanOutQty && !filters.is_virtual_gd(front_g.is_virtual) && sales_rules>=2 && prom_type==0 && !front_g.whsle_id}}"> |
732 | (库存不足) | 732 | (库存不足) |
733 | </view> | 733 | </view> |
734 | </block> | 734 | </block> |
735 | </block> | 735 | </block> |
736 | - <view class="fs24 xc-ash-9f">地址:{{def_pick_store.fulladdress}}</view> | 736 | + <view class="fs24 xc-ash-9f">地址:{{front_pick.fulladdress}}</view> |
737 | </view> | 737 | </view> |
738 | </view> | 738 | </view> |
739 | </view> | 739 | </view> |
@@ -803,6 +803,7 @@ | @@ -803,6 +803,7 @@ | ||
803 | </view> | 803 | </view> |
804 | </scroll-view> | 804 | </scroll-view> |
805 | </view> | 805 | </view> |
806 | + | ||
806 | <!-- 图文详情 --> | 807 | <!-- 图文详情 --> |
807 | <view class="bdt16"> | 808 | <view class="bdt16"> |
808 | <view class="t_g_info"> | 809 | <view class="t_g_info"> |
@@ -816,7 +817,7 @@ | @@ -816,7 +817,7 @@ | ||
816 | <text>商品名称</text> | 817 | <text>商品名称</text> |
817 | </view> | 818 | </view> |
818 | <view class="item_right"> | 819 | <view class="item_right"> |
819 | - <text>{{data.goods_name}}</text> | 820 | + <text>{{front_g.goods_name}}</text> |
820 | </view> | 821 | </view> |
821 | </view> | 822 | </view> |
822 | <view class="tb_item tb-l"> | 823 | <view class="tb_item tb-l"> |
@@ -824,7 +825,7 @@ | @@ -824,7 +825,7 @@ | ||
824 | <text>商品编号</text> | 825 | <text>商品编号</text> |
825 | </view> | 826 | </view> |
826 | <view class="item_right"> | 827 | <view class="item_right"> |
827 | - <text>{{data.goods_sn}}</text> | 828 | + <text>{{front_g.goods_sn}}</text> |
828 | </view> | 829 | </view> |
829 | </view> | 830 | </view> |
830 | <view class="tb_item tb-l"> | 831 | <view class="tb_item tb-l"> |
@@ -832,7 +833,7 @@ | @@ -832,7 +833,7 @@ | ||
832 | <text>商品条码</text> | 833 | <text>商品条码</text> |
833 | </view> | 834 | </view> |
834 | <view class="item_right"> | 835 | <view class="item_right"> |
835 | - <text>{{data.sku}}</text> | 836 | + <text>{{front_g.sku}}</text> |
836 | </view> | 837 | </view> |
837 | </view> | 838 | </view> |
838 | <view class="tb_item tb-l" wx:if="{{cat_name && is_show_pl}}"> | 839 | <view class="tb_item tb-l" wx:if="{{cat_name && is_show_pl}}"> |
@@ -864,7 +865,7 @@ | @@ -864,7 +865,7 @@ | ||
864 | <text>规格</text> | 865 | <text>规格</text> |
865 | </view> | 866 | </view> |
866 | <view class="item_right"> | 867 | <view class="item_right"> |
867 | - <text>{{filters.show_gui_ge(data.goods_spec,data.goods_color)}}</text> | 868 | + <text>{{filters.show_gui_ge(front_g.goods_spec,front_g.goods_color)}}</text> |
868 | </view> | 869 | </view> |
869 | </view> | 870 | </view> |
870 | <view class="tb_item tb-l"> | 871 | <view class="tb_item tb-l"> |
@@ -872,7 +873,7 @@ | @@ -872,7 +873,7 @@ | ||
872 | <text>上架时间</text> | 873 | <text>上架时间</text> |
873 | </view> | 874 | </view> |
874 | <view class="item_right"> | 875 | <view class="item_right"> |
875 | - <text>{{data.on_time}}</text> | 876 | + <text>{{front_g.on_time}}</text> |
876 | </view> | 877 | </view> |
877 | </view> | 878 | </view> |
878 | </view> | 879 | </view> |
@@ -904,7 +905,7 @@ | @@ -904,7 +905,7 @@ | ||
904 | <text>商品名称</text> | 905 | <text>商品名称</text> |
905 | </view> | 906 | </view> |
906 | <view class="item_right"> | 907 | <view class="item_right"> |
907 | - <text>{{data.goods_name}}</text> | 908 | + <text>{{front_g.goods_name}}</text> |
908 | </view> | 909 | </view> |
909 | </view> | 910 | </view> |
910 | <view class="tb_item tb-l"> | 911 | <view class="tb_item tb-l"> |
@@ -912,7 +913,7 @@ | @@ -912,7 +913,7 @@ | ||
912 | <text>商品编号</text> | 913 | <text>商品编号</text> |
913 | </view> | 914 | </view> |
914 | <view class="item_right"> | 915 | <view class="item_right"> |
915 | - <text>{{data.goods_sn}}</text> | 916 | + <text>{{front_g.goods_sn}}</text> |
916 | </view> | 917 | </view> |
917 | </view> | 918 | </view> |
918 | <view class="tb_item tb-l"> | 919 | <view class="tb_item tb-l"> |
@@ -920,7 +921,7 @@ | @@ -920,7 +921,7 @@ | ||
920 | <text>商品条码</text> | 921 | <text>商品条码</text> |
921 | </view> | 922 | </view> |
922 | <view class="item_right"> | 923 | <view class="item_right"> |
923 | - <text>{{data.sku}}</text> | 924 | + <text>{{front_g.sku}}</text> |
924 | </view> | 925 | </view> |
925 | </view> | 926 | </view> |
926 | <view class="tb_item tb-l" wx:if="{{cat_name && is_show_pl}}"> | 927 | <view class="tb_item tb-l" wx:if="{{cat_name && is_show_pl}}"> |
@@ -952,7 +953,7 @@ | @@ -952,7 +953,7 @@ | ||
952 | <text>规格</text> | 953 | <text>规格</text> |
953 | </view> | 954 | </view> |
954 | <view class="item_right"> | 955 | <view class="item_right"> |
955 | - <text>{{data.goods_spec==""?"规格1":data.goods_spec}}</text> | 956 | + <text>{{front_g.goods_spec==""?"规格1":front_g.goods_spec}}</text> |
956 | </view> | 957 | </view> |
957 | </view> | 958 | </view> |
958 | <view class="tb_item tb-l"> | 959 | <view class="tb_item tb-l"> |
@@ -960,7 +961,7 @@ | @@ -960,7 +961,7 @@ | ||
960 | <text>上架时间</text> | 961 | <text>上架时间</text> |
961 | </view> | 962 | </view> |
962 | <view class="item_right"> | 963 | <view class="item_right"> |
963 | - <text>{{data.on_time}}</text> | 964 | + <text>{{front_g.on_time}}</text> |
964 | </view> | 965 | </view> |
965 | </view> | 966 | </view> |
966 | </view> | 967 | </view> |
@@ -1102,13 +1103,13 @@ | @@ -1102,13 +1103,13 @@ | ||
1102 | <view>购物车</view> | 1103 | <view>购物车</view> |
1103 | </navigator> | 1104 | </navigator> |
1104 | </view> | 1105 | </view> |
1105 | - <view bindtap="openSpecModel" class="buy-btn cart-btn cart-btn-lg" wx:if="{{data.goods.is_virtual}}"> | 1106 | + <view bindtap="openSpecModel" class="buy-btn cart-btn cart-btn-lg" wx:if="{{front_g.goods.is_virtual}}"> |
1106 | 立即购买 | 1107 | 立即购买 |
1107 | </view> | 1108 | </view> |
1108 | <!-- 普通商品购买 --> | 1109 | <!-- 普通商品购买 --> |
1109 | <block wx:if="{{prom_type==0 || prom_type==3}}"> | 1110 | <block wx:if="{{prom_type==0 || prom_type==3}}"> |
1110 | <!-- 线上销售的时候,要判断库存量, 线下库存的时候不用判断 --> | 1111 | <!-- 线上销售的时候,要判断库存量, 线下库存的时候不用判断 --> |
1111 | - <block wx:if="{{(sele_g.store_count>0 && sales_rules==1) || sales_rules>=2 }}"> | 1112 | + <block wx:if="{{(front_g.store_count>0 && sales_rules==1) || sales_rules>=2 }}"> |
1112 | <view bindtap="openSpecModel" data-ind="1" class="join-btn cart-btn">加入购物车</view> | 1113 | <view bindtap="openSpecModel" data-ind="1" class="join-btn cart-btn">加入购物车</view> |
1113 | <view bindtap="openSpecModel" data-ind="2" class="buy-btn cart-btn">立即购买</view> | 1114 | <view bindtap="openSpecModel" data-ind="2" class="buy-btn cart-btn">立即购买</view> |
1114 | </block> | 1115 | </block> |
@@ -1118,7 +1119,7 @@ | @@ -1118,7 +1119,7 @@ | ||
1118 | </block> | 1119 | </block> |
1119 | <!-- -----秒杀------ --> | 1120 | <!-- -----秒杀------ --> |
1120 | <block wx:if="{{prom_type==1 || prom_type==2}}"> | 1121 | <block wx:if="{{prom_type==1 || prom_type==2}}"> |
1121 | - <block wx:if="{{prom_st==1 && !prom_r_null}}"> | 1122 | + <block wx:if="{{f_prom_st==1 && !prom_r_null}}"> |
1122 | <view bindtap="openSpecModel" data-ind="1" class="join-btn cart-btn">加入购物车</view> | 1123 | <view bindtap="openSpecModel" data-ind="1" class="join-btn cart-btn">加入购物车</view> |
1123 | <view bindtap="openSpecModel" data-ind="2" class="buy-btn cart-btn">立即抢购</view> | 1124 | <view bindtap="openSpecModel" data-ind="2" class="buy-btn cart-btn">立即抢购</view> |
1124 | </block> | 1125 | </block> |
@@ -1177,11 +1178,11 @@ | @@ -1177,11 +1178,11 @@ | ||
1177 | <block wx:if="{{prom_type==6}}"> | 1178 | <block wx:if="{{prom_type==6}}"> |
1178 | <view bindtap="openSpecModel_pt" data-it="1" data-ind="1" class="join-btn cart-btn line-h"> | 1179 | <view bindtap="openSpecModel_pt" data-it="1" data-ind="1" class="join-btn cart-btn line-h"> |
1179 | <view class="fir-v"> | 1180 | <view class="fir-v"> |
1180 | - <!-- ¥{{data.shop_price,2)}} --> | ||
1181 | - <block wx:if="{{card_field && sele_g[card_field]>0}}"> | ||
1182 | - {{filters.toFix(sele_g[card_field],2)}} | 1181 | + |
1182 | + <block wx:if="{{card_field && front_g[card_field]>0}}"> | ||
1183 | + {{filters.toFix(front_g[card_field],2)}} | ||
1183 | </block> | 1184 | </block> |
1184 | - <block wx:else>{{filters.toFix(sele_g.shop_price,2)}}</block> | 1185 | + <block wx:else>{{filters.toFix(front_g.shop_price,2)}}</block> |
1185 | </view> | 1186 | </view> |
1186 | <view>单独购买</view> | 1187 | <view>单独购买</view> |
1187 | </view> | 1188 | </view> |
@@ -1236,10 +1237,10 @@ | @@ -1236,10 +1237,10 @@ | ||
1236 | <block wx:if="{{is_shopbuy}}"> | 1237 | <block wx:if="{{is_shopbuy}}"> |
1237 | <view bindtap="go_pay_integral_normal" class="join-btn cart-btn line-h"> | 1238 | <view bindtap="go_pay_integral_normal" class="join-btn cart-btn line-h"> |
1238 | <view class="fir-v"> | 1239 | <view class="fir-v"> |
1239 | - <block wx:if="{{card_field && sele_g[card_field]>0}}"> | ||
1240 | - {{filters.toFix(sele_g[card_field],2)}} | 1240 | + <block wx:if="{{card_field && front_g[card_field]>0}}"> |
1241 | + {{filters.toFix(front_g[card_field],2)}} | ||
1241 | </block> | 1242 | </block> |
1242 | - <block wx:else>{{filters.toFix(sele_g.shop_price,2)}}</block> | 1243 | + <block wx:else>{{filters.toFix(front_g.shop_price,2)}}</block> |
1243 | </view> | 1244 | </view> |
1244 | <view>单独购买</view> | 1245 | <view>单独购买</view> |
1245 | </view> | 1246 | </view> |
@@ -1390,12 +1391,12 @@ | @@ -1390,12 +1391,12 @@ | ||
1390 | <view hidden="{{ismend==1}}" style="max-height: 120rpx;overflow-y: auto;"> | 1391 | <view hidden="{{ismend==1}}" style="max-height: 120rpx;overflow-y: auto;"> |
1391 | 1392 | ||
1392 | <block wx:if="{{sku_g_pt}}"> | 1393 | <block wx:if="{{sku_g_pt}}"> |
1393 | - <view class="spec_bt {{gid==item.goods_id?'act':''}}" bindtap="sele_spec" data-gid='{{item.goods_id}}' wx:for="{{sku_g_pt}}" wx:key="sku_g"> | 1394 | + <view class="spec_bt {{sele_g.goods_id==item.goods_id?'act':''}}" bindtap="sele_spec" data-gid='{{item.goods_id}}' wx:for="{{sku_g_pt}}" wx:key="sku_g"> |
1394 | {{item.gg}} | 1395 | {{item.gg}} |
1395 | </view> | 1396 | </view> |
1396 | </block> | 1397 | </block> |
1397 | <block wx:else> | 1398 | <block wx:else> |
1398 | - <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"> | 1399 | + <view class="spec_bt {{sele_g.goods_id==item.goods_id?'act':''}}" bindtap="sele_spec" data-gid='{{item.goods_id}}' wx:for="{{sku_g}}" wx:key="sku_g"> |
1399 | {{item.gg}} | 1400 | {{item.gg}} |
1400 | </view> | 1401 | </view> |
1401 | </block> | 1402 | </block> |
@@ -1682,7 +1683,7 @@ | @@ -1682,7 +1683,7 @@ | ||
1682 | <view class="store-list"> | 1683 | <view class="store-list"> |
1683 | <!-- 如果还没有点击更多门店的时候 --> | 1684 | <!-- 如果还没有点击更多门店的时候 --> |
1684 | <block wx:if="{{choice_sort_store==0}}"> | 1685 | <block wx:if="{{choice_sort_store==0}}"> |
1685 | - <!-- 需要for循环 --> | 1686 | + <!-- 需要for循环is_show_sto_cat表示门店的数量已经超10个 --> |
1686 | <block wx:if="{{is_show_sto_cat==1}}"> | 1687 | <block wx:if="{{is_show_sto_cat==1}}"> |
1687 | <view class="store_choose flex" wx:for="{{def_pickpu_list}}" bindtap="choose_for_store_fir" data-ind="{{index}}"> | 1688 | <view class="store_choose flex" wx:for="{{def_pickpu_list}}" bindtap="choose_for_store_fir" data-ind="{{index}}"> |
1688 | <view class="store flex-vertical"> | 1689 | <view class="store flex-vertical"> |
@@ -1716,6 +1717,7 @@ | @@ -1716,6 +1717,7 @@ | ||
1716 | </view> | 1717 | </view> |
1717 | </block> | 1718 | </block> |
1718 | <block wx:else> | 1719 | <block wx:else> |
1720 | + <!-- 此时的情况就是门店的数量少于10个 --> | ||
1719 | <view class="store_choose flex" wx:for="{{only_pk}}" bindtap="choose_for_store_fir" data-ind="{{index}}"> | 1721 | <view class="store_choose flex" wx:for="{{only_pk}}" bindtap="choose_for_store_fir" data-ind="{{index}}"> |
1720 | <view class="store flex-vertical"> | 1722 | <view class="store flex-vertical"> |
1721 | <!-- 需要点击事件 --> | 1723 | <!-- 需要点击事件 --> |
@@ -1815,6 +1817,7 @@ | @@ -1815,6 +1817,7 @@ | ||
1815 | </block> | 1817 | </block> |
1816 | </view> | 1818 | </view> |
1817 | </block> | 1819 | </block> |
1820 | + | ||
1818 | <!-- ---------------分享弹窗--------------- --> | 1821 | <!-- ---------------分享弹窗--------------- --> |
1819 | <!-- 二维码显示页面 --> | 1822 | <!-- 二维码显示页面 --> |
1820 | <canvas canvas-id='share' style='width:750rpx;height:1217rpx;background-color:white;' wx:if="{{!canvasHidden}}"></canvas> | 1823 | <canvas canvas-id='share' style='width:750rpx;height:1217rpx;background-color:white;' wx:if="{{!canvasHidden}}"></canvas> |
pages/user/order_detail/order_detail.js
utils/util.js
@@ -1012,5 +1012,11 @@ module.exports = { | @@ -1012,5 +1012,11 @@ module.exports = { | ||
1012 | wx_back:wx_back, | 1012 | wx_back:wx_back, |
1013 | _debounce, | 1013 | _debounce, |
1014 | calculatewuliu:calculatewuliu, //计算物流的函数进行抽象 | 1014 | calculatewuliu:calculatewuliu, //计算物流的函数进行抽象 |
1015 | - format_content | 1015 | + format_content, |
1016 | + deep_cp:function(e){ | ||
1017 | + if(!e) return null; | ||
1018 | + //判断e是不是对象类型 | ||
1019 | + var new_e = JSON.parse(JSON.stringify(e)); | ||
1020 | + return new_e; | ||
1021 | + } | ||
1016 | }; | 1022 | }; |