### H5 组件管理接口测试 ### 1. 根据 ID 查询组件 GET {{baseUrl}}/h5/component/1 Content-Type: application/json ### 2. 分页查询组件列表(不带筛选条件) GET {{baseUrl}}/h5/component/page?page=1&pageSize=10 Content-Type: application/json ### 3. 分页查询组件列表(按类型筛选) GET {{baseUrl}}/h5/component/page?page=1&pageSize=10&type=text Content-Type: application/json ### 4. 分页查询组件列表(关键词搜索) GET {{baseUrl}}/h5/component/page?page=1&pageSize=10&keyword=标题 Content-Type: application/json ### 5. 分页查询组件列表(按分类筛选) GET {{baseUrl}}/h5/component/page?page=1&pageSize=10&categoryId=1 Content-Type: application/json ### 6. 分页查询组件列表(按标签筛选) GET {{baseUrl}}/h5/component/page?page=1&pageSize=10&tagId=1 Content-Type: application/json ### 7. 分页查询组件列表(组合筛选) GET {{baseUrl}}/h5/component/page?page=1&pageSize=10&type=image&keyword=产品&categoryId=2 Content-Type: application/json ### 8. 创建组件 POST {{baseUrl}}/h5/component Content-Type: application/json { "name": "测试组件", "type": "text", "thumbnailUrl": "https://example.com/thumb.jpg", "previewUrl": "https://example.com/preview.jpg", "content": "{\"version\":\"1.0\",\"data\":{\"text\":\"测试文本\"}}", "remark": "这是一个测试组件", "isPremium": 0, "isSystem": 0, "status": 1 } ### 9. 更新组件 POST {{baseUrl}}/h5/component/update/1 Content-Type: application/json { "id": 1, "name": "更新后的组件名称", "type": "text", "thumbnailUrl": "https://example.com/new-thumb.jpg", "previewUrl": "https://example.com/new-preview.jpg", "content": "{\"version\":\"1.1\",\"data\":{\"text\":\"更新的文本\"}}", "remark": "更新后的备注说明", "isPremium": 0, "isSystem": 0, "status": 1 } ### 10. 删除组件 POST {{baseUrl}}/h5/component/delete/1 Content-Type: application/json ### 11. 批量删除组件 POST {{baseUrl}}/h5/component/batch Content-Type: application/json [1, 2, 3] ### 12. 增加使用次数 POST {{baseUrl}}/h5/component/1/usage Content-Type: application/json ### 13. 增加点赞数 POST {{baseUrl}}/h5/component/1/like Content-Type: application/json ### 14. 获取热门组件(默认类型) GET {{baseUrl}}/h5/component/hot?limit=10 Content-Type: application/json ### 15. 获取热门组件(指定类型) GET {{baseUrl}}/h5/component/hot?type=text&limit=5 Content-Type: application/json