作者 何书鹏
1 个管道 的构建 通过 耗费 2 秒

合并分支 'heshupeng' 到 'master'

课程分类加描述



查看合并请求 !289
... ... @@ -5,6 +5,7 @@ return [
'Title' => '标题',
'Cover' => '封面',
'Study_num_rate' => '用户选择比例(%)',
'Description' => '描述',
'Is_top' => '是否置顶',
'Is_top 0' => '否',
'Is_top 1' => '是',
... ...
... ... @@ -27,6 +27,12 @@
<input id="c-study_num_rate" data-rule="required" class="form-control" name="row[study_num_rate]" type="number" value="0">
</div>
</div>
<div class="form-group">
<label for="c-description" class="control-label col-xs-12 col-sm-2">{:__('Description')}:</label>
<div class="col-xs-12 col-sm-8">
<textarea id="c-description" class="form-control" name="row[description]"></textarea>
</div>
</div>
<div class="form-group layer-footer">
<label class="control-label col-xs-12 col-sm-2"></label>
<div class="col-xs-12 col-sm-8">
... ...
... ... @@ -27,6 +27,12 @@
<input id="c-study_num_rate" data-rule="required" class="form-control" name="row[study_num_rate]" type="number" value="{$row.study_num_rate|htmlentities}">
</div>
</div>
<div class="form-group">
<label for="c-description" class="control-label col-xs-12 col-sm-2">{:__('Description')}:</label>
<div class="col-xs-12 col-sm-8">
<textarea id="c-description" class="form-control" name="row[description]">{$row.description|htmlentities}</textarea>
</div>
</div>
<div class="form-group layer-footer">
<label class="control-label col-xs-12 col-sm-2"></label>
<div class="col-xs-12 col-sm-8">
... ...
... ... @@ -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']]);
... ...
... ... @@ -6850,7 +6850,8 @@
"id": 1, //分类ID
"title": "测试课程", //分类标题
"cover": "", //分类图片
"study_num_rate": 3 //多少人选择(%)
"study_num_rate": 3, //多少人选择(%)
"description": "" //描述
}]
}
}</pre>
... ... @@ -23887,7 +23888,7 @@
<div class="row mt0 footer">
<div class="col-md-6" align="left">
Generated on 2021-03-31 16:28:05 </div>
Generated on 2021-04-01 15:08:34 </div>
<div class="col-md-6" align="right">
<a href="./" target="_blank">企智帮</a>
</div>
... ...