# PDA 功能模块(icons)接口说明 > 模块:`MesIconsController` > 服务地址示例:`http://127.0.0.1:8980` > 返回格式:`CommonResp`(`result` / `message` / `data`) > 登录会话:请求携带 `__ajax=json`、`__sid={token}` --- ## 获取 PDA 功能模块列表 ##### 请求URL - ` /js/a/mes/mesIcons/icons ` ##### 请求方式 - POST ##### 参数 |参数名|必选|类型|说明| |:----|:---|:-----|-----| |__ajax|是|string|固定 `json`| |__sid|是|string|登录会话 token| |title|否|string|按模块名称模糊查询(一般 PDA 不传)| |mode|否|string|按模块标识查询(一般 PDA 不传)| > **返回扁平或分组** 由后台 **系统设置 → 参数设置** 中 `mes.icons.grouped` 控制,PDA 无需传额外参数。 > `0` = 扁平列表(兼容旧版);`1` = 按分类分组(默认)。 ##### 参数示例 ``` curl --location --request POST 'http://127.0.0.1:8980/js/a/mes/mesIcons/icons?__ajax=json&__sid=b998858e224b469c84ca6d0711565f6a' ``` ##### 返回示例 ``` 成功(分组,mes.icons.grouped = 1) { "result": "true", "message": "成功", "data": [ { "categoryId": "1677000000000000001", "title": "仓储管理", "sort": 10, "children": [ { "title": "来料检", "mode": "227", "img": "http://127.0.0.1:8980/js/userfiles/fileupload/202307/xxx.png" }, { "title": "生产入库", "mode": "240", "img": "http://127.0.0.1:8980/js/userfiles/fileupload/202307/yyy.png" } ] }, { "categoryId": "1000000000000000001", "title": "其他", "sort": 9999, "children": [ { "title": "来料报检", "mode": "40", "img": "http://127.0.0.1:8980/js/userfiles/fileupload/202307/zzz.png" } ] } ] } ``` ``` 成功(扁平,mes.icons.grouped = 0,兼容旧版 PDA) { "result": "true", "message": "成功", "data": [ { "title": "来料检", "mode": "227", "img": "http://127.0.0.1:8980/js/userfiles/fileupload/202307/xxx.png" }, { "title": "打包", "mode": "231", "img": "http://127.0.0.1:8980/js/userfiles/fileupload/202307/yyy.png" } ] } ``` ``` 成功(无可见模块) { "result": "true", "message": "成功", "data": [] } ``` ##### 返回字段说明 **分组模式(`mes.icons.grouped = 1`)`data[]`:** |字段名|类型|说明| |:----|:-----|-----| |categoryId|string|分类 ID| |title|string|分类名称| |sort|int|排序值,升序展示| |children|array|该分类下可见模块列表| **`children[]` 模块对象:** |字段名|类型|说明| |:----|:-----|-----| |title|string|模块名称| |mode|string|模块标识,PDA 用于跳转对应功能页| |img|string|模块图标完整 URL;无图时为服务器 host| **扁平模式(`mes.icons.grouped = 0`)`data[]`:** |字段名|类型|说明| |:----|:-----|-----| |title|string|模块名称| |mode|string|模块标识| |img|string|模块图标完整 URL| ##### 业务说明 1. 按每条模块的 `auth` 权限过滤,用户无权限的模块不返回。 2. 分组模式下,分类下没有任何可见模块时,该分类不返回。 3. 模块未指定分类或分类已停用时,归入默认分类「其他」(ID:`1000000000000000001`)。 4. 修改参数 `mes.icons.grouped` 后,建议清理缓存或重启应用后生效。 --- ## 附录:参数设置 |参数键名|参数名称|参数值|说明| |:----|:---|:-----|-----| |mes.icons.grouped|PDA功能模块按分类分组|0|扁平列表,兼容旧版 PDA| |mes.icons.grouped|PDA功能模块按分类分组|1|按分类分组,新版 PDA 两级菜单(默认)|