diff --git a/application/admin/controller/Config.php b/application/admin/controller/Config.php index a9f1f2a2f..7872c1329 100644 --- a/application/admin/controller/Config.php +++ b/application/admin/controller/Config.php @@ -15,7 +15,6 @@ namespace app\admin\controller; use controller\BasicAdmin; -use service\DataService; use service\LogService; /** @@ -67,5 +66,4 @@ class Config extends BasicAdmin { $this->index(); } - } diff --git a/application/admin/controller/Menu.php b/application/admin/controller/Menu.php index 6977b8eb3..5a56fd3a3 100644 --- a/application/admin/controller/Menu.php +++ b/application/admin/controller/Menu.php @@ -60,9 +60,6 @@ class Menu extends BasicAdmin { * 添加菜单 */ public function add() { - if ($this->request->isPost()) { - $this->error('系统开发中,不要动菜单哦!'); - } return $this->_form($this->table, 'form'); } @@ -113,7 +110,6 @@ class Menu extends BasicAdmin { * 删除菜单 */ public function del() { - $this->error('别再删我菜单了...'); if (DataService::update($this->table)) { $this->success("菜单删除成功!", ''); } @@ -124,7 +120,6 @@ class Menu extends BasicAdmin { * 菜单禁用 */ public function forbid() { - $this->error('请不要禁用菜单...'); if (DataService::update($this->table)) { $this->success("菜单禁用成功!", ''); } diff --git a/application/admin/controller/Node.php b/application/admin/controller/Node.php index 93a91cb5a..138320d6c 100644 --- a/application/admin/controller/Node.php +++ b/application/admin/controller/Node.php @@ -14,7 +14,7 @@ namespace app\admin\controller; -use app\admin\model\NodeModel as NodeModel; +use app\admin\model\NodeModel; use controller\BasicAdmin; use service\DataService; use service\ToolsService; diff --git a/application/admin/controller/Plugs.php b/application/admin/controller/Plugs.php index e7ca2c970..38e089dac 100644 --- a/application/admin/controller/Plugs.php +++ b/application/admin/controller/Plugs.php @@ -40,11 +40,11 @@ class Plugs extends BasicAdmin { /** * 文件上传 - * @param string $mode * @return \think\response\View */ - public function upfile($mode = 'one') { + public function upfile() { $types = $this->request->get('type', 'jpg,png'); + $mode = $this->request->get('mode', 'one'); $this->assign('mode', $mode); $this->assign('types', $types); if (!in_array(($uptype = $this->request->get('uptype')), ['local', 'qiniu'])) { diff --git a/application/route.php b/application/route.php index 6286374c6..0eaaf9ef8 100644 --- a/application/route.php +++ b/application/route.php @@ -12,4 +12,32 @@ // | github开源项目:https://github.com/zoujingli/Think.Admin // +---------------------------------------------------------------------- +/* 测试环境禁止操作路由绑定 */ +think\Route::post([ + 'admin/config/index' => function() { + return json(['code' => 0, 'msg' => '测试环境禁修改系统配置操作!']); + }, + 'admin/config/file' => function() { + return json(['code' => 0, 'msg' => '测试环境禁修改文件配置操作!']); + }, + 'admin/menu/add' => function() { + return json(['code' => 0, 'msg' => '测试环境禁添加菜单操作!']); + }, + 'admin/menu/edit' => function() { + return json(['code' => 0, 'msg' => '测试环境禁编辑菜单操作!']); + }, + 'admin/menu/forbid' => function() { + return json(['code' => 0, 'msg' => '测试环境禁止禁用菜单操作!']); + }, + 'admin/menu/del' => function() { + return json(['code' => 0, 'msg' => '测试环境禁止删除菜单操作!']); + }, + 'wechat/config/index' => function() { + return json(['code' => 0, 'msg' => '测试环境禁止修改微信配置操作!']); + }, + 'wechat/config/pay' => function() { + return json(['code' => 0, 'msg' => '测试环境禁止修改微信支付操作!']); + } +]); + return []; diff --git a/application/wechat/controller/Config.php b/application/wechat/controller/Config.php index fb03289f1..bba9e79fc 100644 --- a/application/wechat/controller/Config.php +++ b/application/wechat/controller/Config.php @@ -44,7 +44,6 @@ class Config extends BasicAdmin { $this->assign('title', '微信接口配置'); return view(); } - $this->error('矜持点,别改测试参数哦!'); foreach ($this->request->post() as $key => $vo) { sysconf($key, $vo); } @@ -106,7 +105,6 @@ class Config extends BasicAdmin { return view(); } } - $this->error('矜持点,别改测试参数哦!'); $data = $this->request->post(); foreach ($data as $key => $vo) { if (in_array($key, ['wechat_cert_key_md5', 'wechat_cert_cert_md5']) && !empty($vo)) {