Commit 32543f8cf5fe381cb66558a20517de50082e49fa
1 parent
7257f0e1
udpate
Showing
2 changed files
with
7 additions
and
3 deletions
Show diff stats
account.proto
... | ... | @@ -17,5 +17,5 @@ message LoginRsp { |
17 | 17 | message Register { |
18 | 18 | string phone = 1; // @inject_tag: binding:"required" |
19 | 19 | string password = 2; // @inject_tag: binding:"required" |
20 | - int32 code = 3; // @inject_tag: binding:"required" | |
20 | + string code = 3; // @inject_tag: binding:"required" | |
21 | 21 | } |
22 | 22 | \ No newline at end of file | ... | ... |
doc/login.md
... | ... | @@ -35,8 +35,10 @@ $ curl --request POST 'http://192.168.0.206:8080/v1/register' \ |
35 | 35 | ``` |
36 | 36 | 返回结果: |
37 | 37 | ```shell |
38 | -{"code":0 ,"data":{"phone":"", "uid":"","password":""}} | |
38 | +{"code":0 ,"message":"success"}} | |
39 | 39 | ``` |
40 | +* code = 0, 则成功 | |
41 | +* code != 0, 则注册失败,message是返回的提示信息 | |
40 | 42 | |
41 | 43 | ### 登录接口 [/v1/login] |
42 | 44 | 1. 说明:研发提供的接口必须遵循以下协议 |
... | ... | @@ -68,8 +70,10 @@ $ curl --request POST 'http://192.168.0.206:8080/v1/login' \ |
68 | 70 | ``` |
69 | 71 | 返回结果: |
70 | 72 | ```shell |
71 | -{"code":0 ,"data":{"phone":"", "uid":"","password":""}} | |
73 | +{"code":0, "message":"success", "data":{"phone":"", "uid":"","password":""}} | |
72 | 74 | ``` |
75 | +* code = 0, 成功,客户端解析data字段就行 | |
76 | +* code !=0, 失败, message字段是提示信息 | |
73 | 77 | |
74 | 78 | |
75 | 79 | ... | ... |