作者 何书鹏

活动商品总库存

... ... @@ -38,7 +38,8 @@ class Activity extends Api
"goods_name": "小米Mix3",
"price": "100.00",
"line_price": "1000.00",划线价
"image_text": "图片路径"
"image_text": "图片路径",
"stock_num": 68, 商品总库存
}
]
},
... ... @@ -77,6 +78,8 @@ class Activity extends Api
->sum('number');
$item['price'] = $goods_spec['goods_price'];
$item['line_price'] = $goods_spec['line_price'];
// 总库存
$item->append(['stock_num']);
});
$timeslot = $this->timeplot();
foreach ($timeslot as $key => $value){
... ...