Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
yohobuywap-node
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Plain Diff
Browse Files
Authored by
ccbikai
2016-08-23 15:14:08 +0800
Commit
8a565e99d998c91378ce6db250e9e41901b2e080
2 parents
6a660d9d
14ed64d4
Merge branch 'feature/live' of git.yoho.cn:fe/yohobuywap-node into feature/live
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
21 additions
and
8 deletions
apps/activity/models/live.js
apps/activity/views/action/live/play.hbs
doraemon/views/layout.hbs
public/scss/layout/_common.css
apps/activity/models/live.js
View file @
8a565e9
...
...
@@ -117,9 +117,13 @@ const fetchReplayInfo = (videoID) => {
d
.
logo
=
helpers
.
image
(
d
.
logo
,
70
,
70
);
d
.
pic
=
helpers
.
image
(
d
.
pic
,
640
,
968
);
d
.
master_pic
=
helpers
.
image
(
d
.
master_pic
,
180
,
180
);
d
.
living
=
3
;
// 自定义的重播 状态
d
.
humanTime
=
_formatTime
(
data
.
living_start_time
*
1000
);
d
.
video_src
=
d
.
url
;
// 自定义数据
d
.
living
=
3
;
// 重播 状态
d
.
canPlay
=
true
;
d
.
atEnd
=
false
;
}
return
result
;
...
...
@@ -141,6 +145,11 @@ const fetchLiveInfo = (roomID) => {
d
.
master_pic
=
helpers
.
image
(
d
.
master_pic
,
180
,
180
);
d
.
humanTime
=
_formatTime
(
d
.
living_start_time
*
1000
);
d
.
video_src
=
d
.
hls_downstream_address
;
// 自定义的数据
d
.
canPlay
=
d
.
living
===
1
;
d
.
notBegin
=
d
.
living
===
0
;
d
.
atEnd
=
d
.
living
===
2
;
}
return
result
;
...
...
apps/activity/views/action/live/play.hbs
View file @
8a565e9
{{! 直播 播放页 }}
<div
class=
"live-wrapper"
>
{{#
canPlay
}}
<div
class=
"live-main"
>
<!-- 视频部分start-->
<!--http://live-hls-pili.1iptv.com/meipai-live/57651bb975b6255acc01444c.m3u8-->
<section
id=
"live_container"
class=
"live-video-main"
style=
"
height:28.4rem;
background-image: url(/img/activity/live/live/video_cover.jpg);"
>
<section
id=
"live_container"
class=
"live-video-main"
style=
"background-image: url(/img/activity/live/live/video_cover.jpg);"
>
<div
id=
"video_container"
class=
"video_player"
data-video=
"
{{
video_src
}}
"
>
</div>
<div
class=
"live-loading-container"
>
...
...
@@ -61,9 +62,10 @@
</a>
</section>
</div>
{{/
canPlay
}}
{{
!直播已结束
}}
<div
id=
"live-state-end"
class=
"live-state is-no-start
{{#
isE
qual
living
2
}}
show
{{/
isEqual
}}
"
style=
"background-image: url('
{{
pic
}}
');"
>
<div
id=
"live-state-end"
class=
"live-state is-no-start
{{#
isE
nd
}}
show
{{/
isEnd
}}
"
style=
"background-image: url('
{{
pic
}}
');"
>
<div
class=
"live-state__txt"
>
直播已结束
</div>
<ul
class=
"live-state-info"
>
<li
class=
"audience text-center"
>
...
...
@@ -92,7 +94,8 @@
</div>
{{
!直播未开始
}}
<div
class=
"live-state is-no-start
{{#
isEqual
living
1
}}
show
{{/
isEqual
}}
"
style=
"background-image: url('
{{
pic
}}
');"
>
{{#
notBegin
}}
<div
class=
"live-state is-no-start show"
style=
"background-image: url('
{{
pic
}}
');"
>
<div
class=
"live-state__txt"
>
直播未开始
</div>
<div
class=
"live-state-info text-center"
>
<img
src=
"
{{
master_pic
}}
"
alt=
""
class=
"avatar"
><br>
...
...
@@ -104,6 +107,7 @@
<i
class=
"iconfont"
>
&
#xe623
</i>
</a>
</div>
{{/
notBegin
}}
</div>
<script>
var live_start_time =
{{
live_start_time
}}
;//该直播开始时间
...
...
doraemon/views/layout.hbs
View file @
8a565e9
...
...
@@ -18,7 +18,7 @@
(
function
(
d
,
c
){
var
e
=
d
.
documentElement
,
a
=
"orientationchange"
in
window
?
"orientationchange"
:
"resize"
,
b
=
function
(){
var
f
=
e
.
clientWidth
;
if
(
!
f
){
return
}
if
(
f
>=
640
){
e
.
style
.
fontSize
=
"40px"
}
else
{
e
.
style
.
fontSize
=
40
*
(
f
/
640
)
+
"px"
}};
if
(
!
d
.
addEventListener
){
return
}
b
();
c
.
addEventListener
(
a
,
b
,
false
);
d
.
addEventListener
(
"DOMContentLoaded"
,
b
,
false
)})(
document
,
window
);
</script>
{{#if
devEnv
}}
<link
rel=
"stylesheet"
href=
"//
localhost:5001
/css/index.css"
>
<link
rel=
"stylesheet"
href=
"//
172.16.9.133:5002
/css/index.css"
>
{{^}}
<link
rel=
"stylesheet"
href=
"//cdn.yoho.cn/m-yohobuy-node/
{{
version
}}
/index.css"
>
{{/if}}
...
...
@@ -41,8 +41,8 @@
<script
type=
"text/javascript"
src=
"//res.wx.qq.com/open/js/jweixin-1.1.0.js"
></script>
{{/
wechatShare
}}
{{#if
devEnv
}}
<script
src=
"//localhost:5001/libs.js"
></script>
<script
src=
"//localhost:5001/
{{
module
}}
.
{{
page
}}
.js"
></script>
<script
src=
"//172.16.9.133:5002/libs.js"
></script>
<script
src=
"//172.16.9.133:5002/
{{
module
}}
.
{{
page
}}
.js"
></script>
{{^}}
<script
src=
"//cdn.yoho.cn/m-yohobuy-node/
{{
version
}}
/libs.js"
></script>
<script
src=
"//cdn.yoho.cn/m-yohobuy-node/
{{
version
}}
/
{{
module
}}
.
{{
page
}}
.js"
></script>
...
...
public/scss/layout/_common.css
View file @
8a565e9
...
...
@@ -61,7 +61,7 @@ a {
}
.show
{
display
:
block
;
display
:
block
!important
;
}
.overflow-hidden
{
...
...
Please
register
or
login
to post a comment