Commit 2328d44fa7cf98b0aa6b3812cf8ac989db4a1e73
1 parent
61fdbdf3
add: 添加激活码
Showing
2 changed files
with
40 additions
and
0 deletions
Show diff stats
doc/account.md
... | ... | @@ -42,7 +42,46 @@ $ curl --request POST 'http://192.168.0.206:8080/v1/register' \ |
42 | 42 | --header 'Content-Type: application/json' \ |
43 | 43 | --data '{ |
44 | 44 | "phone":"17683852936", |
45 | + "password":"123456", | |
46 | + "code": "", | |
47 | +}' | |
48 | +``` | |
49 | +返回结果: | |
50 | +```shell | |
51 | +{"code":0 ,"message":"success"}} | |
52 | +``` | |
53 | +* code = 0, 则成功 | |
54 | +* code != 0, 则注册失败,message是返回的提示信息 | |
55 | + | |
56 | +### 通过激活码注册接口[/register] | |
57 | +1. 说明:研发提供的接口必须遵循以下协议 | |
58 | +2. 请求方式:POST(JSON) | |
59 | + * 请求参数需要拼接为json,请求体是data-raw, 详情参考【请求参数】 | |
60 | +3. 请求参数:(以参数有就传) | |
61 | + | |
62 | +| 参数 | 类型 | 是否必须 | 备注 | | |
63 | +|----------|--------|------|-----------| | |
64 | +| phone | string | Y | 手机号 | | |
65 | +| password | string | Y | 密码 | | |
66 | +| code | string | Y | 短信验证码(暂无) | | |
67 | + | |
68 | +最后参数组合示例为: | |
69 | +```json | |
70 | +{ | |
71 | + "phone":"17683852936", | |
45 | 72 | "password":"123456" |
73 | +} | |
74 | +``` | |
75 | + | |
76 | +请求示例: | |
77 | +```shell | |
78 | +$ curl --request POST 'http://192.168.0.206:8080/v1/registerbykey' \ | |
79 | +--header 'Content-Type: application/json' \ | |
80 | +--data '{ | |
81 | + "phone":"17683852936", | |
82 | + "password":"123456", | |
83 | + "code": "", | |
84 | + "key":"", | |
46 | 85 | }' |
47 | 86 | ``` |
48 | 87 | 返回结果: | ... | ... |