Commit 2442cbed by libai

测试

parent 64446a40
Showing with 38 additions and 8 deletions
......@@ -633,7 +633,7 @@ html * {
position: relative;
overflow: hidden;
}
.like-ul li:nth-child(4n) {
.like-ul > a:nth-child(4n) li {
margin-right: 0;
}
.like-shadow {
......
......@@ -672,9 +672,12 @@
position: relative;
overflow: hidden;
}
li:nth-child(4n){
>a:nth-child(4n){
li{
margin-right: 0;
}
}
}
.like-shadow{
......
......@@ -656,11 +656,12 @@ $(function(){
// console.log('拉取關注列表',data)
var html=[];
var liveNum=0
var likeMcArr=[]
for(var i=0;i<data.rooms.length;i++){
var list=data.rooms[i]
if(list.liveState!=1)continue;
liveNum++
likeMcArr.push(list.uid)
html+='<a href="https://www.footseen.xyz/room/liveRoom.html?roomId='+list.uid+'"><li style="background: url(https://zhibocdn.yabolive.net/comm'+list.face+'?x-oss-process=image/resize,w_368) no-repeat;background-size: cover;">';
if(list.liveScope==3&&list.selfLock==1)html+='<img class="lock" src="images/Lock-ok.png">';
else if(list.liveScope==3&&list.selfLock==0)html+='<img class="lock" src="images/Lock-no.png">';
......@@ -673,15 +674,38 @@ $(function(){
html+='<div class="like-no-box"><img src="images/front/no-icon.png"><p>暫無追蹤的在線主播</p></div>'
}
$(".like-ul").html(html);
if(liveNum==0){
console.log(likeMcArr)
if(liveNum<5){
$(".other-like-mc").show()
setTimeout(function(){
var data=hotList
var html=[];
for(var i=0;i<4;i++){
if(data.roomList[i]==undefined)break;
var list=data.roomList[i]
var otherNum=0
var otherMcArr=[]
console.log(data.roomList)
for(var i=0;i<data.roomList.length;i++){
var j=Math.floor(Math.random()*data.roomList.length)
var roomLikeEnd=false;
if(data.roomList[j]==undefined)break;
var list=data.roomList[j]
//已关注主播去重
for(var t=0;t<likeMcArr.length;t++){
if(list.roomId==likeMcArr[t]){
roomLikeEnd=true;
// i--;
continue;
}
}
//已显示主播去重
for(var y=0;y<otherMcArr.length;y++){
if(list.roomId==otherMcArr[y]){
roomLikeEnd=true;
i--;
continue
}
}
if(roomLikeEnd==true)continue;
html+='<li>';
html+='<a href="https://www.footseen.xyz/room/liveRoom.html?roomId='+list.roomId+'"><div style="background: url(https://zhibocdn.yabolive.net/comm'+list.face.split('?')[0]+'?x-oss-process=image/resize,w_368) no-repeat;background-size: cover;" class="live-top-box">';
if(list.liveScope==3&&list.selfLock==1)html+='<img class="lock" src="images/Lock-ok.png">';
......@@ -695,6 +719,9 @@ $(function(){
html+='</div>';
html+='<div class="live-name-box">'+list.nickname+'</div></a>';
html+='</li>';
otherMcArr.push(list.roomId)
otherNum++
if(otherNum>4)break;
}
$(".other-like-ul").html(html);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment