Commit 01acb2c3c6e9f4f6b5250b03bcdcecd5daeb7eea

Authored by WXD-SEASON\season
2 parents 1e41d1d9 d9d20c5d

Merge branch 'dev' of http://git.vipzhuang.cn/wxd/MShopWeApp into test

packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo.js
@@ -6357,7 +6357,7 @@ Page({ @@ -6357,7 +6357,7 @@ Page({
6357 var url = '/api/weshop/activitylist/listGoodActInfo2New'; 6357 var url = '/api/weshop/activitylist/listGoodActInfo2New';
6358 var req_d = { 6358 var req_d = {
6359 "store_id": os.stoid, 6359 "store_id": os.stoid,
6360 - "goods_id": this.data.gid, 6360 + "goods_id": gid,
6361 "user_id": user_id, 6361 "user_id": user_id,
6362 } 6362 }
6363 await getApp().request.promiseGet(url, { 6363 await getApp().request.promiseGet(url, {
pages/goods/goodsInfo/goodsInfo.js
@@ -3444,7 +3444,7 @@ Page({ @@ -3444,7 +3444,7 @@ Page({
3444 else that.get_sto(); 3444 else that.get_sto();
3445 3445
3446 if (!item.whsle_id && ([1,2,4,6].indexOf(item.prom_type)==-1 || this.data.is_normal==1)) 3446 if (!item.whsle_id && ([1,2,4,6].indexOf(item.prom_type)==-1 || this.data.is_normal==1))
3447 - that.check_is_youhui(gid, that.data.is_normal); 3447 + that.check_is_youhui(gid, that.data.is_normal,1);
3448 3448
3449 //默认门店要拿下门店库存 3449 //默认门店要拿下门店库存
3450 if (that.data.sales_rules >= 2 && that.data.def_pick_store && !that.data.sele_g.whsle_id && [1,2,4,6].indexOf(item.prom_type)==-1) { 3450 if (that.data.sales_rules >= 2 && that.data.def_pick_store && !that.data.sele_g.whsle_id && [1,2,4,6].indexOf(item.prom_type)==-1) {
@@ -7478,19 +7478,19 @@ Page({ @@ -7478,19 +7478,19 @@ Page({
7478 }) 7478 })
7479 }, 7479 },
7480 7480
7481 - //---检查有没有优惠活动---  
7482 - check_is_youhui:async function (gid, is_nor) { 7481 + //---检查有没有优惠活动--- is_nor的普通购买的时候,is_spec是切换规格的时候
  7482 + check_is_youhui:async function (gid, is_nor,is_spec) {
7483 var th = this; 7483 var th = this;
7484 var user_id = getApp().globalData.user_id; 7484 var user_id = getApp().globalData.user_id;
7485 if (!user_id) user_id = 0; 7485 if (!user_id) user_id = 0;
7486 7486
7487 //普通购买的时候,重新算一下组合购有没有 7487 //普通购买的时候,重新算一下组合购有没有
7488 - if(is_nor){ 7488 + if(is_nor || is_spec){
7489 var arr3=null; 7489 var arr3=null;
7490 var url = '/api/weshop/activitylist/listGoodActInfo2New'; 7490 var url = '/api/weshop/activitylist/listGoodActInfo2New';
7491 var req_d = { 7491 var req_d = {
7492 "store_id": os.stoid, 7492 "store_id": os.stoid,
7493 - "goods_id": this.data.gid, 7493 + "goods_id": gid,
7494 "user_id": user_id, 7494 "user_id": user_id,
7495 } 7495 }
7496 await getApp().request.promiseGet(url, { 7496 await getApp().request.promiseGet(url, {
@@ -7518,7 +7518,15 @@ Page({ @@ -7518,7 +7518,15 @@ Page({
7518 } 7518 }
7519 if (e.data.data.is_end == 0 && ut.gettimestamp() < e.data.data.end_time) { 7519 if (e.data.data.is_end == 0 && ut.gettimestamp() < e.data.data.end_time) {
7520 //-- 获取商品列表 -- 7520 //-- 获取商品列表 --
7521 - th.data.zh_act=e.data.data; 7521 +
  7522 + if(is_spec){
  7523 + th.setData({
  7524 + zh_act:e.data.data
  7525 + })
  7526 + }else{
  7527 + th.data.zh_act=e.data.data;
  7528 + }
  7529 +
7522 th.getUserBuyPromNum(e.data.data.id) 7530 th.getUserBuyPromNum(e.data.data.id)
7523 } 7531 }
7524 } 7532 }