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
王士厅
2024-08-19 15:47:12 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
0cb2dae664c707b8481240033aeb9f7b2a00e45a
0cb2dae6
1 parent
f69f16f1
fix: 鸿蒙走查 无图卡、单图卡、小视频卡、三图卡、大图卡、图集卡ui修改
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
25 additions
and
18 deletions
sight_harmony/features/wdComponent/src/main/ets/components/CompParser.ets
sight_harmony/features/wdComponent/src/main/ets/components/cardCommon/CardMediaInfo.ets
sight_harmony/features/wdComponent/src/main/ets/components/cardCommon/CardSourceInfo.ets
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card17Component.ets
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card2Component.ets
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card3Component.ets
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card4Component.ets
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card6Component.ets
sight_harmony/features/wdComponent/src/main/ets/components/CompParser.ets
View file @
0cb2dae
...
...
@@ -224,6 +224,9 @@ export struct CompParser {
} else {
Divider().strokeWidth(5).color('#f5f5f5').width('120%').margin({left: -6})
}
} else if (this.compDTO.compStyle === CompStyle.Card_03 || this.compDTO.compStyle === CompStyle.Card_13 || this.compDTO.compStyle === CompStyle.Card_06 ||
this.compDTO.compStyle === CompStyle.Card_04 || this.compDTO.compStyle === CompStyle.Card_02 || this.compDTO.compStyle === CompStyle.Card_17) { // 无图卡 左文右图卡 小视频卡 三图卡 大图卡 图集卡
Divider().strokeWidth(1).color('#f5f5f5').width(CommonConstants.FULL_WIDTH).padding({ left: 10, right: 10 }).margin({top:14})
} else if (this.compDTO.compType === 'appStyle' || this.compDTO.compStyle === CompStyle.Zh_Single_Row_01 || this.compDTO.compStyle === CompStyle.Card_Comp_Adv || this.compDTO.compStyle === CompStyle.Zh_Single_Column_02) {
if (
this.nextCompDTO.compStyle === CompStyle.Card_09 ||
...
...
@@ -234,7 +237,6 @@ export struct CompParser {
) {
Divider().strokeWidth(5).color('#f5f5f5').width('120%').margin({left: -6})
} else {
// Divider().strokeWidth(1).color('#f5f5f5').width(CommonConstants.FULL_WIDTH).padding({ left: 10, right: 10 }).margin({top:8})
Divider().strokeWidth(1).color('#f5f5f5').width(CommonConstants.FULL_WIDTH).padding({ left: 10, right: 10 })
}
} else {
...
...
sight_harmony/features/wdComponent/src/main/ets/components/cardCommon/CardMediaInfo.ets
View file @
0cb2dae
...
...
@@ -3,6 +3,7 @@ import { DateTimeUtils } from 'wdKit/Index'
import { LottieView } from '../../components/lottie/LottieView';
import { LiveModel } from '../../viewmodel/LiveModel'
import font from '@ohos.font';
import text from '@ohos.graphics.text';
/**
* 这里是样式卡中,右下角显示的音视频信息
...
...
@@ -27,7 +28,6 @@ export struct CardMediaInfo {
this.getJoinPeopleNum();
}
font.registerFont({
familyName: 'BebasNeue',
familySrc: $rawfile('font/BebasNeue.ttf')
...
...
@@ -82,6 +82,7 @@ export struct CardMediaInfo {
build() {
Row() {
// Text(`${this.contentDTO?.objectType}`)
if (this.contentDTO?.objectType === '1' || this.contentDTO?.objectType === '15') {
// 点播、动态视频
Row() {
...
...
@@ -94,7 +95,7 @@ export struct CardMediaInfo {
}
}
// .margin({ left: 68,top: 135
})
.margin({ right: 8
})
} else if (this.contentDTO.objectType === '2') {
// liveInfo.liveState 直播新闻-直播状态 wait待开播running直播中end已结束cancel已取消paused暂停
// 显示直播信息
...
...
@@ -137,7 +138,7 @@ export struct CardMediaInfo {
.mediaText()
}
}else {
}
else {
// 当liveInfo存在时后
if (this.contentDTO?.liveInfo?.liveState === 'wait') {
...
...
@@ -192,7 +193,7 @@ export struct CardMediaInfo {
.mediaTextImgtype()
.fontFamily('BebasNeue')
}
// .margin({ left: 80,top: 55
})
.margin({ right: 8
})
} else if (this.contentDTO.objectType === '13') {
// 显示音频信息
...
...
sight_harmony/features/wdComponent/src/main/ets/components/cardCommon/CardSourceInfo.ets
View file @
0cb2dae
...
...
@@ -144,7 +144,7 @@ export struct CardSourceInfo {
// 标签
if (this.contentDTO.cornerMark || this.contentDTO.corner) {
Text(this.contentDTO.cornerMark || this.contentDTO.corner)
.fontSize(
$r("app.float.font_size_11")
)
.fontSize(
12
)
.fontColor($r("app.color.color_ED2800"))
.margin({ right: 6 })
.flexShrink(0)
...
...
@@ -153,7 +153,7 @@ export struct CardSourceInfo {
// 来源信息
if (this.contentDTO.rmhPlatform === 1 || this.contentDTO.source) {
Text(this.displayText)
.fontSize(
$r("app.float.font_size_11")
)
.fontSize(
12
)
.fontColor($r("app.color.color_B0B0B0"))
.maxLines(1)
.textOverflow({ overflow: TextOverflow.Ellipsis })
...
...
@@ -183,7 +183,7 @@ export struct CardSourceInfo {
// 发布日期
if (this.showTime()) {
Text(this.handleTimeStr())
.fontSize(
$r("app.float.font_size_11")
)
.fontSize(
12
)
.fontColor($r("app.color.color_B0B0B0"))
.flexShrink(0)
.margin({ right: 4 })
...
...
@@ -196,14 +196,14 @@ export struct CardSourceInfo {
if (this.contentDTO.objectType !=='2' && !this.isCompInnerSource && Number(this.getContentDtoBean()?.interactData?.commentNum) > 0 &&
this.showCommentNum()) {
Text(`${this.handlerNum(this.getContentDtoBean()?.interactData?.commentNum.toString())}评`)
.fontSize(
$r("app.float.font_size_11")
)
.fontSize(
12
)
.fontColor($r("app.color.color_B0B0B0"))
.flexShrink(0)
} else {
if (this.contentDTO.objectType !=='2' && this.isCompInnerSource && this.contentDTO.interactData && this.contentDTO.interactData?.commentNum > 0) {
Text(`${this.handlerNum(this.contentDTO.interactData?.commentNum.toString())}评`)
.fontSize(
$r("app.float.font_size_11")
)
.fontSize(
12
)
.fontColor($r("app.color.color_B0B0B0"))
.flexShrink(0)
}
...
...
@@ -229,11 +229,11 @@ export struct CardSourceInfo {
Span(this.contentDTO.newsTitle)
}
}
.fontSize(
$r('app.float.font_size_11')
)
.fontSize(
12
)
.fontColor($r("app.color.color_B0B0B0"))
.align(Alignment.Start)
.width('100%')
.margin({top:
5
})
.margin({top:
8
})
}
}
.width(CommonConstants.FULL_WIDTH)
...
...
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card17Component.ets
View file @
0cb2dae
...
...
@@ -63,6 +63,9 @@ export struct Card17Component {
.lineHeight(25)
.maxLines(3)
.width(CommonConstants.FULL_WIDTH)
.margin({
top: 14
})
Stack({ alignContent: Alignment.BottomEnd }) {
// 三个图,
...
...
@@ -112,6 +115,7 @@ export struct Card17Component {
CardMediaInfo({ contentDTO: this.contentDTO })
}
.width(CommonConstants.FULL_WIDTH)
.margin({ top: 8 })
.onClick((event: ClickEvent) => {
InfomationCardClick.track(this.compDTO, this.contentDTO, this.pageId, this.pageName)
if (router.getState().name !== 'MyCollectionListPage') {
...
...
@@ -133,7 +137,7 @@ export struct Card17Component {
})
// 评论等信息
CardSourceInfo({ compDTO: this.compDTO, contentDTO: this.contentDTO
, viewShowData: false
})
CardSourceInfo({ compDTO: this.compDTO, contentDTO: this.contentDTO })
}
.padding({
left: 10,
...
...
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card2Component.ets
View file @
0cb2dae
...
...
@@ -79,7 +79,7 @@ export struct Card2Component {
.fontSize($r('app.float.font_size_18'))
.fontColor(this.clicked ? 0x848484 : $r('app.color.color_222222'))
.maxLines(2)
.lineHeight(2
7
)
.lineHeight(2
5
)
.textOverflow({ overflow: TextOverflow.Ellipsis }) // 超出的部分显示省略号。
.align(Alignment.Start)
.textIndent((this.contentDTO.newTags?.length || this.contentDTO.seoTags?.length) > 2 &&
...
...
@@ -106,8 +106,8 @@ export struct Card2Component {
})
}
.alignContent(Alignment.BottomEnd)
.margin({ top: 8 })
}
.margin({ top: 8 })
.width(CommonConstants.FULL_WIDTH)
.alignItems(HorizontalAlign.Start)
...
...
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card3Component.ets
View file @
0cb2dae
...
...
@@ -65,7 +65,7 @@ export struct Card3Component {
Span(this.contentDTO.newsTitle)
}
}
.lineHeight(2
7
)
.lineHeight(2
5
)
.fontSize($r("app.float.font_size_18"))
.fontColor(this.clicked ? 0x848484 : $r("app.color.color_222222"))
.width(CommonConstants.FULL_WIDTH)
...
...
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card4Component.ets
View file @
0cb2dae
...
...
@@ -76,7 +76,7 @@ export struct Card4Component {
}
}
.fontSize(17.5)
.lineHeight(2
7
)
.lineHeight(2
5
)
.fontColor(this.clicked ? 0x848484 : $r('app.color.color_222222'))
.maxLines(3)
.textOverflow({ overflow: TextOverflow.Ellipsis })
...
...
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card6Component.ets
View file @
0cb2dae
...
...
@@ -76,7 +76,7 @@ export struct Card6Component {
}
.fontColor(this.clicked ? 0x848484 : 0x222222)
.fontSize(18)
.lineHeight(2
7
)
.lineHeight(2
5
)
.fontWeight(FontWeight.Normal)
.maxLines(this.contentDTO.appStyle === '6' ? 4 : 3)
.alignSelf(ItemAlign.Start)
...
...
Please
register
or
login
to post a comment