Commit 7330d6b23334d99cdc6f6365e996783e118954e4

Authored by yvan.ni
1 parent 6a1b66ae

秒杀在预热的时候也不能和商品的多规格一起显示

pages/cart/cart/cart.js
... ... @@ -319,6 +319,7 @@ Page({
319 319 }, 800)
320 320 }
321 321 },
  322 +
322 323 //失效单选
323 324 inCheck_th_item: async function (e) {
324 325 console.log('失效单选');
... ... @@ -336,6 +337,8 @@ Page({
336 337 // this.doCheckAll();
337 338  
338 339 },
  340 +
  341 +
339 342 //清空失效宝贝
340 343 delInva_all(obj = null) {
341 344  
... ... @@ -3317,7 +3320,25 @@ Page({
3317 3320 var steep = getApp().get_limit_qty(i_arr[j], act.length, 1);
3318 3321 var py_type = parseInt(i_arr[j].prom_type + '');
3319 3322  
  3323 + //商品只查一次。看一下有没有
  3324 + var gd = null;
  3325 + //获取商品信息,包含线下商品ID,指定门店销售的信息
  3326 + await getApp().request.promiseGet("/api/weshop/goods/get/" + oo.stoid + "/" + i_arr[j].goods_id, {}).then(res => {
  3327 + if (res.data.code == 0) gd = res.data.data;
  3328 + })
  3329 +
3320 3330 if ([0, 3, 5, 7, 10].indexOf(py_type) > -1) {
  3331 + //如果是指定门店,就要判断
  3332 + if(gd.pick_group_ids){
  3333 + var idx0=gd.pick_up_lists.findIndex(function (e){
  3334 + return e.pickup_id==i_arr[j].pick_id;
  3335 + })
  3336 + if(idx0<0){
  3337 + getApp().confirmBox(i_arr[j].goods_name + "的指定门店不匹配");
  3338 + wx.hideLoading();
  3339 + return false;
  3340 + }
  3341 + }
3321 3342  
3322 3343 if (mo_num > i_arr[j].goods_num) {
3323 3344 getApp().confirmBox(i_arr[j].goods_name + "的未达到起订数量");
... ... @@ -3342,16 +3363,12 @@ Page({
3342 3363  
3343 3364 }
3344 3365  
3345   -
3346 3366 //--普通商品,如果有开启线下库存的功能,要调用线下库存进行计算,赠品不要进行调用线下库存---
3347 3367 if ((i_arr[j].prom_type == 0 || i_arr[j].prom_type == 3 || i_arr[j].prom_type == 5 || i_arr[j].prom_type == 7 || i_arr[j].prom_type == 10 ||
3348 3368 i_arr[j].need_downlow_num) && th.data.sales_rules >= 2 && i_arr[j].is_gift != 1 && !i_arr[j].whsle_id) {
3349   - //--获取商品的线下商品ID--
3350 3369  
3351   - var gd = null;
3352   - await getApp().request.promiseGet("/api/weshop/goods/get/" + oo.stoid + "/" + i_arr[j].goods_id, {}).then(res => {
3353   - if (res.data.code == 0) gd = res.data.data;
3354   - })
  3370 +
  3371 +
3355 3372  
3356 3373 //--判断商品是线下库存--
3357 3374 var ob = {}
... ...
pages/goods/goodsInfo/goodsInfo.js
... ... @@ -3137,7 +3137,7 @@ Page({
3137 3137 if (prom) {
3138 3138 if ([1,2,4,6].indexOf(parseInt(goodsinfo.prom_type))>-1) {
3139 3139 console.log(prom);
3140   - if (prom.is_end == 0 && prom.end_time > now && prom.start_time < now) continue;
  3140 + if (prom.is_end == 0 && prom.end_time > now && (prom.start_time < now || (prom.show_time && prom.show_time < now ) ) ) continue;
3141 3141 } else {
3142 3142 continue;
3143 3143 }
... ...