Commit b7b483d7 by libai

测试

parent 27aedfd5
Showing with 28 additions and 12 deletions
......@@ -211,27 +211,43 @@ $(function(){
},
success:function(data){
// console.log('直播列表',data)
hotList=data
if(data.code==-5008){
setTimeout(function() {
liveList(e,type)
}, 500);
return;
var newList=''
newList+='['
var j=0
for(var i=0;i<data.normalRoomList.length;i++){
var list=data.normalRoomList[i]
if(i%2==0&&i!=0){
if(data.vipRoomList[j]!=undefined){
list2=data.vipRoomList[j]
if(i==data.normalRoomList.length-1)newList+=(','+JSON.stringify(list2))
else newList+=(JSON.stringify(list2)+',')
j++;
}
}
if(i!=data.normalRoomList.length-1)newList+=(JSON.stringify(list)+',')
else newList+=(JSON.stringify(list))
}
newList+="]"
newList=JSON.parse(newList)
hotList=newList
console.log(newList)
var html=[];
if(type==1){
if($("body").width().toString().split("p")[0]>1440&&$("body").width().toString().split("p")[0]<2400) listNum=10
else if($("body").width().toString().split("p")[0]>2400)listNum=14
else listNum=8
}
else listNum=data.roomList.length
else listNum=newList.length
for(var i=0;i<listNum;i++){
if(data.roomList[i]==undefined)break;
var list=data.roomList[i]
if(newList[i]==undefined)break;
var list=newList[i]
html+='<li>';
html+='<a target="_blank" rel="opener" 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">';
else if(list.liveScope==3&&list.selfLock==0)html+='<img class="lock" src="images/Lock-no.png">';
html+='<a target="_blank" rel="opener" href="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-no.png?v=2022102001">';
else if(list.liveScope==3&&list.selfLock==0)html+='<img class="lock" src="images/Lock-no.png?v=2022102001">';
html+='<p class="introduce">'+list.introduce+'</p>'
html+='<div class="live-cursor-shadow"></div>';
html+='<img class="live-icon" src="images/front/live.webp" alt="美女直播">';
......
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