Authored by 陈轩

Merge remote-tracking branch 'origin/feature/live' into feature/live

... ... @@ -5,24 +5,6 @@ const liveAPI = global.yoho.LiveAPI;
const contentCodeConfig = require('../../../config/content-code');
const resourcesProcess = require(`${global.utils}/resources-process`);
// 格式化时间戳,b用来区别两种不同的显示
// const _formatTime = (a, b) => {
// let time = new Date(a);
// let today = new Date();
// let judge = time.getDate() - today.getDate();
// let status = '';
// if (judge === 1) {
// status = b ? '预告明日' : '明天';
// } else if (judge > 1) {
// status = b ? `${(time.getMonth() + 1)}.${time.getDate()}` : `${(time.getMonth() + 1)}月${time.getDate()}日`;
// } else {
// status = b ? '预告' : '今天';
// }
// return `${status} ${time.getHours() < 10 ? '0' + time.getHours() : time.getHours()}
// :${time.getMinutes() < 10 ? '0' + time.getMinutes() : time.getMinutes()}`;
// };
const _formatTime = (timestamp, b) => {
let date = 'M月D日';
let time = 'hh:mm';
... ... @@ -57,7 +39,7 @@ const _getBestList = () => {
code: 200,
cache: false
}).then(result => {
let list = result.data;
let list = result.data || [];
for (let item of list) {
switch (item.living) {
... ... @@ -76,7 +58,7 @@ const _getBestList = () => {
// 格式化时间
item.starting_time = _formatTime(item.starting_time, true);
}
return result.data ? result.data : [];
return result.data || [];
});
};
... ... @@ -86,7 +68,7 @@ const _getLivingList = () => {
code: 200,
cache: false
}).then(result => {
return result.data ? result.data : [];
return result.data || [];
});
};
... ... @@ -96,12 +78,12 @@ const _getPrelivingList = () => {
code: 200,
cache: false
}).then(result => {
let list = result.data;
let list = result.data || [];
for (let item of list) {
item.starting_time = _formatTime(item.starting_time);
}
return result.data ? result.data : [];
return result.data || [];
});
};
... ... @@ -111,7 +93,7 @@ const _getRecordList = () => {
code: 200,
cache: false
}).then(result => {
return result.data ? result.data : [];
return result.data || [];
});
};
... ...
... ... @@ -16,4 +16,4 @@ $('.swiper-container').each(function() {
pagination: $(this).closest('.banner-top').find('.pagination-inner').get(0)
});
}
});
\ No newline at end of file
});
... ...
... ... @@ -30,13 +30,13 @@ $border: #e0e0e0;
top: 30px;
left: 30px;
height: 35px;
padding: 0 10px;
padding: 2px 10px 0;
border: 1px solid $white;
border-radius: 20px;
color: $white;
font-size: 22px;
text-align: center;
line-height: 35px;
line-height: 1.5;
}
.living {
... ... @@ -47,10 +47,11 @@ $border: #e0e0e0;
width: 70px;
background: $red;
border-radius: 20px;
padding-top: 2px;
color: $white;
font-size: 22px;
text-align: center;
line-height: 35px;
line-height: 1.5;
}
.rec-info {
... ... @@ -87,12 +88,14 @@ $border: #e0e0e0;
display: inline-block;
height: 26px;
width: 86px;
font-size: 18px;
font-size: 17.9px;
background: $black;
margin-left: 10px;
padding-top: 2px;
border-radius: 20px;
color: $white;
text-align: center;
line-height: 1.5;
}
.rec-tag {
... ... @@ -186,10 +189,11 @@ $border: #e0e0e0;
width: 70px;
background: $red;
border-radius: 20px;
padding-top: 2px;
color: $white;
font-size: 22px;
text-align: center;
line-height: 35px;
line-height: 1.5;
}
.main-intro {
... ... @@ -284,8 +288,9 @@ $border: #e0e0e0;
width: 70px;
border: 1px solid $black;
border-radius: 20px;
padding-top: 2px;
font-size: 22px;
line-height: 35px;
line-height: 1.5;
text-align: center;
color: $black;
}
... ...