diff --git a/application/admin/controller/Index.php b/application/admin/controller/Index.php
index 50deebeed..5f7c0d968 100644
--- a/application/admin/controller/Index.php
+++ b/application/admin/controller/Index.php
@@ -89,9 +89,6 @@ class Index extends BasicAdmin
*/
public function pass()
{
- if (in_array('10000', explode(',', $this->request->post('id')))) {
- $this->error('系统超级账号禁止操作!');
- }
if (intval($this->request->request('id')) !== intval(session('user.id'))) {
$this->error('访问异常!');
}
@@ -120,9 +117,6 @@ class Index extends BasicAdmin
*/
public function info()
{
- if (in_array('10000', explode(',', $this->request->post('id')))) {
- $this->error('系统超级账号禁止操作!');
- }
if (intval($this->request->request('id')) === intval(session('user.id'))) {
return $this->_form('SystemUser', 'user/form');
}
diff --git a/application/admin/controller/Plugs.php b/application/admin/controller/Plugs.php
index 76315a388..b6335461b 100644
--- a/application/admin/controller/Plugs.php
+++ b/application/admin/controller/Plugs.php
@@ -46,7 +46,7 @@ class Plugs extends BasicAdmin
*/
public function upfile()
{
- if (!in_array(($uptype = $this->request->get('uptype')), ['local', 'qiniu'])) {
+ if (!in_array(($uptype = $this->request->get('uptype')), ['local', 'qiniu', 'oss'])) {
$uptype = sysconf('storage_type');
}
$types = $this->request->get('type', 'jpg,png');
@@ -137,8 +137,8 @@ class Plugs extends BasicAdmin
*/
public function icon()
{
- $this->assign('field', $this->request->get('field', 'icon'));
- return view();
+ $field = $this->request->get('field', 'icon');
+ return view('', ['field' => $field]);
}
/**
@@ -147,8 +147,7 @@ class Plugs extends BasicAdmin
*/
public function region()
{
- $list = Db::name('DataRegion')->where('status', '1')->column('code,name');
- return json($list);
+ return json(Db::name('DataRegion')->where('status', '1')->column('code,name'));
}
}
diff --git a/application/admin/controller/User.php b/application/admin/controller/User.php
index 2a986d7f2..6fb8a48e6 100644
--- a/application/admin/controller/User.php
+++ b/application/admin/controller/User.php
@@ -85,9 +85,6 @@ class User extends BasicAdmin
*/
public function pass()
{
- if (in_array('10000', explode(',', $this->request->post('id')))) {
- $this->error('系统超级账号禁止操作!');
- }
if ($this->request->isGet()) {
$this->assign('verify', false);
return $this->_form($this->table, 'pass');
diff --git a/application/route.php b/application/route.php
index fd67741cb..44ca1299b 100644
--- a/application/route.php
+++ b/application/route.php
@@ -14,37 +14,63 @@
/* 测试环境禁止操作路由绑定 */
think\Route::post([
+ // 禁止修改用户资料
+ 'admin/index/info' => function () {
+ return json(['code' => 0, 'msg' => '测试环境禁修改用户资料
请修改路由配置文件!']);
+ },
+ // 禁止修改用户密码
+ 'admin/index/pass' => function () {
+ return json(['code' => 0, 'msg' => '测试环境禁修改用户密码
请修改路由配置文件!']);
+ },
+ // 禁止修改用户密码
+ 'admin/user/pass' => function () {
+ return json(['code' => 0, 'msg' => '测试环境禁修改用户密码
请修改路由配置文件!']);
+ },
+ // 禁止修改系统配置
'admin/config/index' => function () {
- return json(['code' => 0, 'msg' => '测试环境禁修改系统配置操作!']);
+ return json(['code' => 0, 'msg' => '测试环境禁修改系统配置操作
请修改路由配置文件!']);
},
+ // 禁止修改文件上传
'admin/config/file' => function () {
- return json(['code' => 0, 'msg' => '测试环境禁修改文件配置操作!']);
+ return json(['code' => 0, 'msg' => '测试环境禁修改文件配置操作
请修改路由配置文件!']);
},
+ // 禁止添加系统菜单
'admin/menu/add' => function () {
- return json(['code' => 0, 'msg' => '测试环境禁添加菜单操作!']);
+ return json(['code' => 0, 'msg' => '测试环境禁添加菜单操作
请修改路由配置文件!']);
},
+ // 禁止编辑系统菜单
'admin/menu/edit' => function () {
- return json(['code' => 0, 'msg' => '测试环境禁编辑菜单操作!']);
+ return json(['code' => 0, 'msg' => '测试环境禁编辑菜单操作
请修改路由配置文件!']);
},
+ // 禁止禁用系统菜单
'admin/menu/forbid' => function () {
- return json(['code' => 0, 'msg' => '测试环境禁止禁用菜单操作!']);
+ return json(['code' => 0, 'msg' => '测试环境禁止禁用菜单操作
请修改路由配置文件!']);
},
+ // 禁止删除系统菜单
'admin/menu/del' => function () {
- return json(['code' => 0, 'msg' => '测试环境禁止删除菜单操作!']);
+ return json(['code' => 0, 'msg' => '测试环境禁止删除菜单操作
请修改路由配置文件!']);
},
+ // 禁止排序系统菜单
+ 'admin/menu/index' => function () {
+ return json(['code' => 0, 'msg' => '测试环境禁止菜单列表排序操作
请修改路由配置文件!']);
+ },
+ // 禁止配置微信参数
'wechat/config/index' => function () {
- return json(['code' => 0, 'msg' => '测试环境禁止修改微信配置操作!']);
+ return json(['code' => 0, 'msg' => '测试环境禁止修改微信配置操作
请修改路由配置文件!']);
},
+ // 禁止配置微信支付
'wechat/config/pay' => function () {
- return json(['code' => 0, 'msg' => '测试环境禁止修改微信支付操作!']);
+ return json(['code' => 0, 'msg' => '测试环境禁止修改微信支付操作
请修改路由配置文件!']);
},
+ // 禁止编辑及发布微信菜单
'wechat/menu/edit' => function () {
- return json(['code' => 0, 'msg' => '测试环境禁止修改微信菜单操作!']);
+ return json(['code' => 0, 'msg' => '测试环境禁止修改微信菜单操作
请修改路由配置文件!']);
},
]);
+
think\Route::get([
'wechat/menu/cancel' => function () {
- return json(['code' => 0, 'msg' => '测试环境禁止删除微信菜单操作!']);
+ return json(['code' => 0, 'msg' => '测试环境禁止删除微信菜单操作
请修改路由配置文件!']);
},
]);