简要描述:

获取PC版首页数据

请求域名:

  • http://xx.com

请求URL:

POST/plugin.case-library.api.pc.home.index

返回参数说明:

参数名 类型 说明
banner[title] string 幻灯片标题
banner[img_pc] string 幻灯片地址(相对地址),为空不显示该幻灯片
banner[img_pc_src] string 幻灯片地址(绝对地址),为空不显示该幻灯片
banner[url] string 跳转路径
hotCategory array 热门案例-推荐分类
hotCategory[id] int 分类id
hotCategory[category_name] string 分类名
hotCategory[level] int 分类等级,1一级,2二级
hotCategory[pid] int 分类上级id
hotCases array 热门推荐案例
hotCases[id] int 热门案例id
hotCases[case_name] string 案例名
hotCases[img] string 案例图标(img_src绝对路径)
hotCases[read_num] int 浏览量
special array 热门专题
special[id] int 热门专题id
special[special_name] string 专题名
special[special_banner] string 专题图(special_banner_src绝对路径)
newCase array 最新案例列表(有分页,点击换一批即为下一页)
newCase[data][id] int 案例id
newCase[data][img] string 案例图标(img_src绝对路径)
newCase[data][member_id] int 发布者id
newCase[data][member][nickname] string 发布者昵称
newCase[data][read_num] int 浏览量
newCase[data][created_at] string 发布时间
rank array 排行榜列表
rank[id] int 案例id
rank[img] string 案例图标(img_src绝对路径)
rank[member_id] int 发布者id
rank[member][nickname] string 发布者昵称
rank[read_num] int 浏览量
rank[created_at] string 发布时间
advert[ad1] array 广告位1信息,可能为[]
advert[ad2] array 广告位2信息,可能为[]
advert[ad1][pc_img] int 广告位图片
advert[ad1][url] string 广告链接
category array 显示分类及所属8个案例信息
category[id] int 分类id
category[category_name] string 分类名
category[level] int 分类等级,1一级,2二级
category[pid] int 分类上级id
category[cases][id] int 案例id
category[cases][case_name] string 案例名
category[cases][img] string 案例图标(img_src绝对路径)
category[cases][read_num] int 浏览量
category[cases][desc] string 案例简介
category[cases][level] float 案例评分

返回示例:

正确时返回的数据:

{
	"result": 1,
	"msg": "ok",
	"data": {
		"special": [
			{
				"id": 1,
				"special_name": "专题1",
				"special_banner": "newimage/55812ff61cb4764ce2c995bdd7c37d91.jpg",
				"special_banner_src": "http://shop-yunzshop-com.oss-cn-hangzhou.aliyuncs.com/newimage/55812ff61cb4764ce2c995bdd7c37d91.jpg"
			}
		],
		"advert": {
			"ad1": {
				"pc_img": "http://shop-yunzshop-com.oss-cn-hangzhou.aliyuncs.com/newimage/55812ff61cb4764ce2c995bdd7c37d91.jpg",
				"url": ""
			},
			"ad2": []
		},
		"banner": [
			{
				"title": "123333",
				"img": "newimage/55812ff61cb4764ce2c995bdd7c37d91.jpg",
				"img_pc": "",
				"url": "",
				"mini_url": "",
				"img_src": "http://shop-yunzshop-com.oss-cn-hangzhou.aliyuncs.com/newimage/55812ff61cb4764ce2c995bdd7c37d91.jpg",
				"img_pc_src": ""
			},
			{
				"title": "666",
				"img": "newimage/55812ff61cb4764ce2c995bdd7c37d91.jpg",
				"img_pc": "",
				"url": "",
				"mini_url": "",
				"img_src": "http://shop-yunzshop-com.oss-cn-hangzhou.aliyuncs.com/newimage/55812ff61cb4764ce2c995bdd7c37d91.jpg",
				"img_pc_src": ""
			}
		],
		"newCase": {
			"total": 2,
			"per_page": 8,
			"current_page": 1,
			"last_page": 1,
			"next_page_url": null,
			"prev_page_url": null,
			"from": 1,
			"to": 2,
			"data": [
				{
					"id": 10,
					"case_name": "案例1",
					"img": "newimage/55812ff61cb4764ce2c995bdd7c37d91.jpg",
					"read_num": 0,
					"member_id": 164932,
					"created_at": "2020-12-03 16:13:25",
					"screen_shot_src": [],
					"img_src": "http://shop-yunzshop-com.oss-cn-hangzhou.aliyuncs.com/newimage/55812ff61cb4764ce2c995bdd7c37d91.jpg",
					"img_mini_src": "",
					"img_h5_src": "",
					"member": {
						"uid": 164932,
						"nickname": "A李李李",
						"avatar_image": "http://shop-yunzshop-com.oss-cn-hangzhou.aliyuncs.com/images/1/2019/04/tWMW4dK4vlxk2Zb29mGC922m82bwg2.jpg",
						"username": "A李李李"
					}
				},
				{
					"id": 9,
					"case_name": "案例2",
					"img": "newimage/55812ff61cb4764ce2c995bdd7c37d91.jpg",
					"read_num": 17,
					"member_id": 164932,
					"created_at": "2020-12-03 16:12:47",
					"screen_shot_src": [],
					"img_src": "http://shop-yunzshop-com.oss-cn-hangzhou.aliyuncs.com/newimage/55812ff61cb4764ce2c995bdd7c37d91.jpg",
					"img_mini_src": "",
					"img_h5_src": "",
					"member": {
						"uid": 164932,
						"nickname": "A李李李",
						"avatar_image": "http://shop-yunzshop-com.oss-cn-hangzhou.aliyuncs.com/images/1/2019/04/tWMW4dK4vlxk2Zb29mGC922m82bwg2.jpg",
						"username": "A李李李"
					}
				}
			]
		},
		"hotCategory": [
			{
				"id": 3,
				"category_name": "子分类1",
				"level": 2,
				"pid": 1
			},
			{
				"id": 5,
				"category_name": "分类3",
				"level": 1,
				"pid": 0
			},
			{
				"id": 1,
				"category_name": "分类1",
				"level": 1,
				"pid": 0
			}
		],
		"rank": [
			{
				"id": 9,
				"case_name": "案例2",
				"img": "newimage/55812ff61cb4764ce2c995bdd7c37d91.jpg",
				"read_num": 17,
				"member_id": 164932,
				"created_at": "2020-12-03 16:12:47",
				"screen_shot_src": [],
				"img_src": "http://shop-yunzshop-com.oss-cn-hangzhou.aliyuncs.com/newimage/55812ff61cb4764ce2c995bdd7c37d91.jpg",
				"img_mini_src": "",
				"img_h5_src": "",
				"member": {
					"uid": 164932,
					"nickname": "A李李李",
					"avatar_image": "http://shop-yunzshop-com.oss-cn-hangzhou.aliyuncs.com/images/1/2019/04/tWMW4dK4vlxk2Zb29mGC922m82bwg2.jpg",
					"username": "A李李李"
				}
			},
			{
				"id": 10,
				"case_name": "案例1",
				"img": "newimage/55812ff61cb4764ce2c995bdd7c37d91.jpg",
				"read_num": 0,
				"member_id": 164932,
				"created_at": "2020-12-03 16:13:25",
				"screen_shot_src": [],
				"img_src": "http://shop-yunzshop-com.oss-cn-hangzhou.aliyuncs.com/newimage/55812ff61cb4764ce2c995bdd7c37d91.jpg",
				"img_mini_src": "",
				"img_h5_src": "",
				"member": {
					"uid": 164932,
					"nickname": "A李李李",
					"avatar_image": "http://shop-yunzshop-com.oss-cn-hangzhou.aliyuncs.com/images/1/2019/04/tWMW4dK4vlxk2Zb29mGC922m82bwg2.jpg",
					"username": "A李李李"
				}
			}
		],
		"hotCases": [
			{
				"id": 10,
				"case_name": "案例1",
				"img": "newimage/55812ff61cb4764ce2c995bdd7c37d91.jpg",
				"read_num": 0,
				"member_id": 164932,
				"screen_shot_src": [],
				"img_src": "http://shop-yunzshop-com.oss-cn-hangzhou.aliyuncs.com/newimage/55812ff61cb4764ce2c995bdd7c37d91.jpg",
				"img_mini_src": "",
				"img_h5_src": ""
			},
			{
				"id": 9,
				"case_name": "案例2",
				"img": "newimage/55812ff61cb4764ce2c995bdd7c37d91.jpg",
				"read_num": 17,
				"member_id": 164932,
				"screen_shot_src": [],
				"img_src": "http://shop-yunzshop-com.oss-cn-hangzhou.aliyuncs.com/newimage/55812ff61cb4764ce2c995bdd7c37d91.jpg",
				"img_mini_src": "",
				"img_h5_src": ""
			}
		],
		"category": [
			{
				"id": 3,
				"category_name": "子分类1",
				"level": 2,
				"pid": 1,
				"cases": [
					{
						"id": 9,
						"case_name": "案例2",
						"img_src": "http://shop-yunzshop-com.oss-cn-hangzhou.aliyuncs.com/newimage/55812ff61cb4764ce2c995bdd7c37d91.jpg",
						"read_num": 17,
						"level": 4
					}
				]
			},
			{
				"id": 5,
				"category_name": "分类3",
				"level": 1,
				"pid": 0,
				"cases": []
			},
			{
				"id": 1,
				"category_name": "分类1",
				"level": 1,
				"pid": 0,
				"cases": [
					{
						"id": 9,
						"case_name": "案例2",
						"img_src": "http://shop-yunzshop-com.oss-cn-hangzhou.aliyuncs.com/newimage/55812ff61cb4764ce2c995bdd7c37d91.jpg",
						"read_num": 17,
						"level": 4
					}
				]
			}
		]
	}
}

错误时返回:

{
	"result": 0,
	"msg": "",
	"data": []
}

备注:

  • 更多返回错误代码请看首页的错误代码描述