request->param(); $params['user_id'] = $userId; $pageSize = $this->request->param('pageSize', 15); $list = $model->getList($params, $pageSize); return $this->renderSuccess(compact('list')); } /** * 学校列表 * @return \think\response\Json * @throws \think\db\exception\DbException */ public function lockedList() { // 获取列表数据 $model = new SourceShoolModel(); $userInfo = UserService::getCurrentLoginUser(true); $userId = isset($userInfo['user_id']) ? intval($userInfo['user_id']) : 0; $params = $this->request->param(); $params['user_id'] = $userId; $params['type'] = 1; $pageSize = $this->request->param('pageSize', 15); $list = $model->getList($params, $pageSize); return $this->renderSuccess(compact('list')); } /** * 选项列表 * @return \think\response\Json * @throws \think\db\exception\DbException */ public function options() { $model = new SourceShoolModel(); $list = $model->getOptionList($this->request->param()); return $this->renderSuccess(compact('list')); } /** * 生源学校学生列表 * @return \think\response\Json * @throws \cores\exception\BaseException * @throws \think\db\exception\DbException */ public function student() { $model = new UserModel; $params = $this->request->param(); $userInfo = UserService::getCurrentLoginUser(true); $userId = isset($userInfo['user_id']) ? intval($userInfo['user_id']) : 0; $schoolId = isset($params['school_id']) ? intval($params['school_id']) : 0; if($schoolId<=0){ return $this->renderSuccess('学校ID不为空'); } $params['user_id'] = $userId; $params['check_type'] = 1; $list = $model->getSourceSchoolUserList($params); return $this->renderSuccess(compact('list')); } }