diff --git a/packages/advertising/goodsSubmit/index.vue b/packages/advertising/goodsSubmit/index.vue index 1b2c113b..5ac8dc16 100644 --- a/packages/advertising/goodsSubmit/index.vue +++ b/packages/advertising/goodsSubmit/index.vue @@ -163,7 +163,7 @@ - {{ '¥' + item.commodity_goods_info.sales_price }} + {{ '¥' + item.price }} /{{ item.commodity_goods_info.goods_unit }} @@ -553,16 +553,17 @@ export default { } else { let total = 0; this.orderList2.forEach(goods => { - // 团购活动时间判断 - const startTime = new Date(goods.commodity_goods_info.group_buy_activity_info?.start_time).getTime(); - const endTime = new Date(goods.commodity_goods_info.group_buy_activity_info?.end_time).getTime(); - if (currentTime >= startTime && currentTime <= endTime) { - // total += goods.commodity_goods_info.group_buy_price * goods.count + goods.commodity_goods_info.freight; - total += goods.commodity_goods_info.group_buy_price * goods.count; - } else { - // total += goods.commodity_goods_info.sales_price * goods.count + goods.commodity_goods_info.freight; - total += goods.commodity_goods_info.sales_price * goods.count; - } + // // 团购活动时间判断 + // const startTime = new Date(goods.commodity_goods_info.group_buy_activity_info?.start_time).getTime(); + // const endTime = new Date(goods.commodity_goods_info.group_buy_activity_info?.end_time).getTime(); + // if (currentTime >= startTime && currentTime <= endTime) { + // // total += goods.commodity_goods_info.group_buy_price * goods.count + goods.commodity_goods_info.freight; + // total += goods.commodity_goods_info.group_buy_price * goods.count; + // } else { + // // total += goods.commodity_goods_info.sales_price * goods.count + goods.commodity_goods_info.freight; + // total += goods.commodity_goods_info.sales_price * goods.count; + // } + total += goods.price * goods.count; }); // 加运费 return total.toFixed(2); diff --git a/packages/advertising/index/index.vue b/packages/advertising/index/index.vue index 33fe0878..81f2bbc0 100644 --- a/packages/advertising/index/index.vue +++ b/packages/advertising/index/index.vue @@ -172,6 +172,7 @@ export default { { goods_id: item.goods_id, count: item.quantity, + price: item.promotional_price, }, ], adver_id: item.adver_id @@ -195,6 +196,7 @@ export default { { goods_id: item.goods_id, count: item.quantity, + price: item.promotional_price, }, ], adver_id: item.adver_id diff --git a/packages/advertising/shopCar/index.vue b/packages/advertising/shopCar/index.vue index 6061d6f9..d5dd3bb6 100644 --- a/packages/advertising/shopCar/index.vue +++ b/packages/advertising/shopCar/index.vue @@ -70,7 +70,7 @@ - {{ getPrice(item) }} + {{ item.price }} @@ -154,7 +154,7 @@ - {{ getPrice(item) }} + {{ item.price }} @@ -491,14 +491,15 @@ export default { this.isDayCarList.forEach(carItem => { carItem.commodity_cart_and_goods_model.forEach(goods => { if (goods.checked) { - // 团购活动时间判断 - const startTime = new Date(goods.commodity_goods_info.group_buy_activity_info?.start_time).getTime(); - const endTime = new Date(goods.commodity_goods_info.group_buy_activity_info?.end_time).getTime(); - if (currentTime >= startTime && currentTime <= endTime) { - total += goods.commodity_goods_info.group_buy_price * goods.count; - } else { - total += goods.commodity_goods_info.sales_price * goods.count; - } + // // 团购活动时间判断 + // const startTime = new Date(goods.commodity_goods_info.group_buy_activity_info?.start_time).getTime(); + // const endTime = new Date(goods.commodity_goods_info.group_buy_activity_info?.end_time).getTime(); + // if (currentTime >= startTime && currentTime <= endTime) { + // total += goods.commodity_goods_info.group_buy_price * goods.count; + // } else { + // total += goods.commodity_goods_info.sales_price * goods.count; + // } + total += goods.price * goods.count } }); }); @@ -507,14 +508,15 @@ export default { this.shopCarList.forEach(carItem => { carItem.commodity_cart_and_goods_model.forEach(goods => { if (goods.checked) { - // 团购活动时间判断 - const startTime = new Date(goods.commodity_goods_info.group_buy_activity_info?.start_time).getTime(); - const endTime = new Date(goods.commodity_goods_info.group_buy_activity_info?.end_time).getTime(); - if (currentTime >= startTime && currentTime <= endTime) { - total += goods.commodity_goods_info.group_buy_price * goods.count; - } else { - total += goods.commodity_goods_info.sales_price * goods.count; - } + // // 团购活动时间判断 + // const startTime = new Date(goods.commodity_goods_info.group_buy_activity_info?.start_time).getTime(); + // const endTime = new Date(goods.commodity_goods_info.group_buy_activity_info?.end_time).getTime(); + // if (currentTime >= startTime && currentTime <= endTime) { + // total += goods.commodity_goods_info.group_buy_price * goods.count; + // } else { + // total += goods.commodity_goods_info.sales_price * goods.count; + // } + total += goods.price * goods.count } }); }); @@ -718,6 +720,7 @@ export default { goods_id_and_count: [{ goods_id: item.goods_id, count: val, + price: item.price, },], }; request(apiArr.updateCar, "POST", params).then((res) => {