This commit is contained in:
win10 committed 2020-07-14 16:52:57 +08:00
1 parent 0fd2a79a1a
commit 82458a9309
17 files changed
+70 -38

No files matched your search

+5 -4
View File
@@ -27,9 +27,10 @@ class Admin extends BaseModel
'adSchool' => function($query){
$query->field('id, jiancheng');
}
,'glGroup' => function($query){
$query->where('status', 1)->field('title, rules, miaoshu');
}
,'glGroup'
// ,'glGroup' => function($query){
// $query->where('status', 1)->field('title, rules, miaoshu');
// }
])
->hidden([
'password'
@@ -67,7 +68,7 @@ class Admin extends BaseModel
public function glGroup()
{
return $this->belongsToMany('AuthGroup', 'AuthGroupAccess', 'group_id', 'uid');
return $this->belongsToMany('AuthGroup', 'AuthGroupAccess', 'uid', 'group_id');
}
+2 -1
View File
@@ -4,8 +4,9 @@ namespace app\admin\model;
// 引用用户数据模型
use app\BaseModel;
use think\model\Pivot;
class AuthGroupAccess extends BaseModel
class AuthGroupAccess extends Pivot
{
// 根据角色ID查询用户
public function search($srcfrom)
+12 -2
View File
@@ -12,7 +12,7 @@
// 应用公共文件
// 获取类别列表
function getCategory($p_id = 0)
function categoryChildren($p_id = 0)
{
// 查询类别
$category = new \app\system\model\Category;
@@ -63,7 +63,7 @@
// 单位列表
function schoolList($low = '班级', $high = '其它级', $order = 'asc')
function danweiJibie($low = '班级', $high = '其它级', $order = 'asc')
{
// 实例化单位模型
$sch = new \app\system\model\School;
@@ -72,6 +72,16 @@
}
// 单位列表
function schoolXueduan($low = '幼儿园', $high = '其它学段', $order = 'asc')
{
// 实例化单位模型
$sch = new \app\system\model\School;
$data = $sch->srcSchool($low, $high, $order);
return $data;
}
// 可以组织考试的单位列表
function kaoshiSchoolList()
{
Loaded 3 of 17 files, more files were not shown because too many files have changed in this diff. Show more