Commit 9e11cb8d by libai

测试

parent a34acbe9
Showing with 24 additions and 8 deletions
......@@ -875,18 +875,18 @@ $(function(){
console.log('直播列表',data)
var html=[];
var obj=''
obj+=(JSON.stringify(data.normalRoomList))
obj+="["
var j=0
for(var i=0;i<data.normalRoomList.length;i++){
var list=data.normalRoomList[i]
obj+=(JSON.stringify(list))
if(i!=data.normalRoomList.length-1)obj+=(JSON.stringify(list)+',')
else obj+=(JSON.stringify(list))
if(i%3==0&&i!=0){
if(data.vipRoomList[j]!=undefined){
list2=data.vipRoomList[j]
obj+=(JSON.stringify(list2))
if(i==data.normalRoomList.length-1)obj+=(','+JSON.stringify(list2))
else obj+=(JSON.stringify(list2)+',')
j++;
html+='<a href="room/liveRoom.html?roomId='+list2.roomId+'&sound=1&v=2022112502&back=1"><li data-type="https://zhibocdn.yabolive.net/comm'+list2.face.split("?")[0]+'?x-oss-process=image/resize,w_180">';
if(list2.liveScope==3)html+='<img class="secret" src="images/Lock-no.png" alt="">';
......@@ -915,7 +915,7 @@ $(function(){
html+='</li></a>';
}
$(".box1 .live-ul").html(html);
console.log(obj)
obj+="]"
console.log(JSON.parse(obj))
}
})
......
......@@ -1211,9 +1211,25 @@ $(function(){
}, 500);
return;
}
var obj={
var newList=''
newList+='['
var j=0
for(var i=0;i<data.normalRoomList.length;i++){
var list=data.normalRoomList[i]
if(i!=data.normalRoomList.length-1)newList+=(JSON.stringify(list)+',')
else newList+=(JSON.stringify(list))
if(i%3==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++;
}
}
}
newList+="]"
newList=JSON.parse(newList)
console.log(newList)
// var bottomNum
// var topNum
......
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