|
@@ -122,20 +122,28 @@ class Education
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
+
|
|
|
|
+ * 获取课程列表
|
|
|
|
+ * @param $gr_id
|
|
|
|
+ * @return mixed
|
|
|
|
+ * @throws \think\db\exception\DataNotFoundException
|
|
|
|
+ * @throws \think\db\exception\DbException
|
|
|
|
+ * @throws \think\db\exception\ModelNotFoundException
|
|
|
|
+ */
|
|
public function getCourseList($gr_id)
|
|
public function getCourseList($gr_id)
|
|
{
|
|
{
|
|
-
|
|
+
|
|
$courseList = EducationCourse::where('course_status', 1)
|
|
$courseList = EducationCourse::where('course_status', 1)
|
|
->where('gr_id', $gr_id)
|
|
->where('gr_id', $gr_id)
|
|
->where('course_audit', 1)
|
|
->where('course_audit', 1)
|
|
->select();
|
|
->select();
|
|
|
|
|
|
-
|
|
+ return app('json') -> success($courseList);
|
|
- return json([
|
|
+
|
|
- 'code' => 200,
|
|
+
|
|
- 'msg' => 'ok',
|
|
+
|
|
- 'data' => $courseList
|
|
+
|
|
- ]);
|
|
+
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|