Commit 6203cc6b by libai

测试

parent 666aa800
Showing with 32 additions and 32 deletions
......@@ -1224,42 +1224,42 @@ $(function(){
newList+="]"
newList=JSON.parse(newList)
console.log(newList)
// var bottomNum
// var topNum
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)
// }
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=data.roomList[data.roomList.length-1].roomId
// topNum=data.roomList.length-1
// }else{
// topRoomId=data.roomList[i-1].roomId
// topNum=(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(data.roomList.length==1){
// topRoomId=list.roomId
// BottomRoomId=list.roomId
// bottomNum=0
// topNum=0
// }
if(newList.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=newList[0].roomId
BottomRoomId=newList[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