[TOC=2]
## 登錄
~~~[api]
post:/named_user/login
*string:username=pttsy01#登錄賬號
*string:password=12345678#登錄密碼
<<<
<<<
field_explain
username // 2 ~ 16 個字符
password // 加密后 64 個字符
<<<
success
{
"code": 0,
"data": {
"name": "平臺調試員",
"remarks": "二位",
"priority": 3,
"expire_date": "2099-12-31 23:59:59",
"recent_login_time": "2021-11-08 15:29:12",
"configs": [],
"username": "15181474781",
"phone": "15181474781",
"session_key": "PHPSESSID",
"session_value": "0vctv68auqv20d1p8209r4sgt1"
}
}
<<<
success_explain
name // 姓名
remarks // 備注信息
expire_date // 到期時間
recent_login_time // 最近登錄時間
configs // 其他配置
username // 登錄賬號
phone // 登錄手機號
session_key // 登錄狀態
session_value // 登錄狀態
<<<
error
{
"code": -1,
"msg": "用戶名或密碼錯誤"
}
~~~
>[danger] 密碼需要用 sha256 進行加密
## 退出登錄
~~~[api]
get:/named_user/logout
<<<
<<<
success
{
"code": 0
}
<<<
error
~~~
## 修改密碼
~~~[api]
post:/named_user/change_password
*string:password=12345678#原密碼
*string:password_new=123456789#新密碼
<<<
<<<
field_explain
password // 加密后 64 個字符
password_new // 加密后 64 個字符
<<<
success
{
"code": 0
}
<<<
error
{
"code": -1,
"msg": "原密碼不正確"
}
~~~
>[danger] 密碼需要用 sha256 進行加密
## 獲取驗證碼
~~~[api]
post:/smsCaptcha/v2/acquire
*string:phone=13333333333#手機號
<<<
<<<
field_explain
phone // 手機號校驗規則
<<<
success
{
"code": 0,
"data": {
"expire": 10,
"length": 6,
"captcha": "584691"
}
}
<<<
success_explain
expire // 有效時間(分鐘)
length // 長度
captcha // 驗證碼(調試返回)
<<<
error
{
"code": -1,
"msg": "手機號長度錯誤"
}
~~~
## 獲取賬號
~~~[api]
get:/named_user/get_account
*string:phone=13333333333#手機號
*string:sms_captcha=584691#驗證碼
<<<
<<<
field_explain
phone // 手機號校驗規則
sms_captcha // 6 位數字
<<<
success
{
"code": 0,
"data": {
"list": [
{
"username": "pttsy01"
}
]
}
}
<<<
success_explain
username // 登錄賬號
<<<
error
~~~