zhangwenqiang

Merge branch 'fix-branch'

@@ -173,10 +173,15 @@ export struct DynamicDetailComponent { @@ -173,10 +173,15 @@ export struct DynamicDetailComponent {
173 Image(this.contentDetailData.rmhInfo?.rmhHeadUrl) 173 Image(this.contentDetailData.rmhInfo?.rmhHeadUrl)
174 .alt(this.contentDetailData.rmhInfo?.userType == '1' ? $r('app.media.default_head') : 174 .alt(this.contentDetailData.rmhInfo?.userType == '1' ? $r('app.media.default_head') :
175 $r('app.media.icon_default_head_mater')) 175 $r('app.media.icon_default_head_mater'))
176 - .width($r('app.float.margin_32'))  
177 - .height($r('app.float.margin_32')) 176 + .width($r('app.float.margin_36'))
  177 + .height($r('app.float.margin_36'))
178 .objectFit(ImageFit.Cover) 178 .objectFit(ImageFit.Cover)
179 - .borderRadius($r('app.float.margin_16')) 179 + .borderRadius(50)
  180 + .border({
  181 + width: 0.5,
  182 + color: '#0D000000', // 5% 透明度的黑色
  183 + style: BorderStyle.Solid
  184 + })
180 Image(this.contentDetailData.rmhInfo?.honoraryIcon) 185 Image(this.contentDetailData.rmhInfo?.honoraryIcon)
181 .width($r('app.float.margin_48')) 186 .width($r('app.float.margin_48'))
182 .height($r('app.float.margin_48')) 187 .height($r('app.float.margin_48'))
@@ -185,12 +190,12 @@ export struct DynamicDetailComponent { @@ -185,12 +190,12 @@ export struct DynamicDetailComponent {
185 if (!StringUtils.isEmpty(this.contentDetailData.rmhInfo?.authIcon)) { 190 if (!StringUtils.isEmpty(this.contentDetailData.rmhInfo?.authIcon)) {
186 Stack() { 191 Stack() {
187 Image(this.contentDetailData.rmhInfo?.authIcon) 192 Image(this.contentDetailData.rmhInfo?.authIcon)
188 - .width($r('app.float.vp_12'))  
189 - .height($r('app.float.vp_12')) 193 + .width($r('app.float.vp_14'))
  194 + .height($r('app.float.vp_14'))
190 .objectFit(ImageFit.Cover) 195 .objectFit(ImageFit.Cover)
191 } 196 }
192 - .width($r('app.float.margin_48'))  
193 - .height($r('app.float.margin_48')) 197 + .width($r('app.float.margin_36'))
  198 + .height($r('app.float.margin_36'))
194 .alignContent(Alignment.BottomEnd) 199 .alignContent(Alignment.BottomEnd)
195 } 200 }
196 } 201 }
@@ -209,24 +214,32 @@ export struct DynamicDetailComponent { @@ -209,24 +214,32 @@ export struct DynamicDetailComponent {
209 Column() { 214 Column() {
210 //昵称 215 //昵称
211 Text(this.contentDetailData.rmhInfo?.rmhName) 216 Text(this.contentDetailData.rmhInfo?.rmhName)
212 - .fontSize($r('app.float.font_size_14')) 217 + .fontSize(15)
213 .fontColor($r('app.color.color_222222')) 218 .fontColor($r('app.color.color_222222'))
214 - .fontWeight(FontWeight.Medium)  
215 - .margin({ left: $r('app.float.margin_5') }) 219 + .fontWeight(600)
216 .alignSelf(ItemAlign.Start) 220 .alignSelf(ItemAlign.Start)
  221 + .height(21)
  222 + .lineHeight(21)
  223 + .margin({bottom: 1})
  224 + // .fontSize($r('app.float.font_size_14'))
  225 + // .fontColor($r('app.color.color_222222'))
  226 + // .fontWeight(FontWeight.Medium)
  227 + // .margin({ left: $r('app.float.margin_5') })
  228 + // .alignSelf(ItemAlign.Start)
217 //简介 229 //简介
218 Text(this.contentDetailData.rmhInfo?.rmhDesc) 230 Text(this.contentDetailData.rmhInfo?.rmhDesc)
219 - .fontSize($r('app.float.font_size_14')) 231 + .fontSize($r('app.float.font_size_12'))
220 .fontColor($r('app.color.color_B0B0B0')) 232 .fontColor($r('app.color.color_B0B0B0'))
221 - .fontWeight(FontWeight.Medium)  
222 .maxLines(1) 233 .maxLines(1)
223 .textOverflow({ overflow: TextOverflow.Ellipsis }) 234 .textOverflow({ overflow: TextOverflow.Ellipsis })
224 - .margin({ left: $r('app.float.margin_5') })  
225 .alignSelf(ItemAlign.Start) 235 .alignSelf(ItemAlign.Start)
  236 + .height(14)
  237 + .lineHeight(14)
226 } 238 }
227 - .width('63%') 239 + .width('70%')
228 .margin({ right: $r('app.float.margin_6') }) 240 .margin({ right: $r('app.float.margin_6') })
229 241
  242 + Blank()
230 if (!StringUtils.isEmpty(this.followStatus)) { 243 if (!StringUtils.isEmpty(this.followStatus)) {
231 if (this.followStatus == '0') { 244 if (this.followStatus == '0') {
232 Row() { 245 Row() {
@@ -272,25 +285,22 @@ export struct DynamicDetailComponent { @@ -272,25 +285,22 @@ export struct DynamicDetailComponent {
272 }) 285 })
273 } 286 }
274 } 287 }
275 - }  
276 - .width('100%')  
277 - .margin({ left: $r('app.float.margin_16') })  
278 -  
279 - //内容  
280 - Text(StringUtils.isEmpty(this.contentDetailData.newsContent)  
281 - ? StringUtils.isEmpty(this.contentDetailData.newsSummary)  
282 - ? this.contentDetailData.newsTitle  
283 - : this.contentDetailData.newsSummary  
284 - : this.contentDetailData.newsContent) 288 + }.padding({
  289 + left: $r('app.float.vp_16')
  290 + , right: $r('app.float.vp_16')
  291 + })
  292 + //标题
  293 + Text(this.titleText())
285 .fontColor($r('app.color.color_222222')) 294 .fontColor($r('app.color.color_222222'))
286 .fontSize($r('app.float.font_size_18')) 295 .fontSize($r('app.float.font_size_18'))
287 .lineHeight($r('app.float.margin_25')) 296 .lineHeight($r('app.float.margin_25'))
288 - .margin({ 297 + .width('100%')
  298 + .padding({
289 top: $r('app.float.margin_6') 299 top: $r('app.float.margin_6')
290 - , left: $r('app.float.margin_16')  
291 - , right: $r('app.float.margin_16') 300 + , left: $r('app.float.vp_16')
  301 + , right: $r('app.float.margin_6')
292 }) 302 })
293 - .alignSelf(ItemAlign.Start) 303 + //内容
294 if (this.contentDetailData.newsType + "" == ContentConstants.TYPE_FOURTEEN) { 304 if (this.contentDetailData.newsType + "" == ContentConstants.TYPE_FOURTEEN) {
295 //附件内容:图片/视频 305 //附件内容:图片/视频
296 if (this.contentDetailData.photoList != null && this.contentDetailData.photoList.length > 0) { 306 if (this.contentDetailData.photoList != null && this.contentDetailData.photoList.length > 0) {
@@ -637,6 +647,16 @@ export struct DynamicDetailComponent { @@ -637,6 +647,16 @@ export struct DynamicDetailComponent {
637 .height('100%') 647 .height('100%')
638 } 648 }
639 649
  650 + private titleText() {
  651 + if(!StringUtils.isEmpty(this.contentDetailData.newsContent)){
  652 + return this.contentDetailData.newsContent
  653 + }
  654 + if(StringUtils.isEmpty(this.contentDetailData.newsSummary)){
  655 + return this.contentDetailData.newsTitle
  656 + }
  657 + return this.contentDetailData.newsSummary
  658 + }
  659 +
640 /** 660 /**
641 * 请求(动态)详情页数据 661 * 请求(动态)详情页数据
642 * */ 662 * */