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 | 200 | <view class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999">请先选择门店</view> |
| 201 | 201 | </block> |
| 202 | 202 | <block wx:else> |
| 203 | - <block wx:if="{{data.store_count<=0}}"> | |
| 203 | + <block wx:if="{{sele_g.store_count<=0}}"> | |
| 204 | 204 | <view class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999">库存不足</view> |
| 205 | 205 | </block> |
| 206 | 206 | <block wx:else> | ... | ... |
packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo.js
| ... | ... | @@ -297,7 +297,11 @@ Page({ |
| 297 | 297 | nav_backgroundColor: "#ffffff", |
| 298 | 298 | nav_type: 2, //导航类型 |
| 299 | 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 | 1149 | ee.setData({ |
| 1146 | 1150 | data: t.data.data, |
| 1147 | 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 | 2337 | if (this.data.openSpecModal_pt && this.data.is_normal) { |
| 2333 | 2338 | this.get_sto(); |
| 2334 | 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 | 2344 | this.sele_spec_chech_activity(); |
| 2340 | - | |
| 2341 | 2345 | } |
| 2342 | 2346 | |
| 2343 | 2347 | this.setData({ |
| ... | ... | @@ -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 | 3398 | deal_pickup(e) { |
| 3374 | 3399 | var th = this; |
| ... | ... | @@ -3502,15 +3527,21 @@ Page({ |
| 3502 | 3527 | th.setData({ def_pick_store: e.data.data.pageData[0] }) |
| 3503 | 3528 | } |
| 3504 | 3529 | } |
| 3530 | + | |
| 3531 | + //-- 设置商品详情页面的门店显示情况 --- | |
| 3532 | + th.deal_front_pk(); | |
| 3533 | + | |
| 3505 | 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 | 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 | 4032 | } |
| 3999 | 4033 | |
| 4000 | 4034 | if(prom_type==9){ |
| 4035 | + ee.get_sto(); | |
| 4001 | 4036 | this.setData({ isshow: 1, }); |
| 4002 | 4037 | } |
| 4003 | 4038 | |
| ... | ... | @@ -4500,6 +4535,7 @@ Page({ |
| 4500 | 4535 | var th = this; |
| 4501 | 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 | 4540 | //ind == 1是普通购买 |
| 4505 | 4541 | if (ind == 1) { |
| ... | ... | @@ -5940,7 +5976,10 @@ Page({ |
| 5940 | 5976 | |
| 5941 | 5977 | var th = this; |
| 5942 | 5978 | var ind = ee.currentTarget.dataset.ind; |
| 5979 | + var isfront = ee.currentTarget.dataset.isfront; | |
| 5943 | 5980 | var bconfig = th.data.bconfig; |
| 5981 | + th.data.isfront=0; | |
| 5982 | + if(isfront) th.data.isfront=1; | |
| 5944 | 5983 | |
| 5945 | 5984 | //如果开启了,则不在选择门店 |
| 5946 | 5985 | if(this.data.sys_switch.is_pricing_open_store && getApp().globalData.pk_store){ |
| ... | ... | @@ -6187,6 +6226,10 @@ Page({ |
| 6187 | 6226 | if (!th.data.sele_g) return false; |
| 6188 | 6227 | //判断门店的配送方式是不是匹配 |
| 6189 | 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 | 6233 | if (item.distr_type != 0 && g_distr_type != 0 && item.distr_type != g_distr_type) { |
| 6191 | 6234 | wx.showToast({ |
| 6192 | 6235 | title: "门店配送方式不匹配", |
| ... | ... | @@ -6208,6 +6251,12 @@ Page({ |
| 6208 | 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 | 6260 | if (openindstore == 1) { |
| 6212 | 6261 | th.setData({ |
| 6213 | 6262 | openSpecModal: !0, | ... | ... |
packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo.wxml
| ... | ... | @@ -418,8 +418,8 @@ |
| 418 | 418 | |
| 419 | 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 | 423 | <view class="flex-vertical-between "> |
| 424 | 424 | <view class="flex-vertical select_store_height"> |
| 425 | 425 | <image class="stores-img" src="{{iurl}}/miniapp/images/stores.png"></image> |
| ... | ... | @@ -427,30 +427,30 @@ |
| 427 | 427 | </view> |
| 428 | 428 | <view hidden="{{has_def && sys_switch.is_pricing_open_store}}" class="red_bb fs26">更多门店<text class="bg_jj"></text></view> |
| 429 | 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 | 431 | <view class="flex-space-between address ai_end pdv10"> |
| 432 | 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 | 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 | 437 | </view> |
| 438 | 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 | 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 | 443 | </view> |
| 444 | 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 | 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 | 450 | </view> |
| 451 | 451 | </block> |
| 452 | 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 | 454 | </view> |
| 455 | 455 | </view> |
| 456 | 456 | </view> | ... | ... |
packageE/pages/cart/cart2/cart2.js
| ... | ... | @@ -1510,6 +1510,11 @@ Page({ |
| 1510 | 1510 | item1.is_post_temp=1; |
| 1511 | 1511 | //如果是秒杀,团购的时候,优惠促销和搭配购的时候 |
| 1512 | 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 | 1518 | var url= "/api/weshop/activitylist/getSJGoodsPriceNew/" + os.stoid |
| 1514 | 1519 | + "/" + item1.goods_id + "/"+item1.prom_type+"/" + item1.prom_id + "/" + app.globalData.user_id; |
| 1515 | 1520 | await app.request.promiseGet(url,{}).then(res=>{ |
| ... | ... | @@ -1522,6 +1527,11 @@ Page({ |
| 1522 | 1527 | }else item1.is_order_yh=0; |
| 1523 | 1528 | |
| 1524 | 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 | 2018 | //t.data.data.shop_price = tt.data.data.prom_price; |
| 2009 | 2019 | gd.shop_price=t.data.data.shop_price = tt.data.data.prom_user_price; |
| 2010 | 2020 | th.data.ckeck_quan_price = 0; |
| 2011 | - gd.is_xz_yh = 1; | |
| 2012 | 2021 | |
| 2013 | 2022 | t.data.data.fir_rate = tt.data.data.fir_rate; |
| 2014 | 2023 | t.data.data.sec_rate = tt.data.data.sec_rate; |
| ... | ... | @@ -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 | 2067 | th.setData({ |
| 2051 | 2068 | bn_goods: gd, |
| ... | ... | @@ -3911,6 +3928,7 @@ Page({ |
| 3911 | 3928 | is_by_quan = 1; |
| 3912 | 3929 | } |
| 3913 | 3930 | } |
| 3931 | + | |
| 3914 | 3932 | if (!is_by_quan) { |
| 3915 | 3933 | var user_addr = th.data.user_addr; |
| 3916 | 3934 | var req_d = { |
| ... | ... | @@ -6410,7 +6428,7 @@ Page({ |
| 6410 | 6428 | for (var i in goodlist) { |
| 6411 | 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 | 6432 | continue; |
| 6415 | 6433 | } |
| 6416 | 6434 | |
| ... | ... | @@ -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 | 6448 | if (gd.prom_type == 2) { | ... | ... |
pages/goods/goodsInfo/buy_com_pop.wxml
| ... | ... | @@ -72,7 +72,7 @@ |
| 72 | 72 | <view class="xc-goods-attribute"> |
| 73 | 73 | <view hidden="{{ismend==1}}" class="spec-name">商品规格</view> |
| 74 | 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 | 76 | data-gid='{{item.goods_id}}' wx:for="{{sku_g_pt}}" wx:key="sku_g"> |
| 77 | 77 | {{item.gg}} |
| 78 | 78 | </view> | ... | ... |
pages/goods/goodsInfo/buy_integral.wxml
| ... | ... | @@ -3,9 +3,9 @@ |
| 3 | 3 | <view class="pding"> |
| 4 | 4 | <icon bindtap="closeSpecModal_inte" class="modal-close" color="black" size="22" type="cancel"></icon> |
| 5 | 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 | 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 | 9 | <view class="flex ai_end xc-val-money"> |
| 10 | 10 | <view class="spec-goods-price"> |
| 11 | 11 | <text wx:if="{{prom_integral}}">{{prom_integral}}积分</text> |
| ... | ... | @@ -61,7 +61,7 @@ |
| 61 | 61 | <view class="xc-goods-attribute"> |
| 62 | 62 | <view hidden="{{ismend==1}}" class="spec-name">商品规格</view> |
| 63 | 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 | 65 | {{item.gg}} |
| 66 | 66 | </view> |
| 67 | 67 | </view> |
| ... | ... | @@ -105,7 +105,7 @@ |
| 105 | 105 | <view class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999">请先选择门店</view> |
| 106 | 106 | </block> |
| 107 | 107 | <block wx:else> |
| 108 | - <block wx:if="{{data.store_count<=0}}"> | |
| 108 | + <block wx:if="{{sele_g.store_count<=0}}"> | |
| 109 | 109 | <view class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999">库存不足</view> |
| 110 | 110 | </block> |
| 111 | 111 | <block wx:else> | ... | ... |
pages/goods/goodsInfo/buy_pt.wxml
| ... | ... | @@ -85,7 +85,7 @@ |
| 85 | 85 | <view hidden="{{ismend==1}}" class="spec-name">商品规格</view> |
| 86 | 86 | <block wx:if="{{is_normal==0}}"> |
| 87 | 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 | 89 | </view> |
| 90 | 90 | </view> |
| 91 | 91 | </block> | ... | ... |
pages/goods/goodsInfo/goodsInfo.js
| ... | ... | @@ -154,7 +154,10 @@ Page({ |
| 154 | 154 | prom_buy_limit: 0, |
| 155 | 155 | djs: null, |
| 156 | 156 | prom_st: 0, |
| 157 | + f_prom_st: 0, | |
| 157 | 158 | prom_r_null: 0, |
| 159 | + f_prom_r_null: 0, | |
| 160 | + | |
| 158 | 161 | prom_end_time: null, |
| 159 | 162 | prom_start_time: null, |
| 160 | 163 | prom_act: null, |
| ... | ... | @@ -285,6 +288,9 @@ Page({ |
| 285 | 288 | istop: 0, //是否置顶风格为1 |
| 286 | 289 | searchbox_transparent: 1, |
| 287 | 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 | 1026 | var ee = this, |
| 1021 | 1027 | gid = this.data.gid, |
| 1022 | 1028 | i = getApp().request; |
| 1029 | + if(this.data.front_g){ | |
| 1030 | + gid = this.data.front_g.goods_id; | |
| 1031 | + } | |
| 1032 | + | |
| 1023 | 1033 | |
| 1024 | 1034 | this.wait_for_store_config(); |
| 1025 | 1035 | //先检验一下商品的活动情况 |
| ... | ... | @@ -1192,7 +1202,8 @@ Page({ |
| 1192 | 1202 | ee.setData({ |
| 1193 | 1203 | data: t.data.data, |
| 1194 | 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 | 1235 | } |
| 1225 | 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 | 1246 | var th = ee; |
| 1231 | 1247 | if (ee.data.cat_name == '') { |
| ... | ... | @@ -2272,6 +2288,7 @@ Page({ |
| 2272 | 2288 | openSpecModal_inte: 0, |
| 2273 | 2289 | openSpecModal_inte_normal: 0, |
| 2274 | 2290 | openSpecModal_pt: 0, |
| 2291 | + openSpecModal_flash_normal:0 | |
| 2275 | 2292 | }) |
| 2276 | 2293 | |
| 2277 | 2294 | if (e.prom_type == 4) { |
| ... | ... | @@ -2710,11 +2727,11 @@ Page({ |
| 2710 | 2727 | |
| 2711 | 2728 | closeSpecModal: function () { |
| 2712 | 2729 | if (this.data.openSpecModal_pt && this.data.is_normal) { |
| 2713 | - this.get_sto(); | |
| 2714 | 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 | 2735 | this.sele_spec_chech_activity(1); |
| 2719 | 2736 | } |
| 2720 | 2737 | |
| ... | ... | @@ -2738,6 +2755,8 @@ Page({ |
| 2738 | 2755 | return false; |
| 2739 | 2756 | } |
| 2740 | 2757 | |
| 2758 | + th.setData({def_pick_store: ut.deep_cp(th.data.front_pick)}); | |
| 2759 | + | |
| 2741 | 2760 | this.setData({ |
| 2742 | 2761 | store: 0, |
| 2743 | 2762 | choice_sort_store: 0, |
| ... | ... | @@ -3466,8 +3485,9 @@ Page({ |
| 3466 | 3485 | item['disc'] = txt; |
| 3467 | 3486 | if (item) this.setData({ |
| 3468 | 3487 | sele_g: item, |
| 3469 | - gid: gid, | |
| 3470 | 3488 | data: item, |
| 3489 | + //gid: gid, //只去掉gid的更新 | |
| 3490 | + | |
| 3471 | 3491 | }); |
| 3472 | 3492 | |
| 3473 | 3493 | |
| ... | ... | @@ -3914,21 +3934,23 @@ Page({ |
| 3914 | 3934 | } |
| 3915 | 3935 | if(func) func(); |
| 3916 | 3936 | }else{ |
| 3917 | - | |
| 3918 | 3937 | if(func) func(); |
| 3919 | 3938 | th.setData({sp_seleing:0}) |
| 3920 | 3939 | wx.hideLoading(); |
| 3940 | + th.data.fir_set_sto=0; | |
| 3921 | 3941 | } |
| 3922 | 3942 | } else { |
| 3923 | 3943 | if(func) func(); |
| 3924 | 3944 | th.setData({sp_seleing:0}) |
| 3925 | 3945 | wx.hideLoading(); |
| 3946 | + th.data.fir_set_sto=0; | |
| 3926 | 3947 | } |
| 3927 | 3948 | },err=>{ |
| 3928 | 3949 | ut.m_toast('网络繁忙,请稍后重试'); |
| 3929 | 3950 | if(func) func(); |
| 3930 | 3951 | th.setData({sp_seleing:0}) |
| 3931 | 3952 | wx.hideLoading(); |
| 3953 | + th.data.fir_set_sto=0; | |
| 3932 | 3954 | }) |
| 3933 | 3955 | }, 200) |
| 3934 | 3956 | |
| ... | ... | @@ -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 | 4083 | deal_pickup(e) { |
| 4040 | 4084 | var th = this; |
| ... | ... | @@ -4227,6 +4271,11 @@ Page({ |
| 4227 | 4271 | }) |
| 4228 | 4272 | } |
| 4229 | 4273 | } |
| 4274 | + | |
| 4275 | + | |
| 4276 | + //-- 设置商品详情页面的门店显示情况 --- | |
| 4277 | + th.deal_front_pk(); | |
| 4278 | + | |
| 4230 | 4279 | } else { |
| 4231 | 4280 | th.setData({ |
| 4232 | 4281 | is_show_sto_cat: -1, |
| ... | ... | @@ -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 | 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 | 4422 | |
| 4367 | 4423 | |
| 4368 | 4424 | } else { |
| 4425 | + th.data.fir_set_sto=0; | |
| 4369 | 4426 | th.setData({ |
| 4370 | 4427 | all_sto: null, |
| 4371 | 4428 | only_pk: null, |
| ... | ... | @@ -4463,7 +4520,8 @@ Page({ |
| 4463 | 4520 | th.deal_pickup(em); |
| 4464 | 4521 | |
| 4465 | 4522 | } else { |
| 4466 | - | |
| 4523 | + | |
| 4524 | + th.data.fir_set_sto=0; | |
| 4467 | 4525 | th.setData({ |
| 4468 | 4526 | all_sto: null, |
| 4469 | 4527 | only_pk: null, |
| ... | ... | @@ -4473,6 +4531,7 @@ Page({ |
| 4473 | 4531 | |
| 4474 | 4532 | } else { |
| 4475 | 4533 | |
| 4534 | + th.data.fir_set_sto=0; | |
| 4476 | 4535 | th.setData({ |
| 4477 | 4536 | all_sto: null, |
| 4478 | 4537 | only_pk: null, |
| ... | ... | @@ -4749,7 +4808,9 @@ Page({ |
| 4749 | 4808 | if (em.data.code == 0) { |
| 4750 | 4809 | |
| 4751 | 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 | 4816 | getApp().request.get("/api/ms/flash_sale/getNew/" + os.stoid + "/" + user_id + "/" + prom_id, { |
| ... | ... | @@ -4788,6 +4849,7 @@ Page({ |
| 4788 | 4849 | prom_id: prom_id, |
| 4789 | 4850 | prom_buy_limit: t.data.data.buy_limit, |
| 4790 | 4851 | prom_act: t.data.data, |
| 4852 | + f_prom_act: t.data.data, | |
| 4791 | 4853 | prom_end_time: prom_end_time, |
| 4792 | 4854 | prom_start_time: prom_start_time, |
| 4793 | 4855 | isshow: 1, |
| ... | ... | @@ -4806,7 +4868,8 @@ Page({ |
| 4806 | 4868 | if (endTime2 > newTime) { |
| 4807 | 4869 | ee.setData({ |
| 4808 | 4870 | prom_time_text: '距秒杀结束还有', |
| 4809 | - prom_st: 1 | |
| 4871 | + prom_st: 1, | |
| 4872 | + f_prom_st: 1 | |
| 4810 | 4873 | }) |
| 4811 | 4874 | ee.countDown(endTime2); |
| 4812 | 4875 | } |
| ... | ... | @@ -5248,7 +5311,8 @@ Page({ |
| 5248 | 5311 | var endTime2 = th.data.prom_act.end_time; |
| 5249 | 5312 | th.setData({ |
| 5250 | 5313 | prom_time_text: '距结束还剩:', |
| 5251 | - prom_st: 1 | |
| 5314 | + prom_st: 1, | |
| 5315 | + f_prom_st: 1, | |
| 5252 | 5316 | }) |
| 5253 | 5317 | setTimeout(function () { |
| 5254 | 5318 | th.countDown(endTime2) |
| ... | ... | @@ -5265,7 +5329,8 @@ Page({ |
| 5265 | 5329 | } |
| 5266 | 5330 | th.setData({ |
| 5267 | 5331 | prom_time_text: '活动已经结束:', |
| 5268 | - prom_st: 3 | |
| 5332 | + prom_st: 3, | |
| 5333 | + f_prom_st: 3 | |
| 5269 | 5334 | }) |
| 5270 | 5335 | th.setData({ |
| 5271 | 5336 | djs: obj |
| ... | ... | @@ -5416,9 +5481,9 @@ Page({ |
| 5416 | 5481 | //如果是拼单活动的普通购买 |
| 5417 | 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 | 5487 | th.data.def_pick_store.is_no_dis_nor=0; |
| 5423 | 5488 | th.setData({def_pick_store:th.data.def_pick_store}) |
| 5424 | 5489 | } |
| ... | ... | @@ -5870,6 +5935,14 @@ Page({ |
| 5870 | 5935 | //----------立即购买_pt----------- |
| 5871 | 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 | 5946 | wxlog.info(getApp().globalData.user_id+'-拼团立即购买:'+JSON.stringify(e)); |
| 5874 | 5947 | |
| 5875 | 5948 | s.set_b_now(e); |
| ... | ... | @@ -5994,7 +6067,7 @@ Page({ |
| 5994 | 6067 | } else { |
| 5995 | 6068 | console.log(222, goods_id) |
| 5996 | 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 | 6075 | else { |
| 6003 | 6076 | console.log(1111, th.data.goods_id) |
| 6004 | 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 | 7372 | choice_store: function (ee) { |
| 7300 | 7373 | var th = this; |
| 7301 | 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 | 7380 | var bconfig = th.data.bconfig; |
| 7303 | 7381 | this.setData({ |
| 7304 | 7382 | keyword:'' |
| ... | ... | @@ -7318,40 +7396,92 @@ Page({ |
| 7318 | 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 | 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 | 7485 | if (bconfig && bconfig.is_sort_storage) { |
| 7356 | 7486 | wx.getLocation({ |
| 7357 | 7487 | type: 'gcj02', |
| ... | ... | @@ -7496,12 +7626,18 @@ Page({ |
| 7496 | 7626 | check_the_pick(item, func) { |
| 7497 | 7627 | var th = this; |
| 7498 | 7628 | var goodsinfo = th.data.sele_g; |
| 7629 | + | |
| 7630 | + if(th.data.isfront){ | |
| 7631 | + goodsinfo=this.data.front_g; | |
| 7632 | + } | |
| 7633 | + | |
| 7634 | + | |
| 7499 | 7635 | var erpwareid = goodsinfo.erpwareid; |
| 7500 | 7636 | var plist = null; |
| 7501 | 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 | 7641 | func(); |
| 7506 | 7642 | return false; |
| 7507 | 7643 | } |
| ... | ... | @@ -7630,6 +7766,10 @@ Page({ |
| 7630 | 7766 | if (!th.data.sele_g) return false; |
| 7631 | 7767 | //判断门店的配送方式是不是匹配 |
| 7632 | 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 | 7773 | if (item.distr_type != 0 && g_distr_type != 0 && item.distr_type != g_distr_type) { |
| 7634 | 7774 | wx.showToast({ |
| 7635 | 7775 | title: "门店配送方式不匹配,请选择其他门店", |
| ... | ... | @@ -7651,6 +7791,14 @@ Page({ |
| 7651 | 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 | 7802 | switch (openindstore) { |
| 7655 | 7803 | case 1: |
| 7656 | 7804 | th.setData({ |
| ... | ... | @@ -8345,8 +8493,12 @@ Page({ |
| 8345 | 8493 | |
| 8346 | 8494 | }, |
| 8347 | 8495 | |
| 8348 | - //-- 积分购 -- | |
| 8496 | + //-- 积分购购买弹出框 -- | |
| 8349 | 8497 | go_pay_integral: function () { |
| 8498 | + | |
| 8499 | + //-- 在打开弹出框的时候,front_pk门店要赋值 -- | |
| 8500 | + this.setData({def_pick_store: ut.deep_cp(this.data.front_pick)}); | |
| 8501 | + | |
| 8350 | 8502 | this.data.g_buy_num = new Map(); |
| 8351 | 8503 | this.get_sto(0) |
| 8352 | 8504 | this.setData({ |
| ... | ... | @@ -8355,14 +8507,15 @@ Page({ |
| 8355 | 8507 | }); |
| 8356 | 8508 | }, |
| 8357 | 8509 | |
| 8358 | - //-- 积分购普通购买 -- | |
| 8510 | + //-- 积分购普通购买弹出框 -- | |
| 8359 | 8511 | go_pay_integral_normal:async function () { |
| 8360 | 8512 | |
| 8361 | 8513 | this.data.g_buy_num = new Map(); |
| 8362 | 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 | 8519 | th.data.def_pick_store.is_no_dis_nor=0; |
| 8367 | 8520 | th.setData({def_pick_store:th.data.def_pick_store}) |
| 8368 | 8521 | } |
| ... | ... | @@ -8400,13 +8553,12 @@ Page({ |
| 8400 | 8553 | this.setData({ |
| 8401 | 8554 | openSpecModal_inte_normal: 0 |
| 8402 | 8555 | }); |
| 8403 | - //要进行还原 | |
| 8404 | - this.get_sto(); | |
| 8556 | + //要进行还原 | |
| 8405 | 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 | 8562 | this.sele_spec_chech_activity(); |
| 8411 | 8563 | }, |
| 8412 | 8564 | ... | ... |
pages/goods/goodsInfo/goodsInfo.wxml
| ... | ... | @@ -115,8 +115,8 @@ |
| 115 | 115 | |
| 116 | 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 | 120 | </view> |
| 121 | 121 | |
| 122 | 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 | 143 | <view class="flex fs35 xc-qtsign">¥</view> |
| 144 | 144 | <view class="fs50 val">{{prom_price}}</view> |
| 145 | 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 | 148 | </view> |
| 149 | 149 | |
| 150 | 150 | <view class="abs white xc-nanber"> |
| ... | ... | @@ -199,7 +199,7 @@ |
| 199 | 199 | <!-- 许程 商家团主页 --> |
| 200 | 200 | <view class="xc-goods-explain flex-vertical-between"> |
| 201 | 201 | <view class="xc-explain fs32 ellipsis-2" wx:if="{{prom_type!=0 }}"> |
| 202 | - {{data.goods_name}} | |
| 202 | + {{front_g.goods_name}} | |
| 203 | 203 | </view> |
| 204 | 204 | <!-- 这个是分享按钮 --> |
| 205 | 205 | <view wx:if="{{isLogin}}" class="xc-share-frame t-c shrink0" bindtap="clickShare"> |
| ... | ... | @@ -236,7 +236,7 @@ |
| 236 | 236 | |
| 237 | 237 | <block wx:for="{{teamgroup}}" wx:for-index="t_ind"> |
| 238 | 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 | 240 | <!-- <view class="flex ai_c"> --> |
| 241 | 241 | <!-- //选项框头像 --> |
| 242 | 242 | <view class='gtou'> |
| ... | ... | @@ -283,11 +283,11 @@ |
| 283 | 283 | <text class="rel_txt" wx:if="{{!prom_integral && !prom_price}}">0积分</text> |
| 284 | 284 | |
| 285 | 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 | 287 | </text> |
| 288 | 288 | |
| 289 | 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 | 291 | </text> |
| 292 | 292 | |
| 293 | 293 | </view> |
| ... | ... | @@ -304,13 +304,13 @@ |
| 304 | 304 | {{prom_act.show_time_off}}开始兑换 |
| 305 | 305 | </view> |
| 306 | 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 | 309 | </view> |
| 310 | 310 | <view class="goods-num"> |
| 311 | 311 | <view class="sales">销量:{{prom_act.buy_num+prom_act.virtual}}件</view> |
| 312 | 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 | 314 | </view> |
| 315 | 315 | <view class="stock">{{categories3[0].num}}人评价</view> |
| 316 | 316 | </view> |
| ... | ... | @@ -327,21 +327,21 @@ |
| 327 | 327 | <view class="co-red" wx:if="{{prom_type==0 || prom_type==3}}"> |
| 328 | 328 | |
| 329 | 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 | 331 | <view class="flex ai-center grade-card-frame"> |
| 332 | 332 | <image class="img" src="{{iurl}}/miniapp/images/userinfo/userinfo/privilege_t.png"></image> |
| 333 | 333 | <view class="fs24 white view card-name ellipsis-1">{{card_name}}</view> |
| 334 | 334 | </view> |
| 335 | 335 | <text class="rel yuan">¥</text> |
| 336 | - {{filters.toFix(data[card_field],2)}} | |
| 336 | + {{filters.toFix(front_g[card_field],2)}} | |
| 337 | 337 | </block> |
| 338 | 338 | |
| 339 | 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 | 341 | </block> |
| 342 | 342 | |
| 343 | 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 | 345 | </view> |
| 346 | 346 | |
| 347 | 347 | </view> |
| ... | ... | @@ -355,33 +355,33 @@ |
| 355 | 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 | 359 | <view class="flex ai-center grade-card-frame card-frame"> |
| 360 | 360 | <image class="img" src="{{iurl}}/miniapp/images/userinfo/userinfo/privilege_t.png"></image> |
| 361 | 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 | 363 | </view> |
| 364 | 364 | </view> |
| 365 | 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 | 367 | </view> |
| 368 | 368 | </view> |
| 369 | 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 | 373 | <view class="beauty-makeup-frame flex ai-center"> |
| 374 | 374 | <view class="left flex ai-center jc_sa"> |
| 375 | 375 | <view class="flex ai-center grade-card-frame card-frame advert-card"> |
| 376 | 376 | <image class="img" src="{{iurl}}/miniapp/images/userinfo/userinfo/privilege_t.png"></image> |
| 377 | 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 | 379 | </view> |
| 380 | 380 | </view> |
| 381 | 381 | <view class="card-effect"> |
| 382 | 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 | 385 | </view> |
| 386 | 386 | <view class="fs22 xc-ash">开通会员 尽享更多优惠</view> |
| 387 | 387 | </view> |
| ... | ... | @@ -393,7 +393,7 @@ |
| 393 | 393 | </view> |
| 394 | 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 | 397 | <view class="beauty-makeup-frame flex ai-center"> |
| 398 | 398 | <view class="left flex ai-center jc_sa"> |
| 399 | 399 | <view class="flex ai-center grade-card-frame card-frame advert-card"> |
| ... | ... | @@ -404,7 +404,7 @@ |
| 404 | 404 | <view class="fs24 xc-black3"> |
| 405 | 405 | 成为{{card_name}}立 |
| 406 | 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 | 408 | </text> |
| 409 | 409 | 元 |
| 410 | 410 | </view> |
| ... | ... | @@ -422,13 +422,13 @@ |
| 422 | 422 | <!-- 许程商品名字 --> |
| 423 | 423 | <view wx:if="{{prom_type!=1 && prom_type!=2 }}"> |
| 424 | 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 | 427 | </view> |
| 428 | 428 | </view> |
| 429 | 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 | 432 | <view class="stock">{{categories3[0].num}}人评价</view> |
| 433 | 433 | </view> |
| 434 | 434 | |
| ... | ... | @@ -439,8 +439,8 @@ |
| 439 | 439 | <text class="fs30">¥</text> |
| 440 | 440 | {{prom_price}} |
| 441 | 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 | 444 | </view> |
| 445 | 445 | <!-- 这个是分享按钮 --> |
| 446 | 446 | <view wx:if="{{isLogin}}" class="xc-share-frame t-c shrink0" bindtap="clickShare"> |
| ... | ... | @@ -453,11 +453,11 @@ |
| 453 | 453 | |
| 454 | 454 | <!-- 秒杀的活动名称 --> |
| 455 | 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 | 457 | </view> |
| 458 | 458 | |
| 459 | 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 | 462 | <view wx:if="{{isLogin}}" class="xc-share-frame t-c shrink0" bindtap="clickShare" style="flex-shrink:0;position: relative;top: -22rpx;"> |
| 463 | 463 | <view class="iconfont icon-share"></view> |
| ... | ... | @@ -465,26 +465,26 @@ |
| 465 | 465 | </view> |
| 466 | 466 | </view> |
| 467 | 467 | |
| 468 | - <!-- 许程 7.24 暂时注释 --> | |
| 468 | + <!-- 许程 7.24 暂时注释,秒杀才有多规格--> | |
| 469 | 469 | <view wx:if="{{prom_type==1}}"> |
| 470 | 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 | 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 | 477 | <view class="sales">已购:0件</view> |
| 478 | 478 | </block> |
| 479 | 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 | 481 | </block> |
| 482 | 482 | </block> |
| 483 | 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 | 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 | 488 | </block> |
| 489 | 489 | </view> |
| 490 | 490 | </view> |
| ... | ... | @@ -676,7 +676,7 @@ |
| 676 | 676 | |
| 677 | 677 | |
| 678 | 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 | 680 | <view data-coupon="1" bindtap="switchCoupon" class="cx-frame flex" style="position: relative"> |
| 681 | 681 | <view class="cx-sizs fs30">领券</view> |
| 682 | 682 | <view class="flex ai_c f1 pdh20"> |
| ... | ... | @@ -695,8 +695,8 @@ |
| 695 | 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 | 700 | <view class="flex-vertical-between "> |
| 701 | 701 | <view class="flex-vertical select_store_height"> |
| 702 | 702 | <image class="stores-img" src="{{iurl}}/miniapp/images/stores.png"></image> |
| ... | ... | @@ -704,36 +704,36 @@ |
| 704 | 704 | </view> |
| 705 | 705 | <view hidden="{{has_def && sys_switch.is_pricing_open_store}}" class="red_bb fs26">更多门店<text class="bg_jj"></text></view> |
| 706 | 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 | 708 | <view class="flex-space-between address ai_end pdv10"> |
| 709 | 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 | 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 | 714 | </view> |
| 715 | 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 | 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 | 720 | </view> |
| 721 | 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 | 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 | 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 | 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 | 733 | </view> |
| 734 | 734 | </block> |
| 735 | 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 | 737 | </view> |
| 738 | 738 | </view> |
| 739 | 739 | </view> |
| ... | ... | @@ -803,6 +803,7 @@ |
| 803 | 803 | </view> |
| 804 | 804 | </scroll-view> |
| 805 | 805 | </view> |
| 806 | + | |
| 806 | 807 | <!-- 图文详情 --> |
| 807 | 808 | <view class="bdt16"> |
| 808 | 809 | <view class="t_g_info"> |
| ... | ... | @@ -816,7 +817,7 @@ |
| 816 | 817 | <text>商品名称</text> |
| 817 | 818 | </view> |
| 818 | 819 | <view class="item_right"> |
| 819 | - <text>{{data.goods_name}}</text> | |
| 820 | + <text>{{front_g.goods_name}}</text> | |
| 820 | 821 | </view> |
| 821 | 822 | </view> |
| 822 | 823 | <view class="tb_item tb-l"> |
| ... | ... | @@ -824,7 +825,7 @@ |
| 824 | 825 | <text>商品编号</text> |
| 825 | 826 | </view> |
| 826 | 827 | <view class="item_right"> |
| 827 | - <text>{{data.goods_sn}}</text> | |
| 828 | + <text>{{front_g.goods_sn}}</text> | |
| 828 | 829 | </view> |
| 829 | 830 | </view> |
| 830 | 831 | <view class="tb_item tb-l"> |
| ... | ... | @@ -832,7 +833,7 @@ |
| 832 | 833 | <text>商品条码</text> |
| 833 | 834 | </view> |
| 834 | 835 | <view class="item_right"> |
| 835 | - <text>{{data.sku}}</text> | |
| 836 | + <text>{{front_g.sku}}</text> | |
| 836 | 837 | </view> |
| 837 | 838 | </view> |
| 838 | 839 | <view class="tb_item tb-l" wx:if="{{cat_name && is_show_pl}}"> |
| ... | ... | @@ -864,7 +865,7 @@ |
| 864 | 865 | <text>规格</text> |
| 865 | 866 | </view> |
| 866 | 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 | 869 | </view> |
| 869 | 870 | </view> |
| 870 | 871 | <view class="tb_item tb-l"> |
| ... | ... | @@ -872,7 +873,7 @@ |
| 872 | 873 | <text>上架时间</text> |
| 873 | 874 | </view> |
| 874 | 875 | <view class="item_right"> |
| 875 | - <text>{{data.on_time}}</text> | |
| 876 | + <text>{{front_g.on_time}}</text> | |
| 876 | 877 | </view> |
| 877 | 878 | </view> |
| 878 | 879 | </view> |
| ... | ... | @@ -904,7 +905,7 @@ |
| 904 | 905 | <text>商品名称</text> |
| 905 | 906 | </view> |
| 906 | 907 | <view class="item_right"> |
| 907 | - <text>{{data.goods_name}}</text> | |
| 908 | + <text>{{front_g.goods_name}}</text> | |
| 908 | 909 | </view> |
| 909 | 910 | </view> |
| 910 | 911 | <view class="tb_item tb-l"> |
| ... | ... | @@ -912,7 +913,7 @@ |
| 912 | 913 | <text>商品编号</text> |
| 913 | 914 | </view> |
| 914 | 915 | <view class="item_right"> |
| 915 | - <text>{{data.goods_sn}}</text> | |
| 916 | + <text>{{front_g.goods_sn}}</text> | |
| 916 | 917 | </view> |
| 917 | 918 | </view> |
| 918 | 919 | <view class="tb_item tb-l"> |
| ... | ... | @@ -920,7 +921,7 @@ |
| 920 | 921 | <text>商品条码</text> |
| 921 | 922 | </view> |
| 922 | 923 | <view class="item_right"> |
| 923 | - <text>{{data.sku}}</text> | |
| 924 | + <text>{{front_g.sku}}</text> | |
| 924 | 925 | </view> |
| 925 | 926 | </view> |
| 926 | 927 | <view class="tb_item tb-l" wx:if="{{cat_name && is_show_pl}}"> |
| ... | ... | @@ -952,7 +953,7 @@ |
| 952 | 953 | <text>规格</text> |
| 953 | 954 | </view> |
| 954 | 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 | 957 | </view> |
| 957 | 958 | </view> |
| 958 | 959 | <view class="tb_item tb-l"> |
| ... | ... | @@ -960,7 +961,7 @@ |
| 960 | 961 | <text>上架时间</text> |
| 961 | 962 | </view> |
| 962 | 963 | <view class="item_right"> |
| 963 | - <text>{{data.on_time}}</text> | |
| 964 | + <text>{{front_g.on_time}}</text> | |
| 964 | 965 | </view> |
| 965 | 966 | </view> |
| 966 | 967 | </view> |
| ... | ... | @@ -1102,13 +1103,13 @@ |
| 1102 | 1103 | <view>购物车</view> |
| 1103 | 1104 | </navigator> |
| 1104 | 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 | 1108 | </view> |
| 1108 | 1109 | <!-- 普通商品购买 --> |
| 1109 | 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 | 1113 | <view bindtap="openSpecModel" data-ind="1" class="join-btn cart-btn">加入购物车</view> |
| 1113 | 1114 | <view bindtap="openSpecModel" data-ind="2" class="buy-btn cart-btn">立即购买</view> |
| 1114 | 1115 | </block> |
| ... | ... | @@ -1118,7 +1119,7 @@ |
| 1118 | 1119 | </block> |
| 1119 | 1120 | <!-- -----秒杀------ --> |
| 1120 | 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 | 1123 | <view bindtap="openSpecModel" data-ind="1" class="join-btn cart-btn">加入购物车</view> |
| 1123 | 1124 | <view bindtap="openSpecModel" data-ind="2" class="buy-btn cart-btn">立即抢购</view> |
| 1124 | 1125 | </block> |
| ... | ... | @@ -1177,11 +1178,11 @@ |
| 1177 | 1178 | <block wx:if="{{prom_type==6}}"> |
| 1178 | 1179 | <view bindtap="openSpecModel_pt" data-it="1" data-ind="1" class="join-btn cart-btn line-h"> |
| 1179 | 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 | 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 | 1186 | </view> |
| 1186 | 1187 | <view>单独购买</view> |
| 1187 | 1188 | </view> |
| ... | ... | @@ -1236,10 +1237,10 @@ |
| 1236 | 1237 | <block wx:if="{{is_shopbuy}}"> |
| 1237 | 1238 | <view bindtap="go_pay_integral_normal" class="join-btn cart-btn line-h"> |
| 1238 | 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 | 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 | 1244 | </view> |
| 1244 | 1245 | <view>单独购买</view> |
| 1245 | 1246 | </view> |
| ... | ... | @@ -1390,12 +1391,12 @@ |
| 1390 | 1391 | <view hidden="{{ismend==1}}" style="max-height: 120rpx;overflow-y: auto;"> |
| 1391 | 1392 | |
| 1392 | 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 | 1395 | {{item.gg}} |
| 1395 | 1396 | </view> |
| 1396 | 1397 | </block> |
| 1397 | 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 | 1400 | {{item.gg}} |
| 1400 | 1401 | </view> |
| 1401 | 1402 | </block> |
| ... | ... | @@ -1682,7 +1683,7 @@ |
| 1682 | 1683 | <view class="store-list"> |
| 1683 | 1684 | <!-- 如果还没有点击更多门店的时候 --> |
| 1684 | 1685 | <block wx:if="{{choice_sort_store==0}}"> |
| 1685 | - <!-- 需要for循环 --> | |
| 1686 | + <!-- 需要for循环is_show_sto_cat表示门店的数量已经超10个 --> | |
| 1686 | 1687 | <block wx:if="{{is_show_sto_cat==1}}"> |
| 1687 | 1688 | <view class="store_choose flex" wx:for="{{def_pickpu_list}}" bindtap="choose_for_store_fir" data-ind="{{index}}"> |
| 1688 | 1689 | <view class="store flex-vertical"> |
| ... | ... | @@ -1716,6 +1717,7 @@ |
| 1716 | 1717 | </view> |
| 1717 | 1718 | </block> |
| 1718 | 1719 | <block wx:else> |
| 1720 | + <!-- 此时的情况就是门店的数量少于10个 --> | |
| 1719 | 1721 | <view class="store_choose flex" wx:for="{{only_pk}}" bindtap="choose_for_store_fir" data-ind="{{index}}"> |
| 1720 | 1722 | <view class="store flex-vertical"> |
| 1721 | 1723 | <!-- 需要点击事件 --> |
| ... | ... | @@ -1815,6 +1817,7 @@ |
| 1815 | 1817 | </block> |
| 1816 | 1818 | </view> |
| 1817 | 1819 | </block> |
| 1820 | + | |
| 1818 | 1821 | <!-- ---------------分享弹窗--------------- --> |
| 1819 | 1822 | <!-- 二维码显示页面 --> |
| 1820 | 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 | 1012 | wx_back:wx_back, |
| 1013 | 1013 | _debounce, |
| 1014 | 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 | }; | ... | ... |