menu和authority修改父级变为选择模式

This commit is contained in:
pixel
2020-04-15 16:37:17 +08:00
parent 6a03835d66
commit ea3f49d68a
7 changed files with 48 additions and 39 deletions

View File

@@ -49,6 +49,25 @@ func DeleteAuthority(c *gin.Context) {
}
}
// @Tags authority
// @Summary 设置角色资源权限
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body model.SysAuthority true "设置角色资源权限"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"设置成功"}"
// @Router /authority/updateAuthority [post]
func UpdateAuthority(c *gin.Context) {
var auth model.SysAuthority
_ = c.ShouldBindJSON(&auth)
err, authority := service.UpdateAuthority(auth)
if err != nil {
response.FailWithMessage(fmt.Sprintf("更新失败,%v", err), c)
} else {
response.OkWithData(resp.SysAuthorityResponse{authority}, c)
}
}
// @Tags authority
// @Summary 分页获取角色列表
// @Security ApiKeyAuth

View File

@@ -84,7 +84,6 @@ func GetBaseMenuTree(c *gin.Context) {
response.FailWithMessage(fmt.Sprintf("获取失败,%v", err), c)
} else {
response.OkWithData(resp.SysBaseMenusResponse{Menus: menus}, c)
}
}