Skip to content

指定场景的资源查询。

资源列表

该接口用于查询特定场景的资源列表

  • 请求方法:GET

  • 是否鉴权:否

  • 请求编码:Content-Type:application/x-www-form-urlencoded

  • 响应编码:Content-Type:application/json;charset=UTF-8

  • 请求地址:index/resource.resource/homeResource

  • 请求参数:

参数名参数类型是否必填参数说明示例值
pageint当前页码1
sizeint每页显示条数20
sceneString查询类型recommend(推荐资源)
  • 成功示例:
javascript
{
	"data": {
		"items": [
			{
				"title": "Java面试真题",
				"category_uid": "661d08d18772a",
				"download": 10,
				"publish_date": "2024-04-16",
				"author": "兔兔答题",
				"uid": "661e15d63b18d",
                "score": "2.00",
				"cover": "https://ddddd2408.png",
				"category": {
					"title": "Java编程",
					"uid": "661d08d18772a"
				},
                "is_preview" : 1,
				"year": "2024"
			}
		],
		"total": 4,
		"page": 1,
		"size": 20
	},
	"code": 100,
	"msg": "查询成功"
}
参数名参数类型是否必有参数说明示例值
titleString资源名称测试
category_uidString资源分类id1
downloadint下载量10
publish_dateString发布时间2024-04-16
scoreString积分资源下载积分
authorString作者
uidString资源id1
coverString资源封面
categoryObject资源分类信息{title: "Java编程", uid: "661d08d18772a"}
yearString资源所属年份(日期格式)2024-01-01
  • 失败示例:
javascript
{
	"code": 101,
	"data": [],
	"msg": "请求失败"
}