diff --git a/pages/goods/goodsInfo/goodsInfo.js b/pages/goods/goodsInfo/goodsInfo.js index 21c7fe3..577cc73 100644 --- a/pages/goods/goodsInfo/goodsInfo.js +++ b/pages/goods/goodsInfo/goodsInfo.js @@ -3593,30 +3593,41 @@ Page({ //判断会员的默认的门店是不是匹配指定的门店 if (th.data.def_pick_store && JSON.stringify(th.data.def_pick_store) != '{}'){ - //-- 查找一下门店有没有在 -- var idx1=pickup_ids.findIndex(function (e){ return e.pickup_id==th.data.def_pick_store.pickup_id; }) if(idx1<0){ - th.data.def_pick_store.is_no_dis_nor=1; //如果是秒杀的指定门店,就要设置秒杀的 if(!is_normal && (th.data.prom_type==1 || th.data.prom_type==6) ){ th.data.def_pick_store.is_no_dis_act=1; }else{ th.data.def_pick_store.is_no_dis_nor=1; } - that.setData({ - def_pick_store: th.data.def_pick_store - }) + }else{ + th.data.def_pick_store.is_no_dis_nor=0; + th.data.def_pick_store.is_no_dis_act=0; } - } - + that.setData({ + def_pick_store: th.data.def_pick_store + }) + } e.data.data.pageData=ok_arr; //数组重新赋值 e.data.data.total=ok_arr.length; //数组的长度 } + else{ + //-- 多规格指定门店优化 -- + if (th.data.def_pick_store && JSON.stringify(th.data.def_pick_store) != '{}'){ + th.data.def_pick_store.is_no_dis_nor=0; + th.data.def_pick_store.is_no_dis_act=0; + that.setData({ + def_pick_store: th.data.def_pick_store + }) + } + + } var his_cate_num = 0; for (let i in e.data.data.pageData) { @@ -8457,11 +8468,19 @@ Page({ if (arr.length == 1) { th.data.prom_type = arr[0].prom_type; th.data.prom_id = arr[0].act_id; + //-- 基础的活动类型 -- + th.data.base_nor_prom_type = arr[0].prom_type; + th.data.base_nor_prom_id = arr[0].act_id; + } //-- 如果只有一个进行中的活动的话 -- else if (arr2.length == 1) { th.data.prom_type = arr2[0].prom_type; th.data.prom_id = arr2[0].act_id; + + //-- 基础的活动类型 -- + th.data.base_nor_prom_type = arr[0].prom_type; + th.data.base_nor_prom_id = arr[0].act_id; } if (arr4.length > 0) {