service = new ArticleService(); } /** * 获取列表 * @return array|mixed */ public function help() { $pageSize = request()->post('limit', 15); $params = request()->all(); $params['status'] = 1; $params['time_type'] = 1; $params['type'] = 1; $list = ArticleService::make()->getDataList($params, $pageSize); return message(1002, true, $list); } /** * 详情 * @return array|mixed */ public function info() { $id = request()->post('id', 0); if($id<=0){ return message(1003, false); } $info = ArticleService::make()->getInfo(['id'=> $id,'mark'=> 1]); if($info){ ArticleService::make()->updateViews($id); } return message(1002, true, $info); } /** * 单页数据 * @return array */ public function page() { $type = request()->post('type', 0); if($type<=0){ return message(1003, false); } $info = ArticleService::make()->getInfo(['type'=> $type,'mark'=> 1]); return message(1002, true, $info); } }