Commit 1fe329df by libai

测试

parent 8f2e5683
Showing with 53 additions and 3 deletions
...@@ -572,7 +572,8 @@ $(function(){ ...@@ -572,7 +572,8 @@ $(function(){
localStorage.canvasCode="phone" localStorage.canvasCode="phone"
var giftMd5=null; var giftMd5=null;
$(".room-bg").css("height",$(document).height()) $(".room-bg").css("height",$(document).height())
hotList() // hotList()
liveList(1)
$(".msg-btn").on("click",function(){ $(".msg-btn").on("click",function(){
if(localStorage.uid==undefined){ if(localStorage.uid==undefined){
loginPage() loginPage()
...@@ -852,8 +853,8 @@ $(function(){ ...@@ -852,8 +853,8 @@ $(function(){
return; return;
} }
giftList(1) giftList(1)
task(1)
myDiamond()
online() online()
WebSocketGo() WebSocketGo()
// object-fit:fill // object-fit:fill
...@@ -955,6 +956,53 @@ $(function(){ ...@@ -955,6 +956,53 @@ $(function(){
} }
}) })
} }
function liveList(e){
$.ajax({
url:$ip+'frontPage/queryLiveUsers',
data:{
pageNum:e,
pageSize:100,
uid:localStorage.uid || '',
token:localStorage.token || '',
pageID:localStorage.canvasCode
},
success:function(data){
console.log('直播列表',data)
if(data.code==-5008){
setTimeout(function() {
liveList(1)
}, 500);
return;
}
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
}else{
BottomRoomId=data.roomList[i+1].roomId
}
if(i==0){
topRoomId=data.roomList[data.roomList.length-1].roomId
}else{
topRoomId=data.roomList[i-1].roomId
}
if(data.roomList.length==1){
topRoomId=list.roomId
BottomRoomId=list.roomId
}
}
}
}
})
}
function hotList() { function hotList() {
$.ajax({ $.ajax({
url: $ip + 'room/hot', url: $ip + 'room/hot',
...@@ -979,11 +1027,13 @@ $(function(){ ...@@ -979,11 +1027,13 @@ $(function(){
}else{ }else{
BottomRoomId=data.ranklist[i+1].uid BottomRoomId=data.ranklist[i+1].uid
} }
if(i==0){ if(i==0){
topRoomId=data.ranklist[data.ranklist.length-1].uid topRoomId=data.ranklist[data.ranklist.length-1].uid
}else{ }else{
topRoomId=data.ranklist[i-1].uid topRoomId=data.ranklist[i-1].uid
} }
if(data.ranklist.length==1){ if(data.ranklist.length==1){
topRoomId=list.uid topRoomId=list.uid
BottomRoomId=list.uid BottomRoomId=list.uid
......
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