post(); $pageSize = request()->post('pageSize', 15); $datas = JobsService::make()->getDataList($params, $pageSize); return showJson(1010, true, $datas); } /** * 分类 * @return array */ public function categorys() { $datas = JobsService::make()->getCategoryList(); return showJson(1010, true, $datas); } /** * 详情 * @return array */ public function info() { $params = request()->all(); $id = isset($params['id'])? $params['id'] : 0; try { if(!$result = JobsService::make()->getInfo($id, $this->userId)){ return showJson(1009, false); }else{ return showJson(1010, true, $result); } } catch (\Exception $exception) { $error = ['data' => $exception->getTrace(), 'err' => $exception->getMessage()]; return showJson(1046, false, $error); } } /** * 申请 * @return array */ public function apply() { $params = request()->all(); try { if(!$result = JobsService::make()->apply($this->userId, $params)){ return showJson(JobsService::make()->getError(), false); }else{ return showJson(JobsService::make()->getError(), true, $result); } } catch (\Exception $exception) { $error = ['data' => $exception->getTrace(), 'err' => $exception->getMessage()]; return showJson(1046, false, $error); } } }