Showing
2 changed files
with
5 additions
and
3 deletions
| @@ -77,7 +77,7 @@ export class LiveDetailPageLogic { | @@ -77,7 +77,7 @@ export class LiveDetailPageLogic { | ||
| 77 | * @param index | 77 | * @param index |
| 78 | */ | 78 | */ |
| 79 | resolvingRoomVliveData(index:number){ | 79 | resolvingRoomVliveData(index:number){ |
| 80 | - | 80 | + |
| 81 | // 只有直播中的才会有垫片 | 81 | // 只有直播中的才会有垫片 |
| 82 | if(this.liveState === 'running'){ | 82 | if(this.liveState === 'running'){ |
| 83 | if (this.contentDetailData.liveInfo.vlive && this.contentDetailData.liveInfo.vlive.length > 0) { | 83 | if (this.contentDetailData.liveInfo.vlive && this.contentDetailData.liveInfo.vlive.length > 0) { |
| @@ -28,8 +28,10 @@ export struct PlayerEndView { | @@ -28,8 +28,10 @@ export struct PlayerEndView { | ||
| 28 | calculateLiveDuration() { | 28 | calculateLiveDuration() { |
| 29 | const sn = | 29 | const sn = |
| 30 | DateTimeUtils.parseDate(this.contentDetailData.liveInfo.startTime, DateTimeUtils.PATTERN_DATE_TIME_HYPHEN) | 30 | DateTimeUtils.parseDate(this.contentDetailData.liveInfo.startTime, DateTimeUtils.PATTERN_DATE_TIME_HYPHEN) |
| 31 | - let en = DateTimeUtils.parseDate(this.contentDetailData.liveInfo.endTime, DateTimeUtils.PATTERN_DATE_TIME_HYPHEN) | ||
| 32 | - if (this.contentDetailData.liveInfo?.endTime == null) { | 31 | + let en = 0 |
| 32 | + if (this.contentDetailData.liveInfo?.endTime.length > 0) { | ||
| 33 | + en = DateTimeUtils.parseDate(this.contentDetailData.liveInfo.endTime, DateTimeUtils.PATTERN_DATE_TIME_HYPHEN) | ||
| 34 | + }else { | ||
| 33 | en = DateTimeUtils.parseDate(DateTimeUtils.getCurTime(DateTimeUtils.PATTERN_DATE_TIME_HYPHEN),DateTimeUtils.PATTERN_DATE_TIME_HYPHEN) | 35 | en = DateTimeUtils.parseDate(DateTimeUtils.getCurTime(DateTimeUtils.PATTERN_DATE_TIME_HYPHEN),DateTimeUtils.PATTERN_DATE_TIME_HYPHEN) |
| 34 | } | 36 | } |
| 35 | const sd = DateTimeUtils.getDuration(sn, en) | 37 | const sd = DateTimeUtils.getDuration(sn, en) |
-
Please register or login to post a comment