[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
}
~~~