...
|
...
|
@@ -139,21 +139,17 @@ func (c *AdminLoginController) AdminpPofile() { |
|
|
"id": v.Id,
|
|
|
"status": 0, //状态 1-启用 0-禁用,前端需要
|
|
|
}
|
|
|
permissionSlice = append(permissionSlice, m)
|
|
|
}
|
|
|
for index := range permissionSlice {
|
|
|
if adminuser.IsDefault {
|
|
|
permissionSlice[index]["status"] = 1
|
|
|
continue
|
|
|
}
|
|
|
for _, p := range adminuser.Permission {
|
|
|
if p == permissionSlice[index]["id"] {
|
|
|
permissionSlice[index]["status"] = 1
|
|
|
if p.Id == v.Id {
|
|
|
m["status"] = 1
|
|
|
break
|
|
|
}
|
|
|
if p == permissionSlice[index]["parentId"] {
|
|
|
permissionSlice[index]["status"] = 1
|
|
|
if p.Id == v.ParentId {
|
|
|
m["status"] = 1
|
|
|
break
|
|
|
}
|
|
|
}
|
|
|
permissionSlice = append(permissionSlice, m)
|
|
|
}
|
|
|
userData := map[string]string{
|
|
|
"id": fmt.Sprint(adminuser.Id),
|
...
|
...
|
|