修改活动商品价格显示不对的问题
This commit is contained in:
parent
12f43b2dff
commit
b8a0a13ad3
@ -163,7 +163,7 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view v-else>
|
<view v-else>
|
||||||
{{ '¥' + item.commodity_goods_info.sales_price }}
|
{{ '¥' + item.price }}
|
||||||
/{{ item.commodity_goods_info.goods_unit }}
|
/{{ item.commodity_goods_info.goods_unit }}
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@ -553,16 +553,17 @@ export default {
|
|||||||
} else {
|
} else {
|
||||||
let total = 0;
|
let total = 0;
|
||||||
this.orderList2.forEach(goods => {
|
this.orderList2.forEach(goods => {
|
||||||
// 团购活动时间判断
|
// // 团购活动时间判断
|
||||||
const startTime = new Date(goods.commodity_goods_info.group_buy_activity_info?.start_time).getTime();
|
// 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();
|
// const endTime = new Date(goods.commodity_goods_info.group_buy_activity_info?.end_time).getTime();
|
||||||
if (currentTime >= startTime && currentTime <= endTime) {
|
// 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 + goods.commodity_goods_info.freight;
|
||||||
total += goods.commodity_goods_info.group_buy_price * goods.count;
|
// total += goods.commodity_goods_info.group_buy_price * goods.count;
|
||||||
} else {
|
// } else {
|
||||||
// total += goods.commodity_goods_info.sales_price * goods.count + goods.commodity_goods_info.freight;
|
// // 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.commodity_goods_info.sales_price * goods.count;
|
||||||
}
|
// }
|
||||||
|
total += goods.price * goods.count;
|
||||||
});
|
});
|
||||||
// 加运费
|
// 加运费
|
||||||
return total.toFixed(2);
|
return total.toFixed(2);
|
||||||
|
|||||||
@ -172,6 +172,7 @@ export default {
|
|||||||
{
|
{
|
||||||
goods_id: item.goods_id,
|
goods_id: item.goods_id,
|
||||||
count: item.quantity,
|
count: item.quantity,
|
||||||
|
price: item.promotional_price,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
adver_id: item.adver_id
|
adver_id: item.adver_id
|
||||||
@ -195,6 +196,7 @@ export default {
|
|||||||
{
|
{
|
||||||
goods_id: item.goods_id,
|
goods_id: item.goods_id,
|
||||||
count: item.quantity,
|
count: item.quantity,
|
||||||
|
price: item.promotional_price,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
adver_id: item.adver_id
|
adver_id: item.adver_id
|
||||||
|
|||||||
@ -70,7 +70,7 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="goodsItem_msg_right_msg">
|
<view class="goodsItem_msg_right_msg">
|
||||||
<view class="goodsItem_msg_right_msg_left">
|
<view class="goodsItem_msg_right_msg_left">
|
||||||
<span>¥</span>{{ getPrice(item) }}
|
<span>¥</span>{{ item.price }}
|
||||||
<!-- {{ item.commodity_goods_info.group_buy_price ?
|
<!-- {{ item.commodity_goods_info.group_buy_price ?
|
||||||
item.commodity_goods_info.group_buy_price :
|
item.commodity_goods_info.group_buy_price :
|
||||||
item.commodity_goods_info.sales_price }} -->
|
item.commodity_goods_info.sales_price }} -->
|
||||||
@ -154,7 +154,7 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="goodsItem_msg_right_msg">
|
<view class="goodsItem_msg_right_msg">
|
||||||
<view class="goodsItem_msg_right_msg_left">
|
<view class="goodsItem_msg_right_msg_left">
|
||||||
<span>¥</span>{{ getPrice(item) }}
|
<span>¥</span>{{ item.price }}
|
||||||
<!-- {{ item.commodity_goods_info.group_buy_price ?
|
<!-- {{ item.commodity_goods_info.group_buy_price ?
|
||||||
item.commodity_goods_info.group_buy_price :
|
item.commodity_goods_info.group_buy_price :
|
||||||
item.commodity_goods_info.sales_price }} -->
|
item.commodity_goods_info.sales_price }} -->
|
||||||
@ -491,14 +491,15 @@ export default {
|
|||||||
this.isDayCarList.forEach(carItem => {
|
this.isDayCarList.forEach(carItem => {
|
||||||
carItem.commodity_cart_and_goods_model.forEach(goods => {
|
carItem.commodity_cart_and_goods_model.forEach(goods => {
|
||||||
if (goods.checked) {
|
if (goods.checked) {
|
||||||
// 团购活动时间判断
|
// // 团购活动时间判断
|
||||||
const startTime = new Date(goods.commodity_goods_info.group_buy_activity_info?.start_time).getTime();
|
// 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();
|
// const endTime = new Date(goods.commodity_goods_info.group_buy_activity_info?.end_time).getTime();
|
||||||
if (currentTime >= startTime && currentTime <= endTime) {
|
// if (currentTime >= startTime && currentTime <= endTime) {
|
||||||
total += goods.commodity_goods_info.group_buy_price * goods.count;
|
// total += goods.commodity_goods_info.group_buy_price * goods.count;
|
||||||
} else {
|
// } else {
|
||||||
total += goods.commodity_goods_info.sales_price * goods.count;
|
// total += goods.commodity_goods_info.sales_price * goods.count;
|
||||||
}
|
// }
|
||||||
|
total += goods.price * goods.count
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@ -507,14 +508,15 @@ export default {
|
|||||||
this.shopCarList.forEach(carItem => {
|
this.shopCarList.forEach(carItem => {
|
||||||
carItem.commodity_cart_and_goods_model.forEach(goods => {
|
carItem.commodity_cart_and_goods_model.forEach(goods => {
|
||||||
if (goods.checked) {
|
if (goods.checked) {
|
||||||
// 团购活动时间判断
|
// // 团购活动时间判断
|
||||||
const startTime = new Date(goods.commodity_goods_info.group_buy_activity_info?.start_time).getTime();
|
// 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();
|
// const endTime = new Date(goods.commodity_goods_info.group_buy_activity_info?.end_time).getTime();
|
||||||
if (currentTime >= startTime && currentTime <= endTime) {
|
// if (currentTime >= startTime && currentTime <= endTime) {
|
||||||
total += goods.commodity_goods_info.group_buy_price * goods.count;
|
// total += goods.commodity_goods_info.group_buy_price * goods.count;
|
||||||
} else {
|
// } else {
|
||||||
total += goods.commodity_goods_info.sales_price * goods.count;
|
// 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_and_count: [{
|
||||||
goods_id: item.goods_id,
|
goods_id: item.goods_id,
|
||||||
count: val,
|
count: val,
|
||||||
|
price: item.price,
|
||||||
},],
|
},],
|
||||||
};
|
};
|
||||||
request(apiArr.updateCar, "POST", params).then((res) => {
|
request(apiArr.updateCar, "POST", params).then((res) => {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user