diff --git a/application/keti/view/keti_info/read.html b/application/keti/view/keti_info/read.html
new file mode 100644
index 00000000..e36101a1
--- /dev/null
+++ b/application/keti/view/keti_info/read.html
@@ -0,0 +1,230 @@
+{extend name="common@list" /}
+{block name="topnav"}
+
+{/block}
+{block name="bouttons"}
+
+
+{/block}
+{block name="tables"}
+
+
+
+{/block}
+{block name="myjs"}
+
+{/block}
\ No newline at end of file
diff --git a/application/rongyu/controller/JsRongyu.php b/application/rongyu/controller/JsRongyu.php
index 186b9e24..f0ff2315 100644
--- a/application/rongyu/controller/JsRongyu.php
+++ b/application/rongyu/controller/JsRongyu.php
@@ -142,19 +142,19 @@ class JsRongyu extends Base
* @param \think\Request $request
* @return \think\Response
*/
- public function createall($id)
- {
- // 设置页面标题
- $list['title'] = '添加教师荣誉册';
- $list['id'] = $id;
+ // public function createall($id)
+ // {
+ // // 设置页面标题
+ // $list['title'] = '添加教师荣誉册';
+ // $list['id'] = $id;
- // 模板赋值
- $this->assign('list',$list);
+ // // 模板赋值
+ // $this->assign('list',$list);
- // 渲染
- return $this->fetch();
+ // // 渲染
+ // return $this->fetch();
- }
+ // }
diff --git a/application/rongyu/controller/JsRongyuInfo.php b/application/rongyu/controller/JsRongyuInfo.php
index 0287e0a7..da919108 100644
--- a/application/rongyu/controller/JsRongyuInfo.php
+++ b/application/rongyu/controller/JsRongyuInfo.php
@@ -123,11 +123,14 @@ class JsRongyuInfo extends Base
// 实例化验证类
$validate = new \app\rongyu\validate\JsRongyuInfo;
// 验证表单数据
- $result = $validate->scene('save')->check($list);
+ $result = $validate->scene('add')->check($list);
$msg = $validate->getError();
// 如果验证不通过则停止保存
if(!$result){
+ if($list['id']>0){
+ ryinfo::destroy($list['id'],true);
+ }
return json(['msg'=>$msg,'val'=>0]);
}
@@ -175,7 +178,7 @@ class JsRongyuInfo extends Base
{
// 设置页面标题
$list['title'] = '添加教师荣誉册';
- $list['id'] = $id;
+ $list['rongyuce'] = $id;
// 模板赋值
$this->assign('list',$list);
@@ -281,21 +284,18 @@ class JsRongyuInfo extends Base
public function update($id)
{
// 获取表单数据
- $list = request()->only(['rongyuce','bianhao','title','category','hjschool','subject','hjshijian','jiangxiang','hjteachers','cyteachers','pic'],'put');
+ $list = request()->only(['bianhao','title','category','hjschool','subject','hjshijian','jiangxiang','hjteachers','cyteachers','pic'],'put');
$list['id'] = $id;
// 实例化验证类
$validate = new \app\rongyu\validate\JsRongyuInfo;
// 验证表单数据
- $result = $validate->check($list);
+ $result = $validate->scene('edit')->check($list);
$msg = $validate->getError();
// 如果验证不通过则停止保存
if(!$result){
- if($list['id']>0){
- ryinfo::destroy($list['id'],true);
- }
return json(['msg'=>$msg,'val'=>0]);
}
diff --git a/application/rongyu/validate/JsRongyuInfo.php b/application/rongyu/validate/JsRongyuInfo.php
index 6468bb84..06d0a9b5 100644
--- a/application/rongyu/validate/JsRongyuInfo.php
+++ b/application/rongyu/validate/JsRongyuInfo.php
@@ -34,6 +34,7 @@ class JsRongyuInfo extends Validate
// 验证场景
protected $scene = [
- 'save' => ['rongyuce','title','hjteachers','hjschool','subject','hjshijian','jiangxiang','cyteachers'],
+ 'add' => ['rongyuce','title','hjteachers','hjschool','subject','hjshijian','jiangxiang','cyteachers'],
+ 'edit' => ['id','title','hjteachers','hjschool','subject','hjshijian','jiangxiang','cyteachers'],
];
}
diff --git a/application/rongyu/view/js_rongyu/index.html b/application/rongyu/view/js_rongyu/index.html
index 8c1283c1..0ad01749 100644
--- a/application/rongyu/view/js_rongyu/index.html
+++ b/application/rongyu/view/js_rongyu/index.html
@@ -154,9 +154,9 @@
startbut = '
';
// 上图图片按钮
- picbut = '
';
+ picbut = '
';
// 添加荣誉
- addbut = '
';
+ addbut = '
';
// 编辑按钮
editbut = '
';
delbut = '
';
diff --git a/application/rongyu/view/js_rongyu_info/createall.html b/application/rongyu/view/js_rongyu_info/createall.html
index 1dda5c2f..3c714976 100644
--- a/application/rongyu/view/js_rongyu_info/createall.html
+++ b/application/rongyu/view/js_rongyu_info/createall.html
@@ -24,7 +24,6 @@