|
|
|
@ -177,7 +177,7 @@ class Goods extends GoodsService |
|
|
|
|
* @throws \think\db\exception\DbException |
|
|
|
|
* @throws \think\db\exception\ModelNotFoundException |
|
|
|
|
*/ |
|
|
|
|
public function recommendedNew(): array |
|
|
|
|
public function recommendedNew(array $param = []): array |
|
|
|
|
{ |
|
|
|
|
// 获取商品推荐数据 |
|
|
|
|
$setting = $this->getRecommendedSetting(); |
|
|
|
@ -192,6 +192,7 @@ class Goods extends GoodsService |
|
|
|
|
'status' => 10, |
|
|
|
|
'goodsIds' => implode(",",$setting['params']['goodsIds']), |
|
|
|
|
'sortType' => "all", |
|
|
|
|
'page' => $param['page'] ?? 1, |
|
|
|
|
], 10); |
|
|
|
|
} else { |
|
|
|
|
// 数据来源:自动 |
|
|
|
@ -199,6 +200,7 @@ class Goods extends GoodsService |
|
|
|
|
'status' => 10, |
|
|
|
|
'categoryId' => $setting['params']['auto']['category'], |
|
|
|
|
'sortType' => $setting['params']['auto']['goodsSort'], |
|
|
|
|
'page' => $param['page'] ?? 1, |
|
|
|
|
], 10); |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|