command
module
Version:
v0.0.0-...-78f8b4d
Opens a new window with list of versions in this module.
Published: Dec 23, 2019
License: GPL-3.0
Opens a new window with license information.
Imports: 6
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
README
¶
In-Charge
后端 Go,Web端 React + umi.js
后端接口说明
返回值约定
{
code: int,
msg: string,
data: obejct
}
- code
状态码,见 response.go 中的状态码定义。
- msg
状态码非
Ok
时对应的描述。
- data
成功时返回的数据,以下 Response 的格式均指 data 的格式。
GET /status
服务器当前状态
POST /api/send-code
发送验证码
Request
{
phone: string
}
POST /api/login
登录
Request
{
phone: string,
code: string
}
- phone: 同上
- code: 短信验证码,仅做 4 位数字校验
Response
{
token: string
}
- token: jwt 字符串,需要保存到 cookie/localStorage 中,后续调用用户相关接口时,需要以
"Bearer ${token}"
的格式放在 request header 的 Authorization 中,当 外层 code 不为 Ok
时请重新登录。
Documentation
¶
There is no documentation for this package.
Source Files
¶
Directories
¶
Click to show internal directories.
Click to hide internal directories.