陈剑华

fix: 16705 阅读频道专题返回后鸿蒙版缺少置灰颜色变化

@@ -12,12 +12,13 @@ const TAG = 'Card11Component'; @@ -12,12 +12,13 @@ const TAG = 'Card11Component';
12 @Component 12 @Component
13 export struct Card11Component { 13 export struct Card11Component {
14 @State contentDTO: ContentDTO = {} as ContentDTO; 14 @State contentDTO: ContentDTO = {} as ContentDTO;
  15 + @State clicked: boolean = false;
15 16
16 build() { 17 build() {
17 Column() { 18 Column() {
18 Text(this.contentDTO.newsTitle) 19 Text(this.contentDTO.newsTitle)
19 .fontSize($r("app.float.font_size_16")) 20 .fontSize($r("app.float.font_size_16"))
20 - .fontColor($r("app.color.color_222222")) 21 + .fontColor(this.clicked ? 0x848484 : $r("app.color.color_222222"))
21 .maxLines(3) 22 .maxLines(3)
22 .textOverflow({ overflow: TextOverflow.Ellipsis }) 23 .textOverflow({ overflow: TextOverflow.Ellipsis })
23 .width(CommonConstants.FULL_WIDTH) 24 .width(CommonConstants.FULL_WIDTH)
@@ -32,6 +33,8 @@ export struct Card11Component { @@ -32,6 +33,8 @@ export struct Card11Component {
32 }) 33 })
33 .backgroundColor($r("app.color.white")) 34 .backgroundColor($r("app.color.white"))
34 .onClick((event: ClickEvent) => { 35 .onClick((event: ClickEvent) => {
  36 +
  37 + this.clicked = true;
35 ProcessUtils.processPage(this.contentDTO) 38 ProcessUtils.processPage(this.contentDTO)
36 }) 39 })
37 } 40 }
@@ -13,6 +13,7 @@ const TAG = 'Card12Component'; @@ -13,6 +13,7 @@ const TAG = 'Card12Component';
13 @Component 13 @Component
14 export struct Card12Component { 14 export struct Card12Component {
15 @State contentDTO: ContentDTO = {} as ContentDTO; 15 @State contentDTO: ContentDTO = {} as ContentDTO;
  16 + @State clicked: boolean = false;
16 17
17 aboutToAppear(): void { 18 aboutToAppear(): void {
18 } 19 }
@@ -27,7 +28,7 @@ export struct Card12Component { @@ -27,7 +28,7 @@ export struct Card12Component {
27 if (this.contentDTO.newsTitle) { 28 if (this.contentDTO.newsTitle) {
28 Text(this.contentDTO.newsTitle) 29 Text(this.contentDTO.newsTitle)
29 .fontSize($r('app.float.font_size_17')) 30 .fontSize($r('app.float.font_size_17'))
30 - .fontColor($r('app.color.color_222222')) 31 + .fontColor(this.clicked ? 0x848484 : $r('app.color.color_222222'))
31 .width(CommonConstants.FULL_WIDTH) 32 .width(CommonConstants.FULL_WIDTH)
32 .textOverflowStyle(3) 33 .textOverflowStyle(3)
33 .margin({ bottom: 8 }) 34 .margin({ bottom: 8 })
@@ -45,6 +46,7 @@ export struct Card12Component { @@ -45,6 +46,7 @@ export struct Card12Component {
45 bottom: $r('app.float.card_comp_pagePadding_tb') 46 bottom: $r('app.float.card_comp_pagePadding_tb')
46 }) 47 })
47 .onClick((event: ClickEvent) => { 48 .onClick((event: ClickEvent) => {
  49 + this.clicked = true;
48 ProcessUtils.processPage(this.contentDTO) 50 ProcessUtils.processPage(this.contentDTO)
49 }) 51 })
50 } 52 }
@@ -15,6 +15,7 @@ const TAG = 'Card14Component'; @@ -15,6 +15,7 @@ const TAG = 'Card14Component';
15 export struct Card14Component { 15 export struct Card14Component {
16 @State contentDTO: ContentDTO = {} as ContentDTO; 16 @State contentDTO: ContentDTO = {} as ContentDTO;
17 @State loadImg: boolean = false; 17 @State loadImg: boolean = false;
  18 + @State clicked: boolean = false;
18 19
19 async aboutToAppear(): Promise<void> { 20 async aboutToAppear(): Promise<void> {
20 this.loadImg = await onlyWifiLoadImg(); 21 this.loadImg = await onlyWifiLoadImg();
@@ -31,7 +32,7 @@ export struct Card14Component { @@ -31,7 +32,7 @@ export struct Card14Component {
31 32
32 Text(this.contentDTO.newsTitle) 33 Text(this.contentDTO.newsTitle)
33 .fontSize($r('app.float.font_size_17')) 34 .fontSize($r('app.float.font_size_17'))
34 - .fontColor($r('app.color.color_222222')) 35 + .fontColor(this.clicked ? 0x848484 : $r('app.color.color_222222'))
35 .textOverflowStyle(3) 36 .textOverflowStyle(3)
36 .lineHeight(25) 37 .lineHeight(25)
37 .fontFamily('PingFang SC-Regular') 38 .fontFamily('PingFang SC-Regular')
@@ -63,6 +64,7 @@ export struct Card14Component { @@ -63,6 +64,7 @@ export struct Card14Component {
63 bottom: $r('app.float.card_comp_pagePadding_tb') 64 bottom: $r('app.float.card_comp_pagePadding_tb')
64 }) 65 })
65 .onClick((event: ClickEvent) => { 66 .onClick((event: ClickEvent) => {
  67 + this.clicked = true;
66 ProcessUtils.processPage(this.contentDTO) 68 ProcessUtils.processPage(this.contentDTO)
67 }) 69 })
68 } 70 }
@@ -19,6 +19,7 @@ const TAG: string = 'Card15Component'; @@ -19,6 +19,7 @@ const TAG: string = 'Card15Component';
19 export struct Card15Component { 19 export struct Card15Component {
20 @State contentDTO: ContentDTO = {} as ContentDTO; 20 @State contentDTO: ContentDTO = {} as ContentDTO;
21 @State loadImg: boolean = false; 21 @State loadImg: boolean = false;
  22 + @State clicked: boolean = false;
22 23
23 async aboutToAppear(): Promise<void> { 24 async aboutToAppear(): Promise<void> {
24 this.loadImg = await onlyWifiLoadImg(); 25 this.loadImg = await onlyWifiLoadImg();
@@ -33,7 +34,7 @@ export struct Card15Component { @@ -33,7 +34,7 @@ export struct Card15Component {
33 if (this.contentDTO.newsTitle) { 34 if (this.contentDTO.newsTitle) {
34 Text(this.contentDTO.newsTitle) 35 Text(this.contentDTO.newsTitle)
35 .fontSize($r('app.float.font_size_17')) 36 .fontSize($r('app.float.font_size_17'))
36 - .fontColor($r('app.color.color_222222')) 37 + .fontColor(this.clicked ? 0x848484 : $r('app.color.color_222222'))
37 .width(CommonConstants.FULL_WIDTH) 38 .width(CommonConstants.FULL_WIDTH)
38 .textOverflowStyle(2) 39 .textOverflowStyle(2)
39 .margin({ bottom: 8 }) 40 .margin({ bottom: 8 })
@@ -61,6 +62,7 @@ export struct Card15Component { @@ -61,6 +62,7 @@ export struct Card15Component {
61 bottom: $r('app.float.card_comp_pagePadding_tb') 62 bottom: $r('app.float.card_comp_pagePadding_tb')
62 }) 63 })
63 .onClick((event: ClickEvent) => { 64 .onClick((event: ClickEvent) => {
  65 + this.clicked = true;
64 ProcessUtils.processPage(this.contentDTO) 66 ProcessUtils.processPage(this.contentDTO)
65 }) 67 })
66 } 68 }
@@ -20,6 +20,7 @@ interface fullColumnImgUrlItem { @@ -20,6 +20,7 @@ interface fullColumnImgUrlItem {
20 export struct Card16Component { 20 export struct Card16Component {
21 @State contentDTO: ContentDTO = {} as ContentDTO; 21 @State contentDTO: ContentDTO = {} as ContentDTO;
22 @State loadImg: boolean = false; 22 @State loadImg: boolean = false;
  23 + @State clicked: boolean = false;
23 24
24 async aboutToAppear(): Promise<void> { 25 async aboutToAppear(): Promise<void> {
25 this.loadImg = await onlyWifiLoadImg(); 26 this.loadImg = await onlyWifiLoadImg();
@@ -35,7 +36,7 @@ export struct Card16Component { @@ -35,7 +36,7 @@ export struct Card16Component {
35 if (this.contentDTO.newsTitle) { 36 if (this.contentDTO.newsTitle) {
36 Text(this.contentDTO.newsTitle) 37 Text(this.contentDTO.newsTitle)
37 .fontSize($r('app.float.font_size_17')) 38 .fontSize($r('app.float.font_size_17'))
38 - .fontColor($r('app.color.color_222222')) 39 + .fontColor(this.clicked ? 0x848484 : $r('app.color.color_222222'))
39 .width(CommonConstants.FULL_WIDTH) 40 .width(CommonConstants.FULL_WIDTH)
40 .textOverflowStyle(2) 41 .textOverflowStyle(2)
41 .margin({ bottom: 8 }) 42 .margin({ bottom: 8 })
@@ -62,6 +63,7 @@ export struct Card16Component { @@ -62,6 +63,7 @@ export struct Card16Component {
62 bottom: $r('app.float.card_comp_pagePadding_tb') 63 bottom: $r('app.float.card_comp_pagePadding_tb')
63 }) 64 })
64 .onClick((event: ClickEvent) => { 65 .onClick((event: ClickEvent) => {
  66 + this.clicked = true;
65 ProcessUtils.processPage(this.contentDTO) 67 ProcessUtils.processPage(this.contentDTO)
66 }) 68 })
67 } 69 }
@@ -17,6 +17,7 @@ export struct Card17Component { @@ -17,6 +17,7 @@ export struct Card17Component {
17 @State compDTO: CompDTO = {} as CompDTO 17 @State compDTO: CompDTO = {} as CompDTO
18 @State contentDTO: ContentDTO = {} as ContentDTO; 18 @State contentDTO: ContentDTO = {} as ContentDTO;
19 @State loadImg: boolean = false; 19 @State loadImg: boolean = false;
  20 + @State clicked: boolean = false;
20 21
21 async aboutToAppear(): Promise<void> { 22 async aboutToAppear(): Promise<void> {
22 this.loadImg = await onlyWifiLoadImg(); 23 this.loadImg = await onlyWifiLoadImg();
@@ -28,7 +29,7 @@ export struct Card17Component { @@ -28,7 +29,7 @@ export struct Card17Component {
28 Text(this.contentDTO.newsTitle) 29 Text(this.contentDTO.newsTitle)
29 .textOverflow({ overflow: TextOverflow.Ellipsis }) 30 .textOverflow({ overflow: TextOverflow.Ellipsis })
30 .fontSize($r('app.float.font_size_17')) 31 .fontSize($r('app.float.font_size_17'))
31 - .fontColor($r('app.color.color_222222')) 32 + .fontColor(this.clicked ? 0x848484 : $r('app.color.color_222222'))
32 .lineHeight(25) 33 .lineHeight(25)
33 .maxLines(3) 34 .maxLines(3)
34 .width(CommonConstants.FULL_WIDTH) 35 .width(CommonConstants.FULL_WIDTH)
@@ -79,6 +80,7 @@ export struct Card17Component { @@ -79,6 +80,7 @@ export struct Card17Component {
79 } 80 }
80 .width(CommonConstants.FULL_WIDTH) 81 .width(CommonConstants.FULL_WIDTH)
81 .onClick((event: ClickEvent) => { 82 .onClick((event: ClickEvent) => {
  83 + this.clicked = true;
82 let taskAction: Action = { 84 let taskAction: Action = {
83 type: 'JUMP_DETAIL_PAGE', 85 type: 'JUMP_DETAIL_PAGE',
84 params: { 86 params: {
@@ -14,6 +14,7 @@ const TAG = 'Card19Component'; @@ -14,6 +14,7 @@ const TAG = 'Card19Component';
14 export struct Card19Component { 14 export struct Card19Component {
15 @State contentDTO: ContentDTO = { 15 @State contentDTO: ContentDTO = {
16 } as ContentDTO 16 } as ContentDTO
  17 + @State clicked: boolean = false;
17 18
18 build() { 19 build() {
19 Column() { 20 Column() {
@@ -23,11 +24,12 @@ export struct Card19Component { @@ -23,11 +24,12 @@ export struct Card19Component {
23 if (this.contentDTO.newsTitle) { 24 if (this.contentDTO.newsTitle) {
24 Text(this.contentDTO.newsTitle) 25 Text(this.contentDTO.newsTitle)
25 .fontSize($r('app.float.font_size_17')) 26 .fontSize($r('app.float.font_size_17'))
26 - .fontColor($r('app.color.color_222222')) 27 + .fontColor(this.clicked ? 0x848484 : $r('app.color.color_222222'))
27 .textOverflowStyle(3) 28 .textOverflowStyle(3)
28 .margin({ bottom: 8 }) 29 .margin({ bottom: 8 })
29 .width(CommonConstants.FULL_WIDTH) 30 .width(CommonConstants.FULL_WIDTH)
30 .onClick((event: ClickEvent) => { 31 .onClick((event: ClickEvent) => {
  32 + this.clicked = true;
31 ProcessUtils.processPage(this.contentDTO) 33 ProcessUtils.processPage(this.contentDTO)
32 }) 34 })
33 } 35 }
@@ -55,6 +57,7 @@ export struct Card19Component { @@ -55,6 +57,7 @@ export struct Card19Component {
55 bottom: $r('app.float.card_comp_pagePadding_tb') 57 bottom: $r('app.float.card_comp_pagePadding_tb')
56 }) 58 })
57 .onClick((event: ClickEvent) => { 59 .onClick((event: ClickEvent) => {
  60 + this.clicked = true;
58 ProcessUtils.processPage(this.contentDTO) 61 ProcessUtils.processPage(this.contentDTO)
59 }) 62 })
60 } 63 }
@@ -15,6 +15,7 @@ const TAG = 'Card20Component'; @@ -15,6 +15,7 @@ const TAG = 'Card20Component';
15 export struct Card20Component { 15 export struct Card20Component {
16 @State contentDTO: ContentDTO = { 16 @State contentDTO: ContentDTO = {
17 } as ContentDTO; 17 } as ContentDTO;
  18 + @State clicked: boolean = false;
18 19
19 aboutToAppear(): void { 20 aboutToAppear(): void {
20 } 21 }
@@ -27,7 +28,7 @@ export struct Card20Component { @@ -27,7 +28,7 @@ export struct Card20Component {
27 if (this.contentDTO.newsTitle) { 28 if (this.contentDTO.newsTitle) {
28 Text(this.contentDTO.newsTitle) 29 Text(this.contentDTO.newsTitle)
29 .fontSize($r('app.float.font_size_17')) 30 .fontSize($r('app.float.font_size_17'))
30 - .fontColor($r('app.color.color_222222')) 31 + .fontColor(this.clicked ? 0x848484 : $r('app.color.color_222222'))
31 .width(CommonConstants.FULL_WIDTH) 32 .width(CommonConstants.FULL_WIDTH)
32 .textOverflowStyle(3) 33 .textOverflowStyle(3)
33 .margin({ bottom: 8 }) 34 .margin({ bottom: 8 })
@@ -46,6 +47,7 @@ export struct Card20Component { @@ -46,6 +47,7 @@ export struct Card20Component {
46 bottom: $r('app.float.card_comp_pagePadding_tb') 47 bottom: $r('app.float.card_comp_pagePadding_tb')
47 }) 48 })
48 .onClick((event: ClickEvent) => { 49 .onClick((event: ClickEvent) => {
  50 + this.clicked = true;
49 ProcessUtils.processPage(this.contentDTO) 51 ProcessUtils.processPage(this.contentDTO)
50 }) 52 })
51 } 53 }
@@ -15,6 +15,7 @@ const TAG: string = 'Card6Component-Card13Component'; @@ -15,6 +15,7 @@ const TAG: string = 'Card6Component-Card13Component';
15 export struct Card21Component { 15 export struct Card21Component {
16 @State contentDTO: ContentDTO = {} as ContentDTO; 16 @State contentDTO: ContentDTO = {} as ContentDTO;
17 @State loadImg: boolean = false; 17 @State loadImg: boolean = false;
  18 + @State clicked: boolean = false;
18 19
19 async aboutToAppear(): Promise<void> { 20 async aboutToAppear(): Promise<void> {
20 this.loadImg = await onlyWifiLoadImg(); 21 this.loadImg = await onlyWifiLoadImg();
@@ -29,7 +30,7 @@ export struct Card21Component { @@ -29,7 +30,7 @@ export struct Card21Component {
29 GridItem() { 30 GridItem() {
30 Text(`${this.contentDTO.newsTitle}`) 31 Text(`${this.contentDTO.newsTitle}`)
31 .fontSize($r('app.float.selected_text_size')) 32 .fontSize($r('app.float.selected_text_size'))
32 - .fontColor($r('app.color.color_222222')) 33 + .fontColor(this.clicked ? 0x848484 : $r('app.color.color_222222'))
33 .width(CommonConstants.FULL_WIDTH) 34 .width(CommonConstants.FULL_WIDTH)
34 .maxLines(4) 35 .maxLines(4)
35 .textOverflow({ overflow: TextOverflow.Ellipsis }) 36 .textOverflow({ overflow: TextOverflow.Ellipsis })
@@ -54,6 +55,7 @@ export struct Card21Component { @@ -54,6 +55,7 @@ export struct Card21Component {
54 //TODO 底部的:分享、评论、点赞 功能;需要引用一个公共组件 55 //TODO 底部的:分享、评论、点赞 功能;需要引用一个公共组件
55 } 56 }
56 .onClick((event: ClickEvent) => { 57 .onClick((event: ClickEvent) => {
  58 + this.clicked = true;
57 ProcessUtils.processPage(this.contentDTO) 59 ProcessUtils.processPage(this.contentDTO)
58 }) 60 })
59 .padding({ 61 .padding({
@@ -20,6 +20,7 @@ const TAG: string = 'Card2Component'; @@ -20,6 +20,7 @@ const TAG: string = 'Card2Component';
20 export struct Card2Component { 20 export struct Card2Component {
21 @State contentDTO: ContentDTO = {} as ContentDTO; 21 @State contentDTO: ContentDTO = {} as ContentDTO;
22 @State loadImg: boolean = false; 22 @State loadImg: boolean = false;
  23 + @State clicked: boolean = false;
23 24
24 async aboutToAppear(): Promise<void> { 25 async aboutToAppear(): Promise<void> {
25 this.loadImg = await onlyWifiLoadImg(); 26 this.loadImg = await onlyWifiLoadImg();
@@ -35,7 +36,7 @@ export struct Card2Component { @@ -35,7 +36,7 @@ export struct Card2Component {
35 } 36 }
36 Text(this.contentDTO.newsTitle) 37 Text(this.contentDTO.newsTitle)
37 .fontSize($r('app.float.font_size_17')) 38 .fontSize($r('app.float.font_size_17'))
38 - .fontColor($r('app.color.color_222222')) 39 + .fontColor(this.clicked ? 0x848484 : $r('app.color.color_222222'))
39 .maxLines(2) 40 .maxLines(2)
40 .textOverflow({ overflow: TextOverflow.Ellipsis })// 超出的部分显示省略号。 41 .textOverflow({ overflow: TextOverflow.Ellipsis })// 超出的部分显示省略号。
41 .align(Alignment.Start) 42 .align(Alignment.Start)
@@ -73,6 +74,7 @@ export struct Card2Component { @@ -73,6 +74,7 @@ export struct Card2Component {
73 bottom: $r('app.float.card_comp_pagePadding_tb') 74 bottom: $r('app.float.card_comp_pagePadding_tb')
74 }) 75 })
75 .onClick((event: ClickEvent) => { 76 .onClick((event: ClickEvent) => {
  77 + this.clicked = true;
76 ProcessUtils.processPage(this.contentDTO) 78 ProcessUtils.processPage(this.contentDTO)
77 }) 79 })
78 } 80 }
@@ -10,22 +10,14 @@ import { CardSourceInfo } from '../cardCommon/CardSourceInfo' @@ -10,22 +10,14 @@ import { CardSourceInfo } from '../cardCommon/CardSourceInfo'
10 @Component 10 @Component
11 export struct Card3Component { 11 export struct Card3Component {
12 @State contentDTO: ContentDTO = { 12 @State contentDTO: ContentDTO = {
13 - // appStyle: '3',  
14 - // channelId: '2002',  
15 - // newsTitle: '习近平向斯洛伐克当选总统佩',  
16 - // objectId: '30044351686',  
17 - // objectType: '8',  
18 - // publishTime: '1712967589000',  
19 - // relId: '500005307414',  
20 - // relType: '1',  
21 - // source: '新华社',  
22 } as ContentDTO; 13 } as ContentDTO;
  14 + @State clicked: boolean = false;
23 15
24 build() { 16 build() {
25 Column() { 17 Column() {
26 Text(this.contentDTO.newsTitle) 18 Text(this.contentDTO.newsTitle)
27 .fontSize($r("app.float.font_size_16")) 19 .fontSize($r("app.float.font_size_16"))
28 - .fontColor($r("app.color.color_222222")) 20 + .fontColor(this.clicked ? 0x848484 : $r("app.color.color_222222"))
29 .width(CommonConstants.FULL_WIDTH) 21 .width(CommonConstants.FULL_WIDTH)
30 // 评论等信息 22 // 评论等信息
31 CardSourceInfo({ contentDTO: this.contentDTO }) 23 CardSourceInfo({ contentDTO: this.contentDTO })
@@ -38,6 +30,7 @@ export struct Card3Component { @@ -38,6 +30,7 @@ export struct Card3Component {
38 bottom: $r('app.float.card_comp_pagePadding_tb') 30 bottom: $r('app.float.card_comp_pagePadding_tb')
39 }) 31 })
40 .onClick((event: ClickEvent) => { 32 .onClick((event: ClickEvent) => {
  33 + this.clicked = true;
41 ProcessUtils.processPage(this.contentDTO) 34 ProcessUtils.processPage(this.contentDTO)
42 }) 35 })
43 } 36 }
@@ -17,6 +17,8 @@ const TAG: string = 'Card4Component'; @@ -17,6 +17,8 @@ const TAG: string = 'Card4Component';
17 export struct Card4Component { 17 export struct Card4Component {
18 @State contentDTO: ContentDTO = {} as ContentDTO; 18 @State contentDTO: ContentDTO = {} as ContentDTO;
19 @State loadImg: boolean = false; 19 @State loadImg: boolean = false;
  20 + @State clicked: boolean = false;
  21 +
20 22
21 async aboutToAppear(): Promise<void> { 23 async aboutToAppear(): Promise<void> {
22 this.loadImg = await onlyWifiLoadImg(); 24 this.loadImg = await onlyWifiLoadImg();
@@ -29,7 +31,7 @@ export struct Card4Component { @@ -29,7 +31,7 @@ export struct Card4Component {
29 //新闻标题 31 //新闻标题
30 Text(this.contentDTO.newsTitle) 32 Text(this.contentDTO.newsTitle)
31 .fontSize($r('app.float.font_size_17')) 33 .fontSize($r('app.float.font_size_17'))
32 - .fontColor($r('app.color.color_222222')) 34 + .fontColor(this.clicked ? 0x848484 : $r('app.color.color_222222'))
33 .maxLines(3) 35 .maxLines(3)
34 .textOverflow({ overflow: TextOverflow.Ellipsis }) // 超出的部分显示省略号。 36 .textOverflow({ overflow: TextOverflow.Ellipsis }) // 超出的部分显示省略号。
35 //三图 37 //三图
@@ -67,6 +69,7 @@ export struct Card4Component { @@ -67,6 +69,7 @@ export struct Card4Component {
67 .justifyContent(FlexAlign.Start) 69 .justifyContent(FlexAlign.Start)
68 .alignItems(HorizontalAlign.Start) 70 .alignItems(HorizontalAlign.Start)
69 .onClick((event: ClickEvent) => { 71 .onClick((event: ClickEvent) => {
  72 + this.clicked = true;
70 ProcessUtils.processPage(this.contentDTO) 73 ProcessUtils.processPage(this.contentDTO)
71 }) 74 })
72 //bottom 评论等信息 75 //bottom 评论等信息
@@ -14,6 +14,7 @@ export struct Card5Component { @@ -14,6 +14,7 @@ export struct Card5Component {
14 @State contentDTO: ContentDTO = {} as ContentDTO; 14 @State contentDTO: ContentDTO = {} as ContentDTO;
15 @State titleShowPolicy: number | string = 1 15 @State titleShowPolicy: number | string = 1
16 @State loadImg: boolean = false; 16 @State loadImg: boolean = false;
  17 + @State clicked: boolean = false;
17 18
18 async aboutToAppear(): Promise<void> { 19 async aboutToAppear(): Promise<void> {
19 this.loadImg = await onlyWifiLoadImg(); 20 this.loadImg = await onlyWifiLoadImg();
@@ -62,6 +63,7 @@ export struct Card5Component { @@ -62,6 +63,7 @@ export struct Card5Component {
62 bottom: $r('app.float.card_comp_pagePadding_tb') 63 bottom: $r('app.float.card_comp_pagePadding_tb')
63 }) 64 })
64 .onClick((event: ClickEvent) => { 65 .onClick((event: ClickEvent) => {
  66 + this.clicked = true;
65 ProcessUtils.processPage(this.contentDTO) 67 ProcessUtils.processPage(this.contentDTO)
66 }) 68 })
67 69
@@ -15,6 +15,7 @@ const TAG: string = 'Card6Component-Card13Component'; @@ -15,6 +15,7 @@ const TAG: string = 'Card6Component-Card13Component';
15 export struct Card6Component { 15 export struct Card6Component {
16 @State contentDTO: ContentDTO = {} as ContentDTO; 16 @State contentDTO: ContentDTO = {} as ContentDTO;
17 @State loadImg: boolean = false; 17 @State loadImg: boolean = false;
  18 + @State clicked: boolean = false;
18 19
19 async aboutToAppear(): Promise<void> { 20 async aboutToAppear(): Promise<void> {
20 this.loadImg = await onlyWifiLoadImg(); 21 this.loadImg = await onlyWifiLoadImg();
@@ -40,13 +41,14 @@ export struct Card6Component { @@ -40,13 +41,14 @@ export struct Card6Component {
40 } 41 }
41 42
42 Text(`${this.contentDTO.newsTitle}`) 43 Text(`${this.contentDTO.newsTitle}`)
  44 + .fontColor(this.clicked ? 0x848484 : 0x222222)
43 .fontSize(16) 45 .fontSize(16)
44 .fontWeight(FontWeight.Normal) 46 .fontWeight(FontWeight.Normal)
45 .maxLines(3) 47 .maxLines(3)
46 .alignSelf(ItemAlign.Start) 48 .alignSelf(ItemAlign.Start)
47 .textOverflow({ overflow: TextOverflow.Ellipsis })// 超出的部分显示省略号。 49 .textOverflow({ overflow: TextOverflow.Ellipsis })// 超出的部分显示省略号。
48 - .textIndent(this.contentDTO.newTags.length < 5 && this.contentDTO.newTags.length > 2 ? 60 :  
49 - this.contentDTO.newTags.length != 0 && this.contentDTO.newTags.length < 3 ? 30 : 0) 50 + .textIndent(this.contentDTO.newTags?.length < 5 && this.contentDTO.newTags?.length > 2 ? 60 :
  51 + this.contentDTO.newTags?.length != 0 && this.contentDTO.newTags?.length < 3 ? 30 : 0)
50 }.alignContent(Alignment.TopStart) 52 }.alignContent(Alignment.TopStart)
51 53
52 }.height("80%") 54 }.height("80%")
@@ -71,6 +73,7 @@ export struct Card6Component { @@ -71,6 +73,7 @@ export struct Card6Component {
71 .alignContent(Alignment.BottomEnd) 73 .alignContent(Alignment.BottomEnd)
72 } 74 }
73 .onClick((event: ClickEvent) => { 75 .onClick((event: ClickEvent) => {
  76 + this.clicked = true;
74 ProcessUtils.processPage(this.contentDTO) 77 ProcessUtils.processPage(this.contentDTO)
75 }) 78 })
76 .padding({ 79 .padding({
@@ -14,6 +14,7 @@ const TAG: string = 'Card9Component'; @@ -14,6 +14,7 @@ const TAG: string = 'Card9Component';
14 export struct Card9Component { 14 export struct Card9Component {
15 @State contentDTO: ContentDTO = {} as ContentDTO; 15 @State contentDTO: ContentDTO = {} as ContentDTO;
16 @State loadImg: boolean = false; 16 @State loadImg: boolean = false;
  17 + @State clicked: boolean = false;
17 18
18 async aboutToAppear(): Promise<void> { 19 async aboutToAppear(): Promise<void> {
19 this.loadImg = await onlyWifiLoadImg(); 20 this.loadImg = await onlyWifiLoadImg();
@@ -24,6 +25,7 @@ export struct Card9Component { @@ -24,6 +25,7 @@ export struct Card9Component {
24 // 顶部标题,最多两行 25 // 顶部标题,最多两行
25 if (this.contentDTO.titleShow === 1 && this.contentDTO.newsTitle) { 26 if (this.contentDTO.titleShow === 1 && this.contentDTO.newsTitle) {
26 Text(this.contentDTO.newsTitle) 27 Text(this.contentDTO.newsTitle)
  28 + .fontColor(this.clicked ? 0x848484 : 0x222222)
27 .width(CommonConstants.FULL_WIDTH) 29 .width(CommonConstants.FULL_WIDTH)
28 .fontSize($r('app.float.font_size_17')) 30 .fontSize($r('app.float.font_size_17'))
29 .fontWeight(600) 31 .fontWeight(600)
@@ -81,6 +83,7 @@ export struct Card9Component { @@ -81,6 +83,7 @@ export struct Card9Component {
81 .backgroundColor($r("app.color.white")) 83 .backgroundColor($r("app.color.white"))
82 .margin({ bottom: 8 }) 84 .margin({ bottom: 8 })
83 .onClick((event: ClickEvent) => { 85 .onClick((event: ClickEvent) => {
  86 + this.clicked = true;
84 ProcessUtils.processPage(this.contentDTO) 87 ProcessUtils.processPage(this.contentDTO)
85 }) 88 })
86 } 89 }
@@ -7,6 +7,7 @@ import { LiveModel } from '../../viewmodel/LiveModel' @@ -7,6 +7,7 @@ import { LiveModel } from '../../viewmodel/LiveModel'
7 @Component 7 @Component
8 export struct HorizontalStrokeCardThreeTwoRadioForOneComponent { 8 export struct HorizontalStrokeCardThreeTwoRadioForOneComponent {
9 @State compDTO: CompDTO = {} as CompDTO 9 @State compDTO: CompDTO = {} as CompDTO
  10 + @State clicked: boolean = false;
10 11
11 build() { 12 build() {
12 Column() { 13 Column() {
@@ -18,7 +19,7 @@ export struct HorizontalStrokeCardThreeTwoRadioForOneComponent { @@ -18,7 +19,7 @@ export struct HorizontalStrokeCardThreeTwoRadioForOneComponent {
18 .margin({ right: 4 }) 19 .margin({ right: 4 })
19 Text(this.compDTO.objectTitle) 20 Text(this.compDTO.objectTitle)
20 .fontSize($r("app.float.font_size_17")) 21 .fontSize($r("app.float.font_size_17"))
21 - .fontColor($r("app.color.color_222222")) 22 + .fontColor(this.clicked ? 0x848484 : $r("app.color.color_222222"))
22 .fontWeight(600) 23 .fontWeight(600)
23 } 24 }
24 25
@@ -63,6 +64,7 @@ export struct HorizontalStrokeCardThreeTwoRadioForOneComponent { @@ -63,6 +64,7 @@ export struct HorizontalStrokeCardThreeTwoRadioForOneComponent {
63 .backgroundColor($r("app.color.white")) 64 .backgroundColor($r("app.color.white"))
64 .margin({ bottom: 8 }) 65 .margin({ bottom: 8 })
65 .onClick(() => { 66 .onClick(() => {
  67 + this.clicked = true;
66 this.gotoLive(this.compDTO?.operDataList[0]) 68 this.gotoLive(this.compDTO?.operDataList[0])
67 }) 69 })
68 } 70 }