wesmiler 3 miesięcy temu
rodzic
commit
0594d7a94a
1 zmienionych plików z 5 dodań i 0 usunięć
  1. 5 0
      app/Http/Controllers/Api/v1/IndexController.php

+ 5 - 0
app/Http/Controllers/Api/v1/IndexController.php

@@ -59,6 +59,7 @@ class IndexController extends webApp
     public function data()
     {
         try {
+            $type = request()->post('type',1);
             $position = request()->post('position',1);
             $data = [
                 // 公告
@@ -67,6 +68,10 @@ class IndexController extends webApp
                 // 轮播
                 'banners' => AdService::make()->getListByPosition($position),
             ];
+
+            if($type==2){
+                $data['socials'] = SocialS
+            }
             return showJson(1010, true, $data);
         } catch (\Exception $exception) {
             $error = ['data' => $exception->getTrace(), 'err' => $exception->getMessage()];