|
|
@@ -37,17 +37,17 @@ type PCWebMenuAuth struct {
|
|
|
|
|
|
// PCWebMenu PC客户端菜单权限
|
|
|
type PCWebMenu struct {
|
|
|
- Title string // 标题
|
|
|
- Code string // ID,新版本中权限KEY也是这个字段
|
|
|
- Path string // 路由路径
|
|
|
- Component string // 路由组件
|
|
|
- Sort int // 排序
|
|
|
- RequireAuth bool // 是否需要权限判断
|
|
|
- IsShow bool // 是否显示
|
|
|
- URL string // URL
|
|
|
- Remark string // 备注
|
|
|
- Children []PCWebMenu // 子菜单列表
|
|
|
- Auth []PCWebMenuAuth // 页面权限列表
|
|
|
+ Title string `json:"title"` // 标题
|
|
|
+ Code string `json:"code"` // ID,新版本中权限KEY也是这个字段
|
|
|
+ Path string `json:"path"` // 路由路径
|
|
|
+ Component string `json:"component"` // 路由组件
|
|
|
+ Sort int `json:"sort"` // 排序
|
|
|
+ RequireAuth bool `json:"requireauth"` // 是否需要权限判断
|
|
|
+ IsShow bool `json:"isshow"` // 是否显示
|
|
|
+ URL string `json:"url"` // URL
|
|
|
+ Remark string `json:"remark"` // 备注
|
|
|
+ Children []PCWebMenu `json:"children"` // 子菜单列表
|
|
|
+ Auth []PCWebMenuAuth `json:"auth"` // 页面权限列表
|
|
|
}
|
|
|
|
|
|
// GetClientMenusReq 获取交易端菜单请求参数
|
|
|
@@ -244,7 +244,7 @@ func createPCWebMenu(datas []interface{}, loginID int) []PCWebMenu {
|
|
|
// 判断权限
|
|
|
requireAuth := data["requireauth"].(bool)
|
|
|
// FIXME: - 暂时代码
|
|
|
- requireAuth = true
|
|
|
+ requireAuth = false
|
|
|
if requireAuth {
|
|
|
code := data["code"].(string) // PC WEB V6版本直接使用CODE来做权限KEY
|
|
|
// 判断是否有权限
|
|
|
@@ -267,7 +267,7 @@ func createPCWebMenu(datas []interface{}, loginID int) []PCWebMenu {
|
|
|
// 判断权限
|
|
|
requireAuth := data["requireauth"].(bool)
|
|
|
// FIXME: - 暂时代码
|
|
|
- requireAuth = true
|
|
|
+ requireAuth = false
|
|
|
if requireAuth {
|
|
|
code := data["code"].(string) // PC WEB V6版本直接使用CODE来做权限KEY
|
|
|
// 判断是否有权限
|
|
|
@@ -283,7 +283,7 @@ func createPCWebMenu(datas []interface{}, loginID int) []PCWebMenu {
|
|
|
auth := PCWebMenuAuth{
|
|
|
Label: am["label"].(string),
|
|
|
Code: am["code"].(string),
|
|
|
- RequireAuth: requireAuth,
|
|
|
+ RequireAuth: am["requireauth"].(bool),
|
|
|
IsShow: am["isshow"].(bool),
|
|
|
}
|
|
|
if am["remark"] != nil {
|