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
e12a435d
authored
Dec 21, 2022
by
libai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
测试
parent
91e6b8bb
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
56 additions
and
25 deletions
index.html
room/liveRoom.html
index.html
View file @
e12a435d
...
...
@@ -432,12 +432,11 @@ $(function(){
var
otherNum
=
0
var
otherMcArr
=
[]
console
.
log
(
data
.
roomList
)
for
(
var
i
=
0
;
i
<
data
.
roomList
.
length
;
i
++
){
var
j
=
Math
.
floor
(
Math
.
random
()
*
data
.
roomList
.
length
)
for
(
var
i
=
0
;
i
<
newList
.
length
;
i
++
){
var
j
=
Math
.
floor
(
Math
.
random
()
*
newList
.
length
)
var
roomLikeEnd
=
false
;
if
(
data
.
room
List
[
j
]
==
undefined
)
break
;
var
list
=
data
.
room
List
[
j
]
if
(
new
List
[
j
]
==
undefined
)
break
;
var
list
=
new
List
[
j
]
//已关注主播去重
for
(
var
t
=
0
;
t
<
likeMcArr
.
length
;
t
++
){
if
(
list
.
roomId
==
likeMcArr
[
t
]){
...
...
@@ -483,7 +482,7 @@ $(function(){
}
function
liveList
(
e
,
type
){
$
.
ajax
({
url
:
$ip
+
'frontPage/queryLiveUsers'
,
url
:
$ip
+
'frontPage/queryLiveUsers
/v2
'
,
data
:{
pageNum
:
e
,
pageSize
:
100
,
...
...
@@ -492,24 +491,37 @@ $(function(){
pageID
:
localStorage
.
canvasCode
},
success
:
function
(
data
){
// console.log('直播列表',data)
hotList
=
data
if
(
data
.
code
==-
5008
){
setTimeout
(
function
()
{
liveList
(
e
,
type
)
},
500
);
return
;
console
.
log
(
'直播列表'
,
data
)
var
newList
=
''
newList
+=
'['
var
j
=
0
for
(
var
i
=
0
;
i
<
data
.
normalRoomList
.
length
;
i
++
){
var
list
=
data
.
normalRoomList
[
i
]
if
(
i
!=
data
.
normalRoomList
.
length
-
1
)
newList
+=
(
JSON
.
stringify
(
list
)
+
','
)
else
newList
+=
(
JSON
.
stringify
(
list
))
if
(
i
%
3
==
0
&&
i
!=
0
){
if
(
data
.
vipRoomList
[
j
]
!=
undefined
){
list2
=
data
.
vipRoomList
[
j
]
if
(
i
==
data
.
normalRoomList
.
length
-
1
)
newList
+=
(
','
+
JSON
.
stringify
(
list2
))
else
newList
+=
(
JSON
.
stringify
(
list2
)
+
','
)
j
++
;
}
}
}
newList
+=
"]"
newList
=
JSON
.
parse
(
newList
)
hotList
=
newList
var
html
=
[];
if
(
type
==
1
){
if
(
$
(
"body"
).
width
().
toString
().
split
(
"p"
)[
0
]
>
1440
&&
$
(
"body"
).
width
().
toString
().
split
(
"p"
)[
0
]
<
2400
)
listNum
=
10
else
if
(
$
(
"body"
).
width
().
toString
().
split
(
"p"
)[
0
]
>
2400
)
listNum
=
14
else
listNum
=
8
}
else
listNum
=
data
.
room
List
.
length
else
listNum
=
new
List
.
length
for
(
var
i
=
0
;
i
<
listNum
;
i
++
){
if
(
data
.
room
List
[
i
]
==
undefined
)
break
;
var
list
=
data
.
room
List
[
i
]
if
(
new
List
[
i
]
==
undefined
)
break
;
var
list
=
new
List
[
i
]
html
+=
'
<
li
>
';
html+='
<
a
target
=
"_blank"
rel
=
"opener"
href
=
"room/liveRoom.html?roomId='+list.roomId+'"
><
div
style
=
"background: url(https://zhibocdn.yabolive.net/comm'+list.face.split('?')[0]+'?x-oss-process=image/resize,w_368) no-repeat;background-size: cover;"
class
=
"live-top-box"
>
';
if(list.liveScope==3&&list.selfLock==1)html+='
<
img
class
=
"lock"
src
=
"images/Lock-no.png?v=2022102001"
>
';
...
...
room/liveRoom.html
View file @
e12a435d
...
...
@@ -870,7 +870,7 @@ $(function () {
function liveListBtn(){
$(".next-mc").unbind("click").on("click",function(){
$.ajax({
url:$ip+'
frontPage
/
queryLiveUsers
',
url:$ip+'
frontPage
/
queryLiveUsers
/
v2
',
data:{
pageNum:1,
pageSize:100,
...
...
@@ -879,21 +879,40 @@ $(function () {
},
success:function(data){
//console.log('
直播列表
',data)
var newList=''
newList+='
[
'
var
j
=
0
for
(
var
i
=
0
;
i
<
data
.
normalRoomList
.
length
;
i
++
){
var
list
=
data
.
normalRoomList
[
i
]
if
(
i
!=
data
.
normalRoomList
.
length
-
1
)
newList
+=
(
JSON
.
stringify
(
list
)
+
','
)
else
newList
+=
(
JSON
.
stringify
(
list
))
if
(
i
%
3
==
0
&&
i
!=
0
){
if
(
data
.
vipRoomList
[
j
]
!=
undefined
){
list2
=
data
.
vipRoomList
[
j
]
if
(
i
==
data
.
normalRoomList
.
length
-
1
)
newList
+=
(
','
+
JSON
.
stringify
(
list2
))
else
newList
+=
(
JSON
.
stringify
(
list2
)
+
','
)
j
++
;
}
}
}
newList
+=
"]"
newList
=
JSON
.
parse
(
newList
)
var
html
=
[];
var
myNum
=
null
for
(
var
i
=
0
;
i
<
data
.
roomList
.
length
;
i
++
){
var
list
=
data
.
roomList
[
i
]
for
(
var
i
=
0
;
i
<
newList
.
length
;
i
++
){
var
list
=
newList
[
i
]
if
(
list
.
roomId
==
sessionStorage
.
roomId
){
myNum
=
i
continue
;
}
}
if
(
myNum
==
null
){
window
.
location
.
href
=
"liveRoom.html?roomId="
+
data
.
room
List
[
0
].
roomId
window
.
location
.
href
=
"liveRoom.html?roomId="
+
new
List
[
0
].
roomId
return
;
}
if
((
myNum
+
1
)
!=
data
.
roomList
.
length
)
window
.
location
.
href
=
"liveRoom.html?roomId="
+
data
.
room
List
[(
myNum
+
1
)].
roomId
else
window
.
location
.
href
=
"liveRoom.html?roomId="
+
data
.
room
List
[
0
].
roomId
if
((
myNum
+
1
)
!=
newList
.
length
)
window
.
location
.
href
=
"liveRoom.html?roomId="
+
new
List
[(
myNum
+
1
)].
roomId
else
window
.
location
.
href
=
"liveRoom.html?roomId="
+
new
List
[
0
].
roomId
}
})
})
...
...
@@ -1781,7 +1800,7 @@ $(function () {
}
function liveList(e){
$.ajax({
url:$ip+'
frontPage
/
queryLiveUsers
',
url:$ip+'
frontPage
/
queryLiveUsers
/
v2
',
data:{
pageNum:e,
pageSize:100,
...
...
@@ -1797,8 +1816,8 @@ $(function () {
return
;
}
var
html
=
[];
for
(
var
i
=
0
;
i
<
data
.
r
oomList
.
length
;
i
++
){
var
list
=
data
.
r
oomList
[
i
]
for
(
var
i
=
0
;
i
<
data
.
normalR
oomList
.
length
;
i
++
){
var
list
=
data
.
normalR
oomList
[
i
]
if
(
list
.
roomId
==
sessionStorage
.
roomId
)
continue
;
html
+=
'
<
a
title
=
'+keyEArr[Math.floor(Math.random()*200)]+'
href
=
"https://www.footseen.xyz/room/liveRoom.html?roomId='+list.roomId+'"
><
li
data
-
type
=
"https://zhibocdn.yabolive.net/comm'+list.face.split('?')[0]+'?x-oss-process=image/resize,w_268"
style
=
"background:#E5E5E5;background-size: cover;"
>
';
if(list.liveScope==3&&list.selfLock==1)html+='
<
img
class
=
"lock"
src
=
"../images/Lock-no.png?v=2022102001"
>
';
...
...
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