Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
libai
/
footseen-large-website
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
15d24222
authored
Dec 21, 2022
by
libai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
测试
parent
09491d59
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
45 additions
and
37 deletions
mTest/index.html
mTest/room/liveRoom.html
mTest/index.html
View file @
15d24222
...
...
@@ -873,10 +873,13 @@ $(function(){
success
:
function
(
data
){
console
.
log
(
'直播列表'
,
data
)
var
html
=
[];
var
obj
=
{
}
var
j
=
0
for
(
var
i
=
0
;
i
<
data
.
normalRoomList
.
length
;
i
++
){
var
list
=
data
.
normalRoomList
[
i
]
console
.
log
(
i
)
obj
.
push
(
list
)
if
(
i
%
3
==
0
&&
i
!=
0
){
if
(
data
.
vipRoomList
[
j
]
!=
undefined
){
list2
=
data
.
vipRoomList
[
j
]
...
...
@@ -908,6 +911,7 @@ $(function(){
html
+=
'
<
/li></
a
>
';
}
$(".box1 .live-ul").html(html);
console.log(obj)
}
})
...
...
mTest/room/liveRoom.html
View file @
15d24222
...
...
@@ -1161,7 +1161,7 @@ $(function(){
}
function
moreMc
(){
$
.
ajax
({
url
:
$ip
+
'frontPage/queryLiveUsers'
,
url
:
$ip
+
'frontPage/queryLiveUsers
/v2
'
,
data
:{
pageNum
:
1
,
pageSize
:
3
,
...
...
@@ -1179,8 +1179,8 @@ $(function(){
}
var
html
=
''
;
for
(
var
i
=
0
;
i
<
3
;
i
++
){
if
(
data
.
r
oomList
[
i
]
==
undefined
)
break
;
var
list
=
data
.
r
oomList
[
i
]
if
(
data
.
normalR
oomList
[
i
]
==
undefined
)
break
;
var
list
=
data
.
normalR
oomList
[
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
=
""
>
';
...
...
@@ -1204,48 +1204,52 @@ $(function(){
pageID:localStorage.canvasCode
},
success:function(data){
//
console.log('
直播列表'
,
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
)
}
var
obj
=
{
}
// var bottomNum
// var topNum
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
)
}
// 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
(
data
.
roomList
.
length
==
1
){
topRoomId
=
list
.
roomId
BottomRoomId
=
list
.
roomId
bottomNum
=
0
topNum
=
0
}
// 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
// }
}
}
if
(
topRoomId
==
0
){
topRoomId
=
data
.
roomList
[
0
].
roomId
BottomRoomId
=
data
.
roomList
[
1
].
roomId
}
//
}
//
}
//
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>'
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment