|
|
|
|
@ -119,6 +119,37 @@ class CourseController extends CommonController
|
|
|
|
|
return $this->success($detail);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @OA\Get(
|
|
|
|
|
* path="/api/mobile/course/evaluation-detail",
|
|
|
|
|
* tags={"小程序-课程"},
|
|
|
|
|
* summary="课程详情",
|
|
|
|
|
* @OA\Parameter(name="course_content_evaluation_id", in="query", @OA\Schema(type="string"), required=false, description="问卷id"),
|
|
|
|
|
* @OA\Response(
|
|
|
|
|
* response=200,
|
|
|
|
|
* description="操作成功"
|
|
|
|
|
* )
|
|
|
|
|
* )
|
|
|
|
|
*/
|
|
|
|
|
public function evaluationDetail()
|
|
|
|
|
{
|
|
|
|
|
$all = \request()->all();
|
|
|
|
|
$messages = [
|
|
|
|
|
'course_content_evaluation_id.required' => '问卷id必填',
|
|
|
|
|
];
|
|
|
|
|
$validator = Validator::make($all, [
|
|
|
|
|
'course_content_evaluation_id' => 'required'
|
|
|
|
|
], $messages);
|
|
|
|
|
if ($validator->fails()) {
|
|
|
|
|
return $this->fail([ResponseCode::ERROR_PARAMETER, implode(',', $validator->errors()->all())]);
|
|
|
|
|
}
|
|
|
|
|
$detail = CourseContentEvaluation::with(['courseContentEvaluationAsks' => function ($q) {
|
|
|
|
|
$q->orderBy('sort', 'asc');
|
|
|
|
|
}])->find($all['course_content_evaluation_id']);
|
|
|
|
|
return $this->success($detail);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @OA\Get(
|
|
|
|
|
* path="/api/mobile/course/course-detail-pc",
|
|
|
|
|
|