wesmiler 3 dias atrás
pai
commit
12b8261488
1 arquivos alterados com 5 adições e 23 exclusões
  1. 5 23
      app/Http/Controllers/Api/v1/IndexController.php

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

@@ -63,33 +63,15 @@ class IndexController extends webApp
      */
     public function data()
     {
-        $type = request()->post('type',1);
-        try {
-            $data = [
-                // 轮播
-                'banners' => AdService::make()->getListByPosition(1),
-                'articles' => ArticleService::make()->getListByType(1),
-            ];
-
-            return showJson(1010, true, $data);
-        } catch (\Exception $exception) {
-            $error = ['data' => $exception->getTrace(), 'err' => $exception->getMessage()];
-            return showJson(1046, false, $error);
-        }
-    }
-
-    /**
-     * 行业数据
-     * @return array
-     */
-    public function industry()
-    {
         try {
             $data = [
                 // 轮播
                 'banners' => AdService::make()->getListByPosition(2), // 轮播
-                'supervisors' => SupervisorsService::make()->getRecommendList(), // 推荐导师
-                'articles' => ArticleService::make()->getListByType(2), // 行业政策资讯
+                'config'=>[
+                    'app_name' => ConfigService::make()->getConfigByCode('app_name'),
+                    'app_logo' => get_image_url(ConfigService::make()->getConfigByCode('app_logo')),
+                    'index_logo' => get_image_url(ConfigService::make()->getConfigByCode('index_logo')),
+                ]
             ];
 
             return showJson(1010, true, $data);