Authored by 陈轩

commit

... ... @@ -4,6 +4,7 @@ const service = global.yoho.ServiceAPI;
const liveAPI = global.yoho.LiveAPI;
const contentCodeConfig = require('../../../config/content-code');
const resourcesProcess = require(`${global.utils}/resources-process`);
const helpers = global.yoho.helpers;
const _formatTime = (timestamp, b) => {
let date = b ? 'M.D ' : 'M月D日';
... ... @@ -111,8 +112,13 @@ const fetchReplayInfo = (videoID) => {
return liveAPI.get(url, data, options)
.then(result => {
if (result.data) {
result.data.living = 3; // 自定义的重播 状态
result.data.humanTime = _formatTime(result.data.living_start_time * 1000);
let d = result.data;
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);
}
return result;
... ... @@ -127,7 +133,12 @@ const fetchLiveInfo = (roomID) => {
return liveAPI.get(url, data)
.then(result => {
if (result.data) {
result.data.humanTime = _formatTime(result.data.living_start_time * 1000);
let d = result.data;
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.humanTime = _formatTime(d.living_start_time * 1000);
}
return result;
... ...
... ... @@ -39,12 +39,14 @@
<!--直播状态-->
<div class="live-status">
<img src="/img/activity/live/live/app_logo.png">
<div class="live-time">
<span>YOHO!直播 ·</span>&nbsp;<span id="live_time"></span>
</div>
<div class="live-num">
<span></span>
<div class="overflow-hidden">
<img src="{{ logo }}'">
<div class="live-time">
<span>YOHO!直播 ·</span>&nbsp;<span id="live_time"></span>
</div>
<div class="live-num">
<span></span>
</div>
</div>
<div class="title">
<span>{{title}}</span>
... ... @@ -93,7 +95,7 @@
<div class="live-state is-no-start {{#isEqual living 1}}show{{/isEqual}}" style="background-image: url('{{pic}}');">
<div class="live-state__txt">直播未开始</div>
<div class="live-state-info text-center">
<img src="" alt="" class="avatar"><br>
<img src="{{master_pic}}" alt="" class="avatar"><br>
<span class="name">{{master_name}}</span><br>
<h5 class="title">直播主题: {{title}}</h5>
<p class="begin-time">开始时间: {{humanTime}}</p>
... ...
... ... @@ -18,7 +18,7 @@ module.exports = {
// service: 'http://devservice.yoho.cn:58077/'
api: 'http://testapi.yoho.cn:28078/',
service: 'http://testservice.yoho.cn:28077/',
liveApi: 'http://api.live.yoho.cn/'
liveApi: 'http://testapi.live.yohops.com:9999/'
},
subDomains: {
host: '.m.yohobuy.com',
... ...
... ... @@ -365,9 +365,9 @@
.live-status {
position: absolute;
z-index: 100;
top: 1rem;
top: 30px;
right: 3rem;
left: 1rem;
left: 30px;
color: #ffffff;
font-size: 0.7rem;
font-weight: bold;
... ... @@ -375,15 +375,17 @@
}
.live-status img {
width: 1.8rem;
width: 70px;
height: 70px;
float: left;
padding-right: 0.5rem;
margin-right: 16px;
}
.live-time {
position: relative;
font-size: 26px;
line-height: 28px;
margin: 10px 0;
}
.live-status span {
... ... @@ -392,8 +394,9 @@
.live-status .title {
font-size: 22px;
margin-top: 40px;
padding: 12px 26px;
line-height: 44px;
margin-top: 38px;
padding: 0 26px;
float: left;
border-radius: 14px;
background: rgba(0, 0, 0, 0.25);
... ... @@ -402,6 +405,7 @@
.live-num {
position: relative;
font-size: 22px;
line-height: 1;
}
/*-----------直播结束DIV----------*/
... ...