|
@@ -18,7 +18,7 @@ const _formatTime = (timestamp, b) => { |
|
@@ -18,7 +18,7 @@ const _formatTime = (timestamp, b) => { |
18
|
date = b ? '[]' : '[今天]';
|
18
|
date = b ? '[]' : '[今天]';
|
19
|
break;
|
19
|
break;
|
20
|
case 1:
|
20
|
case 1:
|
21
|
- date = '[明天]';
|
21
|
+ date = '[明日]';
|
22
|
break;
|
22
|
break;
|
23
|
default:
|
23
|
default:
|
24
|
null;
|
24
|
null;
|
|
@@ -177,11 +177,11 @@ const fetchLiveInfo = (roomID) => { |
|
@@ -177,11 +177,11 @@ const fetchLiveInfo = (roomID) => { |
177
|
let durationM = duration.minutes();
|
177
|
let durationM = duration.minutes();
|
178
|
let durationS = duration.seconds();
|
178
|
let durationS = duration.seconds();
|
179
|
|
179
|
|
180
|
- [durationH, durationM, durationS].forEach((item, index, arr) => {
|
180
|
+ duration = [durationH, durationM, durationS].map((item) => {
|
181
|
if (item < 10) {
|
181
|
if (item < 10) {
|
182
|
- arr[index] = `0${item}`;
|
182
|
+ return `0${item}`;
|
183
|
} else {
|
183
|
} else {
|
184
|
- arr[index] = String(item);
|
184
|
+ return String(item);
|
185
|
}
|
185
|
}
|
186
|
});
|
186
|
});
|
187
|
|
187
|
|
|
@@ -201,7 +201,7 @@ const fetchLiveInfo = (roomID) => { |
|
@@ -201,7 +201,7 @@ const fetchLiveInfo = (roomID) => { |
201
|
|
201
|
|
202
|
|
202
|
|
203
|
// 自定义数据
|
203
|
// 自定义数据
|
204
|
- d.duration = `${durationH}:${durationM}:${durationS}`;
|
204
|
+ d.duration = `${duration[0]}:${duration[1]}:${duration[2]}`;
|
205
|
d.canPlay = d.living === 1;
|
205
|
d.canPlay = d.living === 1;
|
206
|
d.notBegin = d.living === 0;
|
206
|
d.notBegin = d.living === 0;
|
207
|
d.atEnd = d.living === 2;
|
207
|
d.atEnd = d.living === 2;
|