Showing
4 changed files
with
20 additions
and
13 deletions
| @@ -26,6 +26,7 @@ import { common } from '@kit.AbilityKit'; | @@ -26,6 +26,7 @@ import { common } from '@kit.AbilityKit'; | ||
| 26 | import TrackingPageBrowseUtils from '../../utils/TrackingPageBrowseUtils' | 26 | import TrackingPageBrowseUtils from '../../utils/TrackingPageBrowseUtils' |
| 27 | import {TrackConstants,TrackParamConvert}from 'wdTracking/Index' | 27 | import {TrackConstants,TrackParamConvert}from 'wdTracking/Index' |
| 28 | import { ColorUtils } from '../../utils/ColorUtils'; | 28 | import { ColorUtils } from '../../utils/ColorUtils'; |
| 29 | +import { EmptyComponent,WDViewDefaultType } from '../view/EmptyComponent'; | ||
| 29 | 30 | ||
| 30 | const TAG = 'MorningEveningPaperComponent'; | 31 | const TAG = 'MorningEveningPaperComponent'; |
| 31 | 32 | ||
| @@ -37,6 +38,7 @@ export struct MorningEveningPaperComponent { | @@ -37,6 +38,7 @@ export struct MorningEveningPaperComponent { | ||
| 37 | @State compListItem: CompList = {} as CompList | 38 | @State compListItem: CompList = {} as CompList |
| 38 | @Provide commentList: InteractDataDTO[] = [] | 39 | @Provide commentList: InteractDataDTO[] = [] |
| 39 | @State audioPlayUrl: string = "" | 40 | @State audioPlayUrl: string = "" |
| 41 | + @State isNoListContent:boolean = false; | ||
| 40 | // @Consume dailyPaperTopicPageId: number | 42 | // @Consume dailyPaperTopicPageId: number |
| 41 | // @Provide compListItem: CompList = {} as CompList | 43 | // @Provide compListItem: CompList = {} as CompList |
| 42 | // @State morningEveningPaperDTO: MorningEveningPaperDTO = { | 44 | // @State morningEveningPaperDTO: MorningEveningPaperDTO = { |
| @@ -172,6 +174,7 @@ export struct MorningEveningPaperComponent { | @@ -172,6 +174,7 @@ export struct MorningEveningPaperComponent { | ||
| 172 | this.totalTime = DateFormatUtil.secondToTime(duration); | 174 | this.totalTime = DateFormatUtil.secondToTime(duration); |
| 173 | this.progressVal = Math.floor(position * 100 / duration); | 175 | this.progressVal = Math.floor(position * 100 / duration); |
| 174 | } | 176 | } |
| 177 | + this.isNoListContent = this.compListItem && this.compListItem?.operDataList?.length > 0 ?false:true | ||
| 175 | } catch (exception) { | 178 | } catch (exception) { |
| 176 | 179 | ||
| 177 | } | 180 | } |
| @@ -264,6 +267,9 @@ export struct MorningEveningPaperComponent { | @@ -264,6 +267,9 @@ export struct MorningEveningPaperComponent { | ||
| 264 | } | 267 | } |
| 265 | 268 | ||
| 266 | ListItem() { | 269 | ListItem() { |
| 270 | + if(this.isNoListContent){ | ||
| 271 | + EmptyComponent({emptyType:WDViewDefaultType.WDViewDefaultType_NoListContent}) | ||
| 272 | + }else { | ||
| 267 | SingleColumn999Component({ | 273 | SingleColumn999Component({ |
| 268 | compListItem: this.compListItem, | 274 | compListItem: this.compListItem, |
| 269 | }) | 275 | }) |
| @@ -272,6 +278,7 @@ export struct MorningEveningPaperComponent { | @@ -272,6 +278,7 @@ export struct MorningEveningPaperComponent { | ||
| 272 | }) | 278 | }) |
| 273 | } | 279 | } |
| 274 | } | 280 | } |
| 281 | + } | ||
| 275 | // .height(`calc(100% - ${this.bottomSafeHeight + this.topSafeHeight + 'vp'})`) | 282 | // .height(`calc(100% - ${this.bottomSafeHeight + this.topSafeHeight + 'vp'})`) |
| 276 | .edgeEffect(EdgeEffect.None) // 必须设置列表为滑动到边缘无效果 | 283 | .edgeEffect(EdgeEffect.None) // 必须设置列表为滑动到边缘无效果 |
| 277 | .scrollBar(BarState.Off) | 284 | .scrollBar(BarState.Off) |
| @@ -152,7 +152,7 @@ export struct SingleColumn999Component { | @@ -152,7 +152,7 @@ export struct SingleColumn999Component { | ||
| 152 | scrollBackward: NestedScrollMode.SELF_FIRST | 152 | scrollBackward: NestedScrollMode.SELF_FIRST |
| 153 | }) | 153 | }) |
| 154 | } else { | 154 | } else { |
| 155 | - EmptyComponent({emptyType:WDViewDefaultType.WDViewDefaultType_NoListContent}) | 155 | + // EmptyComponent({emptyType:WDViewDefaultType.WDViewDefaultType_NoListContent}) |
| 156 | } | 156 | } |
| 157 | } | 157 | } |
| 158 | 158 |
| @@ -26,7 +26,7 @@ export struct PeopleShipRecommendComponent { | @@ -26,7 +26,7 @@ export struct PeopleShipRecommendComponent { | ||
| 26 | .height('30vp') | 26 | .height('30vp') |
| 27 | .fontColor($r('app.color.color_222222')) | 27 | .fontColor($r('app.color.color_222222')) |
| 28 | .fontWeight(600) | 28 | .fontWeight(600) |
| 29 | - .fontSize($r('app.float.vp_18')) | 29 | + .fontSize($r('app.float.vp_15_7')) |
| 30 | 30 | ||
| 31 | Blank() | 31 | Blank() |
| 32 | Button({ type: ButtonType.Normal, stateEffect: false }) { | 32 | Button({ type: ButtonType.Normal, stateEffect: false }) { |
| @@ -35,7 +35,7 @@ export struct PeopleShipRecommendComponent { | @@ -35,7 +35,7 @@ export struct PeopleShipRecommendComponent { | ||
| 35 | .height('30vp') | 35 | .height('30vp') |
| 36 | .fontColor($r('app.color.color_999999')) | 36 | .fontColor($r('app.color.color_999999')) |
| 37 | .fontWeight(400) | 37 | .fontWeight(400) |
| 38 | - .fontSize($r('app.float.vp_14')) | 38 | + .fontSize($r('app.float.vp_13')) |
| 39 | Image($r('app.media.ic_refresh')) | 39 | Image($r('app.media.ic_refresh')) |
| 40 | .width('14vp') | 40 | .width('14vp') |
| 41 | .height('14vp') | 41 | .height('14vp') |
| @@ -56,7 +56,7 @@ export struct PeopleShipRecommendComponent { | @@ -56,7 +56,7 @@ export struct PeopleShipRecommendComponent { | ||
| 56 | .width('100%') | 56 | .width('100%') |
| 57 | .alignSelf(ItemAlign.Start) | 57 | .alignSelf(ItemAlign.Start) |
| 58 | .margin({ | 58 | .margin({ |
| 59 | - top: '10vp', | 59 | + top: '-50vp', |
| 60 | bottom: '10vp' | 60 | bottom: '10vp' |
| 61 | }) | 61 | }) |
| 62 | 62 | ||
| @@ -75,7 +75,7 @@ export struct PeopleShipRecommendComponent { | @@ -75,7 +75,7 @@ export struct PeopleShipRecommendComponent { | ||
| 75 | .columnsTemplate('1fr 1fr 1fr') | 75 | .columnsTemplate('1fr 1fr 1fr') |
| 76 | .columnsGap(20) | 76 | .columnsGap(20) |
| 77 | .rowsGap(16) | 77 | .rowsGap(16) |
| 78 | - .height(Math.ceil(this.rmhList.length / 3.0) * 132) | 78 | + .height(Math.ceil(this.rmhList.length / 3.0) * 126) |
| 79 | .backgroundColor(Color.Transparent) | 79 | .backgroundColor(Color.Transparent) |
| 80 | .margin({ | 80 | .margin({ |
| 81 | right: '20vp', | 81 | right: '20vp', |
| @@ -94,7 +94,7 @@ export struct PeopleShipRecommendComponent { | @@ -94,7 +94,7 @@ export struct PeopleShipRecommendComponent { | ||
| 94 | .borderRadius('3vp') | 94 | .borderRadius('3vp') |
| 95 | .fontColor($r('app.color.color_999999')) | 95 | .fontColor($r('app.color.color_999999')) |
| 96 | .fontWeight(500) | 96 | .fontWeight(500) |
| 97 | - .fontSize($r('app.float.vp_14')) | 97 | + .fontSize($r('app.float.vp_13')) |
| 98 | .fontColor(Color.White) | 98 | .fontColor(Color.White) |
| 99 | .onClick(() => { | 99 | .onClick(() => { |
| 100 | // 点击一键关注 | 100 | // 点击一键关注 |
| @@ -11,8 +11,8 @@ export struct PeopleShipRecommendHeadComponent { | @@ -11,8 +11,8 @@ export struct PeopleShipRecommendHeadComponent { | ||
| 11 | Column(){ | 11 | Column(){ |
| 12 | Stack({ alignContent: Alignment.BottomEnd }) { | 12 | Stack({ alignContent: Alignment.BottomEnd }) { |
| 13 | Image(this.rmhInfo.headPhotoUrl.length > 0 ? this.rmhInfo.headPhotoUrl : $r('app.media.WDAccountOwnerHedaerDefaultIcon')) | 13 | Image(this.rmhInfo.headPhotoUrl.length > 0 ? this.rmhInfo.headPhotoUrl : $r('app.media.WDAccountOwnerHedaerDefaultIcon')) |
| 14 | - .width('44vp') | ||
| 15 | - .height('44vp') | 14 | + .width('40vp') |
| 15 | + .height('40vp') | ||
| 16 | .borderRadius('22vp') | 16 | .borderRadius('22vp') |
| 17 | .objectFit(ImageFit.Cover) | 17 | .objectFit(ImageFit.Cover) |
| 18 | 18 | ||
| @@ -23,12 +23,12 @@ export struct PeopleShipRecommendHeadComponent { | @@ -23,12 +23,12 @@ export struct PeopleShipRecommendHeadComponent { | ||
| 23 | .margin({ | 23 | .margin({ |
| 24 | right: '-3vp' | 24 | right: '-3vp' |
| 25 | }) | 25 | }) |
| 26 | - }.margin({ top: 12, bottom: 8 }) | 26 | + }.margin({ top: 4, bottom: 8 }) |
| 27 | 27 | ||
| 28 | Row() { | 28 | Row() { |
| 29 | Text(this.rmhInfo.userName) | 29 | Text(this.rmhInfo.userName) |
| 30 | .fontColor($r('app.color.color_222222')) | 30 | .fontColor($r('app.color.color_222222')) |
| 31 | - .fontSize($r('app.float.vp_14')) | 31 | + .fontSize($r('app.float.vp_13')) |
| 32 | .fontWeight(600) | 32 | .fontWeight(600) |
| 33 | .maxLines(1) | 33 | .maxLines(1) |
| 34 | .textOverflow({overflow: TextOverflow.Ellipsis}) | 34 | .textOverflow({overflow: TextOverflow.Ellipsis}) |
| @@ -49,14 +49,14 @@ export struct PeopleShipRecommendHeadComponent { | @@ -49,14 +49,14 @@ export struct PeopleShipRecommendHeadComponent { | ||
| 49 | 49 | ||
| 50 | Text(this.rmhInfo.introduction) | 50 | Text(this.rmhInfo.introduction) |
| 51 | .fontColor($r('app.color.color_B0B0B0')) | 51 | .fontColor($r('app.color.color_B0B0B0')) |
| 52 | - .fontSize($r('app.float.vp_12')) | ||
| 53 | - .margin({ top: 8, bottom: 14 }) | 52 | + .fontSize($r('app.float.vp_11')) |
| 53 | + .margin({ top: 6, bottom: 14 }) | ||
| 54 | .textOverflow({overflow: TextOverflow.Ellipsis}) | 54 | .textOverflow({overflow: TextOverflow.Ellipsis}) |
| 55 | .maxLines(2) | 55 | .maxLines(2) |
| 56 | .height(34) | 56 | .height(34) |
| 57 | } | 57 | } |
| 58 | .width('100%') | 58 | .width('100%') |
| 59 | - .height('116vp') | 59 | + .height('110vp') |
| 60 | 60 | ||
| 61 | } | 61 | } |
| 62 | 62 |
-
Please register or login to post a comment