Merge branch 'main' of http://192.168.1.42/developOne/harmonyPool into main
* 'main' of http://192.168.1.42/developOne/harmonyPool: fix: 信息流卡片内外边距修改 fix(18527):UI还原问题-【uat】进入直播预告点赞按钮数量样式和ios 不一致,看图 feat:换肤 1)频道图片展示和gif展示 feat:进入文章详情页,评论页,缺省图文案偏淡问题修复
Showing
36 changed files
with
252 additions
and
121 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 }) |
| @@ -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 | }) |
| 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'; |
| @@ -12,6 +12,8 @@ import DailyPaperTopicModel from '../../model/DailyPaperTopicModel'; | @@ -12,6 +12,8 @@ import DailyPaperTopicModel from '../../model/DailyPaperTopicModel'; | ||
| 12 | import { CompUtils } from '../../utils/CompUtils'; | 12 | import { CompUtils } from '../../utils/CompUtils'; |
| 13 | import ChannelViewModel from '../../viewmodel/ChannelViewModel'; | 13 | import ChannelViewModel from '../../viewmodel/ChannelViewModel'; |
| 14 | import { ColorUtils } from '../../utils/ColorUtils'; | 14 | import { ColorUtils } from '../../utils/ColorUtils'; |
| 15 | +import { ImageKnifeComponent } from '@ohos/imageknife'; | ||
| 16 | +import { CommonUtils } from '../../utils/CommonUtils'; | ||
| 15 | 17 | ||
| 16 | const TAG = 'TopNavigationComponent'; | 18 | const TAG = 'TopNavigationComponent'; |
| 17 | 19 | ||
| @@ -330,8 +332,10 @@ export struct TopNavigationComponentNew { | @@ -330,8 +332,10 @@ export struct TopNavigationComponentNew { | ||
| 330 | 332 | ||
| 331 | if (item.iconUrl && item.iconCUrl) { | 333 | if (item.iconUrl && item.iconCUrl) { |
| 332 | // 有图 | 334 | // 有图 |
| 333 | - Image(this.currentTopNavSelectedIndex === index ? item.iconUrl : item.iconCUrl) | 335 | + ImageKnifeComponent({ imageKnifeOption: CommonUtils.getTopImageKnifeOption(item, this.currentTopNavSelectedIndex === index) }) |
| 334 | .height(36) | 336 | .height(36) |
| 337 | + .width(CommonUtils.calTopTabWidth(36,item.iconUrlSize)) | ||
| 338 | + .enabled(false) | ||
| 335 | } else { | 339 | } else { |
| 336 | // 无图 | 340 | // 无图 |
| 337 | Text(item?.name) | 341 | Text(item?.name) |
| @@ -352,7 +356,6 @@ export struct TopNavigationComponentNew { | @@ -352,7 +356,6 @@ export struct TopNavigationComponentNew { | ||
| 352 | } | 356 | } |
| 353 | } | 357 | } |
| 354 | 358 | ||
| 355 | - | ||
| 356 | } | 359 | } |
| 357 | .hoverEffect(HoverEffect.Highlight) | 360 | .hoverEffect(HoverEffect.Highlight) |
| 358 | .constraintSize({ | 361 | .constraintSize({ |
| @@ -362,8 +365,8 @@ export struct TopNavigationComponentNew { | @@ -362,8 +365,8 @@ export struct TopNavigationComponentNew { | ||
| 362 | .height('100%') | 365 | .height('100%') |
| 363 | // .backgroundColor(Color.Transparent) | 366 | // .backgroundColor(Color.Transparent) |
| 364 | .padding({ | 367 | .padding({ |
| 365 | - left: $r('app.float.top_tab_item_padding_horizontal'), | ||
| 366 | - right: $r('app.float.top_tab_item_padding_horizontal'), | 368 | + left: item.iconUrl && item.iconCUrl ? 0 : $r('app.float.top_tab_item_padding_horizontal'), |
| 369 | + right: item.iconUrl && item.iconCUrl ? 0 : $r('app.float.top_tab_item_padding_horizontal'), | ||
| 367 | }) | 370 | }) |
| 368 | .justifyContent(FlexAlign.Center) | 371 | .justifyContent(FlexAlign.Center) |
| 369 | .id(`col_tabBar${index}`) | 372 | .id(`col_tabBar${index}`) |
| @@ -379,6 +382,8 @@ export struct TopNavigationComponentNew { | @@ -379,6 +382,8 @@ export struct TopNavigationComponentNew { | ||
| 379 | }) | 382 | }) |
| 380 | } | 383 | } |
| 381 | 384 | ||
| 385 | + | ||
| 386 | + | ||
| 382 | /** | 387 | /** |
| 383 | * 频道文字颜色 | 388 | * 频道文字颜色 |
| 384 | * @returns | 389 | * @returns |
| @@ -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 | } |
| 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,16 @@ | @@ -2,15 +2,16 @@ | ||
| 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'; | 9 | import { CompUtils, PageComponent } from 'wdComponent/Index'; |
| 10 | -import { TrackingButton, TrackConstants } from 'wdTracking/Index'; | ||
| 11 | -import { Logger, WindowModel } from 'wdKit'; | ||
| 12 | -import { ParamType, Tracking } from 'wdTracking/Index'; | 10 | +import { ParamType, TrackConstants, Tracking, TrackingButton } from 'wdTracking/Index'; |
| 11 | +import { Logger } from 'wdKit'; | ||
| 13 | import { ColorUtils } from 'wdComponent/src/main/ets/utils/ColorUtils'; | 12 | import { ColorUtils } from 'wdComponent/src/main/ets/utils/ColorUtils'; |
| 13 | +import { ImageKnifeComponent } from '@ohos/imageknife'; | ||
| 14 | +import { CommonUtils } from 'wdComponent/src/main/ets/utils/CommonUtils'; | ||
| 14 | 15 | ||
| 15 | const TAG = 'VideoChannelPage' | 16 | const TAG = 'VideoChannelPage' |
| 16 | 17 | ||
| @@ -39,7 +40,6 @@ export struct VideoChannelPage { | @@ -39,7 +40,6 @@ export struct VideoChannelPage { | ||
| 39 | navItem: BottomNavDTO = {} as BottomNavDTO | 40 | navItem: BottomNavDTO = {} as BottomNavDTO |
| 40 | // 背景高度 | 41 | // 背景高度 |
| 41 | @State backgroundImageH: number = 0 | 42 | @State backgroundImageH: number = 0 |
| 42 | - | ||
| 43 | @Consume @Watch('setBarBackgroundColor') pageShow: number | 43 | @Consume @Watch('setBarBackgroundColor') pageShow: number |
| 44 | 44 | ||
| 45 | async aboutToAppear() { | 45 | async aboutToAppear() { |
| @@ -48,7 +48,6 @@ export struct VideoChannelPage { | @@ -48,7 +48,6 @@ export struct VideoChannelPage { | ||
| 48 | this.setBarBackgroundColor() | 48 | this.setBarBackgroundColor() |
| 49 | } | 49 | } |
| 50 | 50 | ||
| 51 | - | ||
| 52 | /** | 51 | /** |
| 53 | * 顶导、底导切换下标都到改变背景色,进入或退出沉浸式 | 52 | * 顶导、底导切换下标都到改变背景色,进入或退出沉浸式 |
| 54 | */ | 53 | */ |
| @@ -57,16 +56,15 @@ export struct VideoChannelPage { | @@ -57,16 +56,15 @@ export struct VideoChannelPage { | ||
| 57 | if (this.isImmerseChannel() && CompUtils.isVideo(this.currentBottomNavInfo)) { | 56 | if (this.isImmerseChannel() && CompUtils.isVideo(this.currentBottomNavInfo)) { |
| 58 | this.barBackgroundColor = Color.Black | 57 | this.barBackgroundColor = Color.Black |
| 59 | this.isImmersive = true | 58 | this.isImmersive = true |
| 60 | - ColorUtils.changeTopStatusBarColor(0,0)// 沉浸页面顶部导航栏颜色固定黑色 | 59 | + ColorUtils.changeTopStatusBarColor(0, 0) // 沉浸页面顶部导航栏颜色固定黑色 |
| 61 | } else { | 60 | } else { |
| 62 | this.isImmersive = false | 61 | this.isImmersive = false |
| 63 | this.barBackgroundColor = Color.White | 62 | this.barBackgroundColor = Color.White |
| 64 | - ColorUtils.changeTopStatusBarColor(this.navItem.statusBarColor,1) | 63 | + ColorUtils.changeTopStatusBarColor(this.navItem.statusBarColor, 1) |
| 65 | } | 64 | } |
| 66 | 65 | ||
| 67 | } | 66 | } |
| 68 | 67 | ||
| 69 | - | ||
| 70 | /** | 68 | /** |
| 71 | * 得到顶导文字颜色 | 69 | * 得到顶导文字颜色 |
| 72 | * @param item | 70 | * @param item |
| @@ -114,28 +112,35 @@ export struct VideoChannelPage { | @@ -114,28 +112,35 @@ export struct VideoChannelPage { | ||
| 114 | Row() { | 112 | Row() { |
| 115 | ForEach(this.topNavList, (item: TopNavDTO, index: number) => { | 113 | ForEach(this.topNavList, (item: TopNavDTO, index: number) => { |
| 116 | Column() { | 114 | Column() { |
| 117 | - | ||
| 118 | - Text(item.name) | ||
| 119 | - .fontSize($r('app.float.selected_text_size')) | ||
| 120 | - .fontWeight(this.currentTopNavSelectedIndex === index ? FontWeight.Bold : FontWeight.Normal) | ||
| 121 | - .fontColor(this.getTopNavFontColor(item, index)) | ||
| 122 | - .padding({ | ||
| 123 | - top: $r('app.float.top_tab_item_padding_top'), | ||
| 124 | - bottom: $r('app.float.top_tab_item_padding_bottom') | 115 | + if (item.iconUrl && item.iconCUrl) { |
| 116 | + // 有图 | ||
| 117 | + ImageKnifeComponent({ | ||
| 118 | + imageKnifeOption: CommonUtils.getTopImageKnifeOption(item, this.currentTopNavSelectedIndex === index) | ||
| 125 | }) | 119 | }) |
| 126 | - .maxLines(this.MAX_LINE) | ||
| 127 | - | ||
| 128 | - | ||
| 129 | - Image($r('app.media.icon_channel_active')) | ||
| 130 | - // .colorFilter(ColorUtils.getDrawingColorFilter(this.getBothColor(""))) | ||
| 131 | - .width(20) | ||
| 132 | - .height(3).visibility(this.currentTopNavSelectedIndex === index ? Visibility.Visible : Visibility.Hidden) | ||
| 133 | - | 120 | + .height(36) |
| 121 | + .width(CommonUtils.calTopTabWidth(36, item.iconUrlSize)) | ||
| 122 | + .enabled(false) | ||
| 123 | + } else { | ||
| 124 | + Text(item.name) | ||
| 125 | + .fontSize($r('app.float.selected_text_size')) | ||
| 126 | + .fontWeight(this.currentTopNavSelectedIndex === index ? FontWeight.Bold : FontWeight.Normal) | ||
| 127 | + .fontColor(this.getTopNavFontColor(item, index)) | ||
| 128 | + .padding({ | ||
| 129 | + top: $r('app.float.top_tab_item_padding_top'), | ||
| 130 | + bottom: $r('app.float.top_tab_item_padding_bottom') | ||
| 131 | + }) | ||
| 132 | + .maxLines(this.MAX_LINE) | ||
| 133 | + | ||
| 134 | + Image($r('app.media.icon_channel_active'))// .colorFilter(ColorUtils.getDrawingColorFilter(this.getBothColor(""))) | ||
| 135 | + .width(20) | ||
| 136 | + .height(3) | ||
| 137 | + .visibility(this.currentTopNavSelectedIndex === index ? Visibility.Visible : Visibility.Hidden) | ||
| 134 | 138 | ||
| 139 | + } | ||
| 135 | } | 140 | } |
| 136 | .padding({ | 141 | .padding({ |
| 137 | - left: $r('app.float.top_tab_item_padding_horizontal'), | ||
| 138 | - right: $r('app.float.top_tab_item_padding_horizontal'), | 142 | + left: item.iconUrl && item.iconCUrl ? 0 : $r('app.float.top_tab_item_padding_horizontal'), |
| 143 | + right: item.iconUrl && item.iconCUrl ? 0 : $r('app.float.top_tab_item_padding_horizontal'), | ||
| 139 | }) | 144 | }) |
| 140 | .onClick(() => { | 145 | .onClick(() => { |
| 141 | // 视频tab埋点 | 146 | // 视频tab埋点 |
| @@ -197,7 +202,7 @@ export struct VideoChannelPage { | @@ -197,7 +202,7 @@ export struct VideoChannelPage { | ||
| 197 | * 检测是否是沉浸式频道 | 202 | * 检测是否是沉浸式频道 |
| 198 | * @returns | 203 | * @returns |
| 199 | */ | 204 | */ |
| 200 | - isImmerseChannel():boolean{ | 205 | + isImmerseChannel(): boolean { |
| 201 | 206 | ||
| 202 | return this.navItem.topNavChannelList[this.currentTopNavSelectedIndex].channelStyle === 1; | 207 | return this.navItem.topNavChannelList[this.currentTopNavSelectedIndex].channelStyle === 1; |
| 203 | } | 208 | } |
| @@ -215,7 +220,7 @@ export struct VideoChannelPage { | @@ -215,7 +220,7 @@ export struct VideoChannelPage { | ||
| 215 | pageSwiperView() { | 220 | pageSwiperView() { |
| 216 | Swiper(this.swiperController) { | 221 | Swiper(this.swiperController) { |
| 217 | ForEach(this.topNavList, (item: TopNavDTO, index: number) => { | 222 | ForEach(this.topNavList, (item: TopNavDTO, index: number) => { |
| 218 | - if (item.channelStyle===1) { | 223 | + if (item.channelStyle === 1) { |
| 219 | // 视频 | 224 | // 视频 |
| 220 | VideoChannelDetail({ | 225 | VideoChannelDetail({ |
| 221 | bottomNavIndex: $_currentNavIndex, | 226 | bottomNavIndex: $_currentNavIndex, |
-
Please register or login to post a comment