陈剑华

fix: 标签问题优化,图集详情ui优化

@@ -78,7 +78,8 @@ export struct Card11Component { @@ -78,7 +78,8 @@ export struct Card11Component {
78 getNotesContentWidth( 78 getNotesContentWidth(
79 this.contentDTO.seoTags || this.contentDTO.newTags, 79 this.contentDTO.seoTags || this.contentDTO.newTags,
80 this.contentDTO.objectType, 80 this.contentDTO.objectType,
81 - this.contentDTO.objectLevel 81 + this.contentDTO.objectLevel,
  82 + this.contentDTO.top
82 ) 83 )
83 ) 84 )
84 }.alignContent(Alignment.TopStart) 85 }.alignContent(Alignment.TopStart)
@@ -95,7 +95,8 @@ export struct Card20Component { @@ -95,7 +95,8 @@ export struct Card20Component {
95 getNotesContentWidth( 95 getNotesContentWidth(
96 this.contentDTO.seoTags || this.contentDTO.newTags, 96 this.contentDTO.seoTags || this.contentDTO.newTags,
97 this.contentDTO.objectType, 97 this.contentDTO.objectType,
98 - this.contentDTO.objectLevel 98 + this.contentDTO.objectLevel,
  99 + this.contentDTO.top
99 ) 100 )
100 ) 101 )
101 .width('100%') 102 .width('100%')
@@ -87,7 +87,8 @@ export struct Card2Component { @@ -87,7 +87,8 @@ export struct Card2Component {
87 getNotesContentWidth( 87 getNotesContentWidth(
88 this.contentDTO.seoTags || this.contentDTO.newTags, 88 this.contentDTO.seoTags || this.contentDTO.newTags,
89 this.contentDTO.objectType, 89 this.contentDTO.objectType,
90 - this.contentDTO.objectLevel 90 + this.contentDTO.objectLevel,
  91 + this.contentDTO.top
91 ) 92 )
92 ) 93 )
93 .width('100%') 94 .width('100%')
@@ -74,7 +74,8 @@ export struct Card3Component { @@ -74,7 +74,8 @@ export struct Card3Component {
74 getNotesContentWidth( 74 getNotesContentWidth(
75 this.contentDTO.seoTags || this.contentDTO.newTags, 75 this.contentDTO.seoTags || this.contentDTO.newTags,
76 this.contentDTO.objectType, 76 this.contentDTO.objectType,
77 - this.contentDTO.objectLevel 77 + this.contentDTO.objectLevel,
  78 + this.contentDTO.top
78 ) 79 )
79 ) 80 )
80 }.alignContent(Alignment.TopStart) 81 }.alignContent(Alignment.TopStart)
@@ -85,7 +85,8 @@ export struct Card4Component { @@ -85,7 +85,8 @@ export struct Card4Component {
85 getNotesContentWidth( 85 getNotesContentWidth(
86 this.contentDTO.seoTags || this.contentDTO.newTags, 86 this.contentDTO.seoTags || this.contentDTO.newTags,
87 this.contentDTO.objectType, 87 this.contentDTO.objectType,
88 - this.contentDTO.objectLevel 88 + this.contentDTO.objectLevel,
  89 + this.contentDTO.top
89 ) 90 )
90 ) 91 )
91 .width('100%') 92 .width('100%')
@@ -115,7 +115,8 @@ export struct Card5Component { @@ -115,7 +115,8 @@ export struct Card5Component {
115 getNotesContentWidth( 115 getNotesContentWidth(
116 this.contentDTO.seoTags || this.contentDTO.newTags, 116 this.contentDTO.seoTags || this.contentDTO.newTags,
117 this.contentDTO.objectType, 117 this.contentDTO.objectType,
118 - this.contentDTO.objectLevel 118 + this.contentDTO.objectLevel,
  119 + this.contentDTO.top
119 ) 120 )
120 ) 121 )
121 }.alignContent(Alignment.TopStart) 122 }.alignContent(Alignment.TopStart)
@@ -86,7 +86,8 @@ export struct Card6Component { @@ -86,7 +86,8 @@ export struct Card6Component {
86 getNotesContentWidth( 86 getNotesContentWidth(
87 this.contentDTO.seoTags || this.contentDTO.newTags, 87 this.contentDTO.seoTags || this.contentDTO.newTags,
88 this.contentDTO.objectType, 88 this.contentDTO.objectType,
89 - this.contentDTO.objectLevel 89 + this.contentDTO.objectLevel,
  90 + this.contentDTO.top
90 ) 91 )
91 ) 92 )
92 .width('100%') 93 .width('100%')
@@ -205,6 +205,7 @@ struct CarouselLayout01CardView { @@ -205,6 +205,7 @@ struct CarouselLayout01CardView {
205 .backgroundColor(0xf5f5f5) 205 .backgroundColor(0xf5f5f5)
206 .borderRadius(this.showPicBorderRadius ? $r('app.float.image_border_radius') : 0) 206 .borderRadius(this.showPicBorderRadius ? $r('app.float.image_border_radius') : 0)
207 207
  208 + Stack() {
208 Row() 209 Row()
209 .width(CommonConstants.FULL_PARENT) 210 .width(CommonConstants.FULL_PARENT)
210 .height(60) 211 .height(60)
@@ -212,6 +213,11 @@ struct CarouselLayout01CardView { @@ -212,6 +213,11 @@ struct CarouselLayout01CardView {
212 direction: GradientDirection.Top, // 渐变方向:to Top/从下往上 213 direction: GradientDirection.Top, // 渐变方向:to Top/从下往上
213 colors: [[0x7508111A, 0.0], [0x7508111A, 0.3], [Color.Transparent, 1.0]] 214 colors: [[0x7508111A, 0.0], [0x7508111A, 0.3], [Color.Transparent, 1.0]]
214 }) 215 })
  216 + }
  217 + .width(CommonConstants.FULL_PARENT)
  218 + .height(CommonConstants.FULL_PARENT)
  219 + .alignContent(Alignment.Bottom)
  220 +
215 Column() { 221 Column() {
216 // 这里用于展示轮播图右上角信息,这里只对直播类型的展示 222 // 这里用于展示轮播图右上角信息,这里只对直播类型的展示
217 if (this.item.objectType === '2' || this.item.objectType === '4') { 223 if (this.item.objectType === '2' || this.item.objectType === '4') {
@@ -246,7 +252,8 @@ struct CarouselLayout01CardView { @@ -246,7 +252,8 @@ struct CarouselLayout01CardView {
246 getNotesContentWidth( 252 getNotesContentWidth(
247 this.item.seoTags || this.item.newTags, 253 this.item.seoTags || this.item.newTags,
248 this.item.objectType, 254 this.item.objectType,
249 - this.item.objectLevel 255 + this.item.objectLevel,
  256 + this.item.top
250 ) 257 )
251 ) 258 )
252 } 259 }
@@ -20,9 +20,10 @@ export function getNotesContentWidth( @@ -20,9 +20,10 @@ export function getNotesContentWidth(
20 newTags?: string, 20 newTags?: string,
21 objectType?: number | string, 21 objectType?: number | string,
22 objectLevel?: number | string, 22 objectLevel?: number | string,
  23 + top?: number,
23 fontSize?: string | number | Resource 24 fontSize?: string | number | Resource
24 ) { 25 ) {
25 - let textContent: string = returnTypeTitleFn(newTags, objectType, objectLevel) 26 + let textContent: string = ''
26 let px = 0 27 let px = 0
27 const paddingRightAndLeft = vp2px(8) 28 const paddingRightAndLeft = vp2px(8)
28 const marginRight = vp2px(6); 29 const marginRight = vp2px(6);
@@ -30,7 +31,7 @@ export function getNotesContentWidth( @@ -30,7 +31,7 @@ export function getNotesContentWidth(
30 if(objectType == '5'){ 31 if(objectType == '5'){
31 textContent = returnTypeTitleFn('', objectType, objectLevel) 32 textContent = returnTypeTitleFn('', objectType, objectLevel)
32 } else { 33 } else {
33 - textContent = returnTypeTitleFn(newTags) 34 + textContent = returnTypeTitleFn(newTags, undefined, undefined, top)
34 } 35 }
35 36
36 if (textContent) { 37 if (textContent) {
@@ -57,7 +58,8 @@ export function getNotesContentWidth( @@ -57,7 +58,8 @@ export function getNotesContentWidth(
57 export function returnTypeTitleFn( 58 export function returnTypeTitleFn(
58 newTags?: string, 59 newTags?: string,
59 objectType?: number | string, 60 objectType?: number | string,
60 - objectLevel?: number | string 61 + objectLevel?: number | string,
  62 + top?: number
61 ): string { 63 ): string {
62 if (newTags) { 64 if (newTags) {
63 return newTags 65 return newTags
@@ -74,5 +76,8 @@ export function returnTypeTitleFn( @@ -74,5 +76,8 @@ export function returnTypeTitleFn(
74 if (objectType == 8) { 76 if (objectType == 8) {
75 return '文章' 77 return '文章'
76 } 78 }
  79 + if (top === 1) {
  80 + return '置顶'
  81 + }
77 return '' 82 return ''
78 } 83 }
@@ -254,12 +254,17 @@ export struct MultiPictureDetailPageComponent { @@ -254,12 +254,17 @@ export struct MultiPictureDetailPageComponent {
254 if (this.followStatus == '0') { 254 if (this.followStatus == '0') {
255 Button({ type: ButtonType.Normal, stateEffect: true }) { 255 Button({ type: ButtonType.Normal, stateEffect: true }) {
256 Row() { 256 Row() {
257 - Text('+关注').fontSize(12).fontColor(0xffffff) 257 + Image($r('app.media.add'))
  258 + .width(12)
  259 + .height(12)
  260 + .margin({right: 3})
  261 +
  262 + Text('关注').fontSize(12).fontColor(0xffffff)
258 }.alignItems(VerticalAlign.Center) 263 }.alignItems(VerticalAlign.Center)
259 } 264 }
260 .borderRadius(4) 265 .borderRadius(4)
261 .backgroundColor('#ED2800') 266 .backgroundColor('#ED2800')
262 - .width(48) 267 + .width(54)
263 .height(24) 268 .height(24)
264 .onClick(() => { 269 .onClick(() => {
265 this.handleAccention() 270 this.handleAccention()
@@ -398,9 +403,8 @@ export struct MultiPictureDetailPageComponent { @@ -398,9 +403,8 @@ export struct MultiPictureDetailPageComponent {
398 .lineHeight(22) 403 .lineHeight(22)
399 .textOverflow({ overflow: TextOverflow.Ellipsis }) 404 .textOverflow({ overflow: TextOverflow.Ellipsis })
400 .margin({ 405 .margin({
401 - top: 4,  
402 left: 18, 406 left: 18,
403 - bottom: 4, 407 + bottom: 8,
404 right: 18 408 right: 18
405 }) 409 })
406 .maxLines(32) 410 .maxLines(32)