wangliang_wd

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 |> 修复部分头图卡不显示标题和话题标识
... ... @@ -42,6 +42,7 @@ export class CompDTO implements BaseDTO {
imageScale: number = -1; // 封面图比例 1-4:3, 2-16:9, 3-3:2
audioDataList: AudioDTO[] = [];
titleShowPolicy: string | number = '';
titleShow: string | number = '';
/**
* 组件内容源类型 (LIVE_HORIZONTAL_CARD\LIVE_RESERVATION\LIVE_LARGE_CARD\LIVE_END\LIVE_MONTHLY_RANKING )
*/
... ... @@ -105,6 +106,7 @@ export class CompDTO implements BaseDTO {
comp.imageScale = old.imageScale
comp.audioDataList = old.audioDataList
comp.titleShowPolicy = old.titleShowPolicy
comp.titleShow = old.titleShow
comp.pageId = old.pageId
comp.extraData = old.extraData
comp.dataSourceType = old.dataSourceType
... ...
... ... @@ -29,24 +29,14 @@ export struct LiveFollowComponent {
@State followStatus: String = '0';
build() {
Stack() {
Stack()
.height(22)
.width(150)
.backgroundColor('#000000')
.opacity(0.3)
.borderRadius({
topLeft: 90,
bottomLeft: 90
})
Row() {
Stack({alignContent: Alignment.Bottom}){
Stack({ alignContent: Alignment.Bottom }) {
//号主头像
Image(this.rmhInfo.rmhHeadUrl)
.alt($r('app.media.icon_default_head_mater'))
.width(24)
.height(24)
.borderRadius(90)
.borderRadius(12)
.onClick(() => {
// 跳转到号主页
if (this.contentDetailData.rmhInfo?.cnMainControl === 1) {
... ... @@ -57,8 +47,8 @@ export struct LiveFollowComponent {
WDRouterRule.jumpWithPage(WDRouterPage.peopleShipHomePage, params)
}
})
if(this.contentDetailData.rmhInfo?.authIcon){
Row(){
if (this.contentDetailData.rmhInfo?.authIcon) {
Row() {
Image(this.contentDetailData.rmhInfo?.authIcon)
.width(10)
.height(10)
... ... @@ -67,20 +57,22 @@ export struct LiveFollowComponent {
.justifyContent(FlexAlign.End)
}
}.width(24).height(24)
.margin({
left: 0,
top: 0,
bottom: 0,
})
//号主名称
Text(this.rmhInfo.rmhName)
.fontColor(Color.White)
.textOverflow({overflow:TextOverflow.Ellipsis})
.textOverflow({ overflow: TextOverflow.Ellipsis })
.maxLines(1)
.fontWeight(500)
.fontSize('12fp')
.layoutWeight(1)
.margin({
left: 4,
right: 6
})
Blank()
//关注状态
Text(this.followStatus === '0' ? '关注' : '已关注')
.fontColor(Color.White)
... ... @@ -93,16 +85,21 @@ export struct LiveFollowComponent {
bottom: 3
})
.borderRadius(2)
.margin({ right: 2 })
.width(36)
.margin({right:2})
.backgroundColor(this.followStatus === '0' ? $r('app.color.color_ED2800') : $r('app.color.color_CCCCCC'))
.visibility(this.followStatus === '0' ? Visibility.Visible : Visibility.None)
.onClick(() => {
this.handleAccention()
})
}
.height(22)
.width(150)
}
.backgroundColor("#30000000")
.borderRadius({
topLeft: 12,
bottomLeft: 12,
topRight: 2,
bottomRight: 2
})
}
/**
... ...
... ... @@ -28,7 +28,7 @@ export struct Card5Component {
@State textArr: textItem[] = []
async aboutToAppear(): Promise<void> {
console.log('Card2Component', JSON.stringify(this.compDTO))
console.log('Card2Component', JSON.stringify(this.compDTO),this.contentDTO.titleShow)
const curRouter = router.getState().name;
this.clicked = hasClicked(this.contentDTO.objectId, curRouter)
this.loadImg = await onlyWifiLoadImg();
... ... @@ -66,7 +66,7 @@ export struct Card5Component {
)
.height(this.loadImg ? '' : 114)
.autoResize(true)
if (!!this.titleShowPolicy || this.titleShowPolicy === null) {
if (this.contentDTO.titleShow == 1 || this.contentDTO.titleShow == null) {
Row()
.borderRadius(
{
... ...
... ... @@ -173,7 +173,7 @@ export struct PlayUIComponent {
.width('100%')
// .width(this.displayDirection == DisplayDirection.VIDEO_HORIZONTAL ? 'calc(100% - 80vp)' : 'calc(100% - 32vp)')
.padding({
top: 11,
top: 13,
bottom: 6,
left: this.displayDirection == DisplayDirection.VIDEO_HORIZONTAL ? '40vp' : '16vp',
right: this.displayDirection == DisplayDirection.VIDEO_HORIZONTAL ? '40vp' : '16vp'
... ... @@ -189,21 +189,19 @@ export struct PlayUIComponent {
// 预约
if (this.contentDetailData.liveInfo?.liveState == 'wait') {
Row() {
Image($r('app.media.icon_live_status_wait'))
.width(22)
.height(18)
Text('预约')
.fontSize('11fp')
.fontSize('11vp')
.fontWeight(400)
.fontColor(Color.White)
}
.backgroundColor('#4D000000')
.padding({
top: 1,
right: 4,
bottom: 1
right: 4
})
.borderRadius(2)
}
// 直播中
else if (this.contentDetailData.liveInfo?.liveState == 'running') {
... ... @@ -224,7 +222,7 @@ export struct PlayUIComponent {
}
Text('直播中')
.fontSize('11fp')
.fontSize('11vp')
.fontWeight(400)
.fontColor(Color.White)
... ... @@ -233,7 +231,7 @@ export struct PlayUIComponent {
.width(12)
.height(12)
Text(`${NumberFormatterUtils.formatNumberWithWan(this.liveRoomDataBean.pv)}人参与`)
.fontSize('11fp')
.fontSize('11vp')
.fontWeight(400)
.fontColor(Color.White)
}
... ... @@ -241,9 +239,7 @@ export struct PlayUIComponent {
}
.backgroundColor('#4D000000')
.padding({
top: 1,
right: 4,
bottom: 1,
})
.margin(
{
... ... @@ -252,6 +248,7 @@ export struct PlayUIComponent {
: this.displayDirection === DisplayDirection.VIDEO_HORIZONTAL ? 34 : 0
}
)
.borderRadius(2)
}
//回看
else if (this.contentDetailData.liveInfo?.liveState == 'end') {
... ... @@ -272,15 +269,15 @@ export struct PlayUIComponent {
}
}
.height(18)
.backgroundColor('#4D000000')
.padding({
left: 4,
top: 1,
right: 4,
bottom: 1
}).margin({
left: this.displayDirection == DisplayDirection.VIDEO_HORIZONTAL ? '34vp' : 0
})
.borderRadius(2)
}
}
... ...
... ... @@ -144,7 +144,7 @@ export struct PlayerTitleComponent {
.width(12)
.height(12)
Text(`${NumberFormatterUtils.formatNumberWithWan(this.liveRoomDataBean.pv)}人参与`)
.fontSize('11fp')
.fontSize('11vp')
.fontWeight(400)
.fontColor(Color.White)
}
... ...