Merge branch 'main' of http://192.168.1.42/developOne/harmonyPool into main
* 'main' of http://192.168.1.42/developOne/harmonyPool: ref |> 调整横屏直播详情预约状态标签距离顶部间距 ref |> 调整直播详情直播状态标签UI走查问题 fix |> 修复直播详情带人民号信息时,人民号信息UI走查展示问题 fix |> 修复部分头图卡不显示标题和话题标识
Showing
5 changed files
with
33 additions
and
37 deletions
| @@ -42,6 +42,7 @@ export class CompDTO implements BaseDTO { | @@ -42,6 +42,7 @@ export class CompDTO implements BaseDTO { | ||
| 42 | imageScale: number = -1; // 封面图比例 1-4:3, 2-16:9, 3-3:2 | 42 | imageScale: number = -1; // 封面图比例 1-4:3, 2-16:9, 3-3:2 |
| 43 | audioDataList: AudioDTO[] = []; | 43 | audioDataList: AudioDTO[] = []; |
| 44 | titleShowPolicy: string | number = ''; | 44 | titleShowPolicy: string | number = ''; |
| 45 | + titleShow: string | number = ''; | ||
| 45 | /** | 46 | /** |
| 46 | * 组件内容源类型 (LIVE_HORIZONTAL_CARD\LIVE_RESERVATION\LIVE_LARGE_CARD\LIVE_END\LIVE_MONTHLY_RANKING ) | 47 | * 组件内容源类型 (LIVE_HORIZONTAL_CARD\LIVE_RESERVATION\LIVE_LARGE_CARD\LIVE_END\LIVE_MONTHLY_RANKING ) |
| 47 | */ | 48 | */ |
| @@ -105,6 +106,7 @@ export class CompDTO implements BaseDTO { | @@ -105,6 +106,7 @@ export class CompDTO implements BaseDTO { | ||
| 105 | comp.imageScale = old.imageScale | 106 | comp.imageScale = old.imageScale |
| 106 | comp.audioDataList = old.audioDataList | 107 | comp.audioDataList = old.audioDataList |
| 107 | comp.titleShowPolicy = old.titleShowPolicy | 108 | comp.titleShowPolicy = old.titleShowPolicy |
| 109 | + comp.titleShow = old.titleShow | ||
| 108 | comp.pageId = old.pageId | 110 | comp.pageId = old.pageId |
| 109 | comp.extraData = old.extraData | 111 | comp.extraData = old.extraData |
| 110 | comp.dataSourceType = old.dataSourceType | 112 | comp.dataSourceType = old.dataSourceType |
| @@ -29,24 +29,14 @@ export struct LiveFollowComponent { | @@ -29,24 +29,14 @@ export struct LiveFollowComponent { | ||
| 29 | @State followStatus: String = '0'; | 29 | @State followStatus: String = '0'; |
| 30 | 30 | ||
| 31 | build() { | 31 | build() { |
| 32 | - Stack() { | ||
| 33 | - Stack() | ||
| 34 | - .height(22) | ||
| 35 | - .width(150) | ||
| 36 | - .backgroundColor('#000000') | ||
| 37 | - .opacity(0.3) | ||
| 38 | - .borderRadius({ | ||
| 39 | - topLeft: 90, | ||
| 40 | - bottomLeft: 90 | ||
| 41 | - }) | ||
| 42 | Row() { | 32 | Row() { |
| 43 | - Stack({alignContent: Alignment.Bottom}){ | 33 | + Stack({ alignContent: Alignment.Bottom }) { |
| 44 | //号主头像 | 34 | //号主头像 |
| 45 | Image(this.rmhInfo.rmhHeadUrl) | 35 | Image(this.rmhInfo.rmhHeadUrl) |
| 46 | .alt($r('app.media.icon_default_head_mater')) | 36 | .alt($r('app.media.icon_default_head_mater')) |
| 47 | .width(24) | 37 | .width(24) |
| 48 | .height(24) | 38 | .height(24) |
| 49 | - .borderRadius(90) | 39 | + .borderRadius(12) |
| 50 | .onClick(() => { | 40 | .onClick(() => { |
| 51 | // 跳转到号主页 | 41 | // 跳转到号主页 |
| 52 | if (this.contentDetailData.rmhInfo?.cnMainControl === 1) { | 42 | if (this.contentDetailData.rmhInfo?.cnMainControl === 1) { |
| @@ -57,8 +47,8 @@ export struct LiveFollowComponent { | @@ -57,8 +47,8 @@ export struct LiveFollowComponent { | ||
| 57 | WDRouterRule.jumpWithPage(WDRouterPage.peopleShipHomePage, params) | 47 | WDRouterRule.jumpWithPage(WDRouterPage.peopleShipHomePage, params) |
| 58 | } | 48 | } |
| 59 | }) | 49 | }) |
| 60 | - if(this.contentDetailData.rmhInfo?.authIcon){ | ||
| 61 | - Row(){ | 50 | + if (this.contentDetailData.rmhInfo?.authIcon) { |
| 51 | + Row() { | ||
| 62 | Image(this.contentDetailData.rmhInfo?.authIcon) | 52 | Image(this.contentDetailData.rmhInfo?.authIcon) |
| 63 | .width(10) | 53 | .width(10) |
| 64 | .height(10) | 54 | .height(10) |
| @@ -67,20 +57,22 @@ export struct LiveFollowComponent { | @@ -67,20 +57,22 @@ export struct LiveFollowComponent { | ||
| 67 | .justifyContent(FlexAlign.End) | 57 | .justifyContent(FlexAlign.End) |
| 68 | } | 58 | } |
| 69 | }.width(24).height(24) | 59 | }.width(24).height(24) |
| 70 | - | 60 | + .margin({ |
| 61 | + left: 0, | ||
| 62 | + top: 0, | ||
| 63 | + bottom: 0, | ||
| 64 | + }) | ||
| 71 | //号主名称 | 65 | //号主名称 |
| 72 | Text(this.rmhInfo.rmhName) | 66 | Text(this.rmhInfo.rmhName) |
| 73 | .fontColor(Color.White) | 67 | .fontColor(Color.White) |
| 74 | - .textOverflow({overflow:TextOverflow.Ellipsis}) | 68 | + .textOverflow({ overflow: TextOverflow.Ellipsis }) |
| 75 | .maxLines(1) | 69 | .maxLines(1) |
| 76 | .fontWeight(500) | 70 | .fontWeight(500) |
| 77 | .fontSize('12fp') | 71 | .fontSize('12fp') |
| 78 | - .layoutWeight(1) | ||
| 79 | .margin({ | 72 | .margin({ |
| 80 | left: 4, | 73 | left: 4, |
| 81 | right: 6 | 74 | right: 6 |
| 82 | }) | 75 | }) |
| 83 | - Blank() | ||
| 84 | //关注状态 | 76 | //关注状态 |
| 85 | Text(this.followStatus === '0' ? '关注' : '已关注') | 77 | Text(this.followStatus === '0' ? '关注' : '已关注') |
| 86 | .fontColor(Color.White) | 78 | .fontColor(Color.White) |
| @@ -93,16 +85,21 @@ export struct LiveFollowComponent { | @@ -93,16 +85,21 @@ export struct LiveFollowComponent { | ||
| 93 | bottom: 3 | 85 | bottom: 3 |
| 94 | }) | 86 | }) |
| 95 | .borderRadius(2) | 87 | .borderRadius(2) |
| 96 | - .margin({ right: 2 }) | 88 | + .width(36) |
| 89 | + .margin({right:2}) | ||
| 97 | .backgroundColor(this.followStatus === '0' ? $r('app.color.color_ED2800') : $r('app.color.color_CCCCCC')) | 90 | .backgroundColor(this.followStatus === '0' ? $r('app.color.color_ED2800') : $r('app.color.color_CCCCCC')) |
| 98 | .visibility(this.followStatus === '0' ? Visibility.Visible : Visibility.None) | 91 | .visibility(this.followStatus === '0' ? Visibility.Visible : Visibility.None) |
| 99 | .onClick(() => { | 92 | .onClick(() => { |
| 100 | this.handleAccention() | 93 | this.handleAccention() |
| 101 | }) | 94 | }) |
| 102 | } | 95 | } |
| 103 | - .height(22) | ||
| 104 | - .width(150) | ||
| 105 | - } | 96 | + .backgroundColor("#30000000") |
| 97 | + .borderRadius({ | ||
| 98 | + topLeft: 12, | ||
| 99 | + bottomLeft: 12, | ||
| 100 | + topRight: 2, | ||
| 101 | + bottomRight: 2 | ||
| 102 | + }) | ||
| 106 | } | 103 | } |
| 107 | 104 | ||
| 108 | /** | 105 | /** |
| @@ -28,7 +28,7 @@ export struct Card5Component { | @@ -28,7 +28,7 @@ export struct Card5Component { | ||
| 28 | @State textArr: textItem[] = [] | 28 | @State textArr: textItem[] = [] |
| 29 | 29 | ||
| 30 | async aboutToAppear(): Promise<void> { | 30 | async aboutToAppear(): Promise<void> { |
| 31 | - console.log('Card2Component', JSON.stringify(this.compDTO)) | 31 | + console.log('Card2Component', JSON.stringify(this.compDTO),this.contentDTO.titleShow) |
| 32 | const curRouter = router.getState().name; | 32 | const curRouter = router.getState().name; |
| 33 | this.clicked = hasClicked(this.contentDTO.objectId, curRouter) | 33 | this.clicked = hasClicked(this.contentDTO.objectId, curRouter) |
| 34 | this.loadImg = await onlyWifiLoadImg(); | 34 | this.loadImg = await onlyWifiLoadImg(); |
| @@ -66,7 +66,7 @@ export struct Card5Component { | @@ -66,7 +66,7 @@ export struct Card5Component { | ||
| 66 | ) | 66 | ) |
| 67 | .height(this.loadImg ? '' : 114) | 67 | .height(this.loadImg ? '' : 114) |
| 68 | .autoResize(true) | 68 | .autoResize(true) |
| 69 | - if (!!this.titleShowPolicy || this.titleShowPolicy === null) { | 69 | + if (this.contentDTO.titleShow == 1 || this.contentDTO.titleShow == null) { |
| 70 | Row() | 70 | Row() |
| 71 | .borderRadius( | 71 | .borderRadius( |
| 72 | { | 72 | { |
| @@ -173,7 +173,7 @@ export struct PlayUIComponent { | @@ -173,7 +173,7 @@ export struct PlayUIComponent { | ||
| 173 | .width('100%') | 173 | .width('100%') |
| 174 | // .width(this.displayDirection == DisplayDirection.VIDEO_HORIZONTAL ? 'calc(100% - 80vp)' : 'calc(100% - 32vp)') | 174 | // .width(this.displayDirection == DisplayDirection.VIDEO_HORIZONTAL ? 'calc(100% - 80vp)' : 'calc(100% - 32vp)') |
| 175 | .padding({ | 175 | .padding({ |
| 176 | - top: 11, | 176 | + top: 13, |
| 177 | bottom: 6, | 177 | bottom: 6, |
| 178 | left: this.displayDirection == DisplayDirection.VIDEO_HORIZONTAL ? '40vp' : '16vp', | 178 | left: this.displayDirection == DisplayDirection.VIDEO_HORIZONTAL ? '40vp' : '16vp', |
| 179 | right: this.displayDirection == DisplayDirection.VIDEO_HORIZONTAL ? '40vp' : '16vp' | 179 | right: this.displayDirection == DisplayDirection.VIDEO_HORIZONTAL ? '40vp' : '16vp' |
| @@ -189,21 +189,19 @@ export struct PlayUIComponent { | @@ -189,21 +189,19 @@ export struct PlayUIComponent { | ||
| 189 | // 预约 | 189 | // 预约 |
| 190 | if (this.contentDetailData.liveInfo?.liveState == 'wait') { | 190 | if (this.contentDetailData.liveInfo?.liveState == 'wait') { |
| 191 | Row() { | 191 | Row() { |
| 192 | - | ||
| 193 | Image($r('app.media.icon_live_status_wait')) | 192 | Image($r('app.media.icon_live_status_wait')) |
| 194 | .width(22) | 193 | .width(22) |
| 195 | .height(18) | 194 | .height(18) |
| 196 | Text('预约') | 195 | Text('预约') |
| 197 | - .fontSize('11fp') | 196 | + .fontSize('11vp') |
| 198 | .fontWeight(400) | 197 | .fontWeight(400) |
| 199 | .fontColor(Color.White) | 198 | .fontColor(Color.White) |
| 200 | } | 199 | } |
| 201 | .backgroundColor('#4D000000') | 200 | .backgroundColor('#4D000000') |
| 202 | .padding({ | 201 | .padding({ |
| 203 | - top: 1, | ||
| 204 | - right: 4, | ||
| 205 | - bottom: 1 | 202 | + right: 4 |
| 206 | }) | 203 | }) |
| 204 | + .borderRadius(2) | ||
| 207 | } | 205 | } |
| 208 | // 直播中 | 206 | // 直播中 |
| 209 | else if (this.contentDetailData.liveInfo?.liveState == 'running') { | 207 | else if (this.contentDetailData.liveInfo?.liveState == 'running') { |
| @@ -224,7 +222,7 @@ export struct PlayUIComponent { | @@ -224,7 +222,7 @@ export struct PlayUIComponent { | ||
| 224 | } | 222 | } |
| 225 | 223 | ||
| 226 | Text('直播中') | 224 | Text('直播中') |
| 227 | - .fontSize('11fp') | 225 | + .fontSize('11vp') |
| 228 | .fontWeight(400) | 226 | .fontWeight(400) |
| 229 | .fontColor(Color.White) | 227 | .fontColor(Color.White) |
| 230 | 228 | ||
| @@ -233,7 +231,7 @@ export struct PlayUIComponent { | @@ -233,7 +231,7 @@ export struct PlayUIComponent { | ||
| 233 | .width(12) | 231 | .width(12) |
| 234 | .height(12) | 232 | .height(12) |
| 235 | Text(`${NumberFormatterUtils.formatNumberWithWan(this.liveRoomDataBean.pv)}人参与`) | 233 | Text(`${NumberFormatterUtils.formatNumberWithWan(this.liveRoomDataBean.pv)}人参与`) |
| 236 | - .fontSize('11fp') | 234 | + .fontSize('11vp') |
| 237 | .fontWeight(400) | 235 | .fontWeight(400) |
| 238 | .fontColor(Color.White) | 236 | .fontColor(Color.White) |
| 239 | } | 237 | } |
| @@ -241,9 +239,7 @@ export struct PlayUIComponent { | @@ -241,9 +239,7 @@ export struct PlayUIComponent { | ||
| 241 | } | 239 | } |
| 242 | .backgroundColor('#4D000000') | 240 | .backgroundColor('#4D000000') |
| 243 | .padding({ | 241 | .padding({ |
| 244 | - top: 1, | ||
| 245 | right: 4, | 242 | right: 4, |
| 246 | - bottom: 1, | ||
| 247 | }) | 243 | }) |
| 248 | .margin( | 244 | .margin( |
| 249 | { | 245 | { |
| @@ -252,6 +248,7 @@ export struct PlayUIComponent { | @@ -252,6 +248,7 @@ export struct PlayUIComponent { | ||
| 252 | : this.displayDirection === DisplayDirection.VIDEO_HORIZONTAL ? 34 : 0 | 248 | : this.displayDirection === DisplayDirection.VIDEO_HORIZONTAL ? 34 : 0 |
| 253 | } | 249 | } |
| 254 | ) | 250 | ) |
| 251 | + .borderRadius(2) | ||
| 255 | } | 252 | } |
| 256 | //回看 | 253 | //回看 |
| 257 | else if (this.contentDetailData.liveInfo?.liveState == 'end') { | 254 | else if (this.contentDetailData.liveInfo?.liveState == 'end') { |
| @@ -272,15 +269,15 @@ export struct PlayUIComponent { | @@ -272,15 +269,15 @@ export struct PlayUIComponent { | ||
| 272 | } | 269 | } |
| 273 | 270 | ||
| 274 | } | 271 | } |
| 272 | + .height(18) | ||
| 275 | .backgroundColor('#4D000000') | 273 | .backgroundColor('#4D000000') |
| 276 | .padding({ | 274 | .padding({ |
| 277 | left: 4, | 275 | left: 4, |
| 278 | - top: 1, | ||
| 279 | right: 4, | 276 | right: 4, |
| 280 | - bottom: 1 | ||
| 281 | }).margin({ | 277 | }).margin({ |
| 282 | left: this.displayDirection == DisplayDirection.VIDEO_HORIZONTAL ? '34vp' : 0 | 278 | left: this.displayDirection == DisplayDirection.VIDEO_HORIZONTAL ? '34vp' : 0 |
| 283 | }) | 279 | }) |
| 280 | + .borderRadius(2) | ||
| 284 | } | 281 | } |
| 285 | } | 282 | } |
| 286 | 283 |
| @@ -144,7 +144,7 @@ export struct PlayerTitleComponent { | @@ -144,7 +144,7 @@ export struct PlayerTitleComponent { | ||
| 144 | .width(12) | 144 | .width(12) |
| 145 | .height(12) | 145 | .height(12) |
| 146 | Text(`${NumberFormatterUtils.formatNumberWithWan(this.liveRoomDataBean.pv)}人参与`) | 146 | Text(`${NumberFormatterUtils.formatNumberWithWan(this.liveRoomDataBean.pv)}人参与`) |
| 147 | - .fontSize('11fp') | 147 | + .fontSize('11vp') |
| 148 | .fontWeight(400) | 148 | .fontWeight(400) |
| 149 | .fontColor(Color.White) | 149 | .fontColor(Color.White) |
| 150 | } | 150 | } |
-
Please register or login to post a comment