Authored by 陈轩

fix

... ... @@ -10,7 +10,7 @@ const _formatTime = (timestamp, b) => {
let time = 'hh:mm';
let startTime = moment(timestamp);
let now = moment();
let diff = moment.duration(startTime.startOf('day') - now.startOf('day')).days();
let diff = moment.duration(startTime.clone().startOf('day') - now.startOf('day')).days();
switch (diff) {
case 0: date = b ? '[预告]' : '[今天]'; break;
... ... @@ -56,7 +56,7 @@ const _getBestList = () => {
}
// 格式化时间
item.starting_time = _formatTime(item.starting_time, true);
item.starting_time = _formatTime(item.starting_time * 1000, true);
}
return result.data || [];
});
... ... @@ -81,7 +81,7 @@ const _getPrelivingList = () => {
let list = result.data || [];
for (let item of list) {
item.starting_time = _formatTime(item.starting_time);
item.starting_time = _formatTime(item.starting_time * 1000);
}
return result.data || [];
});
... ... @@ -112,7 +112,7 @@ const fetchReplayInfo = (videoID) => {
.then(result => {
if (result.data) {
result.data.living = 3; // 自定义的重播 状态
result.data.humanTime = _formatTime(result.data.living_start_time);
result.data.humanTime = _formatTime(result.data.living_start_time * 1000);
}
return result;
... ... @@ -127,7 +127,7 @@ const fetchLiveInfo = (roomID) => {
return liveAPI.get(url, data)
.then(result => {
if (result.data) {
result.data.humanTime = _formatTime(result.data.living_start_time);
result.data.humanTime = _formatTime(result.data.living_start_time * 1000);
}
return result;
... ...