-
Notifications
You must be signed in to change notification settings - Fork 1
Administrator API
唯一 edited this page Jun 1, 2020
·
12 revisions
POST /api/v1/user/admin/auth/register
| Field | Type | Option | Description |
|---|---|---|---|
| account | string | No | account. email or mobile |
| password | string | No | password. 6-20 length |
| confirm_password | string | No | confirm password |
{
"account": "mail@example.com",
"password": "123456",
"confirm_password": "123456"
}| Field | Type | Description |
|---|---|---|
| admin_id | string | administrator id |
{
"code": 0,
"msg": "success",
"data": {
"admin_id": "131"
}
}POST /api/v1/user/admin/auth/jwt/token
| Field | Type | Option | Description |
|---|---|---|---|
| account | string | No | account. email or mobile |
| password | string | No | password |
{
"account": "mail@example.com",
"password": "123456"
}| Field | Type | Description |
|---|---|---|
| access_token | string | |
| expires_in | int | access_token expiration time,unit second |
| refresh_expires_in | int | refresh access_token expiration time, unit second |
{
"code": 0,
"msg": "success",
"data": {
"access_token": "JWT Access Token",
"expires_in": 7200,
"refresh_expires_in": 2592000
}
}GET /api/v1/user/admin/page
| Field | Type | Option | Description |
|---|---|---|---|
| search_key | string | Yes | |
| status | int | Yes | Administrator status id, 1 normal, -1 forbidden |
| page_index | Int | Yes | Default 1 |
| page_size | Int | Yes | Default 15 |
{
"search_key": "Aministrator name",
"status": 1,
"page_index": 1,
"page_size": 100
}| Field | Type | Description |
|---|---|---|
| access_token | string | |
| expires_in | int | access_token expiration time,unit second |
| refresh_expires_in | int | refresh access_token expiration time, unit second |
{
"code": 0,
"msg": "success",
"data": {
"access_token": "JWT Access Token",
"expires_in": 7200,
"refresh_expires_in": 2592000
}
}