wesmiler 3 месяцев назад
Родитель
Сommit
0594d7a94a
1 измененных файлов с 5 добавлено и 0 удалено
  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()];