页面效果是酱紫的:
给了一套酱紫的数据,需要点击观看回放的时候跳转到不同的连接地址(reback字段)
[
{
"id": 1,
"name": "只楚街道",
"reback":"https://xxxxx.com/live/tvchat-1430991900?v=1615941114578#/",
"state": 2,
"time":"17:00"
},{
"id": 2,
"name": "黄务街道",
"reback":"https://xxxxx.com/live/tvchat-1086594299?v=1615941114576#/",
"state": 1,
"time":"08:00"
},{
"id": 3,
"name": "世回尧街道",
"reback":"https://xxxxx.com/live/tvchat-1763984871?v=1615957896611#/",
"state": 2,
"time":"16:30"
},{
"id": 4,
"name": "奇山街道",
"reback":"https://xxxxx.com/live/tvchat-854959668?v=1615959071432#/",
"state": 2,
"time":"17:30"
},{
"id": 5,
"name": "东山街道",
"reback":"https://wx.vzan.com/live/tvchat-1240552255?v=1615958886438#/",
"state": 0,
"time":"16:30"
},{
"id": 6,
"name": "向阳街道",
"reback":"https://wx.vzan.com/live/tvchat-2003005327?v=1615958886437#/",
"state": 2,
"time":"17:00"
},{
"id": 7,
"name": "毓璜顶街道",
"reback":"https://xxxxx.com/live/tvchat-682088726?v=1615958886436#/",
"state": 1,
"time":"08:00"
},{
"id": 8,
"name": "通伸街道",
"reback":"https://wx.vzan.com/live/tvchat-888381727?v=1615961123893#/",
"state": 0,
"time":"17:00"
},{
"id": 9,
"name": "白石街道",
"reback":"https://wx.vzan.com/live/tvchat-126635172?v=1615958886435#/",
"state": 2,
"time":"16:00"
},{
"id": 10,
"name": "凤凰台街道",
"reback":"https://wx.vzan.com/live/tvchat-758753804?v=1615958886434#/",
"state": 2,
"time":"19:00"
},{
"id": 11,
"name": "幸福街道",
"reback":"https://wx.vzan.com/live/tvchat-1678721526?v=1615958886433#/",
"state": 2,
"time":"16:30"
},{
"id": 12,
"name": "芝罘岛街道",
"reback":"https://xxxxx.com/live/tvchat-358512107?v=1615958886432#/",
"state": 2,
"time":"16:00"
}
]
HTML:
<ul class="list">
<li v-for="item in list" :key="item.id">
<!--vodShow(item.id)方法点击打开弹出层观看直播视频-->
<div @click="vodShow(item.id)">
<img src="images/img01.jpg">
<b>{{item.name}}</b>
<i class="stop" v-if="item.state == 0">已结束请看回放</i>
<i class="now" v-if="item.state == 1">会议进行中</i>
<i v-if="item.state == 2">会议预计{{item.time}}开始</i>
</div>
<!--GoUrl(item.reback)方法跳转外部链接地址-->
<p @click="GoUrl(item.reback)">观看回放</p>
</li>
</ul>
js:
GoUrl(event){
//console.log(event); //获取点击的参数(url地址)
window.open(event,"_blank"); //在新窗口打开外链接
window.location.href = event; //在本页面打开外部链接
},
//如果在data里是单独地址 UrlAddr:"http://wwww.xxxx.com"
GoUrl(){
window.open(this.UrlAddr,"_blank"); //在新窗口打开外链接
window.location.href = this.UrlAddr; //在本页面打开外部链接
}