From 821abf44861d429094d2445c59ed3f40d7f452fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=8F=E6=9D=BE=E6=A0=91?= Date: Fri, 12 Apr 2019 12:37:49 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=A0=E9=99=A4=E5=8F=82=E6=95=B0=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/admin/controller/AuthGroup.php | 2 +- application/admin/controller/AuthRule.php | 31 +- application/admin/controller/Index.php | 7 +- application/admin/view/auth_group/create.html | 2 +- application/admin/view/auth_rule/create.html | 256 +++++++++++++---- application/admin/view/index/create.html | 18 +- application/admin/view/index/index.html | 4 +- application/chengji/controller/Index.php | 2 +- application/kaoshi/controller/Index.php | 2 +- application/keti/controller/Index.php | 2 +- application/keti/controller/KetiInfo.php | 2 +- application/renshi/controller/Index.php | 2 +- application/renshi/controller/Student.php | 2 +- application/rongyu/controller/DwRongyu.php | 2 +- application/rongyu/controller/JsRongyu.php | 2 +- .../rongyu/controller/JsRongyuInfo.php | 2 +- application/system/controller/Category.php | 2 +- application/teach/controller/Banji.php | 2 +- application/teach/controller/Subject.php | 2 +- application/teach/controller/Xueqi.php | 26 +- application/teach/model/Xueqi.php | 30 ++ application/teach/view/subject/create.html | 4 +- application/teach/view/xueqi/create.html | 177 +++++++----- application/teach/view/xueqi/index.html | 269 ++++++++++-------- 24 files changed, 562 insertions(+), 288 deletions(-) diff --git a/application/admin/controller/AuthGroup.php b/application/admin/controller/AuthGroup.php index 8073c7c4..716f34c9 100644 --- a/application/admin/controller/AuthGroup.php +++ b/application/admin/controller/AuthGroup.php @@ -194,7 +194,7 @@ class AuthGroup extends Base if($id == 'm') { - $id = request()->delete('ids/a');// 获取delete请求方式传送过来的数据并转换成数据 + $id = request()->delete('ids');// 获取delete请求方式传送过来的数据并转换成数据 } $data = AG::destroy($id); diff --git a/application/admin/controller/AuthRule.php b/application/admin/controller/AuthRule.php index d03072e8..1bfe66fe 100644 --- a/application/admin/controller/AuthRule.php +++ b/application/admin/controller/AuthRule.php @@ -65,13 +65,18 @@ class AuthRule extends Base public function create() { // 设置页面标题 - $list['title'] = '添加权限'; + $list['set'] = array( + 'webtitle'=>'添加权限', + 'butname'=>'添加', + 'formpost'=>'POST', + 'url'=>'/authrule', + ); + // 模板赋值 $this->assign('list',$list); - // 渲染 - return $this->fetch(); + return $this->fetch('create'); } @@ -121,13 +126,22 @@ class AuthRule extends Base { // 获取权限信息 - $list = AR::field('id,title,name,condition,pid,paixu,ismenu,font,url') - ->get($id); + $list['data'] = AR::field('id,title,name,condition,pid,paixu,ismenu,font,url') + ->find($id); + + // 设置页面标题 + $list['set'] = array( + 'webtitle'=>'编辑权限', + 'butname'=>'修改', + 'formpost'=>'PUT', + 'url'=>'/authrule/'.$id, + ); + // 模板赋值 $this->assign('list',$list); - - return $this->fetch(); + // 渲染 + return $this->fetch('create'); } @@ -168,10 +182,9 @@ class AuthRule extends Base // 删除权限 public function delete($id) { - if($id == 'm') { - $id = request()->delete('ids/a');// 获取delete请求方式传送过来的数据并转换成数据 + $id = request()->delete('ids');// 获取delete请求方式传送过来的数据并转换成数据 } $data = AR::destroy($id); diff --git a/application/admin/controller/Index.php b/application/admin/controller/Index.php index f4e8015d..1748f7b7 100644 --- a/application/admin/controller/Index.php +++ b/application/admin/controller/Index.php @@ -225,9 +225,8 @@ class Index extends Base public function delete($id) { - if($id == 'm') - { - $id = request()->delete('ids/a'); + if($id == 'm'){ + $id = request()->delete('ids'); } $data = AD::destroy($id); @@ -326,8 +325,6 @@ class Index extends Base return json($data); } - - // 更新密码 $password = $md5->hash($list['newpassword']); $data = AD::update(['id'=>$id,'password'=>$password]); diff --git a/application/admin/view/auth_group/create.html b/application/admin/view/auth_group/create.html index 8a8b5a57..9a5c860d 100644 --- a/application/admin/view/auth_group/create.html +++ b/application/admin/view/auth_group/create.html @@ -12,7 +12,7 @@
-