Showing
30 changed files
with
1920 additions
and
40 deletions
| @@ -6,12 +6,10 @@ import { Params } from 'wdComponent/src/main/ets/repository/bean/Params'; | @@ -6,12 +6,10 @@ import { Params } from 'wdComponent/src/main/ets/repository/bean/Params'; | ||
| 6 | @Entry | 6 | @Entry |
| 7 | @Component | 7 | @Component |
| 8 | struct FollowListPage { | 8 | struct FollowListPage { |
| 9 | - | ||
| 10 | - @State params:Params = router.getParams() as Params; | ||
| 11 | @State curIndex: string = '0'; | 9 | @State curIndex: string = '0'; |
| 12 | 10 | ||
| 13 | onPageShow() { | 11 | onPageShow() { |
| 14 | - this.curIndex = "1"; | 12 | + this.curIndex = router.getParams()?.["index"]; |
| 15 | } | 13 | } |
| 16 | 14 | ||
| 17 | build() { | 15 | build() { |
| 1 | +import { OtherUserHomeComponent } from 'wdComponent' | ||
| 2 | +import router from '@ohos.router'; | ||
| 3 | + | ||
| 4 | +@Entry | ||
| 5 | +@Component | ||
| 6 | +struct OtherNormalUserHomePage { | ||
| 7 | + @State userId: string = "111111111"; | ||
| 8 | + | ||
| 9 | + onPageShow() { | ||
| 10 | + this.userId = router.getParams()?.["userId"] | ||
| 11 | + console.log("ycg","==="+this.userId); | ||
| 12 | + } | ||
| 13 | + build() { | ||
| 14 | + Column() { | ||
| 15 | + OtherUserHomeComponent({curUserId:this.userId}) | ||
| 16 | + } | ||
| 17 | + .height('100%') | ||
| 18 | + .width('100%') | ||
| 19 | + } | ||
| 20 | +} |
| @@ -10,6 +10,7 @@ | @@ -10,6 +10,7 @@ | ||
| 10 | "pages/AppointmentListPage", | 10 | "pages/AppointmentListPage", |
| 11 | "pages/SettingPasswordPage", | 11 | "pages/SettingPasswordPage", |
| 12 | "pages/FollowListPage", | 12 | "pages/FollowListPage", |
| 13 | - "pages/MyHomePage" | 13 | + "pages/MyHomePage", |
| 14 | + "pages/OtherNormalUserHomePage" | ||
| 14 | ] | 15 | ] |
| 15 | } | 16 | } |
| 1 | +{ | ||
| 2 | + "code": "0", | ||
| 3 | + "data": { | ||
| 4 | + "hasNext": 0, | ||
| 5 | + "list": [ | ||
| 6 | + { | ||
| 7 | + "avatarFrame": "", | ||
| 8 | + "checkStatus": 2, | ||
| 9 | + "commentContent": "方法就是\\ud83d\\udc4d", | ||
| 10 | + "commentContentSensitive": "", | ||
| 11 | + "commentLevel": 1, | ||
| 12 | + "commentPics": "", | ||
| 13 | + "commentSensitive": "", | ||
| 14 | + "commentType": "2", | ||
| 15 | + "createTime": "2024-02-19 14:14:16", | ||
| 16 | + "fromCreatorId": "", | ||
| 17 | + "fromDeviceId": "F0B98E7F-6479-462C-BA25-5FC574511C8A", | ||
| 18 | + "fromUserHeader": "https://sitcontentjdcdn.aikan.pdnews.cn/null20240127/1630371072/1706336907262.jpg?x-oss-process=image/resize,l_100/auto-orient,1/quality,q_90/format,jpg", | ||
| 19 | + "fromUserId": "512157124138245", | ||
| 20 | + "fromUserName": "树下🍑 1122334", | ||
| 21 | + "fromUserType": 1, | ||
| 22 | + "h5Url": "", | ||
| 23 | + "id": 403445, | ||
| 24 | + "keyArticle": 0, | ||
| 25 | + "likeNum": 3, | ||
| 26 | + "pageId": null, | ||
| 27 | + "parentCommentVo": null, | ||
| 28 | + "parentId": -1, | ||
| 29 | + "rootCommentId": 403445, | ||
| 30 | + "sensitiveExist": 0, | ||
| 31 | + "sensitiveShow": 1, | ||
| 32 | + "shareInfo": { | ||
| 33 | + "shareCoverUrl": "http://sitcontentjdcdn.aikan.pdnews.cn/zhbj-20231012/image/content/7f1a342a809d4276aa975ba9e7fe2313.png", | ||
| 34 | + "shareSummary": "这是一个开始、请持续关注这是一个开始、请持续关注这是一个开始、请持续关注这是一个开始、请持续关注这是", | ||
| 35 | + "shareTitle": "这是一个开始、请持续关注这是一个开始、请", | ||
| 36 | + "shareUrl": "https://pd-people-sit.pdnews.cn/column/30000633703-500000008559" | ||
| 37 | + }, | ||
| 38 | + "targetId": "30000633703", | ||
| 39 | + "targetRelId": "500000008559", | ||
| 40 | + "targetRelObjectId": "2002", | ||
| 41 | + "targetRelType": 1, | ||
| 42 | + "targetStatus": 0, | ||
| 43 | + "targetTitle": "这是一个开始、请持续关注这是一个开始、请持续关注这是一个开始、请持续关注这是一个开始、请持续关注这是一个开始、请持续关注这是一个开始、请持续关注这是一个开始、请持续关注", | ||
| 44 | + "targetType": 8, | ||
| 45 | + "topicType": null, | ||
| 46 | + "uuid": "5901a353-79aa-4b81-81d7-f6f13f0a6817" | ||
| 47 | + }, | ||
| 48 | + { | ||
| 49 | + "avatarFrame": "", | ||
| 50 | + "checkStatus": 2, | ||
| 51 | + "commentContent": "毕业", | ||
| 52 | + "commentContentSensitive": "", | ||
| 53 | + "commentLevel": 1, | ||
| 54 | + "commentPics": "", | ||
| 55 | + "commentSensitive": "", | ||
| 56 | + "commentType": "2", | ||
| 57 | + "createTime": "2024-01-29 17:39:04", | ||
| 58 | + "fromCreatorId": "", | ||
| 59 | + "fromDeviceId": "", | ||
| 60 | + "fromUserHeader": "https://sitcontentjdcdn.aikan.pdnews.cn/null20240127/1630371072/1706336907262.jpg?x-oss-process=image/resize,l_100/auto-orient,1/quality,q_90/format,jpg", | ||
| 61 | + "fromUserId": "512157124138245", | ||
| 62 | + "fromUserName": "树下🍑 1122334", | ||
| 63 | + "fromUserType": 1, | ||
| 64 | + "h5Url": "", | ||
| 65 | + "id": 303318, | ||
| 66 | + "keyArticle": 0, | ||
| 67 | + "likeNum": 0, | ||
| 68 | + "pageId": null, | ||
| 69 | + "parentCommentVo": null, | ||
| 70 | + "parentId": -1, | ||
| 71 | + "rootCommentId": 303318, | ||
| 72 | + "sensitiveExist": 0, | ||
| 73 | + "sensitiveShow": 1, | ||
| 74 | + "shareInfo": { | ||
| 75 | + "shareCoverUrl": "http://sitcontentjdcdn.aikan.pdnews.cn/zhbj-20230923/image/content/4b8f615d1b134546aa4903300c38fb5b.png", | ||
| 76 | + "shareSummary": "人民日报,有品质的新闻", | ||
| 77 | + "shareTitle": "【广东爱情故事】人在广东已经漂泊十年", | ||
| 78 | + "shareUrl": "https://pd-people-sit.pdnews.cn/column/30000627490-500000007811" | ||
| 79 | + }, | ||
| 80 | + "targetId": "30000627490", | ||
| 81 | + "targetRelId": "500000007811", | ||
| 82 | + "targetRelObjectId": "10000002083", | ||
| 83 | + "targetRelType": 2, | ||
| 84 | + "targetStatus": 0, | ||
| 85 | + "targetTitle": "【广东爱情故事】人在广东已经漂泊十年", | ||
| 86 | + "targetType": 13, | ||
| 87 | + "topicType": null, | ||
| 88 | + "uuid": "59339983-a9ee-4054-98aa-0eddbc6275a1" | ||
| 89 | + }, | ||
| 90 | + { | ||
| 91 | + "avatarFrame": "", | ||
| 92 | + "checkStatus": 2, | ||
| 93 | + "commentContent": "索尼👍", | ||
| 94 | + "commentContentSensitive": "", | ||
| 95 | + "commentLevel": 1, | ||
| 96 | + "commentPics": "", | ||
| 97 | + "commentSensitive": "", | ||
| 98 | + "commentType": "2", | ||
| 99 | + "createTime": "2024-01-29 17:38:56", | ||
| 100 | + "fromCreatorId": "", | ||
| 101 | + "fromDeviceId": "", | ||
| 102 | + "fromUserHeader": "https://sitcontentjdcdn.aikan.pdnews.cn/null20240127/1630371072/1706336907262.jpg?x-oss-process=image/resize,l_100/auto-orient,1/quality,q_90/format,jpg", | ||
| 103 | + "fromUserId": "512157124138245", | ||
| 104 | + "fromUserName": "树下🍑 1122334", | ||
| 105 | + "fromUserType": 1, | ||
| 106 | + "h5Url": "", | ||
| 107 | + "id": 303317, | ||
| 108 | + "keyArticle": 0, | ||
| 109 | + "likeNum": 0, | ||
| 110 | + "pageId": null, | ||
| 111 | + "parentCommentVo": null, | ||
| 112 | + "parentId": -1, | ||
| 113 | + "rootCommentId": 303317, | ||
| 114 | + "sensitiveExist": 0, | ||
| 115 | + "sensitiveShow": 1, | ||
| 116 | + "shareInfo": { | ||
| 117 | + "shareCoverUrl": "http://sitcontentjdcdn.aikan.pdnews.cn/zhbj-20230923/image/content/4b8f615d1b134546aa4903300c38fb5b.png", | ||
| 118 | + "shareSummary": "人民日报,有品质的新闻", | ||
| 119 | + "shareTitle": "【广东爱情故事】人在广东已经漂泊十年", | ||
| 120 | + "shareUrl": "https://pd-people-sit.pdnews.cn/column/30000627490-500000007811" | ||
| 121 | + }, | ||
| 122 | + "targetId": "30000627490", | ||
| 123 | + "targetRelId": "500000007811", | ||
| 124 | + "targetRelObjectId": "10000002083", | ||
| 125 | + "targetRelType": 2, | ||
| 126 | + "targetStatus": 0, | ||
| 127 | + "targetTitle": "【广东爱情故事】人在广东已经漂泊十年", | ||
| 128 | + "targetType": 13, | ||
| 129 | + "topicType": null, | ||
| 130 | + "uuid": "8808cffa-6496-4dc9-ac79-a65c8ada09d2" | ||
| 131 | + }, | ||
| 132 | + { | ||
| 133 | + "avatarFrame": "", | ||
| 134 | + "checkStatus": 2, | ||
| 135 | + "commentContent": "游客评论苹果", | ||
| 136 | + "commentContentSensitive": "", | ||
| 137 | + "commentLevel": 1, | ||
| 138 | + "commentPics": "", | ||
| 139 | + "commentSensitive": "", | ||
| 140 | + "commentType": "2", | ||
| 141 | + "createTime": "2024-01-27 15:00:24", | ||
| 142 | + "fromCreatorId": "", | ||
| 143 | + "fromDeviceId": "F0B98E7F-6479-462C-BA25-5FC574511C8A", | ||
| 144 | + "fromUserHeader": "https://sitcontentjdcdn.aikan.pdnews.cn/null20240127/1630371072/1706336907262.jpg?x-oss-process=image/resize,l_100/auto-orient,1/quality,q_90/format,jpg", | ||
| 145 | + "fromUserId": "512157124138245", | ||
| 146 | + "fromUserName": "树下🍑 1122334", | ||
| 147 | + "fromUserType": 1, | ||
| 148 | + "h5Url": "", | ||
| 149 | + "id": 403426, | ||
| 150 | + "keyArticle": 0, | ||
| 151 | + "likeNum": 1, | ||
| 152 | + "pageId": null, | ||
| 153 | + "parentCommentVo": null, | ||
| 154 | + "parentId": -1, | ||
| 155 | + "rootCommentId": 403426, | ||
| 156 | + "sensitiveExist": 0, | ||
| 157 | + "sensitiveShow": 1, | ||
| 158 | + "shareInfo": { | ||
| 159 | + "shareCoverUrl": "http://sitcontentjdcdn.aikan.pdnews.cn/zhbj-20231012/image/content/7f1a342a809d4276aa975ba9e7fe2313.png", | ||
| 160 | + "shareSummary": "这是一个开始、请持续关注这是一个开始、请持续关注这是一个开始、请持续关注这是一个开始、请持续关注这是", | ||
| 161 | + "shareTitle": "这是一个开始、请持续关注这是一个开始、请", | ||
| 162 | + "shareUrl": "https://pd-people-sit.pdnews.cn/column/30000633703-500000008559" | ||
| 163 | + }, | ||
| 164 | + "targetId": "30000633703", | ||
| 165 | + "targetRelId": "500000008559", | ||
| 166 | + "targetRelObjectId": "2002", | ||
| 167 | + "targetRelType": 1, | ||
| 168 | + "targetStatus": 0, | ||
| 169 | + "targetTitle": "这是一个开始、请持续关注这是一个开始、请持续关注这是一个开始、请持续关注这是一个开始、请持续关注这是一个开始、请持续关注这是一个开始、请持续关注这是一个开始、请持续关注", | ||
| 170 | + "targetType": 8, | ||
| 171 | + "topicType": null, | ||
| 172 | + "uuid": "a272d091-3697-44ca-95e6-532028eee776" | ||
| 173 | + }, | ||
| 174 | + { | ||
| 175 | + "avatarFrame": "", | ||
| 176 | + "checkStatus": 2, | ||
| 177 | + "commentContent": "游客账号评论安卓", | ||
| 178 | + "commentContentSensitive": "", | ||
| 179 | + "commentLevel": 1, | ||
| 180 | + "commentPics": "", | ||
| 181 | + "commentSensitive": "", | ||
| 182 | + "commentType": "2", | ||
| 183 | + "createTime": "2024-01-27 15:00:15", | ||
| 184 | + "fromCreatorId": "", | ||
| 185 | + "fromDeviceId": "23c43f15-37e9-3f2d-9999-bd1abbb7e0ed", | ||
| 186 | + "fromUserHeader": "https://sitcontentjdcdn.aikan.pdnews.cn/null20240127/1630371072/1706336907262.jpg?x-oss-process=image/resize,l_100/auto-orient,1/quality,q_90/format,jpg", | ||
| 187 | + "fromUserId": "512157124138245", | ||
| 188 | + "fromUserName": "树下🍑 1122334", | ||
| 189 | + "fromUserType": 1, | ||
| 190 | + "h5Url": "", | ||
| 191 | + "id": 403425, | ||
| 192 | + "keyArticle": 0, | ||
| 193 | + "likeNum": 0, | ||
| 194 | + "pageId": null, | ||
| 195 | + "parentCommentVo": null, | ||
| 196 | + "parentId": -1, | ||
| 197 | + "rootCommentId": 403425, | ||
| 198 | + "sensitiveExist": 0, | ||
| 199 | + "sensitiveShow": 1, | ||
| 200 | + "shareInfo": { | ||
| 201 | + "shareCoverUrl": "http://sitcontentjdcdn.aikan.pdnews.cn/zhbj-20231012/image/content/7f1a342a809d4276aa975ba9e7fe2313.png", | ||
| 202 | + "shareSummary": "这是一个开始、请持续关注这是一个开始、请持续关注这是一个开始、请持续关注这是一个开始、请持续关注这是", | ||
| 203 | + "shareTitle": "这是一个开始、请持续关注这是一个开始、请", | ||
| 204 | + "shareUrl": "https://pd-people-sit.pdnews.cn/column/30000633703-500000008559" | ||
| 205 | + }, | ||
| 206 | + "targetId": "30000633703", | ||
| 207 | + "targetRelId": "500000008559", | ||
| 208 | + "targetRelObjectId": "2002", | ||
| 209 | + "targetRelType": 1, | ||
| 210 | + "targetStatus": 0, | ||
| 211 | + "targetTitle": "这是一个开始、请持续关注这是一个开始、请持续关注这是一个开始、请持续关注这是一个开始、请持续关注这是一个开始、请持续关注这是一个开始、请持续关注这是一个开始、请持续关注", | ||
| 212 | + "targetType": 8, | ||
| 213 | + "topicType": null, | ||
| 214 | + "uuid": "62225e7a-9afd-4b8c-b9b6-71a5d610997d" | ||
| 215 | + }, | ||
| 216 | + { | ||
| 217 | + "avatarFrame": "", | ||
| 218 | + "checkStatus": 2, | ||
| 219 | + "commentContent": "你理解吗", | ||
| 220 | + "commentContentSensitive": "", | ||
| 221 | + "commentLevel": 1, | ||
| 222 | + "commentPics": "", | ||
| 223 | + "commentSensitive": "", | ||
| 224 | + "commentType": "2", | ||
| 225 | + "createTime": "2024-01-27 14:45:21", | ||
| 226 | + "fromCreatorId": "", | ||
| 227 | + "fromDeviceId": "23c43f15-37e9-3f2d-9999-bd1abbb7e0ed", | ||
| 228 | + "fromUserHeader": "https://sitcontentjdcdn.aikan.pdnews.cn/null20240127/1630371072/1706336907262.jpg?x-oss-process=image/resize,l_100/auto-orient,1/quality,q_90/format,jpg", | ||
| 229 | + "fromUserId": "512157124138245", | ||
| 230 | + "fromUserName": "树下🍑 1122334", | ||
| 231 | + "fromUserType": 1, | ||
| 232 | + "h5Url": "", | ||
| 233 | + "id": 403422, | ||
| 234 | + "keyArticle": 0, | ||
| 235 | + "likeNum": 0, | ||
| 236 | + "pageId": null, | ||
| 237 | + "parentCommentVo": null, | ||
| 238 | + "parentId": -1, | ||
| 239 | + "rootCommentId": 403422, | ||
| 240 | + "sensitiveExist": 0, | ||
| 241 | + "sensitiveShow": 1, | ||
| 242 | + "shareInfo": { | ||
| 243 | + "shareCoverUrl": "http://sitcontentjdcdn.aikan.pdnews.cn/zhbj-20231130/image/content/09ee931569d34781b9bbe85f5348873f.jpg", | ||
| 244 | + "shareSummary": "人民日报,有品质的新闻", | ||
| 245 | + "shareTitle": "点亮香港“小航天迷”的“太空梦”——内地航天专家走进香港中小学校园", | ||
| 246 | + "shareUrl": "https://pd-people-sit.pdnews.cn/rmhphotos/30000650925" | ||
| 247 | + }, | ||
| 248 | + "targetId": "30000650925", | ||
| 249 | + "targetRelId": "500000013228", | ||
| 250 | + "targetRelObjectId": "2058", | ||
| 251 | + "targetRelType": 1, | ||
| 252 | + "targetStatus": 0, | ||
| 253 | + "targetTitle": "点亮香港“小航天迷”的“太空梦”——内地航天专家走进香港中小学校园", | ||
| 254 | + "targetType": 9, | ||
| 255 | + "topicType": null, | ||
| 256 | + "uuid": "cc6b2322-ffa4-4a59-a7af-5e4a18afcbd3" | ||
| 257 | + }, | ||
| 258 | + { | ||
| 259 | + "avatarFrame": "", | ||
| 260 | + "checkStatus": 2, | ||
| 261 | + "commentContent": "你好我是游客", | ||
| 262 | + "commentContentSensitive": "", | ||
| 263 | + "commentLevel": 1, | ||
| 264 | + "commentPics": "", | ||
| 265 | + "commentSensitive": "", | ||
| 266 | + "commentType": "2", | ||
| 267 | + "createTime": "2024-01-27 14:40:19", | ||
| 268 | + "fromCreatorId": "", | ||
| 269 | + "fromDeviceId": "23c43f15-37e9-3f2d-9999-bd1abbb7e0ed", | ||
| 270 | + "fromUserHeader": "https://sitcontentjdcdn.aikan.pdnews.cn/null20240127/1630371072/1706336907262.jpg?x-oss-process=image/resize,l_100/auto-orient,1/quality,q_90/format,jpg", | ||
| 271 | + "fromUserId": "512157124138245", | ||
| 272 | + "fromUserName": "树下🍑 1122334", | ||
| 273 | + "fromUserType": 1, | ||
| 274 | + "h5Url": "", | ||
| 275 | + "id": 303306, | ||
| 276 | + "keyArticle": 0, | ||
| 277 | + "likeNum": 0, | ||
| 278 | + "pageId": null, | ||
| 279 | + "parentCommentVo": null, | ||
| 280 | + "parentId": -1, | ||
| 281 | + "rootCommentId": 303306, | ||
| 282 | + "sensitiveExist": 0, | ||
| 283 | + "sensitiveShow": 1, | ||
| 284 | + "shareInfo": { | ||
| 285 | + "shareCoverUrl": "http://sitcontentjdcdn.aikan.pdnews.cn/zhbj-20231130/image/content/09ee931569d34781b9bbe85f5348873f.jpg", | ||
| 286 | + "shareSummary": "人民日报,有品质的新闻", | ||
| 287 | + "shareTitle": "点亮香港“小航天迷”的“太空梦”——内地航天专家走进香港中小学校园", | ||
| 288 | + "shareUrl": "https://pd-people-sit.pdnews.cn/rmhphotos/30000650925" | ||
| 289 | + }, | ||
| 290 | + "targetId": "30000650925", | ||
| 291 | + "targetRelId": "500000013228", | ||
| 292 | + "targetRelObjectId": "2058", | ||
| 293 | + "targetRelType": 1, | ||
| 294 | + "targetStatus": 0, | ||
| 295 | + "targetTitle": "点亮香港“小航天迷”的“太空梦”——内地航天专家走进香港中小学校园", | ||
| 296 | + "targetType": 9, | ||
| 297 | + "topicType": null, | ||
| 298 | + "uuid": "9fac53da-603f-444a-8807-4f5feacf55bb" | ||
| 299 | + }, | ||
| 300 | + { | ||
| 301 | + "avatarFrame": "", | ||
| 302 | + "checkStatus": 2, | ||
| 303 | + "commentContent": "你好我是游客", | ||
| 304 | + "commentContentSensitive": "", | ||
| 305 | + "commentLevel": 1, | ||
| 306 | + "commentPics": "", | ||
| 307 | + "commentSensitive": "", | ||
| 308 | + "commentType": "2", | ||
| 309 | + "createTime": "2024-01-27 14:34:30", | ||
| 310 | + "fromCreatorId": "", | ||
| 311 | + "fromDeviceId": "23c43f15-37e9-3f2d-9999-bd1abbb7e0ed", | ||
| 312 | + "fromUserHeader": "https://sitcontentjdcdn.aikan.pdnews.cn/null20240127/1630371072/1706336907262.jpg?x-oss-process=image/resize,l_100/auto-orient,1/quality,q_90/format,jpg", | ||
| 313 | + "fromUserId": "512157124138245", | ||
| 314 | + "fromUserName": "树下🍑 1122334", | ||
| 315 | + "fromUserType": 1, | ||
| 316 | + "h5Url": "", | ||
| 317 | + "id": 403420, | ||
| 318 | + "keyArticle": 0, | ||
| 319 | + "likeNum": 0, | ||
| 320 | + "pageId": null, | ||
| 321 | + "parentCommentVo": null, | ||
| 322 | + "parentId": -1, | ||
| 323 | + "rootCommentId": 403420, | ||
| 324 | + "sensitiveExist": 0, | ||
| 325 | + "sensitiveShow": 1, | ||
| 326 | + "shareInfo": { | ||
| 327 | + "shareCoverUrl": "http://sitcontentjdcdn.aikan.pdnews.cn/image/creator/2024012911/f2f9fe93ca464d05bc0407a385ad877b.png", | ||
| 328 | + "shareSummary": "爸爸角色扮演医生,在宝蓝比赛摔倒的时候悉心照顾,其他小朋友也要注意呀!", | ||
| 329 | + "shareTitle": "爸爸角色扮演医生,在宝蓝比赛摔倒的时候悉心照顾,其他小朋友也要注意呀!", | ||
| 330 | + "shareUrl": "https://pd-people-sit.pdnews.cn/rmhvideo/30000716043" | ||
| 331 | + }, | ||
| 332 | + "targetId": "30000716043", | ||
| 333 | + "targetRelId": "500000030952", | ||
| 334 | + "targetRelObjectId": "2058", | ||
| 335 | + "targetRelType": 1, | ||
| 336 | + "targetStatus": 0, | ||
| 337 | + "targetTitle": "爸爸角色扮演医生,在宝蓝比赛摔倒的时候悉心照顾,其他小朋友也要注意呀!", | ||
| 338 | + "targetType": 1, | ||
| 339 | + "topicType": null, | ||
| 340 | + "uuid": "31305151-6b9c-49ea-8e5b-9e4b8fffe79d" | ||
| 341 | + }, | ||
| 342 | + { | ||
| 343 | + "avatarFrame": "", | ||
| 344 | + "checkStatus": 2, | ||
| 345 | + "commentContent": "游客账号", | ||
| 346 | + "commentContentSensitive": "", | ||
| 347 | + "commentLevel": 1, | ||
| 348 | + "commentPics": "", | ||
| 349 | + "commentSensitive": "", | ||
| 350 | + "commentType": "2", | ||
| 351 | + "createTime": "2024-01-27 14:27:52", | ||
| 352 | + "fromCreatorId": "", | ||
| 353 | + "fromDeviceId": "23c43f15-37e9-3f2d-9999-bd1abbb7e0ed", | ||
| 354 | + "fromUserHeader": "https://sitcontentjdcdn.aikan.pdnews.cn/null20240127/1630371072/1706336907262.jpg?x-oss-process=image/resize,l_100/auto-orient,1/quality,q_90/format,jpg", | ||
| 355 | + "fromUserId": "512157124138245", | ||
| 356 | + "fromUserName": "树下🍑 1122334", | ||
| 357 | + "fromUserType": 1, | ||
| 358 | + "h5Url": "", | ||
| 359 | + "id": 403417, | ||
| 360 | + "keyArticle": 0, | ||
| 361 | + "likeNum": 0, | ||
| 362 | + "pageId": null, | ||
| 363 | + "parentCommentVo": null, | ||
| 364 | + "parentId": -1, | ||
| 365 | + "rootCommentId": 403417, | ||
| 366 | + "sensitiveExist": 0, | ||
| 367 | + "sensitiveShow": 1, | ||
| 368 | + "shareInfo": { | ||
| 369 | + "shareCoverUrl": "", | ||
| 370 | + "shareSummary": "人民日报,有品质的新闻", | ||
| 371 | + "shareTitle": "跟着习主席看世界|同舟共济 打造人类卫生健康共同体", | ||
| 372 | + "shareUrl": "https://pd-people-sit.pdnews.cn/column/30000628337-500000004210" | ||
| 373 | + }, | ||
| 374 | + "targetId": "30000628337", | ||
| 375 | + "targetRelId": "500000004210", | ||
| 376 | + "targetRelObjectId": "2002", | ||
| 377 | + "targetRelType": 1, | ||
| 378 | + "targetStatus": 0, | ||
| 379 | + "targetTitle": "跟着习主席看世界|同舟共济 打造人类卫生健康共同体", | ||
| 380 | + "targetType": 8, | ||
| 381 | + "topicType": null, | ||
| 382 | + "uuid": "034911cc-34ca-4209-add2-46f48f4b2104" | ||
| 383 | + }, | ||
| 384 | + { | ||
| 385 | + "avatarFrame": "", | ||
| 386 | + "checkStatus": 2, | ||
| 387 | + "commentContent": "我是游客", | ||
| 388 | + "commentContentSensitive": "", | ||
| 389 | + "commentLevel": 1, | ||
| 390 | + "commentPics": "", | ||
| 391 | + "commentSensitive": "", | ||
| 392 | + "commentType": "2", | ||
| 393 | + "createTime": "2024-01-27 14:25:34", | ||
| 394 | + "fromCreatorId": "", | ||
| 395 | + "fromDeviceId": "F0B98E7F-6479-462C-BA25-5FC574511C8A", | ||
| 396 | + "fromUserHeader": "https://sitcontentjdcdn.aikan.pdnews.cn/null20240127/1630371072/1706336907262.jpg?x-oss-process=image/resize,l_100/auto-orient,1/quality,q_90/format,jpg", | ||
| 397 | + "fromUserId": "512157124138245", | ||
| 398 | + "fromUserName": "树下🍑 1122334", | ||
| 399 | + "fromUserType": 1, | ||
| 400 | + "h5Url": "", | ||
| 401 | + "id": 303305, | ||
| 402 | + "keyArticle": 0, | ||
| 403 | + "likeNum": 0, | ||
| 404 | + "pageId": null, | ||
| 405 | + "parentCommentVo": null, | ||
| 406 | + "parentId": -1, | ||
| 407 | + "rootCommentId": 303305, | ||
| 408 | + "sensitiveExist": 0, | ||
| 409 | + "sensitiveShow": 1, | ||
| 410 | + "shareInfo": { | ||
| 411 | + "shareCoverUrl": "http://sitcontentjdcdn.aikan.pdnews.cn/zhbj-20240127/image/content/e8d93872483a48c7a4eaa48f70211ab1.png", | ||
| 412 | + "shareSummary": "人民日报,有品质的新闻", | ||
| 413 | + "shareTitle": "“大学也有家长群", | ||
| 414 | + "shareUrl": "https://pd-people-sit.pdnews.cn/column/30000723442-500000031275" | ||
| 415 | + }, | ||
| 416 | + "targetId": "30000723442", | ||
| 417 | + "targetRelId": "500000031275", | ||
| 418 | + "targetRelObjectId": "2002", | ||
| 419 | + "targetRelType": 1, | ||
| 420 | + "targetStatus": 0, | ||
| 421 | + "targetTitle": "“大学也有家长群", | ||
| 422 | + "targetType": 8, | ||
| 423 | + "topicType": null, | ||
| 424 | + "uuid": "0b0aa5ef-b2de-4d01-9f5a-274c5122560f" | ||
| 425 | + }, | ||
| 426 | + { | ||
| 427 | + "avatarFrame": "", | ||
| 428 | + "checkStatus": 2, | ||
| 429 | + "commentContent": "你好,我是游客动态", | ||
| 430 | + "commentContentSensitive": "", | ||
| 431 | + "commentLevel": 1, | ||
| 432 | + "commentPics": "", | ||
| 433 | + "commentSensitive": "", | ||
| 434 | + "commentType": "2", | ||
| 435 | + "createTime": "2024-01-27 14:24:56", | ||
| 436 | + "fromCreatorId": "", | ||
| 437 | + "fromDeviceId": "23c43f15-37e9-3f2d-9999-bd1abbb7e0ed", | ||
| 438 | + "fromUserHeader": "https://sitcontentjdcdn.aikan.pdnews.cn/null20240127/1630371072/1706336907262.jpg?x-oss-process=image/resize,l_100/auto-orient,1/quality,q_90/format,jpg", | ||
| 439 | + "fromUserId": "512157124138245", | ||
| 440 | + "fromUserName": "树下🍑 1122334", | ||
| 441 | + "fromUserType": 1, | ||
| 442 | + "h5Url": "", | ||
| 443 | + "id": 303304, | ||
| 444 | + "keyArticle": 0, | ||
| 445 | + "likeNum": 0, | ||
| 446 | + "pageId": null, | ||
| 447 | + "parentCommentVo": null, | ||
| 448 | + "parentId": -1, | ||
| 449 | + "rootCommentId": 303304, | ||
| 450 | + "sensitiveExist": 0, | ||
| 451 | + "sensitiveShow": 1, | ||
| 452 | + "shareInfo": { | ||
| 453 | + "shareCoverUrl": "http://sitcontentjdcdn.aikan.pdnews.cn/zhbj-20231130/image/content/3e0cce06724740f0807ff0731c4a1d03/C4BC1C53-2B9C-4A54-BF95-044242D78260.jpg", | ||
| 454 | + "shareSummary": "发布动态带活动13", | ||
| 455 | + "shareTitle": "发布动态带活动13", | ||
| 456 | + "shareUrl": "https://pd-people-sit.pdnews.cn/rmhmoments/30000650969" | ||
| 457 | + }, | ||
| 458 | + "targetId": "30000650969", | ||
| 459 | + "targetRelId": "500000013237", | ||
| 460 | + "targetRelObjectId": "2058", | ||
| 461 | + "targetRelType": 1, | ||
| 462 | + "targetStatus": 0, | ||
| 463 | + "targetTitle": "发布动态带活动13", | ||
| 464 | + "targetType": 14, | ||
| 465 | + "topicType": null, | ||
| 466 | + "uuid": "ae2b2ece-d036-4b01-91e7-9708b0b5fe1c" | ||
| 467 | + }, | ||
| 468 | + { | ||
| 469 | + "avatarFrame": "", | ||
| 470 | + "checkStatus": 2, | ||
| 471 | + "commentContent": "你好我是游客", | ||
| 472 | + "commentContentSensitive": "", | ||
| 473 | + "commentLevel": 1, | ||
| 474 | + "commentPics": "", | ||
| 475 | + "commentSensitive": "", | ||
| 476 | + "commentType": "2", | ||
| 477 | + "createTime": "2024-01-27 14:24:19", | ||
| 478 | + "fromCreatorId": "", | ||
| 479 | + "fromDeviceId": "23c43f15-37e9-3f2d-9999-bd1abbb7e0ed", | ||
| 480 | + "fromUserHeader": "https://sitcontentjdcdn.aikan.pdnews.cn/null20240127/1630371072/1706336907262.jpg?x-oss-process=image/resize,l_100/auto-orient,1/quality,q_90/format,jpg", | ||
| 481 | + "fromUserId": "512157124138245", | ||
| 482 | + "fromUserName": "树下🍑 1122334", | ||
| 483 | + "fromUserType": 1, | ||
| 484 | + "h5Url": "", | ||
| 485 | + "id": 303302, | ||
| 486 | + "keyArticle": 0, | ||
| 487 | + "likeNum": 0, | ||
| 488 | + "pageId": null, | ||
| 489 | + "parentCommentVo": null, | ||
| 490 | + "parentId": -1, | ||
| 491 | + "rootCommentId": 303302, | ||
| 492 | + "sensitiveExist": 0, | ||
| 493 | + "sensitiveShow": 1, | ||
| 494 | + "shareInfo": { | ||
| 495 | + "shareCoverUrl": "http://sitcontentjdcdn.aikan.pdnews.cn/zhbj-20240127/image/content/e8d93872483a48c7a4eaa48f70211ab1.png", | ||
| 496 | + "shareSummary": "人民日报,有品质的新闻", | ||
| 497 | + "shareTitle": "“大学也有家长群", | ||
| 498 | + "shareUrl": "https://pd-people-sit.pdnews.cn/column/30000723442-500000031275" | ||
| 499 | + }, | ||
| 500 | + "targetId": "30000723442", | ||
| 501 | + "targetRelId": "500000031275", | ||
| 502 | + "targetRelObjectId": "2002", | ||
| 503 | + "targetRelType": 1, | ||
| 504 | + "targetStatus": 0, | ||
| 505 | + "targetTitle": "“大学也有家长群", | ||
| 506 | + "targetType": 8, | ||
| 507 | + "topicType": null, | ||
| 508 | + "uuid": "766a6bac-aa1d-4e88-a798-f19bade201ee" | ||
| 509 | + } | ||
| 510 | + ], | ||
| 511 | + "pageNum": 1, | ||
| 512 | + "pageSize": 20, | ||
| 513 | + "totalCommentNum": 12, | ||
| 514 | + "totalCount": 12 | ||
| 515 | + }, | ||
| 516 | + "message": "Success", | ||
| 517 | + "meta": null, | ||
| 518 | + "requestId": "", | ||
| 519 | + "success": true, | ||
| 520 | + "timestamp": 1711440876958 | ||
| 521 | +} |
| 1 | +{ | ||
| 2 | + "code": "0", | ||
| 3 | + "data": [ | ||
| 4 | + { | ||
| 5 | + "commentId": 403445, | ||
| 6 | + "status": 1 | ||
| 7 | + }, | ||
| 8 | + { | ||
| 9 | + "commentId": 303318, | ||
| 10 | + "status": 0 | ||
| 11 | + }, | ||
| 12 | + { | ||
| 13 | + "commentId": 303317, | ||
| 14 | + "status": 0 | ||
| 15 | + }, | ||
| 16 | + { | ||
| 17 | + "commentId": 403426, | ||
| 18 | + "status": 1 | ||
| 19 | + }, | ||
| 20 | + { | ||
| 21 | + "commentId": 403425, | ||
| 22 | + "status": 0 | ||
| 23 | + }, | ||
| 24 | + { | ||
| 25 | + "commentId": 403422, | ||
| 26 | + "status": 0 | ||
| 27 | + }, | ||
| 28 | + { | ||
| 29 | + "commentId": 303306, | ||
| 30 | + "status": 0 | ||
| 31 | + }, | ||
| 32 | + { | ||
| 33 | + "commentId": 403420, | ||
| 34 | + "status": 0 | ||
| 35 | + }, | ||
| 36 | + { | ||
| 37 | + "commentId": 403417, | ||
| 38 | + "status": 0 | ||
| 39 | + }, | ||
| 40 | + { | ||
| 41 | + "commentId": 303305, | ||
| 42 | + "status": 0 | ||
| 43 | + }, | ||
| 44 | + { | ||
| 45 | + "commentId": 303304, | ||
| 46 | + "status": 0 | ||
| 47 | + }, | ||
| 48 | + { | ||
| 49 | + "commentId": 303302, | ||
| 50 | + "status": 0 | ||
| 51 | + } | ||
| 52 | + ], | ||
| 53 | + "message": "Success", | ||
| 54 | + "meta": null, | ||
| 55 | + "requestId": "", | ||
| 56 | + "success": true, | ||
| 57 | + "timestamp": 1711440877105 | ||
| 58 | +} |
PeopleDaily_Harmony/entry/src/main/resources/rawfile/other_user512157124138245_detail.json
0 → 100644
| 1 | +{ | ||
| 2 | + "code": "0", | ||
| 3 | + "data": { | ||
| 4 | + "articleCreation": 0, | ||
| 5 | + "attentionNum": 1, | ||
| 6 | + "authIcon": "", | ||
| 7 | + "authId": 0, | ||
| 8 | + "authPersonal": "", | ||
| 9 | + "authTitle": "", | ||
| 10 | + "avatarFrame": "", | ||
| 11 | + "banControl": 0, | ||
| 12 | + "browseNum": 76, | ||
| 13 | + "categoryAuth": "", | ||
| 14 | + "city": "", | ||
| 15 | + "cnContentPublish": 0, | ||
| 16 | + "cnIsComment": 0, | ||
| 17 | + "cnIsLike": 0, | ||
| 18 | + "cnLiveCommentControl": 0, | ||
| 19 | + "cnLiveGiftControl": 0, | ||
| 20 | + "cnLiveLikeControl": 0, | ||
| 21 | + "cnLivePublish": 0, | ||
| 22 | + "cnLiveShareControl": 0, | ||
| 23 | + "cnShareControl": 0, | ||
| 24 | + "contentPublish": 0, | ||
| 25 | + "creatorId": "", | ||
| 26 | + "district": "", | ||
| 27 | + "dynamicControl": 0, | ||
| 28 | + "dynamicCreation": 0, | ||
| 29 | + "fansNum": 0, | ||
| 30 | + "headPhotoUrl": "https://sitcontentjdcdn.aikan.pdnews.cn/null20240127/1630371072/1706336907262.jpg", | ||
| 31 | + "honoraryIcon": "", | ||
| 32 | + "honoraryTitle": "", | ||
| 33 | + "introduction": "", | ||
| 34 | + "isAttention": 0, | ||
| 35 | + "isComment": 0, | ||
| 36 | + "isLike": 0, | ||
| 37 | + "liveCommentControl": 0, | ||
| 38 | + "liveGiftControl": 0, | ||
| 39 | + "liveLikeControl": 0, | ||
| 40 | + "livePublish": 0, | ||
| 41 | + "liveShareControl": 0, | ||
| 42 | + "liveSwitch": 0, | ||
| 43 | + "mainControl": 1, | ||
| 44 | + "originUserId": "", | ||
| 45 | + "pictureCollectionCreation": 0, | ||
| 46 | + "posterShareControl": 1, | ||
| 47 | + "province": "", | ||
| 48 | + "region": "安徽省", | ||
| 49 | + "registTime": 1703485580000, | ||
| 50 | + "shareControl": 0, | ||
| 51 | + "shareUrl": "", | ||
| 52 | + "subjectType": 0, | ||
| 53 | + "userId": "512157124138245", | ||
| 54 | + "userName": "树下🍑 1122334", | ||
| 55 | + "userType": "1", | ||
| 56 | + "videoCollectionCreation": 0, | ||
| 57 | + "videoCreation": 0 | ||
| 58 | + }, | ||
| 59 | + "message": "Success", | ||
| 60 | + "meta": null, | ||
| 61 | + "requestId": "", | ||
| 62 | + "success": true, | ||
| 63 | + "timestamp": 1711440875633 | ||
| 64 | +} |
PeopleDaily_Harmony/entry/src/main/resources/rawfile/other_user512157124138245_level.json
0 → 100644
| 1 | +{ | ||
| 2 | + "code": "0", | ||
| 3 | + "data": [ | ||
| 4 | + { | ||
| 5 | + "level": 2, | ||
| 6 | + "levelHead": "http://rmrb-video-content-sit.oss-cn-beijing.aliyuncs.com/sjbj-20240125/image/display/88c45bf56ac941b883c69bd8ed373164.png", | ||
| 7 | + "userId": 512157124138245 | ||
| 8 | + } | ||
| 9 | + ], | ||
| 10 | + "message": "Success", | ||
| 11 | + "success": true, | ||
| 12 | + "timestamp": 1711440876088 | ||
| 13 | +} |
| 1 | +{ | ||
| 2 | + "code": "0", | ||
| 3 | + "data": { | ||
| 4 | + "hasNext": 0, | ||
| 5 | + "list": [ | ||
| 6 | + { | ||
| 7 | + "attentionCreatorId": "3259284", | ||
| 8 | + "attentionHeadPhotoUrl": "https://sitcontentjdcdn.aikan.pdnews.cn/vod/content/202401/20240127161739536/eUj.png?x-oss-process=image/resize,l_400/auto-orient,1/quality,q_90/format,jpg", | ||
| 9 | + "attentionNum": 0, | ||
| 10 | + "attentionUserId": "535571576006021", | ||
| 11 | + "attentionUserName": "斯特的7778", | ||
| 12 | + "attentionUserType": 2, | ||
| 13 | + "authIcon": "", | ||
| 14 | + "authId": 0, | ||
| 15 | + "authPersional": "", | ||
| 16 | + "authTitle": "", | ||
| 17 | + "banControl": 0, | ||
| 18 | + "categoryAuth": "", | ||
| 19 | + "cnLiveCommentControl": 1, | ||
| 20 | + "cnLiveGiftControl": 1, | ||
| 21 | + "cnLiveLikeControl": 1, | ||
| 22 | + "cnLiveShareControl": 1, | ||
| 23 | + "cnShareControl": 1, | ||
| 24 | + "collectNum": 1, | ||
| 25 | + "commentNum": 0, | ||
| 26 | + "createTime": 1706344099000, | ||
| 27 | + "fansNum": 1, | ||
| 28 | + "honoraryIcon": "", | ||
| 29 | + "honoraryTitle": "", | ||
| 30 | + "id": 100703, | ||
| 31 | + "introduction": "暗黑世界顶级", | ||
| 32 | + "isAttention": 0, | ||
| 33 | + "isComment": 1, | ||
| 34 | + "isLike": 1, | ||
| 35 | + "isVisiable": 1, | ||
| 36 | + "likeNum": 0, | ||
| 37 | + "liveCommentControl": 1, | ||
| 38 | + "liveGiftControl": 1, | ||
| 39 | + "liveLikeControl": 1, | ||
| 40 | + "liveShareControl": 1, | ||
| 41 | + "mainControl": 1, | ||
| 42 | + "posterShareControl": 0, | ||
| 43 | + "registTime": 1706343790000, | ||
| 44 | + "shareControl": 1, | ||
| 45 | + "shareNum": 7, | ||
| 46 | + "status": 1, | ||
| 47 | + "subjectType": null, | ||
| 48 | + "updateTime": 1706344099000, | ||
| 49 | + "userId": "512157124138245", | ||
| 50 | + "userType": 1 | ||
| 51 | + } | ||
| 52 | + ], | ||
| 53 | + "pageNum": 1, | ||
| 54 | + "pageSize": 20, | ||
| 55 | + "totalCount": 1 | ||
| 56 | + }, | ||
| 57 | + "message": "Success", | ||
| 58 | + "meta": null, | ||
| 59 | + "requestId": "", | ||
| 60 | + "success": true, | ||
| 61 | + "timestamp": 1711441048304 | ||
| 62 | +} |
| @@ -42,4 +42,6 @@ export { SettingPasswordLayout } from "./components/page/SettingPasswordLayout" | @@ -42,4 +42,6 @@ export { SettingPasswordLayout } from "./components/page/SettingPasswordLayout" | ||
| 42 | 42 | ||
| 43 | export { FollowFirstTabsComponent } from "./components/page/mine/follow/FollowFirstTabsComponent" | 43 | export { FollowFirstTabsComponent } from "./components/page/mine/follow/FollowFirstTabsComponent" |
| 44 | 44 | ||
| 45 | -export { MyHomeComponent } from "./components/page/mine/MyHomeComponent" | 45 | +export { MyHomeComponent } from "./components/page/mine/home/MyHomeComponent" |
| 46 | + | ||
| 47 | +export { OtherUserHomeComponent } from "./components/page/mine/home/OtherUserHomeComponent" |
| 1 | import { LazyDataSource, StringUtils } from 'wdKit'; | 1 | import { LazyDataSource, StringUtils } from 'wdKit'; |
| 2 | import MinePageDatasModel from '../../../../model/MinePageDatasModel'; | 2 | import MinePageDatasModel from '../../../../model/MinePageDatasModel'; |
| 3 | +import { Params } from '../../../../repository/bean/Params'; | ||
| 4 | +import RouteManager from '../../../../utils/RouteManager'; | ||
| 3 | import { FollowListDetailItem } from '../../../../viewmodel/FollowListDetailItem' | 5 | import { FollowListDetailItem } from '../../../../viewmodel/FollowListDetailItem' |
| 4 | import { FollowListDetailRequestItem } from '../../../../viewmodel/FollowListDetailRequestItem'; | 6 | import { FollowListDetailRequestItem } from '../../../../viewmodel/FollowListDetailRequestItem'; |
| 5 | import { FollowListStatusRequestItem } from '../../../../viewmodel/FollowListStatusRequestItem'; | 7 | import { FollowListStatusRequestItem } from '../../../../viewmodel/FollowListStatusRequestItem'; |
| 6 | import { MineFollowListDetailItem } from '../../../../viewmodel/MineFollowListDetailItem'; | 8 | import { MineFollowListDetailItem } from '../../../../viewmodel/MineFollowListDetailItem'; |
| 7 | import { QueryListIsFollowedItem } from '../../../../viewmodel/QueryListIsFollowedItem'; | 9 | import { QueryListIsFollowedItem } from '../../../../viewmodel/QueryListIsFollowedItem'; |
| 10 | +import { RouterObject } from '../../../../viewmodel/RouterObject'; | ||
| 8 | import { ListHasNoMoreDataUI } from '../../../reusable/ListHasNoMoreDataUI'; | 11 | import { ListHasNoMoreDataUI } from '../../../reusable/ListHasNoMoreDataUI'; |
| 9 | 12 | ||
| 10 | const TAG = "FollowListDetailUI" | 13 | const TAG = "FollowListDetailUI" |
| @@ -72,7 +75,7 @@ export struct FollowListDetailUI{ | @@ -72,7 +75,7 @@ export struct FollowListDetailUI{ | ||
| 72 | this.hasMore = false | 75 | this.hasMore = false |
| 73 | }else{ | 76 | }else{ |
| 74 | value.list.forEach((value)=>{ | 77 | value.list.forEach((value)=>{ |
| 75 | - this.data.push(new FollowListDetailItem(value.attentionHeadPhotoUrl,value.attentionUserName,value.fansNum,value.introduction,value.attentionCreatorId,"1")) | 78 | + this.data.push(new FollowListDetailItem(value.attentionHeadPhotoUrl,value.attentionUserName,value.fansNum,value.introduction,value.attentionCreatorId,"1",value.attentionUserId)) |
| 76 | }) | 79 | }) |
| 77 | this.data.notifyDataReload() | 80 | this.data.notifyDataReload() |
| 78 | this.count = this.data.totalCount() | 81 | this.count = this.data.totalCount() |
| @@ -90,9 +93,6 @@ export struct FollowListDetailUI{ | @@ -90,9 +93,6 @@ export struct FollowListDetailUI{ | ||
| 90 | } | 93 | } |
| 91 | }else{ | 94 | }else{ |
| 92 | if(this.hasMore){ | 95 | if(this.hasMore){ |
| 93 | - if(this.creatorDirectoryId === 120){ | ||
| 94 | - console.log("console"); | ||
| 95 | - } | ||
| 96 | let object = new FollowListDetailRequestItem(this.creatorDirectoryId,20,this.curPageNum) | 96 | let object = new FollowListDetailRequestItem(this.creatorDirectoryId,20,this.curPageNum) |
| 97 | 97 | ||
| 98 | MinePageDatasModel.getFollowListDetailData(object,getContext(this)).then((value)=>{ | 98 | MinePageDatasModel.getFollowListDetailData(object,getContext(this)).then((value)=>{ |
| @@ -115,7 +115,7 @@ export struct FollowListDetailUI{ | @@ -115,7 +115,7 @@ export struct FollowListDetailUI{ | ||
| 115 | let data : FollowListDetailItem[] = [] | 115 | let data : FollowListDetailItem[] = [] |
| 116 | value.list.forEach((item)=>{ | 116 | value.list.forEach((item)=>{ |
| 117 | status.creatorIds.push(new QueryListIsFollowedItem(item.creatorId)) | 117 | status.creatorIds.push(new QueryListIsFollowedItem(item.creatorId)) |
| 118 | - data.push(new FollowListDetailItem(item.headPhotoUrl,item.cnUserName,item.cnFansNum,item.introduction,item.creatorId,"0")) | 118 | + data.push(new FollowListDetailItem(item.headPhotoUrl,item.cnUserName,item.cnFansNum,item.introduction,item.creatorId,"0",item.attentionUserId)) |
| 119 | }) | 119 | }) |
| 120 | 120 | ||
| 121 | MinePageDatasModel.getFollowListStatusData(status,getContext(this)).then((newValue)=>{ | 121 | MinePageDatasModel.getFollowListStatusData(status,getContext(this)).then((newValue)=>{ |
| @@ -128,7 +128,7 @@ export struct FollowListDetailUI{ | @@ -128,7 +128,7 @@ export struct FollowListDetailUI{ | ||
| 128 | }) | 128 | }) |
| 129 | 129 | ||
| 130 | data.forEach((item)=>{ | 130 | data.forEach((item)=>{ |
| 131 | - this.data.push(new FollowListDetailItem(item.headPhotoUrl,item.cnUserName,item.cnFansNum,item.introduction,item.creatorId,item.status)) | 131 | + this.data.push(new FollowListDetailItem(item.headPhotoUrl,item.cnUserName,item.cnFansNum,item.introduction,item.creatorId,item.status,item.attentionUserId)) |
| 132 | }) | 132 | }) |
| 133 | 133 | ||
| 134 | this.data.notifyDataReload() | 134 | this.data.notifyDataReload() |
| @@ -233,5 +233,8 @@ struct ChildComponent { | @@ -233,5 +233,8 @@ struct ChildComponent { | ||
| 233 | 233 | ||
| 234 | }.height('146lpx') | 234 | }.height('146lpx') |
| 235 | .justifyContent(FlexAlign.Center) | 235 | .justifyContent(FlexAlign.Center) |
| 236 | + .onClick(()=>{ | ||
| 237 | + RouteManager.jumpNewPage("pages/OtherNormalUserHomePage",new RouterObject(this.data.attentionUserId,0)) | ||
| 238 | + }) | ||
| 236 | } | 239 | } |
| 237 | } | 240 | } |
| 1 | import { LazyDataSource, StringUtils } from 'wdKit'; | 1 | import { LazyDataSource, StringUtils } from 'wdKit'; |
| 2 | import MinePageDatasModel from '../../../../model/MinePageDatasModel'; | 2 | import MinePageDatasModel from '../../../../model/MinePageDatasModel'; |
| 3 | -import { Params } from '../../../../repository/bean/Params'; | ||
| 4 | import RouteManager from '../../../../utils/RouteManager'; | 3 | import RouteManager from '../../../../utils/RouteManager'; |
| 5 | import { CommentListItem } from '../../../../viewmodel/CommentListItem'; | 4 | import { CommentListItem } from '../../../../viewmodel/CommentListItem'; |
| 6 | import { FollowListDetailItem } from '../../../../viewmodel/FollowListDetailItem'; | 5 | import { FollowListDetailItem } from '../../../../viewmodel/FollowListDetailItem'; |
| 7 | import { FollowListDetailRequestItem } from '../../../../viewmodel/FollowListDetailRequestItem'; | 6 | import { FollowListDetailRequestItem } from '../../../../viewmodel/FollowListDetailRequestItem'; |
| 7 | +import { RouterObject } from '../../../../viewmodel/RouterObject'; | ||
| 8 | import { ListHasNoMoreDataUI } from '../../../reusable/ListHasNoMoreDataUI'; | 8 | import { ListHasNoMoreDataUI } from '../../../reusable/ListHasNoMoreDataUI'; |
| 9 | 9 | ||
| 10 | const TAG = "HomePageBottomComponent" | 10 | const TAG = "HomePageBottomComponent" |
| @@ -17,6 +17,7 @@ export struct HomePageBottomComponent{ | @@ -17,6 +17,7 @@ export struct HomePageBottomComponent{ | ||
| 17 | @State hasMore:boolean = true | 17 | @State hasMore:boolean = true |
| 18 | curPageNum:number = 1; | 18 | curPageNum:number = 1; |
| 19 | @State count:number = 0; | 19 | @State count:number = 0; |
| 20 | + @Prop levelHead:string | ||
| 20 | 21 | ||
| 21 | aboutToAppear(){ | 22 | aboutToAppear(){ |
| 22 | this.getNewPageData() | 23 | this.getNewPageData() |
| @@ -56,10 +57,7 @@ export struct HomePageBottomComponent{ | @@ -56,10 +57,7 @@ export struct HomePageBottomComponent{ | ||
| 56 | .backgroundColor($r('app.color.color_F5F5F5')) | 57 | .backgroundColor($r('app.color.color_F5F5F5')) |
| 57 | .margin({top:'31lpx',bottom:'4lpx'}) | 58 | .margin({top:'31lpx',bottom:'4lpx'}) |
| 58 | }.onClick(()=>{ | 59 | }.onClick(()=>{ |
| 59 | - let params: Params = { | ||
| 60 | - pageID: "1" | ||
| 61 | - } | ||
| 62 | - RouteManager.jumpNewPage("pages/FollowListPage",params) | 60 | + RouteManager.jumpNewPage("pages/FollowListPage",new RouterObject('',1)) |
| 63 | }) | 61 | }) |
| 64 | 62 | ||
| 65 | LazyForEach(this.data_follow, (item: FollowListDetailItem, index: number = 0) => { | 63 | LazyForEach(this.data_follow, (item: FollowListDetailItem, index: number = 0) => { |
| @@ -97,7 +95,7 @@ export struct HomePageBottomComponent{ | @@ -97,7 +95,7 @@ export struct HomePageBottomComponent{ | ||
| 97 | List({ space: 3 }) { | 95 | List({ space: 3 }) { |
| 98 | LazyForEach(this.data_comment, (item: CommentListItem, index: number = 0) => { | 96 | LazyForEach(this.data_comment, (item: CommentListItem, index: number = 0) => { |
| 99 | ListItem() { | 97 | ListItem() { |
| 100 | - ChildCommentComponent({data: item}) | 98 | + ChildCommentComponent({data: item,levelHead:this.levelHead}) |
| 101 | } | 99 | } |
| 102 | .onClick(() => { | 100 | .onClick(() => { |
| 103 | }) | 101 | }) |
| @@ -152,7 +150,7 @@ export struct HomePageBottomComponent{ | @@ -152,7 +150,7 @@ export struct HomePageBottomComponent{ | ||
| 152 | this.hasMore = false | 150 | this.hasMore = false |
| 153 | }else{ | 151 | }else{ |
| 154 | value.list.forEach((value)=>{ | 152 | value.list.forEach((value)=>{ |
| 155 | - this.data_follow.push(new FollowListDetailItem(value.attentionHeadPhotoUrl,value.attentionUserName,value.fansNum,value.introduction,value.attentionCreatorId,"1")) | 153 | + this.data_follow.push(new FollowListDetailItem(value.attentionHeadPhotoUrl,value.attentionUserName,value.fansNum,value.introduction,value.attentionCreatorId,"1",value.attentionUserId)) |
| 156 | }) | 154 | }) |
| 157 | this.data_follow.notifyDataReload() | 155 | this.data_follow.notifyDataReload() |
| 158 | this.count = this.data_follow.totalCount() | 156 | this.count = this.data_follow.totalCount() |
| @@ -177,7 +175,7 @@ export struct HomePageBottomComponent{ | @@ -177,7 +175,7 @@ export struct HomePageBottomComponent{ | ||
| 177 | this.hasMore = false | 175 | this.hasMore = false |
| 178 | }else{ | 176 | }else{ |
| 179 | value.list.forEach((value)=>{ | 177 | value.list.forEach((value)=>{ |
| 180 | - this.data_comment.push(new CommentListItem(value.fromUserHeader,value.fromUserName,value.targetTitle,value.createTime,value.commentContent)) | 178 | + this.data_comment.push(new CommentListItem(value.fromUserHeader,value.fromUserName,value.targetTitle,value.createTime,value.commentContent,value.likeNum,0,value.id)) |
| 181 | }) | 179 | }) |
| 182 | this.data_comment.notifyDataReload() | 180 | this.data_comment.notifyDataReload() |
| 183 | this.count = this.data_comment.totalCount() | 181 | this.count = this.data_comment.totalCount() |
| @@ -287,15 +285,25 @@ struct ChildFollowComponent { | @@ -287,15 +285,25 @@ struct ChildFollowComponent { | ||
| 287 | @Component | 285 | @Component |
| 288 | struct ChildCommentComponent { | 286 | struct ChildCommentComponent { |
| 289 | @ObjectLink data: CommentListItem | 287 | @ObjectLink data: CommentListItem |
| 288 | + @Prop levelHead:string | ||
| 290 | 289 | ||
| 291 | build() { | 290 | build() { |
| 292 | Column(){ | 291 | Column(){ |
| 293 | Row() { | 292 | Row() { |
| 294 | - Image(StringUtils.isEmpty(this.data.fromUserHeader)?$r('app.media.default_head'):this.data.fromUserHeader) | ||
| 295 | - .objectFit(ImageFit.Auto) | ||
| 296 | - .width('69lpx') | ||
| 297 | - .height('69lpx') | ||
| 298 | - .margin({right:'15lpx'}) | 293 | + Stack(){ |
| 294 | + Image(this.data.fromUserHeader) | ||
| 295 | + .alt($r('app.media.default_head')) | ||
| 296 | + .objectFit(ImageFit.Auto) | ||
| 297 | + .width('69lpx') | ||
| 298 | + .height('69lpx') | ||
| 299 | + .margin({right:'15lpx'}) | ||
| 300 | + .borderRadius(50) | ||
| 301 | + Image(this.levelHead) | ||
| 302 | + .width('89lpx') | ||
| 303 | + .height('89lpx') | ||
| 304 | + .objectFit(ImageFit.Cover) | ||
| 305 | + .borderRadius(50) | ||
| 306 | + } | ||
| 299 | 307 | ||
| 300 | Column(){ | 308 | Column(){ |
| 301 | Text(this.data.fromUserName) | 309 | Text(this.data.fromUserName) |
| 1 | import router from '@ohos.router'; | 1 | import router from '@ohos.router'; |
| 2 | import { StringUtils } from 'wdKit/src/main/ets/utils/StringUtils'; | 2 | import { StringUtils } from 'wdKit/src/main/ets/utils/StringUtils'; |
| 3 | -import MinePageDatasModel from '../../../model/MinePageDatasModel'; | ||
| 4 | -import { HomePageBottomComponent } from './home/HomePageBottomComponent'; | 3 | +import MinePageDatasModel from '../../../../model/MinePageDatasModel'; |
| 4 | +import RouteManager from '../../../../utils/RouteManager'; | ||
| 5 | +import { Params } from '../../../../repository/bean/Params'; | ||
| 6 | +import { HomePageBottomComponent } from './HomePageBottomComponent'; | ||
| 7 | +import { RouterObject } from '../../../../viewmodel/RouterObject'; | ||
| 5 | 8 | ||
| 6 | const TAG = "MyHomeComponent" | 9 | const TAG = "MyHomeComponent" |
| 7 | 10 | ||
| @@ -61,7 +64,9 @@ export struct MyHomeComponent { | @@ -61,7 +64,9 @@ export struct MyHomeComponent { | ||
| 61 | .height('130lpx') | 64 | .height('130lpx') |
| 62 | .objectFit(ImageFit.Cover) | 65 | .objectFit(ImageFit.Cover) |
| 63 | .borderRadius(50) | 66 | .borderRadius(50) |
| 64 | - } | 67 | + }.onClick(()=>{ |
| 68 | + RouteManager.jumpNewPage("pages/OtherNormalUserHomePage",new RouterObject('512157124138245',0)) | ||
| 69 | + }) | ||
| 65 | Column() { | 70 | Column() { |
| 66 | Row() { | 71 | Row() { |
| 67 | Text(`${this.userName}`) | 72 | Text(`${this.userName}`) |
| @@ -175,10 +180,10 @@ export struct MyHomeComponent { | @@ -175,10 +180,10 @@ export struct MyHomeComponent { | ||
| 175 | //tab 页面 | 180 | //tab 页面 |
| 176 | Tabs({controller: this.controller}) { | 181 | Tabs({controller: this.controller}) { |
| 177 | TabContent() { | 182 | TabContent() { |
| 178 | - HomePageBottomComponent({style:0}) | 183 | + HomePageBottomComponent({style:0,levelHead:this.levelHead}) |
| 179 | }.tabBar(this.TabBuilder(0,"评论")) | 184 | }.tabBar(this.TabBuilder(0,"评论")) |
| 180 | TabContent() { | 185 | TabContent() { |
| 181 | - HomePageBottomComponent({style:1}) | 186 | + HomePageBottomComponent({style:1,levelHead:this.levelHead}) |
| 182 | }.tabBar(this.TabBuilder(1,"关注")) | 187 | }.tabBar(this.TabBuilder(1,"关注")) |
| 183 | } | 188 | } |
| 184 | .backgroundColor($r('app.color.white')) | 189 | .backgroundColor($r('app.color.white')) |
| @@ -256,7 +261,9 @@ export struct MyHomeComponent { | @@ -256,7 +261,9 @@ export struct MyHomeComponent { | ||
| 256 | .onClick(() => { | 261 | .onClick(() => { |
| 257 | router.back() | 262 | router.back() |
| 258 | }) | 263 | }) |
| 259 | - Image($r('app.media.default_head')) | 264 | + Image(this.headPhotoUrl) |
| 265 | + .borderRadius(50) | ||
| 266 | + .alt($r('app.media.default_head')) | ||
| 260 | .width('60lpx') | 267 | .width('60lpx') |
| 261 | .height('60lpx') | 268 | .height('60lpx') |
| 262 | .objectFit(ImageFit.Auto) | 269 | .objectFit(ImageFit.Auto) |
| @@ -270,7 +277,7 @@ export struct MyHomeComponent { | @@ -270,7 +277,7 @@ export struct MyHomeComponent { | ||
| 270 | router.back() | 277 | router.back() |
| 271 | }) | 278 | }) |
| 272 | 279 | ||
| 273 | - Text("我的昵称") | 280 | + Text(this.userName) |
| 274 | .height('42lpx') | 281 | .height('42lpx') |
| 275 | .maxLines(1) | 282 | .maxLines(1) |
| 276 | .id("title") | 283 | .id("title") |
| 1 | +import { DateTimeUtils, LazyDataSource, StringUtils } from 'wdKit'; | ||
| 2 | +import { CommentListItem } from '../../../../viewmodel/CommentListItem'; | ||
| 3 | +import { ListHasNoMoreDataUI } from '../../../reusable/ListHasNoMoreDataUI'; | ||
| 4 | +import { OtherUserCommentListRequestItem } from '../../../../viewmodel/OtherUserCommentListRequestItem'; | ||
| 5 | +import MinePageDatasModel from '../../../../model/MinePageDatasModel'; | ||
| 6 | +import { MineCommentListDetailItem } from '../../../../viewmodel/MineCommentListDetailItem'; | ||
| 7 | +import { OtherUserCommentLikeStatusRequestItem } from '../../../../viewmodel/OtherUserCommentLikeStatusRequestItem'; | ||
| 8 | + | ||
| 9 | +const TAG = "HomePageBottomComponent" | ||
| 10 | +@Component | ||
| 11 | +export struct OtherHomePageBottomCommentComponent{ | ||
| 12 | + @Prop curUserId: string | ||
| 13 | + @State data_comment: LazyDataSource<CommentListItem> = new LazyDataSource(); | ||
| 14 | + @State isLoading:boolean = false | ||
| 15 | + @State hasMore:boolean = true | ||
| 16 | + curPageNum:number = 1; | ||
| 17 | + @State count:number = 0; | ||
| 18 | + @Prop levelHead:string | ||
| 19 | + | ||
| 20 | + aboutToAppear(){ | ||
| 21 | + this.getNewPageData() | ||
| 22 | + } | ||
| 23 | + | ||
| 24 | + build(){ | ||
| 25 | + Column(){ | ||
| 26 | + Divider().width('100%') | ||
| 27 | + .height('2lpx') | ||
| 28 | + .strokeWidth('1lpx') | ||
| 29 | + .backgroundColor($r('app.color.color_EDEDED')) | ||
| 30 | + | ||
| 31 | + if(this.count === 0){ | ||
| 32 | + ListHasNoMoreDataUI({style:2}) | ||
| 33 | + .height('100%') | ||
| 34 | + }else{ | ||
| 35 | + List({ space: 3 }) { | ||
| 36 | + LazyForEach(this.data_comment, (item: CommentListItem, index: number = 0) => { | ||
| 37 | + ListItem() { | ||
| 38 | + ChildCommentComponent({data: item,levelHead:this.levelHead}) | ||
| 39 | + } | ||
| 40 | + .onClick(() => { | ||
| 41 | + }) | ||
| 42 | + }, (item: CommentListItem, index: number) => index.toString()) | ||
| 43 | + | ||
| 44 | + //没有更多数据 显示提示 | ||
| 45 | + if(!this.hasMore){ | ||
| 46 | + ListItem(){ | ||
| 47 | + ListHasNoMoreDataUI() | ||
| 48 | + } | ||
| 49 | + } | ||
| 50 | + }.cachedCount(15) | ||
| 51 | + .layoutWeight(1) | ||
| 52 | + .scrollBar(BarState.Off) | ||
| 53 | + .edgeEffect(EdgeEffect.None) | ||
| 54 | + // .nestedScroll({ | ||
| 55 | + // scrollForward: NestedScrollMode.PARENT_FIRST, | ||
| 56 | + // scrollBackward: NestedScrollMode.SELF_FIRST | ||
| 57 | + // }) | ||
| 58 | + .onReachEnd(()=>{ | ||
| 59 | + console.log(TAG,"触底了"); | ||
| 60 | + if(!this.isLoading){ | ||
| 61 | + this.isLoading = true | ||
| 62 | + //加载分页数据 | ||
| 63 | + this.getNewPageData() | ||
| 64 | + } | ||
| 65 | + }) | ||
| 66 | + } | ||
| 67 | + } | ||
| 68 | + .width('100%') | ||
| 69 | + } | ||
| 70 | + | ||
| 71 | + | ||
| 72 | + @Styles | ||
| 73 | + listStyle() { | ||
| 74 | + .backgroundColor(Color.White) | ||
| 75 | + .height(72) | ||
| 76 | + .width("100%") | ||
| 77 | + .borderRadius(12) | ||
| 78 | + } | ||
| 79 | + | ||
| 80 | + getNewPageData(){ | ||
| 81 | + this.isLoading = true | ||
| 82 | + if(this.hasMore){ | ||
| 83 | + let time = encodeURI(DateTimeUtils.getCurDate(DateTimeUtils.PATTERN_DATE_TIME_HYPHEN)) | ||
| 84 | + let object = new OtherUserCommentListRequestItem("",20,this.curPageNum,time,"1",this.curUserId) | ||
| 85 | + | ||
| 86 | + MinePageDatasModel.getOtherCommentListData(object,getContext(this)).then((value)=>{ | ||
| 87 | + if (!this.data_comment || value.list.length == 0){ | ||
| 88 | + this.hasMore = false | ||
| 89 | + }else{ | ||
| 90 | + this.getFollowListStatus(value) | ||
| 91 | + } | ||
| 92 | + }).catch((err:Error)=>{ | ||
| 93 | + console.log(TAG,"请求失败") | ||
| 94 | + this.isLoading = false | ||
| 95 | + }) | ||
| 96 | + } | ||
| 97 | + } | ||
| 98 | + | ||
| 99 | + getFollowListStatus(value:MineCommentListDetailItem){ | ||
| 100 | + | ||
| 101 | + let status = new OtherUserCommentLikeStatusRequestItem() | ||
| 102 | + let data : CommentListItem[] = [] | ||
| 103 | + value.list.forEach((item)=>{ | ||
| 104 | + status.commentIdList.push(item.id) | ||
| 105 | + data.push(new CommentListItem(item.fromUserHeader,item.fromUserName,item.targetTitle,item.createTime,item.commentContent,item.likeNum,0,item.id)) | ||
| 106 | + }) | ||
| 107 | + | ||
| 108 | + MinePageDatasModel.getOtherUserCommentLikeStatusData(status,getContext(this)).then((newValue)=>{ | ||
| 109 | + newValue.forEach((item)=>{ | ||
| 110 | + data.forEach((list)=>{ | ||
| 111 | + if (item.commentId == list.id) { | ||
| 112 | + list.like_status = item.status | ||
| 113 | + } | ||
| 114 | + }) | ||
| 115 | + }) | ||
| 116 | + | ||
| 117 | + data.forEach((item)=>{ | ||
| 118 | + this.data_comment.push(new CommentListItem(item.fromUserHeader,item.fromUserName,item.targetTitle,item.createTime,item.commentContent,item.likeNum,item.like_status,item.id)) | ||
| 119 | + }) | ||
| 120 | + | ||
| 121 | + this.data_comment.notifyDataReload() | ||
| 122 | + | ||
| 123 | + this.count = this.data_comment.totalCount() | ||
| 124 | + if (this.data_comment.totalCount() < value.totalCount) { | ||
| 125 | + this.curPageNum++ | ||
| 126 | + }else { | ||
| 127 | + this.hasMore = false | ||
| 128 | + } | ||
| 129 | + | ||
| 130 | + this.isLoading = false | ||
| 131 | + }).catch((err:Error)=>{ | ||
| 132 | + console.log(TAG,"请求失败") | ||
| 133 | + this.isLoading = false | ||
| 134 | + }) | ||
| 135 | + } | ||
| 136 | + | ||
| 137 | +} | ||
| 138 | + | ||
| 139 | +@Component | ||
| 140 | +struct ChildCommentComponent { | ||
| 141 | + @ObjectLink data: CommentListItem | ||
| 142 | + @Prop levelHead:string | ||
| 143 | + | ||
| 144 | + build() { | ||
| 145 | + Column(){ | ||
| 146 | + Row() { | ||
| 147 | + Stack(){ | ||
| 148 | + Image(this.data.fromUserHeader) | ||
| 149 | + .alt($r('app.media.default_head')) | ||
| 150 | + .objectFit(ImageFit.Auto) | ||
| 151 | + .width('69lpx') | ||
| 152 | + .height('69lpx') | ||
| 153 | + .margin({right:'15lpx'}) | ||
| 154 | + .borderRadius(50) | ||
| 155 | + Image(this.levelHead) | ||
| 156 | + .width('89lpx') | ||
| 157 | + .height('89lpx') | ||
| 158 | + .objectFit(ImageFit.Cover) | ||
| 159 | + .borderRadius(50) | ||
| 160 | + } | ||
| 161 | + | ||
| 162 | + Column(){ | ||
| 163 | + Text(this.data.fromUserName) | ||
| 164 | + .fontSize('25lpx') | ||
| 165 | + .lineHeight('35lpx') | ||
| 166 | + .fontWeight('600lpx') | ||
| 167 | + .fontColor($r('app.color.color_222222')) | ||
| 168 | + .margin({bottom:'6lpx'}) | ||
| 169 | + .maxLines(1) | ||
| 170 | + Text(`${this.data.createTime}`) | ||
| 171 | + .fontColor($r('app.color.color_B0B0B0')) | ||
| 172 | + .fontSize('23lpx') | ||
| 173 | + .lineHeight('31lpx') | ||
| 174 | + .fontWeight('400lpx') | ||
| 175 | + .maxLines(1) | ||
| 176 | + }.layoutWeight(1) | ||
| 177 | + .alignItems(HorizontalAlign.Start) | ||
| 178 | + | ||
| 179 | + Row(){ | ||
| 180 | + Text(this.data.likeNum.toString()) | ||
| 181 | + .fontWeight("500lpx") | ||
| 182 | + .fontSize("27lpx") | ||
| 183 | + .lineHeight("31lpx") | ||
| 184 | + .fontColor(this.data.like_status===0?$r('app.color.color_666666'):$r('app.color.color_ED2800')) | ||
| 185 | + .margin({right:'8lpx'}) | ||
| 186 | + Image(this.data.like_status===0?$r('app.media.like_default_status'):$r('app.media.liked_status')) | ||
| 187 | + .width('31lpx') | ||
| 188 | + .height('31lpx') | ||
| 189 | + .objectFit(ImageFit.Auto) | ||
| 190 | + .interpolation(ImageInterpolation.Medium) | ||
| 191 | + .borderRadius(50) | ||
| 192 | + } | ||
| 193 | + | ||
| 194 | + } | ||
| 195 | + .margin({bottom:'10lpx'}) | ||
| 196 | + .width('100%') | ||
| 197 | + .height('108lpx') | ||
| 198 | + .padding({left:'31lpx',right:'31lpx'}) | ||
| 199 | + | ||
| 200 | + Row(){ | ||
| 201 | + Text(this.data.commentContent) | ||
| 202 | + .maxLines(3) | ||
| 203 | + .textOverflow({ overflow: TextOverflow.Ellipsis }) | ||
| 204 | + .fontWeight('400lpx') | ||
| 205 | + .fontSize('31lpx') | ||
| 206 | + .lineHeight('46lpx') | ||
| 207 | + .fontColor($r('app.color.color_222222')) | ||
| 208 | + .margin({bottom:'10lpx'}) | ||
| 209 | + }.padding({left:'31lpx',right:'31lpx'}) | ||
| 210 | + .width('100%') | ||
| 211 | + | ||
| 212 | + Row(){ | ||
| 213 | + Text(this.data.targetTitle) | ||
| 214 | + .fontWeight('400lpx') | ||
| 215 | + .fontColor($r('app.color.color_222222')) | ||
| 216 | + .lineHeight('38lpx') | ||
| 217 | + .fontSize('27lpx') | ||
| 218 | + .textAlign(TextAlign.Center) | ||
| 219 | + .margin({right:'4lpx'}) | ||
| 220 | + .maxLines(3) | ||
| 221 | + .width('616lpx') | ||
| 222 | + Image($r('app.media.arrow_icon_right')) | ||
| 223 | + .objectFit(ImageFit.Auto) | ||
| 224 | + .width('27lpx') | ||
| 225 | + .height('27lpx') | ||
| 226 | + } | ||
| 227 | + .padding({top:'17lpx',bottom:'17lpx',left:'23lpx',right:'23lpx'}) | ||
| 228 | + .width('662lpx') | ||
| 229 | + .backgroundColor($r('app.color.color_F5F5F5')) | ||
| 230 | + .margin({top:'19lpx',bottom:'31lpx'}) | ||
| 231 | + | ||
| 232 | + Divider().width('100%') | ||
| 233 | + .height('12lpx') | ||
| 234 | + .strokeWidth('12lpx') | ||
| 235 | + .backgroundColor($r('app.color.color_F5F5F5')) | ||
| 236 | + | ||
| 237 | + } | ||
| 238 | + .justifyContent(FlexAlign.Center) | ||
| 239 | + } | ||
| 240 | +} |
| 1 | +import { LazyDataSource, StringUtils } from 'wdKit'; | ||
| 2 | +import { ListHasNoMoreDataUI } from '../../../reusable/ListHasNoMoreDataUI'; | ||
| 3 | +import { UserFollowListRequestItem } from '../../../../viewmodel/UserFollowListRequestItem'; | ||
| 4 | +import { FollowListDetailItem } from '../../../../viewmodel/FollowListDetailItem'; | ||
| 5 | +import { Params } from '../../../../repository/bean/Params'; | ||
| 6 | +import MinePageDatasModel from '../../../../model/MinePageDatasModel'; | ||
| 7 | +import RouteManager from '../../../../utils/RouteManager'; | ||
| 8 | +import { RouterObject } from '../../../../viewmodel/RouterObject'; | ||
| 9 | + | ||
| 10 | +const TAG = "HomePageBottomComponent" | ||
| 11 | +@Component | ||
| 12 | +export struct OtherHomePageBottomFollowComponent{ | ||
| 13 | + @State data_follow: LazyDataSource<FollowListDetailItem> = new LazyDataSource(); | ||
| 14 | + @State isLoading:boolean = false | ||
| 15 | + @State hasMore:boolean = true | ||
| 16 | + curPageNum:number = 1; | ||
| 17 | + @State count:number = 0; | ||
| 18 | + @Prop curUserId: string | ||
| 19 | + | ||
| 20 | + aboutToAppear(){ | ||
| 21 | + this.getNewPageData() | ||
| 22 | + } | ||
| 23 | + | ||
| 24 | + build(){ | ||
| 25 | + Column(){ | ||
| 26 | + Divider().width('100%') | ||
| 27 | + .height('2lpx') | ||
| 28 | + .strokeWidth('1lpx') | ||
| 29 | + .backgroundColor($r('app.color.color_EDEDED')) | ||
| 30 | + | ||
| 31 | + if(this.count === 0){ | ||
| 32 | + ListHasNoMoreDataUI({style:2}) | ||
| 33 | + .height('100%') | ||
| 34 | + }else{ | ||
| 35 | + List({ space: 3 }) { | ||
| 36 | + | ||
| 37 | + ListItem() { | ||
| 38 | + Row(){ | ||
| 39 | + Text("关注更多人民号") | ||
| 40 | + .fontWeight('400lpx') | ||
| 41 | + .fontColor($r('app.color.color_222222')) | ||
| 42 | + .lineHeight('38lpx') | ||
| 43 | + .fontSize('27lpx') | ||
| 44 | + .textAlign(TextAlign.Center) | ||
| 45 | + .margin({right:'4lpx'}) | ||
| 46 | + Image($r('app.media.arrow_icon_right')) | ||
| 47 | + .objectFit(ImageFit.Auto) | ||
| 48 | + .width('27lpx') | ||
| 49 | + .height('27lpx') | ||
| 50 | + }.height('69lpx') | ||
| 51 | + .width('659lpx') | ||
| 52 | + .alignItems(VerticalAlign.Center) | ||
| 53 | + .justifyContent(FlexAlign.Center) | ||
| 54 | + .backgroundColor($r('app.color.color_F5F5F5')) | ||
| 55 | + .margin({top:'31lpx',bottom:'4lpx'}) | ||
| 56 | + }.onClick(()=>{ | ||
| 57 | + RouteManager.jumpNewPage("pages/FollowListPage",new RouterObject('',1)) | ||
| 58 | + }) | ||
| 59 | + | ||
| 60 | + LazyForEach(this.data_follow, (item: FollowListDetailItem, index: number = 0) => { | ||
| 61 | + ListItem() { | ||
| 62 | + ChildFollowComponent({data: item}) | ||
| 63 | + } | ||
| 64 | + .onClick(() => { | ||
| 65 | + }) | ||
| 66 | + }, (item: FollowListDetailItem, index: number) => index.toString()) | ||
| 67 | + | ||
| 68 | + //没有更多数据 显示提示 | ||
| 69 | + if(!this.hasMore){ | ||
| 70 | + ListItem(){ | ||
| 71 | + ListHasNoMoreDataUI() | ||
| 72 | + } | ||
| 73 | + } | ||
| 74 | + }.cachedCount(15) | ||
| 75 | + .padding({left:'31lpx',right:'31lpx'}) | ||
| 76 | + .layoutWeight(1) | ||
| 77 | + .scrollBar(BarState.Off) | ||
| 78 | + .edgeEffect(EdgeEffect.None) | ||
| 79 | + // .nestedScroll({ | ||
| 80 | + // scrollForward: NestedScrollMode.PARENT_FIRST, | ||
| 81 | + // scrollBackward: NestedScrollMode.SELF_FIRST | ||
| 82 | + // }) | ||
| 83 | + .onReachEnd(()=>{ | ||
| 84 | + console.log(TAG,"触底了"); | ||
| 85 | + if(!this.isLoading){ | ||
| 86 | + this.isLoading = true | ||
| 87 | + //加载分页数据 | ||
| 88 | + this.getNewPageData() | ||
| 89 | + } | ||
| 90 | + }) | ||
| 91 | + } | ||
| 92 | + } | ||
| 93 | + .width('100%') | ||
| 94 | + } | ||
| 95 | + | ||
| 96 | + | ||
| 97 | + @Styles | ||
| 98 | + listStyle() { | ||
| 99 | + .backgroundColor(Color.White) | ||
| 100 | + .height(72) | ||
| 101 | + .width("100%") | ||
| 102 | + .borderRadius(12) | ||
| 103 | + } | ||
| 104 | + | ||
| 105 | + getNewPageData(){ | ||
| 106 | + this.isLoading = true | ||
| 107 | + //我的关注列表 | ||
| 108 | + if(this.hasMore){ | ||
| 109 | + let object = new UserFollowListRequestItem(Number(this.curUserId),20,this.curPageNum,"1") | ||
| 110 | + | ||
| 111 | + MinePageDatasModel.getOtherUserFollowListData(object,getContext(this)).then((value)=>{ | ||
| 112 | + if (!this.data_follow || value.list.length == 0){ | ||
| 113 | + this.hasMore = false | ||
| 114 | + }else{ | ||
| 115 | + value.list.forEach((value)=>{ | ||
| 116 | + this.data_follow.push(new FollowListDetailItem(value.attentionHeadPhotoUrl,value.attentionUserName,value.fansNum,value.introduction,value.attentionCreatorId,"1",value.attentionUserId)) | ||
| 117 | + }) | ||
| 118 | + this.data_follow.notifyDataReload() | ||
| 119 | + this.count = this.data_follow.totalCount() | ||
| 120 | + if (this.data_follow.totalCount() < value.totalCount) { | ||
| 121 | + this.curPageNum++ | ||
| 122 | + }else { | ||
| 123 | + this.hasMore = false | ||
| 124 | + } | ||
| 125 | + } | ||
| 126 | + this.isLoading = false | ||
| 127 | + }).catch((err:Error)=>{ | ||
| 128 | + console.log(TAG,"请求失败") | ||
| 129 | + this.isLoading = false | ||
| 130 | + }) | ||
| 131 | + } | ||
| 132 | + } | ||
| 133 | +} | ||
| 134 | + | ||
| 135 | +@Component | ||
| 136 | +struct ChildFollowComponent { | ||
| 137 | + @ObjectLink data: FollowListDetailItem | ||
| 138 | + | ||
| 139 | + build() { | ||
| 140 | + Column(){ | ||
| 141 | + Blank().height('27lpx') | ||
| 142 | + | ||
| 143 | + Row() { | ||
| 144 | + Image(StringUtils.isEmpty(this.data.headPhotoUrl)?$r('app.media.default_head'):this.data.headPhotoUrl) | ||
| 145 | + .objectFit(ImageFit.Auto) | ||
| 146 | + .width('92lpx') | ||
| 147 | + .height('92lpx') | ||
| 148 | + .margin({right:'15lpx'}) | ||
| 149 | + | ||
| 150 | + Column(){ | ||
| 151 | + Text(this.data.cnUserName) | ||
| 152 | + .fontWeight('400lpx') | ||
| 153 | + .fontSize('31lpx') | ||
| 154 | + .lineHeight('38lpx') | ||
| 155 | + .fontColor($r('app.color.color_222222')) | ||
| 156 | + Text(`粉丝${this.data.cnFansNum}`) | ||
| 157 | + .fontColor($r('app.color.color_B0B0B0')) | ||
| 158 | + .fontSize('23lpx') | ||
| 159 | + .maxLines(1) | ||
| 160 | + Text(`${this.data.introduction}`) | ||
| 161 | + .fontColor($r('app.color.color_B0B0B0')) | ||
| 162 | + .fontSize('23lpx') | ||
| 163 | + .maxLines(2) | ||
| 164 | + .textOverflow({ overflow: TextOverflow.Ellipsis }) | ||
| 165 | + }.layoutWeight(1) | ||
| 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) | ||
| 209 | + .width('100%') | ||
| 210 | + .layoutWeight(1) | ||
| 211 | + | ||
| 212 | + Divider().width('100%') | ||
| 213 | + .height('2lpx') | ||
| 214 | + .strokeWidth('1lpx') | ||
| 215 | + .backgroundColor($r('app.color.color_EDEDED')) | ||
| 216 | + | ||
| 217 | + }.height('146lpx') | ||
| 218 | + .justifyContent(FlexAlign.Center) | ||
| 219 | + } | ||
| 220 | +} |
PeopleDaily_Harmony/wdComponent/src/main/ets/components/page/mine/home/OtherUserHomeComponent.ets
0 → 100644
| 1 | +import router from '@ohos.router'; | ||
| 2 | +import { StringUtils } from 'wdKit/src/main/ets/utils/StringUtils'; | ||
| 3 | +import MinePageDatasModel from '../../../../model/MinePageDatasModel'; | ||
| 4 | +import { OtherHomePageBottomFollowComponent } from './OtherHomePageBottomFollowComponent'; | ||
| 5 | +import { OtherHomePageBottomCommentComponent } from './OtherHomePageBottomCommentComponent'; | ||
| 6 | +import { OtherUserDetailRequestItem } from '../../../../viewmodel/OtherUserDetailRequestItem'; | ||
| 7 | + | ||
| 8 | +const TAG = "OtherUserHomeComponent" | ||
| 9 | + | ||
| 10 | +@Component | ||
| 11 | +export struct OtherUserHomeComponent { | ||
| 12 | + @Prop curUserId: string | ||
| 13 | + | ||
| 14 | + @State tileOpacity: number = 0; | ||
| 15 | + firstPositionY:number = 0; | ||
| 16 | + fontColor: string = '#999999' | ||
| 17 | + selectedFontColor: string = '#000000' | ||
| 18 | + @State currentIndex: number = 0 | ||
| 19 | + private controller: TabsController = new TabsController() | ||
| 20 | + isChangeToUserEdit = false; | ||
| 21 | + @State userName:string = "" | ||
| 22 | + @State headPhotoUrl:string = "" | ||
| 23 | + @State levelHead:string = "" | ||
| 24 | + @State levelId:number = 0 | ||
| 25 | + @State browseNum:number = 0//阅读数 | ||
| 26 | + @State commentNum:number = 0//评论数 | ||
| 27 | + @State attentionNum:number = 0//关注数 | ||
| 28 | + @State desc:string = "" | ||
| 29 | + | ||
| 30 | + aboutToAppear(){ | ||
| 31 | + this.getUserInfo() | ||
| 32 | + this.getUserLevel() | ||
| 33 | + } | ||
| 34 | + | ||
| 35 | + build() { | ||
| 36 | + Stack({ alignContent: Alignment.Top }){ | ||
| 37 | + Image($r('app.media.title_bg')) | ||
| 38 | + .width('100%') | ||
| 39 | + .height('355lpx') | ||
| 40 | + .objectFit(ImageFit.Cover) | ||
| 41 | + | ||
| 42 | + Column(){ | ||
| 43 | + Stack({ alignContent: Alignment.Top }){ | ||
| 44 | + this.MineHomeTitleTransparent() | ||
| 45 | + this.MineHomeTitleWhite() | ||
| 46 | + } | ||
| 47 | + | ||
| 48 | + Scroll() { | ||
| 49 | + Column() { | ||
| 50 | + //用户信息区域 | ||
| 51 | + Row() { | ||
| 52 | + Stack(){ | ||
| 53 | + Image(this.headPhotoUrl) | ||
| 54 | + .alt($r('app.media.default_head')) | ||
| 55 | + .width('115lpx') | ||
| 56 | + .height('115lpx') | ||
| 57 | + .objectFit(ImageFit.Cover) | ||
| 58 | + .borderRadius(50) | ||
| 59 | + Image(this.levelHead) | ||
| 60 | + .width('130lpx') | ||
| 61 | + .height('130lpx') | ||
| 62 | + .objectFit(ImageFit.Cover) | ||
| 63 | + .borderRadius(50) | ||
| 64 | + } | ||
| 65 | + | ||
| 66 | + Column() { | ||
| 67 | + Row() { | ||
| 68 | + Text(`${this.userName}`) | ||
| 69 | + .fontColor($r('app.color.white')) | ||
| 70 | + .maxLines(1) | ||
| 71 | + .textOverflow({ overflow: TextOverflow.Ellipsis }) | ||
| 72 | + .fontSize('38lpx') | ||
| 73 | + .lineHeight('50lpx') | ||
| 74 | + .fontWeight('500lpx') | ||
| 75 | + | ||
| 76 | + Text(`等级${this.levelId}`) | ||
| 77 | + .textAlign(TextAlign.Center) | ||
| 78 | + .fontColor($r('app.color.color_ED2800')) | ||
| 79 | + .backgroundColor($r('app.color.white')) | ||
| 80 | + .fontSize('19lpx') | ||
| 81 | + .width('96lpx') | ||
| 82 | + .height('35lpx') | ||
| 83 | + .margin({ left: '10lpx' }) | ||
| 84 | + Blank() | ||
| 85 | + }.width('507lpx') | ||
| 86 | + | ||
| 87 | + Row() { | ||
| 88 | + Row() { | ||
| 89 | + Text(`${this.browseNum}`) | ||
| 90 | + .textStyle() | ||
| 91 | + Text("阅读") | ||
| 92 | + .textStyle2() | ||
| 93 | + } | ||
| 94 | + .margin({ right: '15lpx' }) | ||
| 95 | + | ||
| 96 | + Divider() | ||
| 97 | + .height('19lpx') | ||
| 98 | + .width('2lpx') | ||
| 99 | + .color($r('app.color.white')) | ||
| 100 | + .vertical(true) | ||
| 101 | + .opacity(0.4) | ||
| 102 | + Row() { | ||
| 103 | + Text(`${this.commentNum}`) | ||
| 104 | + .textStyle() | ||
| 105 | + Text("评论") | ||
| 106 | + .textStyle2() | ||
| 107 | + }.margin({ right: '15lpx', left: '15lpx' }) | ||
| 108 | + | ||
| 109 | + Divider() | ||
| 110 | + .height('19lpx') | ||
| 111 | + .width('2lpx') | ||
| 112 | + .color($r('app.color.white')) | ||
| 113 | + .vertical(true) | ||
| 114 | + .opacity(0.4) | ||
| 115 | + Row() { | ||
| 116 | + Text(`${this.attentionNum}`) | ||
| 117 | + .textStyle() | ||
| 118 | + Text("关注") | ||
| 119 | + .textStyle2() | ||
| 120 | + }.margin({ left: '15lpx' }) | ||
| 121 | + }.margin({ top: '23lpx' }) | ||
| 122 | + }.alignItems(HorizontalAlign.Start) | ||
| 123 | + .margin({ left: '32lpx' }) | ||
| 124 | + } | ||
| 125 | + .onAreaChange((oldValue: Area, newValue: Area) => { | ||
| 126 | + if (this.firstPositionY === 0) { | ||
| 127 | + this.firstPositionY = newValue.globalPosition.y as number | ||
| 128 | + }else{ | ||
| 129 | + let persent = (this.firstPositionY - Number(newValue.globalPosition.y)) / (this.firstPositionY * 0.3) | ||
| 130 | + if(persent > 1){ | ||
| 131 | + persent = 1 | ||
| 132 | + } | ||
| 133 | + this.tileOpacity = persent | ||
| 134 | + } | ||
| 135 | + }) | ||
| 136 | + .backgroundColor($r('app.color.color_transparent')) | ||
| 137 | + .height('184lpx') | ||
| 138 | + .width('100%') | ||
| 139 | + .padding({ left: '35lpx' }) | ||
| 140 | + | ||
| 141 | + //用户简介区域 | ||
| 142 | + Column() { | ||
| 143 | + Row() { | ||
| 144 | + Text(this.desc) | ||
| 145 | + .fontSize('27lpx') | ||
| 146 | + .maxLines(3) | ||
| 147 | + .textOverflow({ overflow: TextOverflow.Ellipsis }) | ||
| 148 | + .lineHeight('40lpx') | ||
| 149 | + .fontWeight('400lpx') | ||
| 150 | + .fontColor($r('app.color.color_222222')) | ||
| 151 | + .textAlign(TextAlign.Start) | ||
| 152 | + | ||
| 153 | + } | ||
| 154 | + }.padding({ left: '31lpx',right:'31lpx',top:'19lpx',bottom:'31lpx'}) | ||
| 155 | + .alignItems(HorizontalAlign.Start) | ||
| 156 | + .justifyContent(FlexAlign.Center) | ||
| 157 | + .width('100%') | ||
| 158 | + .backgroundColor($r('app.color.white')) | ||
| 159 | + .visibility(StringUtils.isEmpty(this.desc)?Visibility.Hidden:Visibility.Visible) | ||
| 160 | + | ||
| 161 | + //间隔符 | ||
| 162 | + Divider().width('100%').height('12lpx').color($r('app.color.color_F5F5F5')).strokeWidth('12lpx') | ||
| 163 | + | ||
| 164 | + //tab 页面 | ||
| 165 | + Tabs({controller: this.controller}) { | ||
| 166 | + TabContent() { | ||
| 167 | + OtherHomePageBottomCommentComponent({curUserId:this.curUserId,levelHead:this.levelHead}) | ||
| 168 | + }.tabBar(this.TabBuilder(0,"评论")) | ||
| 169 | + TabContent() { | ||
| 170 | + OtherHomePageBottomFollowComponent({curUserId:this.curUserId}) | ||
| 171 | + }.tabBar(this.TabBuilder(1,"关注")) | ||
| 172 | + } | ||
| 173 | + .backgroundColor($r('app.color.white')) | ||
| 174 | + .animationDuration(0) | ||
| 175 | + .onChange((index: number) => { | ||
| 176 | + this.currentIndex = index | ||
| 177 | + }) | ||
| 178 | + .vertical(false) | ||
| 179 | + .height("100%") | ||
| 180 | + }.width("100%") | ||
| 181 | + } | ||
| 182 | + .edgeEffect(EdgeEffect.None) | ||
| 183 | + .scrollBar(BarState.Off) | ||
| 184 | + .width('100%') | ||
| 185 | + .height('100%') | ||
| 186 | + } | ||
| 187 | + }.width('100%') | ||
| 188 | + .height('100%') | ||
| 189 | + | ||
| 190 | + } | ||
| 191 | + @Builder MineHomeTitleTransparent() { | ||
| 192 | + RelativeContainer() { | ||
| 193 | + //标题栏目 | ||
| 194 | + Image($r('app.media.icon_arrow_left_white') ) | ||
| 195 | + .width('46lpx') | ||
| 196 | + .height('46lpx') | ||
| 197 | + .objectFit(ImageFit.Auto) | ||
| 198 | + .id("back_icon") | ||
| 199 | + .alignRules({ | ||
| 200 | + center: { anchor: "__container__", align: VerticalAlign.Center }, | ||
| 201 | + left: { anchor: "__container__", align: HorizontalAlign.Start } | ||
| 202 | + }) | ||
| 203 | + .margin({ left: '31lpx' }) | ||
| 204 | + .onClick(() => { | ||
| 205 | + router.back() | ||
| 206 | + }) | ||
| 207 | + } | ||
| 208 | + .visibility(this.tileOpacity > 0 ? 1 : 0) | ||
| 209 | + .height('84lpx') | ||
| 210 | + .width('100%') | ||
| 211 | + .backgroundColor($r('app.color.color_transparent')) | ||
| 212 | + } | ||
| 213 | + | ||
| 214 | + @Builder MineHomeTitleWhite() { | ||
| 215 | + RelativeContainer() { | ||
| 216 | + //标题栏目 | ||
| 217 | + Image($r('app.media.back_icon')) | ||
| 218 | + .width('46lpx') | ||
| 219 | + .height('46lpx') | ||
| 220 | + .objectFit(ImageFit.Auto) | ||
| 221 | + .id("back_icon") | ||
| 222 | + .alignRules({ | ||
| 223 | + center: { anchor: "__container__", align: VerticalAlign.Center }, | ||
| 224 | + left: { anchor: "__container__", align: HorizontalAlign.Start } | ||
| 225 | + }) | ||
| 226 | + .margin({ left: '31lpx' }) | ||
| 227 | + .onClick(() => { | ||
| 228 | + router.back() | ||
| 229 | + }) | ||
| 230 | + Image(this.headPhotoUrl) | ||
| 231 | + .alt($r('app.media.default_head')) | ||
| 232 | + .width('60lpx') | ||
| 233 | + .height('60lpx') | ||
| 234 | + .borderRadius(50) | ||
| 235 | + .objectFit(ImageFit.Auto) | ||
| 236 | + .id("head_icon") | ||
| 237 | + .alignRules({ | ||
| 238 | + center: { anchor: "__container__", align: VerticalAlign.Center }, | ||
| 239 | + left: { anchor: "back_icon", align: HorizontalAlign.End } | ||
| 240 | + }) | ||
| 241 | + .margin({ left: '31lpx' }) | ||
| 242 | + .onClick(() => { | ||
| 243 | + router.back() | ||
| 244 | + }) | ||
| 245 | + | ||
| 246 | + Text(`${this.userName}`) | ||
| 247 | + .height('42lpx') | ||
| 248 | + .maxLines(1) | ||
| 249 | + .id("title") | ||
| 250 | + .fontSize('35lpx') | ||
| 251 | + .fontWeight('400lpx') | ||
| 252 | + .fontColor($r('app.color.color_222222')) | ||
| 253 | + .lineHeight('42lpx') | ||
| 254 | + .alignRules({ | ||
| 255 | + center: { anchor: "__container__", align: VerticalAlign.Center }, | ||
| 256 | + left: { anchor: "head_icon", align: HorizontalAlign.End } | ||
| 257 | + }) | ||
| 258 | + .margin({ left: '12lpx' }) | ||
| 259 | + } | ||
| 260 | + .visibility(this.tileOpacity > 0 ? 0 : 1) | ||
| 261 | + .height('84lpx') | ||
| 262 | + .width('100%') | ||
| 263 | + .backgroundColor($r('app.color.white')) | ||
| 264 | + .opacity(this.tileOpacity ) | ||
| 265 | + | ||
| 266 | + } | ||
| 267 | + | ||
| 268 | + @Builder TabBuilder(index: number, title: string) { | ||
| 269 | + Stack(){ | ||
| 270 | + Text(title) | ||
| 271 | + .height('38lpx') | ||
| 272 | + .fontSize('33lpx') | ||
| 273 | + .fontWeight(this.currentIndex === index ? 600 : 400) | ||
| 274 | + .fontColor(this.currentIndex === index ? this.selectedFontColor : this.fontColor) | ||
| 275 | + .lineHeight('38lpx') | ||
| 276 | + | ||
| 277 | + if(this.currentIndex === index){ | ||
| 278 | + Divider() | ||
| 279 | + .width('31lpx') | ||
| 280 | + .height('4lpx') | ||
| 281 | + .color('#ED2800') | ||
| 282 | + .strokeWidth('4lpx') | ||
| 283 | + .margin({top:'50lpx'}) | ||
| 284 | + .id("divTag") | ||
| 285 | + } | ||
| 286 | + }.onClick(()=>{ | ||
| 287 | + this.currentIndex = index | ||
| 288 | + this.controller.changeIndex(this.currentIndex) | ||
| 289 | + }) | ||
| 290 | + .height('100%') | ||
| 291 | + .width('100%') | ||
| 292 | + .margin({right:'9lpx'}) | ||
| 293 | + } | ||
| 294 | + | ||
| 295 | + | ||
| 296 | + getUserInfo(){ | ||
| 297 | + let item = new OtherUserDetailRequestItem("","1",this.curUserId) | ||
| 298 | + MinePageDatasModel.getOtherUserDetailData(item,getContext(this)).then((value)=>{ | ||
| 299 | + if(value!=null){ | ||
| 300 | + this.userName = value.userName | ||
| 301 | + this.headPhotoUrl = value.headPhotoUrl | ||
| 302 | + if(StringUtils.isNotEmpty(value.introduction)){ | ||
| 303 | + this.desc = value.introduction | ||
| 304 | + } | ||
| 305 | + this.browseNum = StringUtils.isEmpty(value.browseNum)?0:value.browseNum | ||
| 306 | + this.commentNum = StringUtils.isEmpty(value.commentNum)?0:value.commentNum | ||
| 307 | + this.attentionNum = StringUtils.isEmpty(value.attentionNum)?0:value.attentionNum | ||
| 308 | + } | ||
| 309 | + }).catch((err:Error)=>{ | ||
| 310 | + console.log(TAG,JSON.stringify(err)) | ||
| 311 | + }) | ||
| 312 | + } | ||
| 313 | + getUserLevel(){ | ||
| 314 | + MinePageDatasModel.getOtherUserLevelData([this.curUserId],getContext(this)).then((value)=>{ | ||
| 315 | + if(value!=null){ | ||
| 316 | + this.levelHead = value[0].levelHead | ||
| 317 | + this.levelId = value[0].level | ||
| 318 | + } | ||
| 319 | + }).catch((err:Error)=>{ | ||
| 320 | + console.log(TAG,JSON.stringify(err)) | ||
| 321 | + }) | ||
| 322 | + } | ||
| 323 | + | ||
| 324 | +} | ||
| 325 | + | ||
| 326 | +@Extend(Text) function textStyle() { | ||
| 327 | + .fontColor($r('app.color.white')) | ||
| 328 | + .textStyleDefault() | ||
| 329 | + .margin({ right: '10lpx' }) | ||
| 330 | +} | ||
| 331 | + | ||
| 332 | +@Extend(Text) function textStyle2() { | ||
| 333 | + .textStyleDefault() | ||
| 334 | + .fontColor($r('app.color.color_B2FFFFFF')) | ||
| 335 | +} | ||
| 336 | + | ||
| 337 | +@Extend(Text) function textStyleDefault() { | ||
| 338 | + .textAlign(TextAlign.Start) | ||
| 339 | + .fontSize('23lpx') | ||
| 340 | + .fontWeight('400lpx') | ||
| 341 | + .lineHeight('31lpx') | ||
| 342 | +} |
| @@ -117,14 +117,14 @@ export struct BannerComponent { | @@ -117,14 +117,14 @@ export struct BannerComponent { | ||
| 117 | // 不滚动banner | 117 | // 不滚动banner |
| 118 | Stack() { | 118 | Stack() { |
| 119 | // 背景图 | 119 | // 背景图 |
| 120 | - Image(this.bannerContent.coverUrl.toString()) | 120 | + Image(this.bannerContent?.coverUrl.toString()) |
| 121 | .objectFit(ImageFit.Fill) | 121 | .objectFit(ImageFit.Fill) |
| 122 | .borderRadius(5) | 122 | .borderRadius(5) |
| 123 | 123 | ||
| 124 | // 底部标题和时间 | 124 | // 底部标题和时间 |
| 125 | Row() { | 125 | Row() { |
| 126 | // 标题 | 126 | // 标题 |
| 127 | - Text(this.bannerContent.newsTitle.toString()) | 127 | + Text(this.bannerContent?.newsTitle.toString()) |
| 128 | .fontSize(18) | 128 | .fontSize(18) |
| 129 | .fontColor(Color.White) | 129 | .fontColor(Color.White) |
| 130 | .fontWeight(600) | 130 | .fontWeight(600) |
| @@ -133,7 +133,7 @@ export struct BannerComponent { | @@ -133,7 +133,7 @@ export struct BannerComponent { | ||
| 133 | .padding({ left: 10, right: 0 ,bottom: 5 }) | 133 | .padding({ left: 10, right: 0 ,bottom: 5 }) |
| 134 | .width('80%') | 134 | .width('80%') |
| 135 | // 时间 | 135 | // 时间 |
| 136 | - if (this.bannerContent.lengthTime) { | 136 | + if (this.bannerContent?.lengthTime) { |
| 137 | Row() { | 137 | Row() { |
| 138 | Image($r('app.media.videoTypeIcon')) | 138 | Image($r('app.media.videoTypeIcon')) |
| 139 | .height(20) | 139 | .height(20) |
| @@ -6,7 +6,7 @@ import { HttpUrlUtils } from '../network/HttpUrlUtils'; | @@ -6,7 +6,7 @@ import { HttpUrlUtils } from '../network/HttpUrlUtils'; | ||
| 6 | import HashMap from '@ohos.util.HashMap'; | 6 | import HashMap from '@ohos.util.HashMap'; |
| 7 | import { ResponseDTO, WDHttp } from 'wdNetwork'; | 7 | import { ResponseDTO, WDHttp } from 'wdNetwork'; |
| 8 | import { MineAppointmentListItem } from '../viewmodel/MineAppointmentListItem'; | 8 | import { MineAppointmentListItem } from '../viewmodel/MineAppointmentListItem'; |
| 9 | -import { Logger, ResourcesUtils } from 'wdKit'; | 9 | +import { Logger, ResourcesUtils, StringUtils } from 'wdKit'; |
| 10 | import { MineFollowListDetailItem } from '../viewmodel/MineFollowListDetailItem'; | 10 | import { MineFollowListDetailItem } from '../viewmodel/MineFollowListDetailItem'; |
| 11 | import { FollowListDetailRequestItem } from '../viewmodel/FollowListDetailRequestItem'; | 11 | import { FollowListDetailRequestItem } from '../viewmodel/FollowListDetailRequestItem'; |
| 12 | import { FollowListItem } from '../viewmodel/FollowListItem'; | 12 | import { FollowListItem } from '../viewmodel/FollowListItem'; |
| @@ -16,6 +16,11 @@ import { MineCommentListDetailItem } from '../viewmodel/MineCommentListDetailIte | @@ -16,6 +16,11 @@ import { MineCommentListDetailItem } from '../viewmodel/MineCommentListDetailIte | ||
| 16 | import { FollowListStatusRequestItem } from '../viewmodel/FollowListStatusRequestItem'; | 16 | import { FollowListStatusRequestItem } from '../viewmodel/FollowListStatusRequestItem'; |
| 17 | import { MineUserLevelItem } from '../viewmodel/MineUserLevelItem'; | 17 | import { MineUserLevelItem } from '../viewmodel/MineUserLevelItem'; |
| 18 | import { MineUserDetailItem } from '../viewmodel/MineUserDetailItem'; | 18 | import { MineUserDetailItem } from '../viewmodel/MineUserDetailItem'; |
| 19 | +import { OtherUserCommentLikeStatusRequestItem } from '../viewmodel/OtherUserCommentLikeStatusRequestItem'; | ||
| 20 | +import { OtherUserCommentListRequestItem } from '../viewmodel/OtherUserCommentListRequestItem'; | ||
| 21 | +import { QueryCommentListIsLikedItem } from '../viewmodel/QueryCommentListIsLikedItem'; | ||
| 22 | +import { UserFollowListRequestItem } from '../viewmodel/UserFollowListRequestItem'; | ||
| 23 | +import { OtherUserDetailRequestItem } from '../viewmodel/OtherUserDetailRequestItem'; | ||
| 19 | const TAG = "MinePageDatasModel" | 24 | const TAG = "MinePageDatasModel" |
| 20 | 25 | ||
| 21 | /** | 26 | /** |
| @@ -427,6 +432,209 @@ class MinePageDatasModel{ | @@ -427,6 +432,209 @@ class MinePageDatasModel{ | ||
| 427 | return compRes.data | 432 | return compRes.data |
| 428 | } | 433 | } |
| 429 | 434 | ||
| 435 | + /** | ||
| 436 | + * 个人中心 获取其他用户详细信息 | ||
| 437 | + */ | ||
| 438 | + getOtherUserDetailData(item:OtherUserDetailRequestItem,context: Context): Promise<MineUserDetailItem> { | ||
| 439 | + return new Promise<MineUserDetailItem>((success, error) => { | ||
| 440 | + Logger.info(TAG, `getAppointmentList start`); | ||
| 441 | + this.fetchOtherUserDetailData(item).then((navResDTO: ResponseDTO<MineUserDetailItem>) => { | ||
| 442 | + if (!navResDTO || navResDTO.code != 0) { | ||
| 443 | + success(this.getOtherUserDetailDataLocal(context)) | ||
| 444 | + return | ||
| 445 | + } | ||
| 446 | + Logger.info(TAG, "getUserDetailData then,timeStamp:" + navResDTO.timestamp); | ||
| 447 | + let navigationBean = navResDTO.data as MineUserDetailItem | ||
| 448 | + success(navigationBean); | ||
| 449 | + }).catch((err: Error) => { | ||
| 450 | + Logger.error(TAG, `fetchMineUserDetailData catch, error.name : ${err.name}, error.message:${err.message}`); | ||
| 451 | + success(this.getOtherUserDetailDataLocal(context)) | ||
| 452 | + }) | ||
| 453 | + }) | ||
| 454 | + } | ||
| 455 | + | ||
| 456 | + fetchOtherUserDetailData(item:OtherUserDetailRequestItem) { | ||
| 457 | + let url = HttpUrlUtils.getOtherUserDetailDataUrl() | ||
| 458 | + let headers: HashMap<string, string> = HttpUrlUtils.getYcgCommonHeaders(); | ||
| 459 | + return WDHttp.post<ResponseDTO<MineUserDetailItem>>(url, item,headers) | ||
| 460 | + }; | ||
| 461 | + | ||
| 462 | + async getOtherUserDetailDataLocal(context: Context): Promise<MineUserDetailItem> { | ||
| 463 | + Logger.info(TAG, `getMineUserLevelDataLocal start`); | ||
| 464 | + let compRes: ResponseDTO<MineUserDetailItem> | null = await ResourcesUtils.getResourcesJson<ResponseDTO<MineUserDetailItem>>('other_user512157124138245_detail.json',context ); | ||
| 465 | + if (!compRes || !compRes.data) { | ||
| 466 | + Logger.info(TAG, `getMineUserDetailDataLocal compRes is empty`); | ||
| 467 | + return new MineUserDetailItem() | ||
| 468 | + } | ||
| 469 | + Logger.info(TAG, `getMineUserDetailDataLocal getResourcesJsonSync compRes : ${JSON.stringify(compRes)}`); | ||
| 470 | + return compRes.data | ||
| 471 | + } | ||
| 472 | + | ||
| 473 | + /** | ||
| 474 | + * 个人中心 获取其他用户等级 | ||
| 475 | + */ | ||
| 476 | + getOtherUserLevelData(item:string[],context: Context): Promise<MineUserLevelItem[]> { | ||
| 477 | + return new Promise<MineUserLevelItem[]>((success, error) => { | ||
| 478 | + Logger.info(TAG, `getAppointmentList start`); | ||
| 479 | + this.fetchOtherUserLevelData(item).then((navResDTO: ResponseDTO<MineUserLevelItem[]>) => { | ||
| 480 | + if (!navResDTO || navResDTO.code != 0) { | ||
| 481 | + success(this.getOtherUserLevelDataLocal(context)) | ||
| 482 | + return | ||
| 483 | + } | ||
| 484 | + Logger.info(TAG, "getAppointmentList then,AppointmentResDTO.timeStamp:" + navResDTO.timestamp); | ||
| 485 | + let navigationBean = navResDTO.data as MineUserLevelItem[] | ||
| 486 | + if(navigationBean.length>0 && StringUtils.isNotEmpty(navigationBean[0].levelHead)){ | ||
| 487 | + success(navigationBean); | ||
| 488 | + }else{ | ||
| 489 | + success(this.getOtherUserLevelDataLocal(context)) | ||
| 490 | + } | ||
| 491 | + }).catch((err: Error) => { | ||
| 492 | + Logger.error(TAG, `fetchMineUserLevelData catch, error.name : ${err.name}, error.message:${err.message}`); | ||
| 493 | + success(this.getOtherUserLevelDataLocal(context)) | ||
| 494 | + }) | ||
| 495 | + }) | ||
| 496 | + } | ||
| 497 | + | ||
| 498 | + fetchOtherUserLevelData(item:string[]) { | ||
| 499 | + let url = HttpUrlUtils.getOtherUserLevelDataUrl() | ||
| 500 | + let headers: HashMap<string, string> = HttpUrlUtils.getYcgCommonHeaders(); | ||
| 501 | + return WDHttp.post<ResponseDTO<MineUserLevelItem[]>>(url,item, headers) | ||
| 502 | + }; | ||
| 503 | + | ||
| 504 | + async getOtherUserLevelDataLocal(context: Context): Promise<MineUserLevelItem[]> { | ||
| 505 | + Logger.info(TAG, `getMineUserLevelDataLocal start`); | ||
| 506 | + let compRes: ResponseDTO<MineUserLevelItem[]> | null = await ResourcesUtils.getResourcesJson<ResponseDTO<MineUserLevelItem[]>>('other_user512157124138245_level.json' ,context); | ||
| 507 | + if (!compRes || !compRes.data) { | ||
| 508 | + Logger.info(TAG, `getMineUserLevelDataLocal compRes is empty`); | ||
| 509 | + return [] | ||
| 510 | + } | ||
| 511 | + Logger.info(TAG, `getMineUserLevelDataLocal getResourcesJsonSync compRes : ${JSON.stringify(compRes)}`); | ||
| 512 | + return compRes.data | ||
| 513 | + } | ||
| 514 | + | ||
| 515 | + /** | ||
| 516 | + * 其他用户的评论列表 | ||
| 517 | + * @param params | ||
| 518 | + * @param context | ||
| 519 | + * @returns | ||
| 520 | + */ | ||
| 521 | + getOtherCommentListData(params:OtherUserCommentListRequestItem,context: Context): Promise<MineCommentListDetailItem> { | ||
| 522 | + return new Promise<MineCommentListDetailItem>((success, error) => { | ||
| 523 | + Logger.info(TAG, `getAppointmentList start`); | ||
| 524 | + this.fetchOtherCommentListData(params).then((navResDTO: ResponseDTO<MineCommentListDetailItem>) => { | ||
| 525 | + if (!navResDTO || navResDTO.code != 0) { | ||
| 526 | + success(this.getOtherCommentListDataLocal(context)) | ||
| 527 | + return | ||
| 528 | + } | ||
| 529 | + Logger.info(TAG, "getAppointmentList then,AppointmentResDTO.timeStamp:" + navResDTO.timestamp); | ||
| 530 | + let navigationBean = navResDTO.data as MineCommentListDetailItem | ||
| 531 | + success(navigationBean); | ||
| 532 | + }).catch((err: Error) => { | ||
| 533 | + Logger.error(TAG, `fetchAppointmentListDataApi catch, error.name : ${err.name}, error.message:${err.message}`); | ||
| 534 | + success(this.getOtherCommentListDataLocal(context)) | ||
| 535 | + }) | ||
| 536 | + }) | ||
| 537 | + } | ||
| 538 | + | ||
| 539 | + fetchOtherCommentListData(object:OtherUserCommentListRequestItem) { | ||
| 540 | + let url = HttpUrlUtils.getOtherCommentListDataUrl()+`?pageSize=${object.pageSize}&pageNum=${object.pageNum}&creatorId=${object.creatorId}&time=${object.time}&userType=${object.userType}&userId=${object.userId}` | ||
| 541 | + let headers: HashMap<string, string> = HttpUrlUtils.getYcgCommonHeaders(); | ||
| 542 | + return WDHttp.get<ResponseDTO<MineCommentListDetailItem>>(url, headers) | ||
| 543 | + }; | ||
| 544 | + | ||
| 545 | + async getOtherCommentListDataLocal(context: Context): Promise<MineCommentListDetailItem> { | ||
| 546 | + Logger.info(TAG, `getMineFollowListDataLocal start`); | ||
| 547 | + let compRes: ResponseDTO<MineCommentListDetailItem> | null = await ResourcesUtils.getResourcesJson<ResponseDTO<MineCommentListDetailItem>>('other_user512157124138245_comment_list_data.json' ,context); | ||
| 548 | + if (!compRes || !compRes.data) { | ||
| 549 | + Logger.info(TAG, `getMineFollowListDataLocal compRes is empty`); | ||
| 550 | + return new MineCommentListDetailItem() | ||
| 551 | + } | ||
| 552 | + Logger.info(TAG, `getMineFollowListDataLocal getResourcesJsonSync compRes : ${JSON.stringify(compRes)}`); | ||
| 553 | + return compRes.data | ||
| 554 | + } | ||
| 555 | + | ||
| 556 | + /** | ||
| 557 | + * 查询是否点赞了这条评论 | ||
| 558 | + * @param params | ||
| 559 | + * @param context | ||
| 560 | + * @returns | ||
| 561 | + */ | ||
| 562 | + getOtherUserCommentLikeStatusData(params:OtherUserCommentLikeStatusRequestItem,context: Context): Promise<QueryCommentListIsLikedItem[]> { | ||
| 563 | + return new Promise<QueryCommentListIsLikedItem[]>((success, error) => { | ||
| 564 | + Logger.info(TAG, `getAppointmentList start`); | ||
| 565 | + this.fetchOtherUserCommentLikeStatusData(params).then((navResDTO: ResponseDTO<QueryCommentListIsLikedItem[]>) => { | ||
| 566 | + if (!navResDTO || navResDTO.code != 0) { | ||
| 567 | + success(this.getOtherUserCommentLikeStatusDataLocal(context)) | ||
| 568 | + return | ||
| 569 | + } | ||
| 570 | + Logger.info(TAG, "getAppointmentList then,AppointmentResDTO.timeStamp:" + navResDTO.timestamp); | ||
| 571 | + let navigationBean = navResDTO.data as QueryCommentListIsLikedItem[] | ||
| 572 | + success(navigationBean); | ||
| 573 | + }).catch((err: Error) => { | ||
| 574 | + Logger.error(TAG, `fetchAppointmentListDataApi catch, error.name : ${err.name}, error.message:${err.message}`); | ||
| 575 | + success(this.getOtherUserCommentLikeStatusDataLocal(context)) | ||
| 576 | + }) | ||
| 577 | + }) | ||
| 578 | + } | ||
| 579 | + | ||
| 580 | + fetchOtherUserCommentLikeStatusData(object:OtherUserCommentLikeStatusRequestItem) { | ||
| 581 | + let url = HttpUrlUtils.getFollowListStatusDataUrl() | ||
| 582 | + let headers: HashMap<string, string> = HttpUrlUtils.getYcgCommonHeaders(); | ||
| 583 | + return WDHttp.post<ResponseDTO<QueryCommentListIsLikedItem[]>>(url,object, headers) | ||
| 584 | + }; | ||
| 585 | + | ||
| 586 | + async getOtherUserCommentLikeStatusDataLocal(context: Context): Promise<QueryCommentListIsLikedItem[]> { | ||
| 587 | + Logger.info(TAG, `getMineFollowListDataLocal start`); | ||
| 588 | + let compRes: ResponseDTO<QueryCommentListIsLikedItem[]> | null = await ResourcesUtils.getResourcesJson<ResponseDTO<QueryCommentListIsLikedItem[]>>('other_user512157124138245_comment_list_liked_data.json',context ); | ||
| 589 | + if (!compRes || !compRes.data) { | ||
| 590 | + Logger.info(TAG, `getMineFollowListDataLocal compRes is empty`); | ||
| 591 | + return [] | ||
| 592 | + } | ||
| 593 | + Logger.info(TAG, `getMineFollowListDataLocal getResourcesJsonSync compRes : ${JSON.stringify(compRes)}`); | ||
| 594 | + return compRes.data | ||
| 595 | + } | ||
| 596 | + | ||
| 597 | + /** | ||
| 598 | + * 其他用户的关注列表 | ||
| 599 | + * @param params | ||
| 600 | + * @param context | ||
| 601 | + * @returns | ||
| 602 | + */ | ||
| 603 | + getOtherUserFollowListData(params:UserFollowListRequestItem,context: Context): Promise<MineFollowListItem> { | ||
| 604 | + return new Promise<MineFollowListItem>((success, error) => { | ||
| 605 | + Logger.info(TAG, `getAppointmentList start`); | ||
| 606 | + this.fetchOtherUserFollowListData(params).then((navResDTO: ResponseDTO<MineFollowListItem>) => { | ||
| 607 | + if (!navResDTO || navResDTO.code != 0) { | ||
| 608 | + success(this.getOtherUserFollowListDataLocal(context)) | ||
| 609 | + return | ||
| 610 | + } | ||
| 611 | + Logger.info(TAG, "getAppointmentList then,AppointmentResDTO.timeStamp:" + navResDTO.timestamp); | ||
| 612 | + let navigationBean = navResDTO.data as MineFollowListItem | ||
| 613 | + success(navigationBean); | ||
| 614 | + }).catch((err: Error) => { | ||
| 615 | + Logger.error(TAG, `fetchAppointmentListDataApi catch, error.name : ${err.name}, error.message:${err.message}`); | ||
| 616 | + success(this.getOtherUserFollowListDataLocal(context)) | ||
| 617 | + }) | ||
| 618 | + }) | ||
| 619 | + } | ||
| 620 | + | ||
| 621 | + fetchOtherUserFollowListData(object:UserFollowListRequestItem) { | ||
| 622 | + let url = HttpUrlUtils.getOtherUserFollowListDataUrl()+`?pageSize=${object.pageSize}&pageNum=${object.pageNum}&queryUserId=${object.queryUserId}&userType=${object.userType}&userId=${"567387477063621"}` | ||
| 623 | + let headers: HashMap<string, string> = HttpUrlUtils.getYcgCommonHeaders(); | ||
| 624 | + return WDHttp.get<ResponseDTO<MineFollowListItem>>(url, headers) | ||
| 625 | + }; | ||
| 626 | + | ||
| 627 | + async getOtherUserFollowListDataLocal(context: Context): Promise<MineFollowListItem> { | ||
| 628 | + Logger.info(TAG, `getMineFollowListDataLocal start`); | ||
| 629 | + let compRes: ResponseDTO<MineFollowListItem> | null = await ResourcesUtils.getResourcesJson<ResponseDTO<MineFollowListItem>>('other_user_follow_list_data.json',context ); | ||
| 630 | + if (!compRes || !compRes.data) { | ||
| 631 | + Logger.info(TAG, `getMineFollowListDataLocal compRes is empty`); | ||
| 632 | + return new MineFollowListItem() | ||
| 633 | + } | ||
| 634 | + Logger.info(TAG, `getMineFollowListDataLocal getResourcesJsonSync compRes : ${JSON.stringify(compRes)}`); | ||
| 635 | + return compRes.data | ||
| 636 | + } | ||
| 637 | + | ||
| 430 | } | 638 | } |
| 431 | 639 | ||
| 432 | const minePageDatasModel = MinePageDatasModel.getInstance() | 640 | const minePageDatasModel = MinePageDatasModel.getInstance() |
| @@ -76,10 +76,28 @@ export class HttpUrlUtils { | @@ -76,10 +76,28 @@ export class HttpUrlUtils { | ||
| 76 | static readonly MINE_USER_LEVEL_DATA_PATH: string = "/api/rmrb-user-point/auth/level/zh/c/queryUserLevel"; | 76 | static readonly MINE_USER_LEVEL_DATA_PATH: string = "/api/rmrb-user-point/auth/level/zh/c/queryUserLevel"; |
| 77 | 77 | ||
| 78 | /** | 78 | /** |
| 79 | + * 个人中心 APP获取其他用户等级 | ||
| 80 | + */ | ||
| 81 | + static readonly OTHER_USER_LEVEL_DATA_PATH: string = "/api/rmrb-user-point/auth/level/zh/c/batchUser"; | ||
| 82 | + | ||
| 83 | + /** | ||
| 79 | * 个人中心 (号主/普通用户)我的基本信息 | 84 | * 个人中心 (号主/普通用户)我的基本信息 |
| 80 | */ | 85 | */ |
| 81 | static readonly MINE_USER_DETAIL_DATA_PATH: string = "/api/rmrb-contact/contact/zh/c/my/detail"; | 86 | static readonly MINE_USER_DETAIL_DATA_PATH: string = "/api/rmrb-contact/contact/zh/c/my/detail"; |
| 82 | 87 | ||
| 88 | + /** | ||
| 89 | + * 个人中心 (普通用户)其他用户 的基本信息 | ||
| 90 | + */ | ||
| 91 | + static readonly OTHER_USER_DETAIL_DATA_PATH: string = "/api/rmrb-contact/contact/zh/c/master/detail"; | ||
| 92 | + /** | ||
| 93 | + * 个人中心 其他用户的评论列表 | ||
| 94 | + */ | ||
| 95 | + static readonly OTHER_COMMENT_LIST_DATA_PATH: string = "/api/rmrb-comment/comment/zh/c/othersCommentList"; | ||
| 96 | + /** | ||
| 97 | + * 个人中心 我的关注列表 | ||
| 98 | + */ | ||
| 99 | + static readonly OTHER_USER_FOLLOW_LIST_DATA_PATH: string = "/api/rmrb-interact/interact/zh/c/userAttention/list"; | ||
| 100 | + | ||
| 83 | private static hostUrl: string = HttpUrlUtils.HOST_UAT; | 101 | private static hostUrl: string = HttpUrlUtils.HOST_UAT; |
| 84 | 102 | ||
| 85 | static getCommonHeaders(): HashMap<string, string> { | 103 | static getCommonHeaders(): HashMap<string, string> { |
| @@ -200,6 +218,27 @@ export class HttpUrlUtils { | @@ -200,6 +218,27 @@ export class HttpUrlUtils { | ||
| 200 | return url | 218 | return url |
| 201 | } | 219 | } |
| 202 | 220 | ||
| 221 | + static getOtherUserLevelDataUrl() { | ||
| 222 | + let url = HttpUrlUtils.HOST_SIT + HttpUrlUtils.OTHER_USER_LEVEL_DATA_PATH | ||
| 223 | + return url | ||
| 224 | + } | ||
| 225 | + | ||
| 226 | + static getOtherUserDetailDataUrl() { | ||
| 227 | + let url = HttpUrlUtils.HOST_SIT + HttpUrlUtils.OTHER_USER_DETAIL_DATA_PATH | ||
| 228 | + return url | ||
| 229 | + } | ||
| 230 | + | ||
| 231 | + static getOtherCommentListDataUrl() { | ||
| 232 | + let url = HttpUrlUtils.HOST_SIT + HttpUrlUtils.OTHER_COMMENT_LIST_DATA_PATH | ||
| 233 | + return url | ||
| 234 | + } | ||
| 235 | + | ||
| 236 | + static getOtherUserFollowListDataUrl() { | ||
| 237 | + let url = HttpUrlUtils.HOST_SIT + HttpUrlUtils.OTHER_USER_FOLLOW_LIST_DATA_PATH | ||
| 238 | + return url | ||
| 239 | + } | ||
| 240 | + | ||
| 241 | + | ||
| 203 | 242 | ||
| 204 | static getYcgCommonHeaders(): HashMap<string, string> { | 243 | static getYcgCommonHeaders(): HashMap<string, string> { |
| 205 | let headers: HashMap<string, string> = new HashMap<string, string>() | 244 | let headers: HashMap<string, string> = new HashMap<string, string>() |
| @@ -10,9 +10,7 @@ class RouteManager{ | @@ -10,9 +10,7 @@ class RouteManager{ | ||
| 10 | jumpNewPage(target_url: string,params?: Object){ | 10 | jumpNewPage(target_url: string,params?: Object){ |
| 11 | router.pushUrl({ | 11 | router.pushUrl({ |
| 12 | url: target_url, | 12 | url: target_url, |
| 13 | - params: { | ||
| 14 | - params | ||
| 15 | - } | 13 | + params |
| 16 | }).catch((error: Error) => { | 14 | }).catch((error: Error) => { |
| 17 | console.log(TAG,JSON.stringify(error)); | 15 | console.log(TAG,JSON.stringify(error)); |
| 18 | }); | 16 | }); |
| @@ -7,12 +7,18 @@ export class CommentListItem{ | @@ -7,12 +7,18 @@ export class CommentListItem{ | ||
| 7 | commentContent:string = "" | 7 | commentContent:string = "" |
| 8 | targetTitle:string = "" | 8 | targetTitle:string = "" |
| 9 | createTime:string = "" | 9 | createTime:string = "" |
| 10 | + likeNum:number = 0 | ||
| 11 | + like_status:number = 0 | ||
| 12 | + id:number = 0 | ||
| 10 | 13 | ||
| 11 | - constructor(fromUserHeader:string,fromUserName:string,targetTitle:string,createTime:string,commentContent:string ) { | 14 | + constructor(fromUserHeader:string,fromUserName:string,targetTitle:string,createTime:string,commentContent:string,likeNum:number,like_status:number,id:number) { |
| 12 | this.fromUserHeader = fromUserHeader | 15 | this.fromUserHeader = fromUserHeader |
| 13 | this.fromUserName = fromUserName | 16 | this.fromUserName = fromUserName |
| 14 | this.commentContent = commentContent | 17 | this.commentContent = commentContent |
| 15 | this.targetTitle = targetTitle | 18 | this.targetTitle = targetTitle |
| 16 | this.createTime = createTime | 19 | this.createTime = createTime |
| 20 | + this.likeNum = likeNum | ||
| 21 | + this.like_status = like_status | ||
| 22 | + this.id = id | ||
| 17 | } | 23 | } |
| 18 | } | 24 | } |
| @@ -67,6 +67,7 @@ export class FollowListDetailItem{ | @@ -67,6 +67,7 @@ export class FollowListDetailItem{ | ||
| 67 | introduction:string //介绍 | 67 | introduction:string //介绍 |
| 68 | status:string = "0" //是否已经关注 | 68 | status:string = "0" //是否已经关注 |
| 69 | creatorId:string = "" | 69 | creatorId:string = "" |
| 70 | + attentionUserId:string = "" | ||
| 70 | 71 | ||
| 71 | attentionCreatorId:string = "" | 72 | attentionCreatorId:string = "" |
| 72 | attentionHeadPhotoUrl:string = "" | 73 | attentionHeadPhotoUrl:string = "" |
| @@ -74,12 +75,13 @@ export class FollowListDetailItem{ | @@ -74,12 +75,13 @@ export class FollowListDetailItem{ | ||
| 74 | fansNum :number = 0 | 75 | fansNum :number = 0 |
| 75 | 76 | ||
| 76 | 77 | ||
| 77 | - constructor(headPhotoUrl:string,cnUserName:string,cnFansNum:number,introduction:string,creatorId:string,status:string ) { | 78 | + constructor(headPhotoUrl:string,cnUserName:string,cnFansNum:number,introduction:string,creatorId:string,status:string,attentionUserId:string) { |
| 78 | this.headPhotoUrl = headPhotoUrl | 79 | this.headPhotoUrl = headPhotoUrl |
| 79 | this.cnUserName = cnUserName | 80 | this.cnUserName = cnUserName |
| 80 | this.cnFansNum = cnFansNum | 81 | this.cnFansNum = cnFansNum |
| 81 | this.introduction = introduction | 82 | this.introduction = introduction |
| 82 | this.creatorId = creatorId | 83 | this.creatorId = creatorId |
| 83 | this.status = status | 84 | this.status = status |
| 85 | + this.attentionUserId = attentionUserId | ||
| 84 | } | 86 | } |
| 85 | } | 87 | } |
PeopleDaily_Harmony/wdComponent/src/main/ets/viewmodel/OtherUserCommentListRequestItem.ets
0 → 100644
| 1 | +export class OtherUserCommentListRequestItem { | ||
| 2 | + creatorId: string = "" | ||
| 3 | + pageSize: number = 20 | ||
| 4 | + pageNum: number = 1 | ||
| 5 | + time: string = "" | ||
| 6 | + userType: string = "1" | ||
| 7 | + userId: string = "" | ||
| 8 | + | ||
| 9 | + constructor(creatorId: string, pageSize: number, | ||
| 10 | + pageNum: number, | ||
| 11 | + time: string, | ||
| 12 | + userType: string, | ||
| 13 | + userId: string) { | ||
| 14 | + this.creatorId = creatorId | ||
| 15 | + this.pageSize = pageSize | ||
| 16 | + this.pageNum = pageNum | ||
| 17 | + this.time = time | ||
| 18 | + this.userType = userType | ||
| 19 | + this.userId = userId | ||
| 20 | + } | ||
| 21 | +} |
| 1 | +export class OtherUserDetailRequestItem { | ||
| 2 | + creatorId: string = "" | ||
| 3 | + userType: string = "1" | ||
| 4 | + userId: string = "-1" | ||
| 5 | + | ||
| 6 | + constructor(creatorId: string , | ||
| 7 | + userType: string, | ||
| 8 | + userId: string ) { | ||
| 9 | + this.creatorId = creatorId | ||
| 10 | + this.userType = userType | ||
| 11 | + this.userId = userId | ||
| 12 | + } | ||
| 13 | + | ||
| 14 | +} |
| 1 | +export class UserFollowListRequestItem{ | ||
| 2 | + queryUserId:number = -1 | ||
| 3 | + pageSize:number = 20 | ||
| 4 | + pageNum:number = 1 | ||
| 5 | + userType:string = "1" | ||
| 6 | + | ||
| 7 | + constructor(queryUserId:number, pageSize:number, pageNum:number, userType:string) { | ||
| 8 | + this.queryUserId = queryUserId | ||
| 9 | + this.pageSize = pageSize | ||
| 10 | + this.pageNum = pageNum | ||
| 11 | + this.userType = userType | ||
| 12 | + } | ||
| 13 | +} |
533 Bytes
403 Bytes
-
Please register or login to post a comment