Commit b4054daa by libai

测试

parent d11bf2e1
Showing with 5 additions and 11 deletions
......@@ -1223,34 +1223,26 @@ $(function(){
}
newList+="]"
newList=JSON.parse(newList)
var bottomNum
var topNum
for(var i=0;i<newList.length;i++){
var list=newList[i]
// list.roomId
if(list.roomId==sessionStorage.roomId){
//最后一个
if(i+1==newList.length){
BottomRoomId=newList[0].roomId
bottomNum=0
}else{
BottomRoomId=newList[i+1].roomId
bottomNum=(i+1)
}
//第一个
if(i==0){
topRoomId=newList[newList.length-1].roomId
topNum=newList.length-1
}else{
topRoomId=newList[i-1].roomId
topNum=(i-1)
}
//只有一个
if(newList.length==1){
topRoomId=list.roomId
BottomRoomId=list.roomId
bottomNum=0
topNum=0
}
}
......@@ -1259,6 +1251,8 @@ $(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>';
......
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