userId); return $this->data($result); } /** * 获取工程师的课程列表 * @return \think\response\Json */ public function getCourseList() { $params = request()->get(); return $this->data(TrainingLogic::getCourseList($this->userId,$params)); } /** * 修改学习视频记录状态 * @return \think\response\Json */ public function upWorkerVideoCourse() { $params = request()->post(); $result = TrainingLogic::upWorkerCourse($params); if($result === false){ return $this->fail(TrainingLogic::getError()); } return $this->success('', [], 1, 1); } /** * 获取考试列表(即开始考试) * @return \think\response\Json */ public function getQuestionList() { $params = request()->get(); $result = TrainingLogic::getQuestionList($params); return $this->data($result); } /** * 提交考试(即结束考试) * @return \think\response\Json */ public function submitExam() { $params = request()->post(); $result = TrainingLogic::submitExam($params); if($result === false){ return $this->fail(TrainingLogic::getError()); } return $this->success('', [], 1, 1); } /** * 考试结果统计 * @return \think\response\Json */ public function examStatistics() { $params = request()->get(); $result = TrainingLogic::examStatistics($params); return $this->data($result); } }