Toggle navigation
Toggle navigation
This project
Loading...
Sign in
developOne
/
harmonyPool
Go to a project
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
yumaochao
2024-05-28 15:07:25 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
0a5b0e06104547472179edf2730b1bd36deff139
0a5b0e06
1 parent
631f9275
fix:somebug
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
1 deletions
sight_harmony/features/wdComponent/src/main/ets/components/cardCommon/CardMediaInfo.ets
sight_harmony/features/wdComponent/src/main/ets/components/compview/ZhCarouselLayout01.ets
sight_harmony/features/wdComponent/src/main/ets/components/cardCommon/CardMediaInfo.ets
View file @
0a5b0e0
...
...
@@ -14,6 +14,8 @@ import font from '@ohos.font';
export struct CardMediaInfo {
@State livePeopleNum :boolean = true
//@ObjectLink compDTO: CompDTO
@State beused: string = ''; // 2024-05-28 给CardMediaInfo组件添加beused的字段让其知道被哪个组件使用,不传默认为空
@State contentDTO: ContentDTO = new ContentDTO() // 如果有duraion,代表点播,显示时长;如果不传或者传0,显示直播中
@State joinPeopleNum: number = 0;
// objectType 0:不跳转 1:点播,2:直播,3:活动,4:广告,5:专题,6:链接,7:榜单,8:图文,9:组图,10:H5新闻,11:频道,12:组件,13:音频,
...
...
@@ -154,12 +156,17 @@ export struct CardMediaInfo {
}
}
// 备注直播间观看人数在轮播图卡不显示
if(this.beused !== 'Zh_Carousel_Layout_01'){
if (!!this.joinPeopleNum) {
Text(' | ')
.mediaText()
Text(`${this.handlerNum(this.joinPeopleNum.toString())}人参加`)
.mediaText()
}
}
// } else if (this.contentDTO?.liveInfo?.liveState === 'end' && this.contentDTO?.liveInfo
// ?.replayUri) {
// // Image($r('app.media.card_live'))
...
...
sight_harmony/features/wdComponent/src/main/ets/components/compview/ZhCarouselLayout01.ets
View file @
0a5b0e0
...
...
@@ -204,7 +204,8 @@ struct CarouselLayout01CardView {
Column() {
// 这里用于展示轮播图右上角信息,这里只对直播类型的展示
if (this.item.objectType === '2' || this.item.objectType === '4') {
CardMediaInfo({ contentDTO: this.item,livePeopleNum:false })
// 2024-05-28 给CardMediaInfo组件添加beused的字段让其知道被哪个组件使用,不传默认为空
CardMediaInfo({ contentDTO: this.item,livePeopleNum:false ,beused:'Zh_Carousel_Layout_01'})
.width(CommonConstants.FULL_PARENT)
}
Blank()
...
...
Please
register
or
login
to post a comment