角色板块

1. 获取角色板块列表

请求 URL:

  • /rolePlateList

请求方式: POST

认证: 需要登录,请在请求头携带有效的 Authorization

1.1. 请求参数

参数名 必选 类型 说明
appId string App ID
udid string 设备 UDID

1.2. 返回示例

{
  "code": 200,
  "msg": "SUCCESS",
  "data": [
    {
      "id": 2,
      "title": "热门推荐",
      "image": "https://example.com/plate-list.png",
      "titleDetail": "热门角色",
      "imageDetail": "https://example.com/plate-detail.png",
      "descDetail": "本板块收录近期热门角色。",
      "star": 128,
      "sort": 1,
      "showType": 2,
      "displayType": 1,
      "roleList": [
        {
          "id": 543,
          "name": "Marcus Johnson",
          "avatar": "https://example.com/avatar.png",
          "background": "https://example.com/background.png",
          "plateId": 2,
          "isFavorite": false
        }
      ]
    }
  ]
}

1.3. 返回参数说明

参数名 类型 说明
code int 状态码,200 表示成功
msg string 提示信息
data array 当前用户可见的板块列表,按 sort 升序排列
data[].id uint 板块 ID
data[].title string 板块列表标题
data[].image string 板块列表图片
data[].titleDetail string 板块详情页标题
data[].imageDetail string 板块详情页图片
data[].descDetail string 板块详情页描述
data[].star uint 板块点赞数
data[].sort int 排序值,值越小越靠前
data[].showType uint8 展示类型:1 小图,2 大图
data[].displayType uint8 板块内容展示类型:1 角色,2 图片
data[].roleList array 板块首批角色,默认最多 10 个;角色字段与 /getRoleList 返回的角色对象一致

1.4. 缓存说明

  • 每个板块的候选角色 ID 会按 App、用户角色类型和板块缓存 24 小时。
  • 接口复用 /getRoleListByPlate 的板块角色 ID 缓存,并批量读取角色详情。
  • isFavorite 等用户相关字段会按当前登录用户实时组装,不会跨用户缓存。
2021 © Live all right reserved,powered by Gitbook该文件修订时间: 2026-08-10 18:19:52

results matching ""

    No results matching ""