|
|
|
@ -24,10 +24,11 @@ class GoodsRecommendController extends BaseController |
|
|
|
public function getByTabsForAppletIndex() |
|
|
|
{ |
|
|
|
$tab = $this->request->input('tab', ''); |
|
|
|
$marketId = $this->request->input('market_id', 0); |
|
|
|
$page = $this->request->input('page', 1); |
|
|
|
$pagesize = $this->request->input('pagesize', 10); |
|
|
|
|
|
|
|
$builder = Goods::query()->with('store'); |
|
|
|
$builder = Goods::query()->with('store')->where('market_id', $marketId); |
|
|
|
|
|
|
|
switch ($tab) { |
|
|
|
case Tabs::APPLET_INDEX_RECOMMEND: |
|
|
|
@ -62,8 +63,10 @@ class GoodsRecommendController extends BaseController |
|
|
|
*/ |
|
|
|
public function getByTab() |
|
|
|
{ |
|
|
|
$marketId = $this->request->input('market_id', 0); |
|
|
|
$goods = Goods::query() |
|
|
|
->with(['store']) |
|
|
|
->where('market_id', $marketId) |
|
|
|
->inRandomOrder() |
|
|
|
->limit(20) |
|
|
|
->get()->toArray(); |
|
|
|
|