Commit afbc52be by libai

测试

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