yangchenggong1_wd

desc:fix bug

... ... @@ -19,7 +19,6 @@ export default struct MinePagePersonFunctionUI {
.interpolation(ImageInterpolation.High)
Text(`${item.msg}`)
.margin({top:'8lpx'})
.width('50lpx')
.height('23lpx')
.fontColor($r('app.color.color_222222'))
.fontSize('23lpx')
... ...
import { Params } from 'wdBean';
import { DateTimeUtils, LazyDataSource, StringUtils, UserDataLocal } from 'wdKit';
import { HttpUrlUtils } from 'wdNetwork';
import { DateTimeUtils, LazyDataSource,UserDataLocal } from 'wdKit';
import { WDRouterPage, WDRouterRule } from 'wdRouter';
import MinePageDatasModel from '../../../model/MinePageDatasModel';
import { CommentListItem } from '../../../viewmodel/CommentListItem';
import { FollowListDetailItem } from '../../../viewmodel/FollowListDetailItem';
import { FollowListDetailRequestItem } from '../../../viewmodel/FollowListDetailRequestItem';
import { FollowOperationRequestItem } from '../../../viewmodel/FollowOperationRequestItem';
import { ListHasNoMoreDataUI } from '../../reusable/ListHasNoMoreDataUI';
import { FollowChildComponent } from '../follow/FollowChildComponent';
... ... @@ -22,6 +20,7 @@ export struct HomePageBottomComponent{
@State count:number = 0;
@State isMineAccount:boolean = true;
@State userId:string = "";
@Link commentNum:number
aboutToAppear(){
this.getNewPageData()
... ... @@ -36,6 +35,7 @@ export struct HomePageBottomComponent{
if(this.count === 0){
if(this.style === 1){
Column(){
Row(){
Text("关注更多人民号")
.fontWeight('400lpx')
... ... @@ -60,6 +60,8 @@ export struct HomePageBottomComponent{
}
WDRouterRule.jumpWithPage(WDRouterPage.followListPage,params)
})
}.layoutWeight(1)
.justifyContent(FlexAlign.Start)
}else{
ListHasNoMoreDataUI({style:2})
.layoutWeight(1)
... ... @@ -211,7 +213,8 @@ export struct HomePageBottomComponent{
this.hasMore = false
}else{
value.list.forEach((value)=>{
this.data_comment.push(new CommentListItem(value.fromUserHeader,value.fromUserName,value.targetTitle,value.createTime,value.commentContent,value.likeNum,0,value.id,value.targetId,value.targetType))
let publishTime = DateTimeUtils.getCommentTime(DateTimeUtils.parseDate(value.createTime,DateTimeUtils.PATTERN_DATE_TIME_HYPHEN))
this.data_comment.push(new CommentListItem(value.fromUserHeader,value.fromUserName,value.targetTitle,publishTime,value.commentContent,value.likeNum,0,value.id,value.targetId,value.targetType))
})
this.data_comment.notifyDataReload()
this.count = this.data_comment.totalCount()
... ... @@ -222,6 +225,7 @@ export struct HomePageBottomComponent{
}
}
this.isLoading = false
this.commentNum = value.totalCount
}).catch((err:Error)=>{
console.log(TAG,"请求失败")
this.isLoading = false
... ...
... ... @@ -60,7 +60,7 @@ class MinePageDatasModel{
return this.personalData
}
this.personalData.push(new MinePagePersonalFunctionsItem("评论",$r('app.media.mine_comment_icon')))
this.personalData.push(new MinePagePersonalFunctionsItem("关注",$r('app.media.mine_order_icon')))
this.personalData.push(new MinePagePersonalFunctionsItem("关注",$r('app.media.mine_follow_icon')))
this.personalData.push(new MinePagePersonalFunctionsItem("收藏",$r('app.media.mine_collect_icon')))
this.personalData.push(new MinePagePersonalFunctionsItem("历史",$r('app.media.mine_history_icon')))
this.personalData.push(new MinePagePersonalFunctionsItem("消息",$r('app.media.mine_msg_icon')))
... ...
... ... @@ -185,10 +185,10 @@ struct MineHomePage {
//tab 页面
Tabs({controller: this.controller}) {
TabContent() {
HomePageBottomComponent({style:0})
HomePageBottomComponent({style:0,commentNum:$commentNum})
}.tabBar(this.TabBuilder(0,"评论"))
TabContent() {
HomePageBottomComponent({style:1})
HomePageBottomComponent({style:1,commentNum:$commentNum})
}.tabBar(this.TabBuilder(1,"关注"))
}
.backgroundColor($r('app.color.white'))
... ...