注册登录
儿童编程
注册或登录请求验证码(手机号)
Method and Url Structure
| Method |
Resource URL |
| GET |
/userinfo/login_request/ |
Request and Parameters
| Name |
Description |
Required |
Default |
| username |
用户名 |
YES |
|
Reques)
?username=17611237765
cURL Example
curl -X GET -H 'Authorization: Token tester001' -d data{...}https://app.bcjiaoyu.com/server/userinfo/login_request/?username=17611237765
JSON Response
{ "status": 0, "message": ""}
注册或登录(手机号)
Method and Url Structure
| Method |
Resource URL |
| POST |
/userinfo/login_verifycode/ |
Request and Parameters
| Name |
Description |
Required |
Default |
| username |
用户名 |
YES |
|
| verification_code |
验证码 |
YES |
|
| userinfo |
用户信息 |
YES |
|
Request
{ "username":"17611237765", "verification_code":"883315", "userinfo":{ "inviter": "13263699826", // 邀请者,可不填 "name":"tester", "avatar":"https://static1.bcjiaoyu.com/head.png" }}
cURL Example
curl -X POST -H 'Authorization: Token tester001' -d data{...}https://app.bcjiaoyu.com/server/userinfo/login_verifycode/
JSON Response
{ "token": "2eb42021841352389adde05a0e9fe0770b3d88b8"}# 或 create 为 true 时调“邀请注册添加钻石记录”接口{ "token": "728326686e160c416393f4dda78d1069239d0288", "create": true}
邀请注册添加钻石记录
Method and Url Structure
| Method |
Resource URL |
| POST |
/userinfo/diamond_record/ |
Request and Parameters
| Name |
Description |
Required |
Default |
| inviter |
邀请者 |
YES |
|
| newuser |
新用户 |
YES |
|
Request
{ "inviter": "tester001", "newuser": "tester002"}
cURL Example
curl -X POST -H -d data{...}https://www.cxy61.com/program_face2face/userinfo/diamond_record/
JSON Response
{ "message": "添加记录成功"}# 错误信息{ "status": -4, "message": "数据错误" 或 "非邀请者关系"}
登录(微信小程序)
Method and Url Structure
| Method |
Resource URL |
| POST |
/userinfo/login_wx/ |
Request and Parameters
| Name |
Description |
Required |
Default |
| code |
微信code |
YES |
|
Request
{ "code": "0817ww0S02Vuo829PQ1S0VaE0S07ww0t"}
cURL Example
curl -X POST -H 'Authorization: Token tester001' -d data{...}https://127.0.0.1:8000/program_face2face/userinfo/login_wx/
JSON Response
{ "session": 300863339045}# 注册后返回{ "token": "68b1ecb9c1636228f3aadc8dc038c7288f2dd440", "session": 647038024680}// 647038024680// vzCyGQEt6FZsLcwZFaHIFA==&o-vlb5ZTnIXZlCNod9cBWor-Sn4k
注册(微信小程序)
Method and Url Structure
| Method |
Resource URL |
| POST |
/userinfo/signup_wx/ |
Request and Parameters
| Name |
Description |
Required |
Default |
| session |
接口返回数据 |
YES |
|
| name |
用户名 |
YES |
|
| avatar |
头像 |
YES |
|
Request
{ "session": 300863339045, "name": "tester", "avatar": "img"}
cURL Example
curl -X POST -H 'Authorization: Token tester001' -d data{...}https://127.0.0.1:8000/program_face2face/userinfo/signup_wx/
JSON Response
{ "token": "6ccfd8085b6ab4b68c4866b068114791ba6208ee"}