云速成

内容接口

模板接口

读取建站模板列表与详情,支持按行业、色系筛选,用于模板库展示。

获取模板列表

GET/_api/templates公开接口

分页获取已上架模板,可按行业与色系筛选。

Query 参数

参数类型必填说明
pageinteger否页码。
pageSizeinteger否每页条数。
qstring否关键字,命中模板名称或编码。
firstIndustryinteger否一级行业 Id;0 视为全部。
secondIndustryinteger否二级行业 Id。
colorTypestring否色系编码,如 LanSe。
sortBystring否createdAt(最新)或 useCount(最热)。

响应示例

{
  "items": [
    {
      "id": "6f708192-a3b4-c5d6-e7f8-091a2b3c4d5e",
      "templateCode": "TPL-10023",
      "name": "科技蓝色企业官网",
      "thumbnailUrl": "/AppUpload/Image/template-10023.webp",
      "demoUrl": "https://demo.example.com/10023",
      "colorType": "LanSe",
      "firstIndustry": 1,
      "secondIndustry": 11,
      "useCount": 2100,
      "sortOrder": 0,
      "isPublished": true,
      "isRecommended": true,
      "createdAt": "2025-09-01T00:00:00Z",
      "updatedAt": "2025-09-01T00:00:00Z"
    }
  ],
  "page": 1,
  "pageSize": 20,
  "total": 1168,
  "totalPages": 59
}

获取模板详情

GET/_api/templates/{id}公开接口

获取已上架模板详情。

路径参数

参数类型必填说明
iduuid是模板 Id。

响应示例

{
  "id": "6f708192-a3b4-c5d6-e7f8-091a2b3c4d5e",
  "templateCode": "TPL-10023",
  "name": "科技蓝色企业官网",
  "thumbnailUrl": "/AppUpload/Image/template-10023.webp",
  "demoUrl": "https://demo.example.com/10023",
  "colorType": "LanSe",
  "firstIndustry": 1,
  "secondIndustry": 11,
  "useCount": 2100,
  "isPublished": true,
  "isRecommended": true
}