Commit 15d24222 by libai

测试

parent 09491d59
Showing with 45 additions and 37 deletions
......@@ -873,10 +873,13 @@ $(function(){
success:function(data){
console.log('直播列表',data)
var html=[];
var obj={
}
var j=0
for(var i=0;i<data.normalRoomList.length;i++){
var list=data.normalRoomList[i]
console.log(i)
obj.push(list)
if(i%3==0&&i!=0){
if(data.vipRoomList[j]!=undefined){
list2=data.vipRoomList[j]
......@@ -908,6 +911,7 @@ $(function(){
html+='</li></a>';
}
$(".box1 .live-ul").html(html);
console.log(obj)
}
})
......
......@@ -1161,7 +1161,7 @@ $(function(){
}
function moreMc(){
$.ajax({
url:$ip+'frontPage/queryLiveUsers',
url:$ip+'frontPage/queryLiveUsers/v2',
data:{
pageNum:1,
pageSize:3,
......@@ -1179,8 +1179,8 @@ $(function(){
}
var html='';
for(var i=0;i<3;i++){
if(data.roomList[i]==undefined)break;
var list=data.roomList[i]
if(data.normalRoomList[i]==undefined)break;
var list=data.normalRoomList[i]
html+='<a href="liveRoom.html?roomId='+list.roomId+'&v=2022112502"><li>';
html+='<span class="more-mc-num">'+list.hotnum+'</span>';
html+='<img class="more-mc-face" src="https://zhibocdn.yabolive.net/comm'+list.face+'?x-oss-process=image/resize,w_150" alt="">';
......@@ -1204,48 +1204,52 @@ $(function(){
pageID:localStorage.canvasCode
},
success:function(data){
// console.log('直播列表',data)
console.log('直播列表',data)
if(data.code==-5008){
setTimeout(function() {
liveList(1)
}, 500);
return;
}
var bottomNum
var topNum
for(var i=0;i<data.roomList.length;i++){
var list=data.roomList[i]
// list.roomId
if(list.roomId==sessionStorage.roomId){
if(i+1==data.roomList.length){
BottomRoomId=data.roomList[0].roomId
bottomNum=0
}else{
BottomRoomId=data.roomList[i+1].roomId
bottomNum=(i+1)
}
var obj={
}
// var bottomNum
// var topNum
if(i==0){
topRoomId=data.roomList[data.roomList.length-1].roomId
topNum=data.roomList.length-1
}else{
topRoomId=data.roomList[i-1].roomId
topNum=(i-1)
}
// for(var i=0;i<data.roomList.length;i++){
// var list=data.roomList[i]
// // list.roomId
// if(list.roomId==sessionStorage.roomId){
// if(i+1==data.roomList.length){
// BottomRoomId=data.roomList[0].roomId
// bottomNum=0
// }else{
// BottomRoomId=data.roomList[i+1].roomId
// bottomNum=(i+1)
// }
if(data.roomList.length==1){
topRoomId=list.roomId
BottomRoomId=list.roomId
bottomNum=0
topNum=0
}
// if(i==0){
// topRoomId=data.roomList[data.roomList.length-1].roomId
// topNum=data.roomList.length-1
// }else{
// topRoomId=data.roomList[i-1].roomId
// topNum=(i-1)
// }
// if(data.roomList.length==1){
// topRoomId=list.roomId
// BottomRoomId=list.roomId
// bottomNum=0
// topNum=0
// }
}
}
if(topRoomId==0){
topRoomId=data.roomList[0].roomId
BottomRoomId=data.roomList[1].roomId
}
// }
// }
// if(topRoomId==0){
// topRoomId=data.roomList[0].roomId
// BottomRoomId=data.roomList[1].roomId
// }
// var html=[];
// html+='<div class="top-bg-box"> <img src="https://zhibocdn.yabolive.net/comm'+data.roomList[topNum].face+'?x-oss-process=image/resize,w_350"> </div>';
// html+='<div class="bottom-bg-box"> <img src="https://zhibocdn.yabolive.net/comm'+data.roomList[bottomNum].face+'?x-oss-process=image/resize,w_350"> </div>';
......
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