Showing
3 changed files
with
51 additions
and
47 deletions
| 1 | -import { DateTimeUtils, LazyDataSource, UserDataLocal } from 'wdKit'; | 1 | +import { DateTimeUtils, DisplayUtils, LazyDataSource, UserDataLocal } from 'wdKit'; |
| 2 | import MinePageDatasModel from '../../../model/MinePageDatasModel'; | 2 | import MinePageDatasModel from '../../../model/MinePageDatasModel'; |
| 3 | import { CommentListItem } from '../../../viewmodel/CommentListItem'; | 3 | import { CommentListItem } from '../../../viewmodel/CommentListItem'; |
| 4 | import { FollowListDetailRequestItem } from '../../../viewmodel/FollowListDetailRequestItem'; | 4 | import { FollowListDetailRequestItem } from '../../../viewmodel/FollowListDetailRequestItem'; |
| @@ -27,7 +27,7 @@ export struct HomePageBottomCommentComponent { | @@ -27,7 +27,7 @@ export struct HomePageBottomCommentComponent { | ||
| 27 | @Link commentNum: number | 27 | @Link commentNum: number |
| 28 | @State isGetRequest: boolean = false | 28 | @State isGetRequest: boolean = false |
| 29 | private scroller: Scroller = new Scroller(); | 29 | private scroller: Scroller = new Scroller(); |
| 30 | - | 30 | + @State bottomCompH:number = 200 |
| 31 | aboutToAppear() { | 31 | aboutToAppear() { |
| 32 | this.getNewPageData() | 32 | this.getNewPageData() |
| 33 | } | 33 | } |
| @@ -107,7 +107,7 @@ export struct HomePageBottomCommentComponent { | @@ -107,7 +107,7 @@ export struct HomePageBottomCommentComponent { | ||
| 107 | //没有更多数据 显示提示 | 107 | //没有更多数据 显示提示 |
| 108 | if (!this.hasMore) { | 108 | if (!this.hasMore) { |
| 109 | ListItem() { | 109 | ListItem() { |
| 110 | - ListHasNoMoreDataUI() | 110 | + ListHasNoMoreDataUI().height(this.bottomCompH > 100 ? this.bottomCompH :100) |
| 111 | } | 111 | } |
| 112 | } | 112 | } |
| 113 | } | 113 | } |
| @@ -172,6 +172,7 @@ export struct HomePageBottomCommentComponent { | @@ -172,6 +172,7 @@ export struct HomePageBottomCommentComponent { | ||
| 172 | parentCommentUserName)) | 172 | parentCommentUserName)) |
| 173 | }) | 173 | }) |
| 174 | 174 | ||
| 175 | + this.bottomCompH = DisplayUtils.getDeviceHeight() - data.length*180 | ||
| 175 | if (status.commentIdList.length === 0) { | 176 | if (status.commentIdList.length === 0) { |
| 176 | 177 | ||
| 177 | if (this.curPageNum === 1) this.data_comment.clear() | 178 | if (this.curPageNum === 1) this.data_comment.clear() |
| @@ -12,7 +12,7 @@ export struct ListHasNoMoreDataUI{ | @@ -12,7 +12,7 @@ export struct ListHasNoMoreDataUI{ | ||
| 12 | .lineHeight(20) | 12 | .lineHeight(20) |
| 13 | }.justifyContent(FlexAlign.Center) | 13 | }.justifyContent(FlexAlign.Center) |
| 14 | .width('100%') | 14 | .width('100%') |
| 15 | - .margin({top: 24,bottom: 24}) | 15 | + .margin({top: 15}) |
| 16 | }else if (this.style === 2){ | 16 | }else if (this.style === 2){ |
| 17 | Column(){ | 17 | Column(){ |
| 18 | Image($r('app.media.empty_icon')) | 18 | Image($r('app.media.empty_icon')) |
| @@ -209,53 +209,55 @@ struct MineHomePage { | @@ -209,53 +209,55 @@ struct MineHomePage { | ||
| 209 | .padding({ left: 16 }) | 209 | .padding({ left: 16 }) |
| 210 | 210 | ||
| 211 | 211 | ||
| 212 | - //用户简介区域 | ||
| 213 | - Column() { | ||
| 214 | - Row() { | ||
| 215 | - Text(this.isHasIntroduction?"简介:"+this.desc:this.desc) | ||
| 216 | - .fontSize(14) | ||
| 217 | - .maxLines(3) | ||
| 218 | - .textOverflow({ overflow: TextOverflow.Ellipsis }) | ||
| 219 | - .lineHeight(21) | ||
| 220 | - .fontWeight(400) | ||
| 221 | - .fontColor(this.isHasIntroduction?$r('app.color.color_222222'):$r('app.color.color_999999')) | ||
| 222 | - .textAlign(TextAlign.Start) | 212 | + Column(){ |
| 213 | + //用户简介区域 | ||
| 214 | + Column() { | ||
| 215 | + Row() { | ||
| 216 | + Text(this.isHasIntroduction?"简介:"+this.desc:this.desc) | ||
| 217 | + .fontSize(14) | ||
| 218 | + .maxLines(3) | ||
| 219 | + .textOverflow({ overflow: TextOverflow.Ellipsis }) | ||
| 220 | + .lineHeight(21) | ||
| 221 | + .fontWeight(400) | ||
| 222 | + .fontColor(this.isHasIntroduction?$r('app.color.color_222222'):$r('app.color.color_999999')) | ||
| 223 | + .textAlign(TextAlign.Start) | ||
| 224 | + | ||
| 225 | + if(!this.isHasIntroduction){ | ||
| 226 | + Image($r('app.media.user_info_edit_icon')) | ||
| 227 | + .width(14) | ||
| 228 | + .height(14) | ||
| 229 | + .interpolation(ImageInterpolation.High) | ||
| 230 | + .objectFit(ImageFit.Auto) | ||
| 231 | + .margin({ | ||
| 232 | + left: 6 | ||
| 233 | + }) | ||
| 234 | + } | ||
| 235 | + }.onClick(()=>{ | ||
| 236 | + let params: editModelParams = { | ||
| 237 | + editContent: this.isHasIntroduction?this.desc:'' | ||
| 238 | + } | ||
| 239 | + WDRouterRule.jumpWithPage(WDRouterPage.editUserIntroductionPage,params) | ||
| 240 | + }) | ||
| 223 | 241 | ||
| 224 | - if(!this.isHasIntroduction){ | ||
| 225 | - Image($r('app.media.user_info_edit_icon')) | ||
| 226 | - .width(14) | ||
| 227 | - .height(14) | ||
| 228 | - .interpolation(ImageInterpolation.High) | ||
| 229 | - .objectFit(ImageFit.Auto) | ||
| 230 | - .margin({ | ||
| 231 | - left: 6 | ||
| 232 | - }) | ||
| 233 | - } | ||
| 234 | - }.onClick(()=>{ | ||
| 235 | - let params: editModelParams = { | ||
| 236 | - editContent: this.isHasIntroduction?this.desc:'' | ||
| 237 | - } | ||
| 238 | - WDRouterRule.jumpWithPage(WDRouterPage.editUserIntroductionPage,params) | ||
| 239 | - }) | ||
| 240 | 242 | ||
| 243 | + Text(`来到人民日报${this.registerTimeForDay}天`) | ||
| 244 | + .fontSize(12) | ||
| 245 | + .lineHeight(13) | ||
| 246 | + .fontWeight(400) | ||
| 247 | + .fontColor($r('app.color.color_999999')) | ||
| 248 | + .textAlign(TextAlign.Start) | ||
| 249 | + .margin({ top: 10 }) | ||
| 250 | + } | ||
| 251 | + .padding({ left: 16,right: 16,top: 12,bottom: 12}) | ||
| 252 | + .alignItems(HorizontalAlign.Start) | ||
| 241 | 253 | ||
| 242 | - Text(`来到人民日报${this.registerTimeForDay}天`) | ||
| 243 | - .fontSize(12) | ||
| 244 | - .lineHeight(13) | ||
| 245 | - .fontWeight(400) | ||
| 246 | - .fontColor($r('app.color.color_999999')) | ||
| 247 | - .textAlign(TextAlign.Start) | ||
| 248 | - .margin({ top: 10 }) | 254 | + //间隔符 |
| 255 | + Divider().width('100%').height(6).color($r('app.color.color_F5F5F5')).strokeWidth(6) | ||
| 249 | 256 | ||
| 250 | - } | ||
| 251 | - .padding({ left: 16,right: 16,top: 12,bottom: 12}) | 257 | + }.width('100%') |
| 258 | + .backgroundColor($r('app.color.white')) | ||
| 252 | .alignItems(HorizontalAlign.Start) | 259 | .alignItems(HorizontalAlign.Start) |
| 253 | .justifyContent(FlexAlign.Center) | 260 | .justifyContent(FlexAlign.Center) |
| 254 | - .width('100%') | ||
| 255 | - .backgroundColor($r('app.color.white')) | ||
| 256 | - //间隔符 | ||
| 257 | - | ||
| 258 | - Divider().width('100%').height(6).color($r('app.color.color_F5F5F5')).strokeWidth(6) | ||
| 259 | 261 | ||
| 260 | //tab 页面 | 262 | //tab 页面 |
| 261 | Stack({ alignContent: Alignment.Top }){ | 263 | Stack({ alignContent: Alignment.Top }){ |
| @@ -446,6 +448,7 @@ struct MineHomePage { | @@ -446,6 +448,7 @@ struct MineHomePage { | ||
| 446 | .fontWeight(this.currentIndex === index ? 600 : 400) | 448 | .fontWeight(this.currentIndex === index ? 600 : 400) |
| 447 | .fontColor(this.currentIndex === index ? this.selectedFontColor : this.fontColor) | 449 | .fontColor(this.currentIndex === index ? this.selectedFontColor : this.fontColor) |
| 448 | .lineHeight(20) | 450 | .lineHeight(20) |
| 451 | + .height(40) | ||
| 449 | 452 | ||
| 450 | if(this.currentIndex === index){ | 453 | if(this.currentIndex === index){ |
| 451 | Divider() | 454 | Divider() |
| @@ -453,7 +456,7 @@ struct MineHomePage { | @@ -453,7 +456,7 @@ struct MineHomePage { | ||
| 453 | .height(2) | 456 | .height(2) |
| 454 | .color('#ED2800') | 457 | .color('#ED2800') |
| 455 | .strokeWidth(2) | 458 | .strokeWidth(2) |
| 456 | - .margin({top: 35}) | 459 | + .margin({top: 40}) |
| 457 | .id("divTag") | 460 | .id("divTag") |
| 458 | } | 461 | } |
| 459 | }.onClick(()=>{ | 462 | }.onClick(()=>{ |
| @@ -461,7 +464,7 @@ struct MineHomePage { | @@ -461,7 +464,7 @@ struct MineHomePage { | ||
| 461 | this.controller.changeIndex(this.currentIndex) | 464 | this.controller.changeIndex(this.currentIndex) |
| 462 | trackTabFirstClick(index === 0 ? "评论":"关注") | 465 | trackTabFirstClick(index === 0 ? "评论":"关注") |
| 463 | }) | 466 | }) |
| 464 | - .height(35) | 467 | + .height(42) |
| 465 | .width(36) | 468 | .width(36) |
| 466 | .margin({right: 30}) | 469 | .margin({right: 30}) |
| 467 | } | 470 | } |
-
Please register or login to post a comment