yangchenggong1_wd

desc:同步 4.0

Showing 30 changed files with 1920 additions and 40 deletions
... ... @@ -6,12 +6,10 @@ import { Params } from 'wdComponent/src/main/ets/repository/bean/Params';
@Entry
@Component
struct FollowListPage {
@State params:Params = router.getParams() as Params;
@State curIndex: string = '0';
onPageShow() {
this.curIndex = "1";
this.curIndex = router.getParams()?.["index"];
}
build() {
... ...
import { OtherUserHomeComponent } from 'wdComponent'
import router from '@ohos.router';
@Entry
@Component
struct OtherNormalUserHomePage {
@State userId: string = "111111111";
onPageShow() {
this.userId = router.getParams()?.["userId"]
console.log("ycg","==="+this.userId);
}
build() {
Column() {
OtherUserHomeComponent({curUserId:this.userId})
}
.height('100%')
.width('100%')
}
}
\ No newline at end of file
... ...
... ... @@ -10,6 +10,7 @@
"pages/AppointmentListPage",
"pages/SettingPasswordPage",
"pages/FollowListPage",
"pages/MyHomePage"
"pages/MyHomePage",
"pages/OtherNormalUserHomePage"
]
}
\ No newline at end of file
... ...
{
"code": "0",
"data": {
"hasNext": 0,
"list": [
{
"avatarFrame": "",
"checkStatus": 2,
"commentContent": "方法就是\\ud83d\\udc4d",
"commentContentSensitive": "",
"commentLevel": 1,
"commentPics": "",
"commentSensitive": "",
"commentType": "2",
"createTime": "2024-02-19 14:14:16",
"fromCreatorId": "",
"fromDeviceId": "F0B98E7F-6479-462C-BA25-5FC574511C8A",
"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",
"fromUserId": "512157124138245",
"fromUserName": "树下🍑 1122334",
"fromUserType": 1,
"h5Url": "",
"id": 403445,
"keyArticle": 0,
"likeNum": 3,
"pageId": null,
"parentCommentVo": null,
"parentId": -1,
"rootCommentId": 403445,
"sensitiveExist": 0,
"sensitiveShow": 1,
"shareInfo": {
"shareCoverUrl": "http://sitcontentjdcdn.aikan.pdnews.cn/zhbj-20231012/image/content/7f1a342a809d4276aa975ba9e7fe2313.png",
"shareSummary": "这是一个开始、请持续关注这是一个开始、请持续关注这是一个开始、请持续关注这是一个开始、请持续关注这是",
"shareTitle": "这是一个开始、请持续关注这是一个开始、请",
"shareUrl": "https://pd-people-sit.pdnews.cn/column/30000633703-500000008559"
},
"targetId": "30000633703",
"targetRelId": "500000008559",
"targetRelObjectId": "2002",
"targetRelType": 1,
"targetStatus": 0,
"targetTitle": "这是一个开始、请持续关注这是一个开始、请持续关注这是一个开始、请持续关注这是一个开始、请持续关注这是一个开始、请持续关注这是一个开始、请持续关注这是一个开始、请持续关注",
"targetType": 8,
"topicType": null,
"uuid": "5901a353-79aa-4b81-81d7-f6f13f0a6817"
},
{
"avatarFrame": "",
"checkStatus": 2,
"commentContent": "毕业",
"commentContentSensitive": "",
"commentLevel": 1,
"commentPics": "",
"commentSensitive": "",
"commentType": "2",
"createTime": "2024-01-29 17:39:04",
"fromCreatorId": "",
"fromDeviceId": "",
"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",
"fromUserId": "512157124138245",
"fromUserName": "树下🍑 1122334",
"fromUserType": 1,
"h5Url": "",
"id": 303318,
"keyArticle": 0,
"likeNum": 0,
"pageId": null,
"parentCommentVo": null,
"parentId": -1,
"rootCommentId": 303318,
"sensitiveExist": 0,
"sensitiveShow": 1,
"shareInfo": {
"shareCoverUrl": "http://sitcontentjdcdn.aikan.pdnews.cn/zhbj-20230923/image/content/4b8f615d1b134546aa4903300c38fb5b.png",
"shareSummary": "人民日报,有品质的新闻",
"shareTitle": "【广东爱情故事】人在广东已经漂泊十年",
"shareUrl": "https://pd-people-sit.pdnews.cn/column/30000627490-500000007811"
},
"targetId": "30000627490",
"targetRelId": "500000007811",
"targetRelObjectId": "10000002083",
"targetRelType": 2,
"targetStatus": 0,
"targetTitle": "【广东爱情故事】人在广东已经漂泊十年",
"targetType": 13,
"topicType": null,
"uuid": "59339983-a9ee-4054-98aa-0eddbc6275a1"
},
{
"avatarFrame": "",
"checkStatus": 2,
"commentContent": "索尼👍",
"commentContentSensitive": "",
"commentLevel": 1,
"commentPics": "",
"commentSensitive": "",
"commentType": "2",
"createTime": "2024-01-29 17:38:56",
"fromCreatorId": "",
"fromDeviceId": "",
"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",
"fromUserId": "512157124138245",
"fromUserName": "树下🍑 1122334",
"fromUserType": 1,
"h5Url": "",
"id": 303317,
"keyArticle": 0,
"likeNum": 0,
"pageId": null,
"parentCommentVo": null,
"parentId": -1,
"rootCommentId": 303317,
"sensitiveExist": 0,
"sensitiveShow": 1,
"shareInfo": {
"shareCoverUrl": "http://sitcontentjdcdn.aikan.pdnews.cn/zhbj-20230923/image/content/4b8f615d1b134546aa4903300c38fb5b.png",
"shareSummary": "人民日报,有品质的新闻",
"shareTitle": "【广东爱情故事】人在广东已经漂泊十年",
"shareUrl": "https://pd-people-sit.pdnews.cn/column/30000627490-500000007811"
},
"targetId": "30000627490",
"targetRelId": "500000007811",
"targetRelObjectId": "10000002083",
"targetRelType": 2,
"targetStatus": 0,
"targetTitle": "【广东爱情故事】人在广东已经漂泊十年",
"targetType": 13,
"topicType": null,
"uuid": "8808cffa-6496-4dc9-ac79-a65c8ada09d2"
},
{
"avatarFrame": "",
"checkStatus": 2,
"commentContent": "游客评论苹果",
"commentContentSensitive": "",
"commentLevel": 1,
"commentPics": "",
"commentSensitive": "",
"commentType": "2",
"createTime": "2024-01-27 15:00:24",
"fromCreatorId": "",
"fromDeviceId": "F0B98E7F-6479-462C-BA25-5FC574511C8A",
"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",
"fromUserId": "512157124138245",
"fromUserName": "树下🍑 1122334",
"fromUserType": 1,
"h5Url": "",
"id": 403426,
"keyArticle": 0,
"likeNum": 1,
"pageId": null,
"parentCommentVo": null,
"parentId": -1,
"rootCommentId": 403426,
"sensitiveExist": 0,
"sensitiveShow": 1,
"shareInfo": {
"shareCoverUrl": "http://sitcontentjdcdn.aikan.pdnews.cn/zhbj-20231012/image/content/7f1a342a809d4276aa975ba9e7fe2313.png",
"shareSummary": "这是一个开始、请持续关注这是一个开始、请持续关注这是一个开始、请持续关注这是一个开始、请持续关注这是",
"shareTitle": "这是一个开始、请持续关注这是一个开始、请",
"shareUrl": "https://pd-people-sit.pdnews.cn/column/30000633703-500000008559"
},
"targetId": "30000633703",
"targetRelId": "500000008559",
"targetRelObjectId": "2002",
"targetRelType": 1,
"targetStatus": 0,
"targetTitle": "这是一个开始、请持续关注这是一个开始、请持续关注这是一个开始、请持续关注这是一个开始、请持续关注这是一个开始、请持续关注这是一个开始、请持续关注这是一个开始、请持续关注",
"targetType": 8,
"topicType": null,
"uuid": "a272d091-3697-44ca-95e6-532028eee776"
},
{
"avatarFrame": "",
"checkStatus": 2,
"commentContent": "游客账号评论安卓",
"commentContentSensitive": "",
"commentLevel": 1,
"commentPics": "",
"commentSensitive": "",
"commentType": "2",
"createTime": "2024-01-27 15:00:15",
"fromCreatorId": "",
"fromDeviceId": "23c43f15-37e9-3f2d-9999-bd1abbb7e0ed",
"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",
"fromUserId": "512157124138245",
"fromUserName": "树下🍑 1122334",
"fromUserType": 1,
"h5Url": "",
"id": 403425,
"keyArticle": 0,
"likeNum": 0,
"pageId": null,
"parentCommentVo": null,
"parentId": -1,
"rootCommentId": 403425,
"sensitiveExist": 0,
"sensitiveShow": 1,
"shareInfo": {
"shareCoverUrl": "http://sitcontentjdcdn.aikan.pdnews.cn/zhbj-20231012/image/content/7f1a342a809d4276aa975ba9e7fe2313.png",
"shareSummary": "这是一个开始、请持续关注这是一个开始、请持续关注这是一个开始、请持续关注这是一个开始、请持续关注这是",
"shareTitle": "这是一个开始、请持续关注这是一个开始、请",
"shareUrl": "https://pd-people-sit.pdnews.cn/column/30000633703-500000008559"
},
"targetId": "30000633703",
"targetRelId": "500000008559",
"targetRelObjectId": "2002",
"targetRelType": 1,
"targetStatus": 0,
"targetTitle": "这是一个开始、请持续关注这是一个开始、请持续关注这是一个开始、请持续关注这是一个开始、请持续关注这是一个开始、请持续关注这是一个开始、请持续关注这是一个开始、请持续关注",
"targetType": 8,
"topicType": null,
"uuid": "62225e7a-9afd-4b8c-b9b6-71a5d610997d"
},
{
"avatarFrame": "",
"checkStatus": 2,
"commentContent": "你理解吗",
"commentContentSensitive": "",
"commentLevel": 1,
"commentPics": "",
"commentSensitive": "",
"commentType": "2",
"createTime": "2024-01-27 14:45:21",
"fromCreatorId": "",
"fromDeviceId": "23c43f15-37e9-3f2d-9999-bd1abbb7e0ed",
"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",
"fromUserId": "512157124138245",
"fromUserName": "树下🍑 1122334",
"fromUserType": 1,
"h5Url": "",
"id": 403422,
"keyArticle": 0,
"likeNum": 0,
"pageId": null,
"parentCommentVo": null,
"parentId": -1,
"rootCommentId": 403422,
"sensitiveExist": 0,
"sensitiveShow": 1,
"shareInfo": {
"shareCoverUrl": "http://sitcontentjdcdn.aikan.pdnews.cn/zhbj-20231130/image/content/09ee931569d34781b9bbe85f5348873f.jpg",
"shareSummary": "人民日报,有品质的新闻",
"shareTitle": "点亮香港“小航天迷”的“太空梦”——内地航天专家走进香港中小学校园",
"shareUrl": "https://pd-people-sit.pdnews.cn/rmhphotos/30000650925"
},
"targetId": "30000650925",
"targetRelId": "500000013228",
"targetRelObjectId": "2058",
"targetRelType": 1,
"targetStatus": 0,
"targetTitle": "点亮香港“小航天迷”的“太空梦”——内地航天专家走进香港中小学校园",
"targetType": 9,
"topicType": null,
"uuid": "cc6b2322-ffa4-4a59-a7af-5e4a18afcbd3"
},
{
"avatarFrame": "",
"checkStatus": 2,
"commentContent": "你好我是游客",
"commentContentSensitive": "",
"commentLevel": 1,
"commentPics": "",
"commentSensitive": "",
"commentType": "2",
"createTime": "2024-01-27 14:40:19",
"fromCreatorId": "",
"fromDeviceId": "23c43f15-37e9-3f2d-9999-bd1abbb7e0ed",
"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",
"fromUserId": "512157124138245",
"fromUserName": "树下🍑 1122334",
"fromUserType": 1,
"h5Url": "",
"id": 303306,
"keyArticle": 0,
"likeNum": 0,
"pageId": null,
"parentCommentVo": null,
"parentId": -1,
"rootCommentId": 303306,
"sensitiveExist": 0,
"sensitiveShow": 1,
"shareInfo": {
"shareCoverUrl": "http://sitcontentjdcdn.aikan.pdnews.cn/zhbj-20231130/image/content/09ee931569d34781b9bbe85f5348873f.jpg",
"shareSummary": "人民日报,有品质的新闻",
"shareTitle": "点亮香港“小航天迷”的“太空梦”——内地航天专家走进香港中小学校园",
"shareUrl": "https://pd-people-sit.pdnews.cn/rmhphotos/30000650925"
},
"targetId": "30000650925",
"targetRelId": "500000013228",
"targetRelObjectId": "2058",
"targetRelType": 1,
"targetStatus": 0,
"targetTitle": "点亮香港“小航天迷”的“太空梦”——内地航天专家走进香港中小学校园",
"targetType": 9,
"topicType": null,
"uuid": "9fac53da-603f-444a-8807-4f5feacf55bb"
},
{
"avatarFrame": "",
"checkStatus": 2,
"commentContent": "你好我是游客",
"commentContentSensitive": "",
"commentLevel": 1,
"commentPics": "",
"commentSensitive": "",
"commentType": "2",
"createTime": "2024-01-27 14:34:30",
"fromCreatorId": "",
"fromDeviceId": "23c43f15-37e9-3f2d-9999-bd1abbb7e0ed",
"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",
"fromUserId": "512157124138245",
"fromUserName": "树下🍑 1122334",
"fromUserType": 1,
"h5Url": "",
"id": 403420,
"keyArticle": 0,
"likeNum": 0,
"pageId": null,
"parentCommentVo": null,
"parentId": -1,
"rootCommentId": 403420,
"sensitiveExist": 0,
"sensitiveShow": 1,
"shareInfo": {
"shareCoverUrl": "http://sitcontentjdcdn.aikan.pdnews.cn/image/creator/2024012911/f2f9fe93ca464d05bc0407a385ad877b.png",
"shareSummary": "爸爸角色扮演医生,在宝蓝比赛摔倒的时候悉心照顾,其他小朋友也要注意呀!",
"shareTitle": "爸爸角色扮演医生,在宝蓝比赛摔倒的时候悉心照顾,其他小朋友也要注意呀!",
"shareUrl": "https://pd-people-sit.pdnews.cn/rmhvideo/30000716043"
},
"targetId": "30000716043",
"targetRelId": "500000030952",
"targetRelObjectId": "2058",
"targetRelType": 1,
"targetStatus": 0,
"targetTitle": "爸爸角色扮演医生,在宝蓝比赛摔倒的时候悉心照顾,其他小朋友也要注意呀!",
"targetType": 1,
"topicType": null,
"uuid": "31305151-6b9c-49ea-8e5b-9e4b8fffe79d"
},
{
"avatarFrame": "",
"checkStatus": 2,
"commentContent": "游客账号",
"commentContentSensitive": "",
"commentLevel": 1,
"commentPics": "",
"commentSensitive": "",
"commentType": "2",
"createTime": "2024-01-27 14:27:52",
"fromCreatorId": "",
"fromDeviceId": "23c43f15-37e9-3f2d-9999-bd1abbb7e0ed",
"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",
"fromUserId": "512157124138245",
"fromUserName": "树下🍑 1122334",
"fromUserType": 1,
"h5Url": "",
"id": 403417,
"keyArticle": 0,
"likeNum": 0,
"pageId": null,
"parentCommentVo": null,
"parentId": -1,
"rootCommentId": 403417,
"sensitiveExist": 0,
"sensitiveShow": 1,
"shareInfo": {
"shareCoverUrl": "",
"shareSummary": "人民日报,有品质的新闻",
"shareTitle": "跟着习主席看世界|同舟共济 打造人类卫生健康共同体",
"shareUrl": "https://pd-people-sit.pdnews.cn/column/30000628337-500000004210"
},
"targetId": "30000628337",
"targetRelId": "500000004210",
"targetRelObjectId": "2002",
"targetRelType": 1,
"targetStatus": 0,
"targetTitle": "跟着习主席看世界|同舟共济 打造人类卫生健康共同体",
"targetType": 8,
"topicType": null,
"uuid": "034911cc-34ca-4209-add2-46f48f4b2104"
},
{
"avatarFrame": "",
"checkStatus": 2,
"commentContent": "我是游客",
"commentContentSensitive": "",
"commentLevel": 1,
"commentPics": "",
"commentSensitive": "",
"commentType": "2",
"createTime": "2024-01-27 14:25:34",
"fromCreatorId": "",
"fromDeviceId": "F0B98E7F-6479-462C-BA25-5FC574511C8A",
"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",
"fromUserId": "512157124138245",
"fromUserName": "树下🍑 1122334",
"fromUserType": 1,
"h5Url": "",
"id": 303305,
"keyArticle": 0,
"likeNum": 0,
"pageId": null,
"parentCommentVo": null,
"parentId": -1,
"rootCommentId": 303305,
"sensitiveExist": 0,
"sensitiveShow": 1,
"shareInfo": {
"shareCoverUrl": "http://sitcontentjdcdn.aikan.pdnews.cn/zhbj-20240127/image/content/e8d93872483a48c7a4eaa48f70211ab1.png",
"shareSummary": "人民日报,有品质的新闻",
"shareTitle": "“大学也有家长群",
"shareUrl": "https://pd-people-sit.pdnews.cn/column/30000723442-500000031275"
},
"targetId": "30000723442",
"targetRelId": "500000031275",
"targetRelObjectId": "2002",
"targetRelType": 1,
"targetStatus": 0,
"targetTitle": "“大学也有家长群",
"targetType": 8,
"topicType": null,
"uuid": "0b0aa5ef-b2de-4d01-9f5a-274c5122560f"
},
{
"avatarFrame": "",
"checkStatus": 2,
"commentContent": "你好,我是游客动态",
"commentContentSensitive": "",
"commentLevel": 1,
"commentPics": "",
"commentSensitive": "",
"commentType": "2",
"createTime": "2024-01-27 14:24:56",
"fromCreatorId": "",
"fromDeviceId": "23c43f15-37e9-3f2d-9999-bd1abbb7e0ed",
"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",
"fromUserId": "512157124138245",
"fromUserName": "树下🍑 1122334",
"fromUserType": 1,
"h5Url": "",
"id": 303304,
"keyArticle": 0,
"likeNum": 0,
"pageId": null,
"parentCommentVo": null,
"parentId": -1,
"rootCommentId": 303304,
"sensitiveExist": 0,
"sensitiveShow": 1,
"shareInfo": {
"shareCoverUrl": "http://sitcontentjdcdn.aikan.pdnews.cn/zhbj-20231130/image/content/3e0cce06724740f0807ff0731c4a1d03/C4BC1C53-2B9C-4A54-BF95-044242D78260.jpg",
"shareSummary": "发布动态带活动13",
"shareTitle": "发布动态带活动13",
"shareUrl": "https://pd-people-sit.pdnews.cn/rmhmoments/30000650969"
},
"targetId": "30000650969",
"targetRelId": "500000013237",
"targetRelObjectId": "2058",
"targetRelType": 1,
"targetStatus": 0,
"targetTitle": "发布动态带活动13",
"targetType": 14,
"topicType": null,
"uuid": "ae2b2ece-d036-4b01-91e7-9708b0b5fe1c"
},
{
"avatarFrame": "",
"checkStatus": 2,
"commentContent": "你好我是游客",
"commentContentSensitive": "",
"commentLevel": 1,
"commentPics": "",
"commentSensitive": "",
"commentType": "2",
"createTime": "2024-01-27 14:24:19",
"fromCreatorId": "",
"fromDeviceId": "23c43f15-37e9-3f2d-9999-bd1abbb7e0ed",
"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",
"fromUserId": "512157124138245",
"fromUserName": "树下🍑 1122334",
"fromUserType": 1,
"h5Url": "",
"id": 303302,
"keyArticle": 0,
"likeNum": 0,
"pageId": null,
"parentCommentVo": null,
"parentId": -1,
"rootCommentId": 303302,
"sensitiveExist": 0,
"sensitiveShow": 1,
"shareInfo": {
"shareCoverUrl": "http://sitcontentjdcdn.aikan.pdnews.cn/zhbj-20240127/image/content/e8d93872483a48c7a4eaa48f70211ab1.png",
"shareSummary": "人民日报,有品质的新闻",
"shareTitle": "“大学也有家长群",
"shareUrl": "https://pd-people-sit.pdnews.cn/column/30000723442-500000031275"
},
"targetId": "30000723442",
"targetRelId": "500000031275",
"targetRelObjectId": "2002",
"targetRelType": 1,
"targetStatus": 0,
"targetTitle": "“大学也有家长群",
"targetType": 8,
"topicType": null,
"uuid": "766a6bac-aa1d-4e88-a798-f19bade201ee"
}
],
"pageNum": 1,
"pageSize": 20,
"totalCommentNum": 12,
"totalCount": 12
},
"message": "Success",
"meta": null,
"requestId": "",
"success": true,
"timestamp": 1711440876958
}
\ No newline at end of file
... ...
{
"code": "0",
"data": [
{
"commentId": 403445,
"status": 1
},
{
"commentId": 303318,
"status": 0
},
{
"commentId": 303317,
"status": 0
},
{
"commentId": 403426,
"status": 1
},
{
"commentId": 403425,
"status": 0
},
{
"commentId": 403422,
"status": 0
},
{
"commentId": 303306,
"status": 0
},
{
"commentId": 403420,
"status": 0
},
{
"commentId": 403417,
"status": 0
},
{
"commentId": 303305,
"status": 0
},
{
"commentId": 303304,
"status": 0
},
{
"commentId": 303302,
"status": 0
}
],
"message": "Success",
"meta": null,
"requestId": "",
"success": true,
"timestamp": 1711440877105
}
\ No newline at end of file
... ...
{
"code": "0",
"data": {
"articleCreation": 0,
"attentionNum": 1,
"authIcon": "",
"authId": 0,
"authPersonal": "",
"authTitle": "",
"avatarFrame": "",
"banControl": 0,
"browseNum": 76,
"categoryAuth": "",
"city": "",
"cnContentPublish": 0,
"cnIsComment": 0,
"cnIsLike": 0,
"cnLiveCommentControl": 0,
"cnLiveGiftControl": 0,
"cnLiveLikeControl": 0,
"cnLivePublish": 0,
"cnLiveShareControl": 0,
"cnShareControl": 0,
"contentPublish": 0,
"creatorId": "",
"district": "",
"dynamicControl": 0,
"dynamicCreation": 0,
"fansNum": 0,
"headPhotoUrl": "https://sitcontentjdcdn.aikan.pdnews.cn/null20240127/1630371072/1706336907262.jpg",
"honoraryIcon": "",
"honoraryTitle": "",
"introduction": "",
"isAttention": 0,
"isComment": 0,
"isLike": 0,
"liveCommentControl": 0,
"liveGiftControl": 0,
"liveLikeControl": 0,
"livePublish": 0,
"liveShareControl": 0,
"liveSwitch": 0,
"mainControl": 1,
"originUserId": "",
"pictureCollectionCreation": 0,
"posterShareControl": 1,
"province": "",
"region": "安徽省",
"registTime": 1703485580000,
"shareControl": 0,
"shareUrl": "",
"subjectType": 0,
"userId": "512157124138245",
"userName": "树下🍑 1122334",
"userType": "1",
"videoCollectionCreation": 0,
"videoCreation": 0
},
"message": "Success",
"meta": null,
"requestId": "",
"success": true,
"timestamp": 1711440875633
}
\ No newline at end of file
... ...
{
"code": "0",
"data": [
{
"level": 2,
"levelHead": "http://rmrb-video-content-sit.oss-cn-beijing.aliyuncs.com/sjbj-20240125/image/display/88c45bf56ac941b883c69bd8ed373164.png",
"userId": 512157124138245
}
],
"message": "Success",
"success": true,
"timestamp": 1711440876088
}
\ No newline at end of file
... ...
{
"code": "0",
"data": {
"hasNext": 0,
"list": [
{
"attentionCreatorId": "3259284",
"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",
"attentionNum": 0,
"attentionUserId": "535571576006021",
"attentionUserName": "斯特的7778",
"attentionUserType": 2,
"authIcon": "",
"authId": 0,
"authPersional": "",
"authTitle": "",
"banControl": 0,
"categoryAuth": "",
"cnLiveCommentControl": 1,
"cnLiveGiftControl": 1,
"cnLiveLikeControl": 1,
"cnLiveShareControl": 1,
"cnShareControl": 1,
"collectNum": 1,
"commentNum": 0,
"createTime": 1706344099000,
"fansNum": 1,
"honoraryIcon": "",
"honoraryTitle": "",
"id": 100703,
"introduction": "暗黑世界顶级",
"isAttention": 0,
"isComment": 1,
"isLike": 1,
"isVisiable": 1,
"likeNum": 0,
"liveCommentControl": 1,
"liveGiftControl": 1,
"liveLikeControl": 1,
"liveShareControl": 1,
"mainControl": 1,
"posterShareControl": 0,
"registTime": 1706343790000,
"shareControl": 1,
"shareNum": 7,
"status": 1,
"subjectType": null,
"updateTime": 1706344099000,
"userId": "512157124138245",
"userType": 1
}
],
"pageNum": 1,
"pageSize": 20,
"totalCount": 1
},
"message": "Success",
"meta": null,
"requestId": "",
"success": true,
"timestamp": 1711441048304
}
\ No newline at end of file
... ...
... ... @@ -42,4 +42,6 @@ export { SettingPasswordLayout } from "./components/page/SettingPasswordLayout"
export { FollowFirstTabsComponent } from "./components/page/mine/follow/FollowFirstTabsComponent"
export { MyHomeComponent } from "./components/page/mine/MyHomeComponent"
export { MyHomeComponent } from "./components/page/mine/home/MyHomeComponent"
export { OtherUserHomeComponent } from "./components/page/mine/home/OtherUserHomeComponent"
\ No newline at end of file
... ...
import { LazyDataSource, StringUtils } from 'wdKit';
import MinePageDatasModel from '../../../../model/MinePageDatasModel';
import { Params } from '../../../../repository/bean/Params';
import RouteManager from '../../../../utils/RouteManager';
import { FollowListDetailItem } from '../../../../viewmodel/FollowListDetailItem'
import { FollowListDetailRequestItem } from '../../../../viewmodel/FollowListDetailRequestItem';
import { FollowListStatusRequestItem } from '../../../../viewmodel/FollowListStatusRequestItem';
import { MineFollowListDetailItem } from '../../../../viewmodel/MineFollowListDetailItem';
import { QueryListIsFollowedItem } from '../../../../viewmodel/QueryListIsFollowedItem';
import { RouterObject } from '../../../../viewmodel/RouterObject';
import { ListHasNoMoreDataUI } from '../../../reusable/ListHasNoMoreDataUI';
const TAG = "FollowListDetailUI"
... ... @@ -72,7 +75,7 @@ export struct FollowListDetailUI{
this.hasMore = false
}else{
value.list.forEach((value)=>{
this.data.push(new FollowListDetailItem(value.attentionHeadPhotoUrl,value.attentionUserName,value.fansNum,value.introduction,value.attentionCreatorId,"1"))
this.data.push(new FollowListDetailItem(value.attentionHeadPhotoUrl,value.attentionUserName,value.fansNum,value.introduction,value.attentionCreatorId,"1",value.attentionUserId))
})
this.data.notifyDataReload()
this.count = this.data.totalCount()
... ... @@ -90,9 +93,6 @@ export struct FollowListDetailUI{
}
}else{
if(this.hasMore){
if(this.creatorDirectoryId === 120){
console.log("console");
}
let object = new FollowListDetailRequestItem(this.creatorDirectoryId,20,this.curPageNum)
MinePageDatasModel.getFollowListDetailData(object,getContext(this)).then((value)=>{
... ... @@ -115,7 +115,7 @@ export struct FollowListDetailUI{
let data : FollowListDetailItem[] = []
value.list.forEach((item)=>{
status.creatorIds.push(new QueryListIsFollowedItem(item.creatorId))
data.push(new FollowListDetailItem(item.headPhotoUrl,item.cnUserName,item.cnFansNum,item.introduction,item.creatorId,"0"))
data.push(new FollowListDetailItem(item.headPhotoUrl,item.cnUserName,item.cnFansNum,item.introduction,item.creatorId,"0",item.attentionUserId))
})
MinePageDatasModel.getFollowListStatusData(status,getContext(this)).then((newValue)=>{
... ... @@ -128,7 +128,7 @@ export struct FollowListDetailUI{
})
data.forEach((item)=>{
this.data.push(new FollowListDetailItem(item.headPhotoUrl,item.cnUserName,item.cnFansNum,item.introduction,item.creatorId,item.status))
this.data.push(new FollowListDetailItem(item.headPhotoUrl,item.cnUserName,item.cnFansNum,item.introduction,item.creatorId,item.status,item.attentionUserId))
})
this.data.notifyDataReload()
... ... @@ -233,5 +233,8 @@ struct ChildComponent {
}.height('146lpx')
.justifyContent(FlexAlign.Center)
.onClick(()=>{
RouteManager.jumpNewPage("pages/OtherNormalUserHomePage",new RouterObject(this.data.attentionUserId,0))
})
}
}
\ No newline at end of file
... ...
import { LazyDataSource, StringUtils } from 'wdKit';
import MinePageDatasModel from '../../../../model/MinePageDatasModel';
import { Params } from '../../../../repository/bean/Params';
import RouteManager from '../../../../utils/RouteManager';
import { CommentListItem } from '../../../../viewmodel/CommentListItem';
import { FollowListDetailItem } from '../../../../viewmodel/FollowListDetailItem';
import { FollowListDetailRequestItem } from '../../../../viewmodel/FollowListDetailRequestItem';
import { RouterObject } from '../../../../viewmodel/RouterObject';
import { ListHasNoMoreDataUI } from '../../../reusable/ListHasNoMoreDataUI';
const TAG = "HomePageBottomComponent"
... ... @@ -17,6 +17,7 @@ export struct HomePageBottomComponent{
@State hasMore:boolean = true
curPageNum:number = 1;
@State count:number = 0;
@Prop levelHead:string
aboutToAppear(){
this.getNewPageData()
... ... @@ -56,10 +57,7 @@ export struct HomePageBottomComponent{
.backgroundColor($r('app.color.color_F5F5F5'))
.margin({top:'31lpx',bottom:'4lpx'})
}.onClick(()=>{
let params: Params = {
pageID: "1"
}
RouteManager.jumpNewPage("pages/FollowListPage",params)
RouteManager.jumpNewPage("pages/FollowListPage",new RouterObject('',1))
})
LazyForEach(this.data_follow, (item: FollowListDetailItem, index: number = 0) => {
... ... @@ -97,7 +95,7 @@ export struct HomePageBottomComponent{
List({ space: 3 }) {
LazyForEach(this.data_comment, (item: CommentListItem, index: number = 0) => {
ListItem() {
ChildCommentComponent({data: item})
ChildCommentComponent({data: item,levelHead:this.levelHead})
}
.onClick(() => {
})
... ... @@ -152,7 +150,7 @@ export struct HomePageBottomComponent{
this.hasMore = false
}else{
value.list.forEach((value)=>{
this.data_follow.push(new FollowListDetailItem(value.attentionHeadPhotoUrl,value.attentionUserName,value.fansNum,value.introduction,value.attentionCreatorId,"1"))
this.data_follow.push(new FollowListDetailItem(value.attentionHeadPhotoUrl,value.attentionUserName,value.fansNum,value.introduction,value.attentionCreatorId,"1",value.attentionUserId))
})
this.data_follow.notifyDataReload()
this.count = this.data_follow.totalCount()
... ... @@ -177,7 +175,7 @@ export struct HomePageBottomComponent{
this.hasMore = false
}else{
value.list.forEach((value)=>{
this.data_comment.push(new CommentListItem(value.fromUserHeader,value.fromUserName,value.targetTitle,value.createTime,value.commentContent))
this.data_comment.push(new CommentListItem(value.fromUserHeader,value.fromUserName,value.targetTitle,value.createTime,value.commentContent,value.likeNum,0,value.id))
})
this.data_comment.notifyDataReload()
this.count = this.data_comment.totalCount()
... ... @@ -287,15 +285,25 @@ struct ChildFollowComponent {
@Component
struct ChildCommentComponent {
@ObjectLink data: CommentListItem
@Prop levelHead:string
build() {
Column(){
Row() {
Image(StringUtils.isEmpty(this.data.fromUserHeader)?$r('app.media.default_head'):this.data.fromUserHeader)
.objectFit(ImageFit.Auto)
.width('69lpx')
.height('69lpx')
.margin({right:'15lpx'})
Stack(){
Image(this.data.fromUserHeader)
.alt($r('app.media.default_head'))
.objectFit(ImageFit.Auto)
.width('69lpx')
.height('69lpx')
.margin({right:'15lpx'})
.borderRadius(50)
Image(this.levelHead)
.width('89lpx')
.height('89lpx')
.objectFit(ImageFit.Cover)
.borderRadius(50)
}
Column(){
Text(this.data.fromUserName)
... ...
import router from '@ohos.router';
import { StringUtils } from 'wdKit/src/main/ets/utils/StringUtils';
import MinePageDatasModel from '../../../model/MinePageDatasModel';
import { HomePageBottomComponent } from './home/HomePageBottomComponent';
import MinePageDatasModel from '../../../../model/MinePageDatasModel';
import RouteManager from '../../../../utils/RouteManager';
import { Params } from '../../../../repository/bean/Params';
import { HomePageBottomComponent } from './HomePageBottomComponent';
import { RouterObject } from '../../../../viewmodel/RouterObject';
const TAG = "MyHomeComponent"
... ... @@ -61,7 +64,9 @@ export struct MyHomeComponent {
.height('130lpx')
.objectFit(ImageFit.Cover)
.borderRadius(50)
}
}.onClick(()=>{
RouteManager.jumpNewPage("pages/OtherNormalUserHomePage",new RouterObject('512157124138245',0))
})
Column() {
Row() {
Text(`${this.userName}`)
... ... @@ -175,10 +180,10 @@ export struct MyHomeComponent {
//tab 页面
Tabs({controller: this.controller}) {
TabContent() {
HomePageBottomComponent({style:0})
HomePageBottomComponent({style:0,levelHead:this.levelHead})
}.tabBar(this.TabBuilder(0,"评论"))
TabContent() {
HomePageBottomComponent({style:1})
HomePageBottomComponent({style:1,levelHead:this.levelHead})
}.tabBar(this.TabBuilder(1,"关注"))
}
.backgroundColor($r('app.color.white'))
... ... @@ -256,7 +261,9 @@ export struct MyHomeComponent {
.onClick(() => {
router.back()
})
Image($r('app.media.default_head'))
Image(this.headPhotoUrl)
.borderRadius(50)
.alt($r('app.media.default_head'))
.width('60lpx')
.height('60lpx')
.objectFit(ImageFit.Auto)
... ... @@ -270,7 +277,7 @@ export struct MyHomeComponent {
router.back()
})
Text("我的昵称")
Text(this.userName)
.height('42lpx')
.maxLines(1)
.id("title")
... ...
import { DateTimeUtils, LazyDataSource, StringUtils } from 'wdKit';
import { CommentListItem } from '../../../../viewmodel/CommentListItem';
import { ListHasNoMoreDataUI } from '../../../reusable/ListHasNoMoreDataUI';
import { OtherUserCommentListRequestItem } from '../../../../viewmodel/OtherUserCommentListRequestItem';
import MinePageDatasModel from '../../../../model/MinePageDatasModel';
import { MineCommentListDetailItem } from '../../../../viewmodel/MineCommentListDetailItem';
import { OtherUserCommentLikeStatusRequestItem } from '../../../../viewmodel/OtherUserCommentLikeStatusRequestItem';
const TAG = "HomePageBottomComponent"
@Component
export struct OtherHomePageBottomCommentComponent{
@Prop curUserId: string
@State data_comment: LazyDataSource<CommentListItem> = new LazyDataSource();
@State isLoading:boolean = false
@State hasMore:boolean = true
curPageNum:number = 1;
@State count:number = 0;
@Prop levelHead:string
aboutToAppear(){
this.getNewPageData()
}
build(){
Column(){
Divider().width('100%')
.height('2lpx')
.strokeWidth('1lpx')
.backgroundColor($r('app.color.color_EDEDED'))
if(this.count === 0){
ListHasNoMoreDataUI({style:2})
.height('100%')
}else{
List({ space: 3 }) {
LazyForEach(this.data_comment, (item: CommentListItem, index: number = 0) => {
ListItem() {
ChildCommentComponent({data: item,levelHead:this.levelHead})
}
.onClick(() => {
})
}, (item: CommentListItem, index: number) => index.toString())
//没有更多数据 显示提示
if(!this.hasMore){
ListItem(){
ListHasNoMoreDataUI()
}
}
}.cachedCount(15)
.layoutWeight(1)
.scrollBar(BarState.Off)
.edgeEffect(EdgeEffect.None)
// .nestedScroll({
// scrollForward: NestedScrollMode.PARENT_FIRST,
// scrollBackward: NestedScrollMode.SELF_FIRST
// })
.onReachEnd(()=>{
console.log(TAG,"触底了");
if(!this.isLoading){
this.isLoading = true
//加载分页数据
this.getNewPageData()
}
})
}
}
.width('100%')
}
@Styles
listStyle() {
.backgroundColor(Color.White)
.height(72)
.width("100%")
.borderRadius(12)
}
getNewPageData(){
this.isLoading = true
if(this.hasMore){
let time = encodeURI(DateTimeUtils.getCurDate(DateTimeUtils.PATTERN_DATE_TIME_HYPHEN))
let object = new OtherUserCommentListRequestItem("",20,this.curPageNum,time,"1",this.curUserId)
MinePageDatasModel.getOtherCommentListData(object,getContext(this)).then((value)=>{
if (!this.data_comment || value.list.length == 0){
this.hasMore = false
}else{
this.getFollowListStatus(value)
}
}).catch((err:Error)=>{
console.log(TAG,"请求失败")
this.isLoading = false
})
}
}
getFollowListStatus(value:MineCommentListDetailItem){
let status = new OtherUserCommentLikeStatusRequestItem()
let data : CommentListItem[] = []
value.list.forEach((item)=>{
status.commentIdList.push(item.id)
data.push(new CommentListItem(item.fromUserHeader,item.fromUserName,item.targetTitle,item.createTime,item.commentContent,item.likeNum,0,item.id))
})
MinePageDatasModel.getOtherUserCommentLikeStatusData(status,getContext(this)).then((newValue)=>{
newValue.forEach((item)=>{
data.forEach((list)=>{
if (item.commentId == list.id) {
list.like_status = item.status
}
})
})
data.forEach((item)=>{
this.data_comment.push(new CommentListItem(item.fromUserHeader,item.fromUserName,item.targetTitle,item.createTime,item.commentContent,item.likeNum,item.like_status,item.id))
})
this.data_comment.notifyDataReload()
this.count = this.data_comment.totalCount()
if (this.data_comment.totalCount() < value.totalCount) {
this.curPageNum++
}else {
this.hasMore = false
}
this.isLoading = false
}).catch((err:Error)=>{
console.log(TAG,"请求失败")
this.isLoading = false
})
}
}
@Component
struct ChildCommentComponent {
@ObjectLink data: CommentListItem
@Prop levelHead:string
build() {
Column(){
Row() {
Stack(){
Image(this.data.fromUserHeader)
.alt($r('app.media.default_head'))
.objectFit(ImageFit.Auto)
.width('69lpx')
.height('69lpx')
.margin({right:'15lpx'})
.borderRadius(50)
Image(this.levelHead)
.width('89lpx')
.height('89lpx')
.objectFit(ImageFit.Cover)
.borderRadius(50)
}
Column(){
Text(this.data.fromUserName)
.fontSize('25lpx')
.lineHeight('35lpx')
.fontWeight('600lpx')
.fontColor($r('app.color.color_222222'))
.margin({bottom:'6lpx'})
.maxLines(1)
Text(`${this.data.createTime}`)
.fontColor($r('app.color.color_B0B0B0'))
.fontSize('23lpx')
.lineHeight('31lpx')
.fontWeight('400lpx')
.maxLines(1)
}.layoutWeight(1)
.alignItems(HorizontalAlign.Start)
Row(){
Text(this.data.likeNum.toString())
.fontWeight("500lpx")
.fontSize("27lpx")
.lineHeight("31lpx")
.fontColor(this.data.like_status===0?$r('app.color.color_666666'):$r('app.color.color_ED2800'))
.margin({right:'8lpx'})
Image(this.data.like_status===0?$r('app.media.like_default_status'):$r('app.media.liked_status'))
.width('31lpx')
.height('31lpx')
.objectFit(ImageFit.Auto)
.interpolation(ImageInterpolation.Medium)
.borderRadius(50)
}
}
.margin({bottom:'10lpx'})
.width('100%')
.height('108lpx')
.padding({left:'31lpx',right:'31lpx'})
Row(){
Text(this.data.commentContent)
.maxLines(3)
.textOverflow({ overflow: TextOverflow.Ellipsis })
.fontWeight('400lpx')
.fontSize('31lpx')
.lineHeight('46lpx')
.fontColor($r('app.color.color_222222'))
.margin({bottom:'10lpx'})
}.padding({left:'31lpx',right:'31lpx'})
.width('100%')
Row(){
Text(this.data.targetTitle)
.fontWeight('400lpx')
.fontColor($r('app.color.color_222222'))
.lineHeight('38lpx')
.fontSize('27lpx')
.textAlign(TextAlign.Center)
.margin({right:'4lpx'})
.maxLines(3)
.width('616lpx')
Image($r('app.media.arrow_icon_right'))
.objectFit(ImageFit.Auto)
.width('27lpx')
.height('27lpx')
}
.padding({top:'17lpx',bottom:'17lpx',left:'23lpx',right:'23lpx'})
.width('662lpx')
.backgroundColor($r('app.color.color_F5F5F5'))
.margin({top:'19lpx',bottom:'31lpx'})
Divider().width('100%')
.height('12lpx')
.strokeWidth('12lpx')
.backgroundColor($r('app.color.color_F5F5F5'))
}
.justifyContent(FlexAlign.Center)
}
}
\ No newline at end of file
... ...
import { LazyDataSource, StringUtils } from 'wdKit';
import { ListHasNoMoreDataUI } from '../../../reusable/ListHasNoMoreDataUI';
import { UserFollowListRequestItem } from '../../../../viewmodel/UserFollowListRequestItem';
import { FollowListDetailItem } from '../../../../viewmodel/FollowListDetailItem';
import { Params } from '../../../../repository/bean/Params';
import MinePageDatasModel from '../../../../model/MinePageDatasModel';
import RouteManager from '../../../../utils/RouteManager';
import { RouterObject } from '../../../../viewmodel/RouterObject';
const TAG = "HomePageBottomComponent"
@Component
export struct OtherHomePageBottomFollowComponent{
@State data_follow: LazyDataSource<FollowListDetailItem> = new LazyDataSource();
@State isLoading:boolean = false
@State hasMore:boolean = true
curPageNum:number = 1;
@State count:number = 0;
@Prop curUserId: string
aboutToAppear(){
this.getNewPageData()
}
build(){
Column(){
Divider().width('100%')
.height('2lpx')
.strokeWidth('1lpx')
.backgroundColor($r('app.color.color_EDEDED'))
if(this.count === 0){
ListHasNoMoreDataUI({style:2})
.height('100%')
}else{
List({ space: 3 }) {
ListItem() {
Row(){
Text("关注更多人民号")
.fontWeight('400lpx')
.fontColor($r('app.color.color_222222'))
.lineHeight('38lpx')
.fontSize('27lpx')
.textAlign(TextAlign.Center)
.margin({right:'4lpx'})
Image($r('app.media.arrow_icon_right'))
.objectFit(ImageFit.Auto)
.width('27lpx')
.height('27lpx')
}.height('69lpx')
.width('659lpx')
.alignItems(VerticalAlign.Center)
.justifyContent(FlexAlign.Center)
.backgroundColor($r('app.color.color_F5F5F5'))
.margin({top:'31lpx',bottom:'4lpx'})
}.onClick(()=>{
RouteManager.jumpNewPage("pages/FollowListPage",new RouterObject('',1))
})
LazyForEach(this.data_follow, (item: FollowListDetailItem, index: number = 0) => {
ListItem() {
ChildFollowComponent({data: item})
}
.onClick(() => {
})
}, (item: FollowListDetailItem, index: number) => index.toString())
//没有更多数据 显示提示
if(!this.hasMore){
ListItem(){
ListHasNoMoreDataUI()
}
}
}.cachedCount(15)
.padding({left:'31lpx',right:'31lpx'})
.layoutWeight(1)
.scrollBar(BarState.Off)
.edgeEffect(EdgeEffect.None)
// .nestedScroll({
// scrollForward: NestedScrollMode.PARENT_FIRST,
// scrollBackward: NestedScrollMode.SELF_FIRST
// })
.onReachEnd(()=>{
console.log(TAG,"触底了");
if(!this.isLoading){
this.isLoading = true
//加载分页数据
this.getNewPageData()
}
})
}
}
.width('100%')
}
@Styles
listStyle() {
.backgroundColor(Color.White)
.height(72)
.width("100%")
.borderRadius(12)
}
getNewPageData(){
this.isLoading = true
//我的关注列表
if(this.hasMore){
let object = new UserFollowListRequestItem(Number(this.curUserId),20,this.curPageNum,"1")
MinePageDatasModel.getOtherUserFollowListData(object,getContext(this)).then((value)=>{
if (!this.data_follow || value.list.length == 0){
this.hasMore = false
}else{
value.list.forEach((value)=>{
this.data_follow.push(new FollowListDetailItem(value.attentionHeadPhotoUrl,value.attentionUserName,value.fansNum,value.introduction,value.attentionCreatorId,"1",value.attentionUserId))
})
this.data_follow.notifyDataReload()
this.count = this.data_follow.totalCount()
if (this.data_follow.totalCount() < value.totalCount) {
this.curPageNum++
}else {
this.hasMore = false
}
}
this.isLoading = false
}).catch((err:Error)=>{
console.log(TAG,"请求失败")
this.isLoading = false
})
}
}
}
@Component
struct ChildFollowComponent {
@ObjectLink data: FollowListDetailItem
build() {
Column(){
Blank().height('27lpx')
Row() {
Image(StringUtils.isEmpty(this.data.headPhotoUrl)?$r('app.media.default_head'):this.data.headPhotoUrl)
.objectFit(ImageFit.Auto)
.width('92lpx')
.height('92lpx')
.margin({right:'15lpx'})
Column(){
Text(this.data.cnUserName)
.fontWeight('400lpx')
.fontSize('31lpx')
.lineHeight('38lpx')
.fontColor($r('app.color.color_222222'))
Text(`粉丝${this.data.cnFansNum}`)
.fontColor($r('app.color.color_B0B0B0'))
.fontSize('23lpx')
.maxLines(1)
Text(`${this.data.introduction}`)
.fontColor($r('app.color.color_B0B0B0'))
.fontSize('23lpx')
.maxLines(2)
.textOverflow({ overflow: TextOverflow.Ellipsis })
}.layoutWeight(1)
.alignItems(HorizontalAlign.Start)
if(this.data.status == "1"){
Row(){
Text(`已关注`)
.fontColor($r('app.color.color_CCCCCC'))
.fontSize('23lpx')
.fontWeight('500lpx')
.lineHeight('35lpx')
}.backgroundColor($r('app.color.color_F5F5F5'))
.borderRadius('6lpx')
.borderColor($r('app.color.color_F5F5F5'))
.borderWidth('2lpx')
.justifyContent(FlexAlign.Center)
.width('100lpx')
.height('46lpx')
.margin({left:'4lpx',top:'23lpx'})
.onClick(()=>{
this.data.status = "0"
})
}else{
Row(){
Image($r('app.media.follow_icon'))
.margin({right:'4lpx'})
.width('23lpx')
.height('23lpx')
Text(`关注`)
.fontColor($r('app.color.color_ED2800'))
.fontSize('23lpx')
.fontWeight('500lpx')
.lineHeight('35lpx')
}.borderColor($r('app.color.color_1AED2800'))
.borderRadius('6lpx')
.borderWidth('2lpx')
.justifyContent(FlexAlign.Center)
.width('100lpx')
.height('46lpx')
.margin({left:'4lpx',top:'23lpx'})
.onClick(()=>{
this.data.status = "1"
})
}
}.alignItems(VerticalAlign.Top)
.width('100%')
.layoutWeight(1)
Divider().width('100%')
.height('2lpx')
.strokeWidth('1lpx')
.backgroundColor($r('app.color.color_EDEDED'))
}.height('146lpx')
.justifyContent(FlexAlign.Center)
}
}
\ No newline at end of file
... ...
import router from '@ohos.router';
import { StringUtils } from 'wdKit/src/main/ets/utils/StringUtils';
import MinePageDatasModel from '../../../../model/MinePageDatasModel';
import { OtherHomePageBottomFollowComponent } from './OtherHomePageBottomFollowComponent';
import { OtherHomePageBottomCommentComponent } from './OtherHomePageBottomCommentComponent';
import { OtherUserDetailRequestItem } from '../../../../viewmodel/OtherUserDetailRequestItem';
const TAG = "OtherUserHomeComponent"
@Component
export struct OtherUserHomeComponent {
@Prop curUserId: string
@State tileOpacity: number = 0;
firstPositionY:number = 0;
fontColor: string = '#999999'
selectedFontColor: string = '#000000'
@State currentIndex: number = 0
private controller: TabsController = new TabsController()
isChangeToUserEdit = false;
@State userName:string = ""
@State headPhotoUrl:string = ""
@State levelHead:string = ""
@State levelId:number = 0
@State browseNum:number = 0//阅读数
@State commentNum:number = 0//评论数
@State attentionNum:number = 0//关注数
@State desc:string = ""
aboutToAppear(){
this.getUserInfo()
this.getUserLevel()
}
build() {
Stack({ alignContent: Alignment.Top }){
Image($r('app.media.title_bg'))
.width('100%')
.height('355lpx')
.objectFit(ImageFit.Cover)
Column(){
Stack({ alignContent: Alignment.Top }){
this.MineHomeTitleTransparent()
this.MineHomeTitleWhite()
}
Scroll() {
Column() {
//用户信息区域
Row() {
Stack(){
Image(this.headPhotoUrl)
.alt($r('app.media.default_head'))
.width('115lpx')
.height('115lpx')
.objectFit(ImageFit.Cover)
.borderRadius(50)
Image(this.levelHead)
.width('130lpx')
.height('130lpx')
.objectFit(ImageFit.Cover)
.borderRadius(50)
}
Column() {
Row() {
Text(`${this.userName}`)
.fontColor($r('app.color.white'))
.maxLines(1)
.textOverflow({ overflow: TextOverflow.Ellipsis })
.fontSize('38lpx')
.lineHeight('50lpx')
.fontWeight('500lpx')
Text(`等级${this.levelId}`)
.textAlign(TextAlign.Center)
.fontColor($r('app.color.color_ED2800'))
.backgroundColor($r('app.color.white'))
.fontSize('19lpx')
.width('96lpx')
.height('35lpx')
.margin({ left: '10lpx' })
Blank()
}.width('507lpx')
Row() {
Row() {
Text(`${this.browseNum}`)
.textStyle()
Text("阅读")
.textStyle2()
}
.margin({ right: '15lpx' })
Divider()
.height('19lpx')
.width('2lpx')
.color($r('app.color.white'))
.vertical(true)
.opacity(0.4)
Row() {
Text(`${this.commentNum}`)
.textStyle()
Text("评论")
.textStyle2()
}.margin({ right: '15lpx', left: '15lpx' })
Divider()
.height('19lpx')
.width('2lpx')
.color($r('app.color.white'))
.vertical(true)
.opacity(0.4)
Row() {
Text(`${this.attentionNum}`)
.textStyle()
Text("关注")
.textStyle2()
}.margin({ left: '15lpx' })
}.margin({ top: '23lpx' })
}.alignItems(HorizontalAlign.Start)
.margin({ left: '32lpx' })
}
.onAreaChange((oldValue: Area, newValue: Area) => {
if (this.firstPositionY === 0) {
this.firstPositionY = newValue.globalPosition.y as number
}else{
let persent = (this.firstPositionY - Number(newValue.globalPosition.y)) / (this.firstPositionY * 0.3)
if(persent > 1){
persent = 1
}
this.tileOpacity = persent
}
})
.backgroundColor($r('app.color.color_transparent'))
.height('184lpx')
.width('100%')
.padding({ left: '35lpx' })
//用户简介区域
Column() {
Row() {
Text(this.desc)
.fontSize('27lpx')
.maxLines(3)
.textOverflow({ overflow: TextOverflow.Ellipsis })
.lineHeight('40lpx')
.fontWeight('400lpx')
.fontColor($r('app.color.color_222222'))
.textAlign(TextAlign.Start)
}
}.padding({ left: '31lpx',right:'31lpx',top:'19lpx',bottom:'31lpx'})
.alignItems(HorizontalAlign.Start)
.justifyContent(FlexAlign.Center)
.width('100%')
.backgroundColor($r('app.color.white'))
.visibility(StringUtils.isEmpty(this.desc)?Visibility.Hidden:Visibility.Visible)
//间隔符
Divider().width('100%').height('12lpx').color($r('app.color.color_F5F5F5')).strokeWidth('12lpx')
//tab 页面
Tabs({controller: this.controller}) {
TabContent() {
OtherHomePageBottomCommentComponent({curUserId:this.curUserId,levelHead:this.levelHead})
}.tabBar(this.TabBuilder(0,"评论"))
TabContent() {
OtherHomePageBottomFollowComponent({curUserId:this.curUserId})
}.tabBar(this.TabBuilder(1,"关注"))
}
.backgroundColor($r('app.color.white'))
.animationDuration(0)
.onChange((index: number) => {
this.currentIndex = index
})
.vertical(false)
.height("100%")
}.width("100%")
}
.edgeEffect(EdgeEffect.None)
.scrollBar(BarState.Off)
.width('100%')
.height('100%')
}
}.width('100%')
.height('100%')
}
@Builder MineHomeTitleTransparent() {
RelativeContainer() {
//标题栏目
Image($r('app.media.icon_arrow_left_white') )
.width('46lpx')
.height('46lpx')
.objectFit(ImageFit.Auto)
.id("back_icon")
.alignRules({
center: { anchor: "__container__", align: VerticalAlign.Center },
left: { anchor: "__container__", align: HorizontalAlign.Start }
})
.margin({ left: '31lpx' })
.onClick(() => {
router.back()
})
}
.visibility(this.tileOpacity > 0 ? 1 : 0)
.height('84lpx')
.width('100%')
.backgroundColor($r('app.color.color_transparent'))
}
@Builder MineHomeTitleWhite() {
RelativeContainer() {
//标题栏目
Image($r('app.media.back_icon'))
.width('46lpx')
.height('46lpx')
.objectFit(ImageFit.Auto)
.id("back_icon")
.alignRules({
center: { anchor: "__container__", align: VerticalAlign.Center },
left: { anchor: "__container__", align: HorizontalAlign.Start }
})
.margin({ left: '31lpx' })
.onClick(() => {
router.back()
})
Image(this.headPhotoUrl)
.alt($r('app.media.default_head'))
.width('60lpx')
.height('60lpx')
.borderRadius(50)
.objectFit(ImageFit.Auto)
.id("head_icon")
.alignRules({
center: { anchor: "__container__", align: VerticalAlign.Center },
left: { anchor: "back_icon", align: HorizontalAlign.End }
})
.margin({ left: '31lpx' })
.onClick(() => {
router.back()
})
Text(`${this.userName}`)
.height('42lpx')
.maxLines(1)
.id("title")
.fontSize('35lpx')
.fontWeight('400lpx')
.fontColor($r('app.color.color_222222'))
.lineHeight('42lpx')
.alignRules({
center: { anchor: "__container__", align: VerticalAlign.Center },
left: { anchor: "head_icon", align: HorizontalAlign.End }
})
.margin({ left: '12lpx' })
}
.visibility(this.tileOpacity > 0 ? 0 : 1)
.height('84lpx')
.width('100%')
.backgroundColor($r('app.color.white'))
.opacity(this.tileOpacity )
}
@Builder TabBuilder(index: number, title: string) {
Stack(){
Text(title)
.height('38lpx')
.fontSize('33lpx')
.fontWeight(this.currentIndex === index ? 600 : 400)
.fontColor(this.currentIndex === index ? this.selectedFontColor : this.fontColor)
.lineHeight('38lpx')
if(this.currentIndex === index){
Divider()
.width('31lpx')
.height('4lpx')
.color('#ED2800')
.strokeWidth('4lpx')
.margin({top:'50lpx'})
.id("divTag")
}
}.onClick(()=>{
this.currentIndex = index
this.controller.changeIndex(this.currentIndex)
})
.height('100%')
.width('100%')
.margin({right:'9lpx'})
}
getUserInfo(){
let item = new OtherUserDetailRequestItem("","1",this.curUserId)
MinePageDatasModel.getOtherUserDetailData(item,getContext(this)).then((value)=>{
if(value!=null){
this.userName = value.userName
this.headPhotoUrl = value.headPhotoUrl
if(StringUtils.isNotEmpty(value.introduction)){
this.desc = value.introduction
}
this.browseNum = StringUtils.isEmpty(value.browseNum)?0:value.browseNum
this.commentNum = StringUtils.isEmpty(value.commentNum)?0:value.commentNum
this.attentionNum = StringUtils.isEmpty(value.attentionNum)?0:value.attentionNum
}
}).catch((err:Error)=>{
console.log(TAG,JSON.stringify(err))
})
}
getUserLevel(){
MinePageDatasModel.getOtherUserLevelData([this.curUserId],getContext(this)).then((value)=>{
if(value!=null){
this.levelHead = value[0].levelHead
this.levelId = value[0].level
}
}).catch((err:Error)=>{
console.log(TAG,JSON.stringify(err))
})
}
}
@Extend(Text) function textStyle() {
.fontColor($r('app.color.white'))
.textStyleDefault()
.margin({ right: '10lpx' })
}
@Extend(Text) function textStyle2() {
.textStyleDefault()
.fontColor($r('app.color.color_B2FFFFFF'))
}
@Extend(Text) function textStyleDefault() {
.textAlign(TextAlign.Start)
.fontSize('23lpx')
.fontWeight('400lpx')
.lineHeight('31lpx')
}
... ...
... ... @@ -117,14 +117,14 @@ export struct BannerComponent {
// 不滚动banner
Stack() {
// 背景图
Image(this.bannerContent.coverUrl.toString())
Image(this.bannerContent?.coverUrl.toString())
.objectFit(ImageFit.Fill)
.borderRadius(5)
// 底部标题和时间
Row() {
// 标题
Text(this.bannerContent.newsTitle.toString())
Text(this.bannerContent?.newsTitle.toString())
.fontSize(18)
.fontColor(Color.White)
.fontWeight(600)
... ... @@ -133,7 +133,7 @@ export struct BannerComponent {
.padding({ left: 10, right: 0 ,bottom: 5 })
.width('80%')
// 时间
if (this.bannerContent.lengthTime) {
if (this.bannerContent?.lengthTime) {
Row() {
Image($r('app.media.videoTypeIcon'))
.height(20)
... ...
... ... @@ -6,7 +6,7 @@ import { HttpUrlUtils } from '../network/HttpUrlUtils';
import HashMap from '@ohos.util.HashMap';
import { ResponseDTO, WDHttp } from 'wdNetwork';
import { MineAppointmentListItem } from '../viewmodel/MineAppointmentListItem';
import { Logger, ResourcesUtils } from 'wdKit';
import { Logger, ResourcesUtils, StringUtils } from 'wdKit';
import { MineFollowListDetailItem } from '../viewmodel/MineFollowListDetailItem';
import { FollowListDetailRequestItem } from '../viewmodel/FollowListDetailRequestItem';
import { FollowListItem } from '../viewmodel/FollowListItem';
... ... @@ -16,6 +16,11 @@ import { MineCommentListDetailItem } from '../viewmodel/MineCommentListDetailIte
import { FollowListStatusRequestItem } from '../viewmodel/FollowListStatusRequestItem';
import { MineUserLevelItem } from '../viewmodel/MineUserLevelItem';
import { MineUserDetailItem } from '../viewmodel/MineUserDetailItem';
import { OtherUserCommentLikeStatusRequestItem } from '../viewmodel/OtherUserCommentLikeStatusRequestItem';
import { OtherUserCommentListRequestItem } from '../viewmodel/OtherUserCommentListRequestItem';
import { QueryCommentListIsLikedItem } from '../viewmodel/QueryCommentListIsLikedItem';
import { UserFollowListRequestItem } from '../viewmodel/UserFollowListRequestItem';
import { OtherUserDetailRequestItem } from '../viewmodel/OtherUserDetailRequestItem';
const TAG = "MinePageDatasModel"
/**
... ... @@ -427,6 +432,209 @@ class MinePageDatasModel{
return compRes.data
}
/**
* 个人中心 获取其他用户详细信息
*/
getOtherUserDetailData(item:OtherUserDetailRequestItem,context: Context): Promise<MineUserDetailItem> {
return new Promise<MineUserDetailItem>((success, error) => {
Logger.info(TAG, `getAppointmentList start`);
this.fetchOtherUserDetailData(item).then((navResDTO: ResponseDTO<MineUserDetailItem>) => {
if (!navResDTO || navResDTO.code != 0) {
success(this.getOtherUserDetailDataLocal(context))
return
}
Logger.info(TAG, "getUserDetailData then,timeStamp:" + navResDTO.timestamp);
let navigationBean = navResDTO.data as MineUserDetailItem
success(navigationBean);
}).catch((err: Error) => {
Logger.error(TAG, `fetchMineUserDetailData catch, error.name : ${err.name}, error.message:${err.message}`);
success(this.getOtherUserDetailDataLocal(context))
})
})
}
fetchOtherUserDetailData(item:OtherUserDetailRequestItem) {
let url = HttpUrlUtils.getOtherUserDetailDataUrl()
let headers: HashMap<string, string> = HttpUrlUtils.getYcgCommonHeaders();
return WDHttp.post<ResponseDTO<MineUserDetailItem>>(url, item,headers)
};
async getOtherUserDetailDataLocal(context: Context): Promise<MineUserDetailItem> {
Logger.info(TAG, `getMineUserLevelDataLocal start`);
let compRes: ResponseDTO<MineUserDetailItem> | null = await ResourcesUtils.getResourcesJson<ResponseDTO<MineUserDetailItem>>('other_user512157124138245_detail.json',context );
if (!compRes || !compRes.data) {
Logger.info(TAG, `getMineUserDetailDataLocal compRes is empty`);
return new MineUserDetailItem()
}
Logger.info(TAG, `getMineUserDetailDataLocal getResourcesJsonSync compRes : ${JSON.stringify(compRes)}`);
return compRes.data
}
/**
* 个人中心 获取其他用户等级
*/
getOtherUserLevelData(item:string[],context: Context): Promise<MineUserLevelItem[]> {
return new Promise<MineUserLevelItem[]>((success, error) => {
Logger.info(TAG, `getAppointmentList start`);
this.fetchOtherUserLevelData(item).then((navResDTO: ResponseDTO<MineUserLevelItem[]>) => {
if (!navResDTO || navResDTO.code != 0) {
success(this.getOtherUserLevelDataLocal(context))
return
}
Logger.info(TAG, "getAppointmentList then,AppointmentResDTO.timeStamp:" + navResDTO.timestamp);
let navigationBean = navResDTO.data as MineUserLevelItem[]
if(navigationBean.length>0 && StringUtils.isNotEmpty(navigationBean[0].levelHead)){
success(navigationBean);
}else{
success(this.getOtherUserLevelDataLocal(context))
}
}).catch((err: Error) => {
Logger.error(TAG, `fetchMineUserLevelData catch, error.name : ${err.name}, error.message:${err.message}`);
success(this.getOtherUserLevelDataLocal(context))
})
})
}
fetchOtherUserLevelData(item:string[]) {
let url = HttpUrlUtils.getOtherUserLevelDataUrl()
let headers: HashMap<string, string> = HttpUrlUtils.getYcgCommonHeaders();
return WDHttp.post<ResponseDTO<MineUserLevelItem[]>>(url,item, headers)
};
async getOtherUserLevelDataLocal(context: Context): Promise<MineUserLevelItem[]> {
Logger.info(TAG, `getMineUserLevelDataLocal start`);
let compRes: ResponseDTO<MineUserLevelItem[]> | null = await ResourcesUtils.getResourcesJson<ResponseDTO<MineUserLevelItem[]>>('other_user512157124138245_level.json' ,context);
if (!compRes || !compRes.data) {
Logger.info(TAG, `getMineUserLevelDataLocal compRes is empty`);
return []
}
Logger.info(TAG, `getMineUserLevelDataLocal getResourcesJsonSync compRes : ${JSON.stringify(compRes)}`);
return compRes.data
}
/**
* 其他用户的评论列表
* @param params
* @param context
* @returns
*/
getOtherCommentListData(params:OtherUserCommentListRequestItem,context: Context): Promise<MineCommentListDetailItem> {
return new Promise<MineCommentListDetailItem>((success, error) => {
Logger.info(TAG, `getAppointmentList start`);
this.fetchOtherCommentListData(params).then((navResDTO: ResponseDTO<MineCommentListDetailItem>) => {
if (!navResDTO || navResDTO.code != 0) {
success(this.getOtherCommentListDataLocal(context))
return
}
Logger.info(TAG, "getAppointmentList then,AppointmentResDTO.timeStamp:" + navResDTO.timestamp);
let navigationBean = navResDTO.data as MineCommentListDetailItem
success(navigationBean);
}).catch((err: Error) => {
Logger.error(TAG, `fetchAppointmentListDataApi catch, error.name : ${err.name}, error.message:${err.message}`);
success(this.getOtherCommentListDataLocal(context))
})
})
}
fetchOtherCommentListData(object:OtherUserCommentListRequestItem) {
let url = HttpUrlUtils.getOtherCommentListDataUrl()+`?pageSize=${object.pageSize}&pageNum=${object.pageNum}&creatorId=${object.creatorId}&time=${object.time}&userType=${object.userType}&userId=${object.userId}`
let headers: HashMap<string, string> = HttpUrlUtils.getYcgCommonHeaders();
return WDHttp.get<ResponseDTO<MineCommentListDetailItem>>(url, headers)
};
async getOtherCommentListDataLocal(context: Context): Promise<MineCommentListDetailItem> {
Logger.info(TAG, `getMineFollowListDataLocal start`);
let compRes: ResponseDTO<MineCommentListDetailItem> | null = await ResourcesUtils.getResourcesJson<ResponseDTO<MineCommentListDetailItem>>('other_user512157124138245_comment_list_data.json' ,context);
if (!compRes || !compRes.data) {
Logger.info(TAG, `getMineFollowListDataLocal compRes is empty`);
return new MineCommentListDetailItem()
}
Logger.info(TAG, `getMineFollowListDataLocal getResourcesJsonSync compRes : ${JSON.stringify(compRes)}`);
return compRes.data
}
/**
* 查询是否点赞了这条评论
* @param params
* @param context
* @returns
*/
getOtherUserCommentLikeStatusData(params:OtherUserCommentLikeStatusRequestItem,context: Context): Promise<QueryCommentListIsLikedItem[]> {
return new Promise<QueryCommentListIsLikedItem[]>((success, error) => {
Logger.info(TAG, `getAppointmentList start`);
this.fetchOtherUserCommentLikeStatusData(params).then((navResDTO: ResponseDTO<QueryCommentListIsLikedItem[]>) => {
if (!navResDTO || navResDTO.code != 0) {
success(this.getOtherUserCommentLikeStatusDataLocal(context))
return
}
Logger.info(TAG, "getAppointmentList then,AppointmentResDTO.timeStamp:" + navResDTO.timestamp);
let navigationBean = navResDTO.data as QueryCommentListIsLikedItem[]
success(navigationBean);
}).catch((err: Error) => {
Logger.error(TAG, `fetchAppointmentListDataApi catch, error.name : ${err.name}, error.message:${err.message}`);
success(this.getOtherUserCommentLikeStatusDataLocal(context))
})
})
}
fetchOtherUserCommentLikeStatusData(object:OtherUserCommentLikeStatusRequestItem) {
let url = HttpUrlUtils.getFollowListStatusDataUrl()
let headers: HashMap<string, string> = HttpUrlUtils.getYcgCommonHeaders();
return WDHttp.post<ResponseDTO<QueryCommentListIsLikedItem[]>>(url,object, headers)
};
async getOtherUserCommentLikeStatusDataLocal(context: Context): Promise<QueryCommentListIsLikedItem[]> {
Logger.info(TAG, `getMineFollowListDataLocal start`);
let compRes: ResponseDTO<QueryCommentListIsLikedItem[]> | null = await ResourcesUtils.getResourcesJson<ResponseDTO<QueryCommentListIsLikedItem[]>>('other_user512157124138245_comment_list_liked_data.json',context );
if (!compRes || !compRes.data) {
Logger.info(TAG, `getMineFollowListDataLocal compRes is empty`);
return []
}
Logger.info(TAG, `getMineFollowListDataLocal getResourcesJsonSync compRes : ${JSON.stringify(compRes)}`);
return compRes.data
}
/**
* 其他用户的关注列表
* @param params
* @param context
* @returns
*/
getOtherUserFollowListData(params:UserFollowListRequestItem,context: Context): Promise<MineFollowListItem> {
return new Promise<MineFollowListItem>((success, error) => {
Logger.info(TAG, `getAppointmentList start`);
this.fetchOtherUserFollowListData(params).then((navResDTO: ResponseDTO<MineFollowListItem>) => {
if (!navResDTO || navResDTO.code != 0) {
success(this.getOtherUserFollowListDataLocal(context))
return
}
Logger.info(TAG, "getAppointmentList then,AppointmentResDTO.timeStamp:" + navResDTO.timestamp);
let navigationBean = navResDTO.data as MineFollowListItem
success(navigationBean);
}).catch((err: Error) => {
Logger.error(TAG, `fetchAppointmentListDataApi catch, error.name : ${err.name}, error.message:${err.message}`);
success(this.getOtherUserFollowListDataLocal(context))
})
})
}
fetchOtherUserFollowListData(object:UserFollowListRequestItem) {
let url = HttpUrlUtils.getOtherUserFollowListDataUrl()+`?pageSize=${object.pageSize}&pageNum=${object.pageNum}&queryUserId=${object.queryUserId}&userType=${object.userType}&userId=${"567387477063621"}`
let headers: HashMap<string, string> = HttpUrlUtils.getYcgCommonHeaders();
return WDHttp.get<ResponseDTO<MineFollowListItem>>(url, headers)
};
async getOtherUserFollowListDataLocal(context: Context): Promise<MineFollowListItem> {
Logger.info(TAG, `getMineFollowListDataLocal start`);
let compRes: ResponseDTO<MineFollowListItem> | null = await ResourcesUtils.getResourcesJson<ResponseDTO<MineFollowListItem>>('other_user_follow_list_data.json',context );
if (!compRes || !compRes.data) {
Logger.info(TAG, `getMineFollowListDataLocal compRes is empty`);
return new MineFollowListItem()
}
Logger.info(TAG, `getMineFollowListDataLocal getResourcesJsonSync compRes : ${JSON.stringify(compRes)}`);
return compRes.data
}
}
const minePageDatasModel = MinePageDatasModel.getInstance()
... ...
... ... @@ -76,10 +76,28 @@ export class HttpUrlUtils {
static readonly MINE_USER_LEVEL_DATA_PATH: string = "/api/rmrb-user-point/auth/level/zh/c/queryUserLevel";
/**
* 个人中心 APP获取其他用户等级
*/
static readonly OTHER_USER_LEVEL_DATA_PATH: string = "/api/rmrb-user-point/auth/level/zh/c/batchUser";
/**
* 个人中心 (号主/普通用户)我的基本信息
*/
static readonly MINE_USER_DETAIL_DATA_PATH: string = "/api/rmrb-contact/contact/zh/c/my/detail";
/**
* 个人中心 (普通用户)其他用户 的基本信息
*/
static readonly OTHER_USER_DETAIL_DATA_PATH: string = "/api/rmrb-contact/contact/zh/c/master/detail";
/**
* 个人中心 其他用户的评论列表
*/
static readonly OTHER_COMMENT_LIST_DATA_PATH: string = "/api/rmrb-comment/comment/zh/c/othersCommentList";
/**
* 个人中心 我的关注列表
*/
static readonly OTHER_USER_FOLLOW_LIST_DATA_PATH: string = "/api/rmrb-interact/interact/zh/c/userAttention/list";
private static hostUrl: string = HttpUrlUtils.HOST_UAT;
static getCommonHeaders(): HashMap<string, string> {
... ... @@ -200,6 +218,27 @@ export class HttpUrlUtils {
return url
}
static getOtherUserLevelDataUrl() {
let url = HttpUrlUtils.HOST_SIT + HttpUrlUtils.OTHER_USER_LEVEL_DATA_PATH
return url
}
static getOtherUserDetailDataUrl() {
let url = HttpUrlUtils.HOST_SIT + HttpUrlUtils.OTHER_USER_DETAIL_DATA_PATH
return url
}
static getOtherCommentListDataUrl() {
let url = HttpUrlUtils.HOST_SIT + HttpUrlUtils.OTHER_COMMENT_LIST_DATA_PATH
return url
}
static getOtherUserFollowListDataUrl() {
let url = HttpUrlUtils.HOST_SIT + HttpUrlUtils.OTHER_USER_FOLLOW_LIST_DATA_PATH
return url
}
static getYcgCommonHeaders(): HashMap<string, string> {
let headers: HashMap<string, string> = new HashMap<string, string>()
... ...
... ... @@ -10,9 +10,7 @@ class RouteManager{
jumpNewPage(target_url: string,params?: Object){
router.pushUrl({
url: target_url,
params: {
params
}
params
}).catch((error: Error) => {
console.log(TAG,JSON.stringify(error));
});
... ...
... ... @@ -7,12 +7,18 @@ export class CommentListItem{
commentContent:string = ""
targetTitle:string = ""
createTime:string = ""
likeNum:number = 0
like_status:number = 0
id:number = 0
constructor(fromUserHeader:string,fromUserName:string,targetTitle:string,createTime:string,commentContent:string ) {
constructor(fromUserHeader:string,fromUserName:string,targetTitle:string,createTime:string,commentContent:string,likeNum:number,like_status:number,id:number) {
this.fromUserHeader = fromUserHeader
this.fromUserName = fromUserName
this.commentContent = commentContent
this.targetTitle = targetTitle
this.createTime = createTime
this.likeNum = likeNum
this.like_status = like_status
this.id = id
}
}
... ...
... ... @@ -67,6 +67,7 @@ export class FollowListDetailItem{
introduction:string //介绍
status:string = "0" //是否已经关注
creatorId:string = ""
attentionUserId:string = ""
attentionCreatorId:string = ""
attentionHeadPhotoUrl:string = ""
... ... @@ -74,12 +75,13 @@ export class FollowListDetailItem{
fansNum :number = 0
constructor(headPhotoUrl:string,cnUserName:string,cnFansNum:number,introduction:string,creatorId:string,status:string ) {
constructor(headPhotoUrl:string,cnUserName:string,cnFansNum:number,introduction:string,creatorId:string,status:string,attentionUserId:string) {
this.headPhotoUrl = headPhotoUrl
this.cnUserName = cnUserName
this.cnFansNum = cnFansNum
this.introduction = introduction
this.creatorId = creatorId
this.status = status
this.attentionUserId = attentionUserId
}
}
... ...
... ... @@ -2,6 +2,7 @@
export class MineUserLevelItem{
levelHead:string = ""
levelId:number = 0
level:number = 0
levelName:string = ""
}
\ No newline at end of file
... ...
export class OtherUserCommentLikeStatusRequestItem{
commentIdList:number[] = []
}
\ No newline at end of file
... ...
export class OtherUserCommentListRequestItem {
creatorId: string = ""
pageSize: number = 20
pageNum: number = 1
time: string = ""
userType: string = "1"
userId: string = ""
constructor(creatorId: string, pageSize: number,
pageNum: number,
time: string,
userType: string,
userId: string) {
this.creatorId = creatorId
this.pageSize = pageSize
this.pageNum = pageNum
this.time = time
this.userType = userType
this.userId = userId
}
}
\ No newline at end of file
... ...
export class OtherUserDetailRequestItem {
creatorId: string = ""
userType: string = "1"
userId: string = "-1"
constructor(creatorId: string ,
userType: string,
userId: string ) {
this.creatorId = creatorId
this.userType = userType
this.userId = userId
}
}
\ No newline at end of file
... ...
export class QueryCommentListIsLikedItem{
commentId:number = 0
status:number = 0
}
\ No newline at end of file
... ...
export class RouterObject{
userId:string = ""
index:number = 0;
constructor(userId:string,index:number) {
this.userId = userId
this.index = index
}
}
\ No newline at end of file
... ...
export class UserFollowListRequestItem{
queryUserId:number = -1
pageSize:number = 20
pageNum:number = 1
userType:string = "1"
constructor(queryUserId:number, pageSize:number, pageNum:number, userType:string) {
this.queryUserId = queryUserId
this.pageSize = pageSize
this.pageNum = pageNum
this.userType = userType
}
}
\ No newline at end of file
... ...