[关闭]
@yibo 2016-01-21T03:02:46.000000Z 字数 2097 阅读 657

校园之星

H5接口


0. Ticket & 基础数据

所有的请求均需要带"票",服务端的会将"票"以p为键传回,前端用${p}的方式取出票,发送请求时加一下就 OK 了(p=${p}

后端会向第一个页面传以下参数:

字段 类型 说明
p String ticket (所有请求均要带票)
school UUID 学校 id (请求数据要用到)
user UUID 当前用户的 id (加好友要用到)
username String 当前用户的名字(加好友要用到)
photo String 当前学校的封面图,可能没有
bgColor String 背景色

1. 数据接口

/superstar/school/star GET AJAX

例子

参数名 必选 类型及范围 说明
cursor false String 第一次不用传,之后直接传返回结果中的nextCursor就行了
count false int 默认20
school true String ${school}
p true String ${p}

* 返回结果:

  1. {
  2. "list": [
  3. {
  4. "uuid": "2GTN7V9nu7DW16qv20-Hlg",
  5. "name": "王二哈",
  6. "headImg": "http://p-test.jiemosrc.com/ID6dvrn9MZLo7csz1RiiBg.jpeg@640w_640h_75q.jpeg",
  7. "school": "北京大学/数学科学学院/2100级",
  8. "time": "15小时前",
  9. "superstar": true,
  10. "new": true,
  11. "faverCount": 59,
  12. "footprintCount": 53,
  13. "photoCount": 6,
  14. "photo": "http://p-test.jiemosrc.com/ID6dvrn9MZLo7csz1RiiBg.jpeg",
  15. "relationStatus": 1
  16. },
  17. {
  18. "uuid": "A5r4q6AoALzW16qv20-Hlg",
  19. "name": "慕魚3",
  20. "headImg": "http://p-test.jiemosrc.com/Te9xqGzn1xro7csz1RiiBg.jpeg@640w_640h_75q.jpeg",
  21. "school": "北京大学/马克思主义学院/2015级",
  22. "time": "刚刚",
  23. "superstar": true,
  24. "new": false,
  25. "faverCount": 7,
  26. "footprintCount": 13,
  27. "photoCount": 8,
  28. "photo": "http://p-test.jiemosrc.com/Te9xqGzn1xro7csz1RiiBg.jpeg",
  29. "relationStatus": 6
  30. }
  31. ],
  32. "hasMore": true,
  33. "nextCursor": "1444902453258"
  34. }
字段 类型 说明
uuid String 用户的 UUID
name String 名字
headImg String 头像
school String 学校信息
time String 右上角那个时间
superstar boolean 是否是校园之星
new boolean 是否是新晋校园之星,如果为 true,右上角不显示那个时间,显示“新”
faverCount int 点赞数
footprintCount int 访客数
photoCount int 照片数
photo String 用户照片
relationStatus int 好友关系:1请求加好友中(我发出好友请求) 6等待同意(我收到好友请求)

* hasMore: true还有下一页,false没有下一页了并且不返回nextCursor
* nextCursor: 只有在 hasMoretrue 时才有(这个值在请求下一页时直接原样传入即可)

2. 点击用户

url 直接用下面这个就行了(这个不用带票,会自动跳到客户端对应页面)
jiemoapp://j/smart?t=7&i=uuid

3. 加好友

调用 API。API 内网 host:http://api798.jiemoapp.com,外网 host:http://api.jiemoapp.com

添加新批注
在作者公开此批注前,只有你和作者可见。
回复批注