首页 > Windows开发 > 详细

管理员端API——任仲行

时间:2019-05-15 16:08:08      阅读:137      评论:0      收藏:0      [点我收藏+]
管理员登录界面
  • 管理员登录
  /api/administrator/log_in POST

  Request

  {

    "name": 张三,

    "password_hash": awgyu223

  }

 

  Response

  {

    "state_code":0, // 0-成功,-1-用户名不存在,1-密码不正确

    "id": 139179

  }

 
职工管理界面
  查看用户列表
  /api/administrator/stuff/suff_list GET

  Request

  {

    "id_user": 1612841

  }

 

  Response

  {

    users: [{

        "id": 1234556,

        "name": nkcs1612941,

        "type": "student",

        "user_status": "online"

      }]

  }

 

  增加用户(默认安排密码有后台分配)
  /api/administrator/stuff/user POST

  Request

  {

    "id_user": 1612841

    user: {

    "name": nkcs1612941,

    "type": "student",

    "gender": "female"

      }

  }

 

  Response

  {

    "state_code":0 // 0-添加用户成功,-1-添加用户失败

  }

  删除用户
  /api/administrator/delete_user POST

  Request

  {

    "id_user": 1612841,

    "delete_id_user": [

    nkcs123455,

    nkcs123456

    ]

  }

 

  Response

  {

    "state_code":0 // 0-删除用户成功,-1-删除用户失败

  }

  编辑用户信息
  /api/administrator/edit_user POST

  Request

  {

  "id_user": 1612841

  user: {

      "name": nkcs1612941,

      "type": "student",

      "gender": "female"

    }

  }

 

  Response

  {

    "state_code":0 // 0-添加用户成功,-1-添加用户失败

  }

  批量导入用户
  /api/administrator/batch_import POST

  Request

  {

    "id_user": 1612841

    users: [{

        "name": nkcs1612941,

        "type": "student",

      }]

  }

 

  Response

  {

    "state_code":0 // 0-添加用户成功,-1-添加用户失败

  }

学生管理界面
  查看用户列表
  /api/administrator/user_list GET

  Request

  {

    "id_user": 1612841

  }

 

  Response

  {

    users: [{

        "id": 1234556,

        "name": nkcs1612941,

        "type": "student",

        "user_status": "online"

      }]

  }

  增加用户(默认安排密码有后台分配)
  /api/administrator/add_user POST

  Request

  {

    "id_user": 1612841

    user: {

    "name": nkcs1612941,

    "type": "student",

    "gender": "female"

      }

  }

 

  Response

  {

    "state_code":0 // 0-添加用户成功,-1-添加用户失败

  }

  删除用户
  /api/administrator/delete_user POST

  Request

  {

    "id_user": 1612841,

    "delete_id_user": [

    nkcs123455,

    nkcs123456

    ]

  }

 

  Response

  {

    "state_code":0 // 0-删除用户成功,-1-删除用户失败

  }

  编辑用户信息
  /api/administrator/edit_user POST

  Request

  {

  "id_user": 1612841

  user: {

      "name": nkcs1612941,

      "type": "student",

      "gender": "female"

    }

  }

 

  Response

  {

    "state_code":0 // 0-添加用户成功,-1-添加用户失败

  }

  批量导入用户
  /api/administrator/batch_import POST

  Request

  {

    "id_user": 1612841

    users: [{

        "name": nkcs1612941,

        "type": "student",

      }]

  }

 

  Response

  {

    "state_code":0 // 0-添加用户成功,-1-添加用户失败

  }

权限管理界面
  查看用户列表
  /api/administrator/user_list GET

  Request

  {

    "id_user": 1612841

  }

 

  Response

  {

    users: [{

        "id": 1234556,

        "name": nkcs1612941,

        "type": "student",

        "user_status": "online"

      }]

  }

  增加用户(默认安排密码有后台分配)
  /api/administrator/add_user POST

  Request

  {

    "id_user": 1612841

    user: {

    "name": nkcs1612941,

    "type": "student",

    "gender": "female"

      }

  }

 

  Response

  {

    "state_code":0 // 0-添加用户成功,-1-添加用户失败

  }

  删除用户
  /api/administrator/delete_user POST

  Request

  {

    "id_user": 1612841,

    "delete_id_user": [

    nkcs123455,

    nkcs123456

    ]

  }

 

  Response

  {

    "state_code":0 // 0-删除用户成功,-1-删除用户失败

  }

  编辑用户信息
  /api/administrator/edit_user POST

  Request

  {

  "id_user": 1612841

  user: {

      "name": nkcs1612941,

      "type": "student",

      "gender": "female"

    }

  }

 

  Response

  {

    "state_code":0 // 0-添加用户成功,-1-添加用户失败

  }

  批量导入用户
  /api/administrator/batch_import POST

  Request

  {

    "id_user": 1612841

    users: [{

        "name": nkcs1612941,

        "type": "student",

      }]

  }

 

  Response

  {

    "state_code":0 // 0-添加用户成功,-1-添加用户失败

  }

管理员端API——任仲行

原文:https://www.cnblogs.com/cs-sunday/p/10869131.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!