王士厅

Merge branch 'main' of http://192.168.1.42/developOne/harmonyPool

# Conflicts:
#	sight_harmony/products/phone/src/main/ets/pages/view/VideoChannelPage.ets
Showing 44 changed files with 327 additions and 191 deletions
@@ -372,6 +372,8 @@ export class ProcessUtils { @@ -372,6 +372,8 @@ export class ProcessUtils {
372 type: 'JUMP_INNER_NEW_PAGE', 372 type: 'JUMP_INNER_NEW_PAGE',
373 params: { 373 params: {
374 contentID: content?.objectId, 374 contentID: content?.objectId,
  375 + //fixme 图文外链,需要单独处理
  376 + url:content?.linkUrl,
375 pageID: 'IMAGE_TEXT_DETAIL', 377 pageID: 'IMAGE_TEXT_DETAIL',
376 extra: { 378 extra: {
377 relType: content?.relType, 379 relType: content?.relType,
@@ -75,6 +75,10 @@ export struct CompParser { @@ -75,6 +75,10 @@ export struct CompParser {
75 // Text(JSON.stringify(this.compDTO.compStyle)) 75 // Text(JSON.stringify(this.compDTO.compStyle))
76 this.componentBuilder(); 76 this.componentBuilder();
77 } 77 }
  78 + .margin({
  79 + left: 6,
  80 + right: (this.compDTO.compStyle === CompStyle.Zh_Single_Row_05 || this.compDTO.compStyle === CompStyle.Zh_Single_Row_02) ? 0 : 6
  81 + })
78 } 82 }
79 83
80 @Builder 84 @Builder
@@ -206,16 +210,16 @@ export struct CompParser { @@ -206,16 +210,16 @@ export struct CompParser {
206 this.compDTO.compStyle === CompStyle.Zh_Single_Row_06 210 this.compDTO.compStyle === CompStyle.Zh_Single_Row_06
207 ) { 211 ) {
208 if (this.compDTO.compStyle === this.nextCompDTO.compStyle) { 212 if (this.compDTO.compStyle === this.nextCompDTO.compStyle) {
209 - Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 }) 213 + Divider().strokeWidth(1).color('#f5f5f5').width('103%').padding({ left: 16, right: 16 }).margin({left: -6})
210 } else { 214 } else {
211 - Divider().strokeWidth(5).color('#f5f5f5') 215 + Divider().strokeWidth(5).color('#f5f5f5').width('120%').margin({left: -6})
212 } 216 }
213 } else if (this.compDTO?.operDataList?.[0]?.appStyle === CompStyle.Card_10) { 217 } else if (this.compDTO?.operDataList?.[0]?.appStyle === CompStyle.Card_10) {
214 // 大专题 218 // 大专题
215 if (this.nextCompDTO?.operDataList?.[0]?.appStyle === CompStyle.Card_10) { 219 if (this.nextCompDTO?.operDataList?.[0]?.appStyle === CompStyle.Card_10) {
216 - Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 }) 220 + Divider().strokeWidth(1).color('#f5f5f5').width('103%').padding({ left: 16, right: 16 }).margin({left: -6})
217 } else { 221 } else {
218 - Divider().strokeWidth(5).color('#f5f5f5') 222 + Divider().strokeWidth(5).color('#f5f5f5').width('120%').margin({left: -6})
219 } 223 }
220 } else if (this.compDTO.compType === 'appStyle' || this.compDTO.compStyle === CompStyle.Zh_Single_Row_01) { 224 } else if (this.compDTO.compType === 'appStyle' || this.compDTO.compStyle === CompStyle.Zh_Single_Row_01) {
221 if ( 225 if (
@@ -225,9 +229,9 @@ export struct CompParser { @@ -225,9 +229,9 @@ export struct CompParser {
225 this.nextCompDTO.compStyle === CompStyle.Zh_Single_Row_04 || 229 this.nextCompDTO.compStyle === CompStyle.Zh_Single_Row_04 ||
226 this.nextCompDTO.compStyle === CompStyle.Zh_Single_Row_06 230 this.nextCompDTO.compStyle === CompStyle.Zh_Single_Row_06
227 ) { 231 ) {
228 - Divider().strokeWidth(5).color('#f5f5f5') 232 + Divider().strokeWidth(5).color('#f5f5f5').width('120%').margin({left: -6})
229 } else { 233 } else {
230 - Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 }) 234 + Divider().strokeWidth(1).color('#f5f5f5').width('103%').padding({ left: 16, right: 16 }).margin({left: -6})
231 } 235 }
232 } else { 236 } else {
233 // Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 }) 237 // Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 })
@@ -238,20 +238,20 @@ export struct MorningEveningPaperComponent { @@ -238,20 +238,20 @@ export struct MorningEveningPaperComponent {
238 private async pickColor(imageSource: image.ImageSource | undefined) { 238 private async pickColor(imageSource: image.ImageSource | undefined) {
239 if (imageSource) { 239 if (imageSource) {
240 const pixelMap: image.PixelMap = await imageNet2PixelMap(imageSource); 240 const pixelMap: image.PixelMap = await imageNet2PixelMap(imageSource);
241 - let allPixels: number[] = await traverseAllPixel(pixelMap);  
242 - let maxPixel: number = findMaxPixel(allPixels);  
243 - let rgb: ColorRgb = ColorUtils.numberToRgb(maxPixel);  
244 - let hsv: ColorHsv = ColorUtils.rgb2hsv(rgb);  
245 - rgb = ColorUtils.hsv2rgb(hsv);  
246 - this.mixedBgColor = "#" + rgb.red.toString(16) + rgb.green.toString(16) + rgb.blue.toString(16);  
247 - // effectKit.createColorPicker(pixelMap, (err, colorPicker) => {  
248 - // let color = colorPicker.getMainColorSync();  
249 - // console.log(TAG, "compInfoBean compStyle = " + color)  
250 - // // color = ColorUtils.getMorningEveningPaperRgb({red:color.red,green:color.green,blue:color.blue,alpha:color.alpha})  
251 - // // 将取色器选取的color示例转换为十六进制颜色代码  
252 - // this.mixedBgColor = "#" + color.alpha.toString(16) + color.red.toString(16) + color.green.toString(16) + color.blue.toString(16);  
253 - // console.log(TAG, "compInfoBean compStyle = " + this.mixedBgColor)  
254 - // }); 241 + // let allPixels: number[] = await traverseAllPixel(pixelMap);
  242 + // let maxPixel: number = findMaxPixel(allPixels);
  243 + // let rgb: ColorRgb = ColorUtils.numberToRgb(maxPixel);
  244 + // let hsv: ColorHsv = ColorUtils.rgb2hsv(rgb);
  245 + // rgb = ColorUtils.hsv2rgb(hsv);
  246 + // this.mixedBgColor = "#" + rgb.red.toString(16) + rgb.green.toString(16) + rgb.blue.toString(16);
  247 + effectKit.createColorPicker(pixelMap, (err, colorPicker) => {
  248 + let color = colorPicker.getMainColorSync();
  249 + console.log(TAG, "compInfoBean compStyle = " + color)
  250 + // color = ColorUtils.getMorningEveningPaperRgb({red:color.red,green:color.green,blue:color.blue,alpha:color.alpha})
  251 + // 将取色器选取的color示例转换为十六进制颜色代码
  252 + this.mixedBgColor = "#" + color.alpha.toString(16) + color.red.toString(16) + color.green.toString(16) + color.blue.toString(16);
  253 + console.log(TAG, "compInfoBean compStyle = " + this.mixedBgColor)
  254 + });
255 } 255 }
256 } 256 }
257 257
@@ -82,10 +82,11 @@ export struct Card11Component { @@ -82,10 +82,11 @@ export struct Card11Component {
82 82
83 // 评论等信息 83 // 评论等信息
84 CardSourceInfo({ compDTO: this.compDTO, contentDTO: this.contentDTO }) 84 CardSourceInfo({ compDTO: this.compDTO, contentDTO: this.contentDTO })
85 - }.width(CommonConstants.FULL_WIDTH) 85 + }
  86 + .width(CommonConstants.FULL_WIDTH)
86 .padding({ 87 .padding({
87 - left: $r('app.float.card_comp_pagePadding_lf'),  
88 - right: $r('app.float.card_comp_pagePadding_lf'), 88 + left: 10,
  89 + right: 10,
89 top: $r('app.float.card_comp_pagePadding_tb'), 90 top: $r('app.float.card_comp_pagePadding_tb'),
90 bottom: $r('app.float.card_comp_pagePadding_tb') 91 bottom: $r('app.float.card_comp_pagePadding_tb')
91 }) 92 })
@@ -80,11 +80,13 @@ export struct Card12Component { @@ -80,11 +80,13 @@ export struct Card12Component {
80 CarderInteraction({contentDTO: this.contentDTO}) 80 CarderInteraction({contentDTO: this.contentDTO})
81 } 81 }
82 .padding({ 82 .padding({
83 - left: $r('app.float.card_comp_pagePadding_lf'),  
84 - right: $r('app.float.card_comp_pagePadding_lf'), 83 + left: 10,
  84 + right: 10,
85 top: $r('app.float.card_comp_pagePadding_tb'), 85 top: $r('app.float.card_comp_pagePadding_tb'),
86 bottom: $r('app.float.card_comp_pagePadding_tb') 86 bottom: $r('app.float.card_comp_pagePadding_tb')
87 }) 87 })
  88 + .backgroundColor(0xffffff)
  89 + .width(CommonConstants.FULL_WIDTH)
88 .onClick((event: ClickEvent) => { 90 .onClick((event: ClickEvent) => {
89 InfomationCardClick.track(this.compDTO, this.contentDTO, this.pageId, this.pageName) 91 InfomationCardClick.track(this.compDTO, this.contentDTO, this.pageId, this.pageName)
90 if (router.getState().name !== 'MyCollectionListPage') { 92 if (router.getState().name !== 'MyCollectionListPage') {
@@ -96,11 +96,13 @@ export struct Card14Component { @@ -96,11 +96,13 @@ export struct Card14Component {
96 //TODO 底部的:分享、评论、点赞 功能;需要引用一个公共组件 96 //TODO 底部的:分享、评论、点赞 功能;需要引用一个公共组件
97 } 97 }
98 .padding({ 98 .padding({
99 - left: $r('app.float.card_comp_pagePadding_lf'),  
100 - right: $r('app.float.card_comp_pagePadding_lf'), 99 + left: 10,
  100 + right: 10,
101 top: $r('app.float.card_comp_pagePadding_tb'), 101 top: $r('app.float.card_comp_pagePadding_tb'),
102 bottom: $r('app.float.card_comp_pagePadding_tb') 102 bottom: $r('app.float.card_comp_pagePadding_tb')
103 }) 103 })
  104 + .backgroundColor(0xffffff)
  105 + .width(CommonConstants.FULL_WIDTH)
104 .onClick((event: ClickEvent) => { 106 .onClick((event: ClickEvent) => {
105 InfomationCardClick.track(this.compDTO, this.contentDTO, this.pageId, this.pageName) 107 InfomationCardClick.track(this.compDTO, this.contentDTO, this.pageId, this.pageName)
106 if (router.getState().name !== 'MyCollectionListPage') { 108 if (router.getState().name !== 'MyCollectionListPage') {
@@ -95,11 +95,13 @@ export struct Card15Component { @@ -95,11 +95,13 @@ export struct Card15Component {
95 //TODO 底部的:分享、评论、点赞 功能;需要引用一个公共组件 95 //TODO 底部的:分享、评论、点赞 功能;需要引用一个公共组件
96 } 96 }
97 .padding({ 97 .padding({
98 - left: $r('app.float.card_comp_pagePadding_lf'),  
99 - right: $r('app.float.card_comp_pagePadding_lf'), 98 + left: 10,
  99 + right: 10,
100 top: $r('app.float.card_comp_pagePadding_tb'), 100 top: $r('app.float.card_comp_pagePadding_tb'),
101 bottom: $r('app.float.card_comp_pagePadding_tb') 101 bottom: $r('app.float.card_comp_pagePadding_tb')
102 }) 102 })
  103 + .backgroundColor(0xffffff)
  104 + .width(CommonConstants.FULL_WIDTH)
103 .onClick((event: ClickEvent) => { 105 .onClick((event: ClickEvent) => {
104 InfomationCardClick.track(this.compDTO, this.contentDTO, this.pageId, this.pageName) 106 InfomationCardClick.track(this.compDTO, this.contentDTO, this.pageId, this.pageName)
105 if (router.getState().name !== 'MyCollectionListPage') { 107 if (router.getState().name !== 'MyCollectionListPage') {
@@ -128,11 +128,13 @@ export struct Card16Component { @@ -128,11 +128,13 @@ export struct Card16Component {
128 //TODO 底部的:分享、评论、点赞 功能;需要引用一个公共组件 128 //TODO 底部的:分享、评论、点赞 功能;需要引用一个公共组件
129 } 129 }
130 .padding({ 130 .padding({
131 - left: $r('app.float.card_comp_pagePadding_lf'),  
132 - right: $r('app.float.card_comp_pagePadding_lf'), 131 + left: 10,
  132 + right: 10,
133 top: $r('app.float.card_comp_pagePadding_tb'), 133 top: $r('app.float.card_comp_pagePadding_tb'),
134 bottom: $r('app.float.card_comp_pagePadding_tb') 134 bottom: $r('app.float.card_comp_pagePadding_tb')
135 }) 135 })
  136 + .backgroundColor(0xffffff)
  137 + .width(CommonConstants.FULL_WIDTH)
136 .onClick((event: ClickEvent) => { 138 .onClick((event: ClickEvent) => {
137 InfomationCardClick.track(this.compDTO, this.contentDTO, this.pageId, this.pageName) 139 InfomationCardClick.track(this.compDTO, this.contentDTO, this.pageId, this.pageName)
138 if (router.getState().name !== 'MyCollectionListPage') { 140 if (router.getState().name !== 'MyCollectionListPage') {
@@ -134,12 +134,13 @@ export struct Card17Component { @@ -134,12 +134,13 @@ export struct Card17Component {
134 // 评论等信息 134 // 评论等信息
135 CardSourceInfo({ compDTO: this.compDTO, contentDTO: this.contentDTO }) 135 CardSourceInfo({ compDTO: this.compDTO, contentDTO: this.contentDTO })
136 } 136 }
137 - .width(CommonConstants.FULL_WIDTH)  
138 .padding({ 137 .padding({
139 - left: $r('app.float.card_comp_pagePadding_lf'),  
140 - right: $r('app.float.card_comp_pagePadding_lf'), 138 + left: 10,
  139 + right: 10,
141 top: $r('app.float.card_comp_pagePadding_tb'), 140 top: $r('app.float.card_comp_pagePadding_tb'),
142 bottom: $r('app.float.card_comp_pagePadding_tb') 141 bottom: $r('app.float.card_comp_pagePadding_tb')
143 }) 142 })
  143 + .backgroundColor(0xffffff)
  144 + .width(CommonConstants.FULL_WIDTH)
144 } 145 }
145 } 146 }
@@ -86,11 +86,13 @@ export struct Card19Component { @@ -86,11 +86,13 @@ export struct Card19Component {
86 //TODO 底部的:分享、评论、点赞 功能;需要引用一个公共组件 86 //TODO 底部的:分享、评论、点赞 功能;需要引用一个公共组件
87 } 87 }
88 .padding({ 88 .padding({
89 - left: $r('app.float.card_comp_pagePadding_lf'),  
90 - right: $r('app.float.card_comp_pagePadding_lf'), 89 + left: 10,
  90 + right: 10,
91 top: $r('app.float.card_comp_pagePadding_tb'), 91 top: $r('app.float.card_comp_pagePadding_tb'),
92 bottom: $r('app.float.card_comp_pagePadding_tb') 92 bottom: $r('app.float.card_comp_pagePadding_tb')
93 }) 93 })
  94 + .backgroundColor(0xffffff)
  95 + .width(CommonConstants.FULL_WIDTH)
94 .onClick((event: ClickEvent) => { 96 .onClick((event: ClickEvent) => {
95 InfomationCardClick.track(this.compDTO, this.contentDTO, this.pageId, this.pageName) 97 InfomationCardClick.track(this.compDTO, this.contentDTO, this.pageId, this.pageName)
96 if (router.getState().name !== 'MyCollectionListPage') { 98 if (router.getState().name !== 'MyCollectionListPage') {
@@ -80,11 +80,13 @@ export struct Card20Component { @@ -80,11 +80,13 @@ export struct Card20Component {
80 //TODO 底部的:分享、评论、点赞 功能;需要引用一个公共组件 80 //TODO 底部的:分享、评论、点赞 功能;需要引用一个公共组件
81 } 81 }
82 .padding({ 82 .padding({
83 - left: $r('app.float.card_comp_pagePadding_lf'),  
84 - right: $r('app.float.card_comp_pagePadding_lf'), 83 + left: 10,
  84 + right: 10,
85 top: $r('app.float.card_comp_pagePadding_tb'), 85 top: $r('app.float.card_comp_pagePadding_tb'),
86 bottom: $r('app.float.card_comp_pagePadding_tb') 86 bottom: $r('app.float.card_comp_pagePadding_tb')
87 }) 87 })
  88 + .backgroundColor(0xffffff)
  89 + .width(CommonConstants.FULL_WIDTH)
88 .onClick((event: ClickEvent) => { 90 .onClick((event: ClickEvent) => {
89 InfomationCardClick.track(this.compDTO, this.contentDTO, this.pageId, this.pageName) 91 InfomationCardClick.track(this.compDTO, this.contentDTO, this.pageId, this.pageName)
90 if (router.getState().name !== 'MyCollectionListPage') { 92 if (router.getState().name !== 'MyCollectionListPage') {
@@ -102,11 +102,12 @@ export struct Card21Component { @@ -102,11 +102,12 @@ export struct Card21Component {
102 ProcessUtils.processPage(this.contentDTO) 102 ProcessUtils.processPage(this.contentDTO)
103 }) 103 })
104 .padding({ 104 .padding({
105 - left: $r('app.float.card_comp_pagePadding_lf'),  
106 - right: $r('app.float.card_comp_pagePadding_lf'), 105 + left: 10,
  106 + right: 10,
107 top: $r('app.float.card_comp_pagePadding_tb'), 107 top: $r('app.float.card_comp_pagePadding_tb'),
108 bottom: $r('app.float.card_comp_pagePadding_tb') 108 bottom: $r('app.float.card_comp_pagePadding_tb')
109 }) 109 })
  110 + .backgroundColor(0xffffff)
110 .width(CommonConstants.FULL_WIDTH) 111 .width(CommonConstants.FULL_WIDTH)
111 } 112 }
112 } 113 }
@@ -115,13 +115,14 @@ export struct Card2Component { @@ -115,13 +115,14 @@ export struct Card2Component {
115 // 评论等信息 115 // 评论等信息
116 CardSourceInfo({ compDTO: this.compDTO, contentDTO: this.contentDTO }) 116 CardSourceInfo({ compDTO: this.compDTO, contentDTO: this.contentDTO })
117 } 117 }
118 - .width(CommonConstants.FULL_WIDTH)  
119 .padding({ 118 .padding({
120 - left: $r('app.float.card_comp_pagePadding_lf'),  
121 - right: $r('app.float.card_comp_pagePadding_lf'), 119 + left: 10,
  120 + right: 10,
122 top: $r('app.float.card_comp_pagePadding_tb'), 121 top: $r('app.float.card_comp_pagePadding_tb'),
123 bottom: $r('app.float.card_comp_pagePadding_tb') 122 bottom: $r('app.float.card_comp_pagePadding_tb')
124 }) 123 })
  124 + .backgroundColor(0xffffff)
  125 + .width(CommonConstants.FULL_WIDTH)
125 .onClick((event: ClickEvent) => { 126 .onClick((event: ClickEvent) => {
126 InfomationCardClick.track(this.compDTO, this.contentDTO, this.pageId, this.pageName) 127 InfomationCardClick.track(this.compDTO, this.contentDTO, this.pageId, this.pageName)
127 if (router.getState().name !== 'MyCollectionListPage') { 128 if (router.getState().name !== 'MyCollectionListPage') {
@@ -78,13 +78,14 @@ export struct Card3Component { @@ -78,13 +78,14 @@ export struct Card3Component {
78 // 评论等信息 78 // 评论等信息
79 CardSourceInfo({ compDTO: this.compDTO, contentDTO: this.contentDTO }) 79 CardSourceInfo({ compDTO: this.compDTO, contentDTO: this.contentDTO })
80 } 80 }
81 - .width(CommonConstants.FULL_WIDTH)  
82 .padding({ 81 .padding({
83 - left: $r('app.float.card_comp_pagePadding_lf'),  
84 - right: $r('app.float.card_comp_pagePadding_lf'), 82 + left: 10,
  83 + right: 10,
85 top: $r('app.float.card_comp_pagePadding_tb'), 84 top: $r('app.float.card_comp_pagePadding_tb'),
86 bottom: $r('app.float.card_comp_pagePadding_tb') 85 bottom: $r('app.float.card_comp_pagePadding_tb')
87 }) 86 })
  87 + .backgroundColor(0xffffff)
  88 + .width(CommonConstants.FULL_WIDTH)
88 .onClick((event: ClickEvent) => { 89 .onClick((event: ClickEvent) => {
89 InfomationCardClick.track(this.compDTO, this.contentDTO, this.pageId, this.pageName) 90 InfomationCardClick.track(this.compDTO, this.contentDTO, this.pageId, this.pageName)
90 if (router.getState().name !== 'MyCollectionListPage') { 91 if (router.getState().name !== 'MyCollectionListPage') {
@@ -133,13 +133,14 @@ export struct Card4Component { @@ -133,13 +133,14 @@ export struct Card4Component {
133 //bottom 评论等信息 133 //bottom 评论等信息
134 CardSourceInfo({ compDTO: this.compDTO, contentDTO: this.contentDTO }) 134 CardSourceInfo({ compDTO: this.compDTO, contentDTO: this.contentDTO })
135 } 135 }
136 - .width(CommonConstants.FULL_WIDTH)  
137 .padding({ 136 .padding({
138 - left: $r('app.float.card_comp_pagePadding_lf'),  
139 - right: $r('app.float.card_comp_pagePadding_lf'), 137 + left: 10,
  138 + right: 10,
140 top: $r('app.float.card_comp_pagePadding_tb'), 139 top: $r('app.float.card_comp_pagePadding_tb'),
141 bottom: $r('app.float.card_comp_pagePadding_tb') 140 bottom: $r('app.float.card_comp_pagePadding_tb')
142 }) 141 })
  142 + .backgroundColor(0xffffff)
  143 + .width(CommonConstants.FULL_WIDTH)
143 } 144 }
144 } 145 }
145 146
@@ -122,13 +122,14 @@ export struct Card5Component { @@ -122,13 +122,14 @@ export struct Card5Component {
122 } 122 }
123 } 123 }
124 .alignContent(Alignment.Bottom) 124 .alignContent(Alignment.Bottom)
125 - .width(CommonConstants.FULL_WIDTH)  
126 .padding({ 125 .padding({
127 - left: $r('app.float.card_comp_pagePadding_lf'),  
128 - right: $r('app.float.card_comp_pagePadding_lf'), 126 + left: 10,
  127 + right: 10,
129 top: $r('app.float.card_comp_pagePadding_tb'), 128 top: $r('app.float.card_comp_pagePadding_tb'),
130 bottom: $r('app.float.card_comp_pagePadding_tb') 129 bottom: $r('app.float.card_comp_pagePadding_tb')
131 }) 130 })
  131 + .backgroundColor(0xffffff)
  132 + .width(CommonConstants.FULL_WIDTH)
132 .onClick((event: ClickEvent) => { 133 .onClick((event: ClickEvent) => {
133 InfomationCardClick.track(this.compDTO, this.contentDTO, this.pageId, this.pageName) 134 InfomationCardClick.track(this.compDTO, this.contentDTO, this.pageId, this.pageName)
134 if (router.getState().name !== 'MyCollectionListPage') { 135 if (router.getState().name !== 'MyCollectionListPage') {
@@ -123,12 +123,12 @@ export struct Card6Component { @@ -123,12 +123,12 @@ export struct Card6Component {
123 ProcessUtils.processPage(this.contentDTO) 123 ProcessUtils.processPage(this.contentDTO)
124 }) 124 })
125 .padding({ 125 .padding({
126 - left: $r('app.float.card_comp_pagePadding_lf'),  
127 - right: $r('app.float.card_comp_pagePadding_lf'), 126 + left: 10,
  127 + right: 10,
128 top: $r('app.float.card_comp_pagePadding_tb'), 128 top: $r('app.float.card_comp_pagePadding_tb'),
129 bottom: $r('app.float.card_comp_pagePadding_tb') 129 bottom: $r('app.float.card_comp_pagePadding_tb')
130 }) 130 })
131 - 131 + .backgroundColor(0xffffff)
132 .width(CommonConstants.FULL_WIDTH) 132 .width(CommonConstants.FULL_WIDTH)
133 .height(this.contentDTO.appStyle === CompStyle.Card_13 ? '' : 184) 133 .height(this.contentDTO.appStyle === CompStyle.Card_13 ? '' : 184)
134 .justifyContent(FlexAlign.SpaceBetween) 134 .justifyContent(FlexAlign.SpaceBetween)
@@ -79,13 +79,14 @@ export struct SearchContentComponent { @@ -79,13 +79,14 @@ export struct SearchContentComponent {
79 //bottom 评论等信息 79 //bottom 评论等信息
80 CardSourceInfo({compDTO:new CompDTO, contentDTO: this.contentDTO }) 80 CardSourceInfo({compDTO:new CompDTO, contentDTO: this.contentDTO })
81 } 81 }
82 - .width(CommonConstants.FULL_WIDTH)  
83 .padding({ 82 .padding({
84 - left: $r('app.float.card_comp_pagePadding_lf'),  
85 - right: $r('app.float.card_comp_pagePadding_lf'), 83 + left: 10,
  84 + right: 10,
86 top: $r('app.float.card_comp_pagePadding_tb'), 85 top: $r('app.float.card_comp_pagePadding_tb'),
87 bottom: $r('app.float.card_comp_pagePadding_tb') 86 bottom: $r('app.float.card_comp_pagePadding_tb')
88 }) 87 })
  88 + .backgroundColor(0xffffff)
  89 + .width(CommonConstants.FULL_WIDTH)
89 } 90 }
90 } 91 }
91 92
@@ -33,8 +33,14 @@ export struct CompNormalTitle { @@ -33,8 +33,14 @@ export struct CompNormalTitle {
33 .margin({ top: 16, bottom: 10 }) 33 .margin({ top: 16, bottom: 10 })
34 .width(CommonConstants.FULL_WIDTH) 34 .width(CommonConstants.FULL_WIDTH)
35 } 35 }
  36 + .padding({
  37 + left: 10,
  38 + right: 10,
  39 + top: $r('app.float.card_comp_pagePadding_tb'),
  40 + bottom: $r('app.float.card_comp_pagePadding_tb')
  41 + })
  42 + .backgroundColor(0xffffff)
36 .width(CommonConstants.FULL_WIDTH) 43 .width(CommonConstants.FULL_WIDTH)
37 - .padding({ left: 16, right: 16 })  
38 44
39 } 45 }
40 } 46 }
@@ -154,13 +154,14 @@ export struct ZhCarouselLayout01 { @@ -154,13 +154,14 @@ export struct ZhCarouselLayout01 {
154 } 154 }
155 } 155 }
156 .alignContent(Alignment.BottomEnd) 156 .alignContent(Alignment.BottomEnd)
157 - .width(CommonConstants.FULL_WIDTH)  
158 .padding({ 157 .padding({
159 - left: $r('app.float.card_comp_pagePadding_lf'),  
160 - right: $r('app.float.card_comp_pagePadding_lf'), 158 + left: 10,
  159 + right: 10,
161 top: $r('app.float.card_comp_pagePadding_tb'), 160 top: $r('app.float.card_comp_pagePadding_tb'),
162 bottom: $r('app.float.card_comp_pagePadding_tb') 161 bottom: $r('app.float.card_comp_pagePadding_tb')
163 }) 162 })
  163 + .backgroundColor(0xffffff)
  164 + .width(CommonConstants.FULL_WIDTH)
164 .onClick((event: ClickEvent) => { 165 .onClick((event: ClickEvent) => {
165 InfomationCardClick.track(this.compDTO, this.compDTO.operDataList[this.swiperIndex], this.pageId, this.pageName) 166 InfomationCardClick.track(this.compDTO, this.compDTO.operDataList[this.swiperIndex], this.pageId, this.pageName)
166 Logger.info(TAG, `ZhCarouselLayout01 onClick event index: ${this.swiperIndex}`); 167 Logger.info(TAG, `ZhCarouselLayout01 onClick event index: ${this.swiperIndex}`);
@@ -37,7 +37,15 @@ export struct ZhGridLayout02NewsContent { @@ -37,7 +37,15 @@ export struct ZhGridLayout02NewsContent {
37 this.buildItemCard(item, index); 37 this.buildItemCard(item, index);
38 } 38 }
39 }) 39 })
40 - }.width("100%").padding({ left: 16, right: 16 }) 40 + }
  41 + .padding({
  42 + left: 10,
  43 + right: 10,
  44 + top: $r('app.float.card_comp_pagePadding_tb'),
  45 + bottom: $r('app.float.card_comp_pagePadding_tb')
  46 + })
  47 + .backgroundColor(0xffffff)
  48 + .width(CommonConstants.FULL_WIDTH)
41 49
42 } 50 }
43 51
@@ -43,11 +43,13 @@ export struct ZhGridLayout03 { @@ -43,11 +43,13 @@ export struct ZhGridLayout03 {
43 }) 43 })
44 } 44 }
45 .padding({ 45 .padding({
46 - left: $r('app.float.card_comp_pagePadding_lf'),  
47 - right: $r('app.float.card_comp_pagePadding_lf'), 46 + left: 10,
  47 + right: 10,
48 top: $r('app.float.card_comp_pagePadding_tb'), 48 top: $r('app.float.card_comp_pagePadding_tb'),
49 - bottom: '0vp' 49 + bottom: $r('app.float.card_comp_pagePadding_tb')
50 }) 50 })
  51 + .backgroundColor(0xffffff)
  52 + .width('100%')
51 } 53 }
52 54
53 /** 55 /**
@@ -44,13 +44,14 @@ export struct ZhSingleColumn04 { @@ -44,13 +44,14 @@ export struct ZhSingleColumn04 {
44 }) 44 })
45 } 45 }
46 } 46 }
47 - .width(CommonConstants.FULL_WIDTH)  
48 .padding({ 47 .padding({
49 - left: $r('app.float.card_comp_pagePadding_lf'),  
50 - right: $r('app.float.card_comp_pagePadding_lf'), 48 + left: 10,
  49 + right: 10,
51 top: $r('app.float.card_comp_pagePadding_tb'), 50 top: $r('app.float.card_comp_pagePadding_tb'),
52 bottom: $r('app.float.card_comp_pagePadding_tb') 51 bottom: $r('app.float.card_comp_pagePadding_tb')
53 }) 52 })
  53 + .backgroundColor(0xffffff)
  54 + .width('100%')
54 } 55 }
55 56
56 @Builder 57 @Builder
@@ -42,13 +42,14 @@ export struct ZhSingleColumn05 { @@ -42,13 +42,14 @@ export struct ZhSingleColumn05 {
42 WDRouterRule.jumpWithAction(taskAction) 42 WDRouterRule.jumpWithAction(taskAction)
43 }) 43 })
44 } 44 }
45 - .width(CommonConstants.FULL_WIDTH)  
46 .padding({ 45 .padding({
47 - left: $r('app.float.card_comp_pagePadding_lf'),  
48 - right: $r('app.float.card_comp_pagePadding_lf'), 46 + left: 10,
  47 + right: 10,
49 top: $r('app.float.card_comp_pagePadding_tb'), 48 top: $r('app.float.card_comp_pagePadding_tb'),
50 bottom: $r('app.float.card_comp_pagePadding_tb') 49 bottom: $r('app.float.card_comp_pagePadding_tb')
51 }) 50 })
  51 + .backgroundColor(0xffffff)
  52 + .width('100%')
52 53
53 } 54 }
54 } 55 }
@@ -194,12 +194,13 @@ export struct ZhSingleColumn09 { @@ -194,12 +194,13 @@ export struct ZhSingleColumn09 {
194 .justifyContent(FlexAlign.SpaceBetween) 194 .justifyContent(FlexAlign.SpaceBetween)
195 } 195 }
196 .padding({ 196 .padding({
197 - left: $r('app.float.card_comp_pagePadding_lf'),  
198 - right: $r('app.float.card_comp_pagePadding_lf'), 197 + left: 10,
  198 + right: 10,
199 top: $r('app.float.card_comp_pagePadding_tb'), 199 top: $r('app.float.card_comp_pagePadding_tb'),
200 bottom: $r('app.float.card_comp_pagePadding_tb') 200 bottom: $r('app.float.card_comp_pagePadding_tb')
201 }) 201 })
202 - .backgroundColor($r('app.color.white')) 202 + .backgroundColor(0xffffff)
  203 + .width('100%')
203 .visibility(this.selfClosed ? Visibility.None : Visibility.Visible) 204 .visibility(this.selfClosed ? Visibility.None : Visibility.Visible)
204 } 205 }
205 } 206 }
@@ -151,12 +151,13 @@ export struct ZhSingleRow02 { @@ -151,12 +151,13 @@ export struct ZhSingleRow02 {
151 }) 151 })
152 } 152 }
153 .padding({ 153 .padding({
154 - left: $r('app.float.card_comp_pagePadding_lf'),  
155 - // right: $r('app.float.card_comp_pagePadding_lf'),  
156 - top: 8,  
157 - bottom: 8 154 + left: 10,
  155 + // right: 10,
  156 + top: $r('app.float.card_comp_pagePadding_tb'),
  157 + bottom: $r('app.float.card_comp_pagePadding_tb')
158 }) 158 })
159 - .backgroundColor($r('app.color.white')) 159 + .backgroundColor(0xffffff)
  160 + .width('100%')
160 .margin({ bottom: 8 }) 161 .margin({ bottom: 8 })
161 } 162 }
162 163
@@ -222,12 +222,13 @@ export struct ZhSingleRow03 { @@ -222,12 +222,13 @@ export struct ZhSingleRow03 {
222 }) 222 })
223 } 223 }
224 .padding({ 224 .padding({
225 - left: $r('app.float.card_comp_pagePadding_lf'),  
226 - right: $r('app.float.card_comp_pagePadding_lf'), 225 + left: 10,
  226 + right: 10,
227 top: $r('app.float.card_comp_pagePadding_tb'), 227 top: $r('app.float.card_comp_pagePadding_tb'),
228 bottom: $r('app.float.card_comp_pagePadding_tb') 228 bottom: $r('app.float.card_comp_pagePadding_tb')
229 }) 229 })
230 - .backgroundColor($r('app.color.white')) 230 + .backgroundColor(0xffffff)
  231 + .width('100%')
231 } 232 }
232 233
233 @Builder 234 @Builder
@@ -91,8 +91,14 @@ export struct ZhSingleRow04 { @@ -91,8 +91,14 @@ export struct ZhSingleRow04 {
91 .edgeEffect(EdgeEffect.None) 91 .edgeEffect(EdgeEffect.None)
92 } 92 }
93 .width(CommonConstants.FULL_WIDTH) 93 .width(CommonConstants.FULL_WIDTH)
94 - .backgroundColor($r("app.color.white"))  
95 - .margin({ bottom: 8 }) 94 + .padding({
  95 + left: 10,
  96 + right: 10,
  97 + top: $r('app.float.card_comp_pagePadding_tb'),
  98 + bottom: $r('app.float.card_comp_pagePadding_tb')
  99 + })
  100 + .backgroundColor(0xffffff)
  101 + .width('100%')
96 } 102 }
97 } 103 }
98 104
@@ -53,13 +53,13 @@ export struct ZhSingleRow05 { @@ -53,13 +53,13 @@ export struct ZhSingleRow05 {
53 .height(170) 53 .height(170)
54 } 54 }
55 .padding({ 55 .padding({
56 - left: $r('app.float.card_comp_pagePadding_lf'),  
57 - // right: $r('app.float.card_comp_pagePadding_lf'), 56 + left: 10,
  57 + // right: 10,
58 top: $r('app.float.card_comp_pagePadding_tb'), 58 top: $r('app.float.card_comp_pagePadding_tb'),
59 bottom: $r('app.float.card_comp_pagePadding_tb') 59 bottom: $r('app.float.card_comp_pagePadding_tb')
60 }) 60 })
61 - .backgroundColor($r('app.color.white'))  
62 - .margin({ bottom: 8 }) 61 + .backgroundColor(0xffffff)
  62 + .width('100%')
63 } 63 }
64 64
65 @Builder 65 @Builder
@@ -166,12 +166,13 @@ export struct ZhSingleRow06 { @@ -166,12 +166,13 @@ export struct ZhSingleRow06 {
166 .width('100%') 166 .width('100%')
167 } 167 }
168 .padding({ 168 .padding({
169 - left: $r('app.float.card_comp_pagePadding_lf'),  
170 - right: $r('app.float.card_comp_pagePadding_lf'), 169 + left: 10,
  170 + right: 10,
171 top: $r('app.float.card_comp_pagePadding_tb'), 171 top: $r('app.float.card_comp_pagePadding_tb'),
172 bottom: $r('app.float.card_comp_pagePadding_tb') 172 bottom: $r('app.float.card_comp_pagePadding_tb')
173 }) 173 })
174 - .backgroundColor($r('app.color.white')) 174 + .backgroundColor(0xffffff)
  175 + .width('100%')
175 .onClick(() => { 176 .onClick(() => {
176 InfomationCardClick.track(this.compDTO, this.compDTO.operDataList[0], this.pageId, this.pageName) 177 InfomationCardClick.track(this.compDTO, this.compDTO.operDataList[0], this.pageId, this.pageName)
177 }) 178 })
@@ -39,22 +39,22 @@ export default struct MinePageUserSimpleInfoUI { @@ -39,22 +39,22 @@ export default struct MinePageUserSimpleInfoUI {
39 //头像 39 //头像
40 Stack(){ 40 Stack(){
41 41
42 - Image(this.isLogin?(this.headPhotoUrl?this.headPhotoUrl:this.userType === "1"?$r('app.media.default_head'):$r('app.media.AccountOwner_DefaultIcon')):$r('app.media.default_head'))  
43 - .alt($r('app.media.default_head'))  
44 - .width(`${this.calcHeight(110)}lpx`)  
45 - .height(`${this.calcHeight(110)}lpx`) 42 + Image(this.isLogin?(this.headPhotoUrl?this.headPhotoUrl:this.userType === "1"?$r('app.media.default_head_userPage'):$r('app.media.AccountOwner_DefaultIcon')):$r('app.media.default_head_userPage'))
  43 + .alt($r('app.media.default_head_userPage'))
  44 + .width(`${this.calcHeight(120)}lpx`)
  45 + .height(`${this.calcHeight(120)}lpx`)
46 .objectFit(ImageFit.Cover) 46 .objectFit(ImageFit.Cover)
47 .borderRadius(50) 47 .borderRadius(50)
48 48
49 if(StringUtils.isNotEmpty(this.levelHead)){ 49 if(StringUtils.isNotEmpty(this.levelHead)){
50 Image(this.levelHead) 50 Image(this.levelHead)
51 - .width(`${this.calcHeight(140)}lpx`)  
52 - .height(`${this.calcHeight(140)}lpx`) 51 + .width(`${this.calcHeight(155)}lpx`)
  52 + .height(`${this.calcHeight(155)}lpx`)
53 .objectFit(ImageFit.Cover) 53 .objectFit(ImageFit.Cover)
54 .borderRadius(50) 54 .borderRadius(50)
55 } 55 }
56 - }.width(`${this.calcHeight(130)}lpx`)  
57 - .height(`${this.calcHeight(130)}lpx`) 56 + }.width(`${this.calcHeight(140)}lpx`)
  57 + .height(`${this.calcHeight(140)}lpx`)
58 .alignContent(Alignment.Center) 58 .alignContent(Alignment.Center)
59 .onClick(()=>{ 59 .onClick(()=>{
60 this.jumpLogin() 60 this.jumpLogin()
@@ -21,7 +21,7 @@ export struct PagePersonFunction{ @@ -21,7 +21,7 @@ export struct PagePersonFunction{
21 .type(ButtonType.Circle) 21 .type(ButtonType.Circle)
22 .width(`${this.calcHeight(12)}lpx`) 22 .width(`${this.calcHeight(12)}lpx`)
23 .height(`${this.calcHeight(12)}lpx`) 23 .height(`${this.calcHeight(12)}lpx`)
24 - .backgroundColor($r('app.color.color_ED2800')) 24 + .backgroundColor(this.navItem?.noticeColor.length > 0?this.navItem?.noticeColor:$r('app.color.color_ED2800'))
25 } 25 }
26 }.width(`${this.calcHeight(46)}lpx`) 26 }.width(`${this.calcHeight(46)}lpx`)
27 .height(`${this.calcHeight(46)}lpx`) 27 .height(`${this.calcHeight(46)}lpx`)
@@ -30,7 +30,6 @@ export struct PagePersonFunction{ @@ -30,7 +30,6 @@ export struct PagePersonFunction{
30 .margin({top:`${this.calcHeight(8)}lpx`}) 30 .margin({top:`${this.calcHeight(8)}lpx`})
31 .height(`${this.calcHeight(23)}lpx`) 31 .height(`${this.calcHeight(23)}lpx`)
32 .fontColor(this.navItem?.homePageColor.length > 0?this.navItem.homePageColor:$r('app.color.color_222222')) 32 .fontColor(this.navItem?.homePageColor.length > 0?this.navItem.homePageColor:$r('app.color.color_222222'))
33 - .fontColor($r('app.color.color_222222'))  
34 .fontSize(`${this.calcHeight(23)}lpx`) 33 .fontSize(`${this.calcHeight(23)}lpx`)
35 } 34 }
36 .alignItems(HorizontalAlign.Center) 35 .alignItems(HorizontalAlign.Center)
@@ -199,20 +199,22 @@ struct EditUserInfoPage { @@ -199,20 +199,22 @@ struct EditUserInfoPage {
199 if (backParams) { 199 if (backParams) {
200 let userName = backParams.userName as string ///昵称 200 let userName = backParams.userName as string ///昵称
201 let introduction = backParams.introduction as string ///简介 201 let introduction = backParams.introduction as string ///简介
202 - 202 + this.listData = []
203 if (userName) { 203 if (userName) {
204 if (userName != this.currentUserInfo.userName) { 204 if (userName != this.currentUserInfo.userName) {
205 - // this.currentUserInfo.userName = userName;  
206 - // this.currentUserInfo.editDataType = WDEditDataModelType.WDEditDataModelType_nickname 205 + this.currentUserInfo.userName = userName;
  206 + this.currentUserInfo.editDataType = WDEditDataModelType.WDEditDataModelType_nickname
  207 + this.listData.push(...EditInfoViewModel.getEditListInfo(this.currentUserInfo))
207 // this.updateEditModel() 208 // this.updateEditModel()
208 - this.getAccountOwnerInfo() 209 + // this.getAccountOwnerInfo()
209 } 210 }
210 } else if (introduction){ 211 } else if (introduction){
211 if (introduction != this.currentUserInfo.userExtend.introduction ) { 212 if (introduction != this.currentUserInfo.userExtend.introduction ) {
212 - // this.currentUserInfo.userExtend.introduction = introduction;  
213 - // this.currentUserInfo.editDataType = WDEditDataModelType.WDEditDataModelType_intro 213 + this.currentUserInfo.userExtend.introduction = introduction;
  214 + this.currentUserInfo.editDataType = WDEditDataModelType.WDEditDataModelType_intro
  215 + this.listData.push(...EditInfoViewModel.getEditListInfo(this.currentUserInfo))
214 // this.updateEditModel() 216 // this.updateEditModel()
215 - this.getAccountOwnerInfo() 217 + // this.getAccountOwnerInfo()
216 } 218 }
217 } 219 }
218 } 220 }
@@ -127,6 +127,10 @@ export struct MinePageComponent { @@ -127,6 +127,10 @@ export struct MinePageComponent {
127 } 127 }
128 TrackingPageBrowse.trackCommonPageExposureEnd(TrackConstants.PageName.My,TrackConstants.PageName.My,Math.floor(duration)) 128 TrackingPageBrowse.trackCommonPageExposureEnd(TrackConstants.PageName.My,TrackConstants.PageName.My,Math.floor(duration))
129 } 129 }
  130 +
  131 + WindowModel.shared.setWindowSystemBarProperties({
  132 + statusBarContentColor: '#000000',
  133 + })
130 } 134 }
131 135
132 aboutToAppear(){ 136 aboutToAppear(){
1 import { BottomNavDTO, NavigationDetailDTO, TopNavDTO } from 'wdBean'; 1 import { BottomNavDTO, NavigationDetailDTO, TopNavDTO } from 'wdBean';
2 -import { Logger, NetworkUtil, SPHelper, ToastUtils, WindowModel } from 'wdKit'; 2 +import { Logger, NetworkUtil, SPHelper, ToastUtils } from 'wdKit';
3 import { ProcessUtils, WDRouterPage, WDRouterRule } from 'wdRouter'; 3 import { ProcessUtils, WDRouterPage, WDRouterRule } from 'wdRouter';
4 import { PageComponent } from './PageComponent'; 4 import { PageComponent } from './PageComponent';
5 import { ChannelSubscriptionLayout } from './ChannelSubscriptionLayout'; 5 import { ChannelSubscriptionLayout } from './ChannelSubscriptionLayout';
@@ -13,6 +13,8 @@ import { CompUtils } from '../../utils/CompUtils'; @@ -13,6 +13,8 @@ import { CompUtils } from '../../utils/CompUtils';
13 import ChannelViewModel from '../../viewmodel/ChannelViewModel'; 13 import ChannelViewModel from '../../viewmodel/ChannelViewModel';
14 import { GrayManageModel } from '../../viewmodel/GrayManageModel'; 14 import { GrayManageModel } from '../../viewmodel/GrayManageModel';
15 import { ColorUtils } from '../../utils/ColorUtils'; 15 import { ColorUtils } from '../../utils/ColorUtils';
  16 +import { ImageKnifeComponent } from '@ohos/imageknife';
  17 +import { CommonUtils } from '../../utils/CommonUtils';
16 18
17 const TAG = 'TopNavigationComponent'; 19 const TAG = 'TopNavigationComponent';
18 20
@@ -36,8 +38,7 @@ export struct TopNavigationComponentNew { @@ -36,8 +38,7 @@ export struct TopNavigationComponentNew {
36 */ 38 */
37 navItem: BottomNavDTO = {} as BottomNavDTO 39 navItem: BottomNavDTO = {} as BottomNavDTO
38 // 首页当前正在哪个tab的索引值 40 // 首页当前正在哪个tab的索引值
39 - @Link @Watch('setBarBackgroundColor') _currentNavIndex?: number;  
40 - 41 + @Link @Watch('setBarBackgroundColor') _currentNavIndex?: number;
41 @Consume @Watch('pageShowChange') pageShow: number 42 @Consume @Watch('pageShowChange') pageShow: number
42 // 记录首页底部tab 的索引值 43 // 记录首页底部tab 的索引值
43 @State bottomNavIndex: number = 0 44 @State bottomNavIndex: number = 0
@@ -45,7 +46,6 @@ export struct TopNavigationComponentNew { @@ -45,7 +46,6 @@ export struct TopNavigationComponentNew {
45 @State @Watch('updateCurrentTopNavSelectedIndex') currentTopNavSelectedIndex: number = 0; 46 @State @Watch('updateCurrentTopNavSelectedIndex') currentTopNavSelectedIndex: number = 0;
46 // 顶导数据 47 // 顶导数据
47 @State @Watch('onTopNavigationDataUpdated') topNavList: TopNavDTO[] = [] 48 @State @Watch('onTopNavigationDataUpdated') topNavList: TopNavDTO[] = []
48 -  
49 @Consume barBackgroundColor: Color 49 @Consume barBackgroundColor: Color
50 @Consume isImmersive: boolean 50 @Consume isImmersive: boolean
51 // 51 //
@@ -349,36 +349,33 @@ export struct TopNavigationComponentNew { @@ -349,36 +349,33 @@ export struct TopNavigationComponentNew {
349 @Builder 349 @Builder
350 tabBarBuilder(item: TopNavDTO, index: number) { 350 tabBarBuilder(item: TopNavDTO, index: number) {
351 Column() { 351 Column() {
352 - Text(item?.name)  
353 - .fontSize($r('app.float.selected_text_size'))  
354 - .fontWeight(this.currentTopNavSelectedIndex === index ? FontWeight.Bold : FontWeight.Normal)  
355 - .fontColor(this.tabSelectedColor(this.currentTopNavSelectedIndex === index))  
356 - .padding({ top: $r('app.float.top_tab_item_padding_top'), bottom: $r('app.float.top_tab_item_padding_bottom') })  
357 - .maxLines(this.MAX_LINE)  
358 - .id(index.toString())  
359 - // .onAreaChange((oldValue: Area, newValue: Area) => {  
360 - // if (this.currentTopNavSelectedIndex === index &&  
361 - // (this.indicatorLeftMargin === 0 || this.indicatorWidth === 0)) {  
362 - // if (newValue.position.x != undefined) {  
363 - // let positionX = Number.parseFloat(newValue.position.x.toString())  
364 - // this.indicatorLeftMargin = Number.isNaN(positionX) ? 0 : positionX  
365 - // }  
366 - // let width = Number.parseFloat(newValue.width.toString())  
367 - // this.indicatorWidth = Number.isNaN(width) ? 0 : width  
368 - // }  
369 - // })  
370 - if (this.currentTopNavSelectedIndex === index) {  
371 352
372 - Image($r('app.media.icon_channel_active'))  
373 - .colorFilter(ColorUtils.getDrawingColorFilter(this.getBothColor("")))  
374 - .width(20)  
375 - .height(3)  
376 - // Row()  
377 - // .width(20)  
378 - // .height(3)  
379 - // .backgroundImage($r('app.media.icon_channel_active'), ImageRepeat.NoRepeat)  
380 - // .backgroundImageSize(ImageSize.Contain) 353 + if (item.iconUrl && item.iconCUrl) {
  354 + // 有图
  355 + ImageKnifeComponent({ imageKnifeOption: CommonUtils.getTopImageKnifeOption(item, this.currentTopNavSelectedIndex === index) })
  356 + .height(36)
  357 + .width(CommonUtils.calTopTabWidth(36,item.iconUrlSize))
  358 + .enabled(false)
  359 + } else {
  360 + // 无图
  361 + Text(item?.name)
  362 + .fontSize($r('app.float.selected_text_size'))
  363 + .fontWeight(this.currentTopNavSelectedIndex === index ? FontWeight.Bold : FontWeight.Normal)
  364 + .fontColor(this.tabSelectedColor(this.currentTopNavSelectedIndex === index))
  365 + .padding({
  366 + top: $r('app.float.top_tab_item_padding_top'),
  367 + bottom: $r('app.float.top_tab_item_padding_bottom')
  368 + })
  369 + .maxLines(this.MAX_LINE)
  370 + .id(index.toString())
  371 + if (this.currentTopNavSelectedIndex === index) {
  372 + Image($r('app.media.icon_channel_active'))//.colorFilter(ColorUtils.getDrawingColorFilter(this.getBothColor("")))
  373 + .width(20)
  374 + .height(3)
  375 +
  376 + }
381 } 377 }
  378 +
382 } 379 }
383 .hoverEffect(HoverEffect.Highlight) 380 .hoverEffect(HoverEffect.Highlight)
384 .constraintSize({ 381 .constraintSize({
@@ -388,8 +385,8 @@ export struct TopNavigationComponentNew { @@ -388,8 +385,8 @@ export struct TopNavigationComponentNew {
388 .height('100%') 385 .height('100%')
389 // .backgroundColor(Color.Transparent) 386 // .backgroundColor(Color.Transparent)
390 .padding({ 387 .padding({
391 - left: $r('app.float.top_tab_item_padding_horizontal'),  
392 - right: $r('app.float.top_tab_item_padding_horizontal'), 388 + left: item.iconUrl && item.iconCUrl ? 0 : $r('app.float.top_tab_item_padding_horizontal'),
  389 + right: item.iconUrl && item.iconCUrl ? 0 : $r('app.float.top_tab_item_padding_horizontal'),
393 }) 390 })
394 .justifyContent(FlexAlign.Center) 391 .justifyContent(FlexAlign.Center)
395 .id(`col_tabBar${index}`) 392 .id(`col_tabBar${index}`)
@@ -405,6 +402,8 @@ export struct TopNavigationComponentNew { @@ -405,6 +402,8 @@ export struct TopNavigationComponentNew {
405 }) 402 })
406 } 403 }
407 404
  405 +
  406 +
408 /** 407 /**
409 * 频道文字颜色 408 * 频道文字颜色
410 * @returns 409 * @returns
@@ -502,24 +501,22 @@ export struct TopNavigationComponentNew { @@ -502,24 +501,22 @@ export struct TopNavigationComponentNew {
502 this.backgroundImageH = px2vp(this.topRectHeight) + 44 501 this.backgroundImageH = px2vp(this.topRectHeight) + 44
503 } 502 }
504 503
505 - ColorUtils.changeTopStatusBarColor(this.navItem.statusBarColor) 504 + ColorUtils.changeTopStatusBarColor(this.navItem.statusBarColor, 1)
506 505
507 } 506 }
508 507
509 pageShowChange() { 508 pageShowChange() {
510 - ColorUtils.changeTopStatusBarColor(this.navItem.statusBarColor) 509 + ColorUtils.changeTopStatusBarColor(this.navItem.statusBarColor, 1)
511 } 510 }
512 511
513 -  
514 -  
515 /** 512 /**
516 * 修改手机顶部状态栏颜色 513 * 修改手机顶部状态栏颜色
517 */ 514 */
518 setBarBackgroundColor() { 515 setBarBackgroundColor() {
519 516
520 517
521 - if(this._currentNavIndex == this.bottomNavIndex){  
522 - ColorUtils.changeTopStatusBarColor(this.navItem.statusBarColor) 518 + if (this._currentNavIndex == this.bottomNavIndex) {
  519 + ColorUtils.changeTopStatusBarColor(this.navItem.statusBarColor, 1)
523 520
524 this.isImmersive = false 521 this.isImmersive = false
525 this.barBackgroundColor = Color.White 522 this.barBackgroundColor = Color.White
@@ -666,7 +663,6 @@ export struct TopNavigationComponentNew { @@ -666,7 +663,6 @@ export struct TopNavigationComponentNew {
666 return null 663 return null
667 } 664 }
668 665
669 -  
670 /** 666 /**
671 * 进入早晚报专题 667 * 进入早晚报专题
672 */ 668 */
@@ -44,7 +44,7 @@ export struct CustomTitleAndEditUI { @@ -44,7 +44,7 @@ export struct CustomTitleAndEditUI {
44 if (this.isDisplayButton){ 44 if (this.isDisplayButton){
45 Button(this.isEditState === true?'取消':'编辑') 45 Button(this.isEditState === true?'取消':'编辑')
46 .type(ButtonType.Normal) 46 .type(ButtonType.Normal)
47 - .fontColor($r('app.color.color_222222')) 47 + .fontColor($r('app.color.color_B0B0B0'))
48 .backgroundColor(Color.White) 48 .backgroundColor(Color.White)
49 .id("edit_Button") 49 .id("edit_Button")
50 .alignRules({ 50 .alignRules({
@@ -78,7 +78,7 @@ export struct EmptyComponent { @@ -78,7 +78,7 @@ export struct EmptyComponent {
78 /** 78 /**
79 * The empty data text opacity. 79 * The empty data text opacity.
80 */ 80 */
81 - readonly TEXT_OPACITY: number = 0.4; 81 + readonly TEXT_OPACITY: number = 1.0;
82 private timer: number = -1 82 private timer: number = -1
83 retry: () => void = () => { 83 retry: () => void = () => {
84 } 84 }
@@ -113,6 +113,7 @@ export struct LiveLikeComponent { @@ -113,6 +113,7 @@ export struct LiveLikeComponent {
113 .width(36) 113 .width(36)
114 .height(36) 114 .height(36)
115 .borderRadius(18) 115 .borderRadius(18)
  116 + .margin({top:6})
116 .backgroundColor((this.pageComponentType === 4 || this.pageComponentType === 2) ? '#4D000000' : 117 .backgroundColor((this.pageComponentType === 4 || this.pageComponentType === 2) ? '#4D000000' :
117 this.pageComponentType === 8 ? Color.Transparent : '#FFF5F5F5') 118 this.pageComponentType === 8 ? Color.Transparent : '#FFF5F5F5')
118 119
@@ -120,6 +121,7 @@ export struct LiveLikeComponent { @@ -120,6 +121,7 @@ export struct LiveLikeComponent {
120 RelativeContainer() { 121 RelativeContainer() {
121 Image(this.styleType == 1 ? $r('app.media.comment_icon_number_bg') : $r('app.media.ic_like_back_Select')) 122 Image(this.styleType == 1 ? $r('app.media.comment_icon_number_bg') : $r('app.media.ic_like_back_Select'))
122 .objectFit(ImageFit.Fill) 123 .objectFit(ImageFit.Fill)
  124 + .height(10)
123 .resizable({ 125 .resizable({
124 slice: { 126 slice: {
125 top: 1, 127 top: 1,
@@ -144,14 +146,15 @@ export struct LiveLikeComponent { @@ -144,14 +146,15 @@ export struct LiveLikeComponent {
144 .alignRules({ 146 .alignRules({
145 top: { anchor: "__container__", align: VerticalAlign.Top }, 147 top: { anchor: "__container__", align: VerticalAlign.Top },
146 left: { anchor: "__container__", align: HorizontalAlign.Start } 148 left: { anchor: "__container__", align: HorizontalAlign.Start }
147 - })// .margin({left: 4,right:4  
148 - // }) 149 + })
149 /*动态计算文字宽度*/ 150 /*动态计算文字宽度*/
150 .width(this.getMeasureText(NumberFormatterUtils.formatNumberWithWan(this.likeCount || '')) + 151 .width(this.getMeasureText(NumberFormatterUtils.formatNumberWithWan(this.likeCount || '')) +
151 - 12)// .backgroundColor(Color.Green) 152 + 8)// .backgroundColor(Color.Green)
  153 + .padding({left:2})
152 .id("Text") 154 .id("Text")
153 .visibility(this.likeCount > 0 ? Visibility.Visible : Visibility.Hidden) 155 .visibility(this.likeCount > 0 ? Visibility.Visible : Visibility.Hidden)
154 } 156 }
  157 + .margin({left:10,top:3})
155 .offset({ 158 .offset({
156 x: 18 159 x: 18
157 }) 160 })
@@ -20,6 +20,7 @@ import { EmitterEventId, EmitterUtils } from 'wdKit/Index' @@ -20,6 +20,7 @@ import { EmitterEventId, EmitterUtils } from 'wdKit/Index'
20 import { ParamType, TrackConstants, TrackingContent } from 'wdTracking/Index'; 20 import { ParamType, TrackConstants, TrackingContent } from 'wdTracking/Index';
21 import { CommentCustomDialog, CommentDialogInputContent } from '../comment/view/CommentCustomDialog'; 21 import { CommentCustomDialog, CommentDialogInputContent } from '../comment/view/CommentCustomDialog';
22 import { HttpUtils } from 'wdNetwork/Index'; 22 import { HttpUtils } from 'wdNetwork/Index';
  23 +import { faceDetector } from '@kit.CoreVisionKit';
23 24
24 const TAG = 'LiveOperRowListView'; 25 const TAG = 'LiveOperRowListView';
25 26
@@ -68,7 +69,8 @@ export struct LiveOperRowListView { @@ -68,7 +69,8 @@ export struct LiveOperRowListView {
68 @Consume pageId: string 69 @Consume pageId: string
69 @State likesStyle: number | string = "love" // 点赞样式 love爱心型 thumb点赞手势 mourning 蜡烛(默哀) pray 祈福 70 @State likesStyle: number | string = "love" // 点赞样式 love爱心型 thumb点赞手势 mourning 蜡烛(默哀) pray 祈福
70 @State openLikes: boolean = false // 是否可以点赞 1:可以 0:不可以 71 @State openLikes: boolean = false // 是否可以点赞 1:可以 0:不可以
71 - 72 + //非沉浸式
  73 + private isLlive = false
72 /// comment 74 /// comment
73 @State showCommentInput: boolean = false 75 @State showCommentInput: boolean = false
74 private banComment: boolean = true // 是否已禁言 76 private banComment: boolean = true // 是否已禁言
@@ -138,6 +140,7 @@ export struct LiveOperRowListView { @@ -138,6 +140,7 @@ export struct LiveOperRowListView {
138 .interpolation(ImageInterpolation.High) 140 .interpolation(ImageInterpolation.High)
139 } 141 }
140 .width(48) 142 .width(48)
  143 + .padding({top:10})
141 .hoverEffect(HoverEffect.Scale) 144 .hoverEffect(HoverEffect.Scale)
142 .visibility(this.showBackIcon ? Visibility.Visible : Visibility.None) 145 .visibility(this.showBackIcon ? Visibility.Visible : Visibility.None)
143 .onClick(() => { 146 .onClick(() => {
@@ -169,10 +172,11 @@ export struct LiveOperRowListView { @@ -169,10 +172,11 @@ export struct LiveOperRowListView {
169 .width('100%') 172 .width('100%')
170 .backgroundColor(this.bgColor) 173 .backgroundColor(this.bgColor)
171 .padding({ 174 .padding({
172 - top: 10, 175 + // top: 10,
173 // bottom: 10 176 // bottom: 10
174 - bottom: `${this.bottomSafeHeight}px` 177 + bottom: `${this.bottomSafeHeight}px`,
175 // bottom: 50 178 // bottom: 50
  179 + right:20
176 }) 180 })
177 } 181 }
178 182
@@ -230,6 +234,7 @@ export struct LiveOperRowListView { @@ -230,6 +234,7 @@ export struct LiveOperRowListView {
230 Blank() 234 Blank()
231 } 235 }
232 } 236 }
  237 + .padding({top:10})
233 .layoutWeight(1) 238 .layoutWeight(1)
234 .margin({ left: 16 }) 239 .margin({ left: 16 })
235 } 240 }
@@ -247,6 +252,7 @@ export struct LiveOperRowListView { @@ -247,6 +252,7 @@ export struct LiveOperRowListView {
247 }) 252 })
248 } 253 }
249 .width(48) 254 .width(48)
  255 + .margin({left:this.isLlive?0:10})
250 .visibility(this.likesStyle == 4 || this.likesStyle == 'empty' || !this.openLikes ? Visibility.None : Visibility.Visible) 256 .visibility(this.likesStyle == 4 || this.likesStyle == 'empty' || !this.openLikes ? Visibility.None : Visibility.Visible)
251 } 257 }
252 258
@@ -274,8 +280,9 @@ export struct LiveOperRowListView { @@ -274,8 +280,9 @@ export struct LiveOperRowListView {
274 })*/ 280 })*/
275 } 281 }
276 .height(36) 282 .height(36)
277 - .width(48) 283 + .width(this.isLlive?48:36)
278 .borderRadius(18) 284 .borderRadius(18)
  285 + .margin({top:10,left:this.isLlive?0:10})
279 .backgroundColor(this.pageComponentType === 2 ? '#4D000000' : Color.Transparent) 286 .backgroundColor(this.pageComponentType === 2 ? '#4D000000' : Color.Transparent)
280 .onClick(() => { 287 .onClick(() => {
281 this.toggleCollectStatus() 288 this.toggleCollectStatus()
@@ -299,9 +306,10 @@ export struct LiveOperRowListView { @@ -299,9 +306,10 @@ export struct LiveOperRowListView {
299 this.share() 306 this.share()
300 }) 307 })
301 } 308 }
  309 + .margin({top:10,left:this.isLlive?0:10})
302 .justifyContent(FlexAlign.Center) 310 .justifyContent(FlexAlign.Center)
303 .height(36) 311 .height(36)
304 - .width(48) 312 + .width(this.isLlive?48:36)
305 .borderRadius(18) 313 .borderRadius(18)
306 .backgroundColor(this.pageComponentType === 2 ? '#4D000000' : Color.Transparent) 314 .backgroundColor(this.pageComponentType === 2 ? '#4D000000' : Color.Transparent)
307 } 315 }
@@ -242,7 +242,7 @@ export class ColorUtils { @@ -242,7 +242,7 @@ export class ColorUtils {
242 /** 242 /**
243 * 获取图片填充的ColorFilter 243 * 获取图片填充的ColorFilter
244 * @param hex 十六进制颜色值 244 * @param hex 十六进制颜色值
245 - * @returns undefined:无填充颜色 245 + * @returns undefined:无填充颜色
246 */ 246 */
247 public static getDrawingColorFilter(hex: string): ColorFilter | undefined { 247 public static getDrawingColorFilter(hex: string): ColorFilter | undefined {
248 248
@@ -270,10 +270,16 @@ export class ColorUtils { @@ -270,10 +270,16 @@ export class ColorUtils {
270 270
271 /** 271 /**
272 * 修改手机顶部状态栏颜色 272 * 修改手机顶部状态栏颜色
273 - * @param statusValue 273 + * @param statusValue 动态修改值
  274 + * @param defaultValue 页面默认值:statusValue== null 就按此值走
274 */ 275 */
275 - public static changeTopStatusBarColor(statusValue: number) {  
276 - if (statusValue === 1) { // 黑色状态栏 276 + public static changeTopStatusBarColor(statusValue: number, defaultValue: number) {
  277 + if (statusValue == null) {
  278 + statusValue = defaultValue
  279 + } else { //白色状态栏
  280 + }
  281 +
  282 + if (statusValue === 1 || statusValue == null) { // 黑色状态栏
277 WindowModel.shared.setWindowSystemBarProperties({ 283 WindowModel.shared.setWindowSystemBarProperties({
278 statusBarContentColor: '#000000', 284 statusBarContentColor: '#000000',
279 285
  1 +import { ALL, ImageKnifeOption } from '@ohos/imageknife';
  2 +import { TopNavDTO } from 'wdBean/Index';
  3 +
  4 +/**
  5 + * 通用工具类,只记录处理build里面组件业务计算逻辑
  6 + */
  7 +export class CommonUtils{
  8 +
  9 +
  10 + /**
  11 + * 获取顶部导航栏的频道option
  12 + * @param item
  13 + * @param isSelect
  14 + * @returns
  15 + */
  16 + public static getTopImageKnifeOption(item: TopNavDTO, isSelect: boolean): ImageKnifeOption {
  17 + // let defaultIcon = this.getBottomLocalIcon(navItem, isSelect)
  18 + let url = isSelect ? item.iconCUrl:item.iconUrl // this.getBottomIcon(navItem, isSelect)
  19 +
  20 + let imageKnifeOption: ImageKnifeOption = {
  21 + loadSrc: url,
  22 + // // 占位图使用本地资源
  23 + // placeholderSrc: defaultIcon,
  24 + // // 失败占位图使用本地资源
  25 + // errorholderSrc: defaultIcon,
  26 + // 是否开启一级内存缓存
  27 + isCacheable: true,
  28 + // 磁盘缓存
  29 + strategy: new ALL(),
  30 + gif: {
  31 + playTimes: 1
  32 + }
  33 + };
  34 + return imageKnifeOption
  35 + }
  36 +
  37 + /**
  38 + * 计算 频道tab 宽度
  39 + * @param height 已知高度
  40 + * @returns
  41 + */
  42 + public static calTopTabWidth(height:number,scale:string):number{
  43 + if(scale){
  44 +
  45 + if(scale.includes('*')){
  46 + let scaleArray = scale.split('*');
  47 + return height*Number.parseInt(scaleArray[0])/parseInt(scaleArray[1])
  48 + }
  49 + }
  50 + return height*210/60
  51 +
  52 + }
  53 +
  54 +}
@@ -109,6 +109,7 @@ export struct DetailPlayLivePage { @@ -109,6 +109,7 @@ export struct DetailPlayLivePage {
109 LiveOperRowListView({ 109 LiveOperRowListView({
110 operationButtonList: ['comment', 'collect', 'share', 'like'], 110 operationButtonList: ['comment', 'collect', 'share', 'like'],
111 styleType: 1, 111 styleType: 1,
  112 + isLlive:this.displayDirection == DisplayDirection.VERTICAL,
112 contentDetailData: this.contentDetailData, 113 contentDetailData: this.contentDetailData,
113 onCommentInputFocus: () => { 114 onCommentInputFocus: () => {
114 // 切换到大家聊 115 // 切换到大家聊
@@ -2,15 +2,20 @@ @@ -2,15 +2,20 @@
2 * 视频频道,包含视频和直播 2 * 视频频道,包含视频和直播
3 * 视频为沉浸式,直播同新闻页面 3 * 视频为沉浸式,直播同新闻页面
4 */ 4 */
5 -import { BottomNavDTO, TopNavDTO } from 'wdBean/Index' 5 +import { BottomNavDTO, TopNavDTO } from 'wdBean/Index';
6 import { VideoChannelDetail } from 'wdDetailPlayShortVideo/Index'; 6 import { VideoChannelDetail } from 'wdDetailPlayShortVideo/Index';
7 import { WDRouterPage, WDRouterRule } from 'wdRouter'; 7 import { WDRouterPage, WDRouterRule } from 'wdRouter';
8 import { DisplayDirection } from 'wdConstant/Index'; 8 import { DisplayDirection } from 'wdConstant/Index';
  9 +import { CompUtils, PageComponent } from 'wdComponent/Index';
  10 +import { ParamType, TrackConstants, Tracking, TrackingButton } from 'wdTracking/Index';
  11 +import { Logger } from 'wdKit';
9 import { CompUtils, GrayManageModel, PageComponent } from 'wdComponent/Index'; 12 import { CompUtils, GrayManageModel, PageComponent } from 'wdComponent/Index';
10 import { TrackingButton, TrackConstants } from 'wdTracking/Index'; 13 import { TrackingButton, TrackConstants } from 'wdTracking/Index';
11 import { Logger, WindowModel } from 'wdKit'; 14 import { Logger, WindowModel } from 'wdKit';
12 import { ParamType, Tracking } from 'wdTracking/Index'; 15 import { ParamType, Tracking } from 'wdTracking/Index';
13 import { ColorUtils } from 'wdComponent/src/main/ets/utils/ColorUtils'; 16 import { ColorUtils } from 'wdComponent/src/main/ets/utils/ColorUtils';
  17 +import { ImageKnifeComponent } from '@ohos/imageknife';
  18 +import { CommonUtils } from 'wdComponent/src/main/ets/utils/CommonUtils';
14 19
15 const TAG = 'VideoChannelPage' 20 const TAG = 'VideoChannelPage'
16 21
@@ -39,7 +44,6 @@ export struct VideoChannelPage { @@ -39,7 +44,6 @@ export struct VideoChannelPage {
39 navItem: BottomNavDTO = {} as BottomNavDTO 44 navItem: BottomNavDTO = {} as BottomNavDTO
40 // 背景高度 45 // 背景高度
41 @State backgroundImageH: number = 0 46 @State backgroundImageH: number = 0
42 -  
43 @Consume @Watch('setBarBackgroundColor') pageShow: number 47 @Consume @Watch('setBarBackgroundColor') pageShow: number
44 // 国殇灰度管理 48 // 国殇灰度管理
45 GrayManage: SubscribedAbstractProperty<GrayManageModel> = AppStorage.link<GrayManageModel>('GrayManage') 49 GrayManage: SubscribedAbstractProperty<GrayManageModel> = AppStorage.link<GrayManageModel>('GrayManage')
@@ -50,7 +54,6 @@ export struct VideoChannelPage { @@ -50,7 +54,6 @@ export struct VideoChannelPage {
50 this.setBarBackgroundColor() 54 this.setBarBackgroundColor()
51 } 55 }
52 56
53 -  
54 /** 57 /**
55 * 顶导、底导切换下标都到改变背景色,进入或退出沉浸式 58 * 顶导、底导切换下标都到改变背景色,进入或退出沉浸式
56 */ 59 */
@@ -59,16 +62,15 @@ export struct VideoChannelPage { @@ -59,16 +62,15 @@ export struct VideoChannelPage {
59 if (this.isImmerseChannel() && CompUtils.isVideo(this.currentBottomNavInfo)) { 62 if (this.isImmerseChannel() && CompUtils.isVideo(this.currentBottomNavInfo)) {
60 this.barBackgroundColor = Color.Black 63 this.barBackgroundColor = Color.Black
61 this.isImmersive = true 64 this.isImmersive = true
62 - ColorUtils.changeTopStatusBarColor(0)// 沉浸页面顶部导航栏颜色固定黑色 65 + ColorUtils.changeTopStatusBarColor(0, 0) // 沉浸页面顶部导航栏颜色固定黑色
63 } else { 66 } else {
64 this.isImmersive = false 67 this.isImmersive = false
65 this.barBackgroundColor = Color.White 68 this.barBackgroundColor = Color.White
66 - ColorUtils.changeTopStatusBarColor(this.navItem.statusBarColor) 69 + ColorUtils.changeTopStatusBarColor(this.navItem.statusBarColor, 1)
67 } 70 }
68 71
69 } 72 }
70 73
71 -  
72 /** 74 /**
73 * 得到顶导文字颜色 75 * 得到顶导文字颜色
74 * @param item 76 * @param item
@@ -116,28 +118,35 @@ export struct VideoChannelPage { @@ -116,28 +118,35 @@ export struct VideoChannelPage {
116 Row() { 118 Row() {
117 ForEach(this.topNavList, (item: TopNavDTO, index: number) => { 119 ForEach(this.topNavList, (item: TopNavDTO, index: number) => {
118 Column() { 120 Column() {
119 -  
120 - Text(item.name)  
121 - .fontSize($r('app.float.selected_text_size'))  
122 - .fontWeight(this.currentTopNavSelectedIndex === index ? FontWeight.Bold : FontWeight.Normal)  
123 - .fontColor(this.getTopNavFontColor(item, index))  
124 - .padding({  
125 - top: $r('app.float.top_tab_item_padding_top'),  
126 - bottom: $r('app.float.top_tab_item_padding_bottom') 121 + if (item.iconUrl && item.iconCUrl) {
  122 + // 有图
  123 + ImageKnifeComponent({
  124 + imageKnifeOption: CommonUtils.getTopImageKnifeOption(item, this.currentTopNavSelectedIndex === index)
127 }) 125 })
128 - .maxLines(this.MAX_LINE)  
129 -  
130 -  
131 - Image($r('app.media.icon_channel_active'))  
132 - .colorFilter(ColorUtils.getDrawingColorFilter(this.getBothColor("")))  
133 - .width(20)  
134 - .height(3).visibility(this.currentTopNavSelectedIndex === index ? Visibility.Visible : Visibility.Hidden)  
135 - 126 + .height(36)
  127 + .width(CommonUtils.calTopTabWidth(36, item.iconUrlSize))
  128 + .enabled(false)
  129 + } else {
  130 + Text(item.name)
  131 + .fontSize($r('app.float.selected_text_size'))
  132 + .fontWeight(this.currentTopNavSelectedIndex === index ? FontWeight.Bold : FontWeight.Normal)
  133 + .fontColor(this.getTopNavFontColor(item, index))
  134 + .padding({
  135 + top: $r('app.float.top_tab_item_padding_top'),
  136 + bottom: $r('app.float.top_tab_item_padding_bottom')
  137 + })
  138 + .maxLines(this.MAX_LINE)
  139 +
  140 + Image($r('app.media.icon_channel_active'))// .colorFilter(ColorUtils.getDrawingColorFilter(this.getBothColor("")))
  141 + .width(20)
  142 + .height(3)
  143 + .visibility(this.currentTopNavSelectedIndex === index ? Visibility.Visible : Visibility.Hidden)
136 144
  145 + }
137 } 146 }
138 .padding({ 147 .padding({
139 - left: $r('app.float.top_tab_item_padding_horizontal'),  
140 - right: $r('app.float.top_tab_item_padding_horizontal'), 148 + left: item.iconUrl && item.iconCUrl ? 0 : $r('app.float.top_tab_item_padding_horizontal'),
  149 + right: item.iconUrl && item.iconCUrl ? 0 : $r('app.float.top_tab_item_padding_horizontal'),
141 }) 150 })
142 .onClick(() => { 151 .onClick(() => {
143 // 视频tab埋点 152 // 视频tab埋点
@@ -185,7 +194,6 @@ export struct VideoChannelPage { @@ -185,7 +194,6 @@ export struct VideoChannelPage {
185 WDRouterRule.jumpWithPage(WDRouterPage.searchPage, params) 194 WDRouterRule.jumpWithPage(WDRouterPage.searchPage, params)
186 }) 195 })
187 .backgroundColor(Color.Transparent) 196 .backgroundColor(Color.Transparent)
188 - .grayscale(this.GrayManage.get().isMourning() ? 1 : 0)  
189 197
190 } 198 }
191 .zIndex(20) 199 .zIndex(20)
@@ -201,7 +209,7 @@ export struct VideoChannelPage { @@ -201,7 +209,7 @@ export struct VideoChannelPage {
201 * 检测是否是沉浸式频道 209 * 检测是否是沉浸式频道
202 * @returns 210 * @returns
203 */ 211 */
204 - isImmerseChannel():boolean{ 212 + isImmerseChannel(): boolean {
205 213
206 return this.navItem.topNavChannelList[this.currentTopNavSelectedIndex].channelStyle === 1; 214 return this.navItem.topNavChannelList[this.currentTopNavSelectedIndex].channelStyle === 1;
207 } 215 }
@@ -219,7 +227,7 @@ export struct VideoChannelPage { @@ -219,7 +227,7 @@ export struct VideoChannelPage {
219 pageSwiperView() { 227 pageSwiperView() {
220 Swiper(this.swiperController) { 228 Swiper(this.swiperController) {
221 ForEach(this.topNavList, (item: TopNavDTO, index: number) => { 229 ForEach(this.topNavList, (item: TopNavDTO, index: number) => {
222 - if (item.channelStyle===1) { 230 + if (item.channelStyle === 1) {
223 // 视频 231 // 视频
224 VideoChannelDetail({ 232 VideoChannelDetail({
225 bottomNavIndex: $_currentNavIndex, 233 bottomNavIndex: $_currentNavIndex,