|
|
@@ -82,12 +82,16 @@ func GetClientMenus(c *gin.Context) {
|
|
|
|
|
|
rst := createMenu(datas, req.LoginID)
|
|
|
|
|
|
- // 去掉第一层没有子项的
|
|
|
r := make([]ClientMenu, 0)
|
|
|
- for _, v := range rst {
|
|
|
- if len(v.Children) > 0 {
|
|
|
- r = append(r, v)
|
|
|
+ if req.ClientType == 0 {
|
|
|
+ // PC 去掉第一层没有子项的
|
|
|
+ for _, v := range rst {
|
|
|
+ if len(v.Children) > 0 {
|
|
|
+ r = append(r, v)
|
|
|
+ }
|
|
|
}
|
|
|
+ } else {
|
|
|
+ r = rst
|
|
|
}
|
|
|
|
|
|
// 查询成功
|