登录权限返回修改
This commit is contained in:
@@ -6,12 +6,24 @@ type LoginRequest struct {
|
||||
Device string `json:"device" validate:"omitempty,oneof=web h5 mobile"`
|
||||
}
|
||||
|
||||
// MenuNode 菜单节点(树形结构)
|
||||
type MenuNode struct {
|
||||
ID uint `json:"id" description:"权限ID"`
|
||||
PermCode string `json:"perm_code" description:"权限码"`
|
||||
Name string `json:"name" description:"菜单名称"`
|
||||
URL string `json:"url" description:"路由路径"`
|
||||
Sort int `json:"sort" description:"排序值"`
|
||||
Children []MenuNode `json:"children" description:"子菜单"`
|
||||
}
|
||||
|
||||
type LoginResponse struct {
|
||||
AccessToken string `json:"access_token"`
|
||||
RefreshToken string `json:"refresh_token"`
|
||||
ExpiresIn int64 `json:"expires_in"`
|
||||
User UserInfo `json:"user"`
|
||||
Permissions []string `json:"permissions"`
|
||||
AccessToken string `json:"access_token"`
|
||||
RefreshToken string `json:"refresh_token"`
|
||||
ExpiresIn int64 `json:"expires_in"`
|
||||
User UserInfo `json:"user"`
|
||||
Permissions []string `json:"permissions" description:"所有权限码(向后兼容)"`
|
||||
Menus []MenuNode `json:"menus" description:"菜单树"`
|
||||
Buttons []string `json:"buttons" description:"按钮权限码"`
|
||||
}
|
||||
|
||||
type UserInfo struct {
|
||||
|
||||
Reference in New Issue
Block a user