yangchenggong1_wd

desc:同步4.0 代码

@@ -4,7 +4,7 @@ import router from '@ohos.router'; @@ -4,7 +4,7 @@ import router from '@ohos.router';
4 @Entry 4 @Entry
5 @Component 5 @Component
6 struct OtherNormalUserHomePage { 6 struct OtherNormalUserHomePage {
7 - @State userId: string = "111111111"; 7 + @State userId: string = "-1";
8 8
9 onPageShow() { 9 onPageShow() {
10 this.userId = router.getParams()?.["userId"] 10 this.userId = router.getParams()?.["userId"]
@@ -26,16 +26,16 @@ export default struct MinePageUserSimpleInfoUI { @@ -26,16 +26,16 @@ export default struct MinePageUserSimpleInfoUI {
26 .alt($r('app.media.default_head')) 26 .alt($r('app.media.default_head'))
27 .width('108lpx') 27 .width('108lpx')
28 .height('108lpx') 28 .height('108lpx')
29 - .objectFit(ImageFit.Cover) 29 + .objectFit(ImageFit.Auto)
30 .borderRadius(50) 30 .borderRadius(50)
31 31
32 Image(this.levelHead) 32 Image(this.levelHead)
33 - .width('120lpx')  
34 - .height('120lpx')  
35 - .objectFit(ImageFit.Cover) 33 + .width('130lpx')
  34 + .height('130lpx')
  35 + .objectFit(ImageFit.Auto)
36 .borderRadius(50) 36 .borderRadius(50)
37 - }.width('120lpx')  
38 - .height('120lpx') 37 + }.width('130lpx')
  38 + .height('130lpx')
39 .alignContent(Alignment.Center) 39 .alignContent(Alignment.Center)
40 .onClick(()=>{ 40 .onClick(()=>{
41 if(!this.isLogin){ 41 if(!this.isLogin){
@@ -14,10 +14,6 @@ export struct FollowFirstTabsComponent{ @@ -14,10 +14,6 @@ export struct FollowFirstTabsComponent{
14 selectedFontColor: string = '#000000' 14 selectedFontColor: string = '#000000'
15 15
16 aboutToAppear(){ 16 aboutToAppear(){
17 - // let res = JSON.parse(`{"code":"0","data":[{"children":[],"directoryName":"阅读","directoryWeight":99,"id":165,"isShow":1,"level":1,"parentId":0,"rootId":0},{"children":[{"children":[{"directoryName":"三二","directoryWeight":2,"id":120,"isShow":1,"level":3,"parentId":118,"rootId":117},{"directoryName":"三级","directoryWeight":1,"id":119,"isShow":1,"level":3,"parentId":118,"rootId":117}],"directoryName":"二级","directoryWeight":1,"id":118,"isShow":1,"level":2,"parentId":117,"rootId":117}],"directoryName":"幽游白书","directoryWeight":33,"id":117,"isShow":1,"level":1,"parentId":0,"rootId":0},{"children":[],"directoryName":"推荐","directoryWeight":9,"id":386,"isShow":1,"level":1,"parentId":0,"rootId":0},{"children":[],"directoryName":"政务","directoryWeight":9,"id":379,"isShow":1,"level":1,"parentId":0,"rootId":0},{"children":[{"children":[],"directoryName":"推荐","directoryWeight":0,"id":335,"isShow":1,"level":2,"parentId":320,"rootId":320}],"directoryName":"推荐","directoryWeight":9,"id":320,"isShow":1,"level":1,"parentId":0,"rootId":0},{"children":[],"directoryName":"媒体","directoryWeight":8,"id":390,"isShow":1,"level":1,"parentId":0,"rootId":0},{"children":[],"directoryName":"媒体","directoryWeight":8,"id":323,"isShow":1,"level":1,"parentId":0,"rootId":0},{"children":[],"directoryName":"自媒体","directoryWeight":7,"id":329,"isShow":1,"level":1,"parentId":0,"rootId":0},{"children":[],"directoryName":"名人","directoryWeight":6,"id":389,"isShow":1,"level":1,"parentId":0,"rootId":0},{"children":[{"children":[],"directoryName":"测试","directoryWeight":0,"id":338,"isShow":1,"level":2,"parentId":324,"rootId":324}],"directoryName":"名人","directoryWeight":6,"id":324,"isShow":1,"level":1,"parentId":0,"rootId":0},{"children":[{"children":[],"directoryName":"2级目录","directoryWeight":0,"id":340,"isShow":1,"level":2,"parentId":312,"rootId":312},{"children":[{"directoryName":"3级测试","directoryWeight":0,"id":368,"isShow":1,"level":3,"parentId":339,"rootId":312}],"directoryName":"二级目录","directoryWeight":0,"id":339,"isShow":1,"level":2,"parentId":312,"rootId":312},{"children":[{"directoryName":"企业","directoryWeight":1,"id":348,"isShow":1,"level":3,"parentId":336,"rootId":312},{"directoryName":"部委","directoryWeight":0,"id":344,"isShow":1,"level":3,"parentId":336,"rootId":312},{"directoryName":"地方","directoryWeight":0,"id":341,"isShow":1,"level":3,"parentId":336,"rootId":312}],"directoryName":"类型","directoryWeight":0,"id":336,"isShow":1,"level":2,"parentId":312,"rootId":312},{"children":[{"directoryName":"贵州省","directoryWeight":0,"id":378,"isShow":1,"level":3,"parentId":332,"rootId":312},{"directoryName":"西藏自治区","directoryWeight":0,"id":377,"isShow":1,"level":3,"parentId":332,"rootId":312},{"directoryName":"四川省","directoryWeight":0,"id":376,"isShow":1,"level":3,"parentId":332,"rootId":312},{"directoryName":"重庆市","directoryWeight":0,"id":375,"isShow":1,"level":3,"parentId":332,"rootId":312},{"directoryName":"湖南省","directoryWeight":0,"id":374,"isShow":1,"level":3,"parentId":332,"rootId":312},{"directoryName":"云南省","directoryWeight":0,"id":373,"isShow":1,"level":3,"parentId":332,"rootId":312},{"directoryName":"广西壮族自治区","directoryWeight":0,"id":372,"isShow":1,"level":3,"parentId":332,"rootId":312},{"directoryName":"宁夏回族自治区","directoryWeight":0,"id":371,"isShow":1,"level":3,"parentId":332,"rootId":312},{"directoryName":"湖北省","directoryWeight":0,"id":370,"isShow":1,"level":3,"parentId":332,"rootId":312},{"directoryName":"青海省","directoryWeight":0,"id":369,"isShow":1,"level":3,"parentId":332,"rootId":312},{"directoryName":"陕西省","directoryWeight":0,"id":367,"isShow":1,"level":3,"parentId":332,"rootId":312},{"directoryName":"甘肃省","directoryWeight":0,"id":366,"isShow":1,"level":3,"parentId":332,"rootId":312},{"directoryName":"吉林省","directoryWeight":0,"id":365,"isShow":1,"level":3,"parentId":332,"rootId":312},{"directoryName":"广东省","directoryWeight":0,"id":364,"isShow":1,"level":3,"parentId":332,"rootId":312},{"directoryName":"海南省","directoryWeight":0,"id":363,"isShow":1,"level":3,"parentId":332,"rootId":312},{"directoryName":"辽宁省","directoryWeight":0,"id":362,"isShow":1,"level":3,"parentId":332,"rootId":312},{"directoryName":"江苏省","directoryWeight":0,"id":361,"isShow":1,"level":3,"parentId":332,"rootId":312},{"directoryName":"新疆维吾尔族自治区","directoryWeight":0,"id":360,"isShow":1,"level":3,"parentId":332,"rootId":312},{"directoryName":"福建省","directoryWeight":0,"id":359,"isShow":1,"level":3,"parentId":332,"rootId":312},{"directoryName":"山东省","directoryWeight":0,"id":358,"isShow":1,"level":3,"parentId":332,"rootId":312},{"directoryName":"河南省","directoryWeight":0,"id":357,"isShow":1,"level":3,"parentId":332,"rootId":312},{"directoryName":"浙江省","directoryWeight":0,"id":356,"isShow":1,"level":3,"parentId":332,"rootId":312},{"directoryName":"安徽省","directoryWeight":0,"id":355,"isShow":1,"level":3,"parentId":332,"rootId":312},{"directoryName":"上海市","directoryWeight":0,"id":354,"isShow":1,"level":3,"parentId":332,"rootId":312},{"directoryName":"河北省","directoryWeight":0,"id":353,"isShow":1,"level":3,"parentId":332,"rootId":312},{"directoryName":"黑龙江省","directoryWeight":0,"id":352,"isShow":1,"level":3,"parentId":332,"rootId":312},{"directoryName":"江西省","directoryWeight":0,"id":351,"isShow":1,"level":3,"parentId":332,"rootId":312},{"directoryName":"内蒙古自治区","directoryWeight":0,"id":350,"isShow":1,"level":3,"parentId":332,"rootId":312},{"directoryName":"北京市","directoryWeight":0,"id":349,"isShow":1,"level":3,"parentId":332,"rootId":312},{"directoryName":"山西省","directoryWeight":0,"id":346,"isShow":1,"level":3,"parentId":332,"rootId":312}],"directoryName":"地域","directoryWeight":0,"id":332,"isShow":1,"level":2,"parentId":312,"rootId":312}],"directoryName":"政务","directoryWeight":5,"id":312,"isShow":1,"level":1,"parentId":0,"rootId":0},{"children":[],"directoryName":"学校","directoryWeight":4,"id":331,"isShow":1,"level":1,"parentId":0,"rootId":0},{"children":[],"directoryName":"机构","directoryWeight":3,"id":330,"isShow":1,"level":1,"parentId":0,"rootId":0},{"children":[{"children":[{"directoryName":"新闻联播","directoryWeight":3,"id":79,"isShow":1,"level":3,"parentId":75,"rootId":74},{"directoryName":"第三季","directoryWeight":2,"id":78,"isShow":1,"level":3,"parentId":75,"rootId":74},{"directoryName":"三级","directoryWeight":1,"id":76,"isShow":1,"level":3,"parentId":75,"rootId":74}],"directoryName":"短视频","directoryWeight":1,"id":75,"isShow":1,"level":2,"parentId":74,"rootId":74}],"directoryName":"创作","directoryWeight":3,"id":74,"isShow":1,"level":1,"parentId":0,"rootId":0},{"children":[{"children":[],"directoryName":"教学","directoryWeight":2,"id":72,"isShow":1,"level":2,"parentId":64,"rootId":64},{"children":[],"directoryName":"热门","directoryWeight":1,"id":73,"isShow":1,"level":2,"parentId":64,"rootId":64},{"children":[],"directoryName":"赛事","directoryWeight":1,"id":71,"isShow":1,"level":2,"parentId":64,"rootId":64}],"directoryName":"游戏","directoryWeight":2,"id":64,"isShow":1,"level":1,"parentId":0,"rootId":0},{"children":[],"directoryName":"新闻","directoryWeight":1,"id":315,"isShow":1,"level":1,"parentId":0,"rootId":0},{"children":[{"children":[],"directoryName":"趣闻","directoryWeight":6,"id":70,"isShow":1,"level":2,"parentId":63,"rootId":63},{"children":[],"directoryName":"时政","directoryWeight":5,"id":69,"isShow":1,"level":2,"parentId":63,"rootId":63},{"children":[],"directoryName":"农业","directoryWeight":3,"id":68,"isShow":1,"level":2,"parentId":63,"rootId":63},{"children":[],"directoryName":"娱乐","directoryWeight":3,"id":67,"isShow":1,"level":2,"parentId":63,"rootId":63},{"children":[],"directoryName":"科技","directoryWeight":2,"id":66,"isShow":1,"level":2,"parentId":63,"rootId":63},{"children":[],"directoryName":"国际","directoryWeight":1,"id":65,"isShow":1,"level":2,"parentId":63,"rootId":63}],"directoryName":"新闻","directoryWeight":1,"id":63,"isShow":1,"level":1,"parentId":0,"rootId":0},{"children":[],"directoryName":"公安","directoryWeight":0,"id":388,"isShow":1,"level":1,"parentId":0,"rootId":0},{"children":[],"directoryName":"dddd","directoryWeight":0,"id":387,"isShow":1,"level":1,"parentId":0,"rootId":0},{"children":[],"directoryName":"健康","directoryWeight":0,"id":384,"isShow":1,"level":1,"parentId":0,"rootId":0},{"children":[],"directoryName":"综合","directoryWeight":0,"id":328,"isShow":1,"level":1,"parentId":0,"rootId":0},{"children":[],"directoryName":"房产","directoryWeight":0,"id":327,"isShow":1,"level":1,"parentId":0,"rootId":0},{"children":[],"directoryName":"健康","directoryWeight":0,"id":318,"isShow":1,"level":1,"parentId":0,"rootId":0},{"children":[],"directoryName":"历史","directoryWeight":0,"id":310,"isShow":1,"level":1,"parentId":0,"rootId":0},{"children":[],"directoryName":"dddd","directoryWeight":0,"id":309,"isShow":1,"level":1,"parentId":0,"rootId":0},{"children":[{"children":[],"directoryName":"aaaa","directoryWeight":1,"id":333,"isShow":1,"level":2,"parentId":308,"rootId":308},{"children":[],"directoryName":"qqq","directoryWeight":0,"id":334,"isShow":1,"level":2,"parentId":308,"rootId":308}],"directoryName":"dddd","directoryWeight":0,"id":308,"isShow":1,"level":1,"parentId":0,"rootId":0}],"message":"Success","success":true,"timestamp":1710741803593}`) as ResponseDTO<FollowListItem[]>  
18 - // res.data.forEach(element => {  
19 - // this.data.push(element)  
20 - // });  
21 MinePageDatasModel.getFollowListData(getContext(this)).then((value)=>{ 17 MinePageDatasModel.getFollowListData(getContext(this)).then((value)=>{
22 this.data.push(new FollowListItem("我的")) 18 this.data.push(new FollowListItem("我的"))
23 value.forEach((element)=>{ 19 value.forEach((element)=>{
@@ -85,7 +81,7 @@ export struct FollowFirstTabsComponent{ @@ -85,7 +81,7 @@ export struct FollowFirstTabsComponent{
85 this.currentIndex = index 81 this.currentIndex = index
86 }) 82 })
87 .width('100%') 83 .width('100%')
88 - .height('100%') 84 + .layoutWeight(1)
89 }.width('100%') 85 }.width('100%')
90 } 86 }
91 } 87 }
@@ -70,7 +70,7 @@ export struct FollowListDetailUI{ @@ -70,7 +70,7 @@ export struct FollowListDetailUI{
70 //我的关注列表 70 //我的关注列表
71 if (this.creatorDirectoryId === -1){ 71 if (this.creatorDirectoryId === -1){
72 if(this.hasMore){ 72 if(this.hasMore){
73 - let object = new FollowListDetailRequestItem(20,this.curPageNum) 73 + let object = new FollowListDetailRequestItem(-1,20,this.curPageNum)
74 74
75 MinePageDatasModel.getMineFollowListData(object,getContext(this)).then((value)=>{ 75 MinePageDatasModel.getMineFollowListData(object,getContext(this)).then((value)=>{
76 if (!this.data || value.list.length == 0){ 76 if (!this.data || value.list.length == 0){
@@ -23,14 +23,13 @@ export struct FollowSecondTabsComponent{ @@ -23,14 +23,13 @@ export struct FollowSecondTabsComponent{
23 23
24 if(this.data != null){ 24 if(this.data != null){
25 if(this.data[this.firstIndex].children == null || this.data[this.firstIndex].children.length == 0){ 25 if(this.data[this.firstIndex].children == null || this.data[this.firstIndex].children.length == 0){
26 - FollowListDetailUI({creatorDirectoryId:this.data[this.firstIndex].id}) 26 + FollowListDetailUI({creatorDirectoryId:this.data[this.firstIndex].id}).layoutWeight(1)
27 }else{ 27 }else{
28 this.FollowSecondUI() 28 this.FollowSecondUI()
29 } 29 }
30 } 30 }
31 - } 31 + }.layoutWeight(1)
32 .width('100%') 32 .width('100%')
33 - .height('100%')  
34 } 33 }
35 34
36 @Builder FollowSecondUI(){ 35 @Builder FollowSecondUI(){
1 -import { LazyDataSource, StringUtils } from 'wdKit'; 1 +import { DateTimeUtils, LazyDataSource, StringUtils } from 'wdKit';
2 import MinePageDatasModel from '../../../../model/MinePageDatasModel'; 2 import MinePageDatasModel from '../../../../model/MinePageDatasModel';
3 import { HttpUrlUtils } from '../../../../network/HttpUrlUtils'; 3 import { HttpUrlUtils } from '../../../../network/HttpUrlUtils';
4 import RouteManager from '../../../../utils/RouteManager'; 4 import RouteManager from '../../../../utils/RouteManager';
@@ -33,8 +33,32 @@ export struct HomePageBottomComponent{ @@ -33,8 +33,32 @@ export struct HomePageBottomComponent{
33 .backgroundColor($r('app.color.color_EDEDED')) 33 .backgroundColor($r('app.color.color_EDEDED'))
34 34
35 if(this.count === 0){ 35 if(this.count === 0){
36 - ListHasNoMoreDataUI({style:2})  
37 - .height('100%') 36 + if(this.style === 1){
  37 + Row(){
  38 + Text("关注更多人民号")
  39 + .fontWeight('400lpx')
  40 + .fontColor($r('app.color.color_222222'))
  41 + .lineHeight('38lpx')
  42 + .fontSize('27lpx')
  43 + .textAlign(TextAlign.Center)
  44 + .margin({right:'4lpx'})
  45 + Image($r('app.media.arrow_icon_right'))
  46 + .objectFit(ImageFit.Auto)
  47 + .width('27lpx')
  48 + .height('27lpx')
  49 + }.height('69lpx')
  50 + .width('659lpx')
  51 + .alignItems(VerticalAlign.Center)
  52 + .justifyContent(FlexAlign.Center)
  53 + .backgroundColor($r('app.color.color_F5F5F5'))
  54 + .margin({top:'31lpx',bottom:'4lpx'})
  55 + .onClick(()=>{
  56 + RouteManager.jumpNewPage("pages/FollowListPage",new RouterObject('',1))
  57 + })
  58 + }else{
  59 + ListHasNoMoreDataUI({style:2})
  60 + .layoutWeight(1)
  61 + }
38 }else{ 62 }else{
39 if(this.style === 1){ 63 if(this.style === 1){
40 List({ space: 3 }) { 64 List({ space: 3 }) {
@@ -129,6 +153,8 @@ export struct HomePageBottomComponent{ @@ -129,6 +153,8 @@ export struct HomePageBottomComponent{
129 } 153 }
130 } 154 }
131 .width('100%') 155 .width('100%')
  156 + .height('100%')
  157 + .justifyContent(FlexAlign.Start)
132 } 158 }
133 159
134 160
@@ -145,7 +171,7 @@ export struct HomePageBottomComponent{ @@ -145,7 +171,7 @@ export struct HomePageBottomComponent{
145 //我的关注列表 171 //我的关注列表
146 if (this.style === 1){ 172 if (this.style === 1){
147 if(this.hasMore){ 173 if(this.hasMore){
148 - let object = new FollowListDetailRequestItem(20,this.curPageNum) 174 + let object = new FollowListDetailRequestItem(-1,20,this.curPageNum)
149 175
150 MinePageDatasModel.getMineFollowListData(object,getContext(this)).then((value)=>{ 176 MinePageDatasModel.getMineFollowListData(object,getContext(this)).then((value)=>{
151 if (!this.data_follow || value.list.length == 0){ 177 if (!this.data_follow || value.list.length == 0){
@@ -170,9 +196,11 @@ export struct HomePageBottomComponent{ @@ -170,9 +196,11 @@ export struct HomePageBottomComponent{
170 } 196 }
171 }else if(this.style === 0){ 197 }else if(this.style === 0){
172 if(this.hasMore){ 198 if(this.hasMore){
173 - let object = new FollowListDetailRequestItem(20,this.curPageNum) 199 + let time = encodeURI(DateTimeUtils.getCurDate(DateTimeUtils.PATTERN_DATE_TIME_HYPHEN))
  200 + let object = new FollowListDetailRequestItem(-1,20,this.curPageNum)
  201 +
174 202
175 - MinePageDatasModel.getMineCommentListData(object,getContext(this)).then((value)=>{ 203 + MinePageDatasModel.getMineCommentListData(time,object,getContext(this)).then((value)=>{
176 if (!this.data_comment || value.list.length == 0){ 204 if (!this.data_comment || value.list.length == 0){
177 this.hasMore = false 205 this.hasMore = false
178 }else{ 206 }else{
@@ -55,18 +55,20 @@ export struct MyHomeComponent { @@ -55,18 +55,20 @@ export struct MyHomeComponent {
55 Stack(){ 55 Stack(){
56 Image(this.headPhotoUrl) 56 Image(this.headPhotoUrl)
57 .alt($r('app.media.default_head')) 57 .alt($r('app.media.default_head'))
58 - .width('115lpx')  
59 - .height('115lpx')  
60 - .objectFit(ImageFit.Cover) 58 + .width('100lpx')
  59 + .height('100lpx')
  60 + .objectFit(ImageFit.Auto)
61 .borderRadius(50) 61 .borderRadius(50)
62 Image(this.levelHead) 62 Image(this.levelHead)
63 .width('130lpx') 63 .width('130lpx')
64 .height('130lpx') 64 .height('130lpx')
65 .objectFit(ImageFit.Cover) 65 .objectFit(ImageFit.Cover)
66 - .borderRadius(50)  
67 }.onClick(()=>{ 66 }.onClick(()=>{
  67 + //531267787833221
68 RouteManager.jumpNewPage("pages/OtherNormalUserHomePage",new RouterObject('512157124138245',0)) 68 RouteManager.jumpNewPage("pages/OtherNormalUserHomePage",new RouterObject('512157124138245',0))
69 - }) 69 + }).width('135lpx')
  70 + .height('135lpx')
  71 +
70 Column() { 72 Column() {
71 Row() { 73 Row() {
72 Text(`${this.userName}`) 74 Text(`${this.userName}`)
@@ -6,6 +6,7 @@ import MinePageDatasModel from '../../../../model/MinePageDatasModel'; @@ -6,6 +6,7 @@ import MinePageDatasModel from '../../../../model/MinePageDatasModel';
6 import { MineCommentListDetailItem } from '../../../../viewmodel/MineCommentListDetailItem'; 6 import { MineCommentListDetailItem } from '../../../../viewmodel/MineCommentListDetailItem';
7 import { OtherUserCommentLikeStatusRequestItem } from '../../../../viewmodel/OtherUserCommentLikeStatusRequestItem'; 7 import { OtherUserCommentLikeStatusRequestItem } from '../../../../viewmodel/OtherUserCommentLikeStatusRequestItem';
8 import { CommentLikeOperationRequestItem } from '../../../../viewmodel/CommentLikeOperationRequestItem'; 8 import { CommentLikeOperationRequestItem } from '../../../../viewmodel/CommentLikeOperationRequestItem';
  9 +import { HttpUrlUtils } from '../../../../network/HttpUrlUtils';
9 10
10 const TAG = "HomePageBottomComponent" 11 const TAG = "HomePageBottomComponent"
11 @Component 12 @Component
@@ -17,6 +18,7 @@ export struct OtherHomePageBottomCommentComponent{ @@ -17,6 +18,7 @@ export struct OtherHomePageBottomCommentComponent{
17 curPageNum:number = 1; 18 curPageNum:number = 1;
18 @State count:number = 0; 19 @State count:number = 0;
19 @Prop levelHead:string 20 @Prop levelHead:string
  21 + @Link commentNum:number
20 22
21 aboutToAppear(){ 23 aboutToAppear(){
22 this.getNewPageData() 24 this.getNewPageData()
@@ -122,6 +124,7 @@ export struct OtherHomePageBottomCommentComponent{ @@ -122,6 +124,7 @@ export struct OtherHomePageBottomCommentComponent{
122 this.data_comment.notifyDataReload() 124 this.data_comment.notifyDataReload()
123 125
124 this.count = this.data_comment.totalCount() 126 this.count = this.data_comment.totalCount()
  127 + this.commentNum = value.totalCount
125 if (this.data_comment.totalCount() < value.totalCount) { 128 if (this.data_comment.totalCount() < value.totalCount) {
126 this.curPageNum++ 129 this.curPageNum++
127 }else { 130 }else {
@@ -104,7 +104,7 @@ export struct OtherHomePageBottomFollowComponent{ @@ -104,7 +104,7 @@ export struct OtherHomePageBottomFollowComponent{
104 104
105 getNewPageData(){ 105 getNewPageData(){
106 this.isLoading = true 106 this.isLoading = true
107 - //我的关注列表 107 + //关注列表
108 if(this.hasMore){ 108 if(this.hasMore){
109 let object = new UserFollowListRequestItem(Number(this.curUserId),20,this.curPageNum,"1") 109 let object = new UserFollowListRequestItem(Number(this.curUserId),20,this.curPageNum,"1")
110 110
@@ -164,47 +164,6 @@ struct ChildFollowComponent { @@ -164,47 +164,6 @@ struct ChildFollowComponent {
164 .textOverflow({ overflow: TextOverflow.Ellipsis }) 164 .textOverflow({ overflow: TextOverflow.Ellipsis })
165 }.layoutWeight(1) 165 }.layoutWeight(1)
166 .alignItems(HorizontalAlign.Start) 166 .alignItems(HorizontalAlign.Start)
167 -  
168 - if(this.data.status == "1"){  
169 - Row(){  
170 - Text(`已关注`)  
171 - .fontColor($r('app.color.color_CCCCCC'))  
172 - .fontSize('23lpx')  
173 - .fontWeight('500lpx')  
174 - .lineHeight('35lpx')  
175 - }.backgroundColor($r('app.color.color_F5F5F5'))  
176 - .borderRadius('6lpx')  
177 - .borderColor($r('app.color.color_F5F5F5'))  
178 - .borderWidth('2lpx')  
179 - .justifyContent(FlexAlign.Center)  
180 - .width('100lpx')  
181 - .height('46lpx')  
182 - .margin({left:'4lpx',top:'23lpx'})  
183 - .onClick(()=>{  
184 - this.data.status = "0"  
185 - })  
186 - }else{  
187 - Row(){  
188 - Image($r('app.media.follow_icon'))  
189 - .margin({right:'4lpx'})  
190 - .width('23lpx')  
191 - .height('23lpx')  
192 - Text(`关注`)  
193 - .fontColor($r('app.color.color_ED2800'))  
194 - .fontSize('23lpx')  
195 - .fontWeight('500lpx')  
196 - .lineHeight('35lpx')  
197 - }.borderColor($r('app.color.color_1AED2800'))  
198 - .borderRadius('6lpx')  
199 - .borderWidth('2lpx')  
200 - .justifyContent(FlexAlign.Center)  
201 - .width('100lpx')  
202 - .height('46lpx')  
203 - .margin({left:'4lpx',top:'23lpx'})  
204 - .onClick(()=>{  
205 - this.data.status = "1"  
206 - })  
207 - }  
208 }.alignItems(VerticalAlign.Top) 167 }.alignItems(VerticalAlign.Top)
209 .width('100%') 168 .width('100%')
210 .layoutWeight(1) 169 .layoutWeight(1)
@@ -9,7 +9,7 @@ const TAG = "OtherUserHomeComponent" @@ -9,7 +9,7 @@ const TAG = "OtherUserHomeComponent"
9 9
10 @Component 10 @Component
11 export struct OtherUserHomeComponent { 11 export struct OtherUserHomeComponent {
12 - @Prop curUserId: string 12 + @Watch('change') @Prop curUserId: string
13 13
14 @State tileOpacity: number = 0; 14 @State tileOpacity: number = 0;
15 firstPositionY:number = 0; 15 firstPositionY:number = 0;
@@ -27,6 +27,12 @@ export struct OtherUserHomeComponent { @@ -27,6 +27,12 @@ export struct OtherUserHomeComponent {
27 @State attentionNum:number = 0//关注数 27 @State attentionNum:number = 0//关注数
28 @State desc:string = "" 28 @State desc:string = ""
29 29
  30 + change(){
  31 + this.getUserInfo()
  32 + this.getUserLevel()
  33 + }
  34 +
  35 +
30 aboutToAppear(){ 36 aboutToAppear(){
31 this.getUserInfo() 37 this.getUserInfo()
32 this.getUserLevel() 38 this.getUserLevel()
@@ -52,8 +58,8 @@ export struct OtherUserHomeComponent { @@ -52,8 +58,8 @@ export struct OtherUserHomeComponent {
52 Stack(){ 58 Stack(){
53 Image(this.headPhotoUrl) 59 Image(this.headPhotoUrl)
54 .alt($r('app.media.default_head')) 60 .alt($r('app.media.default_head'))
55 - .width('115lpx')  
56 - .height('115lpx') 61 + .width('100lpx')
  62 + .height('100lpx')
57 .objectFit(ImageFit.Cover) 63 .objectFit(ImageFit.Cover)
58 .borderRadius(50) 64 .borderRadius(50)
59 Image(this.levelHead) 65 Image(this.levelHead)
@@ -165,7 +171,7 @@ export struct OtherUserHomeComponent { @@ -165,7 +171,7 @@ export struct OtherUserHomeComponent {
165 //tab 页面 171 //tab 页面
166 Tabs({controller: this.controller}) { 172 Tabs({controller: this.controller}) {
167 TabContent() { 173 TabContent() {
168 - OtherHomePageBottomCommentComponent({curUserId:this.curUserId,levelHead:this.levelHead}) 174 + OtherHomePageBottomCommentComponent({curUserId:this.curUserId,levelHead:this.levelHead,commentNum:$commentNum})
169 }.tabBar(this.TabBuilder(0,"评论")) 175 }.tabBar(this.TabBuilder(0,"评论"))
170 TabContent() { 176 TabContent() {
171 OtherHomePageBottomFollowComponent({curUserId:this.curUserId}) 177 OtherHomePageBottomFollowComponent({curUserId:this.curUserId})
@@ -295,6 +301,9 @@ export struct OtherUserHomeComponent { @@ -295,6 +301,9 @@ export struct OtherUserHomeComponent {
295 301
296 302
297 getUserInfo(){ 303 getUserInfo(){
  304 + if(this.curUserId === "-1" ){
  305 + return
  306 + }
298 let item = new OtherUserDetailRequestItem("","1",this.curUserId) 307 let item = new OtherUserDetailRequestItem("","1",this.curUserId)
299 MinePageDatasModel.getOtherUserDetailData(item,getContext(this)).then((value)=>{ 308 MinePageDatasModel.getOtherUserDetailData(item,getContext(this)).then((value)=>{
300 if(value!=null){ 309 if(value!=null){
@@ -312,6 +321,9 @@ export struct OtherUserHomeComponent { @@ -312,6 +321,9 @@ export struct OtherUserHomeComponent {
312 }) 321 })
313 } 322 }
314 getUserLevel(){ 323 getUserLevel(){
  324 + if(this.curUserId === "-1" ){
  325 + return
  326 + }
315 MinePageDatasModel.getOtherUserLevelData([this.curUserId],getContext(this)).then((value)=>{ 327 MinePageDatasModel.getOtherUserLevelData([this.curUserId],getContext(this)).then((value)=>{
316 if(value!=null){ 328 if(value!=null){
317 this.levelHead = value[0].levelHead 329 this.levelHead = value[0].levelHead
@@ -324,10 +324,10 @@ class MinePageDatasModel{ @@ -324,10 +324,10 @@ class MinePageDatasModel{
324 * @param context 324 * @param context
325 * @returns 325 * @returns
326 */ 326 */
327 - getMineCommentListData(params:FollowListDetailRequestItem,context: Context): Promise<MineCommentListDetailItem> { 327 + getMineCommentListData(time:string,params:FollowListDetailRequestItem,context: Context): Promise<MineCommentListDetailItem> {
328 return new Promise<MineCommentListDetailItem>((success, error) => { 328 return new Promise<MineCommentListDetailItem>((success, error) => {
329 Logger.info(TAG, `getAppointmentList start`); 329 Logger.info(TAG, `getAppointmentList start`);
330 - this.fetchMineCommentListData(params).then((navResDTO: ResponseDTO<MineCommentListDetailItem>) => { 330 + this.fetchMineCommentListData(time,params).then((navResDTO: ResponseDTO<MineCommentListDetailItem>) => {
331 if (!navResDTO || navResDTO.code != 0) { 331 if (!navResDTO || navResDTO.code != 0) {
332 success(this.getMineCommentListDataLocal(context)) 332 success(this.getMineCommentListDataLocal(context))
333 return 333 return
@@ -342,8 +342,8 @@ class MinePageDatasModel{ @@ -342,8 +342,8 @@ class MinePageDatasModel{
342 }) 342 })
343 } 343 }
344 344
345 - fetchMineCommentListData(object:FollowListDetailRequestItem) {  
346 - let url = HttpUrlUtils.getMineCommentListDataUrl()+`?pageSize=${object.pageSize}&pageNum=${object.pageNum}` 345 + fetchMineCommentListData(time:string,object:FollowListDetailRequestItem) {
  346 + let url = HttpUrlUtils.getMineCommentListDataUrl()+`?pageSize=${object.pageSize}&pageNum=${object.pageNum}&time=${time}`
347 let headers: HashMap<string, string> = HttpUrlUtils.getYcgCommonHeaders(); 347 let headers: HashMap<string, string> = HttpUrlUtils.getYcgCommonHeaders();
348 return WDHttp.get<ResponseDTO<MineCommentListDetailItem>>(url, headers) 348 return WDHttp.get<ResponseDTO<MineCommentListDetailItem>>(url, headers)
349 }; 349 };
@@ -581,7 +581,7 @@ class MinePageDatasModel{ @@ -581,7 +581,7 @@ class MinePageDatasModel{
581 } 581 }
582 582
583 fetchOtherUserCommentLikeStatusData(object:OtherUserCommentLikeStatusRequestItem) { 583 fetchOtherUserCommentLikeStatusData(object:OtherUserCommentLikeStatusRequestItem) {
584 - let url = HttpUrlUtils.getFollowListStatusDataUrl() 584 + let url = HttpUrlUtils.getCommentListStatusDataUrl()
585 let headers: HashMap<string, string> = HttpUrlUtils.getYcgCommonHeaders(); 585 let headers: HashMap<string, string> = HttpUrlUtils.getYcgCommonHeaders();
586 return WDHttp.post<ResponseDTO<QueryCommentListIsLikedItem[]>>(url,object, headers) 586 return WDHttp.post<ResponseDTO<QueryCommentListIsLikedItem[]>>(url,object, headers)
587 }; 587 };
@@ -66,6 +66,11 @@ export class HttpUrlUtils { @@ -66,6 +66,11 @@ export class HttpUrlUtils {
66 static readonly FOLLOW_LIST_STATUS_DATA_PATH: string = "/api/rmrb-interact/interact/zh/c/batchAttention/status"; 66 static readonly FOLLOW_LIST_STATUS_DATA_PATH: string = "/api/rmrb-interact/interact/zh/c/batchAttention/status";
67 67
68 /** 68 /**
  69 + * 个人中心 启用用户 有没有被当前用户点赞状态
  70 + */
  71 + static readonly COMMENT_LIST_STATUS_DATA_PATH: string = "/api/rmrb-comment/comment/zh/c/batchCommentStatus";
  72 +
  73 + /**
69 * 个人中心 我的评论列表 74 * 个人中心 我的评论列表
70 */ 75 */
71 static readonly MINE_COMMENT_LIST_DATA_PATH: string = "/api/rmrb-comment/comment/zh/c/myCommentList"; 76 static readonly MINE_COMMENT_LIST_DATA_PATH: string = "/api/rmrb-comment/comment/zh/c/myCommentList";
@@ -208,6 +213,11 @@ export class HttpUrlUtils { @@ -208,6 +213,11 @@ export class HttpUrlUtils {
208 return url 213 return url
209 } 214 }
210 215
  216 + static getCommentListStatusDataUrl() {
  217 + let url = HttpUrlUtils.hostUrl + HttpUrlUtils.COMMENT_LIST_STATUS_DATA_PATH
  218 + return url
  219 + }
  220 +
211 static getMineCommentListDataUrl() { 221 static getMineCommentListDataUrl() {
212 let url = HttpUrlUtils.HOST_SIT + HttpUrlUtils.MINE_COMMENT_LIST_DATA_PATH 222 let url = HttpUrlUtils.HOST_SIT + HttpUrlUtils.MINE_COMMENT_LIST_DATA_PATH
213 return url 223 return url
@@ -260,13 +270,13 @@ export class HttpUrlUtils { @@ -260,13 +270,13 @@ export class HttpUrlUtils {
260 270
261 271
262 /** 272 /**
263 - * 预约操作 273 + * 点赞操作
264 */ 274 */
265 static readonly COMMENT_LIKE_OPERATION_PATH: string = "/api/rmrb-comment/comment/zh/c/commentLike"; 275 static readonly COMMENT_LIKE_OPERATION_PATH: string = "/api/rmrb-comment/comment/zh/c/commentLike";
266 /** 276 /**
267 * 关注操作 277 * 关注操作
268 */ 278 */
269 - static readonly FOLLOW_OPERATION_PATH: string = "https://pd-apis-sit.pdnews.cn/api/rmrb-interact/interact/zh/c/attention/operation"; 279 + static readonly FOLLOW_OPERATION_PATH: string = "/api/rmrb-interact/interact/zh/c/attention/operation";
270 280
271 static getYcgCommonHeaders(): HashMap<string, string> { 281 static getYcgCommonHeaders(): HashMap<string, string> {
272 let headers: HashMap<string, string> = new HashMap<string, string>() 282 let headers: HashMap<string, string> = new HashMap<string, string>()