wesmiler 5 tháng trước cách đây
mục cha
commit
9394c3398d

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

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