Commit afbc52be by libai

测试

parent 7dabb180
......@@ -1204,7 +1204,7 @@ $(function(){
pageID:localStorage.canvasCode
},
success:function(data){
console.log('直播列表',data)
// console.log('直播列表',data)
var newList=''
newList+='['
var j=0
......@@ -1232,7 +1232,6 @@ $(function(){
BottomRoomId=newList[0].roomId
}else{
BottomRoomId=newList[i+1].roomId
console.log(newList[i+1],list.roomId,sessionStorage.roomId)
}
//第一个
if(i==0){
......@@ -1252,8 +1251,6 @@ $(function(){
topRoomId=newList[0].roomId
BottomRoomId=newList[1].roomId
}
console.log(newList)
console.log(topRoomId,BottomRoomId)
// 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>';
......@@ -1301,7 +1298,7 @@ $(function(){
},
success:function(data){
console.log('人氣榜单',data)
// console.log('人氣榜单',data)
var html=[];
for(var i=0;i<data.rankList.length;i++){
var list=data.rankList[i]
......
......@@ -1102,7 +1102,7 @@ $(function(){
}
function moreMc(){
$.ajax({
url:$ip+'frontPage/queryLiveUsers',
url:$ip+'frontPage/queryLiveUsers/v2',
data:{
pageNum:1,
pageSize:3,
......@@ -1120,8 +1120,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="">';
......@@ -1136,7 +1136,7 @@ $(function(){
}
function liveList(e){
$.ajax({
url:$ip+'frontPage/queryLiveUsers',
url:$ip+'frontPage/queryLiveUsers/v2',
data:{
pageNum:e,
pageSize:100,
......@@ -1145,52 +1145,42 @@ $(function(){
pageID:localStorage.canvasCode
},
success:function(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)
}
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)
console.log('直播列表',data)
var html=[];
var j=0
for(var i=0;i<data.normalRoomList.length;i++){
var list=data.normalRoomList[i]
if(i%3==0&&i!=0){
if(data.vipRoomList[j]!=undefined){
list2=data.vipRoomList[j]
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="">';
if(list2.liveScope!=3)html+='<div class="hot-num-box"><img src="images/hot.png"><span>'+list2.onlinenum+'</span></div>';
// html+='<img class="live-li-face" src="images/layz.png" alt="">';
html+='<img class="live-li-face" src="https://zhibocdn.yabolive.net/comm'+list2.face.split("?")[0]+'?x-oss-process=image/resize,w_300" alt="">';
html+='<div class="live-shadow"></div>';
html+='<div class="live-bottom-box">';
html+='<p>'+list2.nickname+'</p>';
html+='<p>'+list2.introduce+'</p>';
html+='</div>';
html+='</li></a>';
}
if(data.roomList.length==1){
topRoomId=list.roomId
BottomRoomId=list.roomId
bottomNum=0
topNum=0
}
}
html+='<a href="room/liveRoom.html?roomId='+list.roomId+'&sound=1&v=2022112502&back=1"><li data-type="https://zhibocdn.yabolive.net/comm'+list.face.split("?")[0]+'?x-oss-process=image/resize,w_180">';
if(list.liveScope==3)html+='<img class="secret" src="images/Lock-no.png" alt="">';
if(list.liveScope!=3)html+='<div class="hot-num-box"><img src="images/hot.png"><span>'+list.onlinenum+'</span></div>';
// html+='<img class="live-li-face" src="images/layz.png" alt="">';
html+='<img class="live-li-face" src="https://zhibocdn.yabolive.net/comm'+list.face.split("?")[0]+'?x-oss-process=image/resize,w_300" alt="">';
html+='<div class="live-shadow"></div>';
html+='<div class="live-bottom-box">';
html+='<p>'+list.nickname+'</p>';
html+='<p>'+list.introduce+'</p>';
html+='</div>';
html+='</li></a>';
}
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>';
// $(".room-bg").append(html)
$(".box1 .live-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