修改团购列表页和商品详情页数据格式不一致的问题
This commit is contained in:
parent
ad58591164
commit
2a69930eaa
@ -598,8 +598,8 @@ export default {
|
|||||||
// 过滤掉group_buy_activity_info为空的数据
|
// 过滤掉group_buy_activity_info为空的数据
|
||||||
if (res.commodity_goods_info_list && Array.isArray(res.commodity_goods_info_list)) {
|
if (res.commodity_goods_info_list && Array.isArray(res.commodity_goods_info_list)) {
|
||||||
res.commodity_goods_info_list = res.commodity_goods_info_list.filter(item => {
|
res.commodity_goods_info_list = res.commodity_goods_info_list.filter(item => {
|
||||||
const startTime = new Date(item.group_buy_goods_activity.group_buy_activity_info?.start_time).getTime();
|
const startTime = new Date(item.group_buy_activity_info?.start_time).getTime();
|
||||||
const endTime = new Date(item.group_buy_goods_activity.group_buy_activity_info?.end_time).getTime();
|
const endTime = new Date(item.group_buy_activity_info?.end_time).getTime();
|
||||||
return item.group_buy_activity_info !== null && currentTime >= startTime && currentTime <= endTime
|
return item.group_buy_activity_info !== null && currentTime >= startTime && currentTime <= endTime
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -653,6 +653,7 @@ export default {
|
|||||||
|
|
||||||
// 切换规格
|
// 切换规格
|
||||||
changeGG(item, index) {
|
changeGG(item, index) {
|
||||||
|
console.log("🚀 ~ changeGG ~ item:", item)
|
||||||
this.currentGG = item;
|
this.currentGG = item;
|
||||||
this.currentGGIndex = index;
|
this.currentGGIndex = index;
|
||||||
if (this.currentGG.cart_count) {
|
if (this.currentGG.cart_count) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user