xingzhaojie

Merge branch 'main' of http://192.168.1.42/developOne/harmonyPool into main

# Conflicts:
#	PeopleDaily_Harmony/entry/src/main/resources/base/profile/main_pages.json
#	PeopleDaily_Harmony/wdComponent/src/main/ets/Index.ets
Showing 149 changed files with 6352 additions and 596 deletions
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
... ...
@Entry
@Component
struct TestPage {
@State message: string = 'Hello World'
build() {
Row() {
Column() {
Text(this.message)
.fontSize(50)
.fontWeight(FontWeight.Bold)
}
.width('100%')
Column() {
}
.width('100%')
.height('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
... ...
... ... @@ -8,6 +8,7 @@
"pages/PrivacySettingPage",
"pages/SettingAboutPage",
"pages/AppointmentListPage",
"pages/SettingPasswordPage"
"pages/SettingPasswordPage",
"pages/FollowListPage"
]
}
\ No newline at end of file
}
... ...
{
"code": "0",
"data": {
"list": [{
"appStyle": "15",
"imageUrl": ["https://sitcontentjdcdn.aikan.pdnews.cn/sjbj-20231204/image/live/563cc8ce1ecc43b288f6cf60da66579c.jpeg?x-oss-process=image/resize,l_550,m_fill,h_450,w_800/quality,q_90/format,jpg"],
"liveId": 20000007348,
"planStartTime": "2023-12-05 15:26:10",
"relId": "500000017021",
"relType": 1,
"startTime": "",
"status": "wait",
"title": "视界运营位加权-加权中删除"
}, {
"appStyle": "null",
"imageUrl": ["https://sitcontentjdcdn.aikan.pdnews.cn/sjbj-20230914/image/display/9af825a00abf490d8a8698f4fc079447.jpg?x-oss-process=image/resize,l_550,m_fill,h_450,w_800/quality,q_90/format,jpg"],
"liveId": 20000007492,
"planStartTime": "2024-01-12 20:00:00",
"relId": "500000020284",
"relType": 1,
"startTime": "",
"status": "wait",
"title": "QA|汉阴县凤堰古梯田"
}, {
"appStyle": "null",
"imageUrl": ["https://sitcontentjdcdn.aikan.pdnews.cn/sjbj-20230915/image/display/e908748c62a44109bbb7214f3fed458c.jpg?x-oss-process=image/resize,l_550,m_fill,h_450,w_800/quality,q_90/format,jpg"],
"liveId": 20000007493,
"planStartTime": "2024-01-12 20:00:00",
"relId": "500000020286",
"relType": 1,
"startTime": "",
"status": "wait",
"title": "二十四节气-夏至"
}, {
"appStyle": "null",
"imageUrl": ["https://sitcontentjdcdn.aikan.pdnews.cn/sjbj-20240118/image/display/732d6166103d4d2f9fbf512b128a3486.jpeg?x-oss-process=image/resize,l_550,m_fill,h_450,w_800/quality,q_90/format,jpg"],
"liveId": 20000007495,
"planStartTime": "2024-01-18 10:51:33",
"relId": "500000030122",
"relType": 1,
"startTime": "",
"status": "wait",
"title": "01181050文字直播没有预告片"
}, {
"appStyle": "null",
"imageUrl": ["https://sitcontentjdcdn.aikan.pdnews.cn/sjbj-20240127/image/live/6359d000bba24812b7ca1765bb106a49.png?x-oss-process=image/resize,l_550,m_fill,h_450,w_800/quality,q_90/format,jpg"],
"liveId": 20000007519,
"planStartTime": "2024-02-27 18:18:16",
"relId": "500000034054",
"relType": 1,
"startTime": "",
"status": "wait",
"title": "错搞民宿33"
}, {
"appStyle": "15",
"imageUrl": ["https://sitcontentjdcdn.aikan.pdnews.cn/sjbj-20240228/image/live/e6998ab547af472dbc19ba2fd68959b9.jpeg?x-oss-process=image/resize,l_550,m_fill,h_450,w_800/quality,q_90/format,jpg"],
"liveId": 20000007521,
"planStartTime": "2024-02-28 19:01:50",
"relId": "500000034162",
"relType": 1,
"startTime": "",
"status": "wait",
"title": "保存编辑弹幕开关"
}],
"pageNum": 1,
"pageSize": 20,
"totalCount": 6
},
"message": "Success",
"requestId": "65289f1217934cffb7587ff4d6ce4689",
"success": true,
"timestamp": 1710555152344
}
\ 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
... ...
... ... @@ -38,3 +38,4 @@ export { AccountAndSecurityLayout } from "./components/page/AccountAndSecurityLa
export { SettingPasswordLayout } from "./components/page/SettingPasswordLayout"
export { FollowFirstTabsComponent } from "./components/page/mine/follow/FollowFirstTabsComponent"
... ...
... ... @@ -58,7 +58,7 @@ export struct AppointmentListUI{
getNewPageData(){
this.isLoading = true
if(this.hasMore){
MinePageDatasModel.getAppointmentListData("20",`${this.curPageNum}`).then((value)=>{
MinePageDatasModel.getAppointmentListData("20",`${this.curPageNum}`,getContext(this)).then((value)=>{
if (!this.data || value.list.length == 0){
this.hasMore = false
}else{
... ...
... ... @@ -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
... ...
... ... @@ -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 } from 'wdKit';
import { Logger, ResourcesUtils } from 'wdKit';
const TAG = "MinePageDatasModel"
/**
... ... @@ -106,12 +106,13 @@ class MinePageDatasModel{
return WDHttp.get<ResponseDTO<MineAppointmentListItem>>(url, headers)
};
getAppointmentListData(pageSize:string,pageNum:string): Promise<MineAppointmentListItem> {
getAppointmentListData(pageSize:string,pageNum:string,context?: Context): Promise<MineAppointmentListItem> {
return new Promise<MineAppointmentListItem>((success, error) => {
Logger.info(TAG, `getAppointmentList start`);
this.fetchAppointmentListData(pageSize,pageNum).then((navResDTO: ResponseDTO<MineAppointmentListItem>) => {
if (!navResDTO) {
error("page data invalid");
success(this.getAppointmentListDataLocal(context))
return
}
Logger.info(TAG, "getAppointmentList then,AppointmentResDTO.timeStamp:" + navResDTO.timestamp);
... ... @@ -119,11 +120,24 @@ class MinePageDatasModel{
success(navigationBean);
}).catch((err: Error) => {
Logger.error(TAG, `fetchAppointmentListDataApi catch, error.name : ${err.name}, error.message:${err.message}`);
error(err);
// error(err);
success(this.getAppointmentListDataLocal(context))
})
})
}
async getAppointmentListDataLocal(context?: Context): Promise<MineAppointmentListItem> {
Logger.info(TAG, `getBottomNavDataMock start`);
let compRes: ResponseDTO<MineAppointmentListItem> | null = await ResourcesUtils.getResourcesJson<ResponseDTO<MineAppointmentListItem>>('appointment_list_data.json', context);
if (!compRes || !compRes.data) {
Logger.info(TAG, `getAppointmentListDataLocal compRes is empty`);
return null
}
Logger.info(TAG, `getAppointmentListDataLocal getResourcesJsonSync compRes : ${JSON.stringify(compRes)}`);
return compRes.data
}
}
const minePageDatasModel = MinePageDatasModel.getInstance()
... ...
/**
*
"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
... ...
... ... @@ -205,6 +205,18 @@
]
}
]
},
{
"name": "wdLogin",
"srcPath": "./features/wdLogin",
"targets": [
{
"name": "default",
"applyToProducts": [
"default"
]
}
]
}
]
}
\ No newline at end of file
... ...
... ... @@ -17,4 +17,6 @@ export { ViewType } from './src/main/ets/enum/ViewType';
export { DurationEnum } from './src/main/ets/enum/DurationEnum';
export { ScreenType } from './src/main/ets/enum/ScreenType';
\ No newline at end of file
export { ScreenType } from './src/main/ets/enum/ScreenType';
export { SpConstants } from './src/main/ets/constants/SpConstants';
\ No newline at end of file
... ...
export class SpConstants{
static USER_JWT_TOKEN="jwtToken"
static USER_REFRESH_TOKEN="refreshToken"
static USER_Type="userType"
static USER_NAME="userName"
static USER_ID="userId"
static USER_FIRST_MARK="firstMark"
static USER_LONG_TIME_NO_LOGIN_MARK="longTimeNoLoginMark"
static USER_STATUS="user_status"
static USER_TEMP_TOKEN="tempToken"
}
\ No newline at end of file
... ...
... ... @@ -4,8 +4,8 @@
*/
export const enum BottomNavi {
NEWS = 0,
PEOPLE,
VIDEO,
SERVICE,
MINE,
PEOPLE=1,
VIDEO=2,
SERVICE=3,
MINE=4,
}
... ...
{
"meta": {
"stableOrder": true
},
"lockfileVersion": 3,
"lockfileVersion": 1,
"ATTENTION": "THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.",
"specifiers": {
"@ohos/axios@^2.1.1": "@ohos/axios@2.1.1",
"wdConstant@../../../../commons/wdConstant": "wdConstant@../wdConstant",
"wdKit@../../../../commons/wdKit": "wdKit@../wdKit"
"@ohos/axios@^2.1.1": "@ohos/axios@2.2.0"
},
"packages": {
"@ohos/axios@2.1.1": {
"name": "@ohos/axios",
"integrity": "sha512-EQax257+eKKT0Rx7h6N6xvmKbDRWDjCCWOP2vyyktySFwvjtypXuXmQKEvRjmAalR6cqf8mbfhWmpg0bD9OQ3w==",
"resolved": "https://repo.harmonyos.com/ohpm/@ohos/axios/-/axios-2.1.1.har",
"registryType": "ohpm"
},
"wdConstant@../wdConstant": {
"name": "wdconstant",
"resolved": "../wdConstant",
"registryType": "local"
},
"wdKit@../wdKit": {
"name": "wdkit",
"resolved": "../wdKit",
"registryType": "local"
"@ohos/axios@2.2.0": {
"resolved": "https://repo.harmonyos.com/ohpm/@ohos/axios/-/axios-2.2.0.har",
"integrity": "sha512-v1QBWk6DfcN8wUW3D0ieFbHTR1taSI5cOgxp5l6B5cegXuNYhSc8ggKlAIXe6h/14LsfM+NW0ZGfSXcNEIM5yA=="
}
}
}
\ No newline at end of file
... ...
import HashMap from '@ohos.util.HashMap'
import { ConfigConstants } from 'wdConstant'
import { DateTimeUtils, Logger } from 'wdKit'
import { DateTimeUtils, Logger, SPHelper } from 'wdKit'
/**
* 网络请求业务侧工具类
... ... @@ -53,8 +53,35 @@ export class HttpUrlUtils {
* 电子报列表
*/
static readonly E_NEWSPAPER_LIST_PATH: string = "/api/rmrb-bff-display-zh/display/zh/c/paperApi/paperList";
/**
* 个人中心 我的预约列表
*/
static readonly APPOINTMENT_LIST_DATA_PATH: string = "/api/live-center-message/zh/c/live/subscribe";
/**
* 个人中心 关注列表详情
*/
static readonly FOLLOW_LIST_DETAIL_DATA_PATH: string = "/api/rmrb-creator-user/c/creatorDirectory/getContactMasterDetaiPage";
/**
* 个人中心 关注列表
*/
static readonly FOLLOW_LIST_DATA_PATH: string = "/api/rmrb-creator-user/c/creatorDirectory/getCreatorDirectoryTree";
/**
* 早晚报列表
* 根据页面id获取页面楼层列表
* https://pdapis.pdnews.cn/api/rmrb-bff-display-zh/display/zh/c/pageInfo?pageId=28927
* 根据楼层Id获取组件节目信息
* https://pdapis.pdnews.cn/api/rmrb-bff-display-zh/display/zh/c/compInfo?loadStrategy=
* first_load&refreshTime=1710829610144&pageId=28927&channelStrategy=2&groupId=40621&
* pageSize=20&pageNum=1&topicId=10000009445
* */
static readonly MORNING_EVENING_PAGE_INFO_PATH: string = "/api/rmrb-bff-display-zh/display/zh/c/pageInfo";
static readonly MORNING_EVENING_COMP_INFO_PATH: string = "/api/rmrb-bff-display-zh/display/zh/c/compInfo";
private static hostUrl: string = HttpUrlUtils.HOST_PRODUCT;
private static hostUrl: string = HttpUrlUtils.HOST_UAT;
private static userId=''
private static userType=''
private static token=''
static getCommonHeaders(): HashMap<string, string> {
let headers: HashMap<string, string> = new HashMap<string, string>()
... ... @@ -67,7 +94,9 @@ export class HttpUrlUtils {
headers.set('timestamp', HttpUrlUtils.getTimestamp())
headers.set('RMRB-X-TOKEN', HttpUrlUtils.getXToken())
headers.set('device_id', HttpUrlUtils.getDeviceId())
headers.set('cookie', 'RMRB-X-TOKEN=eyJhbGciOiJIUzI1NiIsImtpZCI6ImQ4WkI2QkhxSEZrdjJ2U25BNlRwZEdKRjBHcjItVzBvS2FaYzdLOUUycmcifQ.eyJpc3MiOiJwZW9wbGVzLWRhaWx5LWZvdXJhIiwic3ViIjoicGVvcGxlcy1kYWlseS1mb3VyYSIsImV4cCI6MTcwMzY0OTYwNiwidXNlcklkIjo0NTk3NzYyOTc0NzQ5NDksInVzZXJWZXJzaW9uIjoiNDU5Nzc2Mjk3NDc0OTQ5XzIiLCJ1c2VyTmFtZSI6IkJ1bGlraWtpMTgxIiwidXNlclR5cGUiOjIsImNyZWF0b3JJZCI6NDI2NTM5MH0.jhQ9kylcm3FxWf0-lBMZuLkdtIQ6XpFnAi0AFZJNwfc')
if(HttpUrlUtils.token!=''){
headers.set('cookie', 'RMRB-X-TOKEN='+HttpUrlUtils.token)
}
headers.set('build_version', HttpUrlUtils.getVersion())
headers.set('adcode', HttpUrlUtils.getAdCode())
headers.set('os_version', HttpUrlUtils.getOsVersion())
... ... @@ -208,10 +237,91 @@ export class HttpUrlUtils {
private static getUserId() {
// TODO 对接登录
return '459776297474949';
return HttpUrlUtils.userId;
}
private static getUserType() {
return '2';
return HttpUrlUtils.userType;
}
static getVerifyCodeUrl() {
let url = HttpUrlUtils.hostUrl + "/api/rmrb-user-center/auth/zh/c/sendVerifyCode";
return url;
}
static getAppLoginUrl() :string{
let url = HttpUrlUtils.getHost() + "/api/rmrb-user-center/auth/zh/c/appLogin";
return url;
}
static getCheckVerifyCodeUrl() {
let url = HttpUrlUtils.hostUrl + "/api/rmrb-user-center/auth/zh/c/checkVerifyCode";
return url;
}
static getAppointmentListDataUrl() {
let url = HttpUrlUtils.HOST_SIT + HttpUrlUtils.APPOINTMENT_LIST_DATA_PATH
return url
}
static getFollowListDetailDataUrl() {
let url = HttpUrlUtils.HOST_SIT + HttpUrlUtils.FOLLOW_LIST_DETAIL_DATA_PATH
return url
}
static getFollowListDataUrl() {
let url = HttpUrlUtils.HOST_SIT + HttpUrlUtils.FOLLOW_LIST_DATA_PATH
return url
}
static getYcgCommonHeaders(): HashMap<string, string> {
let headers: HashMap<string, string> = new HashMap<string, string>()
headers.set('mpassid', 'XGt6jfGUx8ADAKruTyAMdhHj')
headers.set('city', "%E5%90%88%E8%82%A5%E5%B8%82")
headers.set('User-Agent', 'Dalvik/2.1.0 (Linux; U; Android 10; PCT-AL10 Build/HUAWEIPCT-AL10)')
headers.set('channel', "rmrb_china_0000")
headers.set('appCode', "0af1f9085e484c97b2a44704bae72c07")
headers.set('Authorization', "APPCODE 0af1f9085e484c97b2a44704bae72c07")
headers.set('X-Ca-Stage', "TEST")
headers.set('plat', "Phone")
headers.set('Content-Type', 'application/json; charset=utf-8')
headers.set('timestamp', "740977741")
headers.set('RMRB-X-TOKEN', "eyJhbGciOiJIUzI1NiIsImtpZCI6IklFazBGclhfV2RYMEx1ZktDU01iYTVYd0VmUHZ6a043T0F5UTRFLWIwWU0ifQ.eyJpc3MiOiJwZW9wbGVzLWRhaWx5LWZvdXJhIiwic3ViIjoicGVvcGxlcy1kYWlseS1mb3VyYSIsImV4cCI6MTcxMDc1NjM3NywidXNlcklkIjo1NjczODc0NzcwNjM2MjEsInVzZXJWZXJzaW9uIjoiNTY3Mzg3NDc3MDYzNjIxXzAiLCJ1c2VyTmFtZSI6IiVFNCVCQSVCQSVFNiVCMCU5MSVFNiU5NyVBNSVFNiU4QSVBNSVFNyVCRCU5MSVFNSU4RiU4QmFQcnRxNSIsInVzZXJUeXBlIjoxLCJjcmVhdG9ySWQiOm51bGwsInVzZXJJZFpoIjpudWxsfQ.KBkF0Yki-JWlq0ZIOCzgKwQc1ycBnFHa6CF-rMPRgHU")
headers.set('device_id', "5156098c-6c44-3514-af70-04a0139a9327")
// headers.set('cookie', 'RMRB-X-TOKEN=eyJhbGciOiJIUzI1NiIsImtpZCI6IklFazBGclhfV2RYMEx1ZktDU01iYTVYd0VmUHZ6a043T0F5UTRFLWIwWU0ifQ.eyJpc3MiOiJwZW9wbGVzLWRhaWx5LWZvdXJhIiwic3ViIjoicGVvcGxlcy1kYWlseS1mb3VyYSIsImV4cCI6MTcxMDU4Mzk0MywidXNlcklkIjo1NjczODc0NzcwNjM2MjEsInVzZXJWZXJzaW9uIjoiNTY3Mzg3NDc3MDYzNjIxXzAiLCJ1c2VyTmFtZSI6IiVFNCVCQSVCQSVFNiVCMCU5MSVFNiU5NyVBNSVFNiU4QSVBNSVFNyVCRCU5MSVFNSU4RiU4QmFQcnRxNSIsInVzZXJUeXBlIjoxLCJjcmVhdG9ySWQiOm51bGwsInVzZXJJZFpoIjpudWxsfQ._LTKrUxQozpCj1XMhx1TWOIxn5gjDveoPuMFGpI0g_8')
headers.set('build_version', "202403112023")
headers.set('adcode', "340000")
headers.set('os_version', "10")
headers.set('city_dode', "340100")
headers.set('userId', "567387477063621")
headers.set('versionCode', "7302")
headers.set('system', "Android")
headers.set('version_name', "7.3.0.2")
headers.set('EagleEye-TraceID', '101118E4D006453DA549A82AA8CAFBFE')
headers.set('imei', "5156098c-6c44-3514-af70-04a0139a9327")
headers.set('userType', "1")
headers.set('Accept-Language', 'zh')
// HttpUrlUtils.addSpecialHeaders(headers);
// Logger.debug("TAG", '******************* commonHeaders headers start ******************************** ');
// headers.forEach((v,k)=>{
// Logger.debug("TAG", 'getCommonHeaders header: ' + k + ': ' + v);
// })
// Logger.debug("TAG", '******************* commonHeaders headers end ******************************** ');
return headers;
}
public static setUserId(userId:string){
HttpUrlUtils.userId=userId;
}
public static setUserType(userType:string){
HttpUrlUtils.userType=userType;
}
public static setUserToken(token:string){
HttpUrlUtils.token=token;
}
}
\ No newline at end of file
... ...
{
"meta": {
"stableOrder": true
},
"lockfileVersion": 3,
"lockfileVersion": 1,
"ATTENTION": "THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.",
"specifiers": {
"wdBean@../../../../features/wdBean": "wdBean@../../features/wdBean",
"wdKit@../../../../commons/wdKit": "wdKit@../wdKit"
},
"packages": {
"wdBean@../../features/wdBean": {
"name": "wdbean",
"resolved": "../../features/wdBean",
"registryType": "local"
},
"wdKit@../wdKit": {
"name": "wdkit",
"resolved": "../wdKit",
"registryType": "local"
}
}
"specifiers": {},
"packages": {}
}
\ No newline at end of file
... ...
... ... @@ -15,21 +15,29 @@ export class WDRouterPage {
}
// 主页
static index = new WDRouterPage("entry", "ets/pages/Index");
static index = new WDRouterPage("phone", "ets/pages/Index");
// 关于页面
// static aboutPage = new WDRouterPage("entry", "ets/pages/about/AboutPage");
// web默认页面
static defaultWebPage = new WDRouterPage("entry", "ets/pages/web/DefaultWebPage");
static defaultWebPage = new WDRouterPage("phone", "ets/pages/web/DefaultWebPage");
// 电子报页面
static eNewspaper = new WDRouterPage("entry", "ets/pages/ENewspaper")
static eNewspaper = new WDRouterPage("phone", "ets/pages/ENewspaper")
// 早晚报页面
static morningEveningPaperPage = new WDRouterPage("entry", "ets/pages/MorningEveningPaperPage")
static morningEveningPaperPage = new WDRouterPage("phone", "ets/pages/MorningEveningPaperPage")
// 图文详情页
static imageTextDetailPage = new WDRouterPage("entry", "ets/pages/ImageAndTextDetailPage");
static imageTextDetailPage = new WDRouterPage("phone", "ets/pages/ImageAndTextDetailPage");
// 短视频详情页
static detailPlayShortVideoPage = new WDRouterPage("wdDetailPlayShortVideo", "ets/pages/DetailPlayShortVideoPage");
// 点播详情页
static detailPlayVodPage = new WDRouterPage("wdDetailPlayVod", "ets/pages/DetailPlayVodPage");
// 直播详情页
static detailPlayLivePage = new WDRouterPage("wdDetailPlayLive", "ets/pages/DetailPlayLivePage");
static loginPage = new WDRouterPage("wdLogin", "ets/pages/login/LoginPage");
static forgetPasswordPage = new WDRouterPage("wdLogin", "ets/pages/login/ForgetPasswordPage");
//我的 预约
static appointmentListPage = new WDRouterPage("wdComponent", "ets/components/page/AppointmentListPage");
//我的 关注
static followListPage = new WDRouterPage("wdComponent", "ets/components/page/FollowListPage");
}
... ...
... ... @@ -14,13 +14,15 @@ export class WDRouterRule {
WDRouterRule.jumpWithPage(page, action)
}
private static jumpWithPage(page?: WDRouterPage, params?: object) {
static jumpWithPage(page?: WDRouterPage, params?: object) {
if (page) {
if (params) {
// router.pushUrl({ url: 'pages/routerpage2', , params: params })
router.pushUrl({ url: page.url(), params: params })
} else {
router.pushUrl({ url: page.url() })
router.pushUrl({ url: page.url() }).catch((error:Error)=>{
console.log("err",JSON.stringify(error))//100002 uri is not exist
})
}
} else {
ToastUtils.showToast("功能开发中", 1000);
... ...
{
"meta": {
"stableOrder": true
},
"lockfileVersion": 3,
"lockfileVersion": 1,
"ATTENTION": "THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.",
"specifiers": {
"wdBean@../../../../features/wdBean": "wdBean@../../features/wdBean",
"wdConstant@../../../../commons/wdConstant": "wdConstant@../wdConstant",
"wdJsBridge@../../../wdJsBridge": "wdJsBridge@../wdJsBridge",
"wdJsBridge@../wdJsBridge": "wdJsBridge@../wdJsBridge",
"wdKit@../../../../commons/wdKit": "wdKit@../wdKit",
"wdRouter@../../../../commons/wdRouter": "wdRouter@../wdRouter"
},
"packages": {
"wdBean@../../features/wdBean": {
"name": "wdbean",
"resolved": "../../features/wdBean",
"registryType": "local"
},
"wdConstant@../wdConstant": {
"name": "wdconstant",
"resolved": "../wdConstant",
"registryType": "local"
},
"wdJsBridge@../wdJsBridge": {
"name": "wdjsbridge",
"resolved": "../wdJsBridge",
"registryType": "local"
},
"wdKit@../wdKit": {
"name": "wdkit",
"resolved": "../wdKit",
"registryType": "local"
},
"wdRouter@../wdRouter": {
"name": "wdrouter",
"resolved": "../wdRouter",
"registryType": "local",
"dependencies": {
"wdKit": "file:../wdKit",
"wdBean": "file:../../features/wdBean"
}
}
}
"specifiers": {},
"packages": {}
}
\ No newline at end of file
... ...
// export interface Group {
// blockDesc: string;
// groupStrategy: number;
// id: number;
// itemNum?: any;
// showType: number;
// sortValue: number;
// }
//
// export interface TopicInfo {
// axisColor: string;
// channelId?: any;
// commentFlag: number;
// commentPreviewFlag: number;
// commentShowFlag: number;
// frontFlag?: any;
// frontLinkObject?: any;
// posterFlag: number;
// posterUrl: string;
// relId?: any;
// relObjectId?: any;
// relType?: any;
// shareCoverUrl: string;
// shareOpen: number;
// sharePosterCoverUrl: string;
// sharePosterOpen?: any;
// shareSummary: string;
// shareTitle: string;
// shareUrl: string;
// slideColor: string;
// summary: string;
// title: string;
// titleShow: number;
// topicDate: string;
// topicId: string;
// topicPattern: number;
// topicTemplate?: any;
// topicType: number;
// transluceImgUrl: string;
// visitorComment: number;
// voteInfo?: any;
// }
//
// export interface PageInfoBean {
// backIconUrl: string;
// backgroundColor: string;
// backgroundImgUrl: string;
// baselineColor: string;
// baselineCopywriting: string;
// baselineShow: number;
// description: string;
// groups: Group[];
// hasAdInfo: number;
// hasPopUp: number;
// id: number;
// mainLogoImgUrl: string;
// name: string;
// pageTopParams?: any;
// pageTopType: number;
// pageType: number;
// popUps: any[];
// pushupLogoImgUrl: string;
// shareCoverUrl: string;
// shareIconUrl: string;
// shareName: string;
// shareSummary: string;
// shareUrl: string;
// statusBarColor: string;
// templateType: number;
// titleColor: string;
// topicInfo: TopicInfo;
// }
//
// export interface Meta {
// md5: string;
// }
//
// export interface RootObject {
// code: string;
// data: Data;
// message: string;
// meta: Meta;
// requestId: string;
// success: boolean;
// timestamp: number;
// }
\ No newline at end of file
... ...
{
"meta": {
"stableOrder": true
},
"lockfileVersion": 3,
"lockfileVersion": 1,
"ATTENTION": "THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.",
"specifiers": {
"@ohos/axios@^2.1.1": "@ohos/axios@2.1.1",
"wdBean@../../../../features/wdBean": "wdBean@../wdBean",
"wdConstant@../../../../commons/wdConstant": "wdConstant@../../commons/wdConstant",
"wdConstant@../../commons/wdConstant": "wdConstant@../commons/wdConstant",
"wdJsBridge@../../../wdJsBridge": "wdJsBridge@../../commons/wdJsBridge",
"wdKit@../../../../commons/wdKit": "wdKit@../../commons/wdKit",
"wdKit@../../commons/wdKit": "wdKit@../commons/wdKit",
"wdNetwork@../../../../commons/wdNetwork": "wdNetwork@../../commons/wdNetwork",
"wdRouter@../../../../commons/wdRouter": "wdRouter@../../commons/wdRouter",
"wdWebComponent@../../../../commons/wdWebComponent": "wdWebComponent@../../commons/wdWebComponent"
},
"packages": {
"@ohos/axios@2.1.1": {
"name": "@ohos/axios",
"integrity": "sha512-EQax257+eKKT0Rx7h6N6xvmKbDRWDjCCWOP2vyyktySFwvjtypXuXmQKEvRjmAalR6cqf8mbfhWmpg0bD9OQ3w==",
"resolved": "https://repo.harmonyos.com/ohpm/@ohos/axios/-/axios-2.1.1.har",
"registryType": "ohpm"
},
"wdBean@../wdBean": {
"name": "wdbean",
"resolved": "../wdBean",
"registryType": "local"
},
"wdConstant@../../commons/wdConstant": {
"name": "wdconstant",
"resolved": "../../commons/wdConstant",
"registryType": "local"
},
"wdConstant@../commons/wdConstant": {
"name": "wdconstant",
"resolved": "../commons/wdConstant",
"registryType": "local"
},
"wdJsBridge@../../commons/wdJsBridge": {
"name": "wdjsbridge",
"resolved": "../../commons/wdJsBridge",
"registryType": "local"
},
"wdKit@../../commons/wdKit": {
"name": "wdkit",
"resolved": "../../commons/wdKit",
"registryType": "local"
},
"wdKit@../commons/wdKit": {
"name": "wdkit",
"resolved": "../commons/wdKit",
"registryType": "local"
},
"wdNetwork@../../commons/wdNetwork": {
"name": "wdnetwork",
"resolved": "../../commons/wdNetwork",
"registryType": "local",
"dependencies": {
"wdConstant": "file:../wdConstant",
"wdKit": "file:../wdKit",
"@ohos/axios": "^2.1.1"
}
},
"wdRouter@../../commons/wdRouter": {
"name": "wdrouter",
"resolved": "../../commons/wdRouter",
"registryType": "local",
"dependencies": {
"wdKit": "file:../wdKit",
"wdBean": "file:../../features/wdBean"
}
},
"wdWebComponent@../../commons/wdWebComponent": {
"name": "wdwebcomponent",
"resolved": "../../commons/wdWebComponent",
"registryType": "local",
"dependencies": {
"wdConstant": "file:../wdConstant",
"wdKit": "file:../wdKit",
"wdJsBridge": "file:../wdJsBridge",
"wdBean": "file:../../features/wdBean",
"wdRouter": "file:../wdRouter"
}
}
}
"specifiers": {},
"packages": {}
}
\ No newline at end of file
... ...
@Component
export default struct MinePageCardUI {
build(){
Flex(){
Stack(){
Image($r('app.media.mine_card_01'))
.setFullWidthAndHeight()
.objectFit(ImageFit.Auto)
Column(){
Text("积分商城")
.fontColor($r('app.color.color_994D00'))
.width('119lpx')
.height('35lpx')
.textAlign(TextAlign.Start)
.fontSize('29lpx')
.fontWeight(600)
Text("华为MATE40手机")
.width('159lpx')
.height('23lpx')
.fontColor($r('app.color.color_994D00'))
.fontSize('19lpx')
.fontWeight(400)
.textAlign(TextAlign.Start)
.margin({top:'10lpx'})
}.padding({left:'29lpx'})
.alignItems(HorizontalAlign.Start)
}.alignContent(Alignment.Start)
.width('349lpx')
.height('115lpx')
Stack(){
Image($r('app.media.mine_card_02'))
.setFullWidthAndHeight()
.objectFit(ImageFit.Auto)
Column(){
Text("数字藏品")
.fontColor($r('app.color.color_B15900'))
.width('119lpx')
.height('35lpx')
.textAlign(TextAlign.Start)
.fontSize('29lpx')
.fontWeight(600)
Text("黑胶唱片NFT")
.width('159lpx')
.height('23lpx')
.fontColor($r('app.color.color_B15900'))
.fontSize('19lpx')
.textAlign(TextAlign.Start)
.margin({top:'10lpx'})
.fontWeight(400)
}.padding({left:'67lpx'})
.alignItems(HorizontalAlign.Start)
}.alignContent(Alignment.Start)
.width('348lpx')
.height('115lpx')
}.setFullWidth()
.height('115lpx')
.padding({left:'23lpx',right:'23lpx'})
.margin({top:'24lpx'})
}
@Styles setFullWidthAndHeight(){
.width('100%')
.height('100%')
}
@Styles setFullWidth(){
.width('100%')
}
@Styles setFullHeight(){
.height('100%')
}
}
\ No newline at end of file
... ...
import MinePageCreatorFunctionsItem from '../../viewmodel/MinePageCreatorFunctionsItem'
@Component
export default struct MinePageCreatorFunctionUI {
@Link creatorData:MinePageCreatorFunctionsItem[]
build(){
Column(){
Row(){
Text("创作者中心")
.fontSize('29lpx')
.width('148lpx')
.height('46lpx')
.fontWeight(600)
.fontColor($r('app.color.color_222222'))
Blank()
Row(){
Text("内容管理")
.fontSize('27lpx')
.width('113lpx')
.height('35lpx')
.fontColor($r('app.color.color_999999'))
Image($r('app.media.mine_right_arrow'))
.width('27lpx')
.height('27lpx')
.objectFit(ImageFit.Auto)
}
}.setFullWidth()
.height('92lpx')
.padding({left:'29lpx',top:'23lpx',right:'31lpx'})
Row(){
Grid(){
ForEach(this.creatorData,(item:MinePageCreatorFunctionsItem,index:number)=>{
GridItem(){
Row(){
Column(){
Image(item.imgSrc)
.width('50lpx')
.height('50lpx')
Text(`${item.msg}`)
.margin({top:'15lpx'})
.width('96lpx')
.height('23lpx')
.fontColor($r('app.color.color_666666'))
.fontSize('23lpx')
}
.alignItems(HorizontalAlign.Center)
.width('100%')
Blank()
.layoutWeight(1)
if(index % 4 < 3 && index != this.creatorData.length){
Text().backgroundColor($r('app.color.color_222222'))
.opacity(0.1)
.width('2lpx')
.height('29lpx')
}
}
}.onClick(()=>{
console.log(index+"")
}).width('169lpx')
.height('117lpx')
})
}
.rowsTemplate('1fr')
.columnsTemplate('1fr 1fr 1fr 1fr')
.height('88lpx')
}.setFullWidth()
.height('127lpx')
}
.height('219lpx')
.borderRadius(8)
.margin({top:'19lpx',left:'23lpx',right:'23lpx'})
.setBackGroundWhite()
}
@Styles setFullWidthAndHeight(){
.width('100%')
.height('100%')
}
@Styles setFullWidth(){
.width('100%')
}
@Styles setFullHeight(){
.height('100%')
}
@Styles setBackGroundWhite(){
.backgroundColor($r('app.color.white'))
}
}
\ No newline at end of file
... ...
import MinePageMoreFunctionModel from '../../viewmodel/MinePageMoreFunctionModel'
@Component
export default struct MinePageMoreFunctionUI{
@Link moreData:MinePageMoreFunctionModel[]
build(){
Column(){
Column(){
Text(`更多功能`)
.width('456lpx')
.height('38lpx')
.fontColor($r('app.color.color_666666'))
.fontSize('29lpx')
.margin({left:"31lpx"})
.fontWeight(600)
}.height('92lpx')
.width('100%')
.justifyContent(FlexAlign.Center)
.alignItems(HorizontalAlign.Start)
Text().backgroundColor($r('app.color.color_F5F5F5'))
.width('100%')
.height('1lpx')
List(){
ForEach(this.moreData,(item:MinePageMoreFunctionModel,index:number)=>{
ListItem(){
Column(){
Column(){
Row(){
if(item.imgSrc){
Image(item.imgSrc)
.width('38lpx')
.height('38lpx')
.margin({right:'15lpx'})
}
Text(`${item.msg}`)
.width('456lpx')
.height('38lpx')
.fontColor($r('app.color.color_666666'))
.fontSize('29lpx')
.fontWeight(400)
Blank()
Image($r('app.media.mine_user_arrow'))
.width('27lpx')
.height('27lpx')
.objectFit(ImageFit.Auto)
.margin({left:'81lpx',right:'29lpx'})
}.alignItems(VerticalAlign.Center)
.justifyContent(FlexAlign.Center)
}.height('108lpx')
.justifyContent(FlexAlign.Center)
.alignItems(HorizontalAlign.Start)
.padding({left:'27lpx'})
if(index != this.moreData.length -1 ){
Text().backgroundColor($r('app.color.color_F5F5F5'))
.width('612lpx')
.height('1lpx')
}
}
}
.onClick(()=>{
console.log(index+"")
if (index == 3) {
// RouteManager.jumpNewPage("pages/SettingPage")
} else {
// RouteManager.jumpNewPage("pages/PrivacySettingPage")
}
})
.height('117lpx')
})
}.onScrollFrameBegin((offset, state) => {
return { offsetRemain: 0 }
})
}
.backgroundColor($r('app.color.white'))
.borderRadius(8)
.margin({left:'23lpx',right:'23lpx',top:"19lpx"})
}
}
\ No newline at end of file
... ...
import { WDRouterRule, WDRouterPage } from 'wdRouter'
import MinePagePersonalFunctionsItem from '../../viewmodel/MinePagePersonalFunctionsItem'
import router from '@ohos.router'
@Component
export default struct MinePagePersonFunctionUI {
@Link personalData:MinePagePersonalFunctionsItem[]
build() {
Grid(){
ForEach(this.personalData,(item:MinePagePersonalFunctionsItem,index:number)=>{
GridItem(){
Row(){
Column(){
Image(item.imgSrc)
.width('46lpx')
.height('46lpx')
Text(`${item.msg}`)
.margin({top:'8lpx'})
.width('50lpx')
.height('23lpx')
.fontColor($r('app.color.color_222222'))
.fontSize('23lpx')
}
.alignItems(HorizontalAlign.Center)
.width('100%')
Blank()
.layoutWeight(1)
if(index % 4 < 3 && index != this.personalData.length-1){
Text().backgroundColor($r('app.color.color_222222'))
.opacity(0.1)
.width('2lpx')
.height('29lpx')
}
}
}.onClick(()=>{
console.log(index+"")
switch (item.msg){
case "预约":{
WDRouterRule.jumpWithPage(WDRouterPage.appointmentListPage)
break;
}
case "关注":{
WDRouterRule.jumpWithPage(WDRouterPage.followListPage)
break;
}
}
}).width('169lpx')
.height('117lpx')
})
}
.rowsTemplate('1fr 1fr')
.columnsTemplate('1fr 1fr 1fr 1fr')
.height('234lpx')
.margin({top:'31lpx',left:'23lpx',right:'23lpx' })
}
}
\ No newline at end of file
... ...
import { WDRouterPage, WDRouterRule } from 'wdRouter'
@Component
export default struct MinePageUserSimpleInfoUI {
@Prop isLogin:boolean
@Prop userName:string
build(){
Row(){
//头像
Stack(){
Button({type:ButtonType.Circle})
.backgroundColor($r('app.color.main_red'))
.width('110lpx')
.height('110lpx')
Image($r('app.media.mine_head_icon'))
.width('108lpx')
.height('108lpx')
.objectFit(ImageFit.Cover)
.borderRadius(50)
}.width('110lpx')
.height('110lpx')
.alignContent(Alignment.Center)
.onClick(()=>{
if(!this.isLogin){
WDRouterRule.jumpWithPage(WDRouterPage.loginPage)
}
})
if(this.isLogin){
//昵称信息
Column(){
Row(){
Text(this.userName)
.fontColor($r('app.color.color_222222'))
.maxLines(1)
.textOverflow({ overflow: TextOverflow.Ellipsis })
.fontSize('33lpx')
Image($r('app.media.mine_user_edit'))
.width('27lpx')
.height('27lpx')
.margin({left:'15lpx'})
.objectFit(ImageFit.Cover)
Blank()
}.width('100%')
Stack(){
Image($r('app.media.mine_grade_bg'))
.width('84lpx')
.height('29lpx')
.objectFit(ImageFit.Auto)
Text("等级8")
.textAlign(TextAlign.Center)
.fontColor($r('app.color.white'))
.fontSize('19lpx')
.width('50lpx')
.height('29lpx')
}.margin({top:'15lpx'})
}.alignItems(HorizontalAlign.Start)
.margin({top:'12lpx',left:'17lpx'})
.width('352lpx')
}else{
Row(){
Text("登录注册")
.fontColor($r('app.color.color_222222'))
.textOverflow({ overflow: TextOverflow.Ellipsis })
.fontSize('33lpx')
Image($r('app.media.mine_user_edit'))
.width('11lpx')
.height('20lpx')
.margin({left:'15lpx'})
.objectFit(ImageFit.Cover)
Blank()
}
.margin({top:'11lpx',left:'17lpx'})
.width('352lpx')
}
Blank()
Stack({alignContent:Alignment.Start}){
Text("签到")
.textAlign(TextAlign.Start)
.width('108lpx')
.height('46lpx')
.fontColor($r('app.color.color_AD6000'))
.backgroundColor($r('app.color.color_FFC460'))
.fontWeight(500)
.position({x:'23lpx'})
.padding({left:'35lpx'})
Image($r("app.media.mine_sign_icon"))
.width('50lpx')
.height('50lpx')
}.width('131lpx')
}.backgroundColor($r('app.color.white'))
.setFullWidth()
.padding({top:'31lpx',left:'46lpx'})
}
@Styles setFullWidthAndHeight(){
.width('100%')
.height('100%')
}
@Styles setFullWidth(){
.width('100%')
}
@Styles setFullHeight(){
.height('100%')
}
}
... ...
import { MineAppointmentItem } from '../../../viewmodel/MineAppointmentItem'
@Component
export struct AppointmentListChildComponent{
@ObjectLink item: MineAppointmentItem
build() {
Column(){
Stack(){
Image(this.item?.imageUrl[0])
.objectFit(ImageFit.Auto)
if(this.item.relType === 1){
Row(){
Row(){
Image($r('app.media.reserve_icon'))
.width('42lpx')
.height('35lpx')
.objectFit(ImageFit.Auto)
Text("预约")
.fontWeight(400)
.fontSize('21lpx')
.backgroundColor($r('app.color.color_4D000000'))
.fontColor($r('app.color.white'))
.lineHeight('31lpx')
.layoutWeight(1)
.textAlign(TextAlign.Center)
}.width('94lpx')
.margin({bottom:'15lpx',right:'15lpx'})
}.width('100%')
.height('100%')
.alignItems(VerticalAlign.Bottom)
.justifyContent(FlexAlign.End)
}
}.width('100%')
.height('376lpx')
Column(){
Text(this.item.title)
.fontWeight('400lpx')
.fontSize('33lpx')
.fontColor($r('app.color.color_222222'))
.lineHeight('48lpx')
.maxLines(2)
.textOverflow({ overflow: TextOverflow.Ellipsis })
.margin({bottom:'23lpx'})
.textAlign(TextAlign.Start)
.width('100%')
Row(){
Row(){
if(this.item.relType === 2){
Image($r('app.media.play_status_history_icon'))
.objectFit(ImageFit.Auto)
.width('38lpx')
.height('38lpx')
.margin({right:'12lpx'})
Text('已结束').fontColor($r('app.color.color_999999'))
.fontWeight('500lpx')
.fontSize('23lpx')
}else {
Image($r('app.media.play_status_icon'))
.objectFit(ImageFit.Auto)
.width('38lpx')
.height('38lpx')
.margin({right:'12lpx'})
Text(this.item.timePre).fontColor($r('app.color.color_ED2800'))
.fontWeight('500lpx')
.fontSize('23lpx')
Image($r('app.media.point_icon'))
.objectFit(ImageFit.Auto)
.width('12lpx')
.height('31lpx')
.margin({right:'4lpx'})
Text(`${this.item.timeBack}开始`).fontColor($r('app.color.color_ED2800'))
.fontWeight('500lpx')
.fontSize('23lpx')
.lineHeight('31lpx')
}
}.padding({left:'19lpx',right:'19lpx'})
.height('46lpx')
.alignItems(VerticalAlign.Center)
.backgroundColor($r('app.color.color_F5F5F5'))
.borderRadius('4lpx')
Blank()
.layoutWeight(1)
if(this.item.relType === 1){
Text(this.item.isAppointment?"已预约":"预约")
.fontWeight(400)
.fontSize('23lpx')
.backgroundColor(this.item.isAppointment?$r('app.color.color_F5F5F5'):$r('app.color.color_ED2800'))
.fontColor(this.item.isAppointment?$r('app.color.color_CCCCCC'):$r('app.color.white'))
.lineHeight('31lpx')
.textAlign(TextAlign.Center)
.width('100lpx')
.height('46lpx')
.borderRadius('6lpx')
.onClick(()=>{
this.item.isAppointment = !this.item.isAppointment
//TODO 预约动作
})
}else {
Text(this.item.relType === 2?"去观看":"看回放")
.fontWeight(400)
.fontSize('23lpx')
.backgroundColor($r('app.color.color_ED2800'))
.fontColor($r('app.color.white'))
.lineHeight('31lpx')
.textAlign(TextAlign.Center)
.width('100lpx')
.height('46lpx')
.borderRadius('6lpx')
}
}
}
.padding({left:'23lpx',right:'23lpx',top:'15lpx',bottom:'23lpx'})
}.margin({ left: 10, right: 10 })
.backgroundColor($r('app.color.white'))
.borderRadius('8lpx')
}
}
\ No newline at end of file
... ...
import { AppointmentListChildComponent } from './AppointmentListChildComponent';
import { CustomTitleUI } from '../../reusable/CustomTitleUI'
import { ListHasNoMoreDataUI } from '../../reusable/ListHasNoMoreDataUI';
import { MineAppointmentItem } from '../../../viewmodel/MineAppointmentItem';
import { LazyDataSource, StringUtils } from 'wdKit';
import MinePageDatasModel from '../../../model/MinePageDatasModel';
const TAG = "AppointmentListUI"
@Component
export struct AppointmentListUI{
@State data: LazyDataSource<MineAppointmentItem> = new LazyDataSource();
@State count:number = 0;
@State isLoading:boolean = false
@State hasMore:boolean = true
curPageNum:number = 1;
aboutToAppear() {
this.getNewPageData()
}
build() {
Column() {
//标题栏目
CustomTitleUI({titleName:"预约列表"})
if(this.count == 0){
ListHasNoMoreDataUI({style:2})
}else{
//刷新控件 TODO
//List
List({ space: '6lpx' }) {
LazyForEach(this.data, (item: MineAppointmentItem, index: number) => {
ListItem() {
AppointmentListChildComponent({item:item})
}
.onClick(()=>{
//TODO 跳转
})
}, (item: MineAppointmentItem, index: number) => index.toString())
//没有更多数据 显示提示
if(!this.hasMore){
ListItem(){
ListHasNoMoreDataUI()
}
}
}.cachedCount(4)
.scrollBar(BarState.Off)
.margin({top:'23lpx',left:'23lpx',right:'23lpx'})
.layoutWeight(1)
.onReachEnd(()=>{
console.log(TAG,"触底了");
if(!this.isLoading){
//加载分页数据
this.getNewPageData()
}
})
}
}
.backgroundColor($r('app.color.color_F9F9F9'))
.height('100%')
.width('100%')
}
getNewPageData(){
this.isLoading = true
if(this.hasMore){
MinePageDatasModel.getAppointmentListData("20",`${this.curPageNum}`,getContext(this)).then((value)=>{
if (!this.data || value.list.length == 0){
this.hasMore = false
}else{
value.list.forEach((value)=>{
let dealTime = this.DealStartTime(value.planStartTime)
if(dealTime!=null && dealTime.length === 2){
this.data.push(new MineAppointmentItem(value.imageUrl,value.status,value.title,true,dealTime[0],dealTime[1],value.relType))
}else {
this.data.push(new MineAppointmentItem(value.imageUrl,value.status,value.title,true,"","",value.relType))
}
})
this.data.notifyDataReload()
this.count = this.data.totalCount()
if (this.data.totalCount() < value.totalCount) {
this.curPageNum++
}else {
this.hasMore = false
}
}
})
}
this.isLoading = false
}
DealStartTime(planStartTime:string):string[]{
let dealData:string[] = []
if(!StringUtils.isNotEmpty(planStartTime)){
console.log(TAG,"格式有误")
return dealData
}
if(planStartTime.indexOf(" ") === -1){
console.log(TAG,"格式有误")
return dealData
}
let arr = planStartTime.split(" ")
if(arr!=null && StringUtils.isNotEmpty(arr[0])){ //处理年月日
let time = arr[0].split("-");
if(time.length === 3){
let month = time[1].indexOf("0") === 0 ? time[1].substring(1):time[1]
let day = time[2]
dealData[0] = `${month}月${day}日`
let today = `${new Date().getMonth()+1}月${new Date().getDate()}日`
if(dealData[0] === today){
dealData[0] = "今日"
}
}
}
if(arr!=null && StringUtils.isNotEmpty(arr[1])){ //处理时分
let time = arr[1].split(":");
if(time.length === 3){
dealData[1] = `${time[0]}:${time[1]}`
}
}
console.log(TAG,JSON.stringify(dealData))
return dealData
}
}
\ No newline at end of file
... ...
import { ResourcesUtils } from 'wdKit'
import { ResponseDTO } from 'wdNetwork'
import MinePageDatasModel from '../../../model/MinePageDatasModel'
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)
// });
MinePageDatasModel.getFollowListData(getContext(this)).then((value)=>{
value.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 MinePageDatasModel from '../../../model/MinePageDatasModel';
import { FollowListDetailItem } from '../../../viewmodel/FollowListDetailItem'
import { FollowListDetailRequestItem } from '../../../viewmodel/FollowListDetailRequestItem';
import { ListHasNoMoreDataUI } from '../../reusable/ListHasNoMoreDataUI';
const TAG = "FollowListDetailUI"
@Component
export struct FollowListDetailUI{
@State creatorDirectoryId:number = -1;
@State data: LazyDataSource<FollowListDetailItem> = new LazyDataSource();
@State count:number = 0;
@State isLoading:boolean = false
@State hasMore:boolean = true
curPageNum:number = 1;
aboutToAppear(){
console.log("YCG","aboutToAppear==="+this.creatorDirectoryId);
this.getNewPageData()
}
build(){
Column(){
if(this.count === 0){
ListHasNoMoreDataUI({style:2})
}else{
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)
.scrollBar(BarState.Off)
.onReachEnd(()=>{
console.log(TAG,"触底了");
if(!this.isLoading){
this.isLoading = true
//加载分页数据
this.getNewPageData()
}
})
}
}.height('100%')
.width('100%')
}
getNewPageData(){
this.isLoading = true
if(this.hasMore){
let object = new FollowListDetailRequestItem(this.creatorDirectoryId,20,this.curPageNum)
MinePageDatasModel.getFollowListDetailData(object,getContext(this)).then((value)=>{
if (!this.data || value.list.length == 0){
this.hasMore = false
}else{
value.list.forEach((value)=>{
this.data.push(new FollowListDetailItem(value.headPhotoUrl,value.cnUserName,value.cnFansNum,value.introduction))
})
this.data.notifyDataReload()
this.count = this.data.totalCount()
if (this.data.totalCount() < value.totalCount) {
this.curPageNum++
}else {
this.hasMore = false
}
}
})
}
this.isLoading = false
}
}
@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 { AppointmentListUI } from '../mine/appointment/AppointmentListUI'
const TAG = "AppointmentListPage"
@Entry
@Component
struct AppointmentListPage {
build() {
Column(){
AppointmentListUI()
}
}
}
\ No newline at end of file
... ...
... ... @@ -16,7 +16,7 @@ export struct BottomNavigationComponent {
// 底导/顶导全部数据
@State @Watch('onBottomNavigationDataUpdated') bottomNavList: BottomNavDTO[] = []
// 底导当前选中/焦点下标
@Provide currentNavIndex: number = BottomNavi.NEWS;
@State currentNavIndex: number = BottomNavi.NEWS;
// 底导TabsController
private navController: TabsController = new TabsController();
readonly ASPECT_RATIO_1_1: number = 1 / 1; // 底导图片宽高比
... ... @@ -51,7 +51,7 @@ export struct BottomNavigationComponent {
// 我的页面组件数据列表
MinePageComponent()
} else {
TopNavigationComponent({ topNavList: navItem.topNavChannelList })
TopNavigationComponent({ topNavList: navItem.topNavChannelList, _currentNavIndex: this.currentNavIndex })
}
}
}
... ... @@ -85,6 +85,7 @@ export struct BottomNavigationComponent {
}
.height($r('app.float.bottom_navigation_barHeight'))
.hoverEffect(HoverEffect.Highlight)
// .justifyContent(FlexAlign.Center)
// .onClick(() => {
// Logger.info(TAG, `onClick, index: ${index}`);
... ...
import { FollowFirstTabsComponent } from '../mine/follow/FollowFirstTabsComponent'
@Entry
@Component
struct FollowListPage {
build() {
Column() {
//Tab 详情
FollowFirstTabsComponent()
}
.backgroundColor($r('app.color.color_F9F9F9'))
.height('100%')
.width('100%')
}
}
\ No newline at end of file
... ...
const TAG = 'PageComponent';
import MinePagePersonalFunctionsItem from '../../viewmodel/MinePagePersonalFunctionsItem'
import MinePageCreatorFunctionsItem from '../../viewmodel/MinePageCreatorFunctionsItem'
import MinePageMoreFunctionModel from '../../viewmodel/MinePageMoreFunctionModel'
import MinePageDatasModel from '../../model/MinePageDatasModel'
import MinePageUserSimpleInfoUI from '../mine/MinePageUserSimpleInfoUI'
import MinePagePersonFunctionUI from '../mine/MinePagePersonFunctionUI'
import MinePageCardUI from '../mine/MinePageCardUI'
import MinePageCreatorFunctionUI from '../mine/MinePageCreatorFunctionUI'
import MinePageMoreFunctionUI from '../mine/MinePageMoreFunctionUI'
import { SPHelper, StringUtils } from 'wdKit'
import { SpConstants } from 'wdConstant'
const TAG = 'MinePageComponent';
/**
* 我的页面
*/
@Component
export struct MinePageComponent {
// TODO 待完善
//是否是创作者
@State isCreator:boolean = false
@State isLogin:boolean = false
@State userName:string = "登陆注册"
@State personalData:MinePagePersonalFunctionsItem[] = []
@State creatorData:MinePageCreatorFunctionsItem[] = []
@State moreData:MinePageMoreFunctionModel[] = []
scroller: Scroller = new Scroller()
aboutToAppear(){
this.getUserLogin()
this.getFunctionData()
}
getFunctionData(){
//个人功能数据
this.personalData = MinePageDatasModel.getPersonalFunctionsData()
//创作者功能数据
this.creatorData = MinePageDatasModel.getCreatorFunctionsData()
//更多功能数据
this.moreData = MinePageDatasModel.getMoreFunctionsData()
}
build() {
Text('我的页面')
Scroll(this.scroller){
Stack(){
Image($r('app.media.mine_head_bg'))
.width('100%')
.height('657lpx')
.objectFit(ImageFit.Auto)
this.MinePageUI()
}
.alignContent(Alignment.Top)
}
.setFullWidthAndHeight()
.backgroundColor($r('app.color.color_F9F9F9'))
.scrollable(ScrollDirection.Vertical)
.scrollBar(BarState.Off)
}
@Builder MinePageUI(){
Column(){
//头像层
MinePageUserSimpleInfoUI({isLogin:this.isLogin,userName:this.userName})
//Grid 区域
MinePagePersonFunctionUI({personalData:$personalData})
//Card
MinePageCardUI()
//创作者区域
MinePageCreatorFunctionUI({creatorData:$creatorData})
//更多功能
MinePageMoreFunctionUI({moreData:$moreData})
}.width('100%')
}
@Styles setFullWidthAndHeight(){
.width('100%')
.height('100%')
}
async getUserLogin() {
let userid = await SPHelper.default.get(SpConstants.USER_ID,"")
if(StringUtils.isNotEmpty(userid)){
this.isLogin = true
let userName = await SPHelper.default.get(SpConstants.USER_NAME,"") as string
this.userName = userName
}else{
this.isLogin = false
}
}
}
... ...
... ... @@ -10,6 +10,7 @@ const TAG = 'TopNavigationComponent';
*/
@Component
export struct TopNavigationComponent {
@Prop _currentNavIndex?: number;
// 顶导当前选中/焦点下标
@State currentTopNavSelectedIndex: number = 0;
// 顶导数据
... ... @@ -19,15 +20,15 @@ export struct TopNavigationComponent {
build() {
Column() {
RelativeContainer(){
Stack({ alignContent: Alignment.Center }){
RelativeContainer() {
Stack({ alignContent: Alignment.Center }) {
Image($r('app.media.background_search'))
.width('100%')
.height('100%')
.objectFit(ImageFit.Contain)
Row(){
Row() {
Image($r('app.media.icon_search'))
.width(18)
.height(18)
... ... @@ -62,12 +63,12 @@ export struct TopNavigationComponent {
.alignRules({ middle: { anchor: "__container__", align: HorizontalAlign.Center },
center: { anchor: "__container__", align: VerticalAlign.Center } })
Stack({ alignContent: Alignment.Center }){
Stack({ alignContent: Alignment.Center }) {
Image($r('app.media.background_read_paper_home'))
.width('100%')
.height('100%')
.objectFit(ImageFit.Contain)
Row(){
Row() {
Image($r('app.media.icon_read_paper_home'))
.width(18)
.height(18)
... ... @@ -84,7 +85,7 @@ export struct TopNavigationComponent {
.id('read')
.alignRules({ right: { anchor: "__container__", align: HorizontalAlign.End },
center: { anchor: "__container__", align: VerticalAlign.Center } })
.onClick((event: ClickEvent)=>{
.onClick((event: ClickEvent) => {
let taskAction: Action = {
type: 'JUMP_INNER_NEW_PAGE',
... ... @@ -97,6 +98,7 @@ export struct TopNavigationComponent {
}
.width('100%')
.height(40)
.visibility(this._currentNavIndex != 2 ? Visibility.Visible : Visibility.None)
Tabs() {
ForEach(this.topNavList, (navItem: TopNavDTO, index: number) => {
... ... @@ -132,7 +134,7 @@ export struct TopNavigationComponent {
.maxLines(this.MAX_LINE)
Divider()
.width(16)
.strokeWidth(2) // 分割线粗细度。
.strokeWidth(2)// 分割线粗细度。
.padding({ top: 2 })
.color(Color.Red)
.opacity(this.currentTopNavSelectedIndex === index ? 1 : 0)
... ...
import router from '@ohos.router'
@Component
export struct CustomTitleUI {
imgBack:boolean = true
titleName:string = "默认标题"
build() {
RelativeContainer() {
//标题栏目
if(this.imgBack){
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()
})
}
Text(this.titleName)
.height('42lpx')
.maxLines(1)
.id("title")
.fontSize('35lpx')
.fontWeight(400)
.fontColor($r('app.color.color_222222'))
.lineHeight('42lpx')
.alignRules({
center: {anchor: "__container__", align: VerticalAlign.Center},
middle: {anchor: "__container__", align: HorizontalAlign.Center}
})
}
.height('84lpx')
.width('100%')
.backgroundColor($r('app.color.white'))
}
}
\ No newline at end of file
... ...
@Component
export struct ListHasNoMoreDataUI{
@State style:number = 1;
build(){
if (this.style === 1){
Row(){
Text("已显示全部内容")
.fontColor($r('app.color.color_999999'))
.fontWeight('500lpx')
.fontSize('23lpx')
}.justifyContent(FlexAlign.Center)
.width('100%')
.margin({top:'20lpx',bottom:'20lpx'})
}else if (this.style === 2){
Column(){
Image($r('app.media.empty_icon'))
.width('200lpx')
.height('200lpx')
.objectFit(ImageFit.Auto)
Text("暂无内容")
.fontColor($r('app.color.color_999999'))
.fontWeight('500lpx')
.fontSize('23lpx')
}
.justifyContent(FlexAlign.Center)
.width('100%')
.height('100%')
}
}
}
\ No newline at end of file
... ...
import MinePagePersonalFunctionsItem from '../viewmodel/MinePagePersonalFunctionsItem'
import MinePageCreatorFunctionsItem from '../viewmodel/MinePageCreatorFunctionsItem'
import MinePageMoreFunctionModel from '../viewmodel/MinePageMoreFunctionModel';
import HashMap from '@ohos.util.HashMap';
import { HttpUrlUtils, ResponseDTO, WDHttp } from 'wdNetwork';
import { MineAppointmentListItem } from '../viewmodel/MineAppointmentListItem';
import { Logger, ResourcesUtils } from 'wdKit';
import { MineFollowListDetailItem } from '../viewmodel/MineFollowListDetailItem';
import { FollowListDetailRequestItem } from '../viewmodel/FollowListDetailRequestItem';
import { FollowListItem } from '../viewmodel/FollowListItem';
const TAG = "MinePageDatasModel"
/**
* 我的页面 所有数据 获取封装类
*/
class MinePageDatasModel{
private static instance: MinePageDatasModel;
personalData:MinePagePersonalFunctionsItem[] = []
creatorData:MinePageCreatorFunctionsItem[] = []
moreData:MinePageMoreFunctionModel[] = []
private constructor() { }
/**
* 单例模式
* @returns
*/
public static getInstance(): MinePageDatasModel {
if (!MinePageDatasModel.instance) {
MinePageDatasModel.instance = new MinePageDatasModel();
}
return MinePageDatasModel.instance;
}
/**
* 评论 关注 收藏 等7个数据
* 包含名字和图标
*/
getPersonalFunctionsData():MinePagePersonalFunctionsItem[]{
if(this.personalData.length === 7){
return this.personalData
}
this.personalData.push(new MinePagePersonalFunctionsItem("评论",$r('app.media.mine_comment_icon')))
this.personalData.push(new MinePagePersonalFunctionsItem("关注",$r('app.media.mine_order_icon')))
this.personalData.push(new MinePagePersonalFunctionsItem("收藏",$r('app.media.mine_collect_icon')))
this.personalData.push(new MinePagePersonalFunctionsItem("历史",$r('app.media.mine_history_icon')))
this.personalData.push(new MinePagePersonalFunctionsItem("消息",$r('app.media.mine_msg_icon')))
this.personalData.push(new MinePagePersonalFunctionsItem("留言板",$r('app.media.mine_msgboard_icon')))
this.personalData.push(new MinePagePersonalFunctionsItem("预约",$r('app.media.mine_order_icon')))
return this.personalData
}
/**
* 发布文章 发布视频 等4个数据
* 包含名字和图标
*/
getCreatorFunctionsData():MinePageCreatorFunctionsItem[]{
if(this.creatorData.length === 4){
return this.creatorData
}
this.creatorData.push(new MinePageCreatorFunctionsItem("发布文章",$r('app.media.mine_active_create_article')))
this.creatorData.push(new MinePageCreatorFunctionsItem("发布视频",$r('app.media.mine_active_create_video')))
this.creatorData.push(new MinePageCreatorFunctionsItem("发布动态",$r('app.media.mine_active_create_video')))
this.creatorData.push(new MinePageCreatorFunctionsItem("发布图集",$r('app.media.mine_active_create_pics')))
return this.creatorData
}
/**
* 扫一扫 我的奖品 等5个数据
* 包含名字和图标
*/
getMoreFunctionsData():MinePageCreatorFunctionsItem[]{
if(this.moreData.length === 5){
return this.moreData
}
this.moreData.push(new MinePageMoreFunctionModel("扫一扫",$r('app.media.mine_scan')))
this.moreData.push(new MinePageMoreFunctionModel("我的奖品",$r('app.media.mine_mygift')))
this.moreData.push(new MinePageMoreFunctionModel("意见反馈",$r('app.media.mine_suggest')))
this.moreData.push(new MinePageMoreFunctionModel("设置",$r('app.media.mine_setting')))
this.moreData.push(new MinePageMoreFunctionModel("关于",$r('app.media.mine_about')))
return this.moreData
}
/**
* 预约
* @param pageSize
* @param pageNum
* @returns
*/
fetchAppointmentListData(pageSize:string,pageNum:string) {
let url = HttpUrlUtils.getAppointmentListDataUrl()+ `?pageSize=${pageSize}&pageNum=${pageNum}`
let headers: HashMap<string, string> = HttpUrlUtils.getYcgCommonHeaders();
return WDHttp.get<ResponseDTO<MineAppointmentListItem>>(url, headers)
};
getAppointmentListData(pageSize:string,pageNum:string,context: Context): Promise<MineAppointmentListItem> {
return new Promise<MineAppointmentListItem>((success, error) => {
Logger.info(TAG, `getAppointmentList start`);
this.fetchAppointmentListData(pageSize,pageNum).then((navResDTO: ResponseDTO<MineAppointmentListItem>) => {
if (!navResDTO) {
error("page data invalid");
success(this.getAppointmentListDataLocal(context))
return
}
Logger.info(TAG, "getAppointmentList then,AppointmentResDTO.timeStamp:" + navResDTO.timestamp);
let navigationBean = navResDTO.data as MineAppointmentListItem
success(navigationBean);
}).catch((err: Error) => {
Logger.error(TAG, `fetchAppointmentListDataApi catch, error.name : ${err.name}, error.message:${err.message}`);
// error(err);
success(this.getAppointmentListDataLocal(context))
})
})
}
async getAppointmentListDataLocal(context: Context): Promise<MineAppointmentListItem> {
Logger.info(TAG, `getBottomNavDataMock start`);
let compRes: ResponseDTO<MineAppointmentListItem> | null = await ResourcesUtils.getResourcesJson<ResponseDTO<MineAppointmentListItem>>(context,'appointment_list_data.json' );
if (!compRes || !compRes.data) {
Logger.info(TAG, `getAppointmentListDataLocal compRes is empty`);
return new MineAppointmentListItem()
}
Logger.info(TAG, `getAppointmentListDataLocal getResourcesJsonSync compRes : ${JSON.stringify(compRes)}`);
return compRes.data
}
/**
* 关注频道详情
* @param pageSize
* @param pageNum
* @param context
* @returns
*/
getFollowListDetailData(params:FollowListDetailRequestItem,context: Context): Promise<MineFollowListDetailItem> {
return new Promise<MineFollowListDetailItem>((success, error) => {
Logger.info(TAG, `getAppointmentList start`);
this.fetchFollowListDetailData(params).then((navResDTO: ResponseDTO<MineFollowListDetailItem>) => {
if (!navResDTO) {
error("page data invalid");
success(this.getFollowListDetailDataLocal(context))
return
}
Logger.info(TAG, "getAppointmentList then,AppointmentResDTO.timeStamp:" + navResDTO.timestamp);
let navigationBean = navResDTO.data as MineFollowListDetailItem
success(navigationBean);
}).catch((err: Error) => {
Logger.error(TAG, `fetchAppointmentListDataApi catch, error.name : ${err.name}, error.message:${err.message}`);
// error(err);
success(this.getFollowListDetailDataLocal(context))
})
})
}
async getFollowListDetailDataLocal(context: Context): Promise<MineFollowListDetailItem> {
Logger.info(TAG, `getBottomNavDataMock start`);
let compRes: ResponseDTO<MineFollowListDetailItem> | null = await ResourcesUtils.getResourcesJson<ResponseDTO<MineFollowListDetailItem>>(context,'follow_list_detail_data_id120.json' );
if (!compRes || !compRes.data) {
Logger.info(TAG, `getAppointmentListDataLocal compRes is empty`);
return new MineFollowListDetailItem()
}
Logger.info(TAG, `getAppointmentListDataLocal getResourcesJsonSync compRes : ${JSON.stringify(compRes)}`);
return compRes.data
}
fetchFollowListDetailData(object:FollowListDetailRequestItem) {
let url = HttpUrlUtils.getFollowListDetailDataUrl()
let headers: HashMap<string, string> = HttpUrlUtils.getYcgCommonHeaders();
return WDHttp.post<ResponseDTO<MineFollowListDetailItem>>(url, object,headers)
};
/**
* 关注频道列表
* @returns
*/
fetchFollowListData() {
let url = HttpUrlUtils.getFollowListDataUrl()
let headers: HashMap<string, string> = HttpUrlUtils.getYcgCommonHeaders();
return WDHttp.get<ResponseDTO<FollowListItem[]>>(url, headers)
};
getFollowListData(context: Context): Promise<FollowListItem[]> {
return new Promise<FollowListItem[]>((success, error) => {
Logger.info(TAG, `getAppointmentList start`);
this.fetchFollowListData().then((navResDTO: ResponseDTO<FollowListItem[]>) => {
if (!navResDTO) {
error("page data invalid");
success(this.getFollowListDataLocal(context))
return
}
Logger.info(TAG, "getAppointmentList then,AppointmentResDTO.timeStamp:" + navResDTO.timestamp);
let navigationBean = navResDTO.data as FollowListItem[]
success(navigationBean);
}).catch((err: Error) => {
Logger.error(TAG, `fetchAppointmentListDataApi catch, error.name : ${err.name}, error.message:${err.message}`);
// error(err);
success(this.getFollowListDataLocal(context))
})
})
}
async getFollowListDataLocal(context: Context): Promise<FollowListItem[]> {
Logger.info(TAG, `getFollowListDataLocal start`);
let compRes: ResponseDTO<FollowListItem[]> | null = await ResourcesUtils.getResourcesJson<ResponseDTO<FollowListItem[]>>(context,'follow_list_data2.json' );
if (!compRes || !compRes.data) {
Logger.info(TAG, `getFollowListDataLocal compRes is empty`);
return []
}
Logger.info(TAG, `getFollowListDataLocal getResourcesJsonSync compRes : ${JSON.stringify(compRes)}`);
return compRes.data
}
}
const minePageDatasModel = MinePageDatasModel.getInstance()
export default minePageDatasModel as MinePageDatasModel
\ No newline at end of file
... ...
/**
*
"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
}
}
... ...
export class FollowListDetailRequestItem{
creatorDirectoryId:number = 120
pageSize:number = 20
pageNum:number = 1
constructor(creatorDirectoryId: number = 120,
pageSize: number = 20,
pageNum: number = 1) {
this.creatorDirectoryId = creatorDirectoryId
this.pageSize = pageSize
this.pageNum = pageNum
}
}
\ No newline at end of file
... ...
/**
* {
"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 = 0
id:number = 0
isShow:number = 1
level:number = 1
parentId:number = 0
rootId:number = 0
children:FollowSecondListItem[] = []
}
@Observed
export class FollowSecondListItem{
directoryName:string = ""
directoryWeight:number = 0
id:number = 0
isShow:number = 1
level:number = 1
parentId:number = 0
rootId:number = 0
children:FollowThirdListItem[] = []
}
@Observed
export class FollowThirdListItem{
directoryName:string = ""
directoryWeight:number = 0
id:number = 0
isShow:number = 1
level:number = 1
parentId:number = 0
rootId:number = 0
}
\ No newline at end of file
... ...
export default class FunctionsItem {
imgSrc:Resource
msg:string
constructor(msg:string,imgSrc:Resource){
this.msg = msg
this.imgSrc = imgSrc
}
}
\ No newline at end of file
... ...
@Observed
export class MineAppointmentItem{
appStyle:string ="" //"15"
/*[
"https://sitcontentjdcdn.aikan.pdnews.cn/sjbj-20231204/image/live/563cc8ce1ecc43b288f6cf60da66579c.jpeg?x-oss-process=image/resize,l_550,m_fill,h_450,w_800/quality,q_90/format,jpg"
]*/
imageUrl:string[]
liveId:number = -1 //20000007348
planStartTime:string = "" //2023-12-05 15:26:10
timePre:string //12月05日
timeBack:string //15:26
relId:string = "" //"500000017021"
relType:number //1
startTime:string = "" //""
status:string //"wait"
title:string //"视界运营位加权-加权中删除"
isAppointment:boolean
constructor(imageUrl:string[],status:string,title:string,isAppointment:boolean,timePre:string,timeBack:string,relType:number,appStyle?:string,liveId?:number,planStartTime?:string,
relId?:string,startTime?:string) {
this.imageUrl=imageUrl
this.status=status
this.title=title
this.isAppointment=isAppointment
this.timePre = timePre
this.timeBack = timeBack
this.relType = relType
}
}
\ No newline at end of file
... ...
import { MineAppointmentItem } from './MineAppointmentItem'
export class MineAppointmentListItem{
list:MineAppointmentItem[] = []
pageNum: number = 0
pageSize: number = 20
totalCount: number = 0
constructor(list?:MineAppointmentItem[],pageNum?: number,pageSize?: number,totalCount?: number) {
}
}
\ No newline at end of file
... ...
import { FollowListDetailItem } from './FollowListDetailItem'
export class MineFollowListDetailItem{
list:FollowListDetailItem[] = []
pageNum: number = 0
pageSize: number = 20
totalCount: number = 0
constructor(list?:FollowListDetailItem[],pageNum?: number,pageSize?: number,totalCount?: number) {
}
}
\ No newline at end of file
... ...
import FunctionsItem from './FunctionsItem';
export default class MinePageCreatorFunctionsItem extends FunctionsItem{
}
\ No newline at end of file
... ...
import FunctionsItem from './FunctionsItem'
export default class MinePageMoreFunctionModel extends FunctionsItem{
}
\ No newline at end of file
... ...
import FunctionsItem from './FunctionsItem'
export default class MinePagePersonalFunctionsItem extends FunctionsItem {
}
\ No newline at end of file
... ...
const TAG = 'MorningEveningViewModel'
export class MorningEveningViewModel {
static async getNewspaperList(date: string, pageSize: string): Promise<NewspaperListBean> {
return new Promise<NewspaperListBean>((success, error) => {
Logger.info(TAG, `getNavData start`);
PageRepository.fetchNewspaperList(date, pageSize).then((resDTO: ResponseDTO<NewspaperListBean>) => {
if (!resDTO || !resDTO.data) {
Logger.error(TAG, 'getNewspaperList then navResDTO is empty');
error('resDTO is empty');
return
}
if (resDTO.code != 0) {
Logger.error(TAG, `getNewspaperList then code:${resDTO.code}, message:${resDTO.message}`);
error('resDTO Response Code is failure');
return
}
// let navResStr = JSON.stringify(navResDTO);
Logger.info(TAG, "getNewspaperList then,navResDTO.timestamp:" + resDTO.timestamp);
success(resDTO.data);
}).catch((err: Error) => {
Logger.error(TAG, `getNewspaperList catch, error.name : ${err.name}, error.message:${err.message}`);
error(err);
})
})
}
}
\ No newline at end of file
... ...
... ... @@ -13,6 +13,7 @@
{
"name": "ohos.permission.INTERNET"
}
]
],
"pages": "$profile:main_pages"
}
}
\ No newline at end of file
... ...
... ... @@ -55,6 +55,49 @@
{
"name": "color_4d000000",
"value": "#4d000000"
},
{
"name": "color_F5F5F5",
"value": "#F5F5F5"
},
{
"name": "color_FFC460",
"value": "#FFC460"
},
{
"name": "color_FF2E0C",
"value": "#FF2E0C"
},
{
"name": "color_AD6000",
"value": "#AD6000"
},
{
"name": "color_F9F9F9",
"value": "#F9F9F9"
},
{
"name": "color_994D00",
"value": "#994D00"
},
{
"name":"color_B15900",
"value": "#B15900"
},
{
"name": "main_red",
"value": "#E84026"
}, {
"name":"color_4D000000",
"value": "#4D000000"
},
{
"name":"color_CCCCCC",
"value": "#CCCCCC"
},
{
"name":"color_EDEDED",
"value": "#EDEDED"
}
]
}
\ No newline at end of file
... ...
{
"src": [
"components/MorningEveningPaper/MorningEveningPaperComponent"
"components/MorningEveningPaper/MorningEveningPaperComponent",
"components/page/AppointmentListPage",
"components/page/FollowListPage"
]
}
... ...
{
"meta": {
"stableOrder": true
},
"lockfileVersion": 3,
"lockfileVersion": 1,
"ATTENTION": "THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.",
"specifiers": {
"@ohos/axios@^2.1.1": "@ohos/axios@2.1.1",
"wdBean@../../../../features/wdBean": "wdBean@../wdBean",
"wdConstant@../../../../commons/wdConstant": "wdConstant@../../commons/wdConstant",
"wdKit@../../../../commons/wdKit": "wdKit@../../commons/wdKit",
"wdKit@../../commons/wdKit": "wdKit@../commons/wdKit",
"wdNetwork@../../../../commons/wdNetwork": "wdNetwork@../../commons/wdNetwork",
"wdPlayer@../../../wdPlayer": "wdPlayer@../wdPlayer",
"wdPlayer@../wdPlayer": "wdPlayer@../wdPlayer",
"wdRouter@../../../../commons/wdRouter": "wdRouter@../../commons/wdRouter"
},
"packages": {
"@ohos/axios@2.1.1": {
"name": "@ohos/axios",
"integrity": "sha512-EQax257+eKKT0Rx7h6N6xvmKbDRWDjCCWOP2vyyktySFwvjtypXuXmQKEvRjmAalR6cqf8mbfhWmpg0bD9OQ3w==",
"resolved": "https://repo.harmonyos.com/ohpm/@ohos/axios/-/axios-2.1.1.har",
"registryType": "ohpm"
},
"wdBean@../wdBean": {
"name": "wdbean",
"resolved": "../wdBean",
"registryType": "local"
},
"wdConstant@../../commons/wdConstant": {
"name": "wdconstant",
"resolved": "../../commons/wdConstant",
"registryType": "local"
},
"wdKit@../../commons/wdKit": {
"name": "wdkit",
"resolved": "../../commons/wdKit",
"registryType": "local"
},
"wdKit@../commons/wdKit": {
"name": "wdkit",
"resolved": "../commons/wdKit",
"registryType": "local"
},
"wdNetwork@../../commons/wdNetwork": {
"name": "wdnetwork",
"resolved": "../../commons/wdNetwork",
"registryType": "local",
"dependencies": {
"wdConstant": "file:../wdConstant",
"wdKit": "file:../wdKit",
"@ohos/axios": "^2.1.1"
}
},
"wdPlayer@../wdPlayer": {
"name": "wdplayer",
"resolved": "../wdPlayer",
"registryType": "local",
"dependencies": {
"wdKit": "file:../../commons/wdKit"
}
},
"wdRouter@../../commons/wdRouter": {
"name": "wdrouter",
"resolved": "../../commons/wdRouter",
"registryType": "local",
"dependencies": {
"wdKit": "file:../wdKit",
"wdBean": "file:../../features/wdBean"
}
}
}
"specifiers": {},
"packages": {}
}
\ No newline at end of file
... ...
{
"meta": {
"stableOrder": true
},
"lockfileVersion": 3,
"lockfileVersion": 1,
"ATTENTION": "THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.",
"specifiers": {
"@ohos/axios@^2.1.1": "@ohos/axios@2.1.1",
"wdBean@../../../../features/wdBean": "wdBean@../wdBean",
"wdConstant@../../../../commons/wdConstant": "wdConstant@../../commons/wdConstant",
"wdDetailPlayApi@../../../wdDetailPlayApi": "wdDetailPlayApi@../wdDetailPlayApi",
"wdDetailPlayApi@../wdDetailPlayApi": "wdDetailPlayApi@../wdDetailPlayApi",
"wdKit@../../../../commons/wdKit": "wdKit@../../commons/wdKit",
"wdKit@../../commons/wdKit": "wdKit@../commons/wdKit",
"wdNetwork@../../../../commons/wdNetwork": "wdNetwork@../../commons/wdNetwork",
"wdPlayer@../../../wdPlayer": "wdPlayer@../wdPlayer",
"wdRouter@../../../../commons/wdRouter": "wdRouter@../../commons/wdRouter",
"wdRouter@../../commons/wdRouter": "wdRouter@../commons/wdRouter"
},
"packages": {
"@ohos/axios@2.1.1": {
"name": "@ohos/axios",
"integrity": "sha512-EQax257+eKKT0Rx7h6N6xvmKbDRWDjCCWOP2vyyktySFwvjtypXuXmQKEvRjmAalR6cqf8mbfhWmpg0bD9OQ3w==",
"resolved": "https://repo.harmonyos.com/ohpm/@ohos/axios/-/axios-2.1.1.har",
"registryType": "ohpm"
},
"wdBean@../wdBean": {
"name": "wdbean",
"resolved": "../wdBean",
"registryType": "local"
},
"wdConstant@../../commons/wdConstant": {
"name": "wdconstant",
"resolved": "../../commons/wdConstant",
"registryType": "local"
},
"wdDetailPlayApi@../wdDetailPlayApi": {
"name": "wddetailplayapi",
"resolved": "../wdDetailPlayApi",
"registryType": "local",
"dependencies": {
"wdKit": "file:../../commons/wdKit",
"wdBean": "file:../../features/wdBean",
"wdRouter": "file:../../commons/wdRouter",
"wdNetwork": "file:../../commons/wdNetwork",
"wdPlayer": "file:../../features/wdPlayer"
}
},
"wdKit@../../commons/wdKit": {
"name": "wdkit",
"resolved": "../../commons/wdKit",
"registryType": "local"
},
"wdKit@../commons/wdKit": {
"name": "wdkit",
"resolved": "../commons/wdKit",
"registryType": "local"
},
"wdNetwork@../../commons/wdNetwork": {
"name": "wdnetwork",
"resolved": "../../commons/wdNetwork",
"registryType": "local",
"dependencies": {
"wdConstant": "file:../wdConstant",
"wdKit": "file:../wdKit",
"@ohos/axios": "^2.1.1"
}
},
"wdPlayer@../wdPlayer": {
"name": "wdplayer",
"resolved": "../wdPlayer",
"registryType": "local",
"dependencies": {
"wdKit": "file:../../commons/wdKit"
}
},
"wdRouter@../../commons/wdRouter": {
"name": "wdrouter",
"resolved": "../../commons/wdRouter",
"registryType": "local",
"dependencies": {
"wdKit": "file:../wdKit",
"wdBean": "file:../../features/wdBean"
}
},
"wdRouter@../commons/wdRouter": {
"name": "wdrouter",
"resolved": "../commons/wdRouter",
"registryType": "local",
"dependencies": {
"wdKit": "file:../wdKit",
"wdBean": "file:../../wdBean"
}
}
}
"specifiers": {},
"packages": {}
}
\ No newline at end of file
... ...
{
"meta": {
"stableOrder": true
},
"lockfileVersion": 3,
"lockfileVersion": 1,
"ATTENTION": "THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.",
"specifiers": {
"@ohos/axios@^2.1.1": "@ohos/axios@2.1.1",
"wdBean@../../../../features/wdBean": "wdBean@../wdBean",
"wdConstant@../../../../commons/wdConstant": "wdConstant@../../commons/wdConstant",
"wdDetailPlayApi@../../../wdDetailPlayApi": "wdDetailPlayApi@../wdDetailPlayApi",
"wdKit@../../../../commons/wdKit": "wdKit@../../commons/wdKit",
"wdKit@../../commons/wdKit": "wdKit@../commons/wdKit",
"wdNetwork@../../../../commons/wdNetwork": "wdNetwork@../../commons/wdNetwork",
"wdPlayer@../../../wdPlayer": "wdPlayer@../wdPlayer",
"wdRouter@../../../../commons/wdRouter": "wdRouter@../../commons/wdRouter",
"wdRouter@../../commons/wdRouter": "wdRouter@../commons/wdRouter"
},
"packages": {
"@ohos/axios@2.1.1": {
"name": "@ohos/axios",
"integrity": "sha512-EQax257+eKKT0Rx7h6N6xvmKbDRWDjCCWOP2vyyktySFwvjtypXuXmQKEvRjmAalR6cqf8mbfhWmpg0bD9OQ3w==",
"resolved": "https://repo.harmonyos.com/ohpm/@ohos/axios/-/axios-2.1.1.har",
"registryType": "ohpm"
},
"wdBean@../wdBean": {
"name": "wdbean",
"resolved": "../wdBean",
"registryType": "local"
},
"wdConstant@../../commons/wdConstant": {
"name": "wdconstant",
"resolved": "../../commons/wdConstant",
"registryType": "local"
},
"wdDetailPlayApi@../wdDetailPlayApi": {
"name": "wddetailplayapi",
"resolved": "../wdDetailPlayApi",
"registryType": "local",
"dependencies": {
"wdKit": "file:../../commons/wdKit",
"wdBean": "file:../../features/wdBean",
"wdRouter": "file:../../commons/wdRouter",
"wdNetwork": "file:../../commons/wdNetwork",
"wdPlayer": "file:../../features/wdPlayer"
}
},
"wdKit@../../commons/wdKit": {
"name": "wdkit",
"resolved": "../../commons/wdKit",
"registryType": "local"
},
"wdKit@../commons/wdKit": {
"name": "wdkit",
"resolved": "../commons/wdKit",
"registryType": "local"
},
"wdNetwork@../../commons/wdNetwork": {
"name": "wdnetwork",
"resolved": "../../commons/wdNetwork",
"registryType": "local",
"dependencies": {
"wdConstant": "file:../wdConstant",
"wdKit": "file:../wdKit",
"@ohos/axios": "^2.1.1"
}
},
"wdPlayer@../wdPlayer": {
"name": "wdplayer",
"resolved": "../wdPlayer",
"registryType": "local",
"dependencies": {
"wdKit": "file:../../commons/wdKit"
}
},
"wdRouter@../../commons/wdRouter": {
"name": "wdrouter",
"resolved": "../../commons/wdRouter",
"registryType": "local",
"dependencies": {
"wdKit": "file:../wdKit",
"wdBean": "file:../../features/wdBean"
}
},
"wdRouter@../commons/wdRouter": {
"name": "wdrouter",
"resolved": "../commons/wdRouter",
"registryType": "local",
"dependencies": {
"wdKit": "file:../wdKit",
"wdBean": "file:../../wdBean"
}
}
}
"specifiers": {},
"packages": {}
}
\ No newline at end of file
... ...
/node_modules
/oh_modules
/.preview
/build
/.cxx
/.test
\ No newline at end of file
... ...
export { add } from "./src/main/ets/utils/Calc"
\ No newline at end of file
... ...
{
"apiType": "stageMode",
"buildOption": {
"arkOptions": {
// "apPath": "./modules.ap" /* Profile used for profile-guided optimization (PGO), a compiler optimization technique to improve app runtime performance. */
}
},
"buildOptionSet": [
{
"name": "release",
"arkOptions": {
"obfuscation": {
"ruleOptions": {
"enable": true,
"files": [
"./obfuscation-rules.txt"
]
}
}
}
},
],
"targets": [
{
"name": "default"
}
]
}
\ No newline at end of file
... ...
import { hspTasks } from '@ohos/hvigor-ohos-plugin';
export default {
system: hspTasks, /* Built-in plugin of Hvigor. It cannot be modified. */
plugins:[] /* Custom plugin to extend the functionality of Hvigor. */
}
... ...
# Define project specific obfuscation rules here.
# You can include the obfuscation configuration files in the current module's build-profile.json5.
#
# For more details, see
# https://gitee.com/openharmony/arkcompiler_ets_frontend/blob/master/arkguard/README.md
# Obfuscation options:
# -disable-obfuscation: disable all obfuscations
# -enable-property-obfuscation: obfuscate the property names
# -enable-toplevel-obfuscation: obfuscate the names in the global scope
# -compact: remove unnecessary blank spaces and all line feeds
# -remove-log: remove all console.* statements
# -print-namecache: print the name cache that contains the mapping from the old names to new names
# -apply-namecache: reuse the given cache file
# Keep options:
# -keep-property-name: specifies property names that you want to keep
# -keep-global-name: specifies names that you want to keep in the global scope
\ No newline at end of file
... ...
{
"name": "wdlogin",
"version": "1.0.0",
"description": "Please describe the basic information.",
"main": "Index.ets",
"author": "",
"license": "Apache-2.0",
"dependencies": {
"wdConstant": "file:../../commons/wdConstant",
"wdKit": "file:../../commons/wdKit",
"wdWebComponent": "file:../../commons/wdWebComponent",
"wdBean": "file:../../features/wdBean",
"wdRouter": "file:../../commons/wdRouter",
"wdNetwork": "file:../../commons/wdNetwork"
}
}
\ No newline at end of file
... ...
@Entry
@Component
struct Index {
@State message: string = 'Hello World';
build() {
Row() {
Column() {
Text(this.message)
.fontSize(50)
.fontWeight(FontWeight.Bold)
}
.width('100%')
}
.height('100%')
}
}
\ No newline at end of file
... ...
export interface CheckVerifyBean{
temToken: string
jwtToken: string
}
\ No newline at end of file
... ...
@CustomDialog
export struct CustomProtocolDialog {
controller: CustomDialogController
cancel: () => void = () => {
}
confirm: () => void = () => {
}
build() {
Column() {
Text("温馨提示")
.fontColor("#222222")
.fontSize(18)
.width("100%")
.fontWeight(FontWeight.Bold)
.textAlign(TextAlign.Center)
.margin({ top: 20 })
Text() {
Span("为保障您的合法权益,请阅读并同意").fontSize(14).fontColor("#666666")
Span("《用户协议》").fontSize(14).fontColor("#ED2800")
Span("及").fontSize(14).fontColor("#666666")
Span("《隐私政策》").fontSize(14).fontColor("#ED2800")
Span("后进行登录").fontSize(14).fontColor("#666666")
}.margin({ top: 12, left: 16, right: 16 })
Divider().color("#999999").width("100%").margin({ top: 14 }).height('1vp')
Row() {
Text('放弃登录')
.fontSize(16)
.fontColor("#999999")
.layoutWeight(1)
.fontWeight(FontWeight.Medium)
.textAlign(TextAlign.Center)
.onClick(() => {
this.controller.close()
if (this.cancel) {
this.cancel()
}
})
.height('100%')
// Divider().color("#999999").height('100%').width('0.5vp')
Text('同意并登录')
.fontSize(16)
.fontColor("#ED2800")
.layoutWeight(1)
.fontWeight(FontWeight.Medium)
.textAlign(TextAlign.Center)
.border({
width: { left: 1 },
color: "#999999",
style: { left: BorderStyle.Solid }
})
.onClick(() => {
this.controller.close()
if (this.confirm) {
this.confirm()
}
})
.height('100%')
}.layoutWeight(1).justifyContent(FlexAlign.Center)
}.height(161).backgroundColor(Color.White).borderRadius(6).width('74%')
}
}
\ No newline at end of file
... ...
import { Logger } from 'wdKit/src/main/ets/utils/Logger'
import { LoginInputComponent } from './LoginInputComponent'
import { LoginViewModel } from './LoginViewModel'
import router from '@ohos.router'
import promptAction from '@ohos.promptAction'
const TAG = 'ForgetPasswordPage'
/**
* 找回密码页面
* */
@Entry
@Component
struct ForgetPasswordPage {
@State phoneContent: string = ''
@State codeContent: string = ''
@State isSubmit: boolean = false //是否可以提交 默认不可以
loginViewModel: LoginViewModel = new LoginViewModel()
@State @Watch('onCodeSend') isCodeSend: boolean = false //验证码点击发送事件
onCodeSend() {
if (this.isCodeSend) {
this.sendVerifyCode()
}
}
build() {
Column() {
Image($r('app.media.login_back_icon')).width(24).height(24).margin({ left: 15, top: 10 }).onClick(() => {
router.back()
})
Text('找回密码').fontSize(22).fontColor('#333333').fontWeight(FontWeight.Bold).margin({ left: 25, top: 112 })
LoginInputComponent({
phoneContent: $phoneContent,
codeContent: $codeContent,
isSubmit: $isSubmit,
isCodeSend: $isCodeSend
})
Row() {
Button("确认", { type: ButtonType.Normal })
.layoutWeight(1)
.borderRadius(4)
.fontSize(16)
.fontWeight(FontWeight.Medium)
.margin({ top: 26 })
.height(44)
.backgroundColor("#ED2800")
.opacity(this.isSubmit ? 1 : 0.6)
.onClick(() => {
this.checkVerifyCode()
})
}.padding({ left: 25, right: 25 }).width('100%')
}.width('100%').height('100%').alignItems(HorizontalAlign.Start)
}
aboutToAppear() {
if (this.isCodeSend) {
this.sendVerifyCode()
}
}
//发送验证码
sendVerifyCode() {
if (this.isEmpty(this.phoneContent)) {
return
}
this.loginViewModel.sendVerifyCode(this.phoneContent).then((verifyCode) => {
promptAction.showToast({ message: "验证码已发送成功" })
Logger.debug(TAG, "sendVerifyCode: " + verifyCode)
})
}
//校验验证码
checkVerifyCode() {
if (!this.isSubmit) {
return
}
if (this.isEmpty(this.phoneContent)) {
return
}
if (this.isEmpty(this.codeContent)) {
return
}
this.loginViewModel.checkVerifyCode(this.phoneContent, this.codeContent).then(() => {
//todo 跳转密码设置页面
promptAction.showToast({message:"校验成功,准备跳转设置页面"})
Logger.debug(TAG,"校验成功")
}).catch((error:string)=>{
promptAction.showToast({message:error})
Logger.debug(TAG,"校验失败")
})
}
isEmpty(obj: undefined|null|string): boolean {
return (obj == undefined || obj == null || obj == '');
}
}
\ No newline at end of file
... ...
export interface LoginBean {
// {"code":"0","data":{"firstMark":1,"id":569350079889669,"jwtToken":"eyJhbGciOiJIUzI1NiIsImtpZCI6ImQ4WkI2QkhxSEZrdjJ2U25BNlRwZEdKRjBHcjItVzBvS2FaYzdLOUUycmcifQ.eyJpc3MiOiJwZW9wbGVzLWRhaWx5LWZvdXJhIiwic3ViIjoicGVvcGxlcy1kYWlseS1mb3VyYSIsImV4cCI6MTcxMDY0NzE0MiwidXNlcklkIjo1NjkzNTAwNzk4ODk2NjksInVzZXJWZXJzaW9uIjoiNTY5MzUwMDc5ODg5NjY5XzAiLCJ1c2VyTmFtZSI6IiVFNCVCQSVCQSVFNiVCMCU5MSVFNiU5NyVBNSVFNiU4QSVBNSVFNyVCRCU5MSVFNSU4RiU4QjJrRDJ4VyIsInVzZXJUeXBlIjoxLCJjcmVhdG9ySWQiOm51bGx9.1M0E_6V60opL7AxamGzINpieTHP11fRbiXKDPc-ywWg","longTimeNoLoginMark":0,"refreshToken":"83fe2f1a-77af-4f73-8490-1cebed037f73","status":1,"userName":"人民日报网友2kD2xW","userType":1},"message":"Success","success":true,"timestamp":1710467142214}
firstMark: number
id: number
jwtToken: string
longTimeNoLoginMark: number
refreshToken: string
status: number
userName: string
userType: number
temToken: string
}
\ No newline at end of file
... ...
import { Logger } from 'wdKit'
@Component
export struct LoginInputComponent {
@State timeCount: number = 60
@Link phoneContent: string
@Link codeContent: string
@State codeBtnState: boolean = false //发送验证码控件是否可以 默认不可用
@Link isCodeSend: boolean //验证码控件是否点击 默认没有 发送接口
@Link isSubmit: boolean //是否可以提交
build() {
Column() {
this.addCodeLayout()
}.width('100%').padding({ left: 25, right: 25 })
}
@Builder
addCodeLayout() {
TextInput({ placeholder: "请输入手机号" })
.fontSize(16)
.height(48)
.margin({ top: 36 })
.backgroundColor("#F5F5F5")
.borderRadius(4)
.type(InputType.PhoneNumber)
.onChange((content) => {
this.phoneContent = content
this.isSubmit = (this.phoneContent.length >= 11 && this.codeContent.length >= 6)
if (content.length >= 11) {
this.codeBtnState = true
} else {
this.codeBtnState = false
}
})
Row() {
TextInput({ placeholder: "验证码" })
.layoutWeight(1)
.fontSize(16)
.height(48)
.type(InputType.Number)
.fontColor("#222222")
.backgroundColor("#00000000")
.borderRadius({ topLeft: 4, bottomLeft: 4 })
.backgroundImage($r('app.media.login_code_bg_one'), ImageRepeat.NoRepeat)
.backgroundImageSize(ImageSize.Contain)
.onChange((value) => {
this.codeContent = value
this.isSubmit = (this.phoneContent.length >= 11 && this.codeContent.length >= 6)
})
Text(this.isCodeSend ? this.timeCount + "s" : "发送验证码")
.backgroundImage($r('app.media.login_code_bg'), ImageRepeat.NoRepeat)
.backgroundImageSize(ImageSize.Cover)
.fontColor('#ED2800')
.width(110)
.fontSize(14)
.fontWeight(this.codeBtnState ? FontWeight.Bold : FontWeight.Normal)
.height(48)
.enabled(this.codeBtnState)// .align(Alignment.End)
.textAlign(TextAlign.Center)
.onClick(() => {
if (this.phoneContent.length < 11) {
return
}
this.isCodeSend = true
let time = setInterval(() => {
Logger.debug("倒计时:" + this.timeCount)
this.timeCount--
if (this.timeCount < 1) {
this.isCodeSend = false
this.timeCount = 60
clearInterval(time)
}
}, 1000)
})
}.margin({ top: 12 }).height(48).alignItems(VerticalAlign.Center).justifyContent(FlexAlign.Start)
}
}
\ No newline at end of file
... ...
import HashMap from '@ohos.util.HashMap';
import { HttpUrlUtils, ResponseDTO } from 'wdNetwork';
import { Logger } from 'wdKit';
import { HttpRequest } from 'wdNetwork/src/main/ets/http/HttpRequest';
import { LoginBean } from './LoginBean';
import { CheckVerifyBean } from './CheckVerifyBean';
const TAG = 'LoginModel'
export class LoginModel {
//获取验证码
sendVerifyCode(number: string) {
let bean: Record<string, string> = {};
bean['phoneNum'] = number
let headers: HashMap<string, string> = HttpUrlUtils.getCommonHeaders();
return new Promise<string>((success, fail) => {
HttpRequest.post<ResponseDTO<string>>(HttpUrlUtils.getVerifyCodeUrl(), bean, headers).then((data: ResponseDTO<string>) => {
if (!data || !data.data) {
fail("数据为空")
return
}
if (data.code != 0) {
fail(data.message)
return
}
success(data.data)
}, (error: Error) => {
fail(error.message)
Logger.debug("LoginViewModel:error ", error.toString())
})
})
}
//{"phone":"13625644528","loginType":2,"deviceId":"60da5af6-9c59-3566-8622-8c6c00710994","verificationCode":"644528"}
appLogin(phone: string, loginType: number, verificationCode: string) {
let headers: HashMap<string, string> = HttpUrlUtils.getCommonHeaders();
let bean: Record<string, Object> = {};
bean['phone'] = phone
bean['loginType'] = loginType
bean['deviceId'] = '60da5af6-9c59-3566-8622-8c6c00710994'
bean['verificationCode'] = verificationCode
return new Promise<LoginBean>((success, fail) => {
HttpRequest.post<ResponseDTO<LoginBean>>(HttpUrlUtils.getAppLoginUrl(), bean, headers).then((data: ResponseDTO<LoginBean>) => {
Logger.debug("LoginViewModel:success2 ", data.message)
if (!data || !data.data) {
fail("数据为空")
return
}
if (data.code != 0) {
fail(data.message)
return
}
success(data.data)
}, (error: Error) => {
fail(error.message)
Logger.debug("LoginViewModel:error2 ", error.toString())
})
})
}
// {"password":"523acd319228efde34e8a30268ee8ca5e4fc421d72affa531676e1765940d22c","phone":"13625644528","loginType":0,"oldPassword":"BA5FD74F827AF9B271FE17CADC489C36","deviceId":"60da5af6-9c59-3566-8622-8c6c00710994"}
appLoginByPassword(phone: string, loginType: number, password: string, oldPassword: string) {
let headers: HashMap<string, string> = HttpUrlUtils.getCommonHeaders();
let bean: Record<string, string | number> = {};
bean['phone'] = phone
bean['loginType'] = loginType
bean['deviceId'] = '60da5af6-9c59-3566-8622-8c6c00710994'
bean['password'] = password
bean['oldPassword'] = oldPassword
return new Promise<LoginBean>((success, fail) => {
HttpRequest.post<ResponseDTO<LoginBean>>(HttpUrlUtils.getAppLoginUrl(), bean, headers).then((data: ResponseDTO<LoginBean>) => {
Logger.debug("LoginViewModel:success2 ", data.message)
if (!data || !data.data) {
fail("数据为空")
return
}
if (data.code != 0) {
fail(data.message)
return
}
success(data.data)
}, (error: Error) => {
Logger.debug("LoginViewModel:error2 ", error.toString())
fail(error.message)
})
})
}
//忘记密码 校验验证码 {"verifyCode":"644528","phone":"13625644528"} 去除头部cookie 可以正常访问
checkVerifyCode(phone: string, verifyCode: string) {
let bean: Record<string, Object> = {};
bean['verifyCode'] = verifyCode
bean['phone'] = phone
let headers: HashMap<string, string> = HttpUrlUtils.getCommonHeaders();
return new Promise<CheckVerifyBean>((success, fail) => {
HttpRequest.post<ResponseDTO<CheckVerifyBean>>(HttpUrlUtils.getCheckVerifyCodeUrl(), bean, headers).then((data: ResponseDTO<CheckVerifyBean>) => {
Logger.debug("LoginViewModel:success2 ", data.message)
if (!data || !data.data) {
fail("数据为空")
return
}
if (data.code != 0) {
fail(data.message)
return
}
success(data.data)
}, (error: Error) => {
Logger.debug("LoginViewModel:error2 ", error.toString())
fail(error.message)
})
})
}
}
... ...
import { Logger } from 'wdKit/src/main/ets/utils/Logger'
import { CustomProtocolDialog } from './CustomProtocolDialog'
import router from '@ohos.router'
import { LoginViewModel } from './LoginViewModel'
import { LoginInputComponent } from './LoginInputComponent'
import promptAction from '@ohos.promptAction'
import { SPHelper } from 'wdKit'
import { WDRouterPage } from 'wdRouter/src/main/ets/router/WDRouterPage';
import { WDRouterRule } from 'wdRouter/src/main/ets/router/WDRouterRule';
@Extend(Row)
function otherStyle() {
.backgroundImageSize(ImageSize.Cover)
.layoutWeight(1)
.height("100%")
.justifyContent(FlexAlign.Center)
.alignItems(VerticalAlign.Center)
}
function isEmpty(obj: undefined | string | null): boolean {
return (obj == undefined || obj == null || obj == '');
}
const TAG = "LoginPage"
@Preview
@Entry
@Component
struct LoginPage {
@State codeBtnState: boolean = false
@State timeCount: number = 60
phoneController: TextInputController = new TextInputController()
codeSendText = ""
@State @Watch('onCodeSend') isCodeSend: boolean = false //验证码是否发送
@State phoneContent: string = "" //手机号
@State codeContent: string = "" //验证码
@State protocolState: boolean = false //协议勾选状态
accountContent = '' //账号
passwordContent = ''
@State isSubmit: boolean = false
@State checkCodePage: boolean = true //判断是否是验证码页面 默认验证码登录
@State passwordSwitch: boolean = true //密码显示
// @State isPasswordSubmit: boolean = false //账户密码状态 是否出发登录
dialogController: CustomDialogController = new CustomDialogController({
builder: CustomProtocolDialog({
cancel: () => {
},
confirm: () => {
this.requestLogin()
}
}),
customStyle: true,
alignment:DialogAlignment.Center
})
loginViewModel = new LoginViewModel()
onCodeSend() {
Logger.debug(TAG, "isCodeSend:" + this.isCodeSend + "")
if (this.isCodeSend) {
this.sendVerifyCode()
}
}
aboutToAppear() {
Logger.debug(TAG, "aboutToAppear:" + this.isCodeSend + "")
}
onPageShow() {
Logger.debug(TAG, "onPageShow:" + this.isCodeSend + "")
}
build() {
RelativeContainer() {
//注册内容
Column() {
Image($r("app.media.login_logo"))
.width(120)
.height(66)
.margin({ top: 78 })
.align(Alignment.Center)
if (this.checkCodePage) {
LoginInputComponent({
phoneContent: $phoneContent,
codeContent: $codeContent,
isSubmit: $isSubmit,
isCodeSend: $isCodeSend
})
} else {
this.addPassword()
}
Row() {
// Checkbox().selectedColor("#ED2800").onChange((value) => {
// this.protocolState = value
// })
Image(this.protocolState ? $r('app.media.login_checkbox_select') : $r('app.media.login_checkbox_unselected'))
.width(15)
.height(15)
.onClick(() => {
this.protocolState = !this.protocolState
})
Text() {
Span("我已阅读并同意").fontColor("#999999").fontSize(12)
Span("《用户协议》").fontColor("#ED2800").fontSize(12).onClick(() => {
//todo 协议
})
Span("及").fontColor("#999999").fontSize(12)
Span("《隐私政策》").fontColor("#ED2800").fontSize(12).onClick(() => {
//todo 协议
})
}
}.margin({ top: 28 }).alignItems(VerticalAlign.Center)
Row() {
Button("登录", { type: ButtonType.Normal })
.borderRadius(4)
.fontSize(20)
.fontWeight(FontWeight.Medium)
.margin({ top: 20 })
.height(44)
.opacity(this.isSubmit ? 1 : 0.6)
.enabled(this.isSubmit ? true : false)
.width("100%")
.backgroundColor("#ED2800")
.onClick(() => {
//todo 登录
this.loginSubmit()
})
}.padding({ left: 25, right: 25 }).width('100%')
if (!this.checkCodePage) {
Text('忘记密码').fontColor('#666666').fontSize(14).margin({ top: 16 })
.onClick(() => {
// router.pushUrl({ url: 'pages/login/ForgetPasswordPage' })
WDRouterRule.jumpWithPage(WDRouterPage.forgetPasswordPage)
})
}
}.width("100%")
.alignRules({
top: { anchor: "__container__", align: VerticalAlign.Top },
}).id("register")
//其他登录方式
Column() {
this.addOtherLogin()
}.width('100%')
.alignRules({
bottom: { anchor: "__container__", align: VerticalAlign.Bottom },
}).id("other")
//关闭按钮
Image($r('app.media.login_closed'))
.width(24)
.height(24)
.margin({ top: 10, right: 15 })
.alignRules({
top: { anchor: "__container__", align: VerticalAlign.Top },
right: { anchor: "__container__", align: HorizontalAlign.End }
})
.onClick(() => {
router.back()
})
.id('id_close')
}.width('100%').height('100%')
}
@Builder
addPassword() {
Column() {
TextInput({ placeholder: "请输入账号", controller: this.phoneController })
.fontSize(16)
.height(48)
.backgroundColor("#F5F5F5")
.borderRadius(4)
.type(InputType.PhoneNumber)
.onChange((content) => {
this.accountContent = content
this.isSubmit = (this.accountContent.length >= 11 && this.passwordContent.length >= 6)
})
RelativeContainer() {
if (this.passwordSwitch) {
this.addPasswordInputLayout()
} else {
this.addPasswordInputLayout()
}
Image(this.passwordSwitch ? $r('app.media.login_password_off') : $r('app.media.login_password_on'))
.onClick(() => {
this.passwordSwitch = !this.passwordSwitch
})
.width(24)
.height(24)
.alignRules({
right: { anchor: "__container__", align: HorizontalAlign.End },
center: { anchor: '__container__', align: VerticalAlign.Center }
})
.margin({ right: 12 })
.id("password_icon")
}.margin({ top: 12 })
.height(48)
.width('100%')
}.padding({ left: 25, right: 25 }).width('100%').margin({ top: 36 })
}
@Builder
addPasswordInputLayout() {
TextInput({ placeholder: "请输入密码", text: this.passwordContent })
.layoutWeight(1)
.fontSize(16)
.height(48)
.fontColor("#222222")
.backgroundColor("#F5F5F5")
.type(this.passwordSwitch ? InputType.Password : InputType.Normal)
.showPasswordIcon(false)
.borderRadius({ topLeft: 4, bottomLeft: 4 })
.alignRules({
// top:{anchor:"__container__",align:VerticalAlign.Top} ,
left: { anchor: "__container__", align: HorizontalAlign.Start },
})
.onChange((value) => {
// Logger.debug(TAG, "onChange" + value + "/" + this.passwordContent)
this.passwordContent = value
this.isSubmit = (this.accountContent.length >= 11 && this.passwordContent.length >= 6)
})
.id("password")
}
@Builder
addOtherLogin() {
Column() {
Row() {
Divider().layoutWeight(1).margin({ left: 25 })
Text('其他登录方式').margin({ left: 16, right: 16 }).fontSize(14).fontColor("#666666")
Divider().layoutWeight(1).margin({ right: 25 })
}.width('100%')
Row() {
Row() {
Image($r('app.media.login_wx'))
.width(20).height(20)
}.backgroundImage($r('app.media.login_other_left'), ImageRepeat.NoRepeat)
.otherStyle()
Row() {
Image($r('app.media.login_qq')).size({ width: 20, height: 20 })
}.backgroundImage($r('app.media.login_other_middle'), ImageRepeat.NoRepeat)
.otherStyle()
Row() {
Image($r('app.media.login_wb')).size({ width: 20, height: 20 })
}.backgroundImage($r('app.media.login_other_middle'), ImageRepeat.NoRepeat)
.otherStyle()
Row() {
Image(this.checkCodePage ? $r('app.media.login_qt') : $r('app.media.login_other_password'))
.size({ width: 20, height: 20 })
}.backgroundImage($r('app.media.login_other_right'), ImageRepeat.NoRepeat)
.otherStyle().onClick(() => {
this.checkCodePage = !this.checkCodePage;
this.passwordContent = ''
this.passwordSwitch = true
this.isSubmit = false
})
}.height(36)
.width('100%')
.padding({ left: 25, right: 25 })
// .justifyContent(FlexAlign.SpaceEvenly)
.margin({ top: 24 })
}.width('100%').margin({ bottom: 40 })
}
//发送验证码
sendVerifyCode() {
this.loginViewModel.sendVerifyCode(this.phoneContent).then((verifyCode) => {
promptAction.showToast({ message: "验证码已发送成功" })
Logger.debug(TAG, "sendVerifyCode: " + verifyCode)
}).catch((message:string)=>{
Logger.debug(TAG, "sendVerifyCode: " + message)
})
}
requestLogin() {
Logger.debug('LoginViewModel', "requestLogin")
if (this.checkCodePage) {
this.loginViewModel.appLogin(this.phoneContent, 2, this.codeContent).then((data) => {
Logger.debug(TAG, "requestLogin: " + data.jwtToken)
let dd = SPHelper.default.get('userName', 'dd').then((value) => {
Logger.debug(TAG, 'SP:' + value)
})
router.back()
})
} else {
this.loginViewModel.appLoginByPassword(this.accountContent, 0, this.passwordContent, "").then((data) => {
Logger.debug(TAG, "requestLogin: " + data.jwtToken)
let dd = SPHelper.default.get('userName', 'dd').then((value) => {
Logger.debug(TAG, 'SP:' + value)
})
promptAction.showToast({ message: '登录成功' })
router.back()
}).catch((value: string) => {
promptAction.showToast({ message: value })
})
}
}
//登录
loginSubmit() {
Logger.debug(TAG, "loginSubmit " + this.checkCodePage)
//todo 判断是验证码登录还是密码登录
if (this.checkCodePage) {
if (isEmpty(this.phoneContent)) {
Logger.debug(TAG, "手机号为空")
return
}
if (isEmpty(this.codeContent)) {
Logger.debug(TAG, "验证码为空")
return
}
} else {
if (isEmpty(this.accountContent)) {
Logger.debug(TAG, "账号为空")
return
}
if (isEmpty(this.passwordContent)) {
Logger.debug(TAG, "密码为空")
return
}
}
if (this.protocolState) {
this.requestLogin()
} else {
this.dialogController.open()
}
}
}
\ No newline at end of file
... ...
import { Logger } from 'wdKit/src/main/ets/utils/Logger'
import { LoginModel } from './LoginModel'
import { LoginBean } from './LoginBean'
import { SPHelper } from 'wdKit'
import { CheckVerifyBean } from './CheckVerifyBean'
import cryptoFramework from '@ohos.security.cryptoFramework'
import buffer from '@ohos.buffer'
import {
SpConstants
} from '../../../../../../../commons/wdNetwork/oh_modules/wdConstant/src/main/ets/constants/SpConstants'
import { HttpUrlUtils } from 'wdNetwork/src/main/ets/http/HttpUrlUtils'
const TAG = "LoginViewModel"
export class LoginViewModel {
loginModel: LoginModel
constructor() {
this.loginModel = new LoginModel()
}
//发送验证码
sendVerifyCode(number: string) {
return new Promise<string>((success, fail) => {
this.loginModel.sendVerifyCode(number).then((data) => {
success(data)
}).catch((message: string) => {
fail(message)
})
})
}
appLogin(phone: string, loginType: number, verificationCode: string) {
return new Promise<LoginBean>((success, fail) => {
this.loginModel.appLogin(phone, loginType, verificationCode).then((data: LoginBean) => {
SPHelper.default.save(SpConstants.USER_FIRST_MARK, data.firstMark)
SPHelper.default.save(SpConstants.USER_ID, data.id)
SPHelper.default.save(SpConstants.USER_JWT_TOKEN, data.jwtToken)
SPHelper.default.save(SpConstants.USER_LONG_TIME_NO_LOGIN_MARK, data.longTimeNoLoginMark)
SPHelper.default.save(SpConstants.USER_REFRESH_TOKEN, data.refreshToken)
SPHelper.default.save(SpConstants.USER_STATUS, data.status)
SPHelper.default.save(SpConstants.USER_Type, data.userType)
SPHelper.default.save(SpConstants.USER_NAME, data.userName)
HttpUrlUtils.setUserId(data.id+"")
HttpUrlUtils.setUserType(data.userType+"")
HttpUrlUtils.setUserToken(data.jwtToken)
success(data)
}).catch(() => {
fail()
})
})
}
async appLoginByPassword(phone: string, loginType: number, password: string, oldPassword: string) {
return new Promise<LoginBean>(async (success, fail) => {
let passwordNew = await this.doMd(password)
Logger.debug(TAG, "PASSWORD:" + passwordNew)
this.loginModel.appLoginByPassword(phone, loginType, passwordNew, oldPassword).then((data: LoginBean) => {
SPHelper.default.save(SpConstants.USER_FIRST_MARK, data.firstMark)
SPHelper.default.save(SpConstants.USER_ID, data.id)
SPHelper.default.save(SpConstants.USER_JWT_TOKEN, data.jwtToken)
SPHelper.default.save(SpConstants.USER_LONG_TIME_NO_LOGIN_MARK, data.longTimeNoLoginMark)
SPHelper.default.save(SpConstants.USER_REFRESH_TOKEN, data.refreshToken)
SPHelper.default.save(SpConstants.USER_STATUS, data.status)
SPHelper.default.save(SpConstants.USER_Type, data.userType)
SPHelper.default.save(SpConstants.USER_NAME, data.userName)
HttpUrlUtils.setUserId(data.id+"")
HttpUrlUtils.setUserType(data.userType+"")
HttpUrlUtils.setUserToken(data.jwtToken)
success(data)
}).catch((value: string) => {
fail(value)
})
})
}
//{"code":"0","data":{"tempToken":"eyJhbGciOiJIUzI1NiIsImtpZCI6ImQ4WkI2QkhxSEZrdjJ2U25BNlRwZEdKRjBHcjItVzBvS2FaYzdLOUUycmcifQ.eyJpc3MiOiJwZW9wbGVzLWRhaWx5LWZvdXJhIiwic3ViIjoicGVvcGxlcy1kYWlseS1mb3VyYSIsImV4cCI6MTcxMDQ2ODE5NCwidXNlcklkIjpudWxsLCJ1c2VyVmVyc2lvbiI6Im51bGxfbnVsbCIsInVzZXJOYW1lIjpudWxsLCJ1c2VyVHlwZSI6bnVsbCwiY3JlYXRvcklkIjpudWxsLCJ1c2VySWRaaCI6bnVsbH0.R5gv44Gyni3QTxtWvSxYn0eMuUD5_bI1hh9TaThq25g","jwtToken":"eyJhbGciOiJIUzI1NiIsImtpZCI6ImQ4WkI2QkhxSEZrdjJ2U25BNlRwZEdKRjBHcjItVzBvS2FaYzdLOUUycmcifQ.eyJpc3MiOiJwZW9wbGVzLWRhaWx5LWZvdXJhIiwic3ViIjoicGVvcGxlcy1kYWlseS1mb3VyYSIsImV4cCI6MTcxMDY0NzU5NCwidXNlcklkIjo1NjkzNTAwNzk4ODk2NjksInVzZXJWZXJzaW9uIjoiNTY5MzUwMDc5ODg5NjY5XzAiLCJ1c2VyTmFtZSI6IiVFNCVCQSVCQSVFNiVCMCU5MSVFNiU5NyVBNSVFNiU4QSVBNSVFNyVCRCU5MSVFNSU4RiU4QjJrRDJ4VyIsInVzZXJUeXBlIjoxLCJjcmVhdG9ySWQiOm51bGwsInVzZXJJZFpoIjpudWxsfQ.Ai19vg8-rhJNXt2nwFTfir7s01eLfTtOCKcptIpeyG0"},"message":"Success","success":true,"timestamp":1710467595186}
checkVerifyCode(phone: string, verifyCode: string) {
return new Promise<CheckVerifyBean>((success, reject) => {
this.loginModel.checkVerifyCode(phone, verifyCode).then((data: CheckVerifyBean) => {
//todo 保存数据
SPHelper.default.save(SpConstants.USER_TEMP_TOKEN, data.temToken)
SPHelper.default.save(SpConstants.USER_JWT_TOKEN, data.jwtToken)
success(data)
}, (value: string) => {
reject(value)
})
})
}
async doMd(content: string): Promise<string> {
let mdAlgName = 'SHA256'; // 摘要算法名
let message = content; // 待摘要的数据
let md = cryptoFramework.createMd(mdAlgName);
// 数据量较少时,可以只做一次update,将数据全部传入,接口未对入参长度做限制
await md.update({ data: new Uint8Array(buffer.from(message, 'utf-8').buffer) });
let mdResult = await md.digest();
console.info('Md result:' + mdResult.data);
return this.byte2Hex(mdResult.data)
}
byte2Hex(data: Uint8Array): string {
let bufferStr = ''
for (let i = 0; i < data.length; i++) {
let temp = data[i].toString(16)
if (temp.length == 1) {
temp = "0"+temp
}
bufferStr += temp
}
console.info('Md result2:' + bufferStr);
return bufferStr;
}
}
\ No newline at end of file
... ...
export function add(a:number, b:number) {
return a + b;
}
\ No newline at end of file
... ...
{
"module": {
"name": "wdLogin",
"type": "shared",
"description": "$string:shared_desc",
"deviceTypes": [
"phone",
"tablet",
"2in1"
],
"deliveryWithInstall": true,
"pages": "$profile:main_pages"
}
}
\ No newline at end of file
... ...
{
"color": [
{
"name": "white",
"value": "#FFFFFF"
}
]
}
\ No newline at end of file
... ...
{
"string": [
{
"name": "shared_desc",
"value": "description"
}
]
}
\ No newline at end of file
... ...
{
"src": [
"pages/Index",
"pages/login/LoginPage",
"pages/login/ForgetPasswordPage"
]
}
... ...
import localUnitTest from './LocalUnit.test';
export default function testsuite() {
localUnitTest();
}
\ No newline at end of file
... ...
import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium';
export default function localUnitTest() {
describe('localUnitTest',() => {
// Defines a test suite. Two parameters are supported: test suite name and test suite function.
beforeAll(() => {
// Presets an action, which is performed only once before all test cases of the test suite start.
// This API supports only one parameter: preset action function.
});
beforeEach(() => {
// Presets an action, which is performed before each unit test case starts.
// The number of execution times is the same as the number of test cases defined by **it**.
// This API supports only one parameter: preset action function.
});
afterEach(() => {
// Presets a clear action, which is performed after each unit test case ends.
// The number of execution times is the same as the number of test cases defined by **it**.
// This API supports only one parameter: clear action function.
});
afterAll(() => {
// Presets a clear action, which is performed after all test cases of the test suite end.
// This API supports only one parameter: clear action function.
});
it('assertContain', 0, () => {
// Defines a test case. This API supports three parameters: test case name, filter parameter, and test case function.
let a = 'abc';
let b = 'b';
// Defines a variety of assertion methods, which are used to declare expected boolean conditions.
expect(a).assertContain(b);
expect(a).assertEqual(a);
});
});
}
\ No newline at end of file
... ...
{
"meta": {
"stableOrder": true
},
"lockfileVersion": 3,
"lockfileVersion": 1,
"ATTENTION": "THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.",
"specifiers": {
"wdKit@../../../../commons/wdKit": "wdKit@../../commons/wdKit"
},
"packages": {
"wdKit@../../commons/wdKit": {
"name": "wdkit",
"resolved": "../../commons/wdKit",
"registryType": "local"
}
}
"specifiers": {},
"packages": {}
}
\ No newline at end of file
... ...
{
"hvigorVersion": "file:../dependencies/hvigor-4.1.1.tgz",
"hvigorVersion": "file:../dependencies/hvigor-3.0.10-s.tgz",
"dependencies": {
"@ohos/hvigor-ohos-plugin": "file:../dependencies/hvigor-ohos-plugin-4.1.1.tgz"
"@ohos/hvigor-ohos-plugin": "file:../dependencies/hvigor-ohos-plugin-3.0.10-s.tgz",
"rollup": "file:../dependencies/rollup.tgz",
},
"execution": {
// "analyze": "default", /* Define the build analyze mode. Value: [ "default" | "verbose" | false ]. Default: "default" */
// "daemon": true, /* Enable daemon compilation. Value: [ true | false ]. Default: true */
// "incremental": true, /* Enable incremental compilation. Value: [ true | false ]. Default: true */
// "parallel": true, /* Enable parallel compilation. Value: [ true | false ]. Default: true */
// "typeCheck": false, /* Enable typeCheck. Value: [ true | false ]. Default: false */
// "daemon": true, /* Enable daemon compilation. Default: true */
// "incremental": true, /* Enable incremental compilation. Default: true */
// "parallel": true, /* Enable parallel compilation. Default: true */
// "typeCheck": false, /* Enable typeCheck. Default: false */
},
"logging": {
// "level": "info" /* Define the log level. Value: [ "debug" | "info" | "warn" | "error" ]. Default: "info" */
},
"debugging": {
// "stacktrace": false /* Disable stacktrace compilation. Value: [ true | false ]. Default: false */
},
"nodeOptions": {
// "maxOldSpaceSize": 4096 /* Enable nodeOptions maxOldSpaceSize compilation. Unit M. Used for the daemon process */
// "stacktrace": false /* Disable stacktrace compilation. Default: false */
}
}
... ...
This diff could not be displayed because it is too large.
{
"meta": {
"stableOrder": true
},
"lockfileVersion": 3,
"lockfileVersion": 1,
"ATTENTION": "THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.",
"specifiers": {
"@ohos/hypium@1.0.16": "@ohos/hypium@1.0.16"
},
"packages": {
"@ohos/hypium@1.0.16": {
"name": "@ohos/hypium",
"integrity": "sha512-PC3jpwKERg68V+4dmKU+SLjNps9i5JcQH57rQriaTsh62NBgVZs4SceMmNOtrIOyldbEJ5mXSwoZwiG/nkRmTw==",
"resolved": "https://repo.harmonyos.com/ohpm/@ohos/hypium/-/hypium-1.0.16.har",
"registryType": "ohpm"
"integrity": "sha512-PC3jpwKERg68V+4dmKU+SLjNps9i5JcQH57rQriaTsh62NBgVZs4SceMmNOtrIOyldbEJ5mXSwoZwiG/nkRmTw=="
}
}
}
\ No newline at end of file
... ...
{
"meta": {
"stableOrder": true
},
"lockfileVersion": 3,
"lockfileVersion": 1,
"ATTENTION": "THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.",
"specifiers": {
"@ohos/axios@^2.1.1": "@ohos/axios@2.1.1",
"wdBean@../../../../features/wdBean": "wdBean@../../features/wdBean",
"wdBean@../../features/wdBean": "wdBean@../../features/wdBean",
"wdComponent@../../../../features/wdComponent": "wdComponent@../../features/wdComponent",
"wdComponent@../../features/wdComponent": "wdComponent@../../features/wdComponent",
"wdConstant@../../../../commons/wdConstant": "wdConstant@../../commons/wdConstant",
"wdConstant@../../commons/wdConstant": "wdConstant@../../commons/wdConstant",
"wdJsBridge@../../../wdJsBridge": "wdJsBridge@../../commons/wdJsBridge",
"wdKit@../../../../commons/wdKit": "wdKit@../../commons/wdKit",
"wdKit@../../commons/wdKit": "wdKit@../../commons/wdKit",
"wdNetwork@../../../../commons/wdNetwork": "wdNetwork@../../commons/wdNetwork",
"wdNetwork@../../commons/wdNetwork": "wdNetwork@../../commons/wdNetwork",
"wdRouter@../../../../commons/wdRouter": "wdRouter@../../commons/wdRouter",
"wdRouter@../../commons/wdRouter": "wdRouter@../../commons/wdRouter",
"wdWebComponent@../../../../commons/wdWebComponent": "wdWebComponent@../../commons/wdWebComponent",
"wdWebComponent@../../commons/wdWebComponent": "wdWebComponent@../../commons/wdWebComponent"
},
"packages": {
"@ohos/axios@2.1.1": {
"name": "@ohos/axios",
"integrity": "sha512-EQax257+eKKT0Rx7h6N6xvmKbDRWDjCCWOP2vyyktySFwvjtypXuXmQKEvRjmAalR6cqf8mbfhWmpg0bD9OQ3w==",
"resolved": "https://repo.harmonyos.com/ohpm/@ohos/axios/-/axios-2.1.1.har",
"registryType": "ohpm"
},
"wdBean@../../features/wdBean": {
"name": "wdbean",
"resolved": "../../features/wdBean",
"registryType": "local"
},
"wdComponent@../../features/wdComponent": {
"name": "wdcomponent",
"resolved": "../../features/wdComponent",
"registryType": "local",
"dependencies": {
"wdConstant": "file:../../commons/wdConstant",
"wdKit": "file:../../commons/wdKit",
"wdWebComponent": "file:../../commons/wdWebComponent",
"wdBean": "file:../../features/wdBean",
"wdRouter": "file:../../commons/wdRouter",
"wdNetwork": "file:../../commons/wdNetwork"
}
},
"wdConstant@../../commons/wdConstant": {
"name": "wdconstant",
"resolved": "../../commons/wdConstant",
"registryType": "local"
},
"wdJsBridge@../../commons/wdJsBridge": {
"name": "wdjsbridge",
"resolved": "../../commons/wdJsBridge",
"registryType": "local"
},
"wdKit@../../commons/wdKit": {
"name": "wdkit",
"resolved": "../../commons/wdKit",
"registryType": "local"
},
"wdNetwork@../../commons/wdNetwork": {
"name": "wdnetwork",
"resolved": "../../commons/wdNetwork",
"registryType": "local",
"dependencies": {
"wdConstant": "file:../wdConstant",
"wdKit": "file:../wdKit",
"@ohos/axios": "^2.1.1"
}
},
"wdRouter@../../commons/wdRouter": {
"name": "wdrouter",
"resolved": "../../commons/wdRouter",
"registryType": "local",
"dependencies": {
"wdKit": "file:../wdKit",
"wdBean": "file:../../features/wdBean"
}
},
"wdWebComponent@../../commons/wdWebComponent": {
"name": "wdwebcomponent",
"resolved": "../../commons/wdWebComponent",
"registryType": "local",
"dependencies": {
"wdConstant": "file:../wdConstant",
"wdKit": "file:../wdKit",
"wdJsBridge": "file:../wdJsBridge",
"wdBean": "file:../../features/wdBean",
"wdRouter": "file:../wdRouter"
}
}
}
"specifiers": {},
"packages": {}
}
\ No newline at end of file
... ...
{
"code": "0",
"data": {
"list": [{
"appStyle": "15",
"imageUrl": ["https://sitcontentjdcdn.aikan.pdnews.cn/sjbj-20231204/image/live/563cc8ce1ecc43b288f6cf60da66579c.jpeg?x-oss-process=image/resize,l_550,m_fill,h_450,w_800/quality,q_90/format,jpg"],
"liveId": 20000007348,
"planStartTime": "2023-12-05 15:26:10",
"relId": "500000017021",
"relType": 1,
"startTime": "",
"status": "wait",
"title": "视界运营位加权-加权中删除"
}, {
"appStyle": "null",
"imageUrl": ["https://sitcontentjdcdn.aikan.pdnews.cn/sjbj-20230914/image/display/9af825a00abf490d8a8698f4fc079447.jpg?x-oss-process=image/resize,l_550,m_fill,h_450,w_800/quality,q_90/format,jpg"],
"liveId": 20000007492,
"planStartTime": "2024-01-12 20:00:00",
"relId": "500000020284",
"relType": 1,
"startTime": "",
"status": "wait",
"title": "QA|汉阴县凤堰古梯田"
}, {
"appStyle": "null",
"imageUrl": ["https://sitcontentjdcdn.aikan.pdnews.cn/sjbj-20230915/image/display/e908748c62a44109bbb7214f3fed458c.jpg?x-oss-process=image/resize,l_550,m_fill,h_450,w_800/quality,q_90/format,jpg"],
"liveId": 20000007493,
"planStartTime": "2024-01-12 20:00:00",
"relId": "500000020286",
"relType": 1,
"startTime": "",
"status": "wait",
"title": "二十四节气-夏至"
}, {
"appStyle": "null",
"imageUrl": ["https://sitcontentjdcdn.aikan.pdnews.cn/sjbj-20240118/image/display/732d6166103d4d2f9fbf512b128a3486.jpeg?x-oss-process=image/resize,l_550,m_fill,h_450,w_800/quality,q_90/format,jpg"],
"liveId": 20000007495,
"planStartTime": "2024-01-18 10:51:33",
"relId": "500000030122",
"relType": 1,
"startTime": "",
"status": "wait",
"title": "01181050文字直播没有预告片"
}, {
"appStyle": "null",
"imageUrl": ["https://sitcontentjdcdn.aikan.pdnews.cn/sjbj-20240127/image/live/6359d000bba24812b7ca1765bb106a49.png?x-oss-process=image/resize,l_550,m_fill,h_450,w_800/quality,q_90/format,jpg"],
"liveId": 20000007519,
"planStartTime": "2024-02-27 18:18:16",
"relId": "500000034054",
"relType": 1,
"startTime": "",
"status": "wait",
"title": "错搞民宿33"
}, {
"appStyle": "15",
"imageUrl": ["https://sitcontentjdcdn.aikan.pdnews.cn/sjbj-20240228/image/live/e6998ab547af472dbc19ba2fd68959b9.jpeg?x-oss-process=image/resize,l_550,m_fill,h_450,w_800/quality,q_90/format,jpg"],
"liveId": 20000007521,
"planStartTime": "2024-02-28 19:01:50",
"relId": "500000034162",
"relType": 1,
"startTime": "",
"status": "wait",
"title": "保存编辑弹幕开关"
}],
"pageNum": 1,
"pageSize": 20,
"totalCount": 6
},
"message": "Success",
"requestId": "65289f1217934cffb7587ff4d6ce4689",
"success": true,
"timestamp": 1710555152344
}
\ 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
... ...