...
|
...
|
@@ -69,7 +69,8 @@ class Course extends Api |
|
|
"id": 1, //分类ID
|
|
|
"title": "测试课程", //分类标题
|
|
|
"cover": "", //分类图片
|
|
|
"study_num_rate": 3 //多少人选择(%)
|
|
|
"study_num_rate": 3, //多少人选择(%)
|
|
|
"description": "" //描述
|
|
|
}]
|
|
|
}
|
|
|
})
|
...
|
...
|
@@ -78,7 +79,7 @@ class Course extends Api |
|
|
{
|
|
|
$page = $this->request->param('page', 1, 'intval');
|
|
|
$page_num = $this->request->param('page_num', 10, 'intval');
|
|
|
$data = CourseCategory::field("id,title,cover,study_num_rate")
|
|
|
$data = CourseCategory::field("id,title,cover,study_num_rate,description")
|
|
|
->paginate($page_num,false,['page'=>$page])
|
|
|
->toArray();
|
|
|
$this->success('成功',['total'=>$data['total'],'list'=>$data['data']]);
|
...
|
...
|
|