🔥码云GVP开源项目 12k star Uniapp+ElementUI 功能强大 支持多语言、二开方便! 广告
[TOC] ## 获取用户列表 ~~~[api] post:/user/list <<< 请求内容 { } <<< 返回结果 { "code": 0, "info": "success", "data": [{ "id": 3, "username": "xxxxxx", "title": "某某", },{ "id": 4, "username": "xxxxxx", "title": "某某", }] } ~~~ ## 获取用户信息 ~~~[api] post:/user/info <<< 请求内容 { "id":1 //id } <<< 返回结果 { "code": 0, "info": "success", "data": { "id": 1, "username": "xxxxxx", "title": "某某", } } ~~~ ## 创建用户 ~~~[api] post:/user/add <<< 请求内容 { "name": "用户名", "phone": "电话号码" } <<< 返回结果 { "code": 0, "info": "success", "data": null } ~~~ ## 修改用户 ~~~[api] post:/user/edit <<< 请求内容 { "id":1, //id "name": "xxxxxx", "phone": "某某", "password": "xxxxxx" //不修改为空 } <<< 返回结果 { "code": 0, "info": "success", "data": null } ~~~ ## 删除用户 ~~~[api] post:/user/del <<< 请求内容 { "id":1 //id } <<< 返回结果 { "code": 0, "info": "success", "data": null } ~~~ ## 修改自己的密码 ~~~[api] post:/user/password <<< 请求内容 { "old_password":"xxxxx", "password":"xxxxx" } <<< 返回结果 { "code": 0, "info": "success", "data": null } ~~~