文 档 中 心 / Document Center
搜索 管理中心
壹川接口文档V3
修改指定的配置的启用状态
更新时间:2018-04-11 13:49:26   更新人员:叶洋   文档状态:完成 #35    测试接口
摘要
修改指定的系统配置状态为禁用或启用。
  1. 接口基本信息
    接口名称:启用禁用系统配置
    请求方法:PUT
    接口地址:configs/:id/status_:newstatus
    登录验证:是
  2. 路由参数
    参数名 参数 数据类型 是否必须 示例值 说明
    id 配置id int
    newstatus 新状态 string 新状态,可选值:off/on 。off为关,on为开
  3. 响应数据参数
    参数名 参数 数据类型 示例值 说明
    id 配置id int 系统配置id
    name 配置名 string 系统配置名,英文
    type 配置类型 int 系统配置的类型编号
    title 配置标题 string 配置标题
    group 配置分组 int 配置分组编号
    extra 扩展数据 string
    remark 备注 string 配置说明
    status 状态 string 配置状态0禁用1正常
    value 配置值 string
    sort 排序 int 参数排序
  4. 请求示例
    请求例子:
     
    apirq('configs/:id/update_', {
        method: "put",
        data: {
            "id": 614,
            "newstatus": "off"
        },
        urlparams: [
            "id",
            "newstatus"
        ]
    }) 
    
    返回数据结果:
    成功时:
     
    {
        "code": 0,
        "msg": "禁用资源成功!",
        "time": "1523425528",
        "data": {
            "id": 614,
            "name": "TEST_KNBI",
            "type": 0,
            "title": "我就爱",
            "group": 0,
            "extra": "",
            "remark": "工工工工工工",
            "create_time": "1970-01-01 08:00:00",
            "update_time": "1970-01-01 08:00:00",
            "status": 0,
            "value": "木木要",
            "sort": 3
        }
    } 
    
    未变更时:
     
    {
        "code": 30001,
        "msg": "状态未变更~~",
        "time": "1523425504",
        "data": ""
    } 
    
本书创建于 2018-03-30 12:03:13 ?如有疑问,请联系技术人员