API 文档

阅读: 评论:0

API 文档

API 文档

全球优选


  • 登录 /login
    • Method: POST
    • Data:
      • code (js_code)
      • rawData
      • signature
      • iv
      • encryptedData
Response:{"code": 1201,"result": {"uid":"1""token":"this is token"},"msg":"登录成功"}errors code: 101 1101 1102 1103 1104 1105

  • 用户信息 /user
    • Methor: GET
    • Headers:
      • Authorization : Bearer token
Response:{"code": 1202,"result": {"id": 2,"name": "小包子","created_at": "2017-06-11 09:06:20","updated_at": "2017-06-17 02:48:40","avatar": "xxxxx","status": 1},"msg": "用户信息"}

  • 省份列表 /province
    • Method: GET
    • Headers:
      • Authorization : Bearer token
Response:{"code": 1203,"result": {"id": [1,19,37,219,350,......],"name": ["北京","天津","河北省","山西省","内蒙古自治区",......]},"msg": "省份数据"}

  • 城市列表 /city
    • Method: GET
    • Data:
      • province_id
    • Headers:
      • Authorization : Bearer token
Response:{"code": 1204,"result": {"id": [2],"name": ["北京市"]},"msg": "城市/区县数据"}

  • 城市列表 /district
    • Method: GET
    • Data:
      • city_id
    • Headers:
      • Authorization : Bearer token
Response:{"code": 1204,"result": {"id": [3,4,5,......],"name": ["东城区","西城区","朝阳区",......]},"msg": "城市/区县数据"}

  • 地址列表 /getAddrs
    • Method: GET
    • Headers:
      • Authorization : Bearer token
Response:{"code": 1207,"result": [{"id": 2,"uid": 2,"province_id": 1,"city_id": 2,"district_id": 3,"detail": "马云别墅区","addressee": "马越","phone": "110120119","updated_at": "2017-06-17 08:34:44","created_at": "2017-06-17 08:34:44","province": "北京","city": "北京市","district": "东城区","default": true},{"id": 3,"uid": 2,"province_id": 1,"city_id": 2,"district_id": 3,"detail": "马云别墅区之二","addressee": "马铭","phone": "120","updated_at": "2017-06-17 11:43:36","created_at": "2017-06-17 08:35:07","province": "北京","city": "北京市","district": "东城区","default": false}],"msg": "用户地址列表"}

  • 添加、更新地址 /setAddr
    • Method: POST
    • Data:
      • province_id
      • city_id
      • district_id
      • detail
      • addressee
      • phone
      • id (可选 更新数据时必须携带)
      • def (可选 bool 设置为默认)
    • Headers:
      • Authorization : Bearer token
Response:{"code": 1205,"result": {"province_id": "1","city_id": "2","district_id": "3","detail": "马云别墅区之二","addressee": "马铭","phone": "120","id": "3"},"msg": "地址设置成功"}errors code: 101 1107

  • 设置默认地址 /setDefAddr
    • Method: POST
    • Data:
      • addr_id
    • Headers:
      • Authorization : Bearer token
Response:{"code": 1205,"result": [],"msg": "默认地址设置成功"}errors code: 1116 1117

  • 删除地址 /delAddr
    • Method: GET
    • Data:
      • id
    • Headers:
      • Authorization : Bearer token
Response:{"code": 1211,"result": [],"msg": "地址删除成功"}errors code: 1115

  • 获取地址 /getAddr
    • Method: GET
    • Data:
      • id
    • Headers:
      • Authorization : Bearer token
Response:{"code": 1206,"result": {"id": 2,"uid": 2,"province_id": 1,"city_id": 2,"district_id": 3,"detail": "马云别墅区","addressee": "马越","phone": "110120119","updated_at": "2017-06-17 08:34:44","created_at": "2017-06-17 08:34:44","default": true},"msg": "获取用户地址"errors code: 1108

  • 更新头像 /setAvatar
    • Method: POST
    • Data:
      - avatar (只支持jpg、png、jpeg)
    • Headers:
      • Authorization : Bearer token
Response:{"code": 1208,"result": {"avatar_url": "xxxxx"},"msg": "头像更新成功"}errors code: 1109 1110 1111 1112

  • 更新用户名 /setName
    • Method: POST
    • Data:
      - name
    • Headers:
      • Authorization : Bearer token
Response:{"code": 1209,"result": {"name": "马越"},"msg": "用户名更新成功"}errors code: 1113

  • 模块文案数据 /copywrites
    • Method: GET
    • Data:
      • blockKey
Response:{"code": 1210,"result": {"name": "FAQ","content": ""},"msg": "模块文案数据"}errors code: 1114

  • 试用列表 /trial/list
    • Method: GET
    • Data:
      • p (页码 page)
      • l (数量 limit)
      • type (状态 1进行中 2即将开始 3已结束)
Response:{"code": 2201,"result": {"data": [{"id": 1,"priority": 5,"title": "test","thumbnail": null,"specification": "test","origin_price": "1000.00","current_price": "10.00","quantity": 0,"page_view_count": 21,"start_at": "2017-06-29 16:00:06","end_at": "2017-07-29 16:00:07","end_time": 1501344000"status": 1,   // 2:试用结果名单已公布"reports": [   // 已结束 试用报告列表{"id": 1,"user_id": 1,"avatar": "/..."}]},......],"block": {"page": 1,"start": 0,"limit": 20,"count": 4,"more": false,"key": "53200e57c4ccd64378017b367b5d3b4e"}},"msg": "试用列表数据"}

  • 试用申请 /trial/apply
    • Method: GET
    • Data:
      • trial_id
    • Headers:
      • Authorization : Bearer token
Response:{"code": 2212,"result": {"apply_id":1,},"msg": "满足申请条件"}errors code: 401 2102 2103

  • 试用申请 /trial/apply
    • Method: POST
    • Data:
      • trial_id
      • manifesto
      • address_id
    • Headers:
      • Authorization : Bearer token
Response:{"code": 2203,"result": {"title": "test"},"msg": "试用申请成功"}errors code: 101 2102 2103 2104 2105

  • 试用申请数据 /trial/getApply
    • Method: GET
    • Data:
      • apply_id
    • Headers:
      • Authorization : Bearer token
Response:{"code": 2207,"result": {"apply_id": 9,"trial_id": 1,"manifesto": "我是马云之子马越"},"msg": "试用申请信息"}errors code: 2110

  • 修改试用宣言 /trial/editApply
    • Method: POST
    • Data:
      • apply_id
      • trial_id
      • manifesto
    • Headers:
      • Authorization : Bearer token
Response:{"code": 2208,"result": [],"msg": "试用申请宣言修改成功"}errors code: 2111 2112 2113

  • 试用详情页 /trial/detail
    • Method: GET
    • Data:
      • id
    • Headers: ( 可选 )
      • Authorization : Bearer token
Response:{"code": 2202,"result": {"trial": {    //商品信息"id": 4,"priority": 0,"title": "test","thubmnail": "test","description": "test","specification": "test","origin_price": "1000.00","current_price": "10.00","quantity": 0,"page_view_count": 20,"application_count": 0,"ask_count": 0,"start_at": 1498752000,"end_at": 1501344000,"created_at": null,"updated_at": null,"status": 1},"status": 1, //(试用状态 1进行中 2即将开始 3已结束)"applyList": [  //申请列表"list": [{"uid": 1,"name": "马越","avatar": "/...","likes": 0}],"count": 1],"user": {  //用户信息"apply_status": 1,   // 0未申请 1已申请 2分享页  (仅1、2状态下展示宣言)"apply_id": 1"manifesto": "我是马云之子马越"   //宣言"likes": 0,"isLike": 0, //仅分享页展示  是否已点赞"selected": 0}},"msg": "试用详情页数据"}errors code: 2101

  • 用户试用申请列表 /user/applyLIst
    • Method: GET
    • Data:
      • p
      • l
      • type (1申请成功 0全部)
    • Headers:
      • Authorization : Bearer token
Response:{"code": 2204,"result": {"data": [{"id": 3,"selected": 0,"trial_id": 4,"trial": {"id": 4,"priority": 0,"title": "test","thumbnail": null,"specification": "test","origin_price": "1000.00","current_price": "10.00","quantity": 0,"page_view_count": 24,"start_at": "2017-06-29 16:00:06","end_at": "2017-07-29 16:00:07","end_time": 1501344000}},{"id": 2,"selected": 0,"trial_id": 3,"trial": {"id": 3,"priority": 0,"title": "test","thumbnail": null,"specification": "test","origin_price": "1000.00","current_price": "10.00","quantity": 0,"page_view_count": 25,"start_at": "2017-06-29 16:00:06","end_at": "2017-07-29 16:00:07","end_time": 1501344000}},{"id": 1,"selected": 0,"trial_id": 2,"trial": {"id": 2,"priority": 0,"title": "test","thumbnail": null,"specification": "test","origin_price": "1000.00","current_price": "10.00","quantity": 0,"page_view_count": 23,"start_at": "2017-06-29 16:00:06","end_at": "2017-07-29 16:00:07","end_time": 1501344000}}],"block": {"page": 1,"start": 0,"limit": 20,"count": 3,"more": false,"key": "53200e57c4ccd64378017b367b5d3b4e"}},"msg": "用户试用申请列表"}

  • 商品试用申请列表 /trial/applyList
    • Method: GET
    • Data:
      • trial_id
      • p
      • l
Response:{"code": 2205,"result": {"data": [{"uid":1"name": "马越","avatar": "/...","apply_id": 3,"manifesto": "我是马云之子马越","likes": 0,"created_at": "5月7日"}],"block": {"page": 1,"start": 0,"limit": 20,"count": 1,"more": false,"key": "53200e57c4ccd64378017b367b5d3b4e"}},"msg": "商品试用申请列表"}

  • 试用结果名单 /trial/applyPass
    • Method: GET
    • Data:
      • trial_id
Response:{"code": 2215,"result": [{"uid": "1","name": "马越","avatar": "/...","apply_id": 3,"manifesto": "我是马云之子马越","likes": 0,"created_at": "5月7日"},{"uid": "2","name": "铭","avatar": "/...","apply_id": 3,"manifesto": "1233211234567","likes": 0,"created_at": "5月7日"}],"msg": "试用结果名单"}errors code: 2101

  • 提交试用报告图片 /trial/reportImg
    • Method: POST
    • Data:
      • img
    • Headers:
      • Authorization : Bearer token
Response:{"code": 2213,"result": {"url": "/......"},"msg": "报告图片上传成功"}errors code: 1109 1110 1111

  • 试用报告填写权限校验 /trial/report
    • Method: GET
    • Data:
      • trial_id
    • Headers:
      • Authorization : Bearer token
Response:{"code": 2206,"result": {"trial_id": "1"},"msg": "产品试用报告填写成功"}errors code: 2106 2107 2108 2109

  • 提交试用报告 /trial/report
    • Method: POST
    • Data:
      • trial_id
      • content
      • attachments
    • Headers:
      • Authorization : Bearer token
Response:{"code": 2206,"result": {"trial_id": "1"},"msg": "产品试用报告填写成功"}errors code: 2106 2107 2108 2109

  • 试用报告数据 /trial/getReport
    • Method: GET
    • Data:
      • report_id
    • Headers:
      • Authorization : Bearer token
Response:{"code": 2210,"result": {"report_id": 5,"trial_id": 1,"content": "123","attachments": ""},"msg": "试用报告信息"}errors code: 2114

  • 用户试用报告列表 /user/reportList
    • Method: GET
    • Data:
      • p
      • l
    • Headers:
      • Authorization : Bearer token
Response:{"code": 2214,"result": {"user": {"name": "马越","avatar": "/..."},"list": [{"trial": {"id": 1,"title": "test","thumbnail": "xxx"},"report": {"id": 5,"status": 0,"likes": 1,"content": "12121212121","attachments": ["xxx","ooo"],"created_at": "07月11日"}}]},"msg": "用户试用报告列表"
}

  • 修改试用报告 /trial/editReport
    • Method: POST
    • Data:
      • report_id
      • trial_id
      • content
      • attachments
    • Headers:
      • Authorization : Bearer token
Response:{"code": 2211,"result": [],"msg": "试用报告修改成功"}errors code: 2115 2116

  • 我的新消息数量 /user/newMsg
    • Method: GET
    • Headers:
      • Authorization : Bearer token
Response:{"code": 1213,"result": {"isNew": 3,"last_id":50,},"msg": "用户新消息数量"}

  • 我的消息(仅获取新消息) /user/message
    • Method: GET
    • Headers:
      • Authorization : Bearer token
Response:{"code": 1214,"result": [{"id": 2,"user_id": 1,"type": 1,"content": "123","thumbnail": "","title": "123","link": "","created_at": "2017-07-13 13:51:46","updated_at": "2017-07-13 13:51:48"},{"id": 3,"user_id": 1,"type": 1,"content": "123","thumbnail": "","title": "123","link": "","created_at": "2017-07-13 13:51:46","updated_at": "2017-07-13 13:51:48"},{"id": 4,"user_id": 1,"type": 1,"content": "123","thumbnail": "","title": "123","link": "","created_at": "2017-07-13 13:51:46","updated_at": "2017-07-13 13:51:48"}],"msg": "用户新消息列表"}

  • 我的消息(下拉获取消息) /user/msgList
    • Method: GET
    • Data:
      • push_id
      • l
    • Headers:
      • Authorization : Bearer token
Response:{"code": 1215,"result": [{"id": 1,"user_id": 1,"type": 1,"content": "123","thumbnail": "","title": "123","link": "","created_at": "2017-07-13 13:51:37","updated_at": "2017-07-13 13:51:44"},{"id": 2,"user_id": 1,"type": 1,"content": "123","thumbnail": "","title": "123","link": "","created_at": "2017-07-13 13:51:46","updated_at": "2017-07-13 13:51:48"},{"id": 3,"user_id": 1,"type": 1,"content": "123","thumbnail": "","title": "123","link": "","created_at": "2017-07-13 13:51:46","updated_at": "2017-07-13 13:51:48"}],"msg": "用户下拉消息列表"}

  • 点赞接口 /likes/apply
    • Method: GET
    • Data:
      • apply_id
    • Headers:
      • Authorization : Bearer token
Response:{"code": 1216,"result": [],"msg": "点赞成功"}Code: 1217(取消点赞)  1118

  • 公告接口 /notifies
    • Method: GET
Response:{"code": 1219,"result": {"attachment": "","title": "123","content": "321","open": "","start_at": 1500469979,"end_at": 1500579979},"msg": "公告信息"}result 为空则无公告

本文发布于:2024-01-28 04:08:48,感谢您对本站的认可!

本文链接:https://www.4u4v.net/it/17063861334664.html

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。

标签:文档   API
留言与评论(共有 0 条评论)
   
验证码:

Copyright ©2019-2022 Comsenz Inc.Powered by ©

网站地图1 网站地图2 网站地图3 网站地图4 网站地图5 网站地图6 网站地图7 网站地图8 网站地图9 网站地图10 网站地图11 网站地图12 网站地图13 网站地图14 网站地图15 网站地图16 网站地图17 网站地图18 网站地图19 网站地图20 网站地图21 网站地图22/a> 网站地图23