https://api.weixin.qq.com/wxa/business/getliveinfo?access_token=
返回示例:
{
"errcode": 0, // 错误码,0代表成功,1代表未创建直播间
"errmsg": "ok" // 错误信息
"room_info":[{
"name":"直播房间名"
"roomid": 1,
"cover_img":"http://http:\/\/mmbiz.qpic.cn\/mmbiz_jpg\Rl1RuuhdstSfZa8EEljedAYcbtX3Ejpdl2et1tPAQ37bdicnxoVialDLCKKDcPBy8Iic0kCiaiaalXg3EbpNKoicrweQ\/0?wx_fmt=jpeg",
"share_img":"http://http:\/\/mmbiz.qpic.cn\/mmbiz_jpg\Rl1RuuhdstSfZa8EEljedAYcbtX3Ejpdl2et1tPAQ37bdicnxoVialDLCKKDcPBy8Iic0kCiaiaalXg3EbpNKoicrweQ\/0?wx_fmt=jpeg",
"live_status": 101,
"start_time": 1568128900,
"end_time": 1568131200,
"anchor_name":"里斯",
"goods":[{
"cover_img":"http://http:\/\/mmbiz.qpic.cn\/mmbiz_jpg\/Rl1RuuhdstSfZa8EEljedAYcbtX3Ejpdl2et1tPAQ37bdicnxoVialDLCKKDcPBy8Iic0kCiaiaalXg3EbpNKoicrweQ\/0?wx_fmt=jpeg",
"url":"pages/index/index.html",
"price":1100,
"name":"茶杯"}],
"total":1
}]
}
以上是小程序直播拉取直播列表的接口跟示例,现在要实现一个效果,就是拉取的直播列表,如果有房间在直播,当前列表就显示直播画面,这个怎么实现?