yangchenggong1_wd

desc: 关注列表(本地数据)

import { FollowFirstTabsComponent } from 'wdComponent'
@Entry
@Component
struct FollowListPage {
build() {
Column() {
//Tab 详情
FollowFirstTabsComponent()
}
.backgroundColor($r('app.color.color_F9F9F9'))
.height('100%')
.width('100%')
}
}
\ No newline at end of file
... ...
... ... @@ -3,6 +3,10 @@
{
"name": "start_window_background",
"value": "#FFFFFF"
},
{
"name": "color_F9F9F9",
"value": "#F9F9F9"
}
]
}
\ No newline at end of file
... ...
... ... @@ -4,6 +4,7 @@
"pages/MainPage",
"pages/ColumnPage",
"pages/TestPage",
"pages/AppointmentListPage"
"pages/AppointmentListPage",
"pages/FollowListPage"
]
}
\ No newline at end of file
... ...
{
"code": "0",
"data": [
{
"children": [],
"directoryName": "阅读",
"directoryWeight": 99,
"id": 165,
"isShow": 1,
"level": 1,
"parentId": 0,
"rootId": 0
},
{
"children": [
{
"children": [
{
"directoryName": "三二",
"directoryWeight": 2,
"id": 120,
"isShow": 1,
"level": 3,
"parentId": 118,
"rootId": 117
},
{
"directoryName": "三级",
"directoryWeight": 1,
"id": 119,
"isShow": 1,
"level": 3,
"parentId": 118,
"rootId": 117
}
],
"directoryName": "二级",
"directoryWeight": 1,
"id": 118,
"isShow": 1,
"level": 2,
"parentId": 117,
"rootId": 117
}
],
"directoryName": "幽游白书",
"directoryWeight": 33,
"id": 117,
"isShow": 1,
"level": 1,
"parentId": 0,
"rootId": 0
},
{
"children": [],
"directoryName": "推荐",
"directoryWeight": 9,
"id": 386,
"isShow": 1,
"level": 1,
"parentId": 0,
"rootId": 0
},
{
"children": [],
"directoryName": "政务",
"directoryWeight": 9,
"id": 379,
"isShow": 1,
"level": 1,
"parentId": 0,
"rootId": 0
},
{
"children": [
{
"children": [],
"directoryName": "推荐",
"directoryWeight": 0,
"id": 335,
"isShow": 1,
"level": 2,
"parentId": 320,
"rootId": 320
}
],
"directoryName": "推荐",
"directoryWeight": 9,
"id": 320,
"isShow": 1,
"level": 1,
"parentId": 0,
"rootId": 0
},
{
"children": [],
"directoryName": "媒体",
"directoryWeight": 8,
"id": 390,
"isShow": 1,
"level": 1,
"parentId": 0,
"rootId": 0
},
{
"children": [],
"directoryName": "媒体",
"directoryWeight": 8,
"id": 323,
"isShow": 1,
"level": 1,
"parentId": 0,
"rootId": 0
},
{
"children": [],
"directoryName": "自媒体",
"directoryWeight": 7,
"id": 329,
"isShow": 1,
"level": 1,
"parentId": 0,
"rootId": 0
},
{
"children": [],
"directoryName": "名人",
"directoryWeight": 6,
"id": 389,
"isShow": 1,
"level": 1,
"parentId": 0,
"rootId": 0
},
{
"children": [
{
"children": [],
"directoryName": "测试",
"directoryWeight": 0,
"id": 338,
"isShow": 1,
"level": 2,
"parentId": 324,
"rootId": 324
}
],
"directoryName": "名人",
"directoryWeight": 6,
"id": 324,
"isShow": 1,
"level": 1,
"parentId": 0,
"rootId": 0
},
{
"children": [
{
"children": [],
"directoryName": "2级目录",
"directoryWeight": 0,
"id": 340,
"isShow": 1,
"level": 2,
"parentId": 312,
"rootId": 312
},
{
"children": [
{
"directoryName": "3级测试",
"directoryWeight": 0,
"id": 368,
"isShow": 1,
"level": 3,
"parentId": 339,
"rootId": 312
}
],
"directoryName": "二级目录",
"directoryWeight": 0,
"id": 339,
"isShow": 1,
"level": 2,
"parentId": 312,
"rootId": 312
},
{
"children": [
{
"directoryName": "企业",
"directoryWeight": 1,
"id": 348,
"isShow": 1,
"level": 3,
"parentId": 336,
"rootId": 312
},
{
"directoryName": "部委",
"directoryWeight": 0,
"id": 344,
"isShow": 1,
"level": 3,
"parentId": 336,
"rootId": 312
},
{
"directoryName": "地方",
"directoryWeight": 0,
"id": 341,
"isShow": 1,
"level": 3,
"parentId": 336,
"rootId": 312
}
],
"directoryName": "类型",
"directoryWeight": 0,
"id": 336,
"isShow": 1,
"level": 2,
"parentId": 312,
"rootId": 312
},
{
"children": [
{
"directoryName": "贵州省",
"directoryWeight": 0,
"id": 378,
"isShow": 1,
"level": 3,
"parentId": 332,
"rootId": 312
},
{
"directoryName": "西藏自治区",
"directoryWeight": 0,
"id": 377,
"isShow": 1,
"level": 3,
"parentId": 332,
"rootId": 312
},
{
"directoryName": "四川省",
"directoryWeight": 0,
"id": 376,
"isShow": 1,
"level": 3,
"parentId": 332,
"rootId": 312
},
{
"directoryName": "重庆市",
"directoryWeight": 0,
"id": 375,
"isShow": 1,
"level": 3,
"parentId": 332,
"rootId": 312
},
{
"directoryName": "湖南省",
"directoryWeight": 0,
"id": 374,
"isShow": 1,
"level": 3,
"parentId": 332,
"rootId": 312
},
{
"directoryName": "云南省",
"directoryWeight": 0,
"id": 373,
"isShow": 1,
"level": 3,
"parentId": 332,
"rootId": 312
},
{
"directoryName": "广西壮族自治区",
"directoryWeight": 0,
"id": 372,
"isShow": 1,
"level": 3,
"parentId": 332,
"rootId": 312
},
{
"directoryName": "宁夏回族自治区",
"directoryWeight": 0,
"id": 371,
"isShow": 1,
"level": 3,
"parentId": 332,
"rootId": 312
},
{
"directoryName": "湖北省",
"directoryWeight": 0,
"id": 370,
"isShow": 1,
"level": 3,
"parentId": 332,
"rootId": 312
},
{
"directoryName": "青海省",
"directoryWeight": 0,
"id": 369,
"isShow": 1,
"level": 3,
"parentId": 332,
"rootId": 312
},
{
"directoryName": "陕西省",
"directoryWeight": 0,
"id": 367,
"isShow": 1,
"level": 3,
"parentId": 332,
"rootId": 312
},
{
"directoryName": "甘肃省",
"directoryWeight": 0,
"id": 366,
"isShow": 1,
"level": 3,
"parentId": 332,
"rootId": 312
},
{
"directoryName": "吉林省",
"directoryWeight": 0,
"id": 365,
"isShow": 1,
"level": 3,
"parentId": 332,
"rootId": 312
},
{
"directoryName": "广东省",
"directoryWeight": 0,
"id": 364,
"isShow": 1,
"level": 3,
"parentId": 332,
"rootId": 312
},
{
"directoryName": "海南省",
"directoryWeight": 0,
"id": 363,
"isShow": 1,
"level": 3,
"parentId": 332,
"rootId": 312
},
{
"directoryName": "辽宁省",
"directoryWeight": 0,
"id": 362,
"isShow": 1,
"level": 3,
"parentId": 332,
"rootId": 312
},
{
"directoryName": "江苏省",
"directoryWeight": 0,
"id": 361,
"isShow": 1,
"level": 3,
"parentId": 332,
"rootId": 312
},
{
"directoryName": "新疆维吾尔族自治区",
"directoryWeight": 0,
"id": 360,
"isShow": 1,
"level": 3,
"parentId": 332,
"rootId": 312
},
{
"directoryName": "福建省",
"directoryWeight": 0,
"id": 359,
"isShow": 1,
"level": 3,
"parentId": 332,
"rootId": 312
},
{
"directoryName": "山东省",
"directoryWeight": 0,
"id": 358,
"isShow": 1,
"level": 3,
"parentId": 332,
"rootId": 312
},
{
"directoryName": "河南省",
"directoryWeight": 0,
"id": 357,
"isShow": 1,
"level": 3,
"parentId": 332,
"rootId": 312
},
{
"directoryName": "浙江省",
"directoryWeight": 0,
"id": 356,
"isShow": 1,
"level": 3,
"parentId": 332,
"rootId": 312
},
{
"directoryName": "安徽省",
"directoryWeight": 0,
"id": 355,
"isShow": 1,
"level": 3,
"parentId": 332,
"rootId": 312
},
{
"directoryName": "上海市",
"directoryWeight": 0,
"id": 354,
"isShow": 1,
"level": 3,
"parentId": 332,
"rootId": 312
},
{
"directoryName": "河北省",
"directoryWeight": 0,
"id": 353,
"isShow": 1,
"level": 3,
"parentId": 332,
"rootId": 312
},
{
"directoryName": "黑龙江省",
"directoryWeight": 0,
"id": 352,
"isShow": 1,
"level": 3,
"parentId": 332,
"rootId": 312
},
{
"directoryName": "江西省",
"directoryWeight": 0,
"id": 351,
"isShow": 1,
"level": 3,
"parentId": 332,
"rootId": 312
},
{
"directoryName": "内蒙古自治区",
"directoryWeight": 0,
"id": 350,
"isShow": 1,
"level": 3,
"parentId": 332,
"rootId": 312
},
{
"directoryName": "北京市",
"directoryWeight": 0,
"id": 349,
"isShow": 1,
"level": 3,
"parentId": 332,
"rootId": 312
},
{
"directoryName": "山西省",
"directoryWeight": 0,
"id": 346,
"isShow": 1,
"level": 3,
"parentId": 332,
"rootId": 312
}
],
"directoryName": "地域",
"directoryWeight": 0,
"id": 332,
"isShow": 1,
"level": 2,
"parentId": 312,
"rootId": 312
}
],
"directoryName": "政务",
"directoryWeight": 5,
"id": 312,
"isShow": 1,
"level": 1,
"parentId": 0,
"rootId": 0
},
{
"children": [],
"directoryName": "学校",
"directoryWeight": 4,
"id": 331,
"isShow": 1,
"level": 1,
"parentId": 0,
"rootId": 0
},
{
"children": [],
"directoryName": "机构",
"directoryWeight": 3,
"id": 330,
"isShow": 1,
"level": 1,
"parentId": 0,
"rootId": 0
},
{
"children": [
{
"children": [
{
"directoryName": "新闻联播",
"directoryWeight": 3,
"id": 79,
"isShow": 1,
"level": 3,
"parentId": 75,
"rootId": 74
},
{
"directoryName": "第三季",
"directoryWeight": 2,
"id": 78,
"isShow": 1,
"level": 3,
"parentId": 75,
"rootId": 74
},
{
"directoryName": "三级",
"directoryWeight": 1,
"id": 76,
"isShow": 1,
"level": 3,
"parentId": 75,
"rootId": 74
}
],
"directoryName": "短视频",
"directoryWeight": 1,
"id": 75,
"isShow": 1,
"level": 2,
"parentId": 74,
"rootId": 74
}
],
"directoryName": "创作",
"directoryWeight": 3,
"id": 74,
"isShow": 1,
"level": 1,
"parentId": 0,
"rootId": 0
},
{
"children": [
{
"children": [],
"directoryName": "教学",
"directoryWeight": 2,
"id": 72,
"isShow": 1,
"level": 2,
"parentId": 64,
"rootId": 64
},
{
"children": [],
"directoryName": "热门",
"directoryWeight": 1,
"id": 73,
"isShow": 1,
"level": 2,
"parentId": 64,
"rootId": 64
},
{
"children": [],
"directoryName": "赛事",
"directoryWeight": 1,
"id": 71,
"isShow": 1,
"level": 2,
"parentId": 64,
"rootId": 64
}
],
"directoryName": "游戏",
"directoryWeight": 2,
"id": 64,
"isShow": 1,
"level": 1,
"parentId": 0,
"rootId": 0
},
{
"children": [],
"directoryName": "新闻",
"directoryWeight": 1,
"id": 315,
"isShow": 1,
"level": 1,
"parentId": 0,
"rootId": 0
},
{
"children": [
{
"children": [],
"directoryName": "趣闻",
"directoryWeight": 6,
"id": 70,
"isShow": 1,
"level": 2,
"parentId": 63,
"rootId": 63
},
{
"children": [],
"directoryName": "时政",
"directoryWeight": 5,
"id": 69,
"isShow": 1,
"level": 2,
"parentId": 63,
"rootId": 63
},
{
"children": [],
"directoryName": "农业",
"directoryWeight": 3,
"id": 68,
"isShow": 1,
"level": 2,
"parentId": 63,
"rootId": 63
},
{
"children": [],
"directoryName": "娱乐",
"directoryWeight": 3,
"id": 67,
"isShow": 1,
"level": 2,
"parentId": 63,
"rootId": 63
},
{
"children": [],
"directoryName": "科技",
"directoryWeight": 2,
"id": 66,
"isShow": 1,
"level": 2,
"parentId": 63,
"rootId": 63
},
{
"children": [],
"directoryName": "国际",
"directoryWeight": 1,
"id": 65,
"isShow": 1,
"level": 2,
"parentId": 63,
"rootId": 63
}
],
"directoryName": "新闻",
"directoryWeight": 1,
"id": 63,
"isShow": 1,
"level": 1,
"parentId": 0,
"rootId": 0
},
{
"children": [],
"directoryName": "公安",
"directoryWeight": 0,
"id": 388,
"isShow": 1,
"level": 1,
"parentId": 0,
"rootId": 0
},
{
"children": [],
"directoryName": "dddd",
"directoryWeight": 0,
"id": 387,
"isShow": 1,
"level": 1,
"parentId": 0,
"rootId": 0
},
{
"children": [],
"directoryName": "健康",
"directoryWeight": 0,
"id": 384,
"isShow": 1,
"level": 1,
"parentId": 0,
"rootId": 0
},
{
"children": [],
"directoryName": "综合",
"directoryWeight": 0,
"id": 328,
"isShow": 1,
"level": 1,
"parentId": 0,
"rootId": 0
},
{
"children": [],
"directoryName": "房产",
"directoryWeight": 0,
"id": 327,
"isShow": 1,
"level": 1,
"parentId": 0,
"rootId": 0
},
{
"children": [],
"directoryName": "健康",
"directoryWeight": 0,
"id": 318,
"isShow": 1,
"level": 1,
"parentId": 0,
"rootId": 0
},
{
"children": [],
"directoryName": "历史",
"directoryWeight": 0,
"id": 310,
"isShow": 1,
"level": 1,
"parentId": 0,
"rootId": 0
},
{
"children": [],
"directoryName": "dddd",
"directoryWeight": 0,
"id": 309,
"isShow": 1,
"level": 1,
"parentId": 0,
"rootId": 0
},
{
"children": [
{
"children": [],
"directoryName": "aaaa",
"directoryWeight": 1,
"id": 333,
"isShow": 1,
"level": 2,
"parentId": 308,
"rootId": 308
},
{
"children": [],
"directoryName": "qqq",
"directoryWeight": 0,
"id": 334,
"isShow": 1,
"level": 2,
"parentId": 308,
"rootId": 308
}
],
"directoryName": "dddd",
"directoryWeight": 0,
"id": 308,
"isShow": 1,
"level": 1,
"parentId": 0,
"rootId": 0
}
],
"message": "Success",
"success": true,
"timestamp": 1710741803593
}
\ No newline at end of file
... ...
{
"code": "0",
"data": {
"list": [{
"attentionNum": 0,
"authIcon": "",
"authId": 0,
"authPersonal": "",
"authTitle": "",
"categoryAuth": "",
"city": "110100",
"cnAttentionNum": 0,
"cnCollectNum": 0,
"cnCommentNum": 0,
"cnFansNum": 4,
"cnIsAttention": 1,
"cnIsComment": 1,
"cnIsLike": 1,
"cnLikeNum": 0,
"cnLiveCommentControl": 1,
"cnLiveGiftControl": 1,
"cnLiveLikeControl": 1,
"cnLiveShareControl": 1,
"cnMainControl": 1,
"cnRegistTime": 1695280071000,
"cnShareControl": 1,
"cnShareNum": 0,
"cnUserId": "444937588589253",
"cnUserName": "QACrawler2115",
"cnUserType": "2",
"collectNum": 0,
"creatorId": "3004862",
"district": "110101",
"fansNum": 0,
"headPhotoUrl": "https://sitcontentjdcdn.aikan.pdnews.cn/vod/content/202309/202309Th211436299/GLN.png?x-oss-process=image/resize,l_400/auto-orient,1/quality,q_90/format,jpg",
"honoraryIcon": "",
"honoraryTitle": "",
"introduction": "知识博主",
"isAttention": 1,
"isComment": 1,
"isLike": 1,
"isVisiable": 1,
"likeNum": 0,
"liveCommentControl": 1,
"liveGiftControl": 1,
"liveLikeControl": 1,
"liveShareControl": 1,
"posterShareControl": 1,
"province": "110000",
"publishNum": 0,
"region": "",
"shareControl": 1,
"shareNum": 0,
"shopOpen": 0,
"storeUrl": "",
"subjectType": 0,
"userId": "",
"userName": "QACrawler2115",
"userType": "2",
"waresSwitch": 1
}, {
"attentionNum": 0,
"authIcon": "",
"authId": 0,
"authPersonal": "",
"authTitle": "",
"categoryAuth": "",
"city": "230100",
"cnAttentionNum": 0,
"cnCollectNum": 0,
"cnCommentNum": 0,
"cnFansNum": 4,
"cnIsAttention": 1,
"cnIsComment": 1,
"cnIsLike": 1,
"cnLikeNum": 0,
"cnLiveCommentControl": 1,
"cnLiveGiftControl": 1,
"cnLiveLikeControl": 1,
"cnLiveShareControl": 1,
"cnMainControl": 1,
"cnRegistTime": 1695276994000,
"cnShareControl": 1,
"cnShareNum": 0,
"cnUserId": "444911718724933",
"cnUserName": "一休哥",
"cnUserType": "2",
"collectNum": 0,
"creatorId": "3004861",
"district": "230102",
"fansNum": 0,
"headPhotoUrl": "https://sitcontentjdcdn.aikan.pdnews.cn/vod/content/202309/202309Th141630857/Ptx.png?x-oss-process=image/resize,l_400/auto-orient,1/quality,q_90/format,jpg",
"honoraryIcon": "",
"honoraryTitle": "",
"introduction": "中文端号主",
"isAttention": 1,
"isComment": 1,
"isLike": 1,
"isVisiable": 1,
"likeNum": 0,
"liveCommentControl": 1,
"liveGiftControl": 1,
"liveLikeControl": 1,
"liveShareControl": 1,
"posterShareControl": 1,
"province": "230000",
"publishNum": 0,
"region": "安徽",
"shareControl": 1,
"shareNum": 0,
"shopOpen": 0,
"storeUrl": "",
"subjectType": 2,
"userId": "",
"userName": "一休哥",
"userType": "2",
"waresSwitch": 1
}, {
"attentionNum": 0,
"authIcon": "",
"authId": 0,
"authPersonal": "",
"authTitle": "",
"categoryAuth": "",
"city": "110100",
"cnAttentionNum": 0,
"cnCollectNum": 0,
"cnCommentNum": 12,
"cnFansNum": 8,
"cnIsAttention": 1,
"cnIsComment": 1,
"cnIsLike": 1,
"cnLikeNum": 2,
"cnLiveCommentControl": 1,
"cnLiveGiftControl": 1,
"cnLiveLikeControl": 1,
"cnLiveShareControl": 1,
"cnMainControl": 1,
"cnRegistTime": 1695275999000,
"cnShareControl": 1,
"cnShareNum": 1,
"cnUserId": "444903323309381",
"cnUserName": "0921媒体",
"cnUserType": "3",
"collectNum": 0,
"creatorId": "3004860",
"district": "110101",
"fansNum": 0,
"headPhotoUrl": "https://sitcontentjdcdn.aikan.pdnews.cn/vod/content/202309/202309Th135954709/qdL.png?x-oss-process=image/resize,l_400/auto-orient,1/quality,q_90/format,jpg",
"honoraryIcon": "",
"honoraryTitle": "",
"introduction": "0921媒体",
"isAttention": 1,
"isComment": 1,
"isLike": 1,
"isVisiable": 1,
"likeNum": 0,
"liveCommentControl": 1,
"liveGiftControl": 1,
"liveLikeControl": 1,
"liveShareControl": 1,
"posterShareControl": 0,
"province": "110000",
"publishNum": 0,
"region": "上海",
"shareControl": 1,
"shareNum": 0,
"shopOpen": 0,
"storeUrl": "",
"subjectType": 1,
"userId": "",
"userName": "0921媒体",
"userType": "3",
"waresSwitch": 1
}, {
"attentionNum": 0,
"authIcon": "https://sitcontentjdcdn.aikan.pdnews.cn/creator-category/icon/auth/blue.png",
"authId": 1,
"authPersonal": "",
"authTitle": "黄袍加身V",
"categoryAuth": "黄袍加身V",
"city": "340100",
"cnAttentionNum": 9,
"cnCollectNum": 0,
"cnCommentNum": 3,
"cnFansNum": 9,
"cnIsAttention": 1,
"cnIsComment": 1,
"cnIsLike": 1,
"cnLikeNum": 7,
"cnLiveCommentControl": 1,
"cnLiveGiftControl": 1,
"cnLiveLikeControl": 1,
"cnLiveShareControl": 1,
"cnMainControl": 1,
"cnRegistTime": 1695260417000,
"cnShareControl": 1,
"cnShareNum": 0,
"cnUserId": "444776025830725",
"cnUserName": "李智恩3",
"cnUserType": "2",
"collectNum": 0,
"creatorId": "3004855",
"district": "340102",
"fansNum": 0,
"headPhotoUrl": "https://sitcontentjdcdn.aikan.pdnews.cn/vod/content/202309/202309Th094010643/N5o.png?x-oss-process=image/resize,l_400/auto-orient,1/quality,q_90/format,jpg",
"honoraryIcon": "",
"honoraryTitle": "",
"introduction": "IU",
"isAttention": 1,
"isComment": 1,
"isLike": 1,
"isVisiable": 1,
"likeNum": 0,
"liveCommentControl": 1,
"liveGiftControl": 1,
"liveLikeControl": 1,
"liveShareControl": 1,
"posterShareControl": 0,
"province": "340000",
"publishNum": 0,
"region": "安徽",
"shareControl": 1,
"shareNum": 0,
"shopOpen": 1,
"storeUrl": "",
"subjectType": 1,
"userId": "",
"userName": "李智恩3",
"userType": "2",
"waresSwitch": 0
}, {
"attentionNum": 0,
"authIcon": "https://sitcontentjdcdn.aikan.pdnews.cn/creator-category/icon/auth/yellow.png",
"authId": 2,
"authPersonal": "",
"authTitle": "黄VV",
"categoryAuth": "黄VV",
"city": "120100",
"cnAttentionNum": 1,
"cnCollectNum": 1,
"cnCommentNum": 7,
"cnFansNum": 13,
"cnIsAttention": 1,
"cnIsComment": 1,
"cnIsLike": 1,
"cnLikeNum": 0,
"cnLiveCommentControl": 1,
"cnLiveGiftControl": 1,
"cnLiveLikeControl": 1,
"cnLiveShareControl": 1,
"cnMainControl": 1,
"cnRegistTime": 1695202406000,
"cnShareControl": 1,
"cnShareNum": 0,
"cnUserId": "444300764043333",
"cnUserName": "创作者账号7777",
"cnUserType": "2",
"collectNum": 0,
"creatorId": "3004853",
"district": "120101",
"fansNum": 0,
"headPhotoUrl": "https://sitcontentjdcdn.aikan.pdnews.cn/image/creator/2023092715/4727ab5db7604dbbac9ffb94ed03614e.png?x-oss-process=image/resize,l_400/auto-orient,1/quality,q_90/format,jpg",
"honoraryIcon": "",
"honoraryTitle": "",
"introduction": "协作平台是进行团队开发、协作的系统,一般是基于互联网,也有用专业网的情况。协作平台的主要功能是:分工合作、进度控制、版本控制等功能。协作平台是进行团队开发、协作的系统,一般是基于互联网,也有用专业网的情况。协作平台的主要功能是:分工合作、进度控制、版本控制等功能。协作平台是进行团队开发、协作的系统,一般是基于互联网,也有用专业网的情况。协作平台的主要功能是:分工合作、进度控制、版本控制等功能。协作",
"isAttention": 1,
"isComment": 1,
"isLike": 1,
"isVisiable": 1,
"likeNum": 0,
"liveCommentControl": 1,
"liveGiftControl": 1,
"liveLikeControl": 1,
"liveShareControl": 1,
"posterShareControl": 0,
"province": "120000",
"publishNum": 0,
"region": "安徽",
"shareControl": 1,
"shareNum": 0,
"shopOpen": 1,
"storeUrl": "",
"subjectType": 0,
"userId": "",
"userName": "创作者账号7777",
"userType": "2",
"waresSwitch": 0
}, {
"attentionNum": 0,
"authIcon": "",
"authId": 0,
"authPersonal": "",
"authTitle": "",
"categoryAuth": "",
"city": "110100",
"cnAttentionNum": 0,
"cnCollectNum": 0,
"cnCommentNum": 0,
"cnFansNum": 9,
"cnIsAttention": 1,
"cnIsComment": 1,
"cnIsLike": 1,
"cnLikeNum": 6,
"cnLiveCommentControl": 1,
"cnLiveGiftControl": 1,
"cnLiveLikeControl": 1,
"cnLiveShareControl": 1,
"cnMainControl": 1,
"cnRegistTime": 1695201858000,
"cnShareControl": 1,
"cnShareNum": 0,
"cnUserId": "444296355502149",
"cnUserName": "0920个人",
"cnUserType": "2",
"collectNum": 0,
"creatorId": "3004851",
"district": "110101",
"fansNum": 0,
"headPhotoUrl": "https://sitcontentjdcdn.aikan.pdnews.cn/vod/content/202309/202309We172415100/h2j.png?x-oss-process=image/resize,l_400/auto-orient,1/quality,q_90/format,jpg",
"honoraryIcon": "https://cdn.aikan.pdnews.cn/image/picture/202312/20231223173451966FdV.png",
"honoraryTitle": "快乐星球",
"introduction": "账号简介",
"isAttention": 1,
"isComment": 1,
"isLike": 1,
"isVisiable": 1,
"likeNum": 0,
"liveCommentControl": 1,
"liveGiftControl": 1,
"liveLikeControl": 1,
"liveShareControl": 1,
"posterShareControl": 1,
"province": "110000",
"publishNum": 0,
"region": "上海",
"shareControl": 1,
"shareNum": 0,
"shopOpen": 0,
"storeUrl": "",
"subjectType": 0,
"userId": "",
"userName": "0920个人",
"userType": "2",
"waresSwitch": 1
}, {
"attentionNum": 0,
"authIcon": "",
"authId": 0,
"authPersonal": "",
"authTitle": "",
"categoryAuth": "",
"city": "120100",
"cnAttentionNum": 0,
"cnCollectNum": 0,
"cnCommentNum": 0,
"cnFansNum": 10,
"cnIsAttention": 1,
"cnIsComment": 1,
"cnIsLike": 1,
"cnLikeNum": 0,
"cnLiveCommentControl": 1,
"cnLiveGiftControl": 1,
"cnLiveLikeControl": 1,
"cnLiveShareControl": 1,
"cnMainControl": 1,
"cnRegistTime": 1695190066000,
"cnShareControl": 1,
"cnShareNum": 0,
"cnUserId": "444200272593477",
"cnUserName": "zhuaqu005",
"cnUserType": "2",
"collectNum": 0,
"creatorId": "3004849",
"district": "120101",
"fansNum": 0,
"headPhotoUrl": "https://sitcontentjdcdn.aikan.pdnews.cn/vod/content/202309/202309We140931534/CIX.png?x-oss-process=image/resize,l_400/auto-orient,1/quality,q_90/format,jpg",
"honoraryIcon": "",
"honoraryTitle": "",
"introduction": "aaa",
"isAttention": 1,
"isComment": 1,
"isLike": 1,
"isVisiable": 1,
"likeNum": 0,
"liveCommentControl": 1,
"liveGiftControl": 1,
"liveLikeControl": 1,
"liveShareControl": 1,
"posterShareControl": 1,
"province": "120000",
"publishNum": 0,
"region": "上海",
"shareControl": 1,
"shareNum": 0,
"shopOpen": 0,
"storeUrl": "",
"subjectType": 0,
"userId": "",
"userName": "zhuaqu005",
"userType": "2",
"waresSwitch": 1
}],
"pageNum": 1,
"pageSize": 20,
"totalCount": 7
},
"message": "Success",
"success": true,
"timestamp": 1710742034894
}
\ No newline at end of file
... ...
... ... @@ -29,3 +29,5 @@ export { BigPicCardComponent } from "./components/view/BigPicCardComponent"
export { HeadPictureCardComponent } from "./components/view/HeadPictureCardComponent"
export { AppointmentListUI } from "./components/page/mine/AppointmentListUI"
export { FollowFirstTabsComponent } from "./components/page/mine/follow/FollowFirstTabsComponent"
\ No newline at end of file
... ...
... ... @@ -40,6 +40,10 @@ export default struct MinePagePersonFunctionUI {
RouteManager.jumpNewPage("pages/AppointmentListPage")
break;
}
case "关注":{
RouteManager.jumpNewPage("pages/FollowListPage")
break;
}
}
}).width('169lpx')
.height('117lpx')
... ...
import { ResourcesUtils } from 'wdKit'
import { ResponseDTO } from 'wdNetwork'
import { FollowListItem } from '../../../../viewmodel/FollowListItem'
import { CustomTitleUI } from '../../../reusable/CustomTitleUI'
import { FollowSecondTabsComponent } from './FollowSecondTabsComponent'
@Component
export struct FollowFirstTabsComponent{
@State currentIndex: number = 0
private controller: TabsController = new TabsController()
@State data:FollowListItem[] = []
fontColor: string = '#999999'
selectedFontColor: string = '#000000'
aboutToAppear(){
this.data.push(new FollowListItem("我的"))
// let res = JSON.parse(`{"code":"0","data":[{"children":[],"directoryName":"阅读","directoryWeight":99,"id":165,"isShow":1,"level":1,"parentId":0,"rootId":0},{"children":[{"children":[{"directoryName":"三二","directoryWeight":2,"id":120,"isShow":1,"level":3,"parentId":118,"rootId":117},{"directoryName":"三级","directoryWeight":1,"id":119,"isShow":1,"level":3,"parentId":118,"rootId":117}],"directoryName":"二级","directoryWeight":1,"id":118,"isShow":1,"level":2,"parentId":117,"rootId":117}],"directoryName":"幽游白书","directoryWeight":33,"id":117,"isShow":1,"level":1,"parentId":0,"rootId":0},{"children":[],"directoryName":"推荐","directoryWeight":9,"id":386,"isShow":1,"level":1,"parentId":0,"rootId":0},{"children":[],"directoryName":"政务","directoryWeight":9,"id":379,"isShow":1,"level":1,"parentId":0,"rootId":0},{"children":[{"children":[],"directoryName":"推荐","directoryWeight":0,"id":335,"isShow":1,"level":2,"parentId":320,"rootId":320}],"directoryName":"推荐","directoryWeight":9,"id":320,"isShow":1,"level":1,"parentId":0,"rootId":0},{"children":[],"directoryName":"媒体","directoryWeight":8,"id":390,"isShow":1,"level":1,"parentId":0,"rootId":0},{"children":[],"directoryName":"媒体","directoryWeight":8,"id":323,"isShow":1,"level":1,"parentId":0,"rootId":0},{"children":[],"directoryName":"自媒体","directoryWeight":7,"id":329,"isShow":1,"level":1,"parentId":0,"rootId":0},{"children":[],"directoryName":"名人","directoryWeight":6,"id":389,"isShow":1,"level":1,"parentId":0,"rootId":0},{"children":[{"children":[],"directoryName":"测试","directoryWeight":0,"id":338,"isShow":1,"level":2,"parentId":324,"rootId":324}],"directoryName":"名人","directoryWeight":6,"id":324,"isShow":1,"level":1,"parentId":0,"rootId":0},{"children":[{"children":[],"directoryName":"2级目录","directoryWeight":0,"id":340,"isShow":1,"level":2,"parentId":312,"rootId":312},{"children":[{"directoryName":"3级测试","directoryWeight":0,"id":368,"isShow":1,"level":3,"parentId":339,"rootId":312}],"directoryName":"二级目录","directoryWeight":0,"id":339,"isShow":1,"level":2,"parentId":312,"rootId":312},{"children":[{"directoryName":"企业","directoryWeight":1,"id":348,"isShow":1,"level":3,"parentId":336,"rootId":312},{"directoryName":"部委","directoryWeight":0,"id":344,"isShow":1,"level":3,"parentId":336,"rootId":312},{"directoryName":"地方","directoryWeight":0,"id":341,"isShow":1,"level":3,"parentId":336,"rootId":312}],"directoryName":"类型","directoryWeight":0,"id":336,"isShow":1,"level":2,"parentId":312,"rootId":312},{"children":[{"directoryName":"贵州省","directoryWeight":0,"id":378,"isShow":1,"level":3,"parentId":332,"rootId":312},{"directoryName":"西藏自治区","directoryWeight":0,"id":377,"isShow":1,"level":3,"parentId":332,"rootId":312},{"directoryName":"四川省","directoryWeight":0,"id":376,"isShow":1,"level":3,"parentId":332,"rootId":312},{"directoryName":"重庆市","directoryWeight":0,"id":375,"isShow":1,"level":3,"parentId":332,"rootId":312},{"directoryName":"湖南省","directoryWeight":0,"id":374,"isShow":1,"level":3,"parentId":332,"rootId":312},{"directoryName":"云南省","directoryWeight":0,"id":373,"isShow":1,"level":3,"parentId":332,"rootId":312},{"directoryName":"广西壮族自治区","directoryWeight":0,"id":372,"isShow":1,"level":3,"parentId":332,"rootId":312},{"directoryName":"宁夏回族自治区","directoryWeight":0,"id":371,"isShow":1,"level":3,"parentId":332,"rootId":312},{"directoryName":"湖北省","directoryWeight":0,"id":370,"isShow":1,"level":3,"parentId":332,"rootId":312},{"directoryName":"青海省","directoryWeight":0,"id":369,"isShow":1,"level":3,"parentId":332,"rootId":312},{"directoryName":"陕西省","directoryWeight":0,"id":367,"isShow":1,"level":3,"parentId":332,"rootId":312},{"directoryName":"甘肃省","directoryWeight":0,"id":366,"isShow":1,"level":3,"parentId":332,"rootId":312},{"directoryName":"吉林省","directoryWeight":0,"id":365,"isShow":1,"level":3,"parentId":332,"rootId":312},{"directoryName":"广东省","directoryWeight":0,"id":364,"isShow":1,"level":3,"parentId":332,"rootId":312},{"directoryName":"海南省","directoryWeight":0,"id":363,"isShow":1,"level":3,"parentId":332,"rootId":312},{"directoryName":"辽宁省","directoryWeight":0,"id":362,"isShow":1,"level":3,"parentId":332,"rootId":312},{"directoryName":"江苏省","directoryWeight":0,"id":361,"isShow":1,"level":3,"parentId":332,"rootId":312},{"directoryName":"新疆维吾尔族自治区","directoryWeight":0,"id":360,"isShow":1,"level":3,"parentId":332,"rootId":312},{"directoryName":"福建省","directoryWeight":0,"id":359,"isShow":1,"level":3,"parentId":332,"rootId":312},{"directoryName":"山东省","directoryWeight":0,"id":358,"isShow":1,"level":3,"parentId":332,"rootId":312},{"directoryName":"河南省","directoryWeight":0,"id":357,"isShow":1,"level":3,"parentId":332,"rootId":312},{"directoryName":"浙江省","directoryWeight":0,"id":356,"isShow":1,"level":3,"parentId":332,"rootId":312},{"directoryName":"安徽省","directoryWeight":0,"id":355,"isShow":1,"level":3,"parentId":332,"rootId":312},{"directoryName":"上海市","directoryWeight":0,"id":354,"isShow":1,"level":3,"parentId":332,"rootId":312},{"directoryName":"河北省","directoryWeight":0,"id":353,"isShow":1,"level":3,"parentId":332,"rootId":312},{"directoryName":"黑龙江省","directoryWeight":0,"id":352,"isShow":1,"level":3,"parentId":332,"rootId":312},{"directoryName":"江西省","directoryWeight":0,"id":351,"isShow":1,"level":3,"parentId":332,"rootId":312},{"directoryName":"内蒙古自治区","directoryWeight":0,"id":350,"isShow":1,"level":3,"parentId":332,"rootId":312},{"directoryName":"北京市","directoryWeight":0,"id":349,"isShow":1,"level":3,"parentId":332,"rootId":312},{"directoryName":"山西省","directoryWeight":0,"id":346,"isShow":1,"level":3,"parentId":332,"rootId":312}],"directoryName":"地域","directoryWeight":0,"id":332,"isShow":1,"level":2,"parentId":312,"rootId":312}],"directoryName":"政务","directoryWeight":5,"id":312,"isShow":1,"level":1,"parentId":0,"rootId":0},{"children":[],"directoryName":"学校","directoryWeight":4,"id":331,"isShow":1,"level":1,"parentId":0,"rootId":0},{"children":[],"directoryName":"机构","directoryWeight":3,"id":330,"isShow":1,"level":1,"parentId":0,"rootId":0},{"children":[{"children":[{"directoryName":"新闻联播","directoryWeight":3,"id":79,"isShow":1,"level":3,"parentId":75,"rootId":74},{"directoryName":"第三季","directoryWeight":2,"id":78,"isShow":1,"level":3,"parentId":75,"rootId":74},{"directoryName":"三级","directoryWeight":1,"id":76,"isShow":1,"level":3,"parentId":75,"rootId":74}],"directoryName":"短视频","directoryWeight":1,"id":75,"isShow":1,"level":2,"parentId":74,"rootId":74}],"directoryName":"创作","directoryWeight":3,"id":74,"isShow":1,"level":1,"parentId":0,"rootId":0},{"children":[{"children":[],"directoryName":"教学","directoryWeight":2,"id":72,"isShow":1,"level":2,"parentId":64,"rootId":64},{"children":[],"directoryName":"热门","directoryWeight":1,"id":73,"isShow":1,"level":2,"parentId":64,"rootId":64},{"children":[],"directoryName":"赛事","directoryWeight":1,"id":71,"isShow":1,"level":2,"parentId":64,"rootId":64}],"directoryName":"游戏","directoryWeight":2,"id":64,"isShow":1,"level":1,"parentId":0,"rootId":0},{"children":[],"directoryName":"新闻","directoryWeight":1,"id":315,"isShow":1,"level":1,"parentId":0,"rootId":0},{"children":[{"children":[],"directoryName":"趣闻","directoryWeight":6,"id":70,"isShow":1,"level":2,"parentId":63,"rootId":63},{"children":[],"directoryName":"时政","directoryWeight":5,"id":69,"isShow":1,"level":2,"parentId":63,"rootId":63},{"children":[],"directoryName":"农业","directoryWeight":3,"id":68,"isShow":1,"level":2,"parentId":63,"rootId":63},{"children":[],"directoryName":"娱乐","directoryWeight":3,"id":67,"isShow":1,"level":2,"parentId":63,"rootId":63},{"children":[],"directoryName":"科技","directoryWeight":2,"id":66,"isShow":1,"level":2,"parentId":63,"rootId":63},{"children":[],"directoryName":"国际","directoryWeight":1,"id":65,"isShow":1,"level":2,"parentId":63,"rootId":63}],"directoryName":"新闻","directoryWeight":1,"id":63,"isShow":1,"level":1,"parentId":0,"rootId":0},{"children":[],"directoryName":"公安","directoryWeight":0,"id":388,"isShow":1,"level":1,"parentId":0,"rootId":0},{"children":[],"directoryName":"dddd","directoryWeight":0,"id":387,"isShow":1,"level":1,"parentId":0,"rootId":0},{"children":[],"directoryName":"健康","directoryWeight":0,"id":384,"isShow":1,"level":1,"parentId":0,"rootId":0},{"children":[],"directoryName":"综合","directoryWeight":0,"id":328,"isShow":1,"level":1,"parentId":0,"rootId":0},{"children":[],"directoryName":"房产","directoryWeight":0,"id":327,"isShow":1,"level":1,"parentId":0,"rootId":0},{"children":[],"directoryName":"健康","directoryWeight":0,"id":318,"isShow":1,"level":1,"parentId":0,"rootId":0},{"children":[],"directoryName":"历史","directoryWeight":0,"id":310,"isShow":1,"level":1,"parentId":0,"rootId":0},{"children":[],"directoryName":"dddd","directoryWeight":0,"id":309,"isShow":1,"level":1,"parentId":0,"rootId":0},{"children":[{"children":[],"directoryName":"aaaa","directoryWeight":1,"id":333,"isShow":1,"level":2,"parentId":308,"rootId":308},{"children":[],"directoryName":"qqq","directoryWeight":0,"id":334,"isShow":1,"level":2,"parentId":308,"rootId":308}],"directoryName":"dddd","directoryWeight":0,"id":308,"isShow":1,"level":1,"parentId":0,"rootId":0}],"message":"Success","success":true,"timestamp":1710741803593}`) as ResponseDTO<FollowListItem[]>
// res.data.forEach(element => {
// this.data.push(element)
// });
ResourcesUtils.getResourcesJson<ResponseDTO<FollowListItem[]>>('follow_list_data.json', getContext(this)).then((success)=>{
success.data?.forEach(element => {
this.data.push(element)
});
console.log("ycg",this.data.length.toString());
})
}
@Builder TabBuilder(index: number, item: FollowListItem) {
Stack(){
Text(item.directoryName)
.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%')
.margin({right:'9lpx'})
.padding({left:'31lpx',right:index === this.data.length-1?"31lpx":"0lpx"})
}
build() {
Column() {
//标题栏目
CustomTitleUI({titleName:"关注列表"})
Tabs({ barPosition: BarPosition.Start, controller: this.controller }) {
ForEach(this.data, (item: FollowListItem, index: number ) => {
TabContent(){
FollowSecondTabsComponent({data:$data,firstIndex:index})
}.tabBar(this.TabBuilder(index,item))
}, (item: FollowListItem, index: number) => index.toString())
}
.vertical(false)
.barMode(BarMode.Scrollable)
.barWidth('100%')
.barHeight('84lpx')
.animationDuration(0)
.onChange((index: number) => {
this.currentIndex = index
})
.width('100%')
.height('100%')
}.width('100%')
}
}
\ No newline at end of file
... ...
import { LazyDataSource } from 'wdKit';
import { FollowListDetailItem } from '../../../../viewmodel/FollowListDetailItem'
import { ListHasNoMoreDataUI } from '../../../reusable/ListHasNoMoreDataUI';
const TAG = "FollowListDetailUI"
@Component
export struct FollowListDetailUI{
@State creatorDirectoryId:number = -1;
@State data: LazyDataSource<FollowListDetailItem> = new LazyDataSource();
@State isLoading:boolean = false
@State hasMore:boolean = true
curPageNum:number = 1;
headUrl = "https://sitcontentjdcdn.aikan.pdnews.cn/vod/content/202309/202309Th211436299/GLN.png?x-oss-process=image/resize,l_400/auto-orient,1/quality,q_90/format,jpg"
aboutToAppear(){
console.log("YCG","aboutToAppear==="+this.creatorDirectoryId);
this.getNewPageData()
}
build(){
Column(){
List({ space: 3 }) {
LazyForEach(this.data, (item: FollowListDetailItem, index: number = 0) => {
ListItem() {
ChildComponent({data: item})
}
.onClick(() => {
})
}, (item: FollowListDetailItem, index: number) => index.toString())
//没有更多数据 显示提示
if(!this.hasMore){
ListItem(){
ListHasNoMoreDataUI()
}
}
}.cachedCount(7)
.padding({left:'31lpx',right:'31lpx'})
.layoutWeight(1)
.onReachEnd(()=>{
console.log(TAG,"触底了");
if(!this.isLoading){
this.isLoading = true
//加载分页数据
this.getNewPageData()
}
})
}.layoutWeight(1)
}
getNewPageData(){
if(this.hasMore){
if(this.curPageNum>=4){
this.hasMore = false
return
}
if(this.curPageNum == 1){
this.data.push(new FollowListDetailItem(this.headUrl,"人之初,性本善",10,"人之初,性本善"));
this.data.push(new FollowListDetailItem(this.headUrl,"性相近,习相远",20,"性相近,习相远"));
this.data.push(new FollowListDetailItem(this.headUrl,"苟不教,性乃迁",30,"苟不教,性乃迁"));
this.data.push(new FollowListDetailItem(this.headUrl,"教之道,贵以专",40,"教之道,贵以专"));
this.data.push(new FollowListDetailItem(this.headUrl,"AAAAAAA",50,"教之道,贵以专"));
this.data.push(new FollowListDetailItem(this.headUrl,"BBBBBBB",60,"教之道,贵以专"));
this.data.push(new FollowListDetailItem(this.headUrl,"CCCCCCC",70,"教之道,贵以专"));
}else if(this.curPageNum == 2){
this.data.push(new FollowListDetailItem(this.headUrl,"昔孟母,择邻处",40,"昔孟母,择邻处"));
}else if(this.curPageNum == 3){
this.data.push(new FollowListDetailItem(this.headUrl,"子不学,断机杼",40,"子不学,断机杼"));
}
this.isLoading = false
this.curPageNum++
}
}
}
@Component
struct ChildComponent {
@ObjectLink data: FollowListDetailItem
build() {
Column(){
Blank().height('27lpx')
Row() {
Image(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.isFollow){
Row(){
Text(`已关注`)
.fontColor($r('app.color.color_CCCCCC'))
.fontSize('23lpx')
.fontWeight('500lpx')
.lineHeight('35lpx')
}.backgroundColor($r('app.color.color_F5F5F5'))
.borderRadius('6lpx')
.borderWidth('2lpx')
.justifyContent(FlexAlign.Center)
.width('100lpx')
.height('46lpx')
.margin({left:'4lpx',top:'23lpx'})
.onClick(()=>{
this.data.isFollow = false
})
}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_ED2800'))
.borderRadius('6lpx')
.borderWidth('2lpx')
.justifyContent(FlexAlign.Center)
.width('100lpx')
.height('46lpx')
.margin({left:'4lpx',top:'23lpx'})
.onClick(()=>{
this.data.isFollow = true
})
}
}.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 { FollowListItem, FollowSecondListItem } from '../../../../viewmodel/FollowListItem'
import { FollowListDetailUI } from './FollowListDetailUI'
import { FollowThirdTabsComponent } from './FollowThirdTabsComponent'
@Component
export struct FollowSecondTabsComponent{
@Link data:FollowListItem[]
@State firstIndex:number = 0
@State currentIndex: number = 0
private controller: TabsController = new TabsController()
fontColor: string = '#000000'
selectedFontColor: string = '#ED2800'
aboutToAppear(){
}
build(){
Column(){
Divider().width('100%')
.height('2lpx')
.strokeWidth('1lpx')
.backgroundColor($r('app.color.color_EDEDED'))
if(this.data != null){
if(this.data[this.firstIndex].children == null || this.data[this.firstIndex].children.length == 0){
FollowListDetailUI({creatorDirectoryId:this.data[this.firstIndex].id})
}else{
this.FollowSecondUI()
}
}
}
.width('100%')
.height('100%')
}
@Builder FollowSecondUI(){
Row() {
Tabs({ barPosition: BarPosition.Start, controller: this.controller }) {
ForEach(this.data[this.firstIndex].children, (item: FollowSecondListItem, index: number ) => {
TabContent(){
FollowThirdTabsComponent({data:$data,firstIndex:$firstIndex,secondIndex:index})
}.tabBar(this.TabBuilder(index,item))
.backgroundColor($r('app.color.white'))
}, (item: FollowListItem, index: number) => index.toString())
}
.vertical(true)
.barMode(BarMode.Scrollable)
.barWidth('140lpx')
.animationDuration(0)
.onChange((index: number) => {
this.currentIndex = index
})
.width('100%')
}.width('100%')
.alignItems(VerticalAlign.Top)
}
@Builder TabBuilder(index: number, item: FollowSecondListItem) {
Column(){
Text(item.directoryName)
.width('100%')
.height('38lpx')
.fontSize('30lpx')
.textAlign(TextAlign.Center)
.fontWeight(this.currentIndex === index ? 600 : 400)
.fontColor(this.currentIndex === index ? this.selectedFontColor : this.fontColor)
.lineHeight('38lpx')
}
.onClick(()=>{
this.currentIndex = index
this.controller.changeIndex(this.currentIndex)
})
.justifyContent(FlexAlign.Center)
.height('84lpx')
.backgroundColor(this.currentIndex === index?$r('app.color.white'):$r('app.color.color_F9F9F9'))
}
}
\ No newline at end of file
... ...
import { FollowListItem, FollowThirdListItem } from '../../../../viewmodel/FollowListItem'
import { FollowListDetailUI } from './FollowListDetailUI'
@Component
export struct FollowThirdTabsComponent{
@Link data:FollowListItem[]
@State currentIndex: number = 0
@Link firstIndex: number
@State secondIndex:number = -1
private controller: TabsController = new TabsController()
fontColor: string = '#999999'
selectedFontColor: string = '#000000'
build(){
if(this.data != null){
if(this.data[this.firstIndex].children[this.secondIndex].children == null || this.data[this.firstIndex].children[this.secondIndex].children.length == 0){
FollowListDetailUI({creatorDirectoryId:this.data[this.firstIndex].children[this.secondIndex].id})
}else{
this.FollowThirdUI()
}
}
}
@Builder TabBuilder(index: number, item: FollowThirdListItem) {
Column(){
Text(item.directoryName)
.fontSize('30lpx')
.textAlign(TextAlign.Center)
.fontWeight(this.currentIndex === index ? 600 : 400)
.fontColor(this.currentIndex === index ? this.selectedFontColor : this.fontColor)
.lineHeight('38lpx')
.backgroundColor($r('app.color.color_F9F9F9'))
.padding('13lpx')
}
.onClick(()=>{
this.currentIndex = index
this.controller.changeIndex(this.currentIndex)
})
.height('100%')
.margin({right:'9lpx'})
.padding({left:'20lpx',right:index === this.data[this.firstIndex].children[this.secondIndex].children.length-1?"20lpx":"0lpx"})
.justifyContent(FlexAlign.Center)
}
@Builder FollowThirdUI(){
Row() {
Tabs({ barPosition: BarPosition.Start, controller: this.controller }) {
ForEach(this.data[this.firstIndex].children[this.secondIndex].children, (item: FollowThirdListItem, index: number ) => {
TabContent(){
Column(){
Divider().width('100%')
.height('2lpx')
.strokeWidth('1lpx')
.backgroundColor($r('app.color.color_EDEDED'))
.margin({left:'20lpx'})
FollowListDetailUI({creatorDirectoryId:this.data[this.firstIndex].children[this.secondIndex].children[index].id})
}
}.tabBar(this.TabBuilder(index,item))
.backgroundColor($r('app.color.white'))
}, (item: FollowListItem, index: number) => index.toString())
}
.vertical(false)
.barMode(BarMode.Scrollable)
.barWidth('100%')
.barHeight('84lpx')
.animationDuration(0)
.onChange((index: number) => {
this.currentIndex = index
})
.width('100%')
}.width('100%')
}
}
\ No newline at end of file
... ...
import router from '@ohos.router'
@Component
export struct CustomTitleUI {
imgBack:boolean = true
... ...
/**
*
"attentionNum": 0,
"authIcon": "",
"authId": 0,
"authPersonal": "",
"authTitle": "",
"categoryAuth": "",
"city": "110100",
"cnAttentionNum": 0,
"cnCollectNum": 0,
"cnCommentNum": 0,
"cnFansNum": 4,
"cnIsAttention": 1,
"cnIsComment": 1,
"cnIsLike": 1,
"cnLikeNum": 0,
"cnLiveCommentControl": 1,
"cnLiveGiftControl": 1,
"cnLiveLikeControl": 1,
"cnLiveShareControl": 1,
"cnMainControl": 1,
"cnRegistTime": 1695280071000,
"cnShareControl": 1,
"cnShareNum": 0,
"cnUserId": "444937588589253",
"cnUserName": "QACrawler2115",
"cnUserType": "2",
"collectNum": 0,
"creatorId": "3004862",
"district": "110101",
"fansNum": 0,
"headPhotoUrl": "https://sitcontentjdcdn.aikan.pdnews.cn/vod/content/202309/202309Th211436299/GLN.png?x-oss-process=image/resize,l_400/auto-orient,1/quality,q_90/format,jpg",
"honoraryIcon": "",
"honoraryTitle": "",
"introduction": "知识博主",
"isAttention": 1,
"isComment": 1,
"isLike": 1,
"isVisiable": 1,
"likeNum": 0,
"liveCommentControl": 1,
"liveGiftControl": 1,
"liveLikeControl": 1,
"liveShareControl": 1,
"posterShareControl": 1,
"province": "110000",
"publishNum": 0,
"region": "",
"shareControl": 1,
"shareNum": 0,
"shopOpen": 0,
"storeUrl": "",
"subjectType": 0,
"userId": "",
"userName": "QACrawler2115",
"userType": "2",
"waresSwitch": 1
*/
@Observed
export class FollowListDetailItem{
headPhotoUrl:string //头像
cnUserName:string //昵称
cnFansNum:number //粉丝数
introduction:string //介绍
isFollow:boolean = false //是否已经关注
constructor(headPhotoUrl:string,cnUserName:string,cnFansNum:number,introduction:string) {
this.headPhotoUrl = headPhotoUrl
this.cnUserName = cnUserName
this.cnFansNum = cnFansNum
this.introduction = introduction
}
}
... ...
/**
* {
"directoryName": "创作",
"directoryWeight": 3,
"id": 74,
"isShow": 1,
"level": 1,
"parentId": 0,
"rootId": 0,
"children": [
{
"children": [
{
"directoryName": "新闻联播",
"directoryWeight": 3,
"id": 79,
"isShow": 1,
"level": 3,
"parentId": 75,
"rootId": 74
}
],
"directoryName": "短视频",
"directoryWeight": 1,
"id": 75,
"isShow": 1,
"level": 2,
"parentId": 74,
"rootId": 74
}
]
}
*/
@Observed
export class FollowListItem{
constructor(directoryName:string) {
this.directoryName = directoryName
}
directoryName:string
directoryWeight:number
id:number
isShow:number
level:number
parentId:number
rootId:number
children:FollowSecondListItem[]
}
@Observed
export class FollowSecondListItem{
directoryName:string
directoryWeight:number
id:number
isShow:number
level:number
parentId:number
rootId:number
children:FollowThirdListItem[]
}
@Observed
export class FollowThirdListItem{
directoryName:string
directoryWeight:number
id:number
isShow:number
level:number
parentId:number
rootId:number
}
\ No newline at end of file
... ...
... ... @@ -86,6 +86,10 @@
{
"name":"color_CCCCCC",
"value": "#CCCCCC"
},
{
"name":"color_EDEDED",
"value": "#EDEDED"
}
]
}
\ No newline at end of file
... ...