@cfygaoyang
2018-05-23T09:02:31.000000Z
字数 7368
阅读 876
GET /api/get_token?account=18888888888&verify_code=123456
GET /api/get_token?account=18888888888&password=123456
| 参数 | 类型 | 必须 | 说明 |
|---|---|---|---|
| account | 字符串 | 是 | 手机或邮箱 |
| verify_code | 字符串 | 是 | 验证码 |
| 参数 | 类型 | 必须 | 说明 |
|---|---|---|---|
| account | 字符串 | 是 | 手机或邮箱 |
| password | 字符串 | 是 | 密码 |
* 请求回调
{"message":{"token_expire_in":604800,"token":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0b2tlbl90eXBlIjoidG9rZW4iLCJ1c2VyX2lkIjoxLCJ0b2tlbl90aW1lIjoxNTA4NDY3NDAyfQ.ps7dPdN6-16ip5f4-fgfBZ5ye9Qu6oH9ADjz0iH1nvs","refresh_token_expire_in":1209600,"refresh_token":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0b2tlbl90eXBlIjoicmVmcmVzaF90b2tlbiIsInVzZXJfaWQiOjEsInRva2VuX3RpbWUiOjE1MDkwNzIyMDJ9.1r6PRGStReI1YFUrgggCovF5DAiS9gWMBY8DXOi2zPs","permission": 0},"code":0}
| 参数 | 类型 | 说明 |
|---|---|---|
| token_expire_in | 整形 | token有效时间(秒) |
| token | 字符串 | token |
| refresh_token_expire_in | 整形 | refresh_token有效时间(秒) |
| refresh_token | 字符串 | refresh_token |
POST /api/token/check
| 参数 | 类型 | 必须 | 说明 |
|---|---|---|---|
| token | 字符串 | 是 | 用户token |
{"message":"""code":0}
| 错误码 | 说明 |
|---|---|
| 10005 | token过期 |
| 10021 | 缺少token字段 |
POST /check/register
| 参数 | 类型 | 必须 | 说明 |
|---|---|---|---|
| account | 字符串 | 是 | 手机号 |
{"message":"""code":0}
| 错误码 | 说明 |
|---|---|
| 10002 | 手机号格式不正确 |
| 10012 | 缺少字段 |
| 10022 | 已注册 |
POST /api/user/open
{"Authorization" :"1234567890qwertyuio"}
{"open_id": "sdfghjklertyuio","open_type": 1}
| 参数 | 类型 | 必须 | 说明 |
|---|---|---|---|
| open_id | 字符串 | 是 | 第三方账号id |
| open_type | 字符串 | 是 | 第三方账号类型: 1.QQ 2.微信 3.微博 4.淘宝 |
{"code": 0,"message": {"data": {"open_id": "sdfghjklertyuio","open_type": 1,"app_id": "dyuiosdfghjklsdfghjkl","user_id": 1}}}
GET /api/get_token_by_open?open_id=18888888888&open_type=1
| 参数 | 类型 | 必须 | 说明 |
|---|---|---|---|
| open_id | 字符串 | 是 | 第三方账号id |
| open_type | 字符串 | 是 | 第三方账号类型: 1.QQ 2.微信 3.微博 4.淘宝 |
* 请求回调
{"message":{"token_expire_in":604800,"token":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0b2tlbl90eXBlIjoidG9rZW4iLCJ1c2VyX2lkIjoxLCJ0b2tlbl90aW1lIjoxNTA4NDY3NDAyfQ.ps7dPdN6-16ip5f4-fgfBZ5ye9Qu6oH9ADjz0iH1nvs","refresh_token_expire_in":1209600,"refresh_token":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0b2tlbl90eXBlIjoicmVmcmVzaF90b2tlbiIsInVzZXJfaWQiOjEsInRva2VuX3RpbWUiOjE1MDkwNzIyMDJ9.1r6PRGStReI1YFUrgggCovF5DAiS9gWMBY8DXOi2zPs"},"code":0}
| 参数 | 类型 | 说明 |
|---|---|---|
| token_expire_in | 整形 | token有效时间(秒) |
| token | 字符串 | token |
| refresh_token_expire_in | 整形 | refresh_token有效时间(秒) |
| refresh_token | 字符串 | refresh_token |
PUT /api/reset_token
{"refresh_token": "1234567890"}
{"message":{"token_expire_in":604800,"token":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0b2tlbl90eXBlIjoidG9rZW4iLCJ1c2VyX2lkIjoxLCJ0b2tlbl90aW1lIjoxNTA4NDY3NDAyfQ.ps7dPdN6-16ip5f4-fgfBZ5ye9Qu6oH9ADjz0iH1nvs","refresh_token_expire_in":1209600,"refresh_token":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0b2tlbl90eXBlIjoicmVmcmVzaF90b2tlbiIsInVzZXJfaWQiOjEsInRva2VuX3RpbWUiOjE1MDkwNzIyMDJ9.1r6PRGStReI1YFUrgggCovF5DAiS9gWMBY8DXOi2zPs"},"code":0}
| 参数 | 类型 | 说明 |
|---|---|---|
| token_expire_in | 整形 | token有效时间(秒) |
| token | 字符串 | token |
| refresh_token_expire_in | 整形 | refresh_token有效时间(秒) |
| refresh_token | 字符串 | refresh_token |
GET /api/get_verify_code?account=18888888888
| 参数 | 类型 | 必须 | 说明 |
|---|---|---|---|
| account | 字符串 | 是 | 手机或邮箱 |
{"code": 0,"message": {"verify_code": "123456"}}
PUT /api/user/reset_password
{"Authorization" :"1234567890qwertyuio"}
{"user_password": "1234567890"}
{"code": 0,"message": "reset_password success"}
GET /api/user/message
{"Authorization" :"1234567890qwertyuio"}
{"message": {"user_avatar": "","user_permission": 0,"user_message_id": 1,"created_at": "2017-10-16T18:00:22.227008","updated_at": "2017-10-16T18:00:22.227059","user_telephone": "18656660930","user_id": 1,"user_name": "18656660930","user_email": "","user_sex": 1,"user_birthday": "2017-10-10","user_city": "shanghai","user_name": "nickname",},"code": 0}
PUT /api/user/message
{"Authorization" :"1234567890qwertyuio"}
{"user_avatar": "http://xxx.com/123.jpg","user_sex": 1,"user_birthday": "2017-10-10","user_city": "shanghai","user_name": "nickname",}
| 参数 | 类型 | 必须 | 说明 |
|---|---|---|---|
| user_avatar | 字符串 | 否 | 图片url |
| user_sex | 整型 | 否 | 性别 0:女 1:男 |
| user_birthday | 字符串 | 否 | 生日 |
| user_city | 字符串 | 否 | 城市 |
| user_name | 字符串 | 否 | 昵称 |
备注:不修改的参数不需要填写
{"code":0,"message": {"created_at": "2017-10-16T18:00:22.227008","updated_at": "2017-10-16T18:00:22.227059","user_id": 1,"user_avatar": "http://xxx.com/123.jpg","user_sex": 1,"user_birthday": "2017-10-10","user_city": "shanghai","user_name": "nickname",}}
POST /api/user/img
{"Authorization" :"1234567890qwertyuio"}
| 参数 | 类型 | 必须 | 说明 |
|---|---|---|---|
| img | File | 是 | 图片 |
备注:请求类型为form-data,允许的图片类型为"png,jpg,git"
{"code": 0,"message": "http://xxx.com/123.jpg"}
POST /api/user/feedback
{"Authorization" :"1234567890qwertyuio"}
{"feedback_title": "标题","feedback_content": "描述"}
| 参数 | 类型 | 必须 | 说明 |
|---|---|---|---|
| feedback_title | 字符串 | 是 | 反馈标题 |
| feedback_content | 字符串 | 是 | 反馈描述 |
| feedback_phone | 字符串 | 可选 | 手机号 |
{"code": 0,"message": {反馈信息}}
GET /api/user/feedback?page={PAGE}
{"Authorization" :"1234567890qwertyuio"}
{"message": {"total": 1,"data": [反馈信息列表],"pages": 1,"page_size": 20,"current_page": 1},"code": 0}
GET /api/user/feedback/{pk}
{"Authorization" :"1234567890qwertyuio"}
| 参数 | 类型 | 必须 | 说明 |
|---|---|---|---|
| pk | 整形 | 是 | 反馈主键 feedback_id |
{"code": 0,"message": {反馈信息}}
PUT /api/user/feedback/{pk}
{"Authorization" :"1234567890qwertyuio"}
{"feedback_title": "标题","feedback_content": "描述"}
| 参数 | 类型 | 必须 | 说明 |
|---|---|---|---|
| feedback_title | 字符串 | 是 | 反馈标题 |
| feedback_content | 字符串 | 是 | 反馈描述 |
| feedback_phone | 字符串 | 可选 | 手机号 |
{"code": 0,"message": {反馈信息}}
DELETE /api/user/feedback/{pk}
{"Authorization" :"1234567890qwertyuio"}
| 参数 | 类型 | 必须 | 说明 |
|---|---|---|---|
| pk | 整形 | 是 | 反馈主键 feedback_id |
{"code": 0,"message": "success"}
GET /api/user/feedback_reply?page={PAGE}
{"message": {"total": 1,"data": [回复信息列表],"pages": 1,"page_size": 20,"current_page": 1},"code": 0}
GET /faq?page={PAGE}
| 参数 | 类型 | 必须 | 说明 |
|---|---|---|---|
| page | 整形 | 否 | 页码 |
{"meta": {"message": "Success.","code": 0},"data": {"total": 1,"data": [{"faq_id": 2,"faq_title": "aaaa","faq_content": "ccccc"}],"pages": 1,"page_size": 20,"current_page": 1}}
GET /sds_check_token?token={TOKEN}
| 参数 | 类型 | 必须 | 说明 |
|---|---|---|---|
| token | 字符串 | 是 | 用户token |
{"code": "1000","msg": "成功","description": "","data": {"userId": 1,"userNick": "name"}}
GET /area
| 参数 | 类型 | 必须 | 说明 |
|---|
{"message": {"status": "1","info": "OK","infocode": "10000","count": "1","districts": [...],"suggestion": {"keywords": [],"cities": []}},"code": 0}
GET /api/user/notice/summary
{"Authorization" :"1234567890qwertyuio"}
{"message": {"content_notice": "cccc2222","content_notice_time": "2018-04-10","content_reply_time": "2018-04-11","unread_notice": 0,"unread_reply": 1,"content_reply": "cccc222"},"code": 0}
GET /api/user/notice
{"Authorization" :"1234567890qwertyuio"}
{"total": 4,"data": [{"id": 2,"number": "00000002","title": "ttt","content": "cccc","thumbnail": "","status": 0,"created_at": "2018-04-10T13:13:52.330000"},{"id": 3,"number": "00000003","title": "ttt222","content": "cccc2222","thumbnail": "","status": 0,"created_at": "2018-04-10T13:59:30.147000"},{"id": 4,"number": "00000004","title": "tttddd","content": "ddddd","thumbnail": "","status": 0,"created_at": "2018-04-10T14:16:15.091000"},{"id": 5,"number": "00000005","title": "ttt222","content": "cccc2222","thumbnail": "","status": 0,"created_at": "2018-04-10T16:08:15.380000"}],"pages": 1,"page_size": 20,"current_page": 1}
GET /api/user/notice/{pk}
{"Authorization" :"1234567890qwertyuio"}
{"message": {"id": 2,"number": "00000002","title": "ttt","content": "cccc","thumbnail": "","status": 0,"created_at": "2018-04-10T13:13:52.330000"},"code": 0}
GET /api/user/feedback_reply
{"Authorization" :"1234567890qwertyuio"}
{"message": [{"is_read": 1,"feedback_phone": "15618927901","feedback_title": "t3","created_at": "2018-04-10 15:25:10","feedback_id": 3,"updated_at": "2018-04-11T17:08:00.647000","reply_id": 4,"feedback_status": 2,"reply_time": "2018-04-11 17:08:00","user_id": 2,"reply_content": "cccc222","feedback_content": "c3"}],"code": 0}