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
9d4907a8
authored
Jul 01, 2022
by
libai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
测试
parent
de61ad62
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
104 additions
and
102 deletions
room/liveRoom.html
room/liveRoom.html
View file @
9d4907a8
...
...
@@ -455,6 +455,110 @@ $(function () {
var
sendType
=
1
;
var
guardShowOk
=
null
;
var
richType
=
1
$
.
ajax
({
url
:
$ip
+
'room/enterRoom'
,
data
:
{
uid
:
localStorage
.
uid
,
token
:
localStorage
.
token
,
// pass: true,
roomId
:
sessionStorage
.
roomId
,
pageID
:
localStorage
.
canvasCode
,
},
async
:
false
,
success
:
function
(
data
)
{
// if(data.code!=1){
// window.location.href='../index.html'
// }
$
(
"title"
).
text
(
data
.
room
.
roomName
+
'的直播間-footseen直播間'
)
//console.log('进入直播间', data)
if
(
data
.
code
==-
20060
){
alert
(
"您已被移出直播,暫時不能進入"
)
window
.
location
.
href
=
"../index.html"
return
;
}
var
roomList
=
data
.
room
;
flowUrl
=
data
.
pullFlowUrl
$
(
".mc-material-face,.gurad-layer-face"
).
attr
(
"src"
,
"https://zhibocdn.yabolive.net/comm"
+
roomList
.
face
+
"?x-oss-process=image/resize,w_40"
)
var
html
=
[];
html
+=
'
<
span
class
=
"mc-name"
>
' + roomList.roomName + '
<
/span>'
;
if
(
roomList
.
isLike
==
0
)
html
+=
'
<
div
data
-
type
=
"'+roomList.uid+'"
class
=
"like-btn"
><
/div> '
;
html
+=
'
<
span
class
=
"material-span-other1"
>
主播資料
<
/span>'
;
html
+=
'
<
span
class
=
"material-span-other2"
>
相冊
(
'+data.roomOtherInfo.topicCount+'
)
<
/span>'
;
html
+=
'
<
span
class
=
"material-span-other3"
>
' + roomList.introduce + '
<
/span>'
;
$
(
".mc-material-content"
).
html
(
html
);
if
(
data
.
room
.
liveState
==
1
){
online
()
var
promise
=
document
.
querySelector
(
'video'
).
play
();
if
(
promise
!==
undefined
)
{
promise
.
then
(
_
=>
{
var
html
=
[];
html
+=
'
<
video
controls
webkit
-
playsinline
=
"true"
playsinline
=
"true"
autoplay
=
""
playsinline
=
"true"
class
=
"live-video"
src
=
""
id
=
"videoElement"
loop
=
""
><
/video>'
;
$
(
".live-content-box-left-roombox"
).
html
(
html
)
flvPlay
(
data
.
pullFlowUrl
)
// Autoplay started!
}).
catch
(
error
=>
{
var
myVideo
=
document
.
querySelector
(
".live-video"
)
var
html
=
[];
html
+=
'
<
video
controls
webkit
-
playsinline
=
"true"
muted
playsinline
=
"true"
autoplay
=
""
playsinline
=
"true"
class
=
"live-video"
src
=
""
id
=
"videoElement"
loop
=
""
><
/video>'
;
$
(
".live-content-box-left-roombox"
).
html
(
html
)
flvPlay
(
data
.
pullFlowUrl
)
// Autoplay was prevented.
// Show a "Play" button so that user can start playback.
});
}
}
else
{
$
(
".live-content-box-left-roombox"
).
append
(
"
<
img
class
=
'mc-out'
src
=
'images/mc-out.png'
>
")
}
$("
.
hot
-
box
>
span
").text(data.room.hotResult.score)
$("
.
rich
-
box
>
span
").text(data.roomOtherInfo.charm)
$("
.
mc
-
tips
div
").text(data.roomBaseInfo.sign.replace("
Firefly
Live
","
Footseen
"
))
var
html
=
[];
html
+=
'
<
div
><
span
>
暱稱
:
<
/span> ' + data.roomBaseInfo.nickname + '</
div
>
';
html += '
<
div
><
span
>
ID
:
<
/span> ' + data.roomBaseInfo.uid + '</
div
>
';
if (data.roomBaseInfo.addr != '') html += '
<
div
><
span
>
來自
:
<
/span> ' + data.roomBaseInfo.addr + '</
div
>
';
else html += '
<
div
><
span
>
來自
:
<
/span> 未知</
div
>
';
html += '
<
div
><
span
>
年齡
:
<
/span> ' + data.roomBaseInfo.age + '</
div
>
';
html += '
<
div
><
span
>
身高
:
<
/span> ' + data.roomBaseInfo.height + 'cm</
div
>
';
html += '
<
div
><
span
>
體重
:
<
/span> ' + data.roomBaseInfo.weight + 'kg</
div
>
';
html += '
<
div
><
span
>
星座
:
<
/span> ' + data.roomBaseInfo.constellation + '</
div
>
';
html += '
<
div
><
span
>
學歷
:
<
/span> ' + data.roomBaseInfo.culture + '</
div
>
';
html += '
<
div
><
span
>
職業
:
<
/span> ' + data.roomBaseInfo.work + '</
div
>
';
$(".mc-more-means").html(html)
var html = [];
html += '
<
p
><
span
>
收穫羽毛
:
<
/span> <img src="images/
rich
-
icon
.
png
" alt="
"
>
' + data.roomOtherInfo.charm + '
<
/p>'
;
html
+=
'
<
p
><
span
>
贈出寶石
:
<
/span> <img style="margin-top: -4px;" src="images/
diamond
.
png
" alt="
"
>
' + data.roomOtherInfo.rich + '
<
/p>'
;
$
(
".mc-rich-p"
).
html
(
html
);
var
html
=
[];
if
(
data
.
roomOtherInfo
.
motoring
.
resource
!=
undefined
)
html
+=
'
<
li
><
img
src
=
"https://zhibocdn.yabolive.net/comm' + data.roomOtherInfo.motoring.resource + '?x-oss-process=image/resize,w_45"
alt
=
""
><
/li>'
;
$
(
".mc-car-ul"
).
html
(
html
);
var
html
=
[];
for
(
var
i
=
0
;
i
<
data
.
roomOtherInfo
.
medals
.
length
;
i
++
){
var
list
=
data
.
roomOtherInfo
.
medals
[
i
]
html
+=
'
<
img
src
=
"https://zhibocdn.yabolive.net/comm' + data.roomOtherInfo.medals[i] + '?x-oss-process=image/resize,w_45"
alt
=
""
>
';
}
$(".mc-title-box >span").html(html);
$(".material-span-other1 ,.material-span-other2").unbind("click").on("click",function(){
scrollTo($(".mc-means-box"),200)
})
$(".like-btn").unbind("click").on("click",function(){
if(localStorage.uid==undefined){
loginLayer()
return;
}
var _self=$(this);
mcLike(_self.attr("data-type"),1)
// mcLike(_self.attr("data-type"))
})
},
error: function (msg) {
// window.location.href = '
..
/
index
.
html
'
}
})
loginGo()
hotList()
richGuard(0)
...
...
@@ -607,108 +711,6 @@ $(function () {
$(".guard-rule span").on("click",function(){
layer.closeAll()
})
$
.
ajax
({
url
:
$ip
+
'room/enterRoom'
,
data
:
{
uid
:
localStorage
.
uid
,
token
:
localStorage
.
token
,
// pass: true,
roomId
:
sessionStorage
.
roomId
,
pageID
:
localStorage
.
canvasCode
,
},
success
:
function
(
data
)
{
// if(data.code!=1){
// window.location.href='../index.html'
// }
$
(
"title"
).
text
(
data
.
room
.
roomName
+
'的直播間-footseen直播間'
)
//console.log('进入直播间', data)
if
(
data
.
code
==-
20060
){
alert
(
"您已被移出直播,暫時不能進入"
)
window
.
location
.
href
=
"../index.html"
return
;
}
var
roomList
=
data
.
room
;
flowUrl
=
data
.
pullFlowUrl
$
(
".mc-material-face,.gurad-layer-face"
).
attr
(
"src"
,
"https://zhibocdn.yabolive.net/comm"
+
roomList
.
face
+
"?x-oss-process=image/resize,w_40"
)
var
html
=
[];
html
+=
'
<
span
class
=
"mc-name"
>
' + roomList.roomName + '
<
/span>'
;
if
(
roomList
.
isLike
==
0
)
html
+=
'
<
div
data
-
type
=
"'+roomList.uid+'"
class
=
"like-btn"
><
/div> '
;
html
+=
'
<
span
class
=
"material-span-other1"
>
主播資料
<
/span>'
;
html
+=
'
<
span
class
=
"material-span-other2"
>
相冊
(
'+data.roomOtherInfo.topicCount+'
)
<
/span>'
;
html
+=
'
<
span
class
=
"material-span-other3"
>
' + roomList.introduce + '
<
/span>'
;
$
(
".mc-material-content"
).
html
(
html
);
if
(
data
.
room
.
liveState
==
1
){
online
()
var
promise
=
document
.
querySelector
(
'video'
).
play
();
if
(
promise
!==
undefined
)
{
promise
.
then
(
_
=>
{
var
html
=
[];
html
+=
'
<
video
controls
webkit
-
playsinline
=
"true"
playsinline
=
"true"
autoplay
=
""
playsinline
=
"true"
class
=
"live-video"
src
=
""
id
=
"videoElement"
loop
=
""
><
/video>'
;
$
(
".live-content-box-left-roombox"
).
html
(
html
)
flvPlay
(
data
.
pullFlowUrl
)
// Autoplay started!
}).
catch
(
error
=>
{
var
myVideo
=
document
.
querySelector
(
".live-video"
)
var
html
=
[];
html
+=
'
<
video
controls
webkit
-
playsinline
=
"true"
muted
playsinline
=
"true"
autoplay
=
""
playsinline
=
"true"
class
=
"live-video"
src
=
""
id
=
"videoElement"
loop
=
""
><
/video>'
;
$
(
".live-content-box-left-roombox"
).
html
(
html
)
flvPlay
(
data
.
pullFlowUrl
)
// Autoplay was prevented.
// Show a "Play" button so that user can start playback.
});
}
}
else
{
$
(
".live-content-box-left-roombox"
).
append
(
"
<
img
class
=
'mc-out'
src
=
'images/mc-out.png'
>
")
}
$("
.
hot
-
box
>
span
").text(data.room.hotResult.score)
$("
.
rich
-
box
>
span
").text(data.roomOtherInfo.charm)
$("
.
mc
-
tips
div
").text(data.roomBaseInfo.sign.replace("
Firefly
Live
","
Footseen
"
))
var
html
=
[];
html
+=
'
<
div
><
span
>
暱稱
:
<
/span> ' + data.roomBaseInfo.nickname + '</
div
>
';
html += '
<
div
><
span
>
ID
:
<
/span> ' + data.roomBaseInfo.uid + '</
div
>
';
if (data.roomBaseInfo.addr != '') html += '
<
div
><
span
>
來自
:
<
/span> ' + data.roomBaseInfo.addr + '</
div
>
';
else html += '
<
div
><
span
>
來自
:
<
/span> 未知</
div
>
';
html += '
<
div
><
span
>
年齡
:
<
/span> ' + data.roomBaseInfo.age + '</
div
>
';
html += '
<
div
><
span
>
身高
:
<
/span> ' + data.roomBaseInfo.height + 'cm</
div
>
';
html += '
<
div
><
span
>
體重
:
<
/span> ' + data.roomBaseInfo.weight + 'kg</
div
>
';
html += '
<
div
><
span
>
星座
:
<
/span> ' + data.roomBaseInfo.constellation + '</
div
>
';
html += '
<
div
><
span
>
學歷
:
<
/span> ' + data.roomBaseInfo.culture + '</
div
>
';
html += '
<
div
><
span
>
職業
:
<
/span> ' + data.roomBaseInfo.work + '</
div
>
';
$(".mc-more-means").html(html)
var html = [];
html += '
<
p
><
span
>
收穫羽毛
:
<
/span> <img src="images/
rich
-
icon
.
png
" alt="
"
>
' + data.roomOtherInfo.charm + '
<
/p>'
;
html
+=
'
<
p
><
span
>
贈出寶石
:
<
/span> <img style="margin-top: -4px;" src="images/
diamond
.
png
" alt="
"
>
' + data.roomOtherInfo.rich + '
<
/p>'
;
$
(
".mc-rich-p"
).
html
(
html
);
var
html
=
[];
if
(
data
.
roomOtherInfo
.
motoring
.
resource
!=
undefined
)
html
+=
'
<
li
><
img
src
=
"https://zhibocdn.yabolive.net/comm' + data.roomOtherInfo.motoring.resource + '?x-oss-process=image/resize,w_45"
alt
=
""
><
/li>'
;
$
(
".mc-car-ul"
).
html
(
html
);
var
html
=
[];
for
(
var
i
=
0
;
i
<
data
.
roomOtherInfo
.
medals
.
length
;
i
++
){
var
list
=
data
.
roomOtherInfo
.
medals
[
i
]
html
+=
'
<
img
src
=
"https://zhibocdn.yabolive.net/comm' + data.roomOtherInfo.medals[i] + '?x-oss-process=image/resize,w_45"
alt
=
""
>
';
}
$(".mc-title-box >span").html(html);
$(".material-span-other1 ,.material-span-other2").unbind("click").on("click",function(){
scrollTo($(".mc-means-box"),200)
})
$(".like-btn").unbind("click").on("click",function(){
if(localStorage.uid==undefined){
loginLayer()
return;
}
var _self=$(this);
mcLike(_self.attr("data-type"),1)
// mcLike(_self.attr("data-type"))
})
},
error: function (msg) {
// window.location.href = '
..
/
index
.
html
'
}
})
function activeGet(){
$.ajax({
...
...
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