diff --git a/app/student/controller/Index.php b/app/student/controller/Index.php index 0dafb28e..7ca2e52a 100755 --- a/app/student/controller/Index.php +++ b/app/student/controller/Index.php @@ -183,15 +183,6 @@ class Index extends AdminBase ,'xuehao' ], 'POST'); - // 权限判断 - $bjqx = event('mybanji', array()); - $bjqx = $bjqx[0]; - if ($bjqx['check'] == true) { - if (!in_array($key, $bjqx['banji_id'])) { - return json(['msg' => '权限不足', 'val' => 0]); - } - } - // 验证表单数据 $validate = new \app\student\validate\Student; $result = $validate->scene('create')->check($list); @@ -199,6 +190,14 @@ class Index extends AdminBase if(!$result){ return json(['msg' => $msg, 'val' => 0]); } + // 权限判断 + $bjqx = event('mybanji', array()); + $bjqx = $bjqx[0]; + if ($bjqx['check'] == true) { + if (!in_array($list['banji_id'], $bjqx['banji_id'])) { + return json(['msg' => '权限不足', 'val' => 0]); + } + } $list['shenfenzhenghao'] = strtoupper($list['shenfenzhenghao']); // 大写转小写 diff --git a/database/seeds/Category.php b/database/seeds/Category.php index 2ce45b9d..98271915 100755 --- a/database/seeds/Category.php +++ b/database/seeds/Category.php @@ -113,9 +113,6 @@ class Category extends Seeder ['id' => 10704,'title' => '德育副校长','p_id' => 107,'paixu' => 4,'isupdate' => 0], ['id' => 10705,'title' => '教学主任','p_id' => 107,'paixu' => 5,'isupdate' => 0], ['id' => 10706,'title' => '德育主任','p_id' => 107,'paixu' => 6,'isupdate' => 0], - ['id' => 10707,'title' => '教研组长','p_id' => 107,'paixu' => 7,'isupdate' => 0, 'status' => 0], - ['id' => 10708,'title' => '班主任','p_id' => 107,'paixu' => 8,'isupdate' => 0, 'status' => 0], - ['id' => 10709,'title' => '课任','p_id' => 107,'paixu' => 9,'isupdate' => 0, 'status' => 0], ['id' => 107010,'title' => '其他','p_id' => 107,'paixu' => 10,'isupdate' => 0], ['id' => 108