post(); $pageSize = request()->post('pageSize', 15); $datas = ArticleService::make()->getDataList($params, $pageSize); return message(1010, true, $datas); } /** * 行业数据 * @return array */ public function industry() { try { $data = [ // 轮播 'banners' => AdService::make()->getListByPosition(2), // 轮播 'supervisors' => SupervisorsService::make()->getRecommendList(), // 推荐导师 'articles' => ArticleService::make()->getListByType(2), // 行业政策资讯 ]; return showJson(1010, true, $data); } catch (\Exception $exception) { $error = ['data' => $exception->getTrace(), 'err' => $exception->getMessage()]; return showJson(1046, false, $error); } } /** * 详情 */ public function info() { $params = request()->all(); $id = isset($params['id'])? intval($params['id']) : 0; if(empty($id)){ return message(1036, false); } if($info = ArticleService::make()->getInfo($id)){ return message(1010, true, $info); }else{ return message(1009, false); } } /** * 单页数据 */ public function page() { $params = request()->all(); $type = isset($params['type'])? intval($params['type']) : 0; if(empty($type)){ return message(1031, false); } if($info = ArticleService::make()->getInfoByType($type)){ return message(1010, true, $info); }else{ return message(1009, false); } } }