调整开通身份
This commit is contained in:
@@ -28,8 +28,6 @@ class IndexController extends Controller
|
||||
public function index(): JsonResponse
|
||||
{
|
||||
$banners = Banner::query()->ofPosition(Banner::POSITION_INDEX)->get();
|
||||
$centers = Banner::query()->ofPosition(Banner::POSITION_INDEX_CENTER)->get();
|
||||
|
||||
|
||||
$show_goods_id = app('Conf_mall')['show_goods_id'] ?? 0;
|
||||
$show_goods = '';
|
||||
@@ -79,15 +77,13 @@ class IndexController extends Controller
|
||||
->get();
|
||||
|
||||
$data = [
|
||||
'show_goods' => $show_goods ? new GoodsBaseResource($show_goods) : '',
|
||||
'videos' => VideoResource::collection($videos),
|
||||
'goods' => GoodsBaseResource::collection($goods),
|
||||
'banners' => BannerResource::collection($banners),
|
||||
'center' => BannerResource::collection($centers),
|
||||
'memories' => $memoriesData,
|
||||
'healths' => ArticleBaseResource::collection($healths),
|
||||
'water_mobile' => app('Conf_mall')['water_mobile'] ?? '',
|
||||
'categories' => [
|
||||
'show_goods' => $show_goods ? new GoodsBaseResource($show_goods) : '',
|
||||
'videos' => VideoResource::collection($videos),
|
||||
'goods' => GoodsBaseResource::collection($goods),
|
||||
'banners' => BannerResource::collection($banners),
|
||||
'memories' => $memoriesData,
|
||||
'healths' => ArticleBaseResource::collection($healths),
|
||||
'categories' => [
|
||||
'memory' => Category::query()->where('slug', 'MEMORY')->value('id') ?? 0,
|
||||
'health' => Category::query()->where('slug', 'HEALTH')->value('id') ?? 0,
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user