张善主

Merge remote-tracking branch 'origin/main'

@@ -21,7 +21,7 @@ export enum HostEnum { @@ -21,7 +21,7 @@ export enum HostEnum {
21 * 环境host管理工具类 21 * 环境host管理工具类
22 */ 22 */
23 export class HostManager { 23 export class HostManager {
24 - private static _hostUrl: HostEnum = HostEnum.HOST_PRODUCT; 24 + private static _hostUrl: HostEnum = HostEnum.HOST_UAT;
25 25
26 static changeHost(host: HostEnum) { 26 static changeHost(host: HostEnum) {
27 HostManager._hostUrl = host; 27 HostManager._hostUrl = host;
@@ -12,7 +12,8 @@ import { SearchShowRed, titleInitRes, textItem } from '../../utils/searchShowRed @@ -12,7 +12,8 @@ import { SearchShowRed, titleInitRes, textItem } from '../../utils/searchShowRed
12 const TAG = 'Card16Component'; 12 const TAG = 'Card16Component';
13 13
14 interface fullColumnImgUrlItem { 14 interface fullColumnImgUrlItem {
15 - url: string 15 + url: string,
  16 + fullUrl: string
16 } 17 }
17 18
18 19
@@ -81,15 +82,45 @@ export struct Card16Component { @@ -81,15 +82,45 @@ export struct Card16Component {
81 .lineHeight(25) 82 .lineHeight(25)
82 } 83 }
83 if (this.contentDTO.fullColumnImgUrls?.length > 0) { 84 if (this.contentDTO.fullColumnImgUrls?.length > 0) {
84 - Flex() {  
85 - ForEach(this.contentDTO.fullColumnImgUrls.slice(0, 3), (item: fullColumnImgUrlItem, index: number) => {  
86 - Image(this.loadImg ? item.url : '')  
87 - .backgroundColor(0xf5f5f5)  
88 - .flexBasis(113)  
89 - .height(75)  
90 - .margin({ right: index > 1 ? 0 : 2 }) 85 + //三图
  86 + Stack(){
  87 + Row() {
  88 + GridRow({ gutter: 2 }) {
  89 + ForEach(this.contentDTO.fullColumnImgUrls.slice(0, 3), (item: fullColumnImgUrlItem, index: number) => {
  90 + if (index < 3) {
  91 + GridCol({ span: { xs: 4 } }) {
  92 + Image(this.loadImg ? item.url || item.fullUrl : '')
  93 + .backgroundColor(0xf5f5f5)
  94 + .width('100%')
  95 + .aspectRatio(113 / 75)
  96 + .borderRadius({
  97 + topLeft: index === 0 ? $r('app.float.image_border_radius') : 0,
  98 + topRight: index === 2 ? $r('app.float.image_border_radius') : 0,
  99 + bottomLeft: index === 0 ? $r('app.float.image_border_radius') : 0,
  100 + bottomRight: index === 2 ? $r('app.float.image_border_radius') : 0,
  101 + })
  102 + }
  103 + }
  104 + })
  105 + }
  106 + }
  107 + .width(CommonConstants.FULL_PARENT)
  108 + .margin({ top: 8 })
  109 + CardMediaInfo({
  110 + contentDTO: this.contentDTO
91 }) 111 })
92 } 112 }
  113 + .width(CommonConstants.FULL_PARENT)
  114 + .alignContent(Alignment.BottomEnd)
  115 + // Flex() {
  116 + // ForEach(this.contentDTO.fullColumnImgUrls.slice(0, 3), (item: fullColumnImgUrlItem, index: number) => {
  117 + // Image(this.loadImg ? item.url : '')
  118 + // .backgroundColor(0xf5f5f5)
  119 + // .flexBasis(113)
  120 + // .height(75)
  121 + // .margin({ right: index > 1 ? 0 : 2 })
  122 + // })
  123 + // }
93 } 124 }
94 CarderInteraction({contentDTO: this.contentDTO}) 125 CarderInteraction({contentDTO: this.contentDTO})
95 //TODO 底部的:分享、评论、点赞 功能;需要引用一个公共组件 126 //TODO 底部的:分享、评论、点赞 功能;需要引用一个公共组件
@@ -2,6 +2,7 @@ import { CommonConstants } from 'wdConstant' @@ -2,6 +2,7 @@ import { CommonConstants } from 'wdConstant'
2 import { ContentDTO, CompDTO, Action, Params } from 'wdBean' 2 import { ContentDTO, CompDTO, Action, Params } from 'wdBean'
3 import { ProcessUtils, WDRouterRule, WDRouterPage } from 'wdRouter'; 3 import { ProcessUtils, WDRouterRule, WDRouterPage } from 'wdRouter';
4 import { InfomationCardClick } from '../../utils/infomationCardClick'; 4 import { InfomationCardClick } from '../../utils/infomationCardClick';
  5 +import { CardMediaInfo } from '../cardCommon/CardMediaInfo'
5 6
6 @Component 7 @Component
7 export struct HorizontalStrokeCardThreeTwoRadioForMoreComponent { 8 export struct HorizontalStrokeCardThreeTwoRadioForMoreComponent {
@@ -128,11 +129,18 @@ export struct HorizontalStrokeCardThreeTwoRadioForMoreComponent { @@ -128,11 +129,18 @@ export struct HorizontalStrokeCardThreeTwoRadioForMoreComponent {
128 Row() { 129 Row() {
129 ForEach(this.compDTO.operDataList, (item: ContentDTO, index: number) => { 130 ForEach(this.compDTO.operDataList, (item: ContentDTO, index: number) => {
130 Column() { 131 Column() {
131 - Image(item.coverUrl)  
132 - .aspectRatio(1.5)  
133 - .width(this.compDTO.operDataList.length == 2 ? 210 : 150)  
134 - .borderRadius(4)  
135 - .objectFit(ImageFit.Cover) 132 + Stack() {
  133 + Image(item.coverUrl)
  134 + .aspectRatio(1.5)
  135 + .width(this.compDTO.operDataList.length == 2 ? 210 : 150)
  136 + .borderRadius(4)
  137 + .objectFit(ImageFit.Cover)
  138 + CardMediaInfo({
  139 + livePeopleNum:false,
  140 + contentDTO: item
  141 + })
  142 + }
  143 + .align(Alignment.BottomEnd)
136 144
137 Text(item.newsTitle) 145 Text(item.newsTitle)
138 .fontSize($r("app.float.font_size_14")) 146 .fontSize($r("app.float.font_size_14"))
@@ -143,10 +151,9 @@ export struct HorizontalStrokeCardThreeTwoRadioForMoreComponent { @@ -143,10 +151,9 @@ export struct HorizontalStrokeCardThreeTwoRadioForMoreComponent {
143 .textAlign(TextAlign.Start) 151 .textAlign(TextAlign.Start)
144 .margin({ top: 8 }) 152 .margin({ top: 8 })
145 .width(this.compDTO.operDataList.length == 2 ? 210 : 150) 153 .width(this.compDTO.operDataList.length == 2 ? 210 : 150)
146 - .lineHeight(19)  
147 .lineHeight(21) 154 .lineHeight(21)
148 } 155 }
149 - .height(134) 156 + .height(this.compDTO.operDataList.length == 2 ? 190 : 150)
150 .padding({ right: 16 }) 157 .padding({ right: 16 })
151 // .offset({x:16}) 158 // .offset({x:16})
152 .onClick(() => { 159 .onClick(() => {
@@ -218,7 +225,7 @@ export struct HorizontalStrokeCardThreeTwoRadioForMoreComponent { @@ -218,7 +225,7 @@ export struct HorizontalStrokeCardThreeTwoRadioForMoreComponent {
218 left: $r('app.float.card_comp_pagePadding_lf'), 225 left: $r('app.float.card_comp_pagePadding_lf'),
219 right: $r('app.float.card_comp_pagePadding_lf'), 226 right: $r('app.float.card_comp_pagePadding_lf'),
220 top: $r('app.float.card_comp_pagePadding_tb'), 227 top: $r('app.float.card_comp_pagePadding_tb'),
221 - bottom: $r('app.float.card_comp_pagePadding_tb') 228 + bottom: 6
222 }) 229 })
223 .backgroundColor($r("app.color.white")) 230 .backgroundColor($r("app.color.white"))
224 // .backgroundColor($r("app.color.color_FE4B05")) 231 // .backgroundColor($r("app.color.color_FE4B05"))
@@ -170,7 +170,7 @@ export struct LiveHorizontalCardComponent { @@ -170,7 +170,7 @@ export struct LiveHorizontalCardComponent {
170 .width(this.compDTO.operDataList.length == 2 ? 210 : 150) 170 .width(this.compDTO.operDataList.length == 2 ? 210 : 150)
171 .lineHeight(21) 171 .lineHeight(21)
172 } 172 }
173 - .height(134) 173 + .height(this.compDTO.operDataList.length == 2 ? 190 : 150)
174 .padding({ right: 16 }) 174 .padding({ right: 16 })
175 .onClick(() => { 175 .onClick(() => {
176 InfomationCardClick.track(this.compDTO, item, this.pageId, this.pageName) 176 InfomationCardClick.track(this.compDTO, item, this.pageId, this.pageName)
@@ -243,7 +243,7 @@ export struct LiveHorizontalCardComponent { @@ -243,7 +243,7 @@ export struct LiveHorizontalCardComponent {
243 left: $r('app.float.card_comp_pagePadding_lf'), 243 left: $r('app.float.card_comp_pagePadding_lf'),
244 right: $r('app.float.card_comp_pagePadding_lf'), 244 right: $r('app.float.card_comp_pagePadding_lf'),
245 top: $r('app.float.card_comp_pagePadding_tb'), 245 top: $r('app.float.card_comp_pagePadding_tb'),
246 - bottom: $r('app.float.card_comp_pagePadding_tb') 246 + bottom: 6
247 }) 247 })
248 .backgroundColor($r("app.color.white")) 248 .backgroundColor($r("app.color.white"))
249 } 249 }