文 档 中 心 / Document Center
搜索 管理中心
壹川接口文档V3
添加新菜单
更新时间:2018-04-11 14:12:51   更新人员:叶洋   文档状态:完成 #37    测试接口
摘要
创建一个新菜单。
  1. 接口基本信息
    接口名称:创建一个新的菜单
    请求方法:POST
    接口地址:menu
    登录验证:是
  2. 请求参数
    参数名 参数 数据类型 是否必须 示例值 说明
    module string admin
    hide 隐藏 int 是否隐藏 0 隐藏 1 显示
    pid 上级菜单 int
    sort 排序 int
    title 规则中文描述 string 财务管理
    icon 导航图标 string icon-money
    path 路径/URL string Finance/account
    remark 备注 string 财务管理版块
  3. 响应数据参数
    参数名 参数 数据类型 示例值 说明
    id 菜单ID int
    module string admin
    hide 隐藏 int 是否隐藏 0 隐藏 1 显示
    pid 上级菜单 int
    sort 排序 int
    title 规则中文描述 string
    icon 导航图标 string icon-money
    path 路径/URL string
    remark 备注 string
  4. 请求示例
    请求例子:
     
    apirq('menu', {
        method: "post",
        data: {
            "module": "admin",
            "hide": 0,
            "pid": 1,
            "sort": 0,
            "title": "测试菜单",
            "icon": "edit",
            "path": "test/page",
            "remark": "这只是一个测试菜单页面"
        }
    }) 
    
    返回数据结果:
     
    {
        "code": 0,
        "msg": "数据添加成功!",
        "time": "1523426980",
        "data": {
            "module": "admin",
            "hide": 0,
            "pid": 1,
            "sort": 0,
            "title": "测试菜单",
            "icon": "edit",
            "path": "test/page",
            "remark": "这只是一个测试菜单页面",
            "id": "316"
        }
    } 
    
本书创建于 2018-03-30 12:03:13 ?如有疑问,请联系技术人员