wuyanan

ref |> 修复点击文字直播进入直播详情提示内容不存在问题

@@ -102,9 +102,10 @@ export struct DetailPlayLiveCommon { @@ -102,9 +102,10 @@ export struct DetailPlayLiveCommon {
102 } 102 }
103 103
104 const detailData = data[0]; 104 const detailData = data[0];
105 - 105 + ///直播方式 0 视频直播 1 文字直播
  106 + const liveWay = detailData.liveInfo?.liveWay as number;
106 // 人民号类型单独获取直播地址 107 // 人民号类型单独获取直播地址
107 - if (detailData.rmhPlatform === 1 && detailData.liveInfo?.liveState === 'running') { 108 + if (detailData.rmhPlatform === 1 && detailData.liveInfo?.liveState === 'running' && liveWay == 0) {
108 const vliveId = detailData.liveInfo.vlive[0].vliveId as string; 109 const vliveId = detailData.liveInfo.vlive[0].vliveId as string;
109 const pullStreamAddressData = await this.liveViewModel.getLiveRoomPullAddress(vliveId) as GetPullAddressBean; 110 const pullStreamAddressData = await this.liveViewModel.getLiveRoomPullAddress(vliveId) as GetPullAddressBean;
110 111
@@ -135,13 +136,14 @@ export struct DetailPlayLiveCommon { @@ -135,13 +136,14 @@ export struct DetailPlayLiveCommon {
135 publishCommentModel.commentContent = ''; 136 publishCommentModel.commentContent = '';
136 this.liveStyle = detailData.liveInfo?.liveStyle; 137 this.liveStyle = detailData.liveInfo?.liveStyle;
137 138
138 - if (detailData.liveInfo?.liveState === 'end') { 139 + if (detailData.liveInfo?.liveState === 'end' && liveWay == 0) {
139 this.playUrl = detailData.liveInfo.vlive[0].replayUri; 140 this.playUrl = detailData.liveInfo.vlive[0].replayUri;
140 } 141 }
141 142
142 resolve(); 143 resolve();
143 }) 144 })
144 - .catch(() => { 145 + .catch((error:Error) => {
  146 + Logger.debug(TAG + "error",error.message,error.name)
145 this.isHideLoading = true; 147 this.isHideLoading = true;
146 ToastUtils.shortToast('内容不存在'); 148 ToastUtils.shortToast('内容不存在');
147 router.back(); 149 router.back();
@@ -79,8 +79,9 @@ export class LiveDetailPageLogic { @@ -79,8 +79,9 @@ export class LiveDetailPageLogic {
79 79
80 // 只有直播中的才会有垫片 80 // 只有直播中的才会有垫片
81 if(this.liveState === 'running'){ 81 if(this.liveState === 'running'){
82 -  
83 - this.showPad = this.contentDetailData.liveInfo.vlive[index].showPad 82 + if (this.contentDetailData.liveInfo.vlive.count > 0) {
  83 + this.showPad = this.contentDetailData.liveInfo.vlive[index].showPad
  84 + }
84 } 85 }
85 86
86 } 87 }