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-04-19 17:28:49 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
7c7d25999b12c0693d9d2246cfbb3c93fbfe6316
7c7d2599
1 parent
11de35b1
数据联调
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
184 additions
and
295 deletions
sight_harmony/commons/wdConstant/src/main/ets/enum/CompStyle.ts
sight_harmony/features/wdBean/src/main/ets/bean/content/ContentDTO.ets
sight_harmony/features/wdBean/src/main/ets/bean/content/commentInfo.ets
sight_harmony/features/wdComponent/src/main/ets/components/CompParser.ets
sight_harmony/features/wdComponent/src/main/ets/components/cardCommon/CardSourceInfo.ets
sight_harmony/features/wdComponent/src/main/ets/components/interestAskCard.ets → sight_harmony/features/wdComponent/src/main/ets/components/compview/ZhSingleColumn09.ets
sight_harmony/features/wdComponent/src/main/ets/components/compview/ZhSingleRow02.ets
sight_harmony/features/wdComponent/src/main/ets/components/compview/ZhSingleRow06.ets
sight_harmony/features/wdComponent/src/main/resources/base/media/icon_clip.png
sight_harmony/features/wdComponent/src/main/resources/base/media/icon_elite_comment.png
sight_harmony/features/wdComponent/src/main/resources/base/media/icon_refresh.png
sight_harmony/features/wdComponent/src/main/resources/base/media/icon_selected.png
sight_harmony/commons/wdConstant/src/main/ets/enum/CompStyle.ts
View file @
7c7d259
...
...
@@ -31,10 +31,11 @@ export const enum CompStyle {
Zh_Single_Column_02
=
'Zh_Single_Column-02'
,
//10 头图卡
Zh_Single_Column_03
=
'Zh_Single_Column-03'
,
//9 直播大图卡
Zh_Single_Column_04
=
'Zh_Single_Column-04'
,
//17 人民号主题卡
Zh_Single_Column_05
=
'Zh_Single_Column-05'
,
//16 人民号入驻卡
Zh_Single_Column_05
=
'Zh_Single_Column-05'
,
//16
人民号入驻卡
Zh_Single_Column_06
=
'Zh_Single_Column-06'
,
//12 本地问政卡
Zh_Single_Column_07
=
'Zh_Single_Column-07'
,
//14 热门留言卡
Zh_Single_Column_08
=
'Zh_Single_Column-08'
,
//12 问政提问卡
Zh_Single_Column_09
=
'Zh_Single_Column-09'
,
//12 问政提问卡
Zh_Single_Column_10
=
'Zh_Single_Column-10'
,
//18 服务组合卡
Zh_Single_Column_11
=
'Zh_Single_Column-11'
,
//19 问政组合卡
Zh_Grid_Layout_01
=
'Zh_Grid_Layout-01'
,
//4 信息流组合卡
...
...
sight_harmony/features/wdBean/src/main/ets/bean/content/ContentDTO.ets
View file @
7c7d259
...
...
@@ -5,6 +5,7 @@ import { InteractDataDTO } from './InteractDataDTO';
import { slideShows } from '../morningevening/slideShows';
import { VoiceInfoDTO } from '../detail/VoiceInfoDTO';
import { RmhInfoDTO } from '../detail/RmhInfoDTO'
import {commentInfo} from './commentInfo'
export interface ContentDTO {
appStyle: string;
cityCode: string;
...
...
@@ -75,4 +76,5 @@ export interface ContentDTO {
newTags: string;
titleShow?: number;
isSearch?: boolean; // 是否是搜索的结果,区分搜索和主页的数据
commentInfo?: commentInfo
}
\ No newline at end of file
...
...
sight_harmony/features/wdBean/src/main/ets/bean/content/commentInfo.ets
0 → 100644
View file @
7c7d259
export interface commentInfo {
commentTitle: string,
newsTitle: string,
userName: string,
userHeaderUrl: string,
publishTime: number
}
\ No newline at end of file
...
...
sight_harmony/features/wdComponent/src/main/ets/components/CompParser.ets
View file @
7c7d259
...
...
@@ -11,8 +11,10 @@ import {
} from './view/HorizontalStrokeCardThreeTwoRadioForOneComponent';
import { ZhSingleRow02 } from './compview/ZhSingleRow02';
import { ZhSingleRow04 } from './compview/ZhSingleRow04';
import { ZhSingleRow06 } from './compview/ZhSingleRow06';
import { ZhSingleColumn04 } from './compview/ZhSingleColumn04';
import { ZhSingleColumn05 } from './compview/ZhSingleColumn05';
import { ZhSingleColumn09 } from './compview/ZhSingleColumn09';
import { ZhGridLayout03 } from './compview/ZhGridLayout03';
import { CardParser } from './CardParser';
import { LiveHorizontalReservationComponent } from './view/LiveHorizontalReservationComponent';
...
...
@@ -51,6 +53,8 @@ export struct CompParser {
ZhSingleRow02({ compDTO })
} else if (compDTO.compStyle === CompStyle.Zh_Single_Row_03) {
LiveHorizontalReservationComponent({ compDTO: compDTO })
} else if (compDTO.compStyle === CompStyle.Zh_Single_Row_06) {
ZhSingleRow06({ compDTO })
} else if (compDTO.compStyle === CompStyle.Zh_Grid_Layout_02) {
ZhGridLayout02({ compDTO: compDTO })
} else if (compDTO.compStyle === CompStyle.Zh_Grid_Layout_03) {
...
...
@@ -64,6 +68,8 @@ export struct CompParser {
ZhSingleColumn04({ compDTO: compDTO })
} else if (compDTO.compStyle === CompStyle.Zh_Single_Column_05) {
ZhSingleColumn05({ compDTO: compDTO })
} else if (compDTO.compStyle === CompStyle.Zh_Single_Column_09) {
ZhSingleColumn09({ compDTO: compDTO })
} else if (!Number.isNaN(Number(compDTO.compStyle))) {
CardParser({ contentDTO: compDTO.operDataList[0] });
}
...
...
sight_harmony/features/wdComponent/src/main/ets/components/cardCommon/CardSourceInfo.ets
View file @
7c7d259
...
...
@@ -15,7 +15,7 @@ export struct CardSourceInfo {
.margin({ right: 2 })
}
if (this.contentDTO.rmhPlatform === 1) {
Text(this.contentDTO.rmhInfo.rmhName)
Text(this.contentDTO.rmhInfo
?
.rmhName)
.fontSize($r("app.float.font_size_12"))
.fontColor($r("app.color.color_B0B0B0"))
.maxLines(1)
...
...
sight_harmony/features/wdComponent/src/main/ets/components/
interestAskCard
.ets → sight_harmony/features/wdComponent/src/main/ets/components/
compview/ZhSingleColumn09
.ets
View file @
7c7d259
...
...
@@ -2,18 +2,18 @@ import { CompDTO, ContentDTO, Params } from 'wdBean';
import { WDRouterPage, WDRouterRule } from 'wdRouter/Index';
import { HttpUrlUtils } from 'wdNetwork/Index';
import { postInteractAccentionOperateParams } from 'wdBean';
import { PageRepository } from '../repository/PageRepository';
import { PageRepository } from '../
../
repository/PageRepository';
import { CommonConstants } from 'wdConstant/Index';
/**
* 精选评论卡
* Zh_Single_Row-06
* 兴趣卡
* Zh_Single_Column-09
*/
const TAG = 'Zh_Single_
Row-06
'
const TAG = 'Zh_Single_
Column-09
'
@Entry
@Component
export struct ZhSingle
Row06
{
export struct ZhSingle
Column09
{
@State compDTO: CompDTO = {} as CompDTO
@State list: Array<string> = ['社会', '三个字', '是四个字', '时事', '社会', '三个字', '是四个字', '时事']
@State activeIndexs: Array<number> = []
...
...
@@ -31,14 +31,29 @@ export struct ZhSingleRow06 {
//顶部
this.CompHeader(this.compDTO)
Grid() {
ForEach(this.
list, (item: string
, index: number) => {
ForEach(this.
compDTO.operDataList, (item: ContentDTO
, index: number) => {
GridItem() {
Text(item)
.fontSize(14)
.fontColor(this.activeIndexs.includes(index) ? 0x222222 : 0x666666)
.fontWeight(this.activeIndexs.includes(index) ? 600 : 400)
.textAlign(TextAlign.Center)
Stack({alignContent: Alignment.TopEnd}) {
Image(item.coverUrl)
.width('100%')
.height('100%')
Text(item.newsTitle)
.width('100%')
.height('100%')
.fontSize(14)
.textAlign(TextAlign.Center)
.fontColor(0xffffff)
Image($r('app.media.icon_selected'))
.width(19)
.height(19)
.opacity(this.activeIndexs.includes(index) ? 1 : 0)
.objectFit(ImageFit.Contain)
}
.width('100%')
.height('100%')
.borderRadius(4)
}
.margin({right: index % 4 === 3 ? 0 : 6, bottom: 6})
.onClick(() => {
if (this.activeIndexs.includes(index)) {
const ind = this.activeIndexs.indexOf(index);
...
...
@@ -49,29 +64,32 @@ export struct ZhSingleRow06 {
})
})
}
.height(
7
0)
.height(
9
0)
.columnsTemplate('1fr 1fr 1fr 1fr')
.rowsTemplate('1fr 1fr')
.margin({bottom: 10})
Text('选中标签,为您推荐更多您感兴趣的内容')
.fontSize(12)
.fontColor(0xB0B0B0)
.textAlign(TextAlign.Center)
.margin({bottom: 10})
Row() {
Text('选好了')
.fontSize(14)
.fontColor(0x000000)
.width('100%')
.textAlign(TextAlign.Center)
Row() {
Text('换一换')
.fontSize(14)
.fontColor(0xed2800)
.margin({right: 4})
Image($r('app.media.icon_refresh'))
.width(14)
.height(14)
}
Image($r("app.media.close_button"))
.width(14)
.height(14)
.onClick(() => {
})
}
.height(40)
.backgroundColor(0xf9f9f9)
.width('100%')
.borderRadius(3)
.justifyContent(FlexAlign.SpaceBetween)
}
.padding({
left: $r('app.float.card_comp_pagePadding_lf'),
...
...
@@ -87,30 +105,34 @@ export struct ZhSingleRow06 {
@Builder
CompHeader(item: CompDTO) {
Row() {
Row() {
Image($r("app.media.icon_interest_ask"))
.width(24)
.height(24)
.margin({ right: 4 })
Column() {
Text('以下是否有您感兴趣?')
.fontSize(
$r("app.float.font_size_17")
)
.fontSize(
18
)
.fontColor(0x000000)
.fontWeight(600)
.width('70%')
.margin({bottom: 4})
Text('选中标签,为您推荐更多您感兴趣的内容')
.fontSize(12)
.fontColor(0xB0B0B0)
.margin({bottom: 10})
.width('70%')
}
Row() {
Image($r("app.media.close_button"))
.width(14)
.height(14)
.onClick(() => {
})
}
.padding({
right: $r('app.float.card_comp_pagePadding_lf'),
})
Text('选好了')
.fontColor(0xed2800)
.fontSize(14)
.width(62)
.height(26)
.backgroundColor(0xfdf0ed)
.textAlign(TextAlign.Center)
// .lineHeight(26)
.borderRadius(4)
.margin({top: -10})
}
.justifyContent(FlexAlign.SpaceBetween)
.margin({ top: 8, bottom: 8 })
.width('100%')
}
}
...
...
@@ -119,107 +141,4 @@ export struct ZhSingleRow06 {
function textOverflowStyle(maxLine: number) {
.maxLines(maxLine)
.textOverflow({ overflow: TextOverflow.Ellipsis })
}
@Component
struct CreatorItem {
@Prop item: ContentDTO
@State rmhIsAttention: number = 0
build() {
ListItem() {
Column() {
Flex({direction: FlexDirection.Row, justifyContent: FlexAlign.SpaceBetween}) {
Column() {
Row() {
Image('')
.width(20)
.height(20)
.margin({right: 4})
.border({width: 1, color: 0xcccccc, radius: 10})
Text('立志之间')
.fontColor(0x212228)
.fontSize(12)
}
}
Column() {
Row() {
Image($r('app.media.icon_like_no'))
.width(16)
.height(16)
.margin({right: 4})
Text('3835')
.fontSize(14)
.fontColor(0x999999)
}
}
}
.margin({top: 10, left: 10, right: 10, bottom: 8})
Text('就业不仅是民生问题,也是发展问题,就业不仅是民生问题,也是发展问题,就业不仅是民生问题,也是发展问题,')
.maxLines(2)
.textOverflow({overflow: TextOverflow.Ellipsis})
.margin({left: 10, right: 10, bottom: 8})
.fontSize(17)
.fontColor(0x212228)
.lineHeight(25)
Row() {
Image('')
.width(66)
.height(44)
.borderRadius({topLeft: 3, topRight: 0, bottomLeft: 3, bottomRight: 0})
Text('原文|强化就业优先政策 健全就业促进机制原文|强化就业优先政策 健全就业促进机制原文|强化就业优先政策 健全就业促进机制')
.margin({left: 8})
.width(172)
.maxLines(2)
.textOverflow({overflow: TextOverflow.Ellipsis})
}
.linearGradient({
direction: GradientDirection.Right,
colors: [[0xffffff, 0.0],[0xffffff, 0.8], [0xf9f9f9, 1.0]]
})
}
.width(276)
.height(150)
.margin({ right: 10 })
.borderWidth(1)
.borderColor($r('app.color.color_EDEDED'))
.borderRadius($r('app.float.image_border_radius'))
.backgroundColor(0xf9f9f9)
}
.onClick(() => {
console.log('跳转到rmh');
})
}
/**
* 关注号主 TODO 这里后面需要抽离
*/
handleAccention(item: ContentDTO, status: number) {
this.rmhIsAttention = this.rmhIsAttention ? 0 : 1
return
// 未登录,跳转登录
if (!HttpUrlUtils.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
}
})
}
}
}
\ No newline at end of file
...
...
sight_harmony/features/wdComponent/src/main/ets/components/compview/ZhSingleRow02.ets
View file @
7c7d259
...
...
@@ -4,6 +4,7 @@ import { HttpUrlUtils } from 'wdNetwork/Index';
import { postInteractAccentionOperateParams } from 'wdBean';
import { PageRepository } from '../../repository/PageRepository';
import { CommonConstants } from 'wdConstant/Index';
import { ProcessUtils } from '../../utils/ProcessUtils';
/**
* 小视频横划卡
...
...
@@ -11,59 +12,9 @@ import { CommonConstants } from 'wdConstant/Index';
*/
const TAG = 'Zh_Single_Row-02'
@Entry
@Component
export struct ZhSingleRow02 {
@State compDTO: CompDTO = {
objectTitle: '大标题',
operDataList: [
{
rmhInfo: {
rmhId: '2489729',
rmhName: '陕西青年职业学院',
rmhDesc: '陕西青年职业学院陕西青年职业学院是经陕西省人民政陕西青年职业学院是经陕西省人民政是经陕西省人民政',
rmhHeadUrl: 'https://cdnjdphoto.aikan.pdnews.cn//upload/ueditor/image/20210113/a_533807397399949312' +
'.png?x-oss-process=image/resize,l_100/auto-orient,1/quality,q_90/format,jpg'
}
},
{
rmhInfo: {
rmhId: '2489729',
rmhName: '陕西青年职业学院',
rmhDesc: '陕西青年职业学院陕西青年职业学院是经陕西省人民政陕西青年职业学院是经陕西省人民政是经陕西省人民政',
rmhHeadUrl: 'https://cdnjdphoto.aikan.pdnews.cn//upload/ueditor/image/20210113/a_533807397399949312' +
'.png?x-oss-process=image/resize,l_100/auto-orient,1/quality,q_90/format,jpg'
}
},
{
rmhInfo: {
rmhId: '2489729',
rmhName: '陕西青年职业学院',
rmhDesc: '陕西青年职业学院陕西青年职业学院是经陕西省人民政陕西青年职业学院是经陕西省人民政是经陕西省人民政',
rmhHeadUrl: 'https://cdnjdphoto.aikan.pdnews.cn//upload/ueditor/image/20210113/a_533807397399949312' +
'.png?x-oss-process=image/resize,l_100/auto-orient,1/quality,q_90/format,jpg'
}
},
{
rmhInfo: {
rmhId: '2489729',
rmhName: '陕西青年职业学院',
rmhDesc: '陕西青年职业学院陕西青年职业学院是经陕西省人民政陕西青年职业学院是经陕西省人民政是经陕西省人民政',
rmhHeadUrl: 'https://cdnjdphoto.aikan.pdnews.cn//upload/ueditor/image/20210113/a_533807397399949312' +
'.png?x-oss-process=image/resize,l_100/auto-orient,1/quality,q_90/format,jpg'
}
},
{
rmhInfo: {
rmhId: '2489729',
rmhName: '陕西青年职业学院',
rmhDesc: '陕西青年职业学院陕西青年职业学院是经陕西省人民政陕西青年职业学院是经陕西省人民政是经陕西省人民政',
rmhHeadUrl: 'https://cdnjdphoto.aikan.pdnews.cn//upload/ueditor/image/20210113/a_533807397399949312' +
'.png?x-oss-process=image/resize,l_100/auto-orient,1/quality,q_90/format,jpg'
}
},
]
} as CompDTO
@State compDTO: CompDTO = {} as CompDTO
build() {
Column() {
...
...
@@ -127,6 +78,12 @@ export struct ZhSingleRow02 {
.padding({
right: $r('app.float.card_comp_pagePadding_lf'),
})
.onClick(() => {
let params: Params = {
pageID: "1"
}
WDRouterRule.jumpWithPage(WDRouterPage.followListPage, params)
})
}
.justifyContent(FlexAlign.SpaceBetween)
.margin({ top: 8, bottom: 8 })
...
...
@@ -148,7 +105,7 @@ struct CreatorItem {
ListItem() {
Column() {
Stack({ alignContent: Alignment.Bottom }) {
Image(
''
)
Image(
this.item.coverUrl
)
.width(156)
.height(208)
Row()
...
...
@@ -156,29 +113,25 @@ struct CreatorItem {
.height(80)
.linearGradient({
direction: GradientDirection.Bottom,
colors: [[
0xffffff, 0.0], [0x000000
, 1.0]]
colors: [[
'rgba(0, 0, 0, 0.0)', 0.0], ['rgba(0, 0, 0, 0.3)'
, 1.0]]
})
.opacity(0.3)
Text('这里显示卡片标题这里显示卡片标题这里显示卡片标题这里显示卡片标题这里显示卡片标题')
Text(this.item.newsTitle)
.fontColor(0xffffff)
.fontSize(14)
.maxLines(2)
.textOverflow({overflow: TextOverflow.Ellipsis})
.width(140)
.height(40)
.margin({bottom: 8})
}
}
.width(156)
.height(208)
.margin({ right: 11 })
.borderWidth(1)
.borderColor($r('app.color.color_EDEDED'))
.borderRadius($r('app.float.image_border_radius'))
}
.onClick(() => {
console.log('跳转到rmh');
.onClick((event: ClickEvent) => {
ProcessUtils.processPage(this.item)
})
}
...
...
sight_harmony/features/wdComponent/src/main/ets/components/compview/ZhSingleRow06.ets
View file @
7c7d259
...
...
@@ -3,7 +3,9 @@ import { WDRouterPage, WDRouterRule } from 'wdRouter/Index';
import { HttpUrlUtils } from 'wdNetwork/Index';
import { postInteractAccentionOperateParams } from 'wdBean';
import { PageRepository } from '../../repository/PageRepository';
import { DateTimeUtils } from 'wdKit/Index';
import { CommonConstants } from 'wdConstant/Index';
import { ProcessUtils } from '../../utils/ProcessUtils';
/**
* 精选评论卡
...
...
@@ -11,125 +13,124 @@ import { CommonConstants } from 'wdConstant/Index';
*/
const TAG = 'Zh_Single_Row-06'
@Entry
// interface commentInfo {
// commentTitle: string,
// newsTitle: string,
// userName: string,
// userHeaderUrl: string,
// publishTime: number
// }
// interface operDataListItem {
// commentInfo: commentInfo
// }
// interface CommentData{
// operDataList: Array<operDataListItem>
// }
@Component
export struct ZhSingleRow06 {
@State compDTO: CompDTO = {
objectTitle: '大标题',
operDataList: [
{
rmhInfo: {
rmhId: '2489729',
rmhName: '陕西青年职业学院',
rmhDesc: '陕西青年职业学院陕西青年职业学院是经陕西省人民政陕西青年职业学院是经陕西省人民政是经陕西省人民政',
rmhHeadUrl: 'https://cdnjdphoto.aikan.pdnews.cn//upload/ueditor/image/20210113/a_533807397399949312' +
'.png?x-oss-process=image/resize,l_100/auto-orient,1/quality,q_90/format,jpg'
}
},
{
rmhInfo: {
rmhId: '2489729',
rmhName: '陕西青年职业学院',
rmhDesc: '陕西青年职业学院陕西青年职业学院是经陕西省人民政陕西青年职业学院是经陕西省人民政是经陕西省人民政',
rmhHeadUrl: 'https://cdnjdphoto.aikan.pdnews.cn//upload/ueditor/image/20210113/a_533807397399949312' +
'.png?x-oss-process=image/resize,l_100/auto-orient,1/quality,q_90/format,jpg'
}
},
{
rmhInfo: {
rmhId: '2489729',
rmhName: '陕西青年职业学院',
rmhDesc: '陕西青年职业学院陕西青年职业学院是经陕西省人民政陕西青年职业学院是经陕西省人民政是经陕西省人民政',
rmhHeadUrl: 'https://cdnjdphoto.aikan.pdnews.cn//upload/ueditor/image/20210113/a_533807397399949312' +
'.png?x-oss-process=image/resize,l_100/auto-orient,1/quality,q_90/format,jpg'
}
},
{
rmhInfo: {
rmhId: '2489729',
rmhName: '陕西青年职业学院',
rmhDesc: '陕西青年职业学院陕西青年职业学院是经陕西省人民政陕西青年职业学院是经陕西省人民政是经陕西省人民政',
rmhHeadUrl: 'https://cdnjdphoto.aikan.pdnews.cn//upload/ueditor/image/20210113/a_533807397399949312' +
'.png?x-oss-process=image/resize,l_100/auto-orient,1/quality,q_90/format,jpg'
}
},
{
rmhInfo: {
rmhId: '2489729',
rmhName: '陕西青年职业学院',
rmhDesc: '陕西青年职业学院陕西青年职业学院是经陕西省人民政陕西青年职业学院是经陕西省人民政是经陕西省人民政',
rmhHeadUrl: 'https://cdnjdphoto.aikan.pdnews.cn//upload/ueditor/image/20210113/a_533807397399949312' +
'.png?x-oss-process=image/resize,l_100/auto-orient,1/quality,q_90/format,jpg'
}
},
]
} as CompDTO
@State compDTO: CompDTO = {} as CompDTO
build() {
Column() {
//顶部
this.CompHeader(this.compDTO)
Row(){
// 列表内容
List() {
ForEach(this.compDTO.operDataList, (item: ContentDTO, index: number) => {
CreatorItem({
item
})
.margin({right: index === this.compDTO.operDataList.length - 1 ? $r('app.float.card_comp_pagePadding_lf') : 0})
})
if (this.compDTO.operDataList?.length > 0) {
this.CompHeader(this.compDTO)
}
Column(){
Text(this.compDTO.operDataList[0]?.commentInfo?.commentTitle)
.maxLines(4)
.textOverflow({overflow: TextOverflow.Ellipsis})
.lineHeight(23)
.fontSize(16)
.margin({bottom: 19})
.textAlign(TextAlign.Start)
.width('100%')
Row() {
Image($r('app.media.icon_clip'))
.width(16)
.height(16)
.margin({right: 5})
Text(this.compDTO.operDataList[0]?.commentInfo?.newsTitle)
.maxLines(1)
.textOverflow({overflow: TextOverflow.Ellipsis})
.fontSize(14)
.fontColor(0x666666)
}
.listDirection(Axis.Horizontal)
.justifyContent(FlexAlign.Start)
.width('100%')
}
.width(CommonConstants.FULL_WIDTH)
.height(208)
.width("100%")
.padding({top: 12, bottom: 12, left: 10, right: 10})
.backgroundColor(0xf9f9f9)
.borderRadius(4)
.margin({bottom: 12})
Row() {
Text(DateTimeUtils.getCommentTime(this.compDTO.operDataList[0]?.commentInfo?.publishTime))
.fontSize(14)
.fontColor(0x999999)
Row(){
Image($r('app.media.icon_like_no'))
.width(16)
.height(16)
.margin({right: 3})
Text('点赞')
.fontSize(14)
.fontColor(0x999999)
}
}
.justifyContent(FlexAlign.SpaceBetween)
.width('100%')
}
.padding({
left: $r('app.float.card_comp_pagePadding_lf'),
//
right: $r('app.float.card_comp_pagePadding_lf'),
right: $r('app.float.card_comp_pagePadding_lf'),
top: $r('app.float.card_comp_pagePadding_tb'),
bottom: $r('app.float.card_comp_pagePadding_tb')
})
.backgroundColor($r('app.color.white'))
.margin({ bottom: 8 })
.height(251)
.onClick(() => {
ProcessUtils.processPage(this.compDTO.operDataList[0])
})
}
@Builder
CompHeader(item: CompDTO) {
Row() {
Row() {
Image($r("app.media.icon_elite_comment"))
.width(24)
.height(24)
.margin({ right: 4 })
Text('精选评论')
.fontSize($r("app.float.font_size_17"))
.fontColor($r("app.color.color_222222"))
.fontWeight(600)
Image(item.operDataList[0]?.commentInfo?.userHeaderUrl ? item.operDataList[0].commentInfo.userHeaderUrl : $r('app.media.default_head'))
.width(32)
.height(32)
.borderRadius(16)
.margin({right: 8})
Text(item.operDataList[0]?.commentInfo?.userName)
.lineHeight(32)
.fontSize(14)
.fontColor(0x222222)
.maxLines(1)
.textOverflow({overflow: TextOverflow.Ellipsis})
}
Row() {
Text("更多")
.fontSize($r("app.float.font_size_14"))
.fontColor($r("app.color.color_999999"))
Image($r("app.media.icon_elite_comment"))
.width(45)
.height(22)
.margin({ right: 1 })
Image($r("app.media.more"))
.width(14)
.height(14)
.onClick(() => {
// TODO 跳转的页面,定义的入参可能不合理。推荐id: 41
let params: Params = {
pageID: "1"
}
WDRouterRule.jumpWithPage(WDRouterPage.followListPage, params)
})
}
.padding({
right: $r('app.float.card_comp_pagePadding_lf'),
})
}
.margin({bottom: 10})
.justifyContent(FlexAlign.SpaceBetween)
.margin({ top: 8, bottom: 8 })
.width('100%')
}
}
...
...
sight_harmony/features/wdComponent/src/main/resources/base/media/icon_clip.png
0 → 100644
View file @
7c7d259
1.23 KB
sight_harmony/features/wdComponent/src/main/resources/base/media/icon_elite_comment.png
View file @
7c7d259
2.55 KB
|
W:
|
H:
8.37 KB
|
W:
|
H:
2-up
Swipe
Onion skin
sight_harmony/features/wdComponent/src/main/resources/base/media/icon_refresh.png
0 → 100644
View file @
7c7d259
1.8 KB
sight_harmony/features/wdComponent/src/main/resources/base/media/icon_selected.png
0 → 100644
View file @
7c7d259
765 Bytes
Please
register
or
login
to post a comment