Commit f42cc048b77a34660abfc1753c4b5571ce8bdc80
1 parent
3210b7d4
~~ 不显示搭配购, 幸运购的普通购买 ~~
Showing
2 changed files
with
68 additions
and
37 deletions
packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo.js
| ... | ... | @@ -2031,7 +2031,7 @@ Page({ |
| 2031 | 2031 | if (res.data.code == 0 && res.data.data.total > 0) { |
| 2032 | 2032 | for (let j in res.data.data.pageData) { |
| 2033 | 2033 | let item_j = res.data.data.pageData[j]; |
| 2034 | - var url = '/api/weshop/cart/del/' + e.data.stoid + '/' + item_j.id; | |
| 2034 | + var url = '/api/weshop/cart/del/' + os.stoid + '/' + item_j.id; | |
| 2035 | 2035 | getApp().request.delete(url, {}); |
| 2036 | 2036 | } |
| 2037 | 2037 | } |
| ... | ... | @@ -6399,25 +6399,81 @@ Page({ |
| 6399 | 6399 | |
| 6400 | 6400 | //积分购和拼团的普通购买的的时候,要判断有没有全场优惠活动 |
| 6401 | 6401 | check_nor_promgood(goods_id, back) { |
| 6402 | - getApp().request.get("/api/weshop/goods/getGoodsPromNormal/" + os.stoid + "/" + goods_id, { | |
| 6403 | - success: function (res) { | |
| 6402 | + var th=this; | |
| 6403 | + var user_id=getApp().globalData.user_id; | |
| 6404 | + //调用接口判断订单优惠, | |
| 6405 | + getApp().request.get("/api/weshop/goods/getGoodsPromListNew1/" + os.stoid + "/" + goods_id + "/0" + "/" + user_id, { | |
| 6406 | + success: async function (res) { | |
| 6404 | 6407 | if (res.data.code == 0 && res.data.data) { |
| 6408 | + | |
| 6405 | 6409 | var obj = {}; |
| 6406 | - if(res.data.data.promGoodsLists && res.data.data.promGoodsLists.length > 0){ | |
| 6410 | + var r_data = res.data.data; | |
| 6411 | + //暂时积分够 不和 优惠,阶梯重叠 | |
| 6412 | + if(th.data.zh_act){ | |
| 6407 | 6413 | obj = { |
| 6408 | - act_id: res.data.data.promGoodsLists[0].prom_id, | |
| 6414 | + act_id: th.data.zh_act.id, | |
| 6409 | 6415 | prom_type:3 |
| 6410 | 6416 | } |
| 6411 | - }else if(res.data.data.ladderLists){ | |
| 6417 | + back(obj); | |
| 6418 | + return false; | |
| 6419 | + } | |
| 6420 | + | |
| 6421 | + if (r_data.collocationList) { | |
| 6412 | 6422 | obj = { |
| 6413 | - act_id: res.data.data.ladderLists[0].form_id, | |
| 6414 | - prom_type:10 | |
| 6423 | + act_id: r_data.collocationList[0].prom_id, | |
| 6424 | + prom_type:5 | |
| 6415 | 6425 | } |
| 6426 | + obj.is_coupon=r_data.collocationPromList.is_coupon; | |
| 6427 | + back(obj); | |
| 6428 | + return false; | |
| 6416 | 6429 | } |
| 6417 | 6430 | |
| 6431 | + | |
| 6432 | + var is_ok=1; | |
| 6433 | + if (r_data.ladderLists) { | |
| 6434 | + var act_id = r_data.ladderLists[0].form_id; | |
| 6435 | + //-- 判断会员能不能参与阶梯促销 -- | |
| 6436 | + await getApp().request.promiseGet("/api/weshop/prom/ladderForm/getNew/" + os.stoid + "/" + user_id + "/" + act_id, {}).then(res => { | |
| 6437 | + | |
| 6438 | + | |
| 6439 | + if (res.data.code == 0 && res.data.data) { | |
| 6440 | + var prom_content = ""; | |
| 6441 | + //暂定优惠促销还不能重叠 | |
| 6442 | + if(res.data.data.good_object==0 && (r_data.promGoodsLists || th.data.zh_act)){ | |
| 6443 | + return false; | |
| 6444 | + } | |
| 6445 | + | |
| 6446 | + if(res.data.data.good_object==1){ | |
| 6447 | + r_data.promGoodsLists=null; | |
| 6448 | + } | |
| 6449 | + obj = { | |
| 6450 | + act_id: act_id, | |
| 6451 | + prom_type:10 | |
| 6452 | + } | |
| 6453 | + back(obj); | |
| 6454 | + is_ok=0 | |
| 6455 | + return false; | |
| 6456 | + } | |
| 6457 | + }) | |
| 6458 | + } | |
| 6459 | + | |
| 6460 | + if(!is_ok) return false; | |
| 6461 | + if(r_data.promGoodsLists){ | |
| 6462 | + obj = { | |
| 6463 | + act_id: r_data.promGoodsLists[0].prom_id, | |
| 6464 | + prom_type:3 | |
| 6465 | + } | |
| 6466 | + back(obj); | |
| 6467 | + return false; | |
| 6468 | + } | |
| 6469 | + | |
| 6470 | + obj = { | |
| 6471 | + act_id: 0, | |
| 6472 | + prom_type:0 | |
| 6473 | + } | |
| 6418 | 6474 | back(obj); |
| 6419 | - } else { | |
| 6420 | - back(0) | |
| 6475 | + | |
| 6476 | + | |
| 6421 | 6477 | } |
| 6422 | 6478 | } |
| 6423 | 6479 | }) | ... | ... |
packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo.wxml
| ... | ... | @@ -530,9 +530,6 @@ |
| 530 | 530 | </view> |
| 531 | 531 | </block> --> |
| 532 | 532 | <!-- 判断是不是有秒杀 --> |
| 533 | - | |
| 534 | - | |
| 535 | - | |
| 536 | 533 | |
| 537 | 534 | <!-- <view class="bz_view flex bdt16" wx:if="{{bconfig}}"> |
| 538 | 535 | <image class="bzfu_img" src="{{iurl}}/miniapp/images/bzfu_w.png"></image> |
| ... | ... | @@ -545,30 +542,8 @@ |
| 545 | 542 | <!-- <text class="iconfont icon-shuangjiantouxia c-db"></text> --> |
| 546 | 543 | <!-- </view> |
| 547 | 544 | </view> --> |
| 548 | - <!-- - 搭配促销 -- --> | |
| 549 | - <view class="dp_cx_view" wx:if="{{collocationGoods}}"> | |
| 550 | - <view class="bb_view"> | |
| 551 | - <view>优惠热配</view> | |
| 552 | - <view class="red_bb" bindtap="go_prom_list"> | |
| 553 | - 查看全部 | |
| 554 | - <text class="bg_jj"></text> | |
| 555 | - </view> | |
| 556 | - </view> | |
| 557 | - <!-- 搭配的显示 --> | |
| 558 | - <view class="flex" bindtap="go_prom_list"> | |
| 559 | - <image class="dp_img" src="{{iurl+collocationGoods.img_url}}"></image> | |
| 560 | - <view class="act_content"> | |
| 561 | - <view class="fs32">{{collocationGoods.title}}</view> | |
| 562 | - <view class="fs30 color_b" wx:if="{{collocationGoods.max!=collocationGoods.min}}"> | |
| 563 | - 搭配价¥{{collocationGoods.min}}-{{collocationGoods.max}} | |
| 564 | - </view> | |
| 565 | - <view class="fs30 color_b" wx:else>搭配价¥{{collocationGoods.min}}</view> | |
| 566 | - <view class="fs30 color-gray"> | |
| 567 | - 活动至{{filters.format_time(collocationGoods.end_time,1)}} | |
| 568 | - </view> | |
| 569 | - </view> | |
| 570 | - </view> | |
| 571 | - </view> | |
| 545 | + | |
| 546 | + | |
| 572 | 547 | <!-- - 宝贝评价 -- --> |
| 573 | 548 | <view class="bdt16"> |
| 574 | 549 | <view class="bb_view"> | ... | ... |