|
@@ -757,13 +757,13 @@ class HomePageModuleClass
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
// 注意:Base::getByIds 传入 $order 会走到未定义的 order() 方法而报错,这里统一取回后在 PHP 侧排序
|
|
// 注意:Base::getByIds 传入 $order 会走到未定义的 order() 方法而报错,这里统一取回后在 PHP 侧排序
|
|
|
- $rows = GoodsClass::getByIds($goodsIds, null, null, 'id,name,price,priceType,stock,cover,sold,actualSold,status,delStatus,masterId,mainId,createTime');
|
|
|
|
|
|
|
+ $rows = GoodsClass::getByIds($goodsIds, null, null, 'id,name,price,priceType,stock,cover,sold,actualSold,goodsStyle,status,delStatus,masterId,mainId,createTime');
|
|
|
// 仅取当前门店、未删除、上架中的主规格商品
|
|
// 仅取当前门店、未删除、上架中的主规格商品
|
|
|
$rows = array_values(array_filter($rows, function ($row) use ($mainId) {
|
|
$rows = array_values(array_filter($rows, function ($row) use ($mainId) {
|
|
|
- return intval($row['mainId'] ?? 0) === $mainId
|
|
|
|
|
- && intval($row['delStatus'] ?? 0) === 0
|
|
|
|
|
- && intval($row['status'] ?? 0) === 1
|
|
|
|
|
- && intval($row['masterId'] ?? 0) === 0;
|
|
|
|
|
|
|
+ return intval($row['mainId']) === $mainId
|
|
|
|
|
+ && intval($row['delStatus']) === 0
|
|
|
|
|
+ && intval($row['status']) === 1
|
|
|
|
|
+ && intval($row['masterId']) === 0;
|
|
|
}));
|
|
}));
|
|
|
|
|
|
|
|
if ($sort == self::SORT_SALES) {
|
|
if ($sort == self::SORT_SALES) {
|