diff --git a/application/teach/controller/Subject.php b/application/teach/controller/Subject.php index f5c1924f..14911569 100644 --- a/application/teach/controller/Subject.php +++ b/application/teach/controller/Subject.php @@ -90,7 +90,7 @@ class Subject extends Base // 获取表单数据 - $list = request()->only(['title','jiancheng','category','kaoshi','paixu'],'post'); + $list = request()->only(['title','jiancheng','category','kaoshi','paixu','lieming'],'post'); // 验证表单数据 @@ -127,7 +127,7 @@ class Subject extends Base { // 获取学期信息 - $list['data'] = SJ::field('id,title,jiancheng,category,kaoshi,paixu,status') + $list['data'] = SJ::field('id,title,jiancheng,category,kaoshi,lieming,paixu,status') ->find($id); // 设置页面标题 diff --git a/application/teach/validate/Subject.php b/application/teach/validate/Subject.php index d152427d..c934c7db 100644 --- a/application/teach/validate/Subject.php +++ b/application/teach/validate/Subject.php @@ -15,6 +15,7 @@ class Subject extends Validate protected $rule = [ 'title|名称' => 'require|length:1,25', 'jiancheng|简称' => 'require|length:1,6', + 'lieming|列标识' => 'require', 'category|分类' => 'require|number', 'paixu|排序' => 'number', ]; diff --git a/application/teach/view/subject/create.html b/application/teach/view/subject/create.html index e6baf515..1cc40c4a 100644 --- a/application/teach/view/subject/create.html +++ b/application/teach/view/subject/create.html @@ -20,6 +20,15 @@ autocomplete="off" class="layui-input" value="{$list.data.jiancheng|default=''}" placeholder="中文1-6个字符"> +