文 档 中 心 / Document Center
搜索 管理中心
壹川接口文档V3
添加文章分类
更新时间:2018-04-11 16:53:03   更新人员:叶洋   文档状态:完成 #51    测试接口
摘要
添加分类
  1. 接口基本信息
    接口名称:创建一个新的分类
    请求方法:POST
    接口地址:category
    登录验证:是
  2. 请求参数
    参数名 参数 数据类型 是否必须 示例值 说明
    title 分类名称 string
    alias 分类别名 string
    pid 上级分类id int
    sort 排序 int
    cover 封面图片 string
    imgpic 分类图片 string
    remark 备注描述 string
  3. 响应数据参数
    参数名 参数 数据类型 示例值 说明
    id int
    update_time 更新时间 int
    create_time 创建时间 int
    sort 排序 int
    pid 上级分类id int
    mid 模型id int
    status 是否禁用 int 0 禁用 1 启用
    is_home 是否推荐 int
    alias 分类别名 string
    cover 封面图片 string
    imgpic 分类图片 string
    title 分类名称 string
    remark 备注描述 string
    full_tree string
    full_title string
  4. 请求示例
    请求例子:
     
    apirq('category', {
        method: "post",
        data: {
            "title": "我是测试分类",
            "alias": "wsviw2"
        }
    }) 
    
    返回数据结果:
     
    {
        "code": 0,
        "msg": "数据添加成功!",
        "time": "1523436577",
        "data": {
            "id": 29,
            "update_time": "2018-04-11 16:49:38",
            "create_time": "2018-04-11 16:49:38",
            "sort": 0,
            "pid": 0,
            "mid": null,
            "status": 1,
            "is_home": 0,
            "alias": "wsviw2",
            "cover": null,
            "imgpic": null,
            "title": "我是测试分类",
            "remark": null,
            "full_tree": "",
            "full_title": ""
        }
    } 
    
本书创建于 2018-03-30 12:03:13 ?如有疑问,请联系技术人员