master
cody 3 months ago
parent eb373ba27e
commit 2a941788d9

@ -138,7 +138,7 @@ class CourseContentController extends BaseController
if ($validator->fails()) {
return $this->fail([ResponseCode::ERROR_PARAMETER, implode(',', $validator->errors()->all())]);
}
$detail = $this->model->with('courseContentEvaluation.courseContentEvaluationAsks','teacher','directionDetail')->find($all['id']);
$detail = $this->model->with('courseContentEvaluation.courseContentEvaluationAsks', 'teacher', 'directionDetail')->find($all['id']);
return $this->success($detail);
}
@ -290,9 +290,12 @@ class CourseContentController extends BaseController
if (!in_array('课程主题', $keyList)) {
return $this->fail([ResponseCode::ERROR_BUSINESS, '课程主题字段不存在']);
}
if (!in_array('上课地点', $keyList)) {
return $this->fail([ResponseCode::ERROR_BUSINESS, '上课地点字段不存在']);
if (!in_array('主题方向', $keyList)) {
return $this->fail([ResponseCode::ERROR_BUSINESS, '主题方向字段不存在']);
}
// if (!in_array('上课地点', $keyList)) {
// return $this->fail([ResponseCode::ERROR_BUSINESS, '上课地点字段不存在']);
// }
if (!in_array('联系方式', $keyList)) {
return $this->fail([ResponseCode::ERROR_BUSINESS, '联系方式字段不存在']);
}
@ -320,7 +323,8 @@ class CourseContentController extends BaseController
'address' => $value['上课地点'] ?? '',
'theme' => $value['课程主题'] ?? '',
'sex' => $value['性别'] ?? '',
'mobile' => $value['联系方式'] ?? ''
'mobile' => $value['联系方式'] ?? '',
'direction' => $value['主题方向'] ?? ''
];
}
return $this->success($list);

Loading…
Cancel
Save