wesmiler 5 месяцев назад
Родитель
Сommit
9394c3398d
1 измененных файлов с 2 добавлено и 1 удалено
  1. 2 1
      app/Http/Controllers/Api/v1/IndexController.php

+ 2 - 1
app/Http/Controllers/Api/v1/IndexController.php

@@ -59,12 +59,13 @@ class IndexController extends webApp
     public function data()
     {
         try {
+            $position = request()->post('position',1);
             $data = [
                 // 公告
                 'notices' => NoticeService::make()->getRecommandList(),
 
                 // 轮播
-                'banners' => AdService::make()->getListByPosition(1),
+                'banners' => AdService::make()->getListByPosition($position),
             ];
             return showJson(1010, true, $data);
         } catch (\Exception $exception) {