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-05-30 17:31:53 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
e746043e47bee7f6ec30b0959d56390ed611cada
e746043e
1 parent
88f0ec9b
feat: 17052 UI还原问题--【生产环境】直播预告-横滑卡左右边距问题,看图
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
70 additions
and
79 deletions
sight_harmony/features/wdComponent/src/main/ets/components/compview/ZhSingleRow03.ets
sight_harmony/features/wdComponent/src/main/ets/components/compview/ZhSingleRow03.ets
View file @
e746043
...
...
@@ -208,6 +208,7 @@ export struct ZhSingleRow03 {
@Builder
ItemCard(item: ContentDTO) {
if (this.compDTO.operDataList.length >= 2) {
Column() {
Row() {
Image(this.loadImg ? item.coverUrl : '')
...
...
@@ -215,6 +216,7 @@ export struct ZhSingleRow03 {
.height(60)
.margin({right: 12})
.backgroundColor(0xf5f5f5)
.margin({right: 12})
Text(item.newsTitle)
.width(154)
...
...
@@ -273,6 +275,74 @@ export struct ZhSingleRow03 {
InfomationCardClick.track(this.compDTO, item, this.pageId, this.pageName)
ProcessUtils.processPage(item)
})
} else {
Column() {
Row() {
Image(this.loadImg ? item.coverUrl : '')
.width(106)
.height(60)
.backgroundColor(0xf5f5f5)
.margin({right: 12})
Text(item.newsTitle)
.width(201)
.height(60)
.maxLines(3)
.textOverflow({overflow: TextOverflow.Ellipsis})
}
.margin({bottom: 16})
.justifyContent(FlexAlign.Start)
Row() {
Flex({justifyContent: FlexAlign.SpaceBetween}){
Row() {
Text(this.format(new Date(item.liveInfo.liveStartTime).getTime()))
.margin({right: 6})
.fontColor(0x000000)
.fontSize(13)
.textAlign(TextAlign.Start)
Image($r('app.media.timeline_rect'))
.width(4)
.height(3)
.margin({right: 6})
Text(item.liveInfo.liveStartTime.split(' ')[1].slice(0, 5))
.margin({right: 6})
.fontColor(0x000000)
.fontSize(13)
Text('开始直播')
.fontColor(0xC8C8C8)
.fontSize(13)
}
Row() {
Text(this.isReserved(Number(item.objectId)) ? '已预约' : '预约')
.width(48)
.height(24)
.backgroundColor(this.isReserved(Number(item.objectId)) ? 0xffffff : 0xED2800)
.fontColor(this.isReserved(Number(item.objectId)) ? 0xC8C8C8 : 0xffffff)
.fontSize(12)
.textAlign(TextAlign.Center)
.borderRadius(3)
.onClick(() => {
this.bookAndCancel(item.relId, item.objectId, !this.isReserved(Number(item.objectId)))
})
}
.margin({top: -5})
}
}
}
.width('100%')
.height(116)
.padding({top: 12, bottom: 12, left: 12, right: 12})
.backgroundColor(0xf9f9f9)
.margin({right: 8})
.onClick(() => {
InfomationCardClick.track(this.compDTO, item, this.pageId, this.pageName)
ProcessUtils.processPage(item)
})
}
}
...
...
@@ -299,9 +369,6 @@ export struct ZhSingleRow03 {
.width(14)
.height(14)
}
.padding({
right: $r('app.float.card_comp_pagePadding_lf'),
})
.onClick(() => {
this.jumpToMore();
})
...
...
@@ -337,79 +404,3 @@ function textOverflowStyle(maxLine: number) {
.textOverflow({ overflow: TextOverflow.Ellipsis })
}
@Component
struct CreatorItem {
@Prop item: ContentDTO
@State rmhIsAttention: number = 0
@State loadImg: boolean = false;
async aboutToAppear(): Promise<void> {
this.loadImg = await onlyWifiLoadImg();
}
build() {
ListItem() {
Column() {
Stack({ alignContent: Alignment.Bottom }) {
Image(this.loadImg ? this.item.coverUrl : '')
.backgroundColor(0xf5f5f5)
.width(156)
.height(208)
.border({width: 1})
.borderRadius(3)
Row()
.width(156)
.height(80)
.linearGradient({
direction: GradientDirection.Bottom,
colors: [['rgba(0, 0, 0, 0.0)', 0.0], ['rgba(0, 0, 0, 0.3)', 1.0]]
})
Text(this.item.newsTitle)
.fontColor(0xffffff)
.fontSize(14)
.maxLines(2)
.textOverflow({overflow: TextOverflow.Ellipsis})
.width(140)
.margin({bottom: 8})
}
}
.width(156)
.height(208)
.margin({ right: 11 })
.borderColor($r('app.color.color_EDEDED'))
.borderRadius($r('app.float.image_border_radius'))
}
.onClick((event: ClickEvent) => {
ProcessUtils.processPage(this.item)
})
}
/**
* 关注号主 TODO 这里后面需要抽离
*/
handleAccention(item: ContentDTO, status: number) {
this.rmhIsAttention = this.rmhIsAttention ? 0 : 1
return
// 未登录,跳转登录
if (!HttpUtils.getUserId()) {
WDRouterRule.jumpWithPage(WDRouterPage.loginPage)
return
}
const params: postInteractAccentionOperateParams = {
attentionUserType: item.rmhInfo?.userType || '', //被关注用户类型(1 普通用户 2 视频号 3 矩阵号)
attentionUserId: item.rmhInfo?.userId || '', // 被关注用户号主id
attentionCreatorId: item.rmhInfo?.rmhId || '', // 被关注用户号主id
// userType: 1,
// userId: '1', // TODO 用户id需要从本地获取
status: status,
}
PageRepository.postInteractAccentionOperate(params).then(res => {
console.log(TAG, '关注号主==', JSON.stringify(res.data))
if (status === 1) {
this.rmhIsAttention = 0
} else {
this.rmhIsAttention = 1
}
})
}
}
...
...
Please
register
or
login
to post a comment