Showing
1 changed file
with
15 additions
and
17 deletions
| @@ -89,6 +89,8 @@ export struct CardMediaInfo { | @@ -89,6 +89,8 @@ export struct CardMediaInfo { | ||
| 89 | Row() { | 89 | Row() { |
| 90 | // 搜索接口没有返回liveInfo字段所以得做个区分 | 90 | // 搜索接口没有返回liveInfo字段所以得做个区分 |
| 91 | if (this.contentDTO && this.contentDTO.liveInfo && JSON.stringify(this.contentDTO.liveInfo) === '{}') { | 91 | if (this.contentDTO && this.contentDTO.liveInfo && JSON.stringify(this.contentDTO.liveInfo) === '{}') { |
| 92 | + Text(JSON.stringify(this.contentDTO?.linkUrl)) | ||
| 93 | + Text(JSON.stringify(this.contentDTO?.liveType)) | ||
| 92 | // 当liveInfo不存在的时候 | 94 | // 当liveInfo不存在的时候 |
| 93 | if (this.contentDTO?.liveType === 'wait') { | 95 | if (this.contentDTO?.liveType === 'wait') { |
| 94 | Image($r('app.media.card_wait')) | 96 | Image($r('app.media.card_wait')) |
| @@ -107,8 +109,6 @@ export struct CardMediaInfo { | @@ -107,8 +109,6 @@ export struct CardMediaInfo { | ||
| 107 | .margin({ | 109 | .margin({ |
| 108 | right: '2vp' | 110 | right: '2vp' |
| 109 | }) | 111 | }) |
| 110 | - // Image($r('app.media.card_live')) | ||
| 111 | - // .mediaLogo() | ||
| 112 | Text('直播中') | 112 | Text('直播中') |
| 113 | .mediaText() | 113 | .mediaText() |
| 114 | } else if (this.contentDTO?.liveType === 'end' && this.contentDTO?.linkUrl) { | 114 | } else if (this.contentDTO?.liveType === 'end' && this.contentDTO?.linkUrl) { |
| @@ -116,10 +116,17 @@ export struct CardMediaInfo { | @@ -116,10 +116,17 @@ export struct CardMediaInfo { | ||
| 116 | .mediaLogo() | 116 | .mediaLogo() |
| 117 | Text('回看') | 117 | Text('回看') |
| 118 | .mediaText() | 118 | .mediaText() |
| 119 | - }else if(this.contentDTO?.liveInfo?.liveState === 'end' && !this.contentDTO?.linkUrl){ | 119 | + }else if(this.contentDTO?.liveType === 'end' && !this.contentDTO?.linkUrl){ |
| 120 | Text('已结束') | 120 | Text('已结束') |
| 121 | .mediaText() | 121 | .mediaText() |
| 122 | + }else if(!this.contentDTO?.liveType && this.contentDTO?.linkUrl){ | ||
| 123 | + // 加个防护,生产有出现这样的特例 | ||
| 124 | + Image($r('app.media.card_play')) | ||
| 125 | + .mediaLogo() | ||
| 126 | + Text('回看') | ||
| 127 | + .mediaText() | ||
| 122 | } | 128 | } |
| 129 | + | ||
| 123 | }else { | 130 | }else { |
| 124 | // 当liveInfo存在时后 | 131 | // 当liveInfo存在时后 |
| 125 | 132 | ||
| @@ -129,6 +136,7 @@ export struct CardMediaInfo { | @@ -129,6 +136,7 @@ export struct CardMediaInfo { | ||
| 129 | Text('预约') | 136 | Text('预约') |
| 130 | .mediaText() | 137 | .mediaText() |
| 131 | } else if (this.contentDTO?.liveInfo?.liveState === 'running') { | 138 | } else if (this.contentDTO?.liveInfo?.liveState === 'running') { |
| 139 | + Row(){ | ||
| 132 | LottieView({ | 140 | LottieView({ |
| 133 | name: 'live_status_wait', | 141 | name: 'live_status_wait', |
| 134 | path: "lottie/live_detail_living.json", | 142 | path: "lottie/live_detail_living.json", |
| @@ -136,14 +144,14 @@ export struct CardMediaInfo { | @@ -136,14 +144,14 @@ export struct CardMediaInfo { | ||
| 136 | lottieHeight: 14, | 144 | lottieHeight: 14, |
| 137 | autoplay: true, | 145 | autoplay: true, |
| 138 | loop: true, | 146 | loop: true, |
| 139 | - }) | ||
| 140 | - .margin({ | 147 | + }).margin({ |
| 141 | right: '2vp' | 148 | right: '2vp' |
| 142 | }) | 149 | }) |
| 143 | - // Image($r('app.media.card_live')) | ||
| 144 | - // .mediaLogo() | ||
| 145 | Text('直播中') | 150 | Text('直播中') |
| 146 | .mediaText() | 151 | .mediaText() |
| 152 | + | ||
| 153 | + } | ||
| 154 | + | ||
| 147 | } else if (this.contentDTO?.liveInfo?.liveState === 'end' && this.contentDTO?.liveInfo?.replayUri) { | 155 | } else if (this.contentDTO?.liveInfo?.liveState === 'end' && this.contentDTO?.liveInfo?.replayUri) { |
| 148 | Image($r('app.media.card_play')) | 156 | Image($r('app.media.card_play')) |
| 149 | .mediaLogo() | 157 | .mediaLogo() |
| @@ -154,7 +162,6 @@ export struct CardMediaInfo { | @@ -154,7 +162,6 @@ export struct CardMediaInfo { | ||
| 154 | Text('已结束') | 162 | Text('已结束') |
| 155 | .mediaText() | 163 | .mediaText() |
| 156 | } | 164 | } |
| 157 | - | ||
| 158 | } | 165 | } |
| 159 | // 备注直播间观看人数在轮播图卡不显示 | 166 | // 备注直播间观看人数在轮播图卡不显示 |
| 160 | if(this.beused !== 'Zh_Carousel_Layout_01'){ | 167 | if(this.beused !== 'Zh_Carousel_Layout_01'){ |
| @@ -165,15 +172,6 @@ export struct CardMediaInfo { | @@ -165,15 +172,6 @@ export struct CardMediaInfo { | ||
| 165 | .mediaText() | 172 | .mediaText() |
| 166 | } | 173 | } |
| 167 | } | 174 | } |
| 168 | - | ||
| 169 | - | ||
| 170 | - // } else if (this.contentDTO?.liveInfo?.liveState === 'end' && this.contentDTO?.liveInfo | ||
| 171 | - // ?.replayUri) { | ||
| 172 | - // // Image($r('app.media.card_live')) | ||
| 173 | - // // .mediaLogo() | ||
| 174 | - // Text('直播结束') | ||
| 175 | - // .mediaText() | ||
| 176 | - // } | ||
| 177 | } | 175 | } |
| 178 | } else if (this.contentDTO.objectType === '9') { | 176 | } else if (this.contentDTO.objectType === '9') { |
| 179 | // 显示组图;图片数量 | 177 | // 显示组图;图片数量 |
-
Please register or login to post a comment