张善主

Merge remote-tracking branch 'origin/main'

@@ -208,14 +208,14 @@ export struct CompParser { @@ -208,14 +208,14 @@ export struct CompParser {
208 if (this.compDTO.compStyle === this.nextCompDTO.compStyle) { 208 if (this.compDTO.compStyle === this.nextCompDTO.compStyle) {
209 Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 }) 209 Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 })
210 } else { 210 } else {
211 - Divider().strokeWidth(5).color('#f5f5f5').padding({ left: 16, right: 16 }) 211 + Divider().strokeWidth(5).color('#f5f5f5')
212 } 212 }
213 } else if (this.compDTO?.operDataList?.[0]?.appStyle === CompStyle.Card_10) { 213 } else if (this.compDTO?.operDataList?.[0]?.appStyle === CompStyle.Card_10) {
214 // 大专题 214 // 大专题
215 if (this.nextCompDTO?.operDataList?.[0]?.appStyle === CompStyle.Card_10) { 215 if (this.nextCompDTO?.operDataList?.[0]?.appStyle === CompStyle.Card_10) {
216 Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 }) 216 Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 })
217 } else { 217 } else {
218 - Divider().strokeWidth(5).color('#f5f5f5').padding({ left: 16, right: 16 }) 218 + Divider().strokeWidth(5).color('#f5f5f5')
219 } 219 }
220 } else if (this.compDTO.compType === 'appStyle') { 220 } else if (this.compDTO.compType === 'appStyle') {
221 if ( 221 if (
@@ -225,7 +225,7 @@ export struct CompParser { @@ -225,7 +225,7 @@ export struct CompParser {
225 this.nextCompDTO.compStyle === CompStyle.Zh_Single_Row_04 || 225 this.nextCompDTO.compStyle === CompStyle.Zh_Single_Row_04 ||
226 this.nextCompDTO.compStyle === CompStyle.Zh_Single_Row_06 226 this.nextCompDTO.compStyle === CompStyle.Zh_Single_Row_06
227 ) { 227 ) {
228 - Divider().strokeWidth(5).color('#f5f5f5').padding({ left: 16, right: 16 }) 228 + Divider().strokeWidth(5).color('#f5f5f5')
229 } else { 229 } else {
230 Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 }) 230 Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 })
231 } 231 }
@@ -111,7 +111,7 @@ export struct CardSourceInfo { @@ -111,7 +111,7 @@ export struct CardSourceInfo {
111 } 111 }
112 112
113 // 点 113 // 点
114 - if (((this.contentDTO.rmhPlatform === 1 && this.contentDTO.rmhInfo?.rmhName && 114 + if (this.showTime() || ((this.contentDTO.rmhPlatform === 1 && this.contentDTO.rmhInfo?.rmhName &&
115 this.contentDTO.rmhInfo?.rmhName != '') || (this.contentDTO.source && this.contentDTO.source != '')) && 115 this.contentDTO.rmhInfo?.rmhName != '') || (this.contentDTO.source && this.contentDTO.source != '')) &&
116 (this.getContentDtoBean()?.interactData?.commentNum 116 (this.getContentDtoBean()?.interactData?.commentNum
117 // || DateTimeUtils.getCommentTime(Number.parseFloat(this.contentDTO.publishTime)) != '' 117 // || DateTimeUtils.getCommentTime(Number.parseFloat(this.contentDTO.publishTime)) != ''
@@ -116,7 +116,8 @@ export struct RmhTitle { @@ -116,7 +116,8 @@ export struct RmhTitle {
116 Stack() { 116 Stack() {
117 Image(this.loadImg ? this.rmhInfo?.rmhHeadUrl : $r('app.media.comment_rmh_tag')) 117 Image(this.loadImg ? this.rmhInfo?.rmhHeadUrl : $r('app.media.comment_rmh_tag'))
118 .width(36) 118 .width(36)
119 - .height(36).borderRadius(50) 119 + .height(36)
  120 + .borderRadius(50)
120 Image(this.rmhInfo?.authIcon) 121 Image(this.rmhInfo?.authIcon)
121 .width(14) 122 .width(14)
122 .height(14) 123 .height(14)
@@ -128,10 +129,13 @@ export struct RmhTitle { @@ -128,10 +129,13 @@ export struct RmhTitle {
128 129
129 Column() { 130 Column() {
130 Text(this.rmhInfo?.rmhName) 131 Text(this.rmhInfo?.rmhName)
131 - .fontSize($r('app.float.font_size_13')) 132 + .fontSize(15)
132 .fontColor($r('app.color.color_222222')) 133 .fontColor($r('app.color.color_222222'))
133 .fontWeight(600) 134 .fontWeight(600)
134 .alignSelf(ItemAlign.Start) 135 .alignSelf(ItemAlign.Start)
  136 + .height(21)
  137 + .lineHeight(21)
  138 + .margin({bottom: 1})
135 Flex({alignContent: FlexAlign.Start, wrap: FlexWrap.NoWrap}) { 139 Flex({alignContent: FlexAlign.Start, wrap: FlexWrap.NoWrap}) {
136 Row() { 140 Row() {
137 if (!(this.hideTime && this.getDaysBetweenDates(Number(this.publishTime)) > 2)) { 141 if (!(this.hideTime && this.getDaysBetweenDates(Number(this.publishTime)) > 2)) {
@@ -139,11 +143,13 @@ export struct RmhTitle { @@ -139,11 +143,13 @@ export struct RmhTitle {
139 Text(DateTimeUtils.getCommentTime(Number.parseFloat(this.publishTime))) 143 Text(DateTimeUtils.getCommentTime(Number.parseFloat(this.publishTime)))
140 .fontSize($r("app.float.font_size_12")) 144 .fontSize($r("app.float.font_size_12"))
141 .fontColor($r("app.color.color_B0B0B0")) 145 .fontColor($r("app.color.color_B0B0B0"))
  146 + .height(14)
  147 + .lineHeight(14)
142 } 148 }
143 if (this.publishTime && this.rmhInfo?.rmhDesc) { 149 if (this.publishTime && this.rmhInfo?.rmhDesc) {
144 Image($r('app.media.point')) 150 Image($r('app.media.point'))
145 - .width(16)  
146 - .height(16) 151 + .width(14)
  152 + .height(14)
147 } 153 }
148 } 154 }
149 if(this.rmhInfo?.rmhDesc != undefined){ 155 if(this.rmhInfo?.rmhDesc != undefined){
@@ -154,12 +160,16 @@ export struct RmhTitle { @@ -154,12 +160,16 @@ export struct RmhTitle {
154 .alignSelf(ItemAlign.Start) 160 .alignSelf(ItemAlign.Start)
155 .textOverflow({ overflow: TextOverflow.Ellipsis }) 161 .textOverflow({ overflow: TextOverflow.Ellipsis })
156 .textAlign(TextAlign.Start) 162 .textAlign(TextAlign.Start)
  163 + .height(14)
  164 + .lineHeight(14)
157 } 165 }
158 166
159 } 167 }
160 .width('75%') 168 .width('75%')
  169 + .height(14)
161 } 170 }
162 } 171 }
  172 + .justifyContent(FlexAlign.SpaceBetween)
163 173
164 Blank() 174 Blank()
165 if (this.rmhInfo?.cnIsAttention) { 175 if (this.rmhInfo?.cnIsAttention) {
@@ -121,6 +121,7 @@ export struct Card6Component { @@ -121,6 +121,7 @@ export struct Card6Component {
121 .borderRadius(5) 121 .borderRadius(5)
122 .aspectRatio(this.contentDTO.appStyle === CompStyle.Card_13 ? 3 / 2 : 3 / 4) 122 .aspectRatio(this.contentDTO.appStyle === CompStyle.Card_13 ? 3 / 2 : 3 / 4)
123 .height(this.contentDTO.appStyle === CompStyle.Card_13 ? 78 : 156) 123 .height(this.contentDTO.appStyle === CompStyle.Card_13 ? 78 : 156)
  124 + .border({width: 1, color: 0xf5f5f5})
124 CardMediaInfo({ contentDTO: this.contentDTO }) 125 CardMediaInfo({ contentDTO: this.contentDTO })
125 } 126 }
126 127
@@ -300,7 +300,8 @@ struct indicatorAnimations { @@ -300,7 +300,8 @@ struct indicatorAnimations {
300 // .height(2) 300 // .height(2)
301 301
302 Image($r('app.media.swiper_indicator_gray')) 302 Image($r('app.media.swiper_indicator_gray'))
303 - .width('100%') 303 + .objectFit(ImageFit.Contain)
  304 + .width('96%')
304 .height(2) 305 .height(2)
305 Image($r('app.media.swiper_indicator_white')) 306 Image($r('app.media.swiper_indicator_white'))
306 .width(this.leftW) 307 .width(this.leftW)
@@ -334,7 +335,8 @@ struct indicatorAnimations { @@ -334,7 +335,8 @@ struct indicatorAnimations {
334 // .width('100%') 335 // .width('100%')
335 // .height(2) 336 // .height(2)
336 Image($r('app.media.swiper_indicator_gray')) 337 Image($r('app.media.swiper_indicator_gray'))
337 - .width('100%') 338 + .objectFit(ImageFit.Contain)
  339 + .width('96%')
338 .height(2) 340 .height(2)
339 Image($r('app.media.swiper_indicator_white')) 341 Image($r('app.media.swiper_indicator_white'))
340 .width(this.rightW) 342 .width(this.rightW)
@@ -13,7 +13,7 @@ import { @@ -13,7 +13,7 @@ import {
13 PeopleShipUserDetailData, 13 PeopleShipUserDetailData,
14 ArticleCountData 14 ArticleCountData
15 } from 'wdBean' 15 } from 'wdBean'
16 -import { EmptyComponent } from '../view/EmptyComponent' 16 +import { EmptyComponent,WDViewDefaultType } from '../view/EmptyComponent'
17 import { CustomTitleUI } from '../reusable/CustomTitleUI' 17 import { CustomTitleUI } from '../reusable/CustomTitleUI'
18 18
19 @Entry 19 @Entry
@@ -41,6 +41,7 @@ struct PeopleShipHomePage { @@ -41,6 +41,7 @@ struct PeopleShipHomePage {
41 @State isLoading: boolean = true 41 @State isLoading: boolean = true
42 @State topSafeHeight: number = AppStorage.get<number>('topSafeHeight') || 0 42 @State topSafeHeight: number = AppStorage.get<number>('topSafeHeight') || 0
43 @State isConnectNetwork : boolean = NetworkUtil.isNetConnected() 43 @State isConnectNetwork : boolean = NetworkUtil.isNetConnected()
  44 + @State isHasHomePage: boolean = true
44 45
45 onPageShow(): void { 46 onPageShow(): void {
46 WindowModel.shared.setWindowSystemBarProperties({ statusBarContentColor: '#ffffff'}) 47 WindowModel.shared.setWindowSystemBarProperties({ statusBarContentColor: '#ffffff'})
@@ -60,6 +61,7 @@ struct PeopleShipHomePage { @@ -60,6 +61,7 @@ struct PeopleShipHomePage {
60 61
61 build() { 62 build() {
62 if(this.isConnectNetwork){ 63 if(this.isConnectNetwork){
  64 + if (this.isHasHomePage){
63 Stack({ alignContent: Alignment.TopStart }) { 65 Stack({ alignContent: Alignment.TopStart }) {
64 Stack({ alignContent: Alignment.Top }){ 66 Stack({ alignContent: Alignment.Top }){
65 // 顶部图片 67 // 顶部图片
@@ -145,6 +147,14 @@ struct PeopleShipHomePage { @@ -145,6 +147,14 @@ struct PeopleShipHomePage {
145 .margin({top:px2vp(this.topSafeHeight)}) 147 .margin({top:px2vp(this.topSafeHeight)})
146 } 148 }
147 .width('100%') 149 .width('100%')
  150 + }else {
  151 + Column(){
  152 + CustomTitleUI({ titleName: "" })
  153 + EmptyComponent({emptyType:WDViewDefaultType.WDViewDefaultType_NoUserHomepage}).height('70%')
  154 + }.width("100%")
  155 + .height("100%")
  156 + .padding({top:px2vp(this.topSafeHeight)})
  157 + }
148 }else{ 158 }else{
149 Column(){ 159 Column(){
150 CustomTitleUI({ titleName: "" }) 160 CustomTitleUI({ titleName: "" })
@@ -184,6 +194,7 @@ struct PeopleShipHomePage { @@ -184,6 +194,7 @@ struct PeopleShipHomePage {
184 194
185 } catch (exception) { 195 } catch (exception) {
186 this.isLoading = false 196 this.isLoading = false
  197 + this.isHasHomePage = false
187 } 198 }
188 } 199 }
189 200
@@ -310,7 +310,7 @@ export struct SearchResultContentComponent { @@ -310,7 +310,7 @@ export struct SearchResultContentComponent {
310 Divider().strokeWidth(5).color('#f5f5f5').padding({ left: 0, right: 0 }) 310 Divider().strokeWidth(5).color('#f5f5f5').padding({ left: 0, right: 0 })
311 } 311 }
312 } else { 312 } else {
313 - if (this.data?.get(index + 1)?.sameContentListSize > 0) { 313 + if (this.data?.get(index + 1)?.sameContentListSize > 0 && index !== 0) {
314 Divider() 314 Divider()
315 .width('100%') 315 .width('100%')
316 .color($r('app.color.color_F5F5F5')) 316 .color($r('app.color.color_F5F5F5'))
@@ -44,7 +44,9 @@ export const enum WDViewDefaultType { @@ -44,7 +44,9 @@ export const enum WDViewDefaultType {
44 // 17. 暂无评论快来抢沙发 44 // 17. 暂无评论快来抢沙发
45 WDViewDefaultType_NoComment1, 45 WDViewDefaultType_NoComment1,
46 // 18. 内容找不到了 46 // 18. 内容找不到了
47 - WDViewDefaultType_NoContent2 47 + WDViewDefaultType_NoContent2,
  48 + // 19. 暂时无法查看该创作者主页
  49 + WDViewDefaultType_NoUserHomepage
48 } 50 }
49 51
50 /** 52 /**
@@ -214,6 +216,8 @@ export struct EmptyComponent { @@ -214,6 +216,8 @@ export struct EmptyComponent {
214 contentString = '暂无评论,快来抢沙发' 216 contentString = '暂无评论,快来抢沙发'
215 } else if (this.emptyType === WDViewDefaultType.WDViewDefaultType_NoContent2) { 217 } else if (this.emptyType === WDViewDefaultType.WDViewDefaultType_NoContent2) {
216 contentString = '内容找不到了' 218 contentString = '内容找不到了'
  219 + } else if (this.emptyType === WDViewDefaultType.WDViewDefaultType_NoUserHomepage){
  220 + contentString = '暂时无法查看该创作者主页'
217 } 221 }
218 222
219 return contentString 223 return contentString
@@ -250,6 +254,8 @@ export struct EmptyComponent { @@ -250,6 +254,8 @@ export struct EmptyComponent {
250 this.emptyType === WDViewDefaultType.WDViewDefaultType_NoFollow || 254 this.emptyType === WDViewDefaultType.WDViewDefaultType_NoFollow ||
251 this.emptyType === WDViewDefaultType.WDViewDefaultType_NoContent2) { 255 this.emptyType === WDViewDefaultType.WDViewDefaultType_NoContent2) {
252 imageString = $r('app.media.icon_no_appointmentMade1') 256 imageString = $r('app.media.icon_no_appointmentMade1')
  257 + }else if (this.emptyType === WDViewDefaultType.WDViewDefaultType_NoUserHomepage){
  258 + imageString = $r('app.media.icon_no_master1')
253 } 259 }
254 return imageString 260 return imageString
255 } 261 }