Authored by 陈轩

fix

... ... @@ -119,13 +119,26 @@ const fetchReplayInfo = (videoID) => {
if (result && result.data) {
let d = result.data;
d.logo = helpers.image(d.logo, 70, 70);
d.background = helpers.image(d.background, 640, 968);
d.pic = helpers.image(d.pic, 640, 968);
d.master_pic = helpers.image(d.master_pic, 180, 180);
d.humanTime = _formatTime(data.living_start_time * 1000);
d.video_src = d.url;
let durationH = parseInt(d.live_last_time / 3600, 10); // 1h =3600s
let durationM = parseInt((d.live_last_time - durationH * 3600) / 60, 10);
let duration = [durationH, durationM];
duration.forEach((val, index) => {
if (val < 10) {
duration[index] = `0${val}`;
} else {
duration[index] = '' + val;
}
});
// 自定义数据
d.duration = `${duration[0]} : ${duration[1]}`;
d.living = 3; // 重播 状态
d.canPlay = true;
d.atEnd = false;
... ... @@ -145,13 +158,26 @@ const fetchLiveInfo = (roomID) => {
if (result && result.data) {
let d = result.data;
d.logo = helpers.image(d.logo, 70, 70);
d.background_pic = helpers.image(d.background_pic, 640, 968);
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);
d.video_src = d.hls_downstream_address;
// 自定义的数据
let durationH = parseInt(d.live_last_time / 3600, 10); // 1h =3600s
let durationM = parseInt((d.live_last_time - durationH * 3600) / 60, 10);
let duration = [durationH, durationM];
duration.forEach((val, index) => {
if (val < 10) {
duration[index] = `0${val}`;
} else {
duration[index] = '' + val;
}
});
// 自定义数据
d.duration = `${duration[0]} : ${duration[1]}`;
d.canPlay = d.living === 1;
d.notBegin = d.living === 0;
d.atEnd = d.living === 2;
... ...
... ... @@ -41,7 +41,7 @@
<!--直播状态-->
<div class="live-status">
<div class="overflow-hidden">
<img src="{{ logo }}">
<img src="/img/activity/live/live/app_logo.png">
<div class="live-time">
<span>YOHO!直播 ·</span>&nbsp;<span id="live_time"></span>
</div>
... ... @@ -65,7 +65,7 @@
{{/canPlay}}
{{!直播已结束}}
<div id="live-state-end" class="live-state is-no-start {{#atEnd}}show{{/atEnd}}" style="background-image: url('{{pic}}');">
<div id="live-state-end" class="live-state is-no-start {{#atEnd}}show{{/atEnd}}" style="background-image: url('{{background_pic}}');">
<div class="live-state__txt">直播已结束</div>
<ul class="live-state-info">
<li class="audience text-center">
... ... @@ -95,7 +95,7 @@
{{!直播未开始}}
{{#notBegin}}
<div class="live-state is-no-start show" style="background-image: url('{{pic}}');">
<div class="live-state is-no-start show" style="background-image: url('{{background_pic}}');">
<div class="live-state__txt">直播未开始</div>
<div class="live-state-info text-center">
<img src="{{master_pic}}" alt="" class="avatar"><br>
... ...