yangsunyue_wd
Showing 107 changed files with 5965 additions and 67 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
... ...
import ArrayList from '@ohos.util.ArrayList'
import { MineSettingComponent } from 'wdComponent';
import { AccountAndSecurityLayout } from 'wdComponent';
import router from '@ohos.router';
@Entry
@Component
struct SettingPage {
@State message: string = 'Hello World 02'
@State pageType: string = '';
onPageShow() {
const params = router.getParams(); // 获取传递过来的参数对象
this.pageType = 'mainSetting';// 获取info属性的值
}
build() {
Column() {
MineSettingComponent()
if (this.pageType == 'mainSetting') {
MineSettingComponent()
} else {
AccountAndSecurityLayout()
}
}.setFullWidth()
}
... ...
import { SettingPasswordLayout } from 'wdComponent';
@Entry
@Component
struct SettingPasswordPage {
@State message: string = 'Hello World'
build() {
Row() {
Column() {
SettingPasswordLayout()
}
.width('100%')
}
.height('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
... ...
... ... @@ -7,6 +7,8 @@
"pages/SettingPage",
"pages/PrivacySettingPage",
"pages/SettingAboutPage",
"pages/AppointmentListPage"
"pages/AppointmentListPage",
"pages/SettingPasswordPage",
"pages/FollowListPage"
]
}
... ...
{
"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
... ...
... ... @@ -33,3 +33,9 @@ export { MineSettingComponent } from "./components/page/MineSettingComponent"
export { AboutPageUI } from "./components/page/about/AboutPageUI"
export { AppointmentListUI } from "./components/page/mine/AppointmentListUI"
export { AccountAndSecurityLayout } from "./components/page/AccountAndSecurityLayout"
export { SettingPasswordLayout } from "./components/page/SettingPasswordLayout"
export { FollowFirstTabsComponent } from "./components/page/mine/follow/FollowFirstTabsComponent"
... ...
// @ts-nocheck
import { BottomNavi, CommonConstants } from 'wdConstant';
import { Logger } from 'wdKit';
import { TopNavigationComponent } from './TopNavigationComponent';
import { BottomNavDTO } from '../../repository/bean/BottomNavDTO';
import { UIUtils } from '../../repository/UIUtils';
import { MinePageComponent } from './MinePageComponent';
import PageViewModel from '../../viewmodel/PageViewModel';
import MineSettingDatasModel from '../../model/MineSettingDatasModel';
import { MineMainSettingFunctionItem } from '../viewmodel/MineMainSettingFunctionItem'
import storageStatistics from "@ohos.file.storageStatistics";
import { BusinessError } from '@ohos.base';
import ArrayList from '@ohos.util.ArrayList';
@Component
export struct AccountAndSecurityLayout {
@State listData: ArrayList<any> = new ArrayList();
@State privacySwitch: boolean = false
@State cacheSice: number = 0
aboutToAppear() {
// 获取设置页面数据
this.getAccountAndSecurityData()
}
getAccountAndSecurityData() {
this.listData = MineSettingDatasModel.getAccountAndSecuritySettingData()
}
build() {
Navigation() {
//滑动区域
this.settingList()
}.titleMode(NavigationTitleMode.Mini)
.title('账号与安全')
}
// 页面布局
@Builder settingList() {
Stack({ alignContent: Alignment.Bottom }) {
Column() {
List() {
ForEach(this.listData, (item: MineMainSettingFunctionItem, index: number) => {
ListItem() {
if (item.type == 0) {
Column() {
this.getArrowCell(item)
}.padding({ left: '27lpx' }).height('117lpx').justifyContent(FlexAlign.Center)
} else if (item.type == 1) {
Column() {
this.getSwitchCell(item)
}.padding({ left: '27lpx' }).height('117lpx').justifyContent(FlexAlign.Center)
} else {
Column().width('100%').height('15lpx').backgroundColor(0xf0f0f0)
}
}
.onClick(() => {
console.log(index + "")
RouteManager.jumpNewPage("pages/SettingPasswordPage") // 调用跳转方法,跳转新页面
})
}, item => item)
}
.divider({
strokeWidth: 1,
startMargin: 15,
endMargin: 10,
color: '#f0f0f0'
})
.onScrollFrameBegin((offset, state) => {
return { offsetRemain: 0 }
})
}.height("100%")
Column() {
Button('退出登录',{ stateEffect: true }).width('90%').height('80lpx').backgroundColor('#da3e22').fontColor('#fff').margin('20lpx').onClick(()=>{
AlertDialog.show({
title: '🥟id : ' + "button",
message: '标题:' + '退出登录',
confirm: {
value: "OK",
action: () => {
},
}
})
})
}
}
}
@Builder itemHead(text: string) {
// 列表分组的头部组件,对应联系人分组A、B等位置的组件
if (text.length > 0) {
Row().width('100%').height('20lpx').backgroundColor(0xf0f0f0)
}
}
// 右侧开关cell
@Builder getSwitchCell(item: MineMainSettingFunctionItem) {
Column() {
Row() {
// 左侧logo和标题
Row() {
// 判断有没有图片
if (item.imgSrc) {
Image(item.imgSrc).height('38lpx').margin({ right: '5lpx' })
Text(`${item.title}`).margin({ top: '8lpx' }).height('38lpx').fontColor('#333333').fontSize('29lpx')
} else {
Text(`${item.title}`).margin({ top: '8lpx' }).height('38lpx').fontColor('#333333').fontSize('29lpx')
}
}.width('60%')
// 右侧文案和右箭头
Row() {
Toggle({ type: ToggleType.Switch, isOn: item.switchState })
.height('50lpx')
.margin({ left: '81lpx', right: '29lpx' })
.selectedColor(Color.Pink)
.onChange((isOn: boolean) => {
this.privacySwitch = isOn;
})
}.width('40%')
.margin({ right: '29lpx' })
.justifyContent(FlexAlign.End)
}
.alignItems(VerticalAlign.Center)
.justifyContent(FlexAlign.SpaceBetween)
}.height('54lpx')
}
// 右文字+箭头cell
@Builder getArrowCell(item: MineMainSettingFunctionItem) {
Column() {
Row() {
// 左侧logo和标题
Row() {
// 判断有没有图片
if (item.imgSrc) {
Image(item.imgSrc)
.height('38lpx')
.margin({ right: '5lpx' })
}
Text(`${item.title}`)
.margin({ top: '8lpx' })
.height('38lpx')
.fontColor('#333333')
.fontSize('29lpx')
}.width('60%')
// 右侧文案和右箭头
Row() {
Text(item.subTitle ? item.subTitle : '')
.fontColor('#999999')
.maxLines(1)
Image($r('app.media.mine_user_arrow'))
.width('27lpx')
.height('27lpx')
.objectFit(ImageFit.Auto)
Column().width('29lpx')
}.width('40%')
.margin({ right: '29lpx' })
.justifyContent(FlexAlign.End)
}
.alignItems(VerticalAlign.Center)
.justifyContent(FlexAlign.SpaceBetween)
}
.height('54lpx')
}
}
\ No newline at end of file
... ...
... ... @@ -9,13 +9,14 @@ import PageViewModel from '../../viewmodel/PageViewModel';
import storageStatistics from "@ohos.file.storageStatistics";
import { BusinessError } from '@ohos.base';
import RouteManager from '../../utils/RouteManager'
@Component
export struct MineSettingComponent {
@State listData: Array<string | Array<string>> = new Array();
@State privacySwitch:boolean = false
@State cacheSice:number = 0
@State privacySwitch: boolean = false
@State cacheSice: number = 0
aboutToAppear() {
// 获取设置页面数据
... ... @@ -26,7 +27,7 @@ export struct MineSettingComponent {
if (err) {
console.error(`Invoke getCurrentBundleStats failed, code is ${err.code}, message is ${err.message}`);
} else {
this.cacheSice = bundleStats.appSize / 1024.00 / 1024.00.toFixed(2);
this.cacheSice = bundleStats.appSize / 1024.00 / 1024.00.toFixed(2);
}
});
}
... ... @@ -64,10 +65,12 @@ export struct MineSettingComponent {
}.padding({ left: '27lpx' })
.onClick(() => {
console.log(subIndex + "")
if (subIndex == 4) {
// RouteManager.jumpNewPage("pages/SettingPage") // 调用跳转方法,跳转新页面
}
// 在Home页面中
let paramsInfo: object = {
pageId: 123,
pageType:'AccountAndSecurityLayout'
};
RouteManager.jumpNewPage("pages/SettingPasswordPage") // 调用跳转方法,跳转新页面
})
.height('117lpx')
}, subItem => subItem)
... ...
import ArrayList from '@ohos.util.ArrayList';
import promptAction from '@ohos.promptAction';
export default class AccoutPageDataModel {
// 页面数据
compType: number // 0:标题 / 1:密码输入框 / 2:验证码输入框 / 3:desc描述 / 4:按钮 / 5:logo / 6:子标题 7:手机号输入框 7:空白
compLogo: string
compTitle: string
compSubTitle: string
compDesc: string
compButtonTitle: string
inputPlacholder: string
inputTag: number
constructor(compType: number, compTitle: string, compLogo: string, compDesc: string, compButtonTitle: string, inputPlacholder: string, inputTag: number) {
this.compType = compType
this.compTitle = compTitle
this.compLogo = compLogo
this.compDesc = compDesc
this.compButtonTitle = compButtonTitle
this.inputPlacholder = inputPlacholder
this.inputTag = inputTag
}
}
@Component
export struct SettingPasswordLayout {
@State listData: Array<AccoutPageDataModel> = new Array(); // 页面配置数据
@State btnStatus: boolean = false
password01: string
password02: string
passwordOri: string
aboutToAppear() {
this.getPageListData(4)
}
getPageListData(pageId:number) {
switch (pageId) {
case 0:
// 验证/更换手机号
this.listData.push(new AccoutPageDataModel(0, '更换手机号', null, null, null, null, null))
this.listData.push(new AccoutPageDataModel(7, null, null, null, null, '请输入手机号', 10010))
this.listData.push(new AccoutPageDataModel(2, null, null, null, null, '验证码', 10088))
this.listData.push(new AccoutPageDataModel(4, null, null, null, '确认', null, null))
break;
case 1:
// 设置密码
this.listData.push(new AccoutPageDataModel(0, '设置密码', null, null, null, null, null))
this.listData.push(new AccoutPageDataModel(1, null, null, null, null, '请输入密码', 10086))
this.listData.push(new AccoutPageDataModel(1, null, null, null, null, '再次输入密码', 10087))
this.listData.push(new AccoutPageDataModel(4, null, null, '提示:密码长度6-20位,需答谢字母、小写字母、数字、特殊字符中组合三种及三种以上组成', null, null, null))
this.listData.push(new AccoutPageDataModel(5, null, null, null, '确认', null, null))
break;
case 2:
// 修改密码
this.listData.push(new AccoutPageDataModel(0, '修改密码', null, null, null, null, null))
this.listData.push(new AccoutPageDataModel(1, null, null, null, null, '请输入原密码', 10010))
this.listData.push(new AccoutPageDataModel(1, null, null, null, null, '请输入新密码', 10086))
this.listData.push(new AccoutPageDataModel(1, null, null, null, null, '请再请输入原密码', 10087))
this.listData.push(new AccoutPageDataModel(3, null, null, '提示:密码长度6-20位,需答谢字母、小写字母、数字、特殊字符中组合三种及三种以上组成', null, null, null))
this.listData.push(new AccoutPageDataModel(4, null, null, null, '确认', null, null))
this.listData.push(new AccoutPageDataModel(3, null, null, '忘记密码', null, null, null))
break;
case 3:
// 绑定手机号
this.listData.push(new AccoutPageDataModel(0, '绑定手机号', null, null, null, null, null))
this.listData.push(new AccoutPageDataModel(7, null, null, null, null, '请输入手机号', 10010))
this.listData.push(new AccoutPageDataModel(2, null, null, null, null, '验证码', 10088))
this.listData.push(new AccoutPageDataModel(4, null, null, null, '确认', null, null))
break;
case 4:
// 有logo的
this.listData.push(new AccoutPageDataModel(5, null, 'https://img-blog.csdnimg.cn/24f43f4d626d428891ebb2adb5c2c2e9.png?x-oss-process=image/watermark,type_ZHJvaWRzYW5zZmFsbGJhY2s,shadow_50,text_Q1NETiBA5YyX5aSn5Z-55paH5byg6ICB5biI,size_20,color_FFFFFF,t_70,g_se,x_16', null, null, null , null))
this.listData.push(new AccoutPageDataModel(0, '修改密码', null, null, null, null, null))
this.listData.push(new AccoutPageDataModel(1, null, null, null, null, '请输入原密码', 10010))
this.listData.push(new AccoutPageDataModel(1, null, null, null, null, '请输入新密码', 10086))
this.listData.push(new AccoutPageDataModel(1, null, null, null, null, '请再请输入原密码', 10087))
this.listData.push(new AccoutPageDataModel(2, null, null, null, null, '验证码', 10088))
this.listData.push(new AccoutPageDataModel(3, null, null, '提示:密码长度6-20位,需答谢字母、小写字母、数字、特殊字符中组合三种及三种以上组成', null, null, null))
this.listData.push(new AccoutPageDataModel(4, null, null, null, '确认', null, null))
this.listData.push(new AccoutPageDataModel(3, null, null, '忘记密码', null, null, null))
break;
default:
break;
}
}
build() {
Navigation() {
this.settingList() //滑动区域
}.titleMode(NavigationTitleMode.Mini)
.title('')
}
// 页面布局
@Builder settingList() {
Column() {
List() {
ForEach(this.listData, (item: AccoutPageDataModel, index: number) => {
ListItem() {
if (item.compType == 0) {
this.getTitleCell(item, HorizontalAlign.Start)
} else if (item.compType == 1) {
this.getPasswordCell(item)
} else if (item.compType == 2) {
this.getCodeCell(item)
} else if (item.compType == 3) {
if (index == this.listData.length - 1) {
this.getDescCell(item, HorizontalAlign.Center)
} else {
this.getDescCell(item, HorizontalAlign.Start)
}
} else if (item.compType == 4) {
this.getButtonCell(item)
} else if (item.compType == 5) {
this.getLogoCell(item)
} else if (item.compType == 7) {
this.getPhoneCell(item)
} else {
Text('' + item.compType)
}
}
})
}
// .divider({
// strokeWidth: 1,
// startMargin: 15,
// endMargin: 10,
// color: '#f0f0f0'
// })
}.width('100%').padding('30lpx')
}
/***************************** UI元素 ******************************************/
// 标题
@Builder getTitleCell(item: AccoutPageDataModel, alignTitle: HorizontalAlign) {
Column() {
Text(item.compTitle).fontWeight(FontWeight.Bold).fontSize(20).maxLines(1)
}
.width('100%')
.height('75lpx')
.alignItems(alignTitle)
}
// 密码输入框
@Builder getPasswordCell(item: AccoutPageDataModel) {
Row() {
Row() {
TextInput({ placeholder: item.inputPlacholder })
.type(InputType.Password)
.backgroundColor('#00000000')
.onChange((value: string) => {
this.inputTextChange(value, item.inputTag)
})
.onSubmit((EnterKeyType) => {
promptAction.showToast({ message: 'submit' })
})
}
.alignItems(VerticalAlign.Center)
.height('80lpx')
.backgroundColor('#f5f5f5')
.borderRadius('4vp')
}
.width('100%')
.height('110lpx')
.backgroundColor(0xffffff0)
.alignItems(VerticalAlign.Center)
}
// 手机号输入框
@Builder getPhoneCell(item: AccoutPageDataModel) {
Row() {
Row() {
TextInput({ placeholder: item.inputPlacholder })
.backgroundColor('#00000000')
.onChange((value: string) => {
this.inputTextChange(value, item.inputTag)
})
.onSubmit((EnterKeyType) => {
promptAction.showToast({ message: 'submit' })
})
}
.alignItems(VerticalAlign.Center)
.height('80lpx')
.backgroundColor('#f5f5f5')
.borderRadius('4vp')
}
.width('100%')
.height('110lpx')
.backgroundColor(0xffffff0)
.alignItems(VerticalAlign.Center)
}
// 验证码码输入框
@Builder getCodeCell(item: AccoutPageDataModel) {
Row() {
Stack() {
Image($r('app.media.get_code_bg')).width('100%').borderRadius('4vp')
Row() {
TextInput({ placeholder: item.inputPlacholder })
.backgroundColor('#00000000')
.width('67.28%')
.onChange((value: string) => {
this.inputTextChange(value, item.inputTag)
})
Button('发送验证码')
.width('32.71%')
.backgroundColor('#00000000')
.fontColor('#da3e22')
}
.width('100%')
}.height('80lpx')
}
.width('100%')
.height('110lpx')
.backgroundColor(0xffffff0)
.alignItems(VerticalAlign.Center)
}
// desc
@Builder getDescCell(item: AccoutPageDataModel, alignTitle: HorizontalAlign) {
Column() {
Text(item.compDesc).fontSize(12).maxLines(3).fontColor(0x999999).padding({top:'10lpx'})
.onClick(()=>{
if (item.compDesc == '忘记密码') {
promptAction.showToast({ message: '密码不符合密码规范' })
}
})
}
.width('100%')
.height('85lpx')
.alignItems(alignTitle)
}
// 按钮
@Builder getButtonCell(item: AccoutPageDataModel) {
Row() {
Button(item.compButtonTitle, { type: ButtonType.Normal, stateEffect: true })
.width('100%')
.height('80lpx')
.backgroundColor(this.btnStatus ? '#da3e22' : '#e5856d')
.fontColor('#fff')
.borderRadius('4vp')
.onClick(() => {
this.buttonClick()
})
}
.padding({top:'25lpx'})
.alignItems(VerticalAlign.Center)
.width('100%')
.height('120lpx')
}
// 标题
@Builder getLogoCell(item: AccoutPageDataModel) {
Column() {
Image(item.compLogo).height('150lpx').width('150lpx')
}
.width('100%')
.height('200lpx')
}
/***************************** 事件处理 ******************************************/
// 提交按钮点击事件
buttonClick() {
if (this.btnStatus) {
// 需要+手机号校验
if (this.password01.length < 6 || this.password01.length > 20) {
promptAction.showToast({ message: '密码不符合密码规范' })
return
}
promptAction.showToast({ message: '请求接口' })
}
}
// 输入框数据变动:输入数据处理
inputTextChange(text: string, tag: number) {
if (tag == 10086) {
this.password01 = text;
} else if (tag == 10087) {
this.password02 = text;
} else {
this.passwordOri = text;
}
if (this.password01) {
if (this.password01 == this.password02 && this.password01.length >= 6 && this.password01.length <= 20) {
this.btnStatus = true;
} else {
this.btnStatus = false;
}
}
}
}
\ No newline at end of file
... ...
... ... @@ -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{
... ...
... ... @@ -68,7 +68,12 @@ export default struct MinePageMoreFunctionUI{
if (index == 3) {
RouteManager.jumpNewPage("pages/SettingPage")
} else {
RouteManager.jumpNewPage("pages/PrivacySettingPage")
// 在Home页面中
let paramsInfo: object = {
pageId: 123,
pageType:'mainSetting'
};
RouteManager.jumpNewPage("pages/PrivacySettingPage",paramsInfo)
}
})
.height('117lpx')
... ...
... ... @@ -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"
/**
... ... @@ -84,18 +84,35 @@ class MinePageDatasModel{
return this.moreData
}
/**
* 扫一扫 我的奖品 等5个数据
* 包含名字和图标
*/
getSettingFunctionsData():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
}
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): 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);
... ... @@ -103,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()
... ...
import MinePagePersonalFunctionsItem from '../viewmodel/MinePagePersonalFunctionsItem'
import MinePageCreatorFunctionsItem from '../viewmodel/MinePageCreatorFunctionsItem'
import MinePageMoreFunctionModel from '../viewmodel/MinePageMoreFunctionModel';
import { HttpUrlUtils } from '../network/HttpUrlUtils';
import HashMap from '@ohos.util.HashMap';
import { ResponseDTO, WDHttp } from 'wdNetwork';
import { Logger } from 'wdKit';
import { MineMainSettingFunctionItem } from '../viewmodel/MineMainSettingFunctionItem'
const TAG = "MineSettingDatasModel"
/**
* 我的设置页面 所有数据 获取封装类
*/
class MineSettingDatasModel{
private static instance: MineSettingDatasModel;
mainSettingData:MineMainSettingFunctionItem[] = []
accountAndSecurityData:MineMainSettingFunctionItem[] = []
private constructor() { }
/**
* 单例模式
* @returns
*/
public static getInstance(): MineSettingDatasModel {
if (!MineSettingDatasModel.instance) {
MineSettingDatasModel.instance = new MineSettingDatasModel();
}
return MineSettingDatasModel.instance;
}
/**
* 评论 关注 收藏 等7个数据
* 包含名字和图标
*/
getMineMainSettingFunctionItemData():MineMainSettingFunctionItem[]{
if(this.mainSettingData.length === 7){
return this.mainSettingData
}
this.mainSettingData = []
this.mainSettingData.push(new MineMainSettingFunctionItem(null, '账户与安全', '18888888888', 0, false))
this.mainSettingData.push(new MineMainSettingFunctionItem(null, '接收推送', null, 1, false))
this.mainSettingData.push(new MineMainSettingFunctionItem(null, '隐私设罝', null, 0, false))
this.mainSettingData.push(new MineMainSettingFunctionItem(null, '仅WiFi网络加载图片', null, 1, false))
this.mainSettingData.push(new MineMainSettingFunctionItem(null, 'WiFi网络情况下自动播放视频', null, 1, false))
this.mainSettingData.push(new MineMainSettingFunctionItem(null, '开户播放器悬浮窗', null, 1, false))
this.mainSettingData.push(new MineMainSettingFunctionItem(null, null, null, 2, null))
this.mainSettingData.push(new MineMainSettingFunctionItem(null, '清除缓存', '32MB', 0, false))
this.mainSettingData.push(new MineMainSettingFunctionItem(null, '去评分', null, 0, false))
return this.mainSettingData
}
/**
* 评论 关注 收藏 等7个数据
* 包含名字和图标
*/
getAccountAndSecuritySettingData():MineMainSettingFunctionItem[]{
if(this.accountAndSecurityData.length === 7){
return this.accountAndSecurityData
}
this.accountAndSecurityData = []
this.accountAndSecurityData.push(new MineMainSettingFunctionItem(null, '更换手机号', '18888888888', 0, false))
this.accountAndSecurityData.push(new MineMainSettingFunctionItem(null, '设置密码', null, 0, false))
this.accountAndSecurityData.push(new MineMainSettingFunctionItem(null, null, null, 2, null))
this.accountAndSecurityData.push(new MineMainSettingFunctionItem($r('app.media.mine_order_icon'), '绑定QQ', '立即绑定', 0, false))
this.accountAndSecurityData.push(new MineMainSettingFunctionItem($r('app.media.mine_order_icon'), '绑定微信', '立即绑定', 0, false))
this.accountAndSecurityData.push(new MineMainSettingFunctionItem($r('app.media.mine_order_icon'), '绑定新浪微博', '立即绑定', 0, false))
this.accountAndSecurityData.push(new MineMainSettingFunctionItem(null, 'Apple ID', null, 0, false))
this.accountAndSecurityData.push(new MineMainSettingFunctionItem(null, null, null, 2, null))
this.accountAndSecurityData.push(new MineMainSettingFunctionItem(null, '注销账号', null, 0, false))
return this.accountAndSecurityData
}
// 网络请求设置数据
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): 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");
// return
// }
// Logger.info(TAG, "getAppointmentList then,AppointmentResDTO.timeStamp:" + navResDTO.timestamp);
// let navigationBean = navResDTO.data
// success(navigationBean);
// }).catch((err: Error) => {
// Logger.error(TAG, `fetchAppointmentListDataApi catch, error.name : ${err.name}, error.message:${err.message}`);
// error(err);
// })
// })
// }
}
const mineSettingDatasModel = MineSettingDatasModel.getInstance()
export default mineSettingDatasModel as MineSettingDatasModel
\ 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
}
}
... ...
/**
* {
"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
... ...
@Observed
export class MineMainSettingFunctionItem {
imgSrc:Resource // 图标
title:string // 标题
subTitle:string // 副标题
type:number // 数据类型 0默认箭头类型,1右侧switch按钮类型
switchState:boolean // 右侧switch按钮状态
constructor(imgSrc:Resource,title:string,subTitle:string,type:number,switchState:boolean){
this.imgSrc = imgSrc
this.title = title
this.subTitle = subTitle
this.type = type
this.switchState = switchState
}
}
\ 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,
}
... ...
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_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,11 +237,11 @@ export class HttpUrlUtils {
private static getUserId() {
// TODO 对接登录
return '459776297474949';
return HttpUrlUtils.userId;
}
private static getUserType() {
return '2';
return HttpUrlUtils.userType;
}
static getVerifyCodeUrl() {
... ... @@ -229,4 +258,70 @@ export class HttpUrlUtils {
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
... ...
... ... @@ -36,4 +36,8 @@ export class WDRouterPage {
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");
}
... ...
... ... @@ -20,7 +20,9 @@ export class WDRouterRule {
// 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);
... ...
// 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
... ...
@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
... ...
import { WDRouterPage, WDRouterRule } from 'wdRouter';
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 = 'PageComponent';
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('我的页面').onClick(()=>{
WDRouterRule.jumpWithPage(WDRouterPage.loginPage)
})
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"
]
}
... ...
... ... @@ -78,7 +78,7 @@ export struct LoginInputComponent {
})
}.margin({ top: 15 }).height(61).alignItems(VerticalAlign.Center).justifyContent(FlexAlign.Start)
}.margin({ top: 12 }).height(48).alignItems(VerticalAlign.Center).justifyContent(FlexAlign.Start)
}
}
\ No newline at end of file
... ...
... ... @@ -209,9 +209,9 @@ struct LoginPage {
.id("password_icon")
}.margin({ top: 12 })
.height(61)
.height(48)
.width('100%')
}.padding({ left: 32, right: 32 }).width('100%').margin({ top: 46 })
}.padding({ left: 25, right: 25 }).width('100%').margin({ top: 36 })
}
... ...
... ... @@ -5,6 +5,10 @@ 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"
... ... @@ -31,16 +35,17 @@ export class LoginViewModel {
return new Promise<LoginBean>((success, fail) => {
this.loginModel.appLogin(phone, loginType, verificationCode).then((data: LoginBean) => {
//todo 保存登录数据
SPHelper.default.save("firstMark", data.firstMark)
SPHelper.default.save("id", data.id)
SPHelper.default.save("jwtToken", data.jwtToken)
SPHelper.default.save("longTimeNoLoginMark", data.longTimeNoLoginMark)
SPHelper.default.save("refreshToken", data.refreshToken)
SPHelper.default.save("status", data.status)
SPHelper.default.save("userType", data.userType)
SPHelper.default.save("userName", data.userName)
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()
... ... @@ -54,9 +59,17 @@ export class LoginViewModel {
let passwordNew = await this.doMd(password)
Logger.debug(TAG, "PASSWORD:" + passwordNew)
this.loginModel.appLoginByPassword(phone, loginType, passwordNew, oldPassword).then((data: LoginBean) => {
//todo 保存登录数据
SPHelper.default.save("userName", data.userName)
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)
... ... @@ -69,8 +82,8 @@ export class LoginViewModel {
return new Promise<CheckVerifyBean>((success, reject) => {
this.loginModel.checkVerifyCode(phone, verifyCode).then((data: CheckVerifyBean) => {
//todo 保存数据
SPHelper.default.save("tempToken", data.temToken)
SPHelper.default.save("jwtToken", data.jwtToken)
SPHelper.default.save(SpConstants.USER_TEMP_TOKEN, data.temToken)
SPHelper.default.save(SpConstants.USER_JWT_TOKEN, data.jwtToken)
success(data)
}, (value: string) => {
... ...
{
"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
... ...