Authored by 陈轩

fix

@@ -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;
@@ -77,12 +77,14 @@ @@ -77,12 +77,14 @@
77 <li class="duration"> 77 <li class="duration">
78 <div class="inner pull-right"> 78 <div class="inner pull-right">
79 <span class="val">{{duration}}</span> 79 <span class="val">{{duration}}</span>
  80 + <br>
80 <span class="label">直播时长</span> 81 <span class="label">直播时长</span>
81 </div> 82 </div>
82 </li> 83 </li>
83 <li class="favorite"> 84 <li class="favorite">
84 <div class="inner pull-left"> 85 <div class="inner pull-left">
85 <span class="val">{{like_num}}</span> 86 <span class="val">{{like_num}}</span>
  87 + <br>
86 <span class="label">点赞数</span> 88 <span class="label">点赞数</span>
87 </div> 89 </div>
88 </li> 90 </li>