|
@@ -63,33 +63,15 @@ class IndexController extends webApp
|
|
|
*/
|
|
*/
|
|
|
public function data()
|
|
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 {
|
|
try {
|
|
|
$data = [
|
|
$data = [
|
|
|
// 轮播
|
|
// 轮播
|
|
|
'banners' => AdService::make()->getListByPosition(2), // 轮播
|
|
'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);
|
|
return showJson(1010, true, $data);
|