用户注册
[TOC]
简要描述
- 用户注册接口
请求URL
http://localhost:8000/front/api/user/register
请求方式
- POST
参数
参数名 | 必选 | 类型 | 说明 |
---|---|---|---|
username | 是 | string | 用户名 |
password | 是 | string | 密码 |
否 | string | 邮箱 | |
tel | 否 | number | 电话 |
返回成功示例
{
"error_code": 0,
"msg": "注册成功"
}
返回失败示例
{
"error_code": 1,
"msg": "用户名被占用"
}
返回参数说明
参数名 | 类型 | 说明 |
---|---|---|
error_code | number | 错误码,1:注册成功;2:注册失败 |
msg | string | 返回结果 |
备注
- 更多返回错误代码请看首页的错误代码描述