修复班主任添加学生错误

This commit is contained in:
unknown committed 2021-07-02 06:24:49 +08:00
1 parent 018d6b1e97
commit 2a9bd71827
2 files changed
+8 -12

No files matched your search

+8 -9
View File
@@ -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']);
// 大写转小写
-3
View File
@@ -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