guanglist.md
22.2 KB
1.获取逛某一分类下资讯列表(/guang/api/*/article/getList)(app接口) (更新)
请求参数
参数名称 | 参数类型 | 可否为空 | 示例 | 默认值 | 备注 |
---|---|---|---|---|---|
sort_id | int | 是 | - | 0 | 分类id |
gender | string | 是 | - | emptyString | 性别 |
author_id | int | 是 | 1 | 0 | 作者id |
tag | string | 是 | - | emptyString | 标签 |
uid | int | 是 | 25 | 0 | uid |
udid | String | 是 | - | emptyString | udid |
client_type | String | 是 | iphone | h5 | 客户端类型 |
page | Integer | 是 | 1 | 1 | 页码 |
limit | Integer | 是 | 10 | 10 | 分页大小 |
app_type | String | 是 | 1 | 0 | 0:有货,1:blk |
响应
code为200即为成功,否则是失败。 响应JSON格式如下所示:
{
"datetime": "1495783397",
"gender": "1,2,3",
"list": {
"adlist": [
{
"bgColor": "",
"src": "http://img12.static.yhbimg.com/yhb-img01/2016/04/18/14/0241a5f823e05c0c4975b346ed5a3c8a1a.jpg?imageView2/{mode}/w/{width}/h/{height}",
"title": "",
"url": "http://feature.yoho.cn/0418RUNNINGMAN/index.html?title=兄弟在奔跑,潮流在有货&share_id=944"
},
{
"bgColor": "",
"src": "http://img11.static.yhbimg.com/yhb-img01/2016/04/19/01/0183769e29a4a77462ee276bbd5a94787f.jpg?imageView2/{mode}/w/{width}/h/{height}",
"title": "",
"url": "http://feature.yohobuy.com/0/0/897/index.html?title=我的潮流世界观&share_id=942"
},
{
"bgColor": "",
"src": "http://img11.static.yhbimg.com/yhb-img01/2016/04/18/10/01800e18e1db50caaef5486f6355e57bb9.jpg?imageView2/{mode}/w/{width}/h/{height}",
"title": "",
"url": "http://feature.yoho.cn/0418APPLIST/index.html?title=带你回顾时尚大电影&share_id=940"
},
{
"bgColor": "",
"src": "http://img12.static.yhbimg.com/yhb-img01/2016/04/11/10/027feebcf981dd2cc3fb08c610746bec30.jpg?imageView2/{mode}/w/{width}/h/{height}",
"title": "",
"url": "http://feature.yohobuy.com/0/0/896/index.html?title=潮流清单&share_id=918"
},
{
"bgColor": "",
"src": "http://img12.static.yhbimg.com/yhb-img01/2016/04/14/02/02b49e9bbf24f9bd403a95aed83c8ae064.jpg?imageView2/{mode}/w/{width}/h/{height}",
"title": "",
"url": "http://feature.yoho.cn/NEWS/0414APPWEEKNEWSALL/index.html?title=一周速报&share_id=912"
},
{
"bgColor": "",
"src": "http://img12.static.yhbimg.com/yhb-img01/2016/04/11/05/02579a7e14db7c17872a7deb4a8a31688a.jpg?imageView2/{mode}/w/{width}/h/{height}",
"title": "",
"url": "http://feature.yoho.cn/0411SNEAKERHEAD/index.html?title=SNEAKERHEAD REPORT&share_id=920"
},
{
"bgColor": "",
"src": "http://img11.static.yhbimg.com/yhb-img01/2016/04/08/17/01ab07730fbfae2de97403e480f18b4239.jpg?imageView2/{mode}/w/{width}/h/{height}",
"title": "",
"url": "http://feature.yoho.cn/0408APPSEASON/index.html?title=机能穿衣舒适又加分&share_id=916"
},
{
"bgColor": "",
"src": "http://img12.static.yhbimg.com/yhb-img01/2016/04/12/07/02aef74138f1265126fdd76f8a42dfca5e.jpg?imageView2/{mode}/w/{width}/h/{height}",
"title": "",
"url": "http://guang.m.yohobuy.com/info/index?id=42776"
},
{
"bgColor": "",
"src": "http://img11.static.yhbimg.com/yhb-img01/2016/04/12/07/01dd0bee9513a94286ecbd0dec911865f7.jpg?imageView2/{mode}/w/{width}/h/{height}",
"title": "",
"url": "http://guang.m.yohobuy.com/info/index?id=42774"
},
{
"bgColor": "",
"src": "http://img12.static.yhbimg.com/yhb-img01/2016/04/08/03/02186b0b66cdc37db1b9d2c3181b4f1bde.jpg?imageView2/{mode}/w/{width}/h/{height}",
"title": "",
"url": "http://feature.yohobuy.com/0/0/895/index.html?title=宅男女神们的小秘密&share_id=914"
},
{
"bgColor": "",
"src": "http://img12.static.yhbimg.com/yhb-img01/2016/03/21/03/02d683f021eb6c21a2f19b7ddce5caa63a.jpg?imageView2/{mode}/w/{width}/h/{height}",
"title": "",
"url": "http://m.yohobuy.com/?title=星潮教室&content_code=ad28931ba6e5ff22ee79eb41943d77d7&template_id=60"
}
],
"artList": [
{
"ads_img_size": "10881088",
"article_type": "2",
"author_id": "8168296",
"browse": "0",
"category_id": "9999",
"category_name": "SHOW",
"conver_image_type": "2",
"hasVideoFlag": 1,
"id": 34498,
"intro": "12",
"isDelete": "N",
"isFavor": "N",
"isPraise": "N",
"is_recommended": "1",
"maxSortId": 9999,
"praiseStatus": "true",
"praise_num": "0",
"publish_time": "05月25日 18:30",
"publish_time_long": "1495708230000",
"share": {
"url": "http://guang.m.yohobuy.com/info/index?id=34498"
},
"src": "http://img12.static.yhbimg.com/article/2017/05/25/16/02e0d2797cb08e0fbbaef3e604b4d88867.jpg?imageView2/{mode}/w/{width}/h/{height}",
"title": "123",
"url": "33",
"views_num": "9365"
},
{
"article_type": "1",
"author": {
"author_id": "8050738",
"avatar": "http://head.static.yhbimg.com/yhb-head/2017/1/4/11/012e5babb3607b2b9ab8e398f75daabdb1.526063.jpg?imageView2/{mode}/w/{width}/h/{height}",
"name": "Blue.Mei"
},
"author_id": "8050738",
"browse": "0",
"category_id": "9999",
"category_name": "SHOW",
"conver_image_type": "1",
"hasVideoFlag": 0,
"id": 34492,
"intro": "",
"isDelete": "N",
"isFavor": "N",
"isPraise": "N",
"is_recommended": "1",
"maxSortId": 9999,
"praiseStatus": "true",
"praise_num": "0",
"product_list": [
{
"pic_url": "http://img12.static.yhbimg.com/goodsimg/2015/09/15/03/02e2e150e77ccf43404c232d5bd3dc16d1.jpg?imageView2/{mode}/w/{width}/h/{height}",
"product_id": "245217",
"product_name": "Aape X YO’HOOD moon face YOHO! 迷彩棒球帽",
"product_skn": "51137457",
"sales_price": "269"
}
],
"publish_time": "05月25日 14:21",
"publish_time_long": "1495693288000",
"share": {
"url": "http://guang.m.yohobuy.com/info/index?id=34492"
},
"src": "http://img11.static.yhbimg.com/sns/2017/03/23/17/01e1a6e8ce2a09bcbe8c6ed1e446c64f6d.jpg?imageView2/{mode}/w/{width}/h/{height}",
"tag_list": [
{
"isFlip": 1,
"posX": 5013,
"posY": 5013,
"tagId": 862,
"tagName": "Aape",
"type": 1
}
],
"url": "http://guang.m.yohobuy.com/info/index?id=34492",
"views_num": "8599"
}
]
},
"page": 1,
"total": 2,
"totalPage": 1
}
2.获取逛最新下的置顶资讯列表(/guang/api/*/article/getTopList (新增)
请求参数
参数名称 | 参数类型 | 可否为空 | 示例 | 默认值 | 备注 |
---|---|---|---|---|---|
gender | string | 是 | - | emptyString | 性别 |
client_type | String | 是 | iphone | h5 | 客户端类型 |
uid | int | 是 | 25 | 0 | uid |
udid | String | 是 | - | emptyString | udid |
响应
code为200即为成功,否则是失败。 响应JSON格式如下所示:
{
"datetime": "1495868559",
"gender": "0",
"list": {
"artList": [
{
"article_type": "1",
"author": {
"author_desc": "偶尔会发笑",
"author_id": "8168290",
"avatar": "http://img13.static.yhbimg.com/author/2016/04/25/17/02718717297ec254697aaf0a614dd72d8a.jpg",
"name": "梁边妖",
"url": "http://guang.m.yohobuy.com/author/index?id=8168290"
},
"author_id": "8168290",
"browse": "185",
"category_id": "4",
"category_name": "潮品",
"conver_image_type": "2",
"hasVideoFlag": 0,
"id": 34476,
"intro": "哈哈,来测试一下文章摘要,想要打造一个简约的卧室,整体色调的选择也是至关重要的,一般为白、灰、黑、浅米、卡其、原木等低饱和度色调,男生的卧室一般会以原木色、冷灰色为主色,",
"isDelete": "N",
"isFavor": "N",
"isPraise": "N",
"is_recommended": "0",
"maxSortId": 4,
"praiseStatus": "true",
"praise_num": "1",
"product_list": [
{
"pic_url": "http://img13.static.yhbimg.com/goodsimg/2017/05/09/16/02ff65522bf29601dd9a15784cf5e29f84.jpg?imageView2/{mode}/w/{width}/h/{height}",
"product_id": "508768",
"product_name": "tracy的基础店铺的商品",
"product_skn": "512588110",
"sales_price": "69"
},
{
"pic_url": "http://img12.static.yhbimg.com/goodsimg/2015/10/08/10/029cc90d6104c02be9fdf0691c1d4169f9.jpg?imageView2/{mode}/w/{width}/h/{height}",
"product_id": "268241",
"product_name": "MIRACLE KILL 迷彩帽檐双刀logo 棒球帽",
"product_skn": "51149414",
"sales_price": "11"
},
{
"pic_url": "http://img13.static.yhbimg.com/goodsimg/2017/05/11/18/026be154f027a7a1f462c8f5b4d1711e2b.png?imageView2/{mode}/w/{width}/h/{height}",
"product_id": "508764",
"product_name": "Nike男卫衣",
"product_skn": "512588106",
"sales_price": "2"
},
{
"pic_url": "http://img13.static.yhbimg.com/goodsimg/2017/05/09/13/02ce30a9367d1630257ded8a25f96a2638.jpg?imageView2/{mode}/w/{width}/h/{height}",
"product_id": "508760",
"product_name": "wy大白兔店铺商品66",
"product_skn": "512588102",
"sales_price": "1"
},
{
"pic_url": "http://img12.static.yhbimg.com/goodsimg/2017/05/08/18/027751c2264c98601414de2e038eb6310f.jpg?imageView2/{mode}/w/{width}/h/{height}",
"product_id": "508748",
"product_name": "wy大白兔店铺商品1",
"product_skn": "512588090",
"sales_price": "1"
}
],
"publish_time": "05月10日 14:42",
"publish_time_long": "1494398554000",
"share": {
"url": "http://guang.m.yohobuy.com/info/index?id=34476&openby:yohobuy={\"action\":\"go.share\",\"params\":{\"pic\":\"http://img13.static.yhbimg.com/article/2017/05/10/14/027e5dde46b6cdb26b3f63408cb7b57f0a.jpg?imageView2/2/w/640/h/640\",\"title\":\"测试新增资讯\",\"url\":\"http://guang.m.yohobuy.com/info/index?id=34476\",\"content\":\"潮流资讯,新鲜贩售,YOHO!有货【逛】不停\"}}"
},
"src": "http://img13.static.yhbimg.com/article/2017/05/10/14/027e5dde46b6cdb26b3f63408cb7b57f0a.jpg?imageView2/{mode}/w/{width}/h/{height}",
"title": "测试新增资讯",
"url": "http://guang.m.yohobuy.com/info/index?id=34476&openby:yohobuy={\"action\":\"go.h5\",\"params\":{\"param\":{\"id\":\"34476\"},\"update_flag\":\"3640f0601a373ff35345b8c3f81346c2\",\"shareparam\":{\"id\":34476},\"share\":\"/guang/api/v1/share/guang\",\"id\":34476,\"type\":1,\"url\":\"http://guang.m.yohobuy.com/info/index\",\"islogin\":\"N\"}}",
"views_num": "9786"
}
]
},
"page": 1,
"total": 1,
"totalPage": 1
}
3、获取逛的详情内容 ## (更新)
获取逛的详情内容(/guang/service/*/article/getArticleContent)(h5接口)
请求参数
参数名称 | 参数类型 | 可否为空 | 示例 | 默认值 | 备注 |
---|---|---|---|---|---|
article_id | string | 否 | 105 | 0 | 文章id |
client_type | string | 否 | h5 | h5 | 客户端类型 |
注意,通用的头部没有列出。
请求示例
http://192.168.102.205:8080/gateway/guang/service/*/article/getArticleContent?article_id=105&client_type=h5
响应
code为200即为成功,否则是失败。
响应JSON格式如下所示:
{
"articleId": 34496,
"blocks":
[
{
"articleId": 34496,
"contentData":
{
"dialog": "template_dialog_text",
"template_name": "text",
"data":
{
"text": "
这是一个无敌的视频
"
},
"template_intro": "文本"
},
"createTime": 1495700046,
"id": 241990,
"orderBy": 0,
"templateKey": "text"
},
{
"articleId": 34496,
"contentData":
{
"size": "25.0",
"src": "http://flv01.static.yhbimg.com/goodsvideo/2017/05/25/17/035ad6b7ee09337ade7171b5f0cbc92eeb.wmv",
"cover_image": "http://flv01.static.yhbimg.com/goodsvideo/2017/05/25/17/035ad6b7ee09337ade7171b5f0cbc92eeb.wmv?vframe/jpg/offset/0",
"video_intro": "逛视频"
},
"createTime": 1495704398,
"id": 242000,
"orderBy": 0,
"templateKey": "video"
},
{
"articleId": 34496,
"contentData":
{
"size": "25.0",
"src": "http://flv01.static.yhbimg.com/goodsvideo/2017/05/26/09/03622cfa776f993ea6a6c8982af1637bfd.wmv",
"cover_image": "http://flv01.static.yhbimg.com/goodsvideo/2017/05/26/09/03622cfa776f993ea6a6c8982af1637bfd.wmv?vframe/jpg/offset/0",
"video_intro": "123333"
},
"createTime": 1495762675,
"id": 242024,
"orderBy": 0,
"templateKey": "video"
},
{
"articleId": 34496,
"contentData":
{
"template_name": "single_image",
"data":
[
{
"tagList":
[
],
"tagListGlobal":
[
],
"imgId": "",
"src": "http://img12.static.yhbimg.com/goodsimg/2017/05/25/16/020fb94adf7c227d4087198bf4532d4e3a.jpg?imageView2/{mode}/w/{width}/h/{height}",
"alt": "",
"width": 65,
"title": "",
"url": "http://www.yohobuy.com",
"height": 65
}
],
"template_intro": "单张大图"
},
"createTime": 1495700046,
"id": 241992,
"orderBy": 1,
"templateKey": "singleImage"
},
{
"articleId": 34496,
"contentData":
{
"template_name": "goods",
"data":
[
{
"src": "http://img11.static.yhbimg.com/goodsimg/2017/05/25/14/016b214baaf4ffb8a9c8fd2273cae771b7.jpg?imageMogr2/thumbnail/{width}x{height}/extent/{width}x{height}/background/d2hpdGU=/position/center/quality/90",
"product_skc": 681064,
"id": 512588388
}
],
"template_intro": "添加商品",
"dataGlobal":
[
]
},
"createTime": 1495700046,
"id": 241994,
"orderBy": 2,
"templateKey": "goods"
}
],
"clientType": "h5",
"recommend_products":
[
{
"is_global": "N",
"pic_url": "http://img11.static.yhbimg.com/goodsimg/2015/08/25/10/019b91d1073e275c76091e6f2d34d0706e.jpg?imageView2/{mode}/w/{width}/h/{height}",
"product_id": "241723",
"product_name": "Undefeated WARMUP TEE 简约LOGOT恤",
"product_skn": "51135767",
"sales_price": "11"
},
{
"is_global": "N",
"pic_url": "http://img11.static.yhbimg.com/goodsimg/2014/12/09/08/0173e0dbdf032d3669c5fc7c5deb9055c3.jpg?imageView2/{mode}/w/{width}/h/{height}",
"product_id": "136291",
"product_name": "鬼洗 恶魔地藏飞行员长袖T",
"product_skn": "51082303",
"sales_price": "11"
},
{
"is_global": "N",
"pic_url": "http://img10.static.yhbimg.com/goodsimg/2015/08/25/10/019fd1f77c0bca6a4bd3387fae23c14daf.jpg?imageView2/{mode}/w/{width}/h/{height}",
"product_id": "241735",
"product_name": "Undefeated 14 TIME TEE 撞色印花T恤",
"product_skn": "51135773",
"sales_price": "11"
},
{
"is_global": "N",
"pic_url": "http://img11.static.yhbimg.com/goodsimg/2016/01/08/02/01027d7e720e56493a3710c7fa271b3511.jpg?imageView2/{mode}/w/{width}/h/{height}",
"product_id": "186561",
"product_name": "2% X Miffy 荷叶边印花T恤",
"product_skn": "51108314",
"sales_price": "11"
},
{
"is_global": "N",
"pic_url": "http://img11.static.yhbimg.com/goodsimg/2015/03/09/07/0101c3bb6d31e5b3cac3f5769437a7b627.jpg?imageView2/{mode}/w/{width}/h/{height}",
"product_id": "159181",
"product_name": "GLAD NEWS 格纹拼接宽松型长袖TEE",
"product_skn": "51094687",
"sales_price": "11"
},
{
"is_global": "N",
"pic_url": "http://img12.static.yhbimg.com/goodsimg/2014/10/01/08/026dd1506811c490b5ba18e87c2b1cbccb.jpg?imageView2/{mode}/w/{width}/h/{height}",
"product_id": "117739",
"product_name": "The hundreds Forties T-shirt",
"product_skn": "51072568",
"sales_price": "11"
},
{
"is_global": "N",
"pic_url": "http://img12.static.yhbimg.com/goodsimg/2015/05/28/07/022ae5c850ae5f2a41183a61d2c7614cb3.jpg?imageView2/{mode}/w/{width}/h/{height}",
"product_id": "194485",
"product_name": "Accent Eleven 后背印花圆领短袖T恤",
"product_skn": "51112205",
"sales_price": "11"
},
{
"is_global": "N",
"pic_url": "http://img11.static.yhbimg.com/goodsimg/2014/03/05/09/01c155a7e42eed7b3a9d77a3d1a6474a7b.jpg?imageView2/{mode}/w/{width}/h/{height}",
"product_id": "69151",
"product_name": "Creamsoda 牛角袖T恤",
"product_skn": "51040480",
"sales_price": "11"
},
{
"is_global": "N",
"pic_url": "http://img10.static.yhbimg.com/goodsimg/2015/05/04/02/0156b3582e139c7b81a74c64f9533b6459.jpg?imageView2/{mode}/w/{width}/h/{height}",
"product_id": "177677",
"product_name": "VISIBLE SPORTS LIFE系列number 7短袖T恤",
"product_skn": "51103952",
"sales_price": "11"
},
{
"is_global": "N",
"pic_url": "",
"product_id": "80445",
"product_name": "STAYREAL 梦想起飞摇滚踢",
"product_skn": "51051702",
"sales_price": "11"
}
]
}