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
91e6b8bb
authored
Dec 21, 2022
by
libai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
测试
parent
97de0e43
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
41 additions
and
25 deletions
mobile/room/liveRoom.html
mobile/room/liveRoom.html
View file @
91e6b8bb
...
...
@@ -1145,46 +1145,62 @@ $(function(){
pageID:localStorage.canvasCode
},
success:function(data){
console.log('
直播列表'
,
data
)
var
html
=
[];
// 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
++
;
html
+=
'
<
a
href
=
"room/liveRoom.html?roomId='+list2.roomId+'&sound=1&v=2022112502&back=1"
><
li
data
-
type
=
"https://zhibocdn.yabolive.net/comm'+list2.face.split("
?
")[0]+'?x-oss-process=image/resize,w_180"
>
';
if(list2.liveScope==3)html+='
<
img
class
=
"secret"
src
=
"images/Lock-no.png"
alt
=
""
>
';
if(list2.liveScope!=3)html+='
<
div
class
=
"hot-num-box"
><
img
src
=
"images/hot.png"
><
span
>
'+list2.onlinenum+'
<
/span></
div
>
';
// html+='
<
img
class
=
"live-li-face"
src
=
"images/layz.png"
alt
=
""
>
';
html+='
<
img
class
=
"live-li-face"
src
=
"https://zhibocdn.yabolive.net/comm'+list2.face.split("
?
")[0]+'?x-oss-process=image/resize,w_300"
alt
=
""
>
';
html+='
<
div
class
=
"live-shadow"
><
/div>'
;
html
+=
'
<
div
class
=
"live-bottom-box"
>
';
html+='
<
p
>
'+list2.nickname+'
<
/p>'
;
html
+=
'
<
p
>
'+list2.introduce+'
<
/p>'
;
html
+=
'
<
/div>'
;
html
+=
'
<
/li></
a
>
';
}
}
}
newList
+=
"]"
newList
=
JSON
.
parse
(
newList
)
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
}
else
{
BottomRoomId
=
newList
[
i
+
1
].
roomId
}
//第一个
if
(
i
==
0
){
topRoomId
=
newList
[
newList
.
length
-
1
].
roomId
}
else
{
topRoomId
=
newList
[
i
-
1
].
roomId
}
//只有一个
if
(
newList
.
length
==
1
){
topRoomId
=
list
.
roomId
BottomRoomId
=
list
.
roomId
}
}
html+='
<
a
href
=
"room/liveRoom.html?roomId='+list.roomId+'&sound=1&v=2022112502&back=1"
><
li
data
-
type
=
"https://zhibocdn.yabolive.net/comm'+list.face.split("
?
")[0]+'?x-oss-process=image/resize,w_180"
>
';
if(list.liveScope==3)html+='
<
img
class
=
"secret"
src
=
"images/Lock-no.png"
alt
=
""
>
';
if(list.liveScope!=3)html+='
<
div
class
=
"hot-num-box"
><
img
src
=
"images/hot.png"
><
span
>
'+list.onlinenum+'
<
/span></
div
>
';
// html+='
<
img
class
=
"live-li-face"
src
=
"images/layz.png"
alt
=
""
>
';
html+='
<
img
class
=
"live-li-face"
src
=
"https://zhibocdn.yabolive.net/comm'+list.face.split("
?
")[0]+'?x-oss-process=image/resize,w_300"
alt
=
""
>
';
html+='
<
div
class
=
"live-shadow"
><
/div>'
;
html
+=
'
<
div
class
=
"live-bottom-box"
>
';
html+='
<
p
>
'+list.nickname+'
<
/p>'
;
html
+=
'
<
p
>
'+list.introduce+'
<
/p>'
;
html
+=
'
<
/div>'
;
html
+=
'
<
/li></
a
>
';
}
$(".box1 .live-ul").html(html);
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>'
;
// $(".room-bg").append(html)
}
})
}
function
hotList
()
{
$
.
ajax
({
url
:
$ip
+
'room/hot'
,
...
...
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