Showing
2 changed files
with
38 additions
and
22 deletions
| @@ -155,13 +155,17 @@ export struct PlayUIComponent { | @@ -155,13 +155,17 @@ export struct PlayUIComponent { | ||
| 155 | .fontSize('11fp') | 155 | .fontSize('11fp') |
| 156 | .fontWeight(400) | 156 | .fontWeight(400) |
| 157 | .fontColor(Color.White) | 157 | .fontColor(Color.White) |
| 158 | - Image($r('app.media.icon_live_player_status_end')) | ||
| 159 | - .width(12) | ||
| 160 | - .height(12) | ||
| 161 | - Text(`${NumberFormatterUtils.formatNumberWithWan(this.liveRoomDataBean.pv)}人参与`) | ||
| 162 | - .fontSize('11fp') | ||
| 163 | - .fontWeight(400) | ||
| 164 | - .fontColor(Color.White) | 158 | + |
| 159 | + if (this.liveRoomDataBean.pv > 0) { | ||
| 160 | + Image($r('app.media.icon_live_player_status_end')) | ||
| 161 | + .width(12) | ||
| 162 | + .height(12) | ||
| 163 | + Text(`${NumberFormatterUtils.formatNumberWithWan(this.liveRoomDataBean.pv)}人参与`) | ||
| 164 | + .fontSize('11fp') | ||
| 165 | + .fontWeight(400) | ||
| 166 | + .fontColor(Color.White) | ||
| 167 | + } | ||
| 168 | + | ||
| 165 | } | 169 | } |
| 166 | .backgroundColor('#4D000000') | 170 | .backgroundColor('#4D000000') |
| 167 | .padding({ | 171 | .padding({ |
| @@ -177,13 +181,17 @@ export struct PlayUIComponent { | @@ -177,13 +181,17 @@ export struct PlayUIComponent { | ||
| 177 | .fontSize('11fp') | 181 | .fontSize('11fp') |
| 178 | .fontWeight(400) | 182 | .fontWeight(400) |
| 179 | .fontColor(Color.White) | 183 | .fontColor(Color.White) |
| 180 | - Image($r('app.media.icon_live_player_status_end')) | ||
| 181 | - .width(12) | ||
| 182 | - .height(12) | ||
| 183 | - Text(`${NumberFormatterUtils.formatNumberWithWan(this.liveRoomDataBean.pv)}人参与`) | ||
| 184 | - .fontSize('11fp') | ||
| 185 | - .fontWeight(400) | ||
| 186 | - .fontColor(Color.White) | 184 | + |
| 185 | + if (this.liveRoomDataBean.pv > 0) { | ||
| 186 | + Image($r('app.media.icon_live_player_status_end')) | ||
| 187 | + .width(12) | ||
| 188 | + .height(12) | ||
| 189 | + Text(`${NumberFormatterUtils.formatNumberWithWan(this.liveRoomDataBean.pv)}人参与`) | ||
| 190 | + .fontSize('11fp') | ||
| 191 | + .fontWeight(400) | ||
| 192 | + .fontColor(Color.White) | ||
| 193 | + } | ||
| 194 | + | ||
| 187 | } | 195 | } |
| 188 | .backgroundColor('#4D000000') | 196 | .backgroundColor('#4D000000') |
| 189 | .padding({ | 197 | .padding({ |
| @@ -57,17 +57,25 @@ export struct PlayerTitleComponent { | @@ -57,17 +57,25 @@ export struct PlayerTitleComponent { | ||
| 57 | .fontSize(11) | 57 | .fontSize(11) |
| 58 | .fontWeight(400) | 58 | .fontWeight(400) |
| 59 | .fontColor(Color.White) | 59 | .fontColor(Color.White) |
| 60 | - Image($r('app.media.icon_live_player_status_end')) | ||
| 61 | - .width(12) | ||
| 62 | - .height(12) | ||
| 63 | - Text(`${NumberFormatterUtils.formatNumberWithWan(this.liveRoomDataBean.pv)}人参与`) | ||
| 64 | - .fontSize('11fp') | ||
| 65 | - .fontWeight(400) | ||
| 66 | - .fontColor(Color.White) | 60 | + if (this.liveRoomDataBean.pv > 0) { |
| 61 | + Image($r('app.media.icon_live_player_status_end')) | ||
| 62 | + .width(12) | ||
| 63 | + .height(12) | ||
| 64 | + Text(`${NumberFormatterUtils.formatNumberWithWan(this.liveRoomDataBean.pv)}人参与`) | ||
| 65 | + .fontSize('11fp') | ||
| 66 | + .fontWeight(400) | ||
| 67 | + .fontColor(Color.White) | ||
| 68 | + } | ||
| 69 | + | ||
| 67 | } | 70 | } |
| 68 | .backgroundColor('#4D000000') | 71 | .backgroundColor('#4D000000') |
| 69 | .borderRadius(2) | 72 | .borderRadius(2) |
| 70 | - .padding(this.liveState == 'running' ? { left: 0, right: 4, top: 0, bottom: 0 } : 4) | 73 | + .padding(this.liveState == 'running' ? { |
| 74 | + left: 0, | ||
| 75 | + right: 4, | ||
| 76 | + top: 0, | ||
| 77 | + bottom: 0 | ||
| 78 | + } : 4) | ||
| 71 | } | 79 | } |
| 72 | } | 80 | } |
| 73 | } | 81 | } |
-
Please register or login to post a comment