yangsunyue_wd
Showing 59 changed files with 4466 additions and 47 deletions

Too many changes to show.

To preserve performance only 59 of 59+ files are displayed.

  1 +
  2 +import { FollowFirstTabsComponent } from 'wdComponent'
  3 +
  4 +@Entry
  5 +@Component
  6 +struct FollowListPage {
  7 +
  8 + build() {
  9 + Column() {
  10 + //Tab 详情
  11 + FollowFirstTabsComponent()
  12 + }
  13 + .backgroundColor($r('app.color.color_F9F9F9'))
  14 + .height('100%')
  15 + .width('100%')
  16 + }
  17 +}
1 import ArrayList from '@ohos.util.ArrayList' 1 import ArrayList from '@ohos.util.ArrayList'
2 import { MineSettingComponent } from 'wdComponent'; 2 import { MineSettingComponent } from 'wdComponent';
  3 +import { AccountAndSecurityLayout } from 'wdComponent';
  4 +import router from '@ohos.router';
3 5
4 @Entry 6 @Entry
5 @Component 7 @Component
6 struct SettingPage { 8 struct SettingPage {
7 @State message: string = 'Hello World 02' 9 @State message: string = 'Hello World 02'
  10 + @State pageType: string = '';
  11 +
  12 + onPageShow() {
  13 + const params = router.getParams(); // 获取传递过来的参数对象
  14 + this.pageType = 'mainSetting';// 获取info属性的值
  15 + }
8 16
9 build() { 17 build() {
10 Column() { 18 Column() {
11 - MineSettingComponent() 19 + if (this.pageType == 'mainSetting') {
  20 + MineSettingComponent()
  21 + } else {
  22 + AccountAndSecurityLayout()
  23 + }
12 }.setFullWidth() 24 }.setFullWidth()
13 } 25 }
14 26
  1 +import { SettingPasswordLayout } from 'wdComponent';
  2 +
  3 +@Entry
  4 +@Component
  5 +struct SettingPasswordPage {
  6 + @State message: string = 'Hello World'
  7 +
  8 + build() {
  9 + Row() {
  10 + Column() {
  11 + SettingPasswordLayout()
  12 + }
  13 + .width('100%')
  14 + }
  15 + .height('100%')
  16 + }
  17 +}
  1 +
1 @Entry 2 @Entry
2 @Component 3 @Component
3 struct TestPage { 4 struct TestPage {
4 - @State message: string = 'Hello World'  
5 5
6 build() { 6 build() {
7 - Row() {  
8 - Column() {  
9 - Text(this.message)  
10 - .fontSize(50)  
11 - .fontWeight(FontWeight.Bold)  
12 - }  
13 - .width('100%') 7 + Column() {
14 } 8 }
  9 + .width('100%')
15 .height('100%') 10 .height('100%')
16 } 11 }
17 } 12 }
@@ -3,6 +3,10 @@ @@ -3,6 +3,10 @@
3 { 3 {
4 "name": "start_window_background", 4 "name": "start_window_background",
5 "value": "#FFFFFF" 5 "value": "#FFFFFF"
  6 + },
  7 + {
  8 + "name": "color_F9F9F9",
  9 + "value": "#F9F9F9"
6 } 10 }
7 ] 11 ]
8 } 12 }
@@ -7,6 +7,8 @@ @@ -7,6 +7,8 @@
7 "pages/SettingPage", 7 "pages/SettingPage",
8 "pages/PrivacySettingPage", 8 "pages/PrivacySettingPage",
9 "pages/SettingAboutPage", 9 "pages/SettingAboutPage",
10 - "pages/AppointmentListPage" 10 + "pages/AppointmentListPage",
  11 + "pages/SettingPasswordPage",
  12 + "pages/FollowListPage"
11 ] 13 ]
12 } 14 }
  1 +{
  2 + "code": "0",
  3 + "data": {
  4 + "list": [{
  5 + "appStyle": "15",
  6 + "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"],
  7 + "liveId": 20000007348,
  8 + "planStartTime": "2023-12-05 15:26:10",
  9 + "relId": "500000017021",
  10 + "relType": 1,
  11 + "startTime": "",
  12 + "status": "wait",
  13 + "title": "视界运营位加权-加权中删除"
  14 + }, {
  15 + "appStyle": "null",
  16 + "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"],
  17 + "liveId": 20000007492,
  18 + "planStartTime": "2024-01-12 20:00:00",
  19 + "relId": "500000020284",
  20 + "relType": 1,
  21 + "startTime": "",
  22 + "status": "wait",
  23 + "title": "QA|汉阴县凤堰古梯田"
  24 + }, {
  25 + "appStyle": "null",
  26 + "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"],
  27 + "liveId": 20000007493,
  28 + "planStartTime": "2024-01-12 20:00:00",
  29 + "relId": "500000020286",
  30 + "relType": 1,
  31 + "startTime": "",
  32 + "status": "wait",
  33 + "title": "二十四节气-夏至"
  34 + }, {
  35 + "appStyle": "null",
  36 + "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"],
  37 + "liveId": 20000007495,
  38 + "planStartTime": "2024-01-18 10:51:33",
  39 + "relId": "500000030122",
  40 + "relType": 1,
  41 + "startTime": "",
  42 + "status": "wait",
  43 + "title": "01181050文字直播没有预告片"
  44 + }, {
  45 + "appStyle": "null",
  46 + "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"],
  47 + "liveId": 20000007519,
  48 + "planStartTime": "2024-02-27 18:18:16",
  49 + "relId": "500000034054",
  50 + "relType": 1,
  51 + "startTime": "",
  52 + "status": "wait",
  53 + "title": "错搞民宿33"
  54 + }, {
  55 + "appStyle": "15",
  56 + "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"],
  57 + "liveId": 20000007521,
  58 + "planStartTime": "2024-02-28 19:01:50",
  59 + "relId": "500000034162",
  60 + "relType": 1,
  61 + "startTime": "",
  62 + "status": "wait",
  63 + "title": "保存编辑弹幕开关"
  64 + }],
  65 + "pageNum": 1,
  66 + "pageSize": 20,
  67 + "totalCount": 6
  68 + },
  69 + "message": "Success",
  70 + "requestId": "65289f1217934cffb7587ff4d6ce4689",
  71 + "success": true,
  72 + "timestamp": 1710555152344
  73 +}
  1 +{
  2 + "code": "0",
  3 + "data": [
  4 + {
  5 + "children": [],
  6 + "directoryName": "阅读",
  7 + "directoryWeight": 99,
  8 + "id": 165,
  9 + "isShow": 1,
  10 + "level": 1,
  11 + "parentId": 0,
  12 + "rootId": 0
  13 + },
  14 + {
  15 + "children": [
  16 + {
  17 + "children": [
  18 + {
  19 + "directoryName": "三二",
  20 + "directoryWeight": 2,
  21 + "id": 120,
  22 + "isShow": 1,
  23 + "level": 3,
  24 + "parentId": 118,
  25 + "rootId": 117
  26 + },
  27 + {
  28 + "directoryName": "三级",
  29 + "directoryWeight": 1,
  30 + "id": 119,
  31 + "isShow": 1,
  32 + "level": 3,
  33 + "parentId": 118,
  34 + "rootId": 117
  35 + }
  36 + ],
  37 + "directoryName": "二级",
  38 + "directoryWeight": 1,
  39 + "id": 118,
  40 + "isShow": 1,
  41 + "level": 2,
  42 + "parentId": 117,
  43 + "rootId": 117
  44 + }
  45 + ],
  46 + "directoryName": "幽游白书",
  47 + "directoryWeight": 33,
  48 + "id": 117,
  49 + "isShow": 1,
  50 + "level": 1,
  51 + "parentId": 0,
  52 + "rootId": 0
  53 + },
  54 + {
  55 + "children": [],
  56 + "directoryName": "推荐",
  57 + "directoryWeight": 9,
  58 + "id": 386,
  59 + "isShow": 1,
  60 + "level": 1,
  61 + "parentId": 0,
  62 + "rootId": 0
  63 + },
  64 + {
  65 + "children": [],
  66 + "directoryName": "政务",
  67 + "directoryWeight": 9,
  68 + "id": 379,
  69 + "isShow": 1,
  70 + "level": 1,
  71 + "parentId": 0,
  72 + "rootId": 0
  73 + },
  74 + {
  75 + "children": [
  76 + {
  77 + "children": [],
  78 + "directoryName": "推荐",
  79 + "directoryWeight": 0,
  80 + "id": 335,
  81 + "isShow": 1,
  82 + "level": 2,
  83 + "parentId": 320,
  84 + "rootId": 320
  85 + }
  86 + ],
  87 + "directoryName": "推荐",
  88 + "directoryWeight": 9,
  89 + "id": 320,
  90 + "isShow": 1,
  91 + "level": 1,
  92 + "parentId": 0,
  93 + "rootId": 0
  94 + },
  95 + {
  96 + "children": [],
  97 + "directoryName": "媒体",
  98 + "directoryWeight": 8,
  99 + "id": 390,
  100 + "isShow": 1,
  101 + "level": 1,
  102 + "parentId": 0,
  103 + "rootId": 0
  104 + },
  105 + {
  106 + "children": [],
  107 + "directoryName": "媒体",
  108 + "directoryWeight": 8,
  109 + "id": 323,
  110 + "isShow": 1,
  111 + "level": 1,
  112 + "parentId": 0,
  113 + "rootId": 0
  114 + },
  115 + {
  116 + "children": [],
  117 + "directoryName": "自媒体",
  118 + "directoryWeight": 7,
  119 + "id": 329,
  120 + "isShow": 1,
  121 + "level": 1,
  122 + "parentId": 0,
  123 + "rootId": 0
  124 + },
  125 + {
  126 + "children": [],
  127 + "directoryName": "名人",
  128 + "directoryWeight": 6,
  129 + "id": 389,
  130 + "isShow": 1,
  131 + "level": 1,
  132 + "parentId": 0,
  133 + "rootId": 0
  134 + },
  135 + {
  136 + "children": [
  137 + {
  138 + "children": [],
  139 + "directoryName": "测试",
  140 + "directoryWeight": 0,
  141 + "id": 338,
  142 + "isShow": 1,
  143 + "level": 2,
  144 + "parentId": 324,
  145 + "rootId": 324
  146 + }
  147 + ],
  148 + "directoryName": "名人",
  149 + "directoryWeight": 6,
  150 + "id": 324,
  151 + "isShow": 1,
  152 + "level": 1,
  153 + "parentId": 0,
  154 + "rootId": 0
  155 + },
  156 + {
  157 + "children": [
  158 + {
  159 + "children": [],
  160 + "directoryName": "2级目录",
  161 + "directoryWeight": 0,
  162 + "id": 340,
  163 + "isShow": 1,
  164 + "level": 2,
  165 + "parentId": 312,
  166 + "rootId": 312
  167 + },
  168 + {
  169 + "children": [
  170 + {
  171 + "directoryName": "3级测试",
  172 + "directoryWeight": 0,
  173 + "id": 368,
  174 + "isShow": 1,
  175 + "level": 3,
  176 + "parentId": 339,
  177 + "rootId": 312
  178 + }
  179 + ],
  180 + "directoryName": "二级目录",
  181 + "directoryWeight": 0,
  182 + "id": 339,
  183 + "isShow": 1,
  184 + "level": 2,
  185 + "parentId": 312,
  186 + "rootId": 312
  187 + },
  188 + {
  189 + "children": [
  190 + {
  191 + "directoryName": "企业",
  192 + "directoryWeight": 1,
  193 + "id": 348,
  194 + "isShow": 1,
  195 + "level": 3,
  196 + "parentId": 336,
  197 + "rootId": 312
  198 + },
  199 + {
  200 + "directoryName": "部委",
  201 + "directoryWeight": 0,
  202 + "id": 344,
  203 + "isShow": 1,
  204 + "level": 3,
  205 + "parentId": 336,
  206 + "rootId": 312
  207 + },
  208 + {
  209 + "directoryName": "地方",
  210 + "directoryWeight": 0,
  211 + "id": 341,
  212 + "isShow": 1,
  213 + "level": 3,
  214 + "parentId": 336,
  215 + "rootId": 312
  216 + }
  217 + ],
  218 + "directoryName": "类型",
  219 + "directoryWeight": 0,
  220 + "id": 336,
  221 + "isShow": 1,
  222 + "level": 2,
  223 + "parentId": 312,
  224 + "rootId": 312
  225 + },
  226 + {
  227 + "children": [
  228 + {
  229 + "directoryName": "贵州省",
  230 + "directoryWeight": 0,
  231 + "id": 378,
  232 + "isShow": 1,
  233 + "level": 3,
  234 + "parentId": 332,
  235 + "rootId": 312
  236 + },
  237 + {
  238 + "directoryName": "西藏自治区",
  239 + "directoryWeight": 0,
  240 + "id": 377,
  241 + "isShow": 1,
  242 + "level": 3,
  243 + "parentId": 332,
  244 + "rootId": 312
  245 + },
  246 + {
  247 + "directoryName": "四川省",
  248 + "directoryWeight": 0,
  249 + "id": 376,
  250 + "isShow": 1,
  251 + "level": 3,
  252 + "parentId": 332,
  253 + "rootId": 312
  254 + },
  255 + {
  256 + "directoryName": "重庆市",
  257 + "directoryWeight": 0,
  258 + "id": 375,
  259 + "isShow": 1,
  260 + "level": 3,
  261 + "parentId": 332,
  262 + "rootId": 312
  263 + },
  264 + {
  265 + "directoryName": "湖南省",
  266 + "directoryWeight": 0,
  267 + "id": 374,
  268 + "isShow": 1,
  269 + "level": 3,
  270 + "parentId": 332,
  271 + "rootId": 312
  272 + },
  273 + {
  274 + "directoryName": "云南省",
  275 + "directoryWeight": 0,
  276 + "id": 373,
  277 + "isShow": 1,
  278 + "level": 3,
  279 + "parentId": 332,
  280 + "rootId": 312
  281 + },
  282 + {
  283 + "directoryName": "广西壮族自治区",
  284 + "directoryWeight": 0,
  285 + "id": 372,
  286 + "isShow": 1,
  287 + "level": 3,
  288 + "parentId": 332,
  289 + "rootId": 312
  290 + },
  291 + {
  292 + "directoryName": "宁夏回族自治区",
  293 + "directoryWeight": 0,
  294 + "id": 371,
  295 + "isShow": 1,
  296 + "level": 3,
  297 + "parentId": 332,
  298 + "rootId": 312
  299 + },
  300 + {
  301 + "directoryName": "湖北省",
  302 + "directoryWeight": 0,
  303 + "id": 370,
  304 + "isShow": 1,
  305 + "level": 3,
  306 + "parentId": 332,
  307 + "rootId": 312
  308 + },
  309 + {
  310 + "directoryName": "青海省",
  311 + "directoryWeight": 0,
  312 + "id": 369,
  313 + "isShow": 1,
  314 + "level": 3,
  315 + "parentId": 332,
  316 + "rootId": 312
  317 + },
  318 + {
  319 + "directoryName": "陕西省",
  320 + "directoryWeight": 0,
  321 + "id": 367,
  322 + "isShow": 1,
  323 + "level": 3,
  324 + "parentId": 332,
  325 + "rootId": 312
  326 + },
  327 + {
  328 + "directoryName": "甘肃省",
  329 + "directoryWeight": 0,
  330 + "id": 366,
  331 + "isShow": 1,
  332 + "level": 3,
  333 + "parentId": 332,
  334 + "rootId": 312
  335 + },
  336 + {
  337 + "directoryName": "吉林省",
  338 + "directoryWeight": 0,
  339 + "id": 365,
  340 + "isShow": 1,
  341 + "level": 3,
  342 + "parentId": 332,
  343 + "rootId": 312
  344 + },
  345 + {
  346 + "directoryName": "广东省",
  347 + "directoryWeight": 0,
  348 + "id": 364,
  349 + "isShow": 1,
  350 + "level": 3,
  351 + "parentId": 332,
  352 + "rootId": 312
  353 + },
  354 + {
  355 + "directoryName": "海南省",
  356 + "directoryWeight": 0,
  357 + "id": 363,
  358 + "isShow": 1,
  359 + "level": 3,
  360 + "parentId": 332,
  361 + "rootId": 312
  362 + },
  363 + {
  364 + "directoryName": "辽宁省",
  365 + "directoryWeight": 0,
  366 + "id": 362,
  367 + "isShow": 1,
  368 + "level": 3,
  369 + "parentId": 332,
  370 + "rootId": 312
  371 + },
  372 + {
  373 + "directoryName": "江苏省",
  374 + "directoryWeight": 0,
  375 + "id": 361,
  376 + "isShow": 1,
  377 + "level": 3,
  378 + "parentId": 332,
  379 + "rootId": 312
  380 + },
  381 + {
  382 + "directoryName": "新疆维吾尔族自治区",
  383 + "directoryWeight": 0,
  384 + "id": 360,
  385 + "isShow": 1,
  386 + "level": 3,
  387 + "parentId": 332,
  388 + "rootId": 312
  389 + },
  390 + {
  391 + "directoryName": "福建省",
  392 + "directoryWeight": 0,
  393 + "id": 359,
  394 + "isShow": 1,
  395 + "level": 3,
  396 + "parentId": 332,
  397 + "rootId": 312
  398 + },
  399 + {
  400 + "directoryName": "山东省",
  401 + "directoryWeight": 0,
  402 + "id": 358,
  403 + "isShow": 1,
  404 + "level": 3,
  405 + "parentId": 332,
  406 + "rootId": 312
  407 + },
  408 + {
  409 + "directoryName": "河南省",
  410 + "directoryWeight": 0,
  411 + "id": 357,
  412 + "isShow": 1,
  413 + "level": 3,
  414 + "parentId": 332,
  415 + "rootId": 312
  416 + },
  417 + {
  418 + "directoryName": "浙江省",
  419 + "directoryWeight": 0,
  420 + "id": 356,
  421 + "isShow": 1,
  422 + "level": 3,
  423 + "parentId": 332,
  424 + "rootId": 312
  425 + },
  426 + {
  427 + "directoryName": "安徽省",
  428 + "directoryWeight": 0,
  429 + "id": 355,
  430 + "isShow": 1,
  431 + "level": 3,
  432 + "parentId": 332,
  433 + "rootId": 312
  434 + },
  435 + {
  436 + "directoryName": "上海市",
  437 + "directoryWeight": 0,
  438 + "id": 354,
  439 + "isShow": 1,
  440 + "level": 3,
  441 + "parentId": 332,
  442 + "rootId": 312
  443 + },
  444 + {
  445 + "directoryName": "河北省",
  446 + "directoryWeight": 0,
  447 + "id": 353,
  448 + "isShow": 1,
  449 + "level": 3,
  450 + "parentId": 332,
  451 + "rootId": 312
  452 + },
  453 + {
  454 + "directoryName": "黑龙江省",
  455 + "directoryWeight": 0,
  456 + "id": 352,
  457 + "isShow": 1,
  458 + "level": 3,
  459 + "parentId": 332,
  460 + "rootId": 312
  461 + },
  462 + {
  463 + "directoryName": "江西省",
  464 + "directoryWeight": 0,
  465 + "id": 351,
  466 + "isShow": 1,
  467 + "level": 3,
  468 + "parentId": 332,
  469 + "rootId": 312
  470 + },
  471 + {
  472 + "directoryName": "内蒙古自治区",
  473 + "directoryWeight": 0,
  474 + "id": 350,
  475 + "isShow": 1,
  476 + "level": 3,
  477 + "parentId": 332,
  478 + "rootId": 312
  479 + },
  480 + {
  481 + "directoryName": "北京市",
  482 + "directoryWeight": 0,
  483 + "id": 349,
  484 + "isShow": 1,
  485 + "level": 3,
  486 + "parentId": 332,
  487 + "rootId": 312
  488 + },
  489 + {
  490 + "directoryName": "山西省",
  491 + "directoryWeight": 0,
  492 + "id": 346,
  493 + "isShow": 1,
  494 + "level": 3,
  495 + "parentId": 332,
  496 + "rootId": 312
  497 + }
  498 + ],
  499 + "directoryName": "地域",
  500 + "directoryWeight": 0,
  501 + "id": 332,
  502 + "isShow": 1,
  503 + "level": 2,
  504 + "parentId": 312,
  505 + "rootId": 312
  506 + }
  507 + ],
  508 + "directoryName": "政务",
  509 + "directoryWeight": 5,
  510 + "id": 312,
  511 + "isShow": 1,
  512 + "level": 1,
  513 + "parentId": 0,
  514 + "rootId": 0
  515 + },
  516 + {
  517 + "children": [],
  518 + "directoryName": "学校",
  519 + "directoryWeight": 4,
  520 + "id": 331,
  521 + "isShow": 1,
  522 + "level": 1,
  523 + "parentId": 0,
  524 + "rootId": 0
  525 + },
  526 + {
  527 + "children": [],
  528 + "directoryName": "机构",
  529 + "directoryWeight": 3,
  530 + "id": 330,
  531 + "isShow": 1,
  532 + "level": 1,
  533 + "parentId": 0,
  534 + "rootId": 0
  535 + },
  536 + {
  537 + "children": [
  538 + {
  539 + "children": [
  540 + {
  541 + "directoryName": "新闻联播",
  542 + "directoryWeight": 3,
  543 + "id": 79,
  544 + "isShow": 1,
  545 + "level": 3,
  546 + "parentId": 75,
  547 + "rootId": 74
  548 + },
  549 + {
  550 + "directoryName": "第三季",
  551 + "directoryWeight": 2,
  552 + "id": 78,
  553 + "isShow": 1,
  554 + "level": 3,
  555 + "parentId": 75,
  556 + "rootId": 74
  557 + },
  558 + {
  559 + "directoryName": "三级",
  560 + "directoryWeight": 1,
  561 + "id": 76,
  562 + "isShow": 1,
  563 + "level": 3,
  564 + "parentId": 75,
  565 + "rootId": 74
  566 + }
  567 + ],
  568 + "directoryName": "短视频",
  569 + "directoryWeight": 1,
  570 + "id": 75,
  571 + "isShow": 1,
  572 + "level": 2,
  573 + "parentId": 74,
  574 + "rootId": 74
  575 + }
  576 + ],
  577 + "directoryName": "创作",
  578 + "directoryWeight": 3,
  579 + "id": 74,
  580 + "isShow": 1,
  581 + "level": 1,
  582 + "parentId": 0,
  583 + "rootId": 0
  584 + },
  585 + {
  586 + "children": [
  587 + {
  588 + "children": [],
  589 + "directoryName": "教学",
  590 + "directoryWeight": 2,
  591 + "id": 72,
  592 + "isShow": 1,
  593 + "level": 2,
  594 + "parentId": 64,
  595 + "rootId": 64
  596 + },
  597 + {
  598 + "children": [],
  599 + "directoryName": "热门",
  600 + "directoryWeight": 1,
  601 + "id": 73,
  602 + "isShow": 1,
  603 + "level": 2,
  604 + "parentId": 64,
  605 + "rootId": 64
  606 + },
  607 + {
  608 + "children": [],
  609 + "directoryName": "赛事",
  610 + "directoryWeight": 1,
  611 + "id": 71,
  612 + "isShow": 1,
  613 + "level": 2,
  614 + "parentId": 64,
  615 + "rootId": 64
  616 + }
  617 + ],
  618 + "directoryName": "游戏",
  619 + "directoryWeight": 2,
  620 + "id": 64,
  621 + "isShow": 1,
  622 + "level": 1,
  623 + "parentId": 0,
  624 + "rootId": 0
  625 + },
  626 + {
  627 + "children": [],
  628 + "directoryName": "新闻",
  629 + "directoryWeight": 1,
  630 + "id": 315,
  631 + "isShow": 1,
  632 + "level": 1,
  633 + "parentId": 0,
  634 + "rootId": 0
  635 + },
  636 + {
  637 + "children": [
  638 + {
  639 + "children": [],
  640 + "directoryName": "趣闻",
  641 + "directoryWeight": 6,
  642 + "id": 70,
  643 + "isShow": 1,
  644 + "level": 2,
  645 + "parentId": 63,
  646 + "rootId": 63
  647 + },
  648 + {
  649 + "children": [],
  650 + "directoryName": "时政",
  651 + "directoryWeight": 5,
  652 + "id": 69,
  653 + "isShow": 1,
  654 + "level": 2,
  655 + "parentId": 63,
  656 + "rootId": 63
  657 + },
  658 + {
  659 + "children": [],
  660 + "directoryName": "农业",
  661 + "directoryWeight": 3,
  662 + "id": 68,
  663 + "isShow": 1,
  664 + "level": 2,
  665 + "parentId": 63,
  666 + "rootId": 63
  667 + },
  668 + {
  669 + "children": [],
  670 + "directoryName": "娱乐",
  671 + "directoryWeight": 3,
  672 + "id": 67,
  673 + "isShow": 1,
  674 + "level": 2,
  675 + "parentId": 63,
  676 + "rootId": 63
  677 + },
  678 + {
  679 + "children": [],
  680 + "directoryName": "科技",
  681 + "directoryWeight": 2,
  682 + "id": 66,
  683 + "isShow": 1,
  684 + "level": 2,
  685 + "parentId": 63,
  686 + "rootId": 63
  687 + },
  688 + {
  689 + "children": [],
  690 + "directoryName": "国际",
  691 + "directoryWeight": 1,
  692 + "id": 65,
  693 + "isShow": 1,
  694 + "level": 2,
  695 + "parentId": 63,
  696 + "rootId": 63
  697 + }
  698 + ],
  699 + "directoryName": "新闻",
  700 + "directoryWeight": 1,
  701 + "id": 63,
  702 + "isShow": 1,
  703 + "level": 1,
  704 + "parentId": 0,
  705 + "rootId": 0
  706 + },
  707 + {
  708 + "children": [],
  709 + "directoryName": "公安",
  710 + "directoryWeight": 0,
  711 + "id": 388,
  712 + "isShow": 1,
  713 + "level": 1,
  714 + "parentId": 0,
  715 + "rootId": 0
  716 + },
  717 + {
  718 + "children": [],
  719 + "directoryName": "dddd",
  720 + "directoryWeight": 0,
  721 + "id": 387,
  722 + "isShow": 1,
  723 + "level": 1,
  724 + "parentId": 0,
  725 + "rootId": 0
  726 + },
  727 + {
  728 + "children": [],
  729 + "directoryName": "健康",
  730 + "directoryWeight": 0,
  731 + "id": 384,
  732 + "isShow": 1,
  733 + "level": 1,
  734 + "parentId": 0,
  735 + "rootId": 0
  736 + },
  737 + {
  738 + "children": [],
  739 + "directoryName": "综合",
  740 + "directoryWeight": 0,
  741 + "id": 328,
  742 + "isShow": 1,
  743 + "level": 1,
  744 + "parentId": 0,
  745 + "rootId": 0
  746 + },
  747 + {
  748 + "children": [],
  749 + "directoryName": "房产",
  750 + "directoryWeight": 0,
  751 + "id": 327,
  752 + "isShow": 1,
  753 + "level": 1,
  754 + "parentId": 0,
  755 + "rootId": 0
  756 + },
  757 + {
  758 + "children": [],
  759 + "directoryName": "健康",
  760 + "directoryWeight": 0,
  761 + "id": 318,
  762 + "isShow": 1,
  763 + "level": 1,
  764 + "parentId": 0,
  765 + "rootId": 0
  766 + },
  767 + {
  768 + "children": [],
  769 + "directoryName": "历史",
  770 + "directoryWeight": 0,
  771 + "id": 310,
  772 + "isShow": 1,
  773 + "level": 1,
  774 + "parentId": 0,
  775 + "rootId": 0
  776 + },
  777 + {
  778 + "children": [],
  779 + "directoryName": "dddd",
  780 + "directoryWeight": 0,
  781 + "id": 309,
  782 + "isShow": 1,
  783 + "level": 1,
  784 + "parentId": 0,
  785 + "rootId": 0
  786 + },
  787 + {
  788 + "children": [
  789 + {
  790 + "children": [],
  791 + "directoryName": "aaaa",
  792 + "directoryWeight": 1,
  793 + "id": 333,
  794 + "isShow": 1,
  795 + "level": 2,
  796 + "parentId": 308,
  797 + "rootId": 308
  798 + },
  799 + {
  800 + "children": [],
  801 + "directoryName": "qqq",
  802 + "directoryWeight": 0,
  803 + "id": 334,
  804 + "isShow": 1,
  805 + "level": 2,
  806 + "parentId": 308,
  807 + "rootId": 308
  808 + }
  809 + ],
  810 + "directoryName": "dddd",
  811 + "directoryWeight": 0,
  812 + "id": 308,
  813 + "isShow": 1,
  814 + "level": 1,
  815 + "parentId": 0,
  816 + "rootId": 0
  817 + }
  818 + ],
  819 + "message": "Success",
  820 + "success": true,
  821 + "timestamp": 1710741803593
  822 +}
  1 +{
  2 + "code": "0",
  3 + "data": {
  4 + "list": [{
  5 + "attentionNum": 0,
  6 + "authIcon": "",
  7 + "authId": 0,
  8 + "authPersonal": "",
  9 + "authTitle": "",
  10 + "categoryAuth": "",
  11 + "city": "110100",
  12 + "cnAttentionNum": 0,
  13 + "cnCollectNum": 0,
  14 + "cnCommentNum": 0,
  15 + "cnFansNum": 4,
  16 + "cnIsAttention": 1,
  17 + "cnIsComment": 1,
  18 + "cnIsLike": 1,
  19 + "cnLikeNum": 0,
  20 + "cnLiveCommentControl": 1,
  21 + "cnLiveGiftControl": 1,
  22 + "cnLiveLikeControl": 1,
  23 + "cnLiveShareControl": 1,
  24 + "cnMainControl": 1,
  25 + "cnRegistTime": 1695280071000,
  26 + "cnShareControl": 1,
  27 + "cnShareNum": 0,
  28 + "cnUserId": "444937588589253",
  29 + "cnUserName": "QACrawler2115",
  30 + "cnUserType": "2",
  31 + "collectNum": 0,
  32 + "creatorId": "3004862",
  33 + "district": "110101",
  34 + "fansNum": 0,
  35 + "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",
  36 + "honoraryIcon": "",
  37 + "honoraryTitle": "",
  38 + "introduction": "知识博主",
  39 + "isAttention": 1,
  40 + "isComment": 1,
  41 + "isLike": 1,
  42 + "isVisiable": 1,
  43 + "likeNum": 0,
  44 + "liveCommentControl": 1,
  45 + "liveGiftControl": 1,
  46 + "liveLikeControl": 1,
  47 + "liveShareControl": 1,
  48 + "posterShareControl": 1,
  49 + "province": "110000",
  50 + "publishNum": 0,
  51 + "region": "",
  52 + "shareControl": 1,
  53 + "shareNum": 0,
  54 + "shopOpen": 0,
  55 + "storeUrl": "",
  56 + "subjectType": 0,
  57 + "userId": "",
  58 + "userName": "QACrawler2115",
  59 + "userType": "2",
  60 + "waresSwitch": 1
  61 + }, {
  62 + "attentionNum": 0,
  63 + "authIcon": "",
  64 + "authId": 0,
  65 + "authPersonal": "",
  66 + "authTitle": "",
  67 + "categoryAuth": "",
  68 + "city": "230100",
  69 + "cnAttentionNum": 0,
  70 + "cnCollectNum": 0,
  71 + "cnCommentNum": 0,
  72 + "cnFansNum": 4,
  73 + "cnIsAttention": 1,
  74 + "cnIsComment": 1,
  75 + "cnIsLike": 1,
  76 + "cnLikeNum": 0,
  77 + "cnLiveCommentControl": 1,
  78 + "cnLiveGiftControl": 1,
  79 + "cnLiveLikeControl": 1,
  80 + "cnLiveShareControl": 1,
  81 + "cnMainControl": 1,
  82 + "cnRegistTime": 1695276994000,
  83 + "cnShareControl": 1,
  84 + "cnShareNum": 0,
  85 + "cnUserId": "444911718724933",
  86 + "cnUserName": "一休哥",
  87 + "cnUserType": "2",
  88 + "collectNum": 0,
  89 + "creatorId": "3004861",
  90 + "district": "230102",
  91 + "fansNum": 0,
  92 + "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",
  93 + "honoraryIcon": "",
  94 + "honoraryTitle": "",
  95 + "introduction": "中文端号主",
  96 + "isAttention": 1,
  97 + "isComment": 1,
  98 + "isLike": 1,
  99 + "isVisiable": 1,
  100 + "likeNum": 0,
  101 + "liveCommentControl": 1,
  102 + "liveGiftControl": 1,
  103 + "liveLikeControl": 1,
  104 + "liveShareControl": 1,
  105 + "posterShareControl": 1,
  106 + "province": "230000",
  107 + "publishNum": 0,
  108 + "region": "安徽",
  109 + "shareControl": 1,
  110 + "shareNum": 0,
  111 + "shopOpen": 0,
  112 + "storeUrl": "",
  113 + "subjectType": 2,
  114 + "userId": "",
  115 + "userName": "一休哥",
  116 + "userType": "2",
  117 + "waresSwitch": 1
  118 + }, {
  119 + "attentionNum": 0,
  120 + "authIcon": "",
  121 + "authId": 0,
  122 + "authPersonal": "",
  123 + "authTitle": "",
  124 + "categoryAuth": "",
  125 + "city": "110100",
  126 + "cnAttentionNum": 0,
  127 + "cnCollectNum": 0,
  128 + "cnCommentNum": 12,
  129 + "cnFansNum": 8,
  130 + "cnIsAttention": 1,
  131 + "cnIsComment": 1,
  132 + "cnIsLike": 1,
  133 + "cnLikeNum": 2,
  134 + "cnLiveCommentControl": 1,
  135 + "cnLiveGiftControl": 1,
  136 + "cnLiveLikeControl": 1,
  137 + "cnLiveShareControl": 1,
  138 + "cnMainControl": 1,
  139 + "cnRegistTime": 1695275999000,
  140 + "cnShareControl": 1,
  141 + "cnShareNum": 1,
  142 + "cnUserId": "444903323309381",
  143 + "cnUserName": "0921媒体",
  144 + "cnUserType": "3",
  145 + "collectNum": 0,
  146 + "creatorId": "3004860",
  147 + "district": "110101",
  148 + "fansNum": 0,
  149 + "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",
  150 + "honoraryIcon": "",
  151 + "honoraryTitle": "",
  152 + "introduction": "0921媒体",
  153 + "isAttention": 1,
  154 + "isComment": 1,
  155 + "isLike": 1,
  156 + "isVisiable": 1,
  157 + "likeNum": 0,
  158 + "liveCommentControl": 1,
  159 + "liveGiftControl": 1,
  160 + "liveLikeControl": 1,
  161 + "liveShareControl": 1,
  162 + "posterShareControl": 0,
  163 + "province": "110000",
  164 + "publishNum": 0,
  165 + "region": "上海",
  166 + "shareControl": 1,
  167 + "shareNum": 0,
  168 + "shopOpen": 0,
  169 + "storeUrl": "",
  170 + "subjectType": 1,
  171 + "userId": "",
  172 + "userName": "0921媒体",
  173 + "userType": "3",
  174 + "waresSwitch": 1
  175 + }, {
  176 + "attentionNum": 0,
  177 + "authIcon": "https://sitcontentjdcdn.aikan.pdnews.cn/creator-category/icon/auth/blue.png",
  178 + "authId": 1,
  179 + "authPersonal": "",
  180 + "authTitle": "黄袍加身V",
  181 + "categoryAuth": "黄袍加身V",
  182 + "city": "340100",
  183 + "cnAttentionNum": 9,
  184 + "cnCollectNum": 0,
  185 + "cnCommentNum": 3,
  186 + "cnFansNum": 9,
  187 + "cnIsAttention": 1,
  188 + "cnIsComment": 1,
  189 + "cnIsLike": 1,
  190 + "cnLikeNum": 7,
  191 + "cnLiveCommentControl": 1,
  192 + "cnLiveGiftControl": 1,
  193 + "cnLiveLikeControl": 1,
  194 + "cnLiveShareControl": 1,
  195 + "cnMainControl": 1,
  196 + "cnRegistTime": 1695260417000,
  197 + "cnShareControl": 1,
  198 + "cnShareNum": 0,
  199 + "cnUserId": "444776025830725",
  200 + "cnUserName": "李智恩3",
  201 + "cnUserType": "2",
  202 + "collectNum": 0,
  203 + "creatorId": "3004855",
  204 + "district": "340102",
  205 + "fansNum": 0,
  206 + "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",
  207 + "honoraryIcon": "",
  208 + "honoraryTitle": "",
  209 + "introduction": "IU",
  210 + "isAttention": 1,
  211 + "isComment": 1,
  212 + "isLike": 1,
  213 + "isVisiable": 1,
  214 + "likeNum": 0,
  215 + "liveCommentControl": 1,
  216 + "liveGiftControl": 1,
  217 + "liveLikeControl": 1,
  218 + "liveShareControl": 1,
  219 + "posterShareControl": 0,
  220 + "province": "340000",
  221 + "publishNum": 0,
  222 + "region": "安徽",
  223 + "shareControl": 1,
  224 + "shareNum": 0,
  225 + "shopOpen": 1,
  226 + "storeUrl": "",
  227 + "subjectType": 1,
  228 + "userId": "",
  229 + "userName": "李智恩3",
  230 + "userType": "2",
  231 + "waresSwitch": 0
  232 + }, {
  233 + "attentionNum": 0,
  234 + "authIcon": "https://sitcontentjdcdn.aikan.pdnews.cn/creator-category/icon/auth/yellow.png",
  235 + "authId": 2,
  236 + "authPersonal": "",
  237 + "authTitle": "黄VV",
  238 + "categoryAuth": "黄VV",
  239 + "city": "120100",
  240 + "cnAttentionNum": 1,
  241 + "cnCollectNum": 1,
  242 + "cnCommentNum": 7,
  243 + "cnFansNum": 13,
  244 + "cnIsAttention": 1,
  245 + "cnIsComment": 1,
  246 + "cnIsLike": 1,
  247 + "cnLikeNum": 0,
  248 + "cnLiveCommentControl": 1,
  249 + "cnLiveGiftControl": 1,
  250 + "cnLiveLikeControl": 1,
  251 + "cnLiveShareControl": 1,
  252 + "cnMainControl": 1,
  253 + "cnRegistTime": 1695202406000,
  254 + "cnShareControl": 1,
  255 + "cnShareNum": 0,
  256 + "cnUserId": "444300764043333",
  257 + "cnUserName": "创作者账号7777",
  258 + "cnUserType": "2",
  259 + "collectNum": 0,
  260 + "creatorId": "3004853",
  261 + "district": "120101",
  262 + "fansNum": 0,
  263 + "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",
  264 + "honoraryIcon": "",
  265 + "honoraryTitle": "",
  266 + "introduction": "协作平台是进行团队开发、协作的系统,一般是基于互联网,也有用专业网的情况。协作平台的主要功能是:分工合作、进度控制、版本控制等功能。协作平台是进行团队开发、协作的系统,一般是基于互联网,也有用专业网的情况。协作平台的主要功能是:分工合作、进度控制、版本控制等功能。协作平台是进行团队开发、协作的系统,一般是基于互联网,也有用专业网的情况。协作平台的主要功能是:分工合作、进度控制、版本控制等功能。协作",
  267 + "isAttention": 1,
  268 + "isComment": 1,
  269 + "isLike": 1,
  270 + "isVisiable": 1,
  271 + "likeNum": 0,
  272 + "liveCommentControl": 1,
  273 + "liveGiftControl": 1,
  274 + "liveLikeControl": 1,
  275 + "liveShareControl": 1,
  276 + "posterShareControl": 0,
  277 + "province": "120000",
  278 + "publishNum": 0,
  279 + "region": "安徽",
  280 + "shareControl": 1,
  281 + "shareNum": 0,
  282 + "shopOpen": 1,
  283 + "storeUrl": "",
  284 + "subjectType": 0,
  285 + "userId": "",
  286 + "userName": "创作者账号7777",
  287 + "userType": "2",
  288 + "waresSwitch": 0
  289 + }, {
  290 + "attentionNum": 0,
  291 + "authIcon": "",
  292 + "authId": 0,
  293 + "authPersonal": "",
  294 + "authTitle": "",
  295 + "categoryAuth": "",
  296 + "city": "110100",
  297 + "cnAttentionNum": 0,
  298 + "cnCollectNum": 0,
  299 + "cnCommentNum": 0,
  300 + "cnFansNum": 9,
  301 + "cnIsAttention": 1,
  302 + "cnIsComment": 1,
  303 + "cnIsLike": 1,
  304 + "cnLikeNum": 6,
  305 + "cnLiveCommentControl": 1,
  306 + "cnLiveGiftControl": 1,
  307 + "cnLiveLikeControl": 1,
  308 + "cnLiveShareControl": 1,
  309 + "cnMainControl": 1,
  310 + "cnRegistTime": 1695201858000,
  311 + "cnShareControl": 1,
  312 + "cnShareNum": 0,
  313 + "cnUserId": "444296355502149",
  314 + "cnUserName": "0920个人",
  315 + "cnUserType": "2",
  316 + "collectNum": 0,
  317 + "creatorId": "3004851",
  318 + "district": "110101",
  319 + "fansNum": 0,
  320 + "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",
  321 + "honoraryIcon": "https://cdn.aikan.pdnews.cn/image/picture/202312/20231223173451966FdV.png",
  322 + "honoraryTitle": "快乐星球",
  323 + "introduction": "账号简介",
  324 + "isAttention": 1,
  325 + "isComment": 1,
  326 + "isLike": 1,
  327 + "isVisiable": 1,
  328 + "likeNum": 0,
  329 + "liveCommentControl": 1,
  330 + "liveGiftControl": 1,
  331 + "liveLikeControl": 1,
  332 + "liveShareControl": 1,
  333 + "posterShareControl": 1,
  334 + "province": "110000",
  335 + "publishNum": 0,
  336 + "region": "上海",
  337 + "shareControl": 1,
  338 + "shareNum": 0,
  339 + "shopOpen": 0,
  340 + "storeUrl": "",
  341 + "subjectType": 0,
  342 + "userId": "",
  343 + "userName": "0920个人",
  344 + "userType": "2",
  345 + "waresSwitch": 1
  346 + }, {
  347 + "attentionNum": 0,
  348 + "authIcon": "",
  349 + "authId": 0,
  350 + "authPersonal": "",
  351 + "authTitle": "",
  352 + "categoryAuth": "",
  353 + "city": "120100",
  354 + "cnAttentionNum": 0,
  355 + "cnCollectNum": 0,
  356 + "cnCommentNum": 0,
  357 + "cnFansNum": 10,
  358 + "cnIsAttention": 1,
  359 + "cnIsComment": 1,
  360 + "cnIsLike": 1,
  361 + "cnLikeNum": 0,
  362 + "cnLiveCommentControl": 1,
  363 + "cnLiveGiftControl": 1,
  364 + "cnLiveLikeControl": 1,
  365 + "cnLiveShareControl": 1,
  366 + "cnMainControl": 1,
  367 + "cnRegistTime": 1695190066000,
  368 + "cnShareControl": 1,
  369 + "cnShareNum": 0,
  370 + "cnUserId": "444200272593477",
  371 + "cnUserName": "zhuaqu005",
  372 + "cnUserType": "2",
  373 + "collectNum": 0,
  374 + "creatorId": "3004849",
  375 + "district": "120101",
  376 + "fansNum": 0,
  377 + "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",
  378 + "honoraryIcon": "",
  379 + "honoraryTitle": "",
  380 + "introduction": "aaa",
  381 + "isAttention": 1,
  382 + "isComment": 1,
  383 + "isLike": 1,
  384 + "isVisiable": 1,
  385 + "likeNum": 0,
  386 + "liveCommentControl": 1,
  387 + "liveGiftControl": 1,
  388 + "liveLikeControl": 1,
  389 + "liveShareControl": 1,
  390 + "posterShareControl": 1,
  391 + "province": "120000",
  392 + "publishNum": 0,
  393 + "region": "上海",
  394 + "shareControl": 1,
  395 + "shareNum": 0,
  396 + "shopOpen": 0,
  397 + "storeUrl": "",
  398 + "subjectType": 0,
  399 + "userId": "",
  400 + "userName": "zhuaqu005",
  401 + "userType": "2",
  402 + "waresSwitch": 1
  403 + }],
  404 + "pageNum": 1,
  405 + "pageSize": 20,
  406 + "totalCount": 7
  407 + },
  408 + "message": "Success",
  409 + "success": true,
  410 + "timestamp": 1710742034894
  411 +}
@@ -33,3 +33,9 @@ export { MineSettingComponent } from "./components/page/MineSettingComponent" @@ -33,3 +33,9 @@ export { MineSettingComponent } from "./components/page/MineSettingComponent"
33 export { AboutPageUI } from "./components/page/about/AboutPageUI" 33 export { AboutPageUI } from "./components/page/about/AboutPageUI"
34 34
35 export { AppointmentListUI } from "./components/page/mine/AppointmentListUI" 35 export { AppointmentListUI } from "./components/page/mine/AppointmentListUI"
  36 +
  37 +export { AccountAndSecurityLayout } from "./components/page/AccountAndSecurityLayout"
  38 +
  39 +export { SettingPasswordLayout } from "./components/page/SettingPasswordLayout"
  40 +
  41 +export { FollowFirstTabsComponent } from "./components/page/mine/follow/FollowFirstTabsComponent"
  1 +// @ts-nocheck
  2 +import { BottomNavi, CommonConstants } from 'wdConstant';
  3 +import { Logger } from 'wdKit';
  4 +import { TopNavigationComponent } from './TopNavigationComponent';
  5 +import { BottomNavDTO } from '../../repository/bean/BottomNavDTO';
  6 +import { UIUtils } from '../../repository/UIUtils';
  7 +import { MinePageComponent } from './MinePageComponent';
  8 +import PageViewModel from '../../viewmodel/PageViewModel';
  9 +import MineSettingDatasModel from '../../model/MineSettingDatasModel';
  10 +import { MineMainSettingFunctionItem } from '../viewmodel/MineMainSettingFunctionItem'
  11 +
  12 +import storageStatistics from "@ohos.file.storageStatistics";
  13 +import { BusinessError } from '@ohos.base';
  14 +import ArrayList from '@ohos.util.ArrayList';
  15 +
  16 +
  17 +@Component
  18 +export struct AccountAndSecurityLayout {
  19 + @State listData: ArrayList<any> = new ArrayList();
  20 + @State privacySwitch: boolean = false
  21 + @State cacheSice: number = 0
  22 +
  23 + aboutToAppear() {
  24 + // 获取设置页面数据
  25 + this.getAccountAndSecurityData()
  26 + }
  27 +
  28 + getAccountAndSecurityData() {
  29 + this.listData = MineSettingDatasModel.getAccountAndSecuritySettingData()
  30 + }
  31 +
  32 + build() {
  33 + Navigation() {
  34 + //滑动区域
  35 + this.settingList()
  36 + }.titleMode(NavigationTitleMode.Mini)
  37 + .title('账号与安全')
  38 + }
  39 +
  40 + // 页面布局
  41 + @Builder settingList() {
  42 + Stack({ alignContent: Alignment.Bottom }) {
  43 + Column() {
  44 + List() {
  45 + ForEach(this.listData, (item: MineMainSettingFunctionItem, index: number) => {
  46 + ListItem() {
  47 + if (item.type == 0) {
  48 + Column() {
  49 + this.getArrowCell(item)
  50 + }.padding({ left: '27lpx' }).height('117lpx').justifyContent(FlexAlign.Center)
  51 + } else if (item.type == 1) {
  52 + Column() {
  53 + this.getSwitchCell(item)
  54 + }.padding({ left: '27lpx' }).height('117lpx').justifyContent(FlexAlign.Center)
  55 + } else {
  56 + Column().width('100%').height('15lpx').backgroundColor(0xf0f0f0)
  57 + }
  58 + }
  59 + .onClick(() => {
  60 + console.log(index + "")
  61 + RouteManager.jumpNewPage("pages/SettingPasswordPage") // 调用跳转方法,跳转新页面
  62 + })
  63 +
  64 + }, item => item)
  65 + }
  66 + .divider({
  67 + strokeWidth: 1,
  68 + startMargin: 15,
  69 + endMargin: 10,
  70 + color: '#f0f0f0'
  71 + })
  72 + .onScrollFrameBegin((offset, state) => {
  73 + return { offsetRemain: 0 }
  74 + })
  75 + }.height("100%")
  76 +
  77 + Column() {
  78 + Button('退出登录',{ stateEffect: true }).width('90%').height('80lpx').backgroundColor('#da3e22').fontColor('#fff').margin('20lpx').onClick(()=>{
  79 + AlertDialog.show({
  80 + title: '🥟id : ' + "button",
  81 + message: '标题:' + '退出登录',
  82 + confirm: {
  83 + value: "OK",
  84 + action: () => {
  85 +
  86 + },
  87 + }
  88 + })
  89 + })
  90 + }
  91 +
  92 + }
  93 + }
  94 +
  95 + @Builder itemHead(text: string) {
  96 + // 列表分组的头部组件,对应联系人分组A、B等位置的组件
  97 + if (text.length > 0) {
  98 + Row().width('100%').height('20lpx').backgroundColor(0xf0f0f0)
  99 + }
  100 + }
  101 +
  102 + // 右侧开关cell
  103 + @Builder getSwitchCell(item: MineMainSettingFunctionItem) {
  104 + Column() {
  105 + Row() {
  106 + // 左侧logo和标题
  107 + Row() {
  108 + // 判断有没有图片
  109 + if (item.imgSrc) {
  110 + Image(item.imgSrc).height('38lpx').margin({ right: '5lpx' })
  111 + Text(`${item.title}`).margin({ top: '8lpx' }).height('38lpx').fontColor('#333333').fontSize('29lpx')
  112 + } else {
  113 + Text(`${item.title}`).margin({ top: '8lpx' }).height('38lpx').fontColor('#333333').fontSize('29lpx')
  114 + }
  115 + }.width('60%')
  116 +
  117 + // 右侧文案和右箭头
  118 + Row() {
  119 + Toggle({ type: ToggleType.Switch, isOn: item.switchState })
  120 + .height('50lpx')
  121 + .margin({ left: '81lpx', right: '29lpx' })
  122 + .selectedColor(Color.Pink)
  123 + .onChange((isOn: boolean) => {
  124 + this.privacySwitch = isOn;
  125 + })
  126 + }.width('40%')
  127 + .margin({ right: '29lpx' })
  128 + .justifyContent(FlexAlign.End)
  129 +
  130 + }
  131 + .alignItems(VerticalAlign.Center)
  132 + .justifyContent(FlexAlign.SpaceBetween)
  133 + }.height('54lpx')
  134 + }
  135 +
  136 + // 右文字+箭头cell
  137 + @Builder getArrowCell(item: MineMainSettingFunctionItem) {
  138 + Column() {
  139 + Row() {
  140 + // 左侧logo和标题
  141 + Row() {
  142 + // 判断有没有图片
  143 + if (item.imgSrc) {
  144 + Image(item.imgSrc)
  145 + .height('38lpx')
  146 + .margin({ right: '5lpx' })
  147 + }
  148 + Text(`${item.title}`)
  149 + .margin({ top: '8lpx' })
  150 + .height('38lpx')
  151 + .fontColor('#333333')
  152 + .fontSize('29lpx')
  153 + }.width('60%')
  154 +
  155 + // 右侧文案和右箭头
  156 + Row() {
  157 + Text(item.subTitle ? item.subTitle : '')
  158 + .fontColor('#999999')
  159 + .maxLines(1)
  160 + Image($r('app.media.mine_user_arrow'))
  161 + .width('27lpx')
  162 + .height('27lpx')
  163 + .objectFit(ImageFit.Auto)
  164 + Column().width('29lpx')
  165 + }.width('40%')
  166 + .margin({ right: '29lpx' })
  167 + .justifyContent(FlexAlign.End)
  168 +
  169 + }
  170 + .alignItems(VerticalAlign.Center)
  171 + .justifyContent(FlexAlign.SpaceBetween)
  172 +
  173 + }
  174 + .height('54lpx')
  175 + }
  176 +}
@@ -9,13 +9,14 @@ import PageViewModel from '../../viewmodel/PageViewModel'; @@ -9,13 +9,14 @@ import PageViewModel from '../../viewmodel/PageViewModel';
9 9
10 import storageStatistics from "@ohos.file.storageStatistics"; 10 import storageStatistics from "@ohos.file.storageStatistics";
11 import { BusinessError } from '@ohos.base'; 11 import { BusinessError } from '@ohos.base';
  12 +import RouteManager from '../../utils/RouteManager'
12 13
13 14
14 @Component 15 @Component
15 export struct MineSettingComponent { 16 export struct MineSettingComponent {
16 @State listData: Array<string | Array<string>> = new Array(); 17 @State listData: Array<string | Array<string>> = new Array();
17 - @State privacySwitch:boolean = false  
18 - @State cacheSice:number = 0 18 + @State privacySwitch: boolean = false
  19 + @State cacheSice: number = 0
19 20
20 aboutToAppear() { 21 aboutToAppear() {
21 // 获取设置页面数据 22 // 获取设置页面数据
@@ -26,7 +27,7 @@ export struct MineSettingComponent { @@ -26,7 +27,7 @@ export struct MineSettingComponent {
26 if (err) { 27 if (err) {
27 console.error(`Invoke getCurrentBundleStats failed, code is ${err.code}, message is ${err.message}`); 28 console.error(`Invoke getCurrentBundleStats failed, code is ${err.code}, message is ${err.message}`);
28 } else { 29 } else {
29 - this.cacheSice = bundleStats.appSize / 1024.00 / 1024.00.toFixed(2); 30 + this.cacheSice = bundleStats.appSize / 1024.00 / 1024.00.toFixed(2);
30 } 31 }
31 }); 32 });
32 } 33 }
@@ -64,10 +65,12 @@ export struct MineSettingComponent { @@ -64,10 +65,12 @@ export struct MineSettingComponent {
64 65
65 }.padding({ left: '27lpx' }) 66 }.padding({ left: '27lpx' })
66 .onClick(() => { 67 .onClick(() => {
67 - console.log(subIndex + "")  
68 - if (subIndex == 4) {  
69 - // RouteManager.jumpNewPage("pages/SettingPage") // 调用跳转方法,跳转新页面  
70 - } 68 + // 在Home页面中
  69 + let paramsInfo: object = {
  70 + pageId: 123,
  71 + pageType:'AccountAndSecurityLayout'
  72 + };
  73 + RouteManager.jumpNewPage("pages/SettingPasswordPage") // 调用跳转方法,跳转新页面
71 }) 74 })
72 .height('117lpx') 75 .height('117lpx')
73 }, subItem => subItem) 76 }, subItem => subItem)
  1 +import ArrayList from '@ohos.util.ArrayList';
  2 +import promptAction from '@ohos.promptAction';
  3 +
  4 +export default class AccoutPageDataModel {
  5 + // 页面数据
  6 + compType: number // 0:标题 / 1:密码输入框 / 2:验证码输入框 / 3:desc描述 / 4:按钮 / 5:logo / 6:子标题 7:手机号输入框 7:空白
  7 + compLogo: string
  8 + compTitle: string
  9 + compSubTitle: string
  10 + compDesc: string
  11 + compButtonTitle: string
  12 + inputPlacholder: string
  13 + inputTag: number
  14 +
  15 + constructor(compType: number, compTitle: string, compLogo: string, compDesc: string, compButtonTitle: string, inputPlacholder: string, inputTag: number) {
  16 + this.compType = compType
  17 + this.compTitle = compTitle
  18 + this.compLogo = compLogo
  19 + this.compDesc = compDesc
  20 + this.compButtonTitle = compButtonTitle
  21 + this.inputPlacholder = inputPlacholder
  22 + this.inputTag = inputTag
  23 + }
  24 +}
  25 +
  26 +@Component
  27 +export struct SettingPasswordLayout {
  28 + @State listData: Array<AccoutPageDataModel> = new Array(); // 页面配置数据
  29 + @State btnStatus: boolean = false
  30 + password01: string
  31 + password02: string
  32 + passwordOri: string
  33 +
  34 + aboutToAppear() {
  35 + this.getPageListData(4)
  36 + }
  37 +
  38 + getPageListData(pageId:number) {
  39 + switch (pageId) {
  40 + case 0:
  41 + // 验证/更换手机号
  42 + this.listData.push(new AccoutPageDataModel(0, '更换手机号', null, null, null, null, null))
  43 + this.listData.push(new AccoutPageDataModel(7, null, null, null, null, '请输入手机号', 10010))
  44 + this.listData.push(new AccoutPageDataModel(2, null, null, null, null, '验证码', 10088))
  45 + this.listData.push(new AccoutPageDataModel(4, null, null, null, '确认', null, null))
  46 + break;
  47 +
  48 + case 1:
  49 + // 设置密码
  50 + this.listData.push(new AccoutPageDataModel(0, '设置密码', null, null, null, null, null))
  51 + this.listData.push(new AccoutPageDataModel(1, null, null, null, null, '请输入密码', 10086))
  52 + this.listData.push(new AccoutPageDataModel(1, null, null, null, null, '再次输入密码', 10087))
  53 + this.listData.push(new AccoutPageDataModel(4, null, null, '提示:密码长度6-20位,需答谢字母、小写字母、数字、特殊字符中组合三种及三种以上组成', null, null, null))
  54 + this.listData.push(new AccoutPageDataModel(5, null, null, null, '确认', null, null))
  55 + break;
  56 +
  57 + case 2:
  58 + // 修改密码
  59 + this.listData.push(new AccoutPageDataModel(0, '修改密码', null, null, null, null, null))
  60 + this.listData.push(new AccoutPageDataModel(1, null, null, null, null, '请输入原密码', 10010))
  61 + this.listData.push(new AccoutPageDataModel(1, null, null, null, null, '请输入新密码', 10086))
  62 + this.listData.push(new AccoutPageDataModel(1, null, null, null, null, '请再请输入原密码', 10087))
  63 + this.listData.push(new AccoutPageDataModel(3, null, null, '提示:密码长度6-20位,需答谢字母、小写字母、数字、特殊字符中组合三种及三种以上组成', null, null, null))
  64 + this.listData.push(new AccoutPageDataModel(4, null, null, null, '确认', null, null))
  65 + this.listData.push(new AccoutPageDataModel(3, null, null, '忘记密码', null, null, null))
  66 + break;
  67 +
  68 + case 3:
  69 + // 绑定手机号
  70 + this.listData.push(new AccoutPageDataModel(0, '绑定手机号', null, null, null, null, null))
  71 + this.listData.push(new AccoutPageDataModel(7, null, null, null, null, '请输入手机号', 10010))
  72 + this.listData.push(new AccoutPageDataModel(2, null, null, null, null, '验证码', 10088))
  73 + this.listData.push(new AccoutPageDataModel(4, null, null, null, '确认', null, null))
  74 + break;
  75 +
  76 + case 4:
  77 + // 有logo的
  78 + 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))
  79 + this.listData.push(new AccoutPageDataModel(0, '修改密码', null, null, null, null, null))
  80 + this.listData.push(new AccoutPageDataModel(1, null, null, null, null, '请输入原密码', 10010))
  81 + this.listData.push(new AccoutPageDataModel(1, null, null, null, null, '请输入新密码', 10086))
  82 + this.listData.push(new AccoutPageDataModel(1, null, null, null, null, '请再请输入原密码', 10087))
  83 + this.listData.push(new AccoutPageDataModel(2, null, null, null, null, '验证码', 10088))
  84 + this.listData.push(new AccoutPageDataModel(3, null, null, '提示:密码长度6-20位,需答谢字母、小写字母、数字、特殊字符中组合三种及三种以上组成', null, null, null))
  85 + this.listData.push(new AccoutPageDataModel(4, null, null, null, '确认', null, null))
  86 + this.listData.push(new AccoutPageDataModel(3, null, null, '忘记密码', null, null, null))
  87 + break;
  88 +
  89 + default:
  90 + break;
  91 + }
  92 + }
  93 +
  94 + build() {
  95 + Navigation() {
  96 + this.settingList() //滑动区域
  97 + }.titleMode(NavigationTitleMode.Mini)
  98 + .title('')
  99 + }
  100 +
  101 + // 页面布局
  102 + @Builder settingList() {
  103 + Column() {
  104 + List() {
  105 + ForEach(this.listData, (item: AccoutPageDataModel, index: number) => {
  106 + ListItem() {
  107 + if (item.compType == 0) {
  108 + this.getTitleCell(item, HorizontalAlign.Start)
  109 + } else if (item.compType == 1) {
  110 + this.getPasswordCell(item)
  111 + } else if (item.compType == 2) {
  112 + this.getCodeCell(item)
  113 + } else if (item.compType == 3) {
  114 + if (index == this.listData.length - 1) {
  115 + this.getDescCell(item, HorizontalAlign.Center)
  116 + } else {
  117 + this.getDescCell(item, HorizontalAlign.Start)
  118 + }
  119 + } else if (item.compType == 4) {
  120 + this.getButtonCell(item)
  121 + } else if (item.compType == 5) {
  122 + this.getLogoCell(item)
  123 + } else if (item.compType == 7) {
  124 + this.getPhoneCell(item)
  125 + } else {
  126 + Text('' + item.compType)
  127 + }
  128 + }
  129 + })
  130 + }
  131 + // .divider({
  132 + // strokeWidth: 1,
  133 + // startMargin: 15,
  134 + // endMargin: 10,
  135 + // color: '#f0f0f0'
  136 + // })
  137 + }.width('100%').padding('30lpx')
  138 + }
  139 +
  140 + /***************************** UI元素 ******************************************/
  141 +
  142 + // 标题
  143 + @Builder getTitleCell(item: AccoutPageDataModel, alignTitle: HorizontalAlign) {
  144 + Column() {
  145 + Text(item.compTitle).fontWeight(FontWeight.Bold).fontSize(20).maxLines(1)
  146 + }
  147 + .width('100%')
  148 + .height('75lpx')
  149 + .alignItems(alignTitle)
  150 + }
  151 +
  152 + // 密码输入框
  153 + @Builder getPasswordCell(item: AccoutPageDataModel) {
  154 + Row() {
  155 + Row() {
  156 + TextInput({ placeholder: item.inputPlacholder })
  157 + .type(InputType.Password)
  158 + .backgroundColor('#00000000')
  159 + .onChange((value: string) => {
  160 + this.inputTextChange(value, item.inputTag)
  161 + })
  162 + .onSubmit((EnterKeyType) => {
  163 + promptAction.showToast({ message: 'submit' })
  164 + })
  165 + }
  166 + .alignItems(VerticalAlign.Center)
  167 + .height('80lpx')
  168 + .backgroundColor('#f5f5f5')
  169 + .borderRadius('4vp')
  170 + }
  171 + .width('100%')
  172 + .height('110lpx')
  173 + .backgroundColor(0xffffff0)
  174 + .alignItems(VerticalAlign.Center)
  175 + }
  176 +
  177 + // 手机号输入框
  178 + @Builder getPhoneCell(item: AccoutPageDataModel) {
  179 + Row() {
  180 + Row() {
  181 + TextInput({ placeholder: item.inputPlacholder })
  182 + .backgroundColor('#00000000')
  183 + .onChange((value: string) => {
  184 + this.inputTextChange(value, item.inputTag)
  185 + })
  186 + .onSubmit((EnterKeyType) => {
  187 + promptAction.showToast({ message: 'submit' })
  188 + })
  189 + }
  190 + .alignItems(VerticalAlign.Center)
  191 + .height('80lpx')
  192 + .backgroundColor('#f5f5f5')
  193 + .borderRadius('4vp')
  194 + }
  195 + .width('100%')
  196 + .height('110lpx')
  197 + .backgroundColor(0xffffff0)
  198 + .alignItems(VerticalAlign.Center)
  199 + }
  200 +
  201 + // 验证码码输入框
  202 + @Builder getCodeCell(item: AccoutPageDataModel) {
  203 + Row() {
  204 + Stack() {
  205 + Image($r('app.media.get_code_bg')).width('100%').borderRadius('4vp')
  206 + Row() {
  207 + TextInput({ placeholder: item.inputPlacholder })
  208 + .backgroundColor('#00000000')
  209 + .width('67.28%')
  210 + .onChange((value: string) => {
  211 + this.inputTextChange(value, item.inputTag)
  212 + })
  213 + Button('发送验证码')
  214 + .width('32.71%')
  215 + .backgroundColor('#00000000')
  216 + .fontColor('#da3e22')
  217 + }
  218 + .width('100%')
  219 + }.height('80lpx')
  220 + }
  221 + .width('100%')
  222 + .height('110lpx')
  223 + .backgroundColor(0xffffff0)
  224 + .alignItems(VerticalAlign.Center)
  225 + }
  226 +
  227 + // desc
  228 + @Builder getDescCell(item: AccoutPageDataModel, alignTitle: HorizontalAlign) {
  229 + Column() {
  230 + Text(item.compDesc).fontSize(12).maxLines(3).fontColor(0x999999).padding({top:'10lpx'})
  231 + .onClick(()=>{
  232 + if (item.compDesc == '忘记密码') {
  233 + promptAction.showToast({ message: '密码不符合密码规范' })
  234 + }
  235 + })
  236 + }
  237 + .width('100%')
  238 + .height('85lpx')
  239 + .alignItems(alignTitle)
  240 + }
  241 +
  242 + // 按钮
  243 + @Builder getButtonCell(item: AccoutPageDataModel) {
  244 + Row() {
  245 + Button(item.compButtonTitle, { type: ButtonType.Normal, stateEffect: true })
  246 + .width('100%')
  247 + .height('80lpx')
  248 + .backgroundColor(this.btnStatus ? '#da3e22' : '#e5856d')
  249 + .fontColor('#fff')
  250 + .borderRadius('4vp')
  251 + .onClick(() => {
  252 + this.buttonClick()
  253 + })
  254 + }
  255 + .padding({top:'25lpx'})
  256 + .alignItems(VerticalAlign.Center)
  257 + .width('100%')
  258 + .height('120lpx')
  259 + }
  260 +
  261 + // 标题
  262 + @Builder getLogoCell(item: AccoutPageDataModel) {
  263 + Column() {
  264 + Image(item.compLogo).height('150lpx').width('150lpx')
  265 + }
  266 + .width('100%')
  267 + .height('200lpx')
  268 + }
  269 +
  270 + /***************************** 事件处理 ******************************************/
  271 + // 提交按钮点击事件
  272 + buttonClick() {
  273 + if (this.btnStatus) {
  274 + // 需要+手机号校验
  275 + if (this.password01.length < 6 || this.password01.length > 20) {
  276 + promptAction.showToast({ message: '密码不符合密码规范' })
  277 + return
  278 + }
  279 +
  280 + promptAction.showToast({ message: '请求接口' })
  281 + }
  282 + }
  283 +
  284 + // 输入框数据变动:输入数据处理
  285 + inputTextChange(text: string, tag: number) {
  286 + if (tag == 10086) {
  287 + this.password01 = text;
  288 + } else if (tag == 10087) {
  289 + this.password02 = text;
  290 + } else {
  291 + this.passwordOri = text;
  292 + }
  293 +
  294 + if (this.password01) {
  295 + if (this.password01 == this.password02 && this.password01.length >= 6 && this.password01.length <= 20) {
  296 + this.btnStatus = true;
  297 + } else {
  298 + this.btnStatus = false;
  299 + }
  300 + }
  301 + }
  302 +}
@@ -58,7 +58,7 @@ export struct AppointmentListUI{ @@ -58,7 +58,7 @@ export struct AppointmentListUI{
58 getNewPageData(){ 58 getNewPageData(){
59 this.isLoading = true 59 this.isLoading = true
60 if(this.hasMore){ 60 if(this.hasMore){
61 - MinePageDatasModel.getAppointmentListData("20",`${this.curPageNum}`).then((value)=>{ 61 + MinePageDatasModel.getAppointmentListData("20",`${this.curPageNum}`,getContext(this)).then((value)=>{
62 if (!this.data || value.list.length == 0){ 62 if (!this.data || value.list.length == 0){
63 this.hasMore = false 63 this.hasMore = false
64 }else{ 64 }else{
@@ -68,7 +68,12 @@ export default struct MinePageMoreFunctionUI{ @@ -68,7 +68,12 @@ export default struct MinePageMoreFunctionUI{
68 if (index == 3) { 68 if (index == 3) {
69 RouteManager.jumpNewPage("pages/SettingPage") 69 RouteManager.jumpNewPage("pages/SettingPage")
70 } else { 70 } else {
71 - RouteManager.jumpNewPage("pages/PrivacySettingPage") 71 + // 在Home页面中
  72 + let paramsInfo: object = {
  73 + pageId: 123,
  74 + pageType:'mainSetting'
  75 + };
  76 + RouteManager.jumpNewPage("pages/PrivacySettingPage",paramsInfo)
72 } 77 }
73 }) 78 })
74 .height('117lpx') 79 .height('117lpx')
@@ -40,6 +40,10 @@ export default struct MinePagePersonFunctionUI { @@ -40,6 +40,10 @@ export default struct MinePagePersonFunctionUI {
40 RouteManager.jumpNewPage("pages/AppointmentListPage") 40 RouteManager.jumpNewPage("pages/AppointmentListPage")
41 break; 41 break;
42 } 42 }
  43 + case "关注":{
  44 + RouteManager.jumpNewPage("pages/FollowListPage")
  45 + break;
  46 + }
43 } 47 }
44 }).width('169lpx') 48 }).width('169lpx')
45 .height('117lpx') 49 .height('117lpx')
  1 +import { ResourcesUtils } from 'wdKit'
  2 +import { ResponseDTO } from 'wdNetwork'
  3 +import { FollowListItem } from '../../../../viewmodel/FollowListItem'
  4 +import { CustomTitleUI } from '../../../reusable/CustomTitleUI'
  5 +import { FollowSecondTabsComponent } from './FollowSecondTabsComponent'
  6 +
  7 +@Component
  8 +export struct FollowFirstTabsComponent{
  9 + @State currentIndex: number = 0
  10 + private controller: TabsController = new TabsController()
  11 + @State data:FollowListItem[] = []
  12 + fontColor: string = '#999999'
  13 + selectedFontColor: string = '#000000'
  14 +
  15 + aboutToAppear(){
  16 + this.data.push(new FollowListItem("我的"))
  17 + // 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[]>
  18 + // res.data.forEach(element => {
  19 + // this.data.push(element)
  20 + // });
  21 +
  22 + ResourcesUtils.getResourcesJson<ResponseDTO<FollowListItem[]>>('follow_list_data.json', getContext(this)).then((success)=>{
  23 + success.data?.forEach(element => {
  24 + this.data.push(element)
  25 + });
  26 + console.log("ycg",this.data.length.toString());
  27 + })
  28 + }
  29 +
  30 + @Builder TabBuilder(index: number, item: FollowListItem) {
  31 + Stack(){
  32 + Text(item.directoryName)
  33 + .height('38lpx')
  34 + .fontSize('33lpx')
  35 + .fontWeight(this.currentIndex === index ? 600 : 400)
  36 + .fontColor(this.currentIndex === index ? this.selectedFontColor : this.fontColor)
  37 + .lineHeight('38lpx')
  38 +
  39 + if(this.currentIndex === index){
  40 + Divider()
  41 + .width('31lpx')
  42 + .height('4lpx')
  43 + .color('#ED2800')
  44 + .strokeWidth('4lpx')
  45 + .margin({top:'50lpx'})
  46 + .id("divTag")
  47 + }
  48 + }.onClick(()=>{
  49 + this.currentIndex = index
  50 + this.controller.changeIndex(this.currentIndex)
  51 + })
  52 + .height('100%')
  53 + .margin({right:'9lpx'})
  54 + .padding({left:'31lpx',right:index === this.data.length-1?"31lpx":"0lpx"})
  55 + }
  56 +
  57 + build() {
  58 + Column() {
  59 + //标题栏目
  60 + CustomTitleUI({titleName:"关注列表"})
  61 +
  62 + Tabs({ barPosition: BarPosition.Start, controller: this.controller }) {
  63 + ForEach(this.data, (item: FollowListItem, index: number ) => {
  64 + TabContent(){
  65 + FollowSecondTabsComponent({data:$data,firstIndex:index})
  66 + }.tabBar(this.TabBuilder(index,item))
  67 + }, (item: FollowListItem, index: number) => index.toString())
  68 + }
  69 + .vertical(false)
  70 + .barMode(BarMode.Scrollable)
  71 + .barWidth('100%')
  72 + .barHeight('84lpx')
  73 + .animationDuration(0)
  74 + .onChange((index: number) => {
  75 + this.currentIndex = index
  76 + })
  77 + .width('100%')
  78 + .height('100%')
  79 + }.width('100%')
  80 + }
  81 +}
  1 +import { LazyDataSource } from 'wdKit';
  2 +import { FollowListDetailItem } from '../../../../viewmodel/FollowListDetailItem'
  3 +import { ListHasNoMoreDataUI } from '../../../reusable/ListHasNoMoreDataUI';
  4 +
  5 +const TAG = "FollowListDetailUI"
  6 +@Component
  7 +export struct FollowListDetailUI{
  8 + @State creatorDirectoryId:number = -1;
  9 + @State data: LazyDataSource<FollowListDetailItem> = new LazyDataSource();
  10 + @State isLoading:boolean = false
  11 + @State hasMore:boolean = true
  12 + curPageNum:number = 1;
  13 + 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"
  14 +
  15 +
  16 + aboutToAppear(){
  17 + console.log("YCG","aboutToAppear==="+this.creatorDirectoryId);
  18 + this.getNewPageData()
  19 + }
  20 +
  21 + build(){
  22 + Column(){
  23 + List({ space: 3 }) {
  24 + LazyForEach(this.data, (item: FollowListDetailItem, index: number = 0) => {
  25 + ListItem() {
  26 + ChildComponent({data: item})
  27 + }
  28 + .onClick(() => {
  29 + })
  30 + }, (item: FollowListDetailItem, index: number) => index.toString())
  31 +
  32 +
  33 + //没有更多数据 显示提示
  34 + if(!this.hasMore){
  35 + ListItem(){
  36 + ListHasNoMoreDataUI()
  37 + }
  38 + }
  39 + }.cachedCount(7)
  40 + .padding({left:'31lpx',right:'31lpx'})
  41 + .layoutWeight(1)
  42 + .onReachEnd(()=>{
  43 + console.log(TAG,"触底了");
  44 + if(!this.isLoading){
  45 + this.isLoading = true
  46 + //加载分页数据
  47 + this.getNewPageData()
  48 + }
  49 + })
  50 + }.layoutWeight(1)
  51 + }
  52 +
  53 + getNewPageData(){
  54 + if(this.hasMore){
  55 + if(this.curPageNum>=4){
  56 + this.hasMore = false
  57 + return
  58 + }
  59 + if(this.curPageNum == 1){
  60 + this.data.push(new FollowListDetailItem(this.headUrl,"人之初,性本善",10,"人之初,性本善"));
  61 + this.data.push(new FollowListDetailItem(this.headUrl,"性相近,习相远",20,"性相近,习相远"));
  62 + this.data.push(new FollowListDetailItem(this.headUrl,"苟不教,性乃迁",30,"苟不教,性乃迁"));
  63 + this.data.push(new FollowListDetailItem(this.headUrl,"教之道,贵以专",40,"教之道,贵以专"));
  64 + this.data.push(new FollowListDetailItem(this.headUrl,"AAAAAAA",50,"教之道,贵以专"));
  65 + this.data.push(new FollowListDetailItem(this.headUrl,"BBBBBBB",60,"教之道,贵以专"));
  66 + this.data.push(new FollowListDetailItem(this.headUrl,"CCCCCCC",70,"教之道,贵以专"));
  67 + }else if(this.curPageNum == 2){
  68 + this.data.push(new FollowListDetailItem(this.headUrl,"昔孟母,择邻处",40,"昔孟母,择邻处"));
  69 + }else if(this.curPageNum == 3){
  70 + this.data.push(new FollowListDetailItem(this.headUrl,"子不学,断机杼",40,"子不学,断机杼"));
  71 + }
  72 + this.isLoading = false
  73 + this.curPageNum++
  74 + }
  75 + }
  76 +}
  77 +
  78 +@Component
  79 +struct ChildComponent {
  80 + @ObjectLink data: FollowListDetailItem
  81 +
  82 + build() {
  83 + Column(){
  84 + Blank().height('27lpx')
  85 +
  86 + Row() {
  87 + Image(this.data.headPhotoUrl)
  88 + .objectFit(ImageFit.Auto)
  89 + .width('92lpx')
  90 + .height('92lpx')
  91 + .margin({right:'15lpx'})
  92 +
  93 + Column(){
  94 + Text(this.data.cnUserName)
  95 + .fontWeight('400lpx')
  96 + .fontSize('31lpx')
  97 + .lineHeight('38lpx')
  98 + .fontColor($r('app.color.color_222222'))
  99 + Text(`粉丝${this.data.cnFansNum}`)
  100 + .fontColor($r('app.color.color_B0B0B0'))
  101 + .fontSize('23lpx')
  102 + .maxLines(1)
  103 + Text(`${this.data.introduction}`)
  104 + .fontColor($r('app.color.color_B0B0B0'))
  105 + .fontSize('23lpx')
  106 + .maxLines(2)
  107 + .textOverflow({ overflow: TextOverflow.Ellipsis })
  108 + }.layoutWeight(1)
  109 + .alignItems(HorizontalAlign.Start)
  110 +
  111 + if(this.data.isFollow){
  112 + Row(){
  113 + Text(`已关注`)
  114 + .fontColor($r('app.color.color_CCCCCC'))
  115 + .fontSize('23lpx')
  116 + .fontWeight('500lpx')
  117 + .lineHeight('35lpx')
  118 + }.backgroundColor($r('app.color.color_F5F5F5'))
  119 + .borderRadius('6lpx')
  120 + .borderWidth('2lpx')
  121 + .justifyContent(FlexAlign.Center)
  122 + .width('100lpx')
  123 + .height('46lpx')
  124 + .margin({left:'4lpx',top:'23lpx'})
  125 + .onClick(()=>{
  126 + this.data.isFollow = false
  127 + })
  128 + }else{
  129 + Row(){
  130 + Image($r('app.media.follow_icon'))
  131 + .margin({right:'4lpx'})
  132 + .width('23lpx')
  133 + .height('23lpx')
  134 + Text(`关注`)
  135 + .fontColor($r('app.color.color_ED2800'))
  136 + .fontSize('23lpx')
  137 + .fontWeight('500lpx')
  138 + .lineHeight('35lpx')
  139 + }.borderColor($r('app.color.color_ED2800'))
  140 + .borderRadius('6lpx')
  141 + .borderWidth('2lpx')
  142 + .justifyContent(FlexAlign.Center)
  143 + .width('100lpx')
  144 + .height('46lpx')
  145 + .margin({left:'4lpx',top:'23lpx'})
  146 + .onClick(()=>{
  147 + this.data.isFollow = true
  148 + })
  149 + }
  150 + }.alignItems(VerticalAlign.Top)
  151 + .width('100%')
  152 + .layoutWeight(1)
  153 +
  154 + Divider().width('100%')
  155 + .height('2lpx')
  156 + .strokeWidth('1lpx')
  157 + .backgroundColor($r('app.color.color_EDEDED'))
  158 +
  159 + }.height('146lpx')
  160 + .justifyContent(FlexAlign.Center)
  161 + }
  162 +}
  1 +import { FollowListItem, FollowSecondListItem } from '../../../../viewmodel/FollowListItem'
  2 +import { FollowListDetailUI } from './FollowListDetailUI'
  3 +import { FollowThirdTabsComponent } from './FollowThirdTabsComponent'
  4 +
  5 +@Component
  6 +export struct FollowSecondTabsComponent{
  7 + @Link data:FollowListItem[]
  8 + @State firstIndex:number = 0
  9 + @State currentIndex: number = 0
  10 + private controller: TabsController = new TabsController()
  11 + fontColor: string = '#000000'
  12 + selectedFontColor: string = '#ED2800'
  13 +
  14 + aboutToAppear(){
  15 + }
  16 +
  17 + build(){
  18 + Column(){
  19 + Divider().width('100%')
  20 + .height('2lpx')
  21 + .strokeWidth('1lpx')
  22 + .backgroundColor($r('app.color.color_EDEDED'))
  23 +
  24 + if(this.data != null){
  25 + if(this.data[this.firstIndex].children == null || this.data[this.firstIndex].children.length == 0){
  26 + FollowListDetailUI({creatorDirectoryId:this.data[this.firstIndex].id})
  27 + }else{
  28 + this.FollowSecondUI()
  29 + }
  30 + }
  31 + }
  32 + .width('100%')
  33 + .height('100%')
  34 + }
  35 +
  36 + @Builder FollowSecondUI(){
  37 + Row() {
  38 + Tabs({ barPosition: BarPosition.Start, controller: this.controller }) {
  39 + ForEach(this.data[this.firstIndex].children, (item: FollowSecondListItem, index: number ) => {
  40 + TabContent(){
  41 + FollowThirdTabsComponent({data:$data,firstIndex:$firstIndex,secondIndex:index})
  42 + }.tabBar(this.TabBuilder(index,item))
  43 + .backgroundColor($r('app.color.white'))
  44 + }, (item: FollowListItem, index: number) => index.toString())
  45 + }
  46 + .vertical(true)
  47 + .barMode(BarMode.Scrollable)
  48 + .barWidth('140lpx')
  49 + .animationDuration(0)
  50 + .onChange((index: number) => {
  51 + this.currentIndex = index
  52 + })
  53 + .width('100%')
  54 + }.width('100%')
  55 + .alignItems(VerticalAlign.Top)
  56 + }
  57 +
  58 + @Builder TabBuilder(index: number, item: FollowSecondListItem) {
  59 + Column(){
  60 + Text(item.directoryName)
  61 + .width('100%')
  62 + .height('38lpx')
  63 + .fontSize('30lpx')
  64 + .textAlign(TextAlign.Center)
  65 + .fontWeight(this.currentIndex === index ? 600 : 400)
  66 + .fontColor(this.currentIndex === index ? this.selectedFontColor : this.fontColor)
  67 + .lineHeight('38lpx')
  68 + }
  69 + .onClick(()=>{
  70 + this.currentIndex = index
  71 + this.controller.changeIndex(this.currentIndex)
  72 + })
  73 + .justifyContent(FlexAlign.Center)
  74 + .height('84lpx')
  75 + .backgroundColor(this.currentIndex === index?$r('app.color.white'):$r('app.color.color_F9F9F9'))
  76 + }
  77 +
  78 +}
  1 +import { FollowListItem, FollowThirdListItem } from '../../../../viewmodel/FollowListItem'
  2 +import { FollowListDetailUI } from './FollowListDetailUI'
  3 +
  4 +@Component
  5 +export struct FollowThirdTabsComponent{
  6 + @Link data:FollowListItem[]
  7 + @State currentIndex: number = 0
  8 +
  9 + @Link firstIndex: number
  10 + @State secondIndex:number = -1
  11 +
  12 +
  13 + private controller: TabsController = new TabsController()
  14 + fontColor: string = '#999999'
  15 + selectedFontColor: string = '#000000'
  16 +
  17 + build(){
  18 + if(this.data != null){
  19 + if(this.data[this.firstIndex].children[this.secondIndex].children == null || this.data[this.firstIndex].children[this.secondIndex].children.length == 0){
  20 + FollowListDetailUI({creatorDirectoryId:this.data[this.firstIndex].children[this.secondIndex].id})
  21 + }else{
  22 + this.FollowThirdUI()
  23 + }
  24 + }
  25 + }
  26 +
  27 + @Builder TabBuilder(index: number, item: FollowThirdListItem) {
  28 + Column(){
  29 + Text(item.directoryName)
  30 + .fontSize('30lpx')
  31 + .textAlign(TextAlign.Center)
  32 + .fontWeight(this.currentIndex === index ? 600 : 400)
  33 + .fontColor(this.currentIndex === index ? this.selectedFontColor : this.fontColor)
  34 + .lineHeight('38lpx')
  35 + .backgroundColor($r('app.color.color_F9F9F9'))
  36 + .padding('13lpx')
  37 + }
  38 + .onClick(()=>{
  39 + this.currentIndex = index
  40 + this.controller.changeIndex(this.currentIndex)
  41 + })
  42 + .height('100%')
  43 + .margin({right:'9lpx'})
  44 + .padding({left:'20lpx',right:index === this.data[this.firstIndex].children[this.secondIndex].children.length-1?"20lpx":"0lpx"})
  45 + .justifyContent(FlexAlign.Center)
  46 + }
  47 +
  48 + @Builder FollowThirdUI(){
  49 + Row() {
  50 + Tabs({ barPosition: BarPosition.Start, controller: this.controller }) {
  51 + ForEach(this.data[this.firstIndex].children[this.secondIndex].children, (item: FollowThirdListItem, index: number ) => {
  52 + TabContent(){
  53 + Column(){
  54 + Divider().width('100%')
  55 + .height('2lpx')
  56 + .strokeWidth('1lpx')
  57 + .backgroundColor($r('app.color.color_EDEDED'))
  58 + .margin({left:'20lpx'})
  59 + FollowListDetailUI({creatorDirectoryId:this.data[this.firstIndex].children[this.secondIndex].children[index].id})
  60 + }
  61 + }.tabBar(this.TabBuilder(index,item))
  62 + .backgroundColor($r('app.color.white'))
  63 + }, (item: FollowListItem, index: number) => index.toString())
  64 + }
  65 + .vertical(false)
  66 + .barMode(BarMode.Scrollable)
  67 + .barWidth('100%')
  68 + .barHeight('84lpx')
  69 + .animationDuration(0)
  70 + .onChange((index: number) => {
  71 + this.currentIndex = index
  72 + })
  73 + .width('100%')
  74 + }.width('100%')
  75 + }
  76 +
  77 +}
1 import router from '@ohos.router' 1 import router from '@ohos.router'
  2 +
2 @Component 3 @Component
3 export struct CustomTitleUI { 4 export struct CustomTitleUI {
4 imgBack:boolean = true 5 imgBack:boolean = true
@@ -6,7 +6,7 @@ import { HttpUrlUtils } from '../network/HttpUrlUtils'; @@ -6,7 +6,7 @@ import { HttpUrlUtils } from '../network/HttpUrlUtils';
6 import HashMap from '@ohos.util.HashMap'; 6 import HashMap from '@ohos.util.HashMap';
7 import { ResponseDTO, WDHttp } from 'wdNetwork'; 7 import { ResponseDTO, WDHttp } from 'wdNetwork';
8 import { MineAppointmentListItem } from '../viewmodel/MineAppointmentListItem'; 8 import { MineAppointmentListItem } from '../viewmodel/MineAppointmentListItem';
9 -import { Logger } from 'wdKit'; 9 +import { Logger, ResourcesUtils } from 'wdKit';
10 const TAG = "MinePageDatasModel" 10 const TAG = "MinePageDatasModel"
11 11
12 /** 12 /**
@@ -84,18 +84,35 @@ class MinePageDatasModel{ @@ -84,18 +84,35 @@ class MinePageDatasModel{
84 return this.moreData 84 return this.moreData
85 } 85 }
86 86
  87 + /**
  88 + * 扫一扫 我的奖品 等5个数据
  89 + * 包含名字和图标
  90 + */
  91 + getSettingFunctionsData():MinePageCreatorFunctionsItem[]{
  92 + if(this.moreData.length === 5){
  93 + return this.moreData
  94 + }
  95 + this.moreData.push(new MinePageMoreFunctionModel("扫一扫",$r('app.media.mine_scan')))
  96 + this.moreData.push(new MinePageMoreFunctionModel("我的奖品",$r('app.media.mine_mygift')))
  97 + this.moreData.push(new MinePageMoreFunctionModel("意见反馈",$r('app.media.mine_suggest')))
  98 + this.moreData.push(new MinePageMoreFunctionModel("设置",$r('app.media.mine_setting')))
  99 + this.moreData.push(new MinePageMoreFunctionModel("关于",$r('app.media.mine_about')))
  100 + return this.moreData
  101 + }
  102 +
87 fetchAppointmentListData(pageSize:string,pageNum:string) { 103 fetchAppointmentListData(pageSize:string,pageNum:string) {
88 let url = HttpUrlUtils.getAppointmentListDataUrl()+ `?pageSize=${pageSize}&pageNum=${pageNum}` 104 let url = HttpUrlUtils.getAppointmentListDataUrl()+ `?pageSize=${pageSize}&pageNum=${pageNum}`
89 let headers: HashMap<string, string> = HttpUrlUtils.getYcgCommonHeaders(); 105 let headers: HashMap<string, string> = HttpUrlUtils.getYcgCommonHeaders();
90 return WDHttp.get<ResponseDTO<MineAppointmentListItem>>(url, headers) 106 return WDHttp.get<ResponseDTO<MineAppointmentListItem>>(url, headers)
91 }; 107 };
92 108
93 - getAppointmentListData(pageSize:string,pageNum:string): Promise<MineAppointmentListItem> { 109 + getAppointmentListData(pageSize:string,pageNum:string,context?: Context): Promise<MineAppointmentListItem> {
94 return new Promise<MineAppointmentListItem>((success, error) => { 110 return new Promise<MineAppointmentListItem>((success, error) => {
95 Logger.info(TAG, `getAppointmentList start`); 111 Logger.info(TAG, `getAppointmentList start`);
96 this.fetchAppointmentListData(pageSize,pageNum).then((navResDTO: ResponseDTO<MineAppointmentListItem>) => { 112 this.fetchAppointmentListData(pageSize,pageNum).then((navResDTO: ResponseDTO<MineAppointmentListItem>) => {
97 if (!navResDTO) { 113 if (!navResDTO) {
98 error("page data invalid"); 114 error("page data invalid");
  115 + success(this.getAppointmentListDataLocal(context))
99 return 116 return
100 } 117 }
101 Logger.info(TAG, "getAppointmentList then,AppointmentResDTO.timeStamp:" + navResDTO.timestamp); 118 Logger.info(TAG, "getAppointmentList then,AppointmentResDTO.timeStamp:" + navResDTO.timestamp);
@@ -103,11 +120,24 @@ class MinePageDatasModel{ @@ -103,11 +120,24 @@ class MinePageDatasModel{
103 success(navigationBean); 120 success(navigationBean);
104 }).catch((err: Error) => { 121 }).catch((err: Error) => {
105 Logger.error(TAG, `fetchAppointmentListDataApi catch, error.name : ${err.name}, error.message:${err.message}`); 122 Logger.error(TAG, `fetchAppointmentListDataApi catch, error.name : ${err.name}, error.message:${err.message}`);
106 - error(err); 123 + // error(err);
  124 + success(this.getAppointmentListDataLocal(context))
107 }) 125 })
108 }) 126 })
109 } 127 }
110 128
  129 + async getAppointmentListDataLocal(context?: Context): Promise<MineAppointmentListItem> {
  130 + Logger.info(TAG, `getBottomNavDataMock start`);
  131 + let compRes: ResponseDTO<MineAppointmentListItem> | null = await ResourcesUtils.getResourcesJson<ResponseDTO<MineAppointmentListItem>>('appointment_list_data.json', context);
  132 + if (!compRes || !compRes.data) {
  133 + Logger.info(TAG, `getAppointmentListDataLocal compRes is empty`);
  134 + return null
  135 + }
  136 + Logger.info(TAG, `getAppointmentListDataLocal getResourcesJsonSync compRes : ${JSON.stringify(compRes)}`);
  137 + return compRes.data
  138 + }
  139 +
  140 +
111 } 141 }
112 142
113 const minePageDatasModel = MinePageDatasModel.getInstance() 143 const minePageDatasModel = MinePageDatasModel.getInstance()
  1 +
  2 +import MinePagePersonalFunctionsItem from '../viewmodel/MinePagePersonalFunctionsItem'
  3 +import MinePageCreatorFunctionsItem from '../viewmodel/MinePageCreatorFunctionsItem'
  4 +import MinePageMoreFunctionModel from '../viewmodel/MinePageMoreFunctionModel';
  5 +import { HttpUrlUtils } from '../network/HttpUrlUtils';
  6 +import HashMap from '@ohos.util.HashMap';
  7 +import { ResponseDTO, WDHttp } from 'wdNetwork';
  8 +import { Logger } from 'wdKit';
  9 +import { MineMainSettingFunctionItem } from '../viewmodel/MineMainSettingFunctionItem'
  10 +
  11 +const TAG = "MineSettingDatasModel"
  12 +
  13 +/**
  14 + * 我的设置页面 所有数据 获取封装类
  15 + */
  16 +class MineSettingDatasModel{
  17 + private static instance: MineSettingDatasModel;
  18 + mainSettingData:MineMainSettingFunctionItem[] = []
  19 + accountAndSecurityData:MineMainSettingFunctionItem[] = []
  20 +
  21 + private constructor() { }
  22 +
  23 + /**
  24 + * 单例模式
  25 + * @returns
  26 + */
  27 + public static getInstance(): MineSettingDatasModel {
  28 + if (!MineSettingDatasModel.instance) {
  29 + MineSettingDatasModel.instance = new MineSettingDatasModel();
  30 + }
  31 + return MineSettingDatasModel.instance;
  32 + }
  33 +
  34 +
  35 +
  36 +
  37 + /**
  38 + * 评论 关注 收藏 等7个数据
  39 + * 包含名字和图标
  40 + */
  41 + getMineMainSettingFunctionItemData():MineMainSettingFunctionItem[]{
  42 + if(this.mainSettingData.length === 7){
  43 + return this.mainSettingData
  44 + }
  45 + this.mainSettingData = []
  46 + this.mainSettingData.push(new MineMainSettingFunctionItem(null, '账户与安全', '18888888888', 0, false))
  47 + this.mainSettingData.push(new MineMainSettingFunctionItem(null, '接收推送', null, 1, false))
  48 + this.mainSettingData.push(new MineMainSettingFunctionItem(null, '隐私设罝', null, 0, false))
  49 + this.mainSettingData.push(new MineMainSettingFunctionItem(null, '仅WiFi网络加载图片', null, 1, false))
  50 + this.mainSettingData.push(new MineMainSettingFunctionItem(null, 'WiFi网络情况下自动播放视频', null, 1, false))
  51 + this.mainSettingData.push(new MineMainSettingFunctionItem(null, '开户播放器悬浮窗', null, 1, false))
  52 + this.mainSettingData.push(new MineMainSettingFunctionItem(null, null, null, 2, null))
  53 + this.mainSettingData.push(new MineMainSettingFunctionItem(null, '清除缓存', '32MB', 0, false))
  54 + this.mainSettingData.push(new MineMainSettingFunctionItem(null, '去评分', null, 0, false))
  55 +
  56 + return this.mainSettingData
  57 + }
  58 +
  59 + /**
  60 + * 评论 关注 收藏 等7个数据
  61 + * 包含名字和图标
  62 + */
  63 + getAccountAndSecuritySettingData():MineMainSettingFunctionItem[]{
  64 + if(this.accountAndSecurityData.length === 7){
  65 + return this.accountAndSecurityData
  66 + }
  67 + this.accountAndSecurityData = []
  68 + this.accountAndSecurityData.push(new MineMainSettingFunctionItem(null, '更换手机号', '18888888888', 0, false))
  69 + this.accountAndSecurityData.push(new MineMainSettingFunctionItem(null, '设置密码', null, 0, false))
  70 + this.accountAndSecurityData.push(new MineMainSettingFunctionItem(null, null, null, 2, null))
  71 + this.accountAndSecurityData.push(new MineMainSettingFunctionItem($r('app.media.mine_order_icon'), '绑定QQ', '立即绑定', 0, false))
  72 + this.accountAndSecurityData.push(new MineMainSettingFunctionItem($r('app.media.mine_order_icon'), '绑定微信', '立即绑定', 0, false))
  73 + this.accountAndSecurityData.push(new MineMainSettingFunctionItem($r('app.media.mine_order_icon'), '绑定新浪微博', '立即绑定', 0, false))
  74 + this.accountAndSecurityData.push(new MineMainSettingFunctionItem(null, 'Apple ID', null, 0, false))
  75 + this.accountAndSecurityData.push(new MineMainSettingFunctionItem(null, null, null, 2, null))
  76 +
  77 + this.accountAndSecurityData.push(new MineMainSettingFunctionItem(null, '注销账号', null, 0, false))
  78 +
  79 + return this.accountAndSecurityData
  80 + }
  81 +
  82 +
  83 +
  84 + // 网络请求设置数据
  85 + fetchAppointmentListData(pageSize:string,pageNum:string) {
  86 + // let url = HttpUrlUtils.getAppointmentListDataUrl()+ `?pageSize=${pageSize}&pageNum=${pageNum}`
  87 + // let headers: HashMap<string, string> = HttpUrlUtils.getYcgCommonHeaders();
  88 + // return WDHttp.get<ResponseDTO<MineAppointmentListItem>>(url, headers)
  89 + };
  90 +
  91 + // getAppointmentListData(pageSize:string,pageNum:string): Promise<MineAppointmentListItem> {
  92 + // return new Promise<MineAppointmentListItem>((success, error) => {
  93 + // Logger.info(TAG, `getAppointmentList start`);
  94 + // this.fetchAppointmentListData(pageSize,pageNum).then((navResDTO: ResponseDTO<MineAppointmentListItem>) => {
  95 + // if (!navResDTO) {
  96 + // error("page data invalid");
  97 + // return
  98 + // }
  99 + // Logger.info(TAG, "getAppointmentList then,AppointmentResDTO.timeStamp:" + navResDTO.timestamp);
  100 + // let navigationBean = navResDTO.data
  101 + // success(navigationBean);
  102 + // }).catch((err: Error) => {
  103 + // Logger.error(TAG, `fetchAppointmentListDataApi catch, error.name : ${err.name}, error.message:${err.message}`);
  104 + // error(err);
  105 + // })
  106 + // })
  107 + // }
  108 +
  109 +}
  110 +
  111 +const mineSettingDatasModel = MineSettingDatasModel.getInstance()
  112 +export default mineSettingDatasModel as MineSettingDatasModel
  1 +
  2 +/**
  3 + *
  4 + "attentionNum": 0,
  5 + "authIcon": "",
  6 + "authId": 0,
  7 + "authPersonal": "",
  8 + "authTitle": "",
  9 + "categoryAuth": "",
  10 + "city": "110100",
  11 + "cnAttentionNum": 0,
  12 + "cnCollectNum": 0,
  13 + "cnCommentNum": 0,
  14 + "cnFansNum": 4,
  15 + "cnIsAttention": 1,
  16 + "cnIsComment": 1,
  17 + "cnIsLike": 1,
  18 + "cnLikeNum": 0,
  19 + "cnLiveCommentControl": 1,
  20 + "cnLiveGiftControl": 1,
  21 + "cnLiveLikeControl": 1,
  22 + "cnLiveShareControl": 1,
  23 + "cnMainControl": 1,
  24 + "cnRegistTime": 1695280071000,
  25 + "cnShareControl": 1,
  26 + "cnShareNum": 0,
  27 + "cnUserId": "444937588589253",
  28 + "cnUserName": "QACrawler2115",
  29 + "cnUserType": "2",
  30 + "collectNum": 0,
  31 + "creatorId": "3004862",
  32 + "district": "110101",
  33 + "fansNum": 0,
  34 + "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",
  35 + "honoraryIcon": "",
  36 + "honoraryTitle": "",
  37 + "introduction": "知识博主",
  38 + "isAttention": 1,
  39 + "isComment": 1,
  40 + "isLike": 1,
  41 + "isVisiable": 1,
  42 + "likeNum": 0,
  43 + "liveCommentControl": 1,
  44 + "liveGiftControl": 1,
  45 + "liveLikeControl": 1,
  46 + "liveShareControl": 1,
  47 + "posterShareControl": 1,
  48 + "province": "110000",
  49 + "publishNum": 0,
  50 + "region": "",
  51 + "shareControl": 1,
  52 + "shareNum": 0,
  53 + "shopOpen": 0,
  54 + "storeUrl": "",
  55 + "subjectType": 0,
  56 + "userId": "",
  57 + "userName": "QACrawler2115",
  58 + "userType": "2",
  59 + "waresSwitch": 1
  60 + */
  61 +
  62 +@Observed
  63 +export class FollowListDetailItem{
  64 + headPhotoUrl:string //头像
  65 + cnUserName:string //昵称
  66 + cnFansNum:number //粉丝数
  67 + introduction:string //介绍
  68 + isFollow:boolean = false //是否已经关注
  69 +
  70 + constructor(headPhotoUrl:string,cnUserName:string,cnFansNum:number,introduction:string) {
  71 + this.headPhotoUrl = headPhotoUrl
  72 + this.cnUserName = cnUserName
  73 + this.cnFansNum = cnFansNum
  74 + this.introduction = introduction
  75 + }
  76 +}
  1 +
  2 +/**
  3 + * {
  4 + "directoryName": "创作",
  5 + "directoryWeight": 3,
  6 + "id": 74,
  7 + "isShow": 1,
  8 + "level": 1,
  9 + "parentId": 0,
  10 + "rootId": 0,
  11 + "children": [
  12 + {
  13 + "children": [
  14 + {
  15 + "directoryName": "新闻联播",
  16 + "directoryWeight": 3,
  17 + "id": 79,
  18 + "isShow": 1,
  19 + "level": 3,
  20 + "parentId": 75,
  21 + "rootId": 74
  22 + }
  23 + ],
  24 + "directoryName": "短视频",
  25 + "directoryWeight": 1,
  26 + "id": 75,
  27 + "isShow": 1,
  28 + "level": 2,
  29 + "parentId": 74,
  30 + "rootId": 74
  31 + }
  32 + ]
  33 + }
  34 + */
  35 +
  36 +@Observed
  37 +export class FollowListItem{
  38 + constructor(directoryName:string) {
  39 + this.directoryName = directoryName
  40 + }
  41 + directoryName:string
  42 + directoryWeight:number
  43 + id:number
  44 + isShow:number
  45 + level:number
  46 + parentId:number
  47 + rootId:number
  48 + children:FollowSecondListItem[]
  49 +}
  50 +@Observed
  51 +export class FollowSecondListItem{
  52 + directoryName:string
  53 + directoryWeight:number
  54 + id:number
  55 + isShow:number
  56 + level:number
  57 + parentId:number
  58 + rootId:number
  59 + children:FollowThirdListItem[]
  60 +}
  61 +@Observed
  62 +export class FollowThirdListItem{
  63 + directoryName:string
  64 + directoryWeight:number
  65 + id:number
  66 + isShow:number
  67 + level:number
  68 + parentId:number
  69 + rootId:number
  70 +}
  1 +
  2 +@Observed
  3 +export class MineMainSettingFunctionItem {
  4 + imgSrc:Resource // 图标
  5 + title:string // 标题
  6 + subTitle:string // 副标题
  7 + type:number // 数据类型 0默认箭头类型,1右侧switch按钮类型
  8 + switchState:boolean // 右侧switch按钮状态
  9 +
  10 +
  11 + constructor(imgSrc:Resource,title:string,subTitle:string,type:number,switchState:boolean){
  12 + this.imgSrc = imgSrc
  13 + this.title = title
  14 + this.subTitle = subTitle
  15 + this.type = type
  16 + this.switchState = switchState
  17 + }
  18 +}
@@ -86,6 +86,10 @@ @@ -86,6 +86,10 @@
86 { 86 {
87 "name":"color_CCCCCC", 87 "name":"color_CCCCCC",
88 "value": "#CCCCCC" 88 "value": "#CCCCCC"
  89 + },
  90 + {
  91 + "name":"color_EDEDED",
  92 + "value": "#EDEDED"
89 } 93 }
90 ] 94 ]
91 } 95 }
@@ -205,6 +205,18 @@ @@ -205,6 +205,18 @@
205 ] 205 ]
206 } 206 }
207 ] 207 ]
  208 + },
  209 + {
  210 + "name": "wdLogin",
  211 + "srcPath": "./features/wdLogin",
  212 + "targets": [
  213 + {
  214 + "name": "default",
  215 + "applyToProducts": [
  216 + "default"
  217 + ]
  218 + }
  219 + ]
208 } 220 }
209 ] 221 ]
210 } 222 }
@@ -17,4 +17,6 @@ export { ViewType } from './src/main/ets/enum/ViewType'; @@ -17,4 +17,6 @@ export { ViewType } from './src/main/ets/enum/ViewType';
17 17
18 export { DurationEnum } from './src/main/ets/enum/DurationEnum'; 18 export { DurationEnum } from './src/main/ets/enum/DurationEnum';
19 19
20 -export { ScreenType } from './src/main/ets/enum/ScreenType';  
  20 +export { ScreenType } from './src/main/ets/enum/ScreenType';
  21 +
  22 +export { SpConstants } from './src/main/ets/constants/SpConstants';
  1 +
  2 +export class SpConstants{
  3 + static USER_JWT_TOKEN="jwtToken"
  4 + static USER_REFRESH_TOKEN="refreshToken"
  5 + static USER_Type="userType"
  6 + static USER_NAME="userName"
  7 + static USER_ID="userId"
  8 + static USER_FIRST_MARK="firstMark"
  9 + static USER_LONG_TIME_NO_LOGIN_MARK="longTimeNoLoginMark"
  10 + static USER_STATUS="user_status"
  11 + static USER_TEMP_TOKEN="tempToken"
  12 +
  13 +}
@@ -4,8 +4,8 @@ @@ -4,8 +4,8 @@
4 */ 4 */
5 export const enum BottomNavi { 5 export const enum BottomNavi {
6 NEWS = 0, 6 NEWS = 0,
7 - PEOPLE,  
8 - VIDEO,  
9 - SERVICE,  
10 - MINE, 7 + PEOPLE=1,
  8 + VIDEO=2,
  9 + SERVICE=3,
  10 + MINE=4,
11 } 11 }
1 import HashMap from '@ohos.util.HashMap' 1 import HashMap from '@ohos.util.HashMap'
2 import { ConfigConstants } from 'wdConstant' 2 import { ConfigConstants } from 'wdConstant'
3 -import { DateTimeUtils, Logger } from 'wdKit' 3 +import { DateTimeUtils, Logger, SPHelper } from 'wdKit'
4 4
5 /** 5 /**
6 * 网络请求业务侧工具类 6 * 网络请求业务侧工具类
@@ -53,8 +53,35 @@ export class HttpUrlUtils { @@ -53,8 +53,35 @@ export class HttpUrlUtils {
53 * 电子报列表 53 * 电子报列表
54 */ 54 */
55 static readonly E_NEWSPAPER_LIST_PATH: string = "/api/rmrb-bff-display-zh/display/zh/c/paperApi/paperList"; 55 static readonly E_NEWSPAPER_LIST_PATH: string = "/api/rmrb-bff-display-zh/display/zh/c/paperApi/paperList";
  56 + /**
  57 + * 个人中心 我的预约列表
  58 + */
  59 + static readonly APPOINTMENT_LIST_DATA_PATH: string = "/api/live-center-message/zh/c/live/subscribe";
  60 + /**
  61 + * 个人中心 关注列表详情
  62 + */
  63 + static readonly FOLLOW_LIST_DETAIL_DATA_PATH: string = "/api/rmrb-creator-user/c/creatorDirectory/getContactMasterDetaiPage";
  64 + /**
  65 + * 个人中心 关注列表
  66 + */
  67 + static readonly FOLLOW_LIST_DATA_PATH: string = "/api/rmrb-creator-user/c/creatorDirectory/getCreatorDirectoryTree";
  68 + /**
  69 + * 早晚报列表
  70 + * 根据页面id获取页面楼层列表
  71 + * https://pdapis.pdnews.cn/api/rmrb-bff-display-zh/display/zh/c/pageInfo?pageId=28927
  72 + * 根据楼层Id获取组件节目信息
  73 + * https://pdapis.pdnews.cn/api/rmrb-bff-display-zh/display/zh/c/compInfo?loadStrategy=
  74 + * first_load&refreshTime=1710829610144&pageId=28927&channelStrategy=2&groupId=40621&
  75 + * pageSize=20&pageNum=1&topicId=10000009445
  76 + * */
  77 + static readonly MORNING_EVENING_PAGE_INFO_PATH: string = "/api/rmrb-bff-display-zh/display/zh/c/pageInfo";
  78 +
  79 + static readonly MORNING_EVENING_COMP_INFO_PATH: string = "/api/rmrb-bff-display-zh/display/zh/c/compInfo";
56 80
57 private static hostUrl: string = HttpUrlUtils.HOST_UAT; 81 private static hostUrl: string = HttpUrlUtils.HOST_UAT;
  82 + private static userId=''
  83 + private static userType=''
  84 + private static token=''
58 85
59 static getCommonHeaders(): HashMap<string, string> { 86 static getCommonHeaders(): HashMap<string, string> {
60 let headers: HashMap<string, string> = new HashMap<string, string>() 87 let headers: HashMap<string, string> = new HashMap<string, string>()
@@ -67,7 +94,9 @@ export class HttpUrlUtils { @@ -67,7 +94,9 @@ export class HttpUrlUtils {
67 headers.set('timestamp', HttpUrlUtils.getTimestamp()) 94 headers.set('timestamp', HttpUrlUtils.getTimestamp())
68 headers.set('RMRB-X-TOKEN', HttpUrlUtils.getXToken()) 95 headers.set('RMRB-X-TOKEN', HttpUrlUtils.getXToken())
69 headers.set('device_id', HttpUrlUtils.getDeviceId()) 96 headers.set('device_id', HttpUrlUtils.getDeviceId())
70 - // headers.set('cookie', 'RMRB-X-TOKEN=eyJhbGciOiJIUzI1NiIsImtpZCI6ImQ4WkI2QkhxSEZrdjJ2U25BNlRwZEdKRjBHcjItVzBvS2FaYzdLOUUycmcifQ.eyJpc3MiOiJwZW9wbGVzLWRhaWx5LWZvdXJhIiwic3ViIjoicGVvcGxlcy1kYWlseS1mb3VyYSIsImV4cCI6MTcwMzY0OTYwNiwidXNlcklkIjo0NTk3NzYyOTc0NzQ5NDksInVzZXJWZXJzaW9uIjoiNDU5Nzc2Mjk3NDc0OTQ5XzIiLCJ1c2VyTmFtZSI6IkJ1bGlraWtpMTgxIiwidXNlclR5cGUiOjIsImNyZWF0b3JJZCI6NDI2NTM5MH0.jhQ9kylcm3FxWf0-lBMZuLkdtIQ6XpFnAi0AFZJNwfc') 97 + if(HttpUrlUtils.token!=''){
  98 + headers.set('cookie', 'RMRB-X-TOKEN='+HttpUrlUtils.token)
  99 + }
71 headers.set('build_version', HttpUrlUtils.getVersion()) 100 headers.set('build_version', HttpUrlUtils.getVersion())
72 headers.set('adcode', HttpUrlUtils.getAdCode()) 101 headers.set('adcode', HttpUrlUtils.getAdCode())
73 headers.set('os_version', HttpUrlUtils.getOsVersion()) 102 headers.set('os_version', HttpUrlUtils.getOsVersion())
@@ -208,11 +237,11 @@ export class HttpUrlUtils { @@ -208,11 +237,11 @@ export class HttpUrlUtils {
208 237
209 private static getUserId() { 238 private static getUserId() {
210 // TODO 对接登录 239 // TODO 对接登录
211 - return '459776297474949'; 240 + return HttpUrlUtils.userId;
212 } 241 }
213 242
214 private static getUserType() { 243 private static getUserType() {
215 - return '2'; 244 + return HttpUrlUtils.userType;
216 } 245 }
217 246
218 static getVerifyCodeUrl() { 247 static getVerifyCodeUrl() {
@@ -229,4 +258,70 @@ export class HttpUrlUtils { @@ -229,4 +258,70 @@ export class HttpUrlUtils {
229 let url = HttpUrlUtils.hostUrl + "/api/rmrb-user-center/auth/zh/c/checkVerifyCode"; 258 let url = HttpUrlUtils.hostUrl + "/api/rmrb-user-center/auth/zh/c/checkVerifyCode";
230 return url; 259 return url;
231 } 260 }
  261 +
  262 + static getAppointmentListDataUrl() {
  263 + let url = HttpUrlUtils.HOST_SIT + HttpUrlUtils.APPOINTMENT_LIST_DATA_PATH
  264 + return url
  265 + }
  266 +
  267 + static getFollowListDetailDataUrl() {
  268 + let url = HttpUrlUtils.HOST_SIT + HttpUrlUtils.FOLLOW_LIST_DETAIL_DATA_PATH
  269 + return url
  270 + }
  271 +
  272 + static getFollowListDataUrl() {
  273 + let url = HttpUrlUtils.HOST_SIT + HttpUrlUtils.FOLLOW_LIST_DATA_PATH
  274 + return url
  275 + }
  276 +
  277 + static getYcgCommonHeaders(): HashMap<string, string> {
  278 + let headers: HashMap<string, string> = new HashMap<string, string>()
  279 +
  280 + headers.set('mpassid', 'XGt6jfGUx8ADAKruTyAMdhHj')
  281 + headers.set('city', "%E5%90%88%E8%82%A5%E5%B8%82")
  282 + headers.set('User-Agent', 'Dalvik/2.1.0 (Linux; U; Android 10; PCT-AL10 Build/HUAWEIPCT-AL10)')
  283 + headers.set('channel', "rmrb_china_0000")
  284 + headers.set('appCode', "0af1f9085e484c97b2a44704bae72c07")
  285 + headers.set('Authorization', "APPCODE 0af1f9085e484c97b2a44704bae72c07")
  286 + headers.set('X-Ca-Stage', "TEST")
  287 + headers.set('plat', "Phone")
  288 + headers.set('Content-Type', 'application/json; charset=utf-8')
  289 + headers.set('timestamp', "740977741")
  290 + headers.set('RMRB-X-TOKEN', "eyJhbGciOiJIUzI1NiIsImtpZCI6IklFazBGclhfV2RYMEx1ZktDU01iYTVYd0VmUHZ6a043T0F5UTRFLWIwWU0ifQ.eyJpc3MiOiJwZW9wbGVzLWRhaWx5LWZvdXJhIiwic3ViIjoicGVvcGxlcy1kYWlseS1mb3VyYSIsImV4cCI6MTcxMDc1NjM3NywidXNlcklkIjo1NjczODc0NzcwNjM2MjEsInVzZXJWZXJzaW9uIjoiNTY3Mzg3NDc3MDYzNjIxXzAiLCJ1c2VyTmFtZSI6IiVFNCVCQSVCQSVFNiVCMCU5MSVFNiU5NyVBNSVFNiU4QSVBNSVFNyVCRCU5MSVFNSU4RiU4QmFQcnRxNSIsInVzZXJUeXBlIjoxLCJjcmVhdG9ySWQiOm51bGwsInVzZXJJZFpoIjpudWxsfQ.KBkF0Yki-JWlq0ZIOCzgKwQc1ycBnFHa6CF-rMPRgHU")
  291 + headers.set('device_id', "5156098c-6c44-3514-af70-04a0139a9327")
  292 + // headers.set('cookie', 'RMRB-X-TOKEN=eyJhbGciOiJIUzI1NiIsImtpZCI6IklFazBGclhfV2RYMEx1ZktDU01iYTVYd0VmUHZ6a043T0F5UTRFLWIwWU0ifQ.eyJpc3MiOiJwZW9wbGVzLWRhaWx5LWZvdXJhIiwic3ViIjoicGVvcGxlcy1kYWlseS1mb3VyYSIsImV4cCI6MTcxMDU4Mzk0MywidXNlcklkIjo1NjczODc0NzcwNjM2MjEsInVzZXJWZXJzaW9uIjoiNTY3Mzg3NDc3MDYzNjIxXzAiLCJ1c2VyTmFtZSI6IiVFNCVCQSVCQSVFNiVCMCU5MSVFNiU5NyVBNSVFNiU4QSVBNSVFNyVCRCU5MSVFNSU4RiU4QmFQcnRxNSIsInVzZXJUeXBlIjoxLCJjcmVhdG9ySWQiOm51bGwsInVzZXJJZFpoIjpudWxsfQ._LTKrUxQozpCj1XMhx1TWOIxn5gjDveoPuMFGpI0g_8')
  293 + headers.set('build_version', "202403112023")
  294 + headers.set('adcode', "340000")
  295 + headers.set('os_version', "10")
  296 + headers.set('city_dode', "340100")
  297 + headers.set('userId', "567387477063621")
  298 + headers.set('versionCode', "7302")
  299 + headers.set('system', "Android")
  300 + headers.set('version_name', "7.3.0.2")
  301 + headers.set('EagleEye-TraceID', '101118E4D006453DA549A82AA8CAFBFE')
  302 + headers.set('imei', "5156098c-6c44-3514-af70-04a0139a9327")
  303 + headers.set('userType', "1")
  304 + headers.set('Accept-Language', 'zh')
  305 +
  306 + // HttpUrlUtils.addSpecialHeaders(headers);
  307 + // Logger.debug("TAG", '******************* commonHeaders headers start ******************************** ');
  308 + // headers.forEach((v,k)=>{
  309 + // Logger.debug("TAG", 'getCommonHeaders header: ' + k + ': ' + v);
  310 + // })
  311 + // Logger.debug("TAG", '******************* commonHeaders headers end ******************************** ');
  312 + return headers;
  313 + }
  314 +
  315 + public static setUserId(userId:string){
  316 + HttpUrlUtils.userId=userId;
  317 + }
  318 +
  319 + public static setUserType(userType:string){
  320 + HttpUrlUtils.userType=userType;
  321 + }
  322 +
  323 + public static setUserToken(token:string){
  324 + HttpUrlUtils.token=token;
  325 + }
  326 +
232 } 327 }
@@ -36,4 +36,8 @@ export class WDRouterPage { @@ -36,4 +36,8 @@ export class WDRouterPage {
36 static loginPage = new WDRouterPage("wdLogin", "ets/pages/login/LoginPage"); 36 static loginPage = new WDRouterPage("wdLogin", "ets/pages/login/LoginPage");
37 37
38 static forgetPasswordPage = new WDRouterPage("wdLogin", "ets/pages/login/ForgetPasswordPage"); 38 static forgetPasswordPage = new WDRouterPage("wdLogin", "ets/pages/login/ForgetPasswordPage");
  39 + //我的 预约
  40 + static appointmentListPage = new WDRouterPage("wdComponent", "ets/components/page/AppointmentListPage");
  41 + //我的 关注
  42 + static followListPage = new WDRouterPage("wdComponent", "ets/components/page/FollowListPage");
39 } 43 }
@@ -20,7 +20,9 @@ export class WDRouterRule { @@ -20,7 +20,9 @@ export class WDRouterRule {
20 // router.pushUrl({ url: 'pages/routerpage2', , params: params }) 20 // router.pushUrl({ url: 'pages/routerpage2', , params: params })
21 router.pushUrl({ url: page.url(), params: params }) 21 router.pushUrl({ url: page.url(), params: params })
22 } else { 22 } else {
23 - router.pushUrl({ url: page.url() }) 23 + router.pushUrl({ url: page.url() }).catch((error:Error)=>{
  24 + console.log("err",JSON.stringify(error))//100002 uri is not exist
  25 + })
24 } 26 }
25 } else { 27 } else {
26 ToastUtils.showToast("功能开发中", 1000); 28 ToastUtils.showToast("功能开发中", 1000);
  1 +// export interface Group {
  2 +// blockDesc: string;
  3 +// groupStrategy: number;
  4 +// id: number;
  5 +// itemNum?: any;
  6 +// showType: number;
  7 +// sortValue: number;
  8 +// }
  9 +//
  10 +// export interface TopicInfo {
  11 +// axisColor: string;
  12 +// channelId?: any;
  13 +// commentFlag: number;
  14 +// commentPreviewFlag: number;
  15 +// commentShowFlag: number;
  16 +// frontFlag?: any;
  17 +// frontLinkObject?: any;
  18 +// posterFlag: number;
  19 +// posterUrl: string;
  20 +// relId?: any;
  21 +// relObjectId?: any;
  22 +// relType?: any;
  23 +// shareCoverUrl: string;
  24 +// shareOpen: number;
  25 +// sharePosterCoverUrl: string;
  26 +// sharePosterOpen?: any;
  27 +// shareSummary: string;
  28 +// shareTitle: string;
  29 +// shareUrl: string;
  30 +// slideColor: string;
  31 +// summary: string;
  32 +// title: string;
  33 +// titleShow: number;
  34 +// topicDate: string;
  35 +// topicId: string;
  36 +// topicPattern: number;
  37 +// topicTemplate?: any;
  38 +// topicType: number;
  39 +// transluceImgUrl: string;
  40 +// visitorComment: number;
  41 +// voteInfo?: any;
  42 +// }
  43 +//
  44 +// export interface PageInfoBean {
  45 +// backIconUrl: string;
  46 +// backgroundColor: string;
  47 +// backgroundImgUrl: string;
  48 +// baselineColor: string;
  49 +// baselineCopywriting: string;
  50 +// baselineShow: number;
  51 +// description: string;
  52 +// groups: Group[];
  53 +// hasAdInfo: number;
  54 +// hasPopUp: number;
  55 +// id: number;
  56 +// mainLogoImgUrl: string;
  57 +// name: string;
  58 +// pageTopParams?: any;
  59 +// pageTopType: number;
  60 +// pageType: number;
  61 +// popUps: any[];
  62 +// pushupLogoImgUrl: string;
  63 +// shareCoverUrl: string;
  64 +// shareIconUrl: string;
  65 +// shareName: string;
  66 +// shareSummary: string;
  67 +// shareUrl: string;
  68 +// statusBarColor: string;
  69 +// templateType: number;
  70 +// titleColor: string;
  71 +// topicInfo: TopicInfo;
  72 +// }
  73 +//
  74 +// export interface Meta {
  75 +// md5: string;
  76 +// }
  77 +//
  78 +// export interface RootObject {
  79 +// code: string;
  80 +// data: Data;
  81 +// message: string;
  82 +// meta: Meta;
  83 +// requestId: string;
  84 +// success: boolean;
  85 +// timestamp: number;
  86 +// }
  1 +@Component
  2 +export default struct MinePageCardUI {
  3 + build(){
  4 + Flex(){
  5 + Stack(){
  6 + Image($r('app.media.mine_card_01'))
  7 + .setFullWidthAndHeight()
  8 + .objectFit(ImageFit.Auto)
  9 + Column(){
  10 + Text("积分商城")
  11 + .fontColor($r('app.color.color_994D00'))
  12 + .width('119lpx')
  13 + .height('35lpx')
  14 + .textAlign(TextAlign.Start)
  15 + .fontSize('29lpx')
  16 + .fontWeight(600)
  17 + Text("华为MATE40手机")
  18 + .width('159lpx')
  19 + .height('23lpx')
  20 + .fontColor($r('app.color.color_994D00'))
  21 + .fontSize('19lpx')
  22 + .fontWeight(400)
  23 + .textAlign(TextAlign.Start)
  24 + .margin({top:'10lpx'})
  25 + }.padding({left:'29lpx'})
  26 + .alignItems(HorizontalAlign.Start)
  27 + }.alignContent(Alignment.Start)
  28 + .width('349lpx')
  29 + .height('115lpx')
  30 +
  31 + Stack(){
  32 + Image($r('app.media.mine_card_02'))
  33 + .setFullWidthAndHeight()
  34 + .objectFit(ImageFit.Auto)
  35 + Column(){
  36 + Text("数字藏品")
  37 + .fontColor($r('app.color.color_B15900'))
  38 + .width('119lpx')
  39 + .height('35lpx')
  40 + .textAlign(TextAlign.Start)
  41 + .fontSize('29lpx')
  42 + .fontWeight(600)
  43 + Text("黑胶唱片NFT")
  44 + .width('159lpx')
  45 + .height('23lpx')
  46 + .fontColor($r('app.color.color_B15900'))
  47 + .fontSize('19lpx')
  48 + .textAlign(TextAlign.Start)
  49 + .margin({top:'10lpx'})
  50 + .fontWeight(400)
  51 + }.padding({left:'67lpx'})
  52 + .alignItems(HorizontalAlign.Start)
  53 + }.alignContent(Alignment.Start)
  54 + .width('348lpx')
  55 + .height('115lpx')
  56 + }.setFullWidth()
  57 + .height('115lpx')
  58 + .padding({left:'23lpx',right:'23lpx'})
  59 + .margin({top:'24lpx'})
  60 + }
  61 +
  62 + @Styles setFullWidthAndHeight(){
  63 + .width('100%')
  64 + .height('100%')
  65 + }
  66 +
  67 + @Styles setFullWidth(){
  68 + .width('100%')
  69 + }
  70 +
  71 + @Styles setFullHeight(){
  72 + .height('100%')
  73 + }
  74 +}
  1 +import MinePageCreatorFunctionsItem from '../../viewmodel/MinePageCreatorFunctionsItem'
  2 +
  3 +@Component
  4 +export default struct MinePageCreatorFunctionUI {
  5 + @Link creatorData:MinePageCreatorFunctionsItem[]
  6 +
  7 + build(){
  8 + Column(){
  9 + Row(){
  10 + Text("创作者中心")
  11 + .fontSize('29lpx')
  12 + .width('148lpx')
  13 + .height('46lpx')
  14 + .fontWeight(600)
  15 + .fontColor($r('app.color.color_222222'))
  16 +
  17 + Blank()
  18 +
  19 + Row(){
  20 + Text("内容管理")
  21 + .fontSize('27lpx')
  22 + .width('113lpx')
  23 + .height('35lpx')
  24 + .fontColor($r('app.color.color_999999'))
  25 +
  26 + Image($r('app.media.mine_right_arrow'))
  27 + .width('27lpx')
  28 + .height('27lpx')
  29 + .objectFit(ImageFit.Auto)
  30 + }
  31 +
  32 + }.setFullWidth()
  33 + .height('92lpx')
  34 + .padding({left:'29lpx',top:'23lpx',right:'31lpx'})
  35 +
  36 + Row(){
  37 + Grid(){
  38 + ForEach(this.creatorData,(item:MinePageCreatorFunctionsItem,index:number)=>{
  39 + GridItem(){
  40 + Row(){
  41 + Column(){
  42 + Image(item.imgSrc)
  43 + .width('50lpx')
  44 + .height('50lpx')
  45 + Text(`${item.msg}`)
  46 + .margin({top:'15lpx'})
  47 + .width('96lpx')
  48 + .height('23lpx')
  49 + .fontColor($r('app.color.color_666666'))
  50 + .fontSize('23lpx')
  51 + }
  52 + .alignItems(HorizontalAlign.Center)
  53 + .width('100%')
  54 + Blank()
  55 + .layoutWeight(1)
  56 + if(index % 4 < 3 && index != this.creatorData.length){
  57 + Text().backgroundColor($r('app.color.color_222222'))
  58 + .opacity(0.1)
  59 + .width('2lpx')
  60 + .height('29lpx')
  61 + }
  62 + }
  63 + }.onClick(()=>{
  64 + console.log(index+"")
  65 + }).width('169lpx')
  66 + .height('117lpx')
  67 + })
  68 + }
  69 + .rowsTemplate('1fr')
  70 + .columnsTemplate('1fr 1fr 1fr 1fr')
  71 + .height('88lpx')
  72 + }.setFullWidth()
  73 + .height('127lpx')
  74 + }
  75 + .height('219lpx')
  76 + .borderRadius(8)
  77 + .margin({top:'19lpx',left:'23lpx',right:'23lpx'})
  78 + .setBackGroundWhite()
  79 + }
  80 +
  81 + @Styles setFullWidthAndHeight(){
  82 + .width('100%')
  83 + .height('100%')
  84 + }
  85 +
  86 + @Styles setFullWidth(){
  87 + .width('100%')
  88 + }
  89 +
  90 + @Styles setFullHeight(){
  91 + .height('100%')
  92 + }
  93 +
  94 + @Styles setBackGroundWhite(){
  95 + .backgroundColor($r('app.color.white'))
  96 + }
  97 +}
  1 +import MinePageMoreFunctionModel from '../../viewmodel/MinePageMoreFunctionModel'
  2 +
  3 +@Component
  4 +export default struct MinePageMoreFunctionUI{
  5 + @Link moreData:MinePageMoreFunctionModel[]
  6 +
  7 + build(){
  8 + Column(){
  9 + Column(){
  10 + Text(`更多功能`)
  11 + .width('456lpx')
  12 + .height('38lpx')
  13 + .fontColor($r('app.color.color_666666'))
  14 + .fontSize('29lpx')
  15 + .margin({left:"31lpx"})
  16 + .fontWeight(600)
  17 + }.height('92lpx')
  18 + .width('100%')
  19 + .justifyContent(FlexAlign.Center)
  20 + .alignItems(HorizontalAlign.Start)
  21 +
  22 + Text().backgroundColor($r('app.color.color_F5F5F5'))
  23 + .width('100%')
  24 + .height('1lpx')
  25 +
  26 + List(){
  27 + ForEach(this.moreData,(item:MinePageMoreFunctionModel,index:number)=>{
  28 + ListItem(){
  29 + Column(){
  30 + Column(){
  31 + Row(){
  32 + if(item.imgSrc){
  33 + Image(item.imgSrc)
  34 + .width('38lpx')
  35 + .height('38lpx')
  36 + .margin({right:'15lpx'})
  37 + }
  38 + Text(`${item.msg}`)
  39 + .width('456lpx')
  40 + .height('38lpx')
  41 + .fontColor($r('app.color.color_666666'))
  42 + .fontSize('29lpx')
  43 + .fontWeight(400)
  44 +
  45 + Blank()
  46 + Image($r('app.media.mine_user_arrow'))
  47 + .width('27lpx')
  48 + .height('27lpx')
  49 + .objectFit(ImageFit.Auto)
  50 + .margin({left:'81lpx',right:'29lpx'})
  51 + }.alignItems(VerticalAlign.Center)
  52 + .justifyContent(FlexAlign.Center)
  53 + }.height('108lpx')
  54 + .justifyContent(FlexAlign.Center)
  55 + .alignItems(HorizontalAlign.Start)
  56 + .padding({left:'27lpx'})
  57 +
  58 + if(index != this.moreData.length -1 ){
  59 + Text().backgroundColor($r('app.color.color_F5F5F5'))
  60 + .width('612lpx')
  61 + .height('1lpx')
  62 + }
  63 + }
  64 + }
  65 + .onClick(()=>{
  66 + console.log(index+"")
  67 + if (index == 3) {
  68 + // RouteManager.jumpNewPage("pages/SettingPage")
  69 + } else {
  70 + // RouteManager.jumpNewPage("pages/PrivacySettingPage")
  71 + }
  72 + })
  73 + .height('117lpx')
  74 + })
  75 + }.onScrollFrameBegin((offset, state) => {
  76 + return { offsetRemain: 0 }
  77 + })
  78 + }
  79 + .backgroundColor($r('app.color.white'))
  80 + .borderRadius(8)
  81 + .margin({left:'23lpx',right:'23lpx',top:"19lpx"})
  82 + }
  83 +}
  1 +import { WDRouterRule, WDRouterPage } from 'wdRouter'
  2 +import MinePagePersonalFunctionsItem from '../../viewmodel/MinePagePersonalFunctionsItem'
  3 +import router from '@ohos.router'
  4 +
  5 +@Component
  6 +export default struct MinePagePersonFunctionUI {
  7 + @Link personalData:MinePagePersonalFunctionsItem[]
  8 +
  9 + build() {
  10 + Grid(){
  11 + ForEach(this.personalData,(item:MinePagePersonalFunctionsItem,index:number)=>{
  12 + GridItem(){
  13 + Row(){
  14 + Column(){
  15 + Image(item.imgSrc)
  16 + .width('46lpx')
  17 + .height('46lpx')
  18 + Text(`${item.msg}`)
  19 + .margin({top:'8lpx'})
  20 + .width('50lpx')
  21 + .height('23lpx')
  22 + .fontColor($r('app.color.color_222222'))
  23 + .fontSize('23lpx')
  24 + }
  25 + .alignItems(HorizontalAlign.Center)
  26 + .width('100%')
  27 + Blank()
  28 + .layoutWeight(1)
  29 + if(index % 4 < 3 && index != this.personalData.length-1){
  30 + Text().backgroundColor($r('app.color.color_222222'))
  31 + .opacity(0.1)
  32 + .width('2lpx')
  33 + .height('29lpx')
  34 + }
  35 + }
  36 + }.onClick(()=>{
  37 + console.log(index+"")
  38 + switch (item.msg){
  39 + case "预约":{
  40 + WDRouterRule.jumpWithPage(WDRouterPage.appointmentListPage)
  41 + break;
  42 + }
  43 + case "关注":{
  44 + WDRouterRule.jumpWithPage(WDRouterPage.followListPage)
  45 + break;
  46 + }
  47 + }
  48 + }).width('169lpx')
  49 + .height('117lpx')
  50 + })
  51 + }
  52 + .rowsTemplate('1fr 1fr')
  53 + .columnsTemplate('1fr 1fr 1fr 1fr')
  54 + .height('234lpx')
  55 + .margin({top:'31lpx',left:'23lpx',right:'23lpx' })
  56 + }
  57 +}
  1 +import { WDRouterPage, WDRouterRule } from 'wdRouter'
  2 +
  3 +@Component
  4 +export default struct MinePageUserSimpleInfoUI {
  5 + @Prop isLogin:boolean
  6 + @Prop userName:string
  7 +
  8 +
  9 + build(){
  10 + Row(){
  11 + //头像
  12 + Stack(){
  13 + Button({type:ButtonType.Circle})
  14 + .backgroundColor($r('app.color.main_red'))
  15 + .width('110lpx')
  16 + .height('110lpx')
  17 + Image($r('app.media.mine_head_icon'))
  18 + .width('108lpx')
  19 + .height('108lpx')
  20 + .objectFit(ImageFit.Cover)
  21 + .borderRadius(50)
  22 + }.width('110lpx')
  23 + .height('110lpx')
  24 + .alignContent(Alignment.Center)
  25 + .onClick(()=>{
  26 + if(!this.isLogin){
  27 + WDRouterRule.jumpWithPage(WDRouterPage.loginPage)
  28 + }
  29 + })
  30 +
  31 + if(this.isLogin){
  32 + //昵称信息
  33 + Column(){
  34 + Row(){
  35 + Text(this.userName)
  36 + .fontColor($r('app.color.color_222222'))
  37 + .maxLines(1)
  38 + .textOverflow({ overflow: TextOverflow.Ellipsis })
  39 + .fontSize('33lpx')
  40 +
  41 + Image($r('app.media.mine_user_edit'))
  42 + .width('27lpx')
  43 + .height('27lpx')
  44 + .margin({left:'15lpx'})
  45 + .objectFit(ImageFit.Cover)
  46 + Blank()
  47 + }.width('100%')
  48 +
  49 + Stack(){
  50 + Image($r('app.media.mine_grade_bg'))
  51 + .width('84lpx')
  52 + .height('29lpx')
  53 + .objectFit(ImageFit.Auto)
  54 + Text("等级8")
  55 + .textAlign(TextAlign.Center)
  56 + .fontColor($r('app.color.white'))
  57 + .fontSize('19lpx')
  58 + .width('50lpx')
  59 + .height('29lpx')
  60 + }.margin({top:'15lpx'})
  61 + }.alignItems(HorizontalAlign.Start)
  62 + .margin({top:'12lpx',left:'17lpx'})
  63 + .width('352lpx')
  64 + }else{
  65 + Row(){
  66 + Text("登录注册")
  67 + .fontColor($r('app.color.color_222222'))
  68 + .textOverflow({ overflow: TextOverflow.Ellipsis })
  69 + .fontSize('33lpx')
  70 +
  71 + Image($r('app.media.mine_user_edit'))
  72 + .width('11lpx')
  73 + .height('20lpx')
  74 + .margin({left:'15lpx'})
  75 + .objectFit(ImageFit.Cover)
  76 + Blank()
  77 + }
  78 + .margin({top:'11lpx',left:'17lpx'})
  79 + .width('352lpx')
  80 + }
  81 +
  82 + Blank()
  83 +
  84 + Stack({alignContent:Alignment.Start}){
  85 + Text("签到")
  86 + .textAlign(TextAlign.Start)
  87 + .width('108lpx')
  88 + .height('46lpx')
  89 + .fontColor($r('app.color.color_AD6000'))
  90 + .backgroundColor($r('app.color.color_FFC460'))
  91 + .fontWeight(500)
  92 + .position({x:'23lpx'})
  93 + .padding({left:'35lpx'})
  94 + Image($r("app.media.mine_sign_icon"))
  95 + .width('50lpx')
  96 + .height('50lpx')
  97 + }.width('131lpx')
  98 + }.backgroundColor($r('app.color.white'))
  99 + .setFullWidth()
  100 + .padding({top:'31lpx',left:'46lpx'})
  101 + }
  102 +
  103 + @Styles setFullWidthAndHeight(){
  104 + .width('100%')
  105 + .height('100%')
  106 + }
  107 +
  108 + @Styles setFullWidth(){
  109 + .width('100%')
  110 + }
  111 +
  112 + @Styles setFullHeight(){
  113 + .height('100%')
  114 + }
  115 +}
  1 +import { MineAppointmentItem } from '../../../viewmodel/MineAppointmentItem'
  2 +
  3 +@Component
  4 +export struct AppointmentListChildComponent{
  5 + @ObjectLink item: MineAppointmentItem
  6 +
  7 + build() {
  8 + Column(){
  9 + Stack(){
  10 + Image(this.item?.imageUrl[0])
  11 + .objectFit(ImageFit.Auto)
  12 +
  13 + if(this.item.relType === 1){
  14 + Row(){
  15 + Row(){
  16 + Image($r('app.media.reserve_icon'))
  17 + .width('42lpx')
  18 + .height('35lpx')
  19 + .objectFit(ImageFit.Auto)
  20 + Text("预约")
  21 + .fontWeight(400)
  22 + .fontSize('21lpx')
  23 + .backgroundColor($r('app.color.color_4D000000'))
  24 + .fontColor($r('app.color.white'))
  25 + .lineHeight('31lpx')
  26 + .layoutWeight(1)
  27 + .textAlign(TextAlign.Center)
  28 + }.width('94lpx')
  29 + .margin({bottom:'15lpx',right:'15lpx'})
  30 + }.width('100%')
  31 + .height('100%')
  32 + .alignItems(VerticalAlign.Bottom)
  33 + .justifyContent(FlexAlign.End)
  34 + }
  35 + }.width('100%')
  36 + .height('376lpx')
  37 +
  38 + Column(){
  39 + Text(this.item.title)
  40 + .fontWeight('400lpx')
  41 + .fontSize('33lpx')
  42 + .fontColor($r('app.color.color_222222'))
  43 + .lineHeight('48lpx')
  44 + .maxLines(2)
  45 + .textOverflow({ overflow: TextOverflow.Ellipsis })
  46 + .margin({bottom:'23lpx'})
  47 + .textAlign(TextAlign.Start)
  48 + .width('100%')
  49 + Row(){
  50 + Row(){
  51 + if(this.item.relType === 2){
  52 + Image($r('app.media.play_status_history_icon'))
  53 + .objectFit(ImageFit.Auto)
  54 + .width('38lpx')
  55 + .height('38lpx')
  56 + .margin({right:'12lpx'})
  57 + Text('已结束').fontColor($r('app.color.color_999999'))
  58 + .fontWeight('500lpx')
  59 + .fontSize('23lpx')
  60 + }else {
  61 + Image($r('app.media.play_status_icon'))
  62 + .objectFit(ImageFit.Auto)
  63 + .width('38lpx')
  64 + .height('38lpx')
  65 + .margin({right:'12lpx'})
  66 + Text(this.item.timePre).fontColor($r('app.color.color_ED2800'))
  67 + .fontWeight('500lpx')
  68 + .fontSize('23lpx')
  69 + Image($r('app.media.point_icon'))
  70 + .objectFit(ImageFit.Auto)
  71 + .width('12lpx')
  72 + .height('31lpx')
  73 + .margin({right:'4lpx'})
  74 + Text(`${this.item.timeBack}开始`).fontColor($r('app.color.color_ED2800'))
  75 + .fontWeight('500lpx')
  76 + .fontSize('23lpx')
  77 + .lineHeight('31lpx')
  78 + }
  79 + }.padding({left:'19lpx',right:'19lpx'})
  80 + .height('46lpx')
  81 + .alignItems(VerticalAlign.Center)
  82 + .backgroundColor($r('app.color.color_F5F5F5'))
  83 + .borderRadius('4lpx')
  84 + Blank()
  85 + .layoutWeight(1)
  86 + if(this.item.relType === 1){
  87 + Text(this.item.isAppointment?"已预约":"预约")
  88 + .fontWeight(400)
  89 + .fontSize('23lpx')
  90 + .backgroundColor(this.item.isAppointment?$r('app.color.color_F5F5F5'):$r('app.color.color_ED2800'))
  91 + .fontColor(this.item.isAppointment?$r('app.color.color_CCCCCC'):$r('app.color.white'))
  92 + .lineHeight('31lpx')
  93 + .textAlign(TextAlign.Center)
  94 + .width('100lpx')
  95 + .height('46lpx')
  96 + .borderRadius('6lpx')
  97 + .onClick(()=>{
  98 + this.item.isAppointment = !this.item.isAppointment
  99 + //TODO 预约动作
  100 + })
  101 + }else {
  102 + Text(this.item.relType === 2?"去观看":"看回放")
  103 + .fontWeight(400)
  104 + .fontSize('23lpx')
  105 + .backgroundColor($r('app.color.color_ED2800'))
  106 + .fontColor($r('app.color.white'))
  107 + .lineHeight('31lpx')
  108 + .textAlign(TextAlign.Center)
  109 + .width('100lpx')
  110 + .height('46lpx')
  111 + .borderRadius('6lpx')
  112 + }
  113 + }
  114 + }
  115 + .padding({left:'23lpx',right:'23lpx',top:'15lpx',bottom:'23lpx'})
  116 + }.margin({ left: 10, right: 10 })
  117 + .backgroundColor($r('app.color.white'))
  118 + .borderRadius('8lpx')
  119 + }
  120 +}
  1 +import { AppointmentListChildComponent } from './AppointmentListChildComponent';
  2 +import { CustomTitleUI } from '../../reusable/CustomTitleUI'
  3 +import { ListHasNoMoreDataUI } from '../../reusable/ListHasNoMoreDataUI';
  4 +import { MineAppointmentItem } from '../../../viewmodel/MineAppointmentItem';
  5 +import { LazyDataSource, StringUtils } from 'wdKit';
  6 +import MinePageDatasModel from '../../../model/MinePageDatasModel';
  7 +const TAG = "AppointmentListUI"
  8 +
  9 +@Component
  10 +export struct AppointmentListUI{
  11 + @State data: LazyDataSource<MineAppointmentItem> = new LazyDataSource();
  12 + @State count:number = 0;
  13 + @State isLoading:boolean = false
  14 + @State hasMore:boolean = true
  15 + curPageNum:number = 1;
  16 +
  17 + aboutToAppear() {
  18 + this.getNewPageData()
  19 + }
  20 +
  21 + build() {
  22 + Column() {
  23 + //标题栏目
  24 + CustomTitleUI({titleName:"预约列表"})
  25 + if(this.count == 0){
  26 + ListHasNoMoreDataUI({style:2})
  27 + }else{
  28 + //刷新控件 TODO
  29 + //List
  30 + List({ space: '6lpx' }) {
  31 + LazyForEach(this.data, (item: MineAppointmentItem, index: number) => {
  32 + ListItem() {
  33 + AppointmentListChildComponent({item:item})
  34 + }
  35 + .onClick(()=>{
  36 + //TODO 跳转
  37 + })
  38 + }, (item: MineAppointmentItem, index: number) => index.toString())
  39 +
  40 + //没有更多数据 显示提示
  41 + if(!this.hasMore){
  42 + ListItem(){
  43 + ListHasNoMoreDataUI()
  44 + }
  45 + }
  46 + }.cachedCount(4)
  47 + .scrollBar(BarState.Off)
  48 + .margin({top:'23lpx',left:'23lpx',right:'23lpx'})
  49 + .layoutWeight(1)
  50 + .onReachEnd(()=>{
  51 + console.log(TAG,"触底了");
  52 + if(!this.isLoading){
  53 + //加载分页数据
  54 + this.getNewPageData()
  55 + }
  56 + })
  57 + }
  58 + }
  59 + .backgroundColor($r('app.color.color_F9F9F9'))
  60 + .height('100%')
  61 + .width('100%')
  62 + }
  63 +
  64 + getNewPageData(){
  65 + this.isLoading = true
  66 + if(this.hasMore){
  67 + MinePageDatasModel.getAppointmentListData("20",`${this.curPageNum}`,getContext(this)).then((value)=>{
  68 + if (!this.data || value.list.length == 0){
  69 + this.hasMore = false
  70 + }else{
  71 + value.list.forEach((value)=>{
  72 + let dealTime = this.DealStartTime(value.planStartTime)
  73 + if(dealTime!=null && dealTime.length === 2){
  74 + this.data.push(new MineAppointmentItem(value.imageUrl,value.status,value.title,true,dealTime[0],dealTime[1],value.relType))
  75 + }else {
  76 + this.data.push(new MineAppointmentItem(value.imageUrl,value.status,value.title,true,"","",value.relType))
  77 + }
  78 + })
  79 + this.data.notifyDataReload()
  80 + this.count = this.data.totalCount()
  81 + if (this.data.totalCount() < value.totalCount) {
  82 + this.curPageNum++
  83 + }else {
  84 + this.hasMore = false
  85 + }
  86 + }
  87 + })
  88 + }
  89 + this.isLoading = false
  90 + }
  91 +
  92 + DealStartTime(planStartTime:string):string[]{
  93 + let dealData:string[] = []
  94 +
  95 + if(!StringUtils.isNotEmpty(planStartTime)){
  96 + console.log(TAG,"格式有误")
  97 + return dealData
  98 + }
  99 +
  100 + if(planStartTime.indexOf(" ") === -1){
  101 + console.log(TAG,"格式有误")
  102 + return dealData
  103 + }
  104 + let arr = planStartTime.split(" ")
  105 + if(arr!=null && StringUtils.isNotEmpty(arr[0])){ //处理年月日
  106 + let time = arr[0].split("-");
  107 + if(time.length === 3){
  108 + let month = time[1].indexOf("0") === 0 ? time[1].substring(1):time[1]
  109 + let day = time[2]
  110 +
  111 + dealData[0] = `${month}月${day}日`
  112 + let today = `${new Date().getMonth()+1}月${new Date().getDate()}日`
  113 + if(dealData[0] === today){
  114 + dealData[0] = "今日"
  115 + }
  116 + }
  117 + }
  118 +
  119 + if(arr!=null && StringUtils.isNotEmpty(arr[1])){ //处理时分
  120 + let time = arr[1].split(":");
  121 + if(time.length === 3){
  122 + dealData[1] = `${time[0]}:${time[1]}`
  123 + }
  124 + }
  125 + console.log(TAG,JSON.stringify(dealData))
  126 + return dealData
  127 + }
  128 +}
  1 +import { ResourcesUtils } from 'wdKit'
  2 +import { ResponseDTO } from 'wdNetwork'
  3 +import MinePageDatasModel from '../../../model/MinePageDatasModel'
  4 +import { FollowListItem } from '../../../viewmodel/FollowListItem'
  5 +import { CustomTitleUI } from '../../reusable/CustomTitleUI'
  6 +import { FollowSecondTabsComponent } from './FollowSecondTabsComponent'
  7 +
  8 +@Component
  9 +export struct FollowFirstTabsComponent{
  10 + @State currentIndex: number = 0
  11 + private controller: TabsController = new TabsController()
  12 + @State data:FollowListItem[] = []
  13 + fontColor: string = '#999999'
  14 + selectedFontColor: string = '#000000'
  15 +
  16 + aboutToAppear(){
  17 + this.data.push(new FollowListItem("我的"))
  18 + // 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[]>
  19 + // res.data.forEach(element => {
  20 + // this.data.push(element)
  21 + // });
  22 +
  23 + MinePageDatasModel.getFollowListData(getContext(this)).then((value)=>{
  24 + value.forEach((element)=>{
  25 + this.data.push(element)
  26 + })
  27 + console.log("ycg",this.data.length.toString());
  28 + })
  29 + }
  30 +
  31 + @Builder TabBuilder(index: number, item: FollowListItem) {
  32 + Stack(){
  33 + Text(item.directoryName)
  34 + .height('38lpx')
  35 + .fontSize('33lpx')
  36 + .fontWeight(this.currentIndex === index ? 600 : 400)
  37 + .fontColor(this.currentIndex === index ? this.selectedFontColor : this.fontColor)
  38 + .lineHeight('38lpx')
  39 +
  40 + if(this.currentIndex === index){
  41 + Divider()
  42 + .width('31lpx')
  43 + .height('4lpx')
  44 + .color('#ED2800')
  45 + .strokeWidth('4lpx')
  46 + .margin({top:'50lpx'})
  47 + .id("divTag")
  48 + }
  49 + }.onClick(()=>{
  50 + this.currentIndex = index
  51 + this.controller.changeIndex(this.currentIndex)
  52 + })
  53 + .height('100%')
  54 + .margin({right:'9lpx'})
  55 + .padding({left:'31lpx',right:index === this.data.length-1?"31lpx":"0lpx"})
  56 + }
  57 +
  58 + build() {
  59 + Column() {
  60 + //标题栏目
  61 + CustomTitleUI({titleName:"关注列表"})
  62 +
  63 + Tabs({ barPosition: BarPosition.Start, controller: this.controller }) {
  64 + ForEach(this.data, (item: FollowListItem, index: number ) => {
  65 + TabContent(){
  66 + FollowSecondTabsComponent({data:$data,firstIndex:index})
  67 + }.tabBar(this.TabBuilder(index,item))
  68 + }, (item: FollowListItem, index: number) => index.toString())
  69 + }
  70 + .vertical(false)
  71 + .barMode(BarMode.Scrollable)
  72 + .barWidth('100%')
  73 + .barHeight('84lpx')
  74 + .animationDuration(0)
  75 + .onChange((index: number) => {
  76 + this.currentIndex = index
  77 + })
  78 + .width('100%')
  79 + .height('100%')
  80 + }.width('100%')
  81 + }
  82 +}
  1 +import { LazyDataSource } from 'wdKit';
  2 +import MinePageDatasModel from '../../../model/MinePageDatasModel';
  3 +import { FollowListDetailItem } from '../../../viewmodel/FollowListDetailItem'
  4 +import { FollowListDetailRequestItem } from '../../../viewmodel/FollowListDetailRequestItem';
  5 +import { ListHasNoMoreDataUI } from '../../reusable/ListHasNoMoreDataUI';
  6 +
  7 +const TAG = "FollowListDetailUI"
  8 +@Component
  9 +export struct FollowListDetailUI{
  10 + @State creatorDirectoryId:number = -1;
  11 + @State data: LazyDataSource<FollowListDetailItem> = new LazyDataSource();
  12 + @State count:number = 0;
  13 + @State isLoading:boolean = false
  14 + @State hasMore:boolean = true
  15 + curPageNum:number = 1;
  16 +
  17 + aboutToAppear(){
  18 + console.log("YCG","aboutToAppear==="+this.creatorDirectoryId);
  19 + this.getNewPageData()
  20 + }
  21 +
  22 + build(){
  23 + Column(){
  24 + if(this.count === 0){
  25 + ListHasNoMoreDataUI({style:2})
  26 + }else{
  27 + List({ space: 3 }) {
  28 + LazyForEach(this.data, (item: FollowListDetailItem, index: number = 0) => {
  29 + ListItem() {
  30 + ChildComponent({data: item})
  31 + }
  32 + .onClick(() => {
  33 + })
  34 + }, (item: FollowListDetailItem, index: number) => index.toString())
  35 +
  36 + //没有更多数据 显示提示
  37 + if(!this.hasMore){
  38 + ListItem(){
  39 + ListHasNoMoreDataUI()
  40 + }
  41 + }
  42 + }.cachedCount(7)
  43 + .padding({left:'31lpx',right:'31lpx'})
  44 + .layoutWeight(1)
  45 + .scrollBar(BarState.Off)
  46 + .onReachEnd(()=>{
  47 + console.log(TAG,"触底了");
  48 + if(!this.isLoading){
  49 + this.isLoading = true
  50 + //加载分页数据
  51 + this.getNewPageData()
  52 + }
  53 + })
  54 + }
  55 + }.height('100%')
  56 + .width('100%')
  57 + }
  58 +
  59 + getNewPageData(){
  60 + this.isLoading = true
  61 + if(this.hasMore){
  62 + let object = new FollowListDetailRequestItem(this.creatorDirectoryId,20,this.curPageNum)
  63 +
  64 + MinePageDatasModel.getFollowListDetailData(object,getContext(this)).then((value)=>{
  65 + if (!this.data || value.list.length == 0){
  66 + this.hasMore = false
  67 + }else{
  68 + value.list.forEach((value)=>{
  69 + this.data.push(new FollowListDetailItem(value.headPhotoUrl,value.cnUserName,value.cnFansNum,value.introduction))
  70 + })
  71 + this.data.notifyDataReload()
  72 + this.count = this.data.totalCount()
  73 + if (this.data.totalCount() < value.totalCount) {
  74 + this.curPageNum++
  75 + }else {
  76 + this.hasMore = false
  77 + }
  78 + }
  79 + })
  80 + }
  81 + this.isLoading = false
  82 + }
  83 +}
  84 +
  85 +@Component
  86 +struct ChildComponent {
  87 + @ObjectLink data: FollowListDetailItem
  88 +
  89 + build() {
  90 + Column(){
  91 + Blank().height('27lpx')
  92 +
  93 + Row() {
  94 + Image(this.data.headPhotoUrl)
  95 + .objectFit(ImageFit.Auto)
  96 + .width('92lpx')
  97 + .height('92lpx')
  98 + .margin({right:'15lpx'})
  99 +
  100 + Column(){
  101 + Text(this.data.cnUserName)
  102 + .fontWeight('400lpx')
  103 + .fontSize('31lpx')
  104 + .lineHeight('38lpx')
  105 + .fontColor($r('app.color.color_222222'))
  106 + Text(`粉丝${this.data.cnFansNum}`)
  107 + .fontColor($r('app.color.color_B0B0B0'))
  108 + .fontSize('23lpx')
  109 + .maxLines(1)
  110 + Text(`${this.data.introduction}`)
  111 + .fontColor($r('app.color.color_B0B0B0'))
  112 + .fontSize('23lpx')
  113 + .maxLines(2)
  114 + .textOverflow({ overflow: TextOverflow.Ellipsis })
  115 + }.layoutWeight(1)
  116 + .alignItems(HorizontalAlign.Start)
  117 +
  118 + if(this.data.isFollow){
  119 + Row(){
  120 + Text(`已关注`)
  121 + .fontColor($r('app.color.color_CCCCCC'))
  122 + .fontSize('23lpx')
  123 + .fontWeight('500lpx')
  124 + .lineHeight('35lpx')
  125 + }.backgroundColor($r('app.color.color_F5F5F5'))
  126 + .borderRadius('6lpx')
  127 + .borderWidth('2lpx')
  128 + .justifyContent(FlexAlign.Center)
  129 + .width('100lpx')
  130 + .height('46lpx')
  131 + .margin({left:'4lpx',top:'23lpx'})
  132 + .onClick(()=>{
  133 + this.data.isFollow = false
  134 + })
  135 + }else{
  136 + Row(){
  137 + Image($r('app.media.follow_icon'))
  138 + .margin({right:'4lpx'})
  139 + .width('23lpx')
  140 + .height('23lpx')
  141 + Text(`关注`)
  142 + .fontColor($r('app.color.color_ED2800'))
  143 + .fontSize('23lpx')
  144 + .fontWeight('500lpx')
  145 + .lineHeight('35lpx')
  146 + }.borderColor($r('app.color.color_ED2800'))
  147 + .borderRadius('6lpx')
  148 + .borderWidth('2lpx')
  149 + .justifyContent(FlexAlign.Center)
  150 + .width('100lpx')
  151 + .height('46lpx')
  152 + .margin({left:'4lpx',top:'23lpx'})
  153 + .onClick(()=>{
  154 + this.data.isFollow = true
  155 + })
  156 + }
  157 + }.alignItems(VerticalAlign.Top)
  158 + .width('100%')
  159 + .layoutWeight(1)
  160 +
  161 + Divider().width('100%')
  162 + .height('2lpx')
  163 + .strokeWidth('1lpx')
  164 + .backgroundColor($r('app.color.color_EDEDED'))
  165 +
  166 + }.height('146lpx')
  167 + .justifyContent(FlexAlign.Center)
  168 + }
  169 +}
  1 +import { FollowListItem, FollowSecondListItem } from '../../../viewmodel/FollowListItem'
  2 +import { FollowListDetailUI } from './FollowListDetailUI'
  3 +import { FollowThirdTabsComponent } from './FollowThirdTabsComponent'
  4 +
  5 +@Component
  6 +export struct FollowSecondTabsComponent{
  7 + @Link data:FollowListItem[]
  8 + @State firstIndex:number = 0
  9 + @State currentIndex: number = 0
  10 + private controller: TabsController = new TabsController()
  11 + fontColor: string = '#000000'
  12 + selectedFontColor: string = '#ED2800'
  13 +
  14 + aboutToAppear(){
  15 + }
  16 +
  17 + build(){
  18 + Column(){
  19 + Divider().width('100%')
  20 + .height('2lpx')
  21 + .strokeWidth('1lpx')
  22 + .backgroundColor($r('app.color.color_EDEDED'))
  23 +
  24 + if(this.data != null){
  25 + if(this.data[this.firstIndex].children == null || this.data[this.firstIndex].children.length == 0){
  26 + FollowListDetailUI({creatorDirectoryId:this.data[this.firstIndex].id})
  27 + }else{
  28 + this.FollowSecondUI()
  29 + }
  30 + }
  31 + }
  32 + .width('100%')
  33 + .height('100%')
  34 + }
  35 +
  36 + @Builder FollowSecondUI(){
  37 + Row() {
  38 + Tabs({ barPosition: BarPosition.Start, controller: this.controller }) {
  39 + ForEach(this.data[this.firstIndex].children, (item: FollowSecondListItem, index: number ) => {
  40 + TabContent(){
  41 + FollowThirdTabsComponent({data:$data,firstIndex:$firstIndex,secondIndex:index})
  42 + }.tabBar(this.TabBuilder(index,item))
  43 + .backgroundColor($r('app.color.white'))
  44 + }, (item: FollowListItem, index: number) => index.toString())
  45 + }
  46 + .vertical(true)
  47 + .barMode(BarMode.Scrollable)
  48 + .barWidth('140lpx')
  49 + .animationDuration(0)
  50 + .onChange((index: number) => {
  51 + this.currentIndex = index
  52 + })
  53 + .width('100%')
  54 + }.width('100%')
  55 + .alignItems(VerticalAlign.Top)
  56 + }
  57 +
  58 + @Builder TabBuilder(index: number, item: FollowSecondListItem) {
  59 + Column(){
  60 + Text(item.directoryName)
  61 + .width('100%')
  62 + .height('38lpx')
  63 + .fontSize('30lpx')
  64 + .textAlign(TextAlign.Center)
  65 + .fontWeight(this.currentIndex === index ? 600 : 400)
  66 + .fontColor(this.currentIndex === index ? this.selectedFontColor : this.fontColor)
  67 + .lineHeight('38lpx')
  68 + }
  69 + .onClick(()=>{
  70 + this.currentIndex = index
  71 + this.controller.changeIndex(this.currentIndex)
  72 + })
  73 + .justifyContent(FlexAlign.Center)
  74 + .height('84lpx')
  75 + .backgroundColor(this.currentIndex === index?$r('app.color.white'):$r('app.color.color_F9F9F9'))
  76 + }
  77 +
  78 +}
  1 +import { FollowListItem, FollowThirdListItem } from '../../../viewmodel/FollowListItem'
  2 +import { FollowListDetailUI } from './FollowListDetailUI'
  3 +
  4 +@Component
  5 +export struct FollowThirdTabsComponent{
  6 + @Link data:FollowListItem[]
  7 + @State currentIndex: number = 0
  8 +
  9 + @Link firstIndex: number
  10 + @State secondIndex:number = -1
  11 +
  12 +
  13 + private controller: TabsController = new TabsController()
  14 + fontColor: string = '#999999'
  15 + selectedFontColor: string = '#000000'
  16 +
  17 + build(){
  18 + if(this.data != null){
  19 + if(this.data[this.firstIndex].children[this.secondIndex].children == null || this.data[this.firstIndex].children[this.secondIndex].children.length == 0){
  20 + FollowListDetailUI({creatorDirectoryId:this.data[this.firstIndex].children[this.secondIndex].id})
  21 + }else{
  22 + this.FollowThirdUI()
  23 + }
  24 + }
  25 + }
  26 +
  27 + @Builder TabBuilder(index: number, item: FollowThirdListItem) {
  28 + Column(){
  29 + Text(item.directoryName)
  30 + .fontSize('30lpx')
  31 + .textAlign(TextAlign.Center)
  32 + .fontWeight(this.currentIndex === index ? 600 : 400)
  33 + .fontColor(this.currentIndex === index ? this.selectedFontColor : this.fontColor)
  34 + .lineHeight('38lpx')
  35 + .backgroundColor($r('app.color.color_F9F9F9'))
  36 + .padding('13lpx')
  37 + }
  38 + .onClick(()=>{
  39 + this.currentIndex = index
  40 + this.controller.changeIndex(this.currentIndex)
  41 + })
  42 + .height('100%')
  43 + .margin({right:'9lpx'})
  44 + .padding({left:'20lpx',right:index === this.data[this.firstIndex].children[this.secondIndex].children.length-1?"20lpx":"0lpx"})
  45 + .justifyContent(FlexAlign.Center)
  46 + }
  47 +
  48 + @Builder FollowThirdUI(){
  49 + Row() {
  50 + Tabs({ barPosition: BarPosition.Start, controller: this.controller }) {
  51 + ForEach(this.data[this.firstIndex].children[this.secondIndex].children, (item: FollowThirdListItem, index: number ) => {
  52 + TabContent(){
  53 + Column(){
  54 + Divider().width('100%')
  55 + .height('2lpx')
  56 + .strokeWidth('1lpx')
  57 + .backgroundColor($r('app.color.color_EDEDED'))
  58 + .margin({left:'20lpx'})
  59 + FollowListDetailUI({creatorDirectoryId:this.data[this.firstIndex].children[this.secondIndex].children[index].id})
  60 + }
  61 + }.tabBar(this.TabBuilder(index,item))
  62 + .backgroundColor($r('app.color.white'))
  63 + }, (item: FollowListItem, index: number) => index.toString())
  64 + }
  65 + .vertical(false)
  66 + .barMode(BarMode.Scrollable)
  67 + .barWidth('100%')
  68 + .barHeight('84lpx')
  69 + .animationDuration(0)
  70 + .onChange((index: number) => {
  71 + this.currentIndex = index
  72 + })
  73 + .width('100%')
  74 + }.width('100%')
  75 + }
  76 +
  77 +}
  1 +import { AppointmentListUI } from '../mine/appointment/AppointmentListUI'
  2 +
  3 +const TAG = "AppointmentListPage"
  4 +
  5 +@Entry
  6 +@Component
  7 +struct AppointmentListPage {
  8 +
  9 + build() {
  10 + Column(){
  11 + AppointmentListUI()
  12 + }
  13 + }
  14 +}
@@ -16,7 +16,7 @@ export struct BottomNavigationComponent { @@ -16,7 +16,7 @@ export struct BottomNavigationComponent {
16 // 底导/顶导全部数据 16 // 底导/顶导全部数据
17 @State @Watch('onBottomNavigationDataUpdated') bottomNavList: BottomNavDTO[] = [] 17 @State @Watch('onBottomNavigationDataUpdated') bottomNavList: BottomNavDTO[] = []
18 // 底导当前选中/焦点下标 18 // 底导当前选中/焦点下标
19 - @Provide currentNavIndex: number = BottomNavi.NEWS; 19 + @State currentNavIndex: number = BottomNavi.NEWS;
20 // 底导TabsController 20 // 底导TabsController
21 private navController: TabsController = new TabsController(); 21 private navController: TabsController = new TabsController();
22 readonly ASPECT_RATIO_1_1: number = 1 / 1; // 底导图片宽高比 22 readonly ASPECT_RATIO_1_1: number = 1 / 1; // 底导图片宽高比
@@ -51,7 +51,7 @@ export struct BottomNavigationComponent { @@ -51,7 +51,7 @@ export struct BottomNavigationComponent {
51 // 我的页面组件数据列表 51 // 我的页面组件数据列表
52 MinePageComponent() 52 MinePageComponent()
53 } else { 53 } else {
54 - TopNavigationComponent({ topNavList: navItem.topNavChannelList }) 54 + TopNavigationComponent({ topNavList: navItem.topNavChannelList, _currentNavIndex: this.currentNavIndex })
55 } 55 }
56 } 56 }
57 } 57 }
@@ -85,6 +85,7 @@ export struct BottomNavigationComponent { @@ -85,6 +85,7 @@ export struct BottomNavigationComponent {
85 } 85 }
86 .height($r('app.float.bottom_navigation_barHeight')) 86 .height($r('app.float.bottom_navigation_barHeight'))
87 .hoverEffect(HoverEffect.Highlight) 87 .hoverEffect(HoverEffect.Highlight)
  88 +
88 // .justifyContent(FlexAlign.Center) 89 // .justifyContent(FlexAlign.Center)
89 // .onClick(() => { 90 // .onClick(() => {
90 // Logger.info(TAG, `onClick, index: ${index}`); 91 // Logger.info(TAG, `onClick, index: ${index}`);
  1 +import { FollowFirstTabsComponent } from '../mine/follow/FollowFirstTabsComponent'
  2 +
  3 +@Entry
  4 +@Component
  5 +struct FollowListPage {
  6 +
  7 + build() {
  8 + Column() {
  9 + //Tab 详情
  10 + FollowFirstTabsComponent()
  11 + }
  12 + .backgroundColor($r('app.color.color_F9F9F9'))
  13 + .height('100%')
  14 + .width('100%')
  15 + }
  16 +}
1 -import { WDRouterPage, WDRouterRule } from 'wdRouter'; 1 +import MinePagePersonalFunctionsItem from '../../viewmodel/MinePagePersonalFunctionsItem'
  2 +import MinePageCreatorFunctionsItem from '../../viewmodel/MinePageCreatorFunctionsItem'
  3 +import MinePageMoreFunctionModel from '../../viewmodel/MinePageMoreFunctionModel'
  4 +import MinePageDatasModel from '../../model/MinePageDatasModel'
  5 +import MinePageUserSimpleInfoUI from '../mine/MinePageUserSimpleInfoUI'
  6 +import MinePagePersonFunctionUI from '../mine/MinePagePersonFunctionUI'
  7 +import MinePageCardUI from '../mine/MinePageCardUI'
  8 +import MinePageCreatorFunctionUI from '../mine/MinePageCreatorFunctionUI'
  9 +import MinePageMoreFunctionUI from '../mine/MinePageMoreFunctionUI'
  10 +import { SPHelper, StringUtils } from 'wdKit'
  11 +import { SpConstants } from 'wdConstant'
2 12
3 -const TAG = 'PageComponent'; 13 +const TAG = 'MinePageComponent';
4 14
5 /** 15 /**
6 * 我的页面 16 * 我的页面
7 */ 17 */
8 @Component 18 @Component
9 export struct MinePageComponent { 19 export struct MinePageComponent {
10 - // TODO 待完善 20 + //是否是创作者
  21 + @State isCreator:boolean = false
  22 + @State isLogin:boolean = false
  23 + @State userName:string = "登陆注册"
  24 + @State personalData:MinePagePersonalFunctionsItem[] = []
  25 + @State creatorData:MinePageCreatorFunctionsItem[] = []
  26 + @State moreData:MinePageMoreFunctionModel[] = []
  27 + scroller: Scroller = new Scroller()
  28 +
  29 + aboutToAppear(){
  30 + this.getUserLogin()
  31 + this.getFunctionData()
  32 + }
  33 +
  34 + getFunctionData(){
  35 + //个人功能数据
  36 + this.personalData = MinePageDatasModel.getPersonalFunctionsData()
  37 + //创作者功能数据
  38 + this.creatorData = MinePageDatasModel.getCreatorFunctionsData()
  39 + //更多功能数据
  40 + this.moreData = MinePageDatasModel.getMoreFunctionsData()
  41 + }
  42 +
11 build() { 43 build() {
12 - Text('我的页面').onClick(()=>{  
13 - WDRouterRule.jumpWithPage(WDRouterPage.loginPage)  
14 - }) 44 + Scroll(this.scroller){
  45 + Stack(){
  46 + Image($r('app.media.mine_head_bg'))
  47 + .width('100%')
  48 + .height('657lpx')
  49 + .objectFit(ImageFit.Auto)
  50 + this.MinePageUI()
  51 + }
  52 + .alignContent(Alignment.Top)
  53 + }
  54 + .setFullWidthAndHeight()
  55 + .backgroundColor($r('app.color.color_F9F9F9'))
  56 + .scrollable(ScrollDirection.Vertical)
  57 + .scrollBar(BarState.Off)
  58 + }
  59 +
  60 +
  61 + @Builder MinePageUI(){
  62 + Column(){
  63 + //头像层
  64 + MinePageUserSimpleInfoUI({isLogin:this.isLogin,userName:this.userName})
  65 + //Grid 区域
  66 + MinePagePersonFunctionUI({personalData:$personalData})
  67 + //Card
  68 + MinePageCardUI()
  69 + //创作者区域
  70 +
  71 + MinePageCreatorFunctionUI({creatorData:$creatorData})
  72 + //更多功能
  73 + MinePageMoreFunctionUI({moreData:$moreData})
  74 + }.width('100%')
  75 + }
  76 +
  77 + @Styles setFullWidthAndHeight(){
  78 + .width('100%')
  79 + .height('100%')
15 } 80 }
  81 +
  82 + async getUserLogin() {
  83 + let userid = await SPHelper.default.get(SpConstants.USER_ID,"")
  84 + if(StringUtils.isNotEmpty(userid)){
  85 + this.isLogin = true
  86 + let userName = await SPHelper.default.get(SpConstants.USER_NAME,"") as string
  87 + this.userName = userName
  88 + }else{
  89 + this.isLogin = false
  90 + }
  91 + }
  92 +
16 } 93 }
17 94
@@ -10,6 +10,7 @@ const TAG = 'TopNavigationComponent'; @@ -10,6 +10,7 @@ const TAG = 'TopNavigationComponent';
10 */ 10 */
11 @Component 11 @Component
12 export struct TopNavigationComponent { 12 export struct TopNavigationComponent {
  13 + @Prop _currentNavIndex?: number;
13 // 顶导当前选中/焦点下标 14 // 顶导当前选中/焦点下标
14 @State currentTopNavSelectedIndex: number = 0; 15 @State currentTopNavSelectedIndex: number = 0;
15 // 顶导数据 16 // 顶导数据
@@ -19,15 +20,15 @@ export struct TopNavigationComponent { @@ -19,15 +20,15 @@ export struct TopNavigationComponent {
19 20
20 build() { 21 build() {
21 Column() { 22 Column() {
22 - RelativeContainer(){  
23 - Stack({ alignContent: Alignment.Center }){ 23 + RelativeContainer() {
  24 + Stack({ alignContent: Alignment.Center }) {
24 25
25 Image($r('app.media.background_search')) 26 Image($r('app.media.background_search'))
26 .width('100%') 27 .width('100%')
27 .height('100%') 28 .height('100%')
28 .objectFit(ImageFit.Contain) 29 .objectFit(ImageFit.Contain)
29 30
30 - Row(){ 31 + Row() {
31 Image($r('app.media.icon_search')) 32 Image($r('app.media.icon_search'))
32 .width(18) 33 .width(18)
33 .height(18) 34 .height(18)
@@ -62,12 +63,12 @@ export struct TopNavigationComponent { @@ -62,12 +63,12 @@ export struct TopNavigationComponent {
62 .alignRules({ middle: { anchor: "__container__", align: HorizontalAlign.Center }, 63 .alignRules({ middle: { anchor: "__container__", align: HorizontalAlign.Center },
63 center: { anchor: "__container__", align: VerticalAlign.Center } }) 64 center: { anchor: "__container__", align: VerticalAlign.Center } })
64 65
65 - Stack({ alignContent: Alignment.Center }){ 66 + Stack({ alignContent: Alignment.Center }) {
66 Image($r('app.media.background_read_paper_home')) 67 Image($r('app.media.background_read_paper_home'))
67 .width('100%') 68 .width('100%')
68 .height('100%') 69 .height('100%')
69 .objectFit(ImageFit.Contain) 70 .objectFit(ImageFit.Contain)
70 - Row(){ 71 + Row() {
71 Image($r('app.media.icon_read_paper_home')) 72 Image($r('app.media.icon_read_paper_home'))
72 .width(18) 73 .width(18)
73 .height(18) 74 .height(18)
@@ -84,7 +85,7 @@ export struct TopNavigationComponent { @@ -84,7 +85,7 @@ export struct TopNavigationComponent {
84 .id('read') 85 .id('read')
85 .alignRules({ right: { anchor: "__container__", align: HorizontalAlign.End }, 86 .alignRules({ right: { anchor: "__container__", align: HorizontalAlign.End },
86 center: { anchor: "__container__", align: VerticalAlign.Center } }) 87 center: { anchor: "__container__", align: VerticalAlign.Center } })
87 - .onClick((event: ClickEvent)=>{ 88 + .onClick((event: ClickEvent) => {
88 89
89 let taskAction: Action = { 90 let taskAction: Action = {
90 type: 'JUMP_INNER_NEW_PAGE', 91 type: 'JUMP_INNER_NEW_PAGE',
@@ -97,6 +98,7 @@ export struct TopNavigationComponent { @@ -97,6 +98,7 @@ export struct TopNavigationComponent {
97 } 98 }
98 .width('100%') 99 .width('100%')
99 .height(40) 100 .height(40)
  101 + .visibility(this._currentNavIndex != 2 ? Visibility.Visible : Visibility.None)
100 102
101 Tabs() { 103 Tabs() {
102 ForEach(this.topNavList, (navItem: TopNavDTO, index: number) => { 104 ForEach(this.topNavList, (navItem: TopNavDTO, index: number) => {
@@ -132,7 +134,7 @@ export struct TopNavigationComponent { @@ -132,7 +134,7 @@ export struct TopNavigationComponent {
132 .maxLines(this.MAX_LINE) 134 .maxLines(this.MAX_LINE)
133 Divider() 135 Divider()
134 .width(16) 136 .width(16)
135 - .strokeWidth(2) // 分割线粗细度。 137 + .strokeWidth(2)// 分割线粗细度。
136 .padding({ top: 2 }) 138 .padding({ top: 2 })
137 .color(Color.Red) 139 .color(Color.Red)
138 .opacity(this.currentTopNavSelectedIndex === index ? 1 : 0) 140 .opacity(this.currentTopNavSelectedIndex === index ? 1 : 0)
  1 +import router from '@ohos.router'
  2 +
  3 +@Component
  4 +export struct CustomTitleUI {
  5 + imgBack:boolean = true
  6 + titleName:string = "默认标题"
  7 +
  8 + build() {
  9 + RelativeContainer() {
  10 + //标题栏目
  11 + if(this.imgBack){
  12 + Image($r('app.media.back_icon'))
  13 + .width('46lpx')
  14 + .height('46lpx')
  15 + .objectFit(ImageFit.Auto)
  16 + .id("back_icon")
  17 + .alignRules({
  18 + center: {anchor: "__container__", align: VerticalAlign.Center},
  19 + left: {anchor: "__container__", align: HorizontalAlign.Start}
  20 + })
  21 + .margin({left:'31lpx'})
  22 + .onClick(()=>{
  23 + router.back()
  24 + })
  25 + }
  26 +
  27 + Text(this.titleName)
  28 + .height('42lpx')
  29 + .maxLines(1)
  30 + .id("title")
  31 + .fontSize('35lpx')
  32 + .fontWeight(400)
  33 + .fontColor($r('app.color.color_222222'))
  34 + .lineHeight('42lpx')
  35 + .alignRules({
  36 + center: {anchor: "__container__", align: VerticalAlign.Center},
  37 + middle: {anchor: "__container__", align: HorizontalAlign.Center}
  38 + })
  39 + }
  40 + .height('84lpx')
  41 + .width('100%')
  42 + .backgroundColor($r('app.color.white'))
  43 +
  44 + }
  45 +}
  1 +@Component
  2 +export struct ListHasNoMoreDataUI{
  3 + @State style:number = 1;
  4 +
  5 + build(){
  6 + if (this.style === 1){
  7 + Row(){
  8 + Text("已显示全部内容")
  9 + .fontColor($r('app.color.color_999999'))
  10 + .fontWeight('500lpx')
  11 + .fontSize('23lpx')
  12 + }.justifyContent(FlexAlign.Center)
  13 + .width('100%')
  14 + .margin({top:'20lpx',bottom:'20lpx'})
  15 + }else if (this.style === 2){
  16 + Column(){
  17 + Image($r('app.media.empty_icon'))
  18 + .width('200lpx')
  19 + .height('200lpx')
  20 + .objectFit(ImageFit.Auto)
  21 + Text("暂无内容")
  22 + .fontColor($r('app.color.color_999999'))
  23 + .fontWeight('500lpx')
  24 + .fontSize('23lpx')
  25 + }
  26 + .justifyContent(FlexAlign.Center)
  27 + .width('100%')
  28 + .height('100%')
  29 + }
  30 +
  31 +
  32 + }
  33 +}
  1 +
  2 +import MinePagePersonalFunctionsItem from '../viewmodel/MinePagePersonalFunctionsItem'
  3 +import MinePageCreatorFunctionsItem from '../viewmodel/MinePageCreatorFunctionsItem'
  4 +import MinePageMoreFunctionModel from '../viewmodel/MinePageMoreFunctionModel';
  5 +import HashMap from '@ohos.util.HashMap';
  6 +import { HttpUrlUtils, ResponseDTO, WDHttp } from 'wdNetwork';
  7 +import { MineAppointmentListItem } from '../viewmodel/MineAppointmentListItem';
  8 +import { Logger, ResourcesUtils } from 'wdKit';
  9 +import { MineFollowListDetailItem } from '../viewmodel/MineFollowListDetailItem';
  10 +import { FollowListDetailRequestItem } from '../viewmodel/FollowListDetailRequestItem';
  11 +import { FollowListItem } from '../viewmodel/FollowListItem';
  12 +
  13 +const TAG = "MinePageDatasModel"
  14 +
  15 +/**
  16 + * 我的页面 所有数据 获取封装类
  17 + */
  18 +class MinePageDatasModel{
  19 + private static instance: MinePageDatasModel;
  20 + personalData:MinePagePersonalFunctionsItem[] = []
  21 + creatorData:MinePageCreatorFunctionsItem[] = []
  22 + moreData:MinePageMoreFunctionModel[] = []
  23 +
  24 + private constructor() { }
  25 +
  26 + /**
  27 + * 单例模式
  28 + * @returns
  29 + */
  30 + public static getInstance(): MinePageDatasModel {
  31 + if (!MinePageDatasModel.instance) {
  32 + MinePageDatasModel.instance = new MinePageDatasModel();
  33 + }
  34 + return MinePageDatasModel.instance;
  35 + }
  36 +
  37 +
  38 +
  39 +
  40 + /**
  41 + * 评论 关注 收藏 等7个数据
  42 + * 包含名字和图标
  43 + */
  44 + getPersonalFunctionsData():MinePagePersonalFunctionsItem[]{
  45 + if(this.personalData.length === 7){
  46 + return this.personalData
  47 + }
  48 + this.personalData.push(new MinePagePersonalFunctionsItem("评论",$r('app.media.mine_comment_icon')))
  49 + this.personalData.push(new MinePagePersonalFunctionsItem("关注",$r('app.media.mine_order_icon')))
  50 + this.personalData.push(new MinePagePersonalFunctionsItem("收藏",$r('app.media.mine_collect_icon')))
  51 + this.personalData.push(new MinePagePersonalFunctionsItem("历史",$r('app.media.mine_history_icon')))
  52 + this.personalData.push(new MinePagePersonalFunctionsItem("消息",$r('app.media.mine_msg_icon')))
  53 + this.personalData.push(new MinePagePersonalFunctionsItem("留言板",$r('app.media.mine_msgboard_icon')))
  54 + this.personalData.push(new MinePagePersonalFunctionsItem("预约",$r('app.media.mine_order_icon')))
  55 + return this.personalData
  56 + }
  57 +
  58 +
  59 + /**
  60 + * 发布文章 发布视频 等4个数据
  61 + * 包含名字和图标
  62 + */
  63 + getCreatorFunctionsData():MinePageCreatorFunctionsItem[]{
  64 + if(this.creatorData.length === 4){
  65 + return this.creatorData
  66 + }
  67 + this.creatorData.push(new MinePageCreatorFunctionsItem("发布文章",$r('app.media.mine_active_create_article')))
  68 + this.creatorData.push(new MinePageCreatorFunctionsItem("发布视频",$r('app.media.mine_active_create_video')))
  69 + this.creatorData.push(new MinePageCreatorFunctionsItem("发布动态",$r('app.media.mine_active_create_video')))
  70 + this.creatorData.push(new MinePageCreatorFunctionsItem("发布图集",$r('app.media.mine_active_create_pics')))
  71 + return this.creatorData
  72 + }
  73 +
  74 + /**
  75 + * 扫一扫 我的奖品 等5个数据
  76 + * 包含名字和图标
  77 + */
  78 + getMoreFunctionsData():MinePageCreatorFunctionsItem[]{
  79 + if(this.moreData.length === 5){
  80 + return this.moreData
  81 + }
  82 + this.moreData.push(new MinePageMoreFunctionModel("扫一扫",$r('app.media.mine_scan')))
  83 + this.moreData.push(new MinePageMoreFunctionModel("我的奖品",$r('app.media.mine_mygift')))
  84 + this.moreData.push(new MinePageMoreFunctionModel("意见反馈",$r('app.media.mine_suggest')))
  85 + this.moreData.push(new MinePageMoreFunctionModel("设置",$r('app.media.mine_setting')))
  86 + this.moreData.push(new MinePageMoreFunctionModel("关于",$r('app.media.mine_about')))
  87 + return this.moreData
  88 + }
  89 +
  90 + /**
  91 + * 预约
  92 + * @param pageSize
  93 + * @param pageNum
  94 + * @returns
  95 + */
  96 + fetchAppointmentListData(pageSize:string,pageNum:string) {
  97 + let url = HttpUrlUtils.getAppointmentListDataUrl()+ `?pageSize=${pageSize}&pageNum=${pageNum}`
  98 + let headers: HashMap<string, string> = HttpUrlUtils.getYcgCommonHeaders();
  99 + return WDHttp.get<ResponseDTO<MineAppointmentListItem>>(url, headers)
  100 + };
  101 +
  102 + getAppointmentListData(pageSize:string,pageNum:string,context: Context): Promise<MineAppointmentListItem> {
  103 + return new Promise<MineAppointmentListItem>((success, error) => {
  104 + Logger.info(TAG, `getAppointmentList start`);
  105 + this.fetchAppointmentListData(pageSize,pageNum).then((navResDTO: ResponseDTO<MineAppointmentListItem>) => {
  106 + if (!navResDTO) {
  107 + error("page data invalid");
  108 + success(this.getAppointmentListDataLocal(context))
  109 + return
  110 + }
  111 + Logger.info(TAG, "getAppointmentList then,AppointmentResDTO.timeStamp:" + navResDTO.timestamp);
  112 + let navigationBean = navResDTO.data as MineAppointmentListItem
  113 + success(navigationBean);
  114 + }).catch((err: Error) => {
  115 + Logger.error(TAG, `fetchAppointmentListDataApi catch, error.name : ${err.name}, error.message:${err.message}`);
  116 + // error(err);
  117 + success(this.getAppointmentListDataLocal(context))
  118 + })
  119 + })
  120 + }
  121 +
  122 + async getAppointmentListDataLocal(context: Context): Promise<MineAppointmentListItem> {
  123 + Logger.info(TAG, `getBottomNavDataMock start`);
  124 + let compRes: ResponseDTO<MineAppointmentListItem> | null = await ResourcesUtils.getResourcesJson<ResponseDTO<MineAppointmentListItem>>(context,'appointment_list_data.json' );
  125 + if (!compRes || !compRes.data) {
  126 + Logger.info(TAG, `getAppointmentListDataLocal compRes is empty`);
  127 + return new MineAppointmentListItem()
  128 + }
  129 + Logger.info(TAG, `getAppointmentListDataLocal getResourcesJsonSync compRes : ${JSON.stringify(compRes)}`);
  130 + return compRes.data
  131 + }
  132 +
  133 + /**
  134 + * 关注频道详情
  135 + * @param pageSize
  136 + * @param pageNum
  137 + * @param context
  138 + * @returns
  139 + */
  140 + getFollowListDetailData(params:FollowListDetailRequestItem,context: Context): Promise<MineFollowListDetailItem> {
  141 + return new Promise<MineFollowListDetailItem>((success, error) => {
  142 + Logger.info(TAG, `getAppointmentList start`);
  143 + this.fetchFollowListDetailData(params).then((navResDTO: ResponseDTO<MineFollowListDetailItem>) => {
  144 + if (!navResDTO) {
  145 + error("page data invalid");
  146 + success(this.getFollowListDetailDataLocal(context))
  147 + return
  148 + }
  149 + Logger.info(TAG, "getAppointmentList then,AppointmentResDTO.timeStamp:" + navResDTO.timestamp);
  150 + let navigationBean = navResDTO.data as MineFollowListDetailItem
  151 + success(navigationBean);
  152 + }).catch((err: Error) => {
  153 + Logger.error(TAG, `fetchAppointmentListDataApi catch, error.name : ${err.name}, error.message:${err.message}`);
  154 + // error(err);
  155 + success(this.getFollowListDetailDataLocal(context))
  156 + })
  157 + })
  158 + }
  159 +
  160 + async getFollowListDetailDataLocal(context: Context): Promise<MineFollowListDetailItem> {
  161 + Logger.info(TAG, `getBottomNavDataMock start`);
  162 + let compRes: ResponseDTO<MineFollowListDetailItem> | null = await ResourcesUtils.getResourcesJson<ResponseDTO<MineFollowListDetailItem>>(context,'follow_list_detail_data_id120.json' );
  163 + if (!compRes || !compRes.data) {
  164 + Logger.info(TAG, `getAppointmentListDataLocal compRes is empty`);
  165 + return new MineFollowListDetailItem()
  166 + }
  167 + Logger.info(TAG, `getAppointmentListDataLocal getResourcesJsonSync compRes : ${JSON.stringify(compRes)}`);
  168 + return compRes.data
  169 + }
  170 +
  171 + fetchFollowListDetailData(object:FollowListDetailRequestItem) {
  172 + let url = HttpUrlUtils.getFollowListDetailDataUrl()
  173 + let headers: HashMap<string, string> = HttpUrlUtils.getYcgCommonHeaders();
  174 + return WDHttp.post<ResponseDTO<MineFollowListDetailItem>>(url, object,headers)
  175 + };
  176 +
  177 + /**
  178 + * 关注频道列表
  179 + * @returns
  180 + */
  181 + fetchFollowListData() {
  182 + let url = HttpUrlUtils.getFollowListDataUrl()
  183 + let headers: HashMap<string, string> = HttpUrlUtils.getYcgCommonHeaders();
  184 + return WDHttp.get<ResponseDTO<FollowListItem[]>>(url, headers)
  185 + };
  186 +
  187 + getFollowListData(context: Context): Promise<FollowListItem[]> {
  188 + return new Promise<FollowListItem[]>((success, error) => {
  189 + Logger.info(TAG, `getAppointmentList start`);
  190 + this.fetchFollowListData().then((navResDTO: ResponseDTO<FollowListItem[]>) => {
  191 + if (!navResDTO) {
  192 + error("page data invalid");
  193 + success(this.getFollowListDataLocal(context))
  194 + return
  195 + }
  196 + Logger.info(TAG, "getAppointmentList then,AppointmentResDTO.timeStamp:" + navResDTO.timestamp);
  197 + let navigationBean = navResDTO.data as FollowListItem[]
  198 + success(navigationBean);
  199 + }).catch((err: Error) => {
  200 + Logger.error(TAG, `fetchAppointmentListDataApi catch, error.name : ${err.name}, error.message:${err.message}`);
  201 + // error(err);
  202 + success(this.getFollowListDataLocal(context))
  203 + })
  204 + })
  205 + }
  206 +
  207 + async getFollowListDataLocal(context: Context): Promise<FollowListItem[]> {
  208 + Logger.info(TAG, `getFollowListDataLocal start`);
  209 + let compRes: ResponseDTO<FollowListItem[]> | null = await ResourcesUtils.getResourcesJson<ResponseDTO<FollowListItem[]>>(context,'follow_list_data2.json' );
  210 + if (!compRes || !compRes.data) {
  211 + Logger.info(TAG, `getFollowListDataLocal compRes is empty`);
  212 + return []
  213 + }
  214 + Logger.info(TAG, `getFollowListDataLocal getResourcesJsonSync compRes : ${JSON.stringify(compRes)}`);
  215 + return compRes.data
  216 + }
  217 +}
  218 +
  219 +const minePageDatasModel = MinePageDatasModel.getInstance()
  220 +export default minePageDatasModel as MinePageDatasModel
  1 +
  2 +/**
  3 + *
  4 + "attentionNum": 0,
  5 + "authIcon": "",
  6 + "authId": 0,
  7 + "authPersonal": "",
  8 + "authTitle": "",
  9 + "categoryAuth": "",
  10 + "city": "110100",
  11 + "cnAttentionNum": 0,
  12 + "cnCollectNum": 0,
  13 + "cnCommentNum": 0,
  14 + "cnFansNum": 4,
  15 + "cnIsAttention": 1,
  16 + "cnIsComment": 1,
  17 + "cnIsLike": 1,
  18 + "cnLikeNum": 0,
  19 + "cnLiveCommentControl": 1,
  20 + "cnLiveGiftControl": 1,
  21 + "cnLiveLikeControl": 1,
  22 + "cnLiveShareControl": 1,
  23 + "cnMainControl": 1,
  24 + "cnRegistTime": 1695280071000,
  25 + "cnShareControl": 1,
  26 + "cnShareNum": 0,
  27 + "cnUserId": "444937588589253",
  28 + "cnUserName": "QACrawler2115",
  29 + "cnUserType": "2",
  30 + "collectNum": 0,
  31 + "creatorId": "3004862",
  32 + "district": "110101",
  33 + "fansNum": 0,
  34 + "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",
  35 + "honoraryIcon": "",
  36 + "honoraryTitle": "",
  37 + "introduction": "知识博主",
  38 + "isAttention": 1,
  39 + "isComment": 1,
  40 + "isLike": 1,
  41 + "isVisiable": 1,
  42 + "likeNum": 0,
  43 + "liveCommentControl": 1,
  44 + "liveGiftControl": 1,
  45 + "liveLikeControl": 1,
  46 + "liveShareControl": 1,
  47 + "posterShareControl": 1,
  48 + "province": "110000",
  49 + "publishNum": 0,
  50 + "region": "",
  51 + "shareControl": 1,
  52 + "shareNum": 0,
  53 + "shopOpen": 0,
  54 + "storeUrl": "",
  55 + "subjectType": 0,
  56 + "userId": "",
  57 + "userName": "QACrawler2115",
  58 + "userType": "2",
  59 + "waresSwitch": 1
  60 + */
  61 +
  62 +@Observed
  63 +export class FollowListDetailItem{
  64 + headPhotoUrl:string //头像
  65 + cnUserName:string //昵称
  66 + cnFansNum:number //粉丝数
  67 + introduction:string //介绍
  68 + isFollow:boolean = false //是否已经关注
  69 +
  70 + constructor(headPhotoUrl:string,cnUserName:string,cnFansNum:number,introduction:string) {
  71 + this.headPhotoUrl = headPhotoUrl
  72 + this.cnUserName = cnUserName
  73 + this.cnFansNum = cnFansNum
  74 + this.introduction = introduction
  75 + }
  76 +}
  1 +export class FollowListDetailRequestItem{
  2 + creatorDirectoryId:number = 120
  3 + pageSize:number = 20
  4 + pageNum:number = 1
  5 +
  6 + constructor(creatorDirectoryId: number = 120,
  7 + pageSize: number = 20,
  8 + pageNum: number = 1) {
  9 + this.creatorDirectoryId = creatorDirectoryId
  10 + this.pageSize = pageSize
  11 + this.pageNum = pageNum
  12 + }
  13 +}
  1 +
  2 +/**
  3 + * {
  4 + "directoryName": "创作",
  5 + "directoryWeight": 3,
  6 + "id": 74,
  7 + "isShow": 1,
  8 + "level": 1,
  9 + "parentId": 0,
  10 + "rootId": 0,
  11 + "children": [
  12 + {
  13 + "children": [
  14 + {
  15 + "directoryName": "新闻联播",
  16 + "directoryWeight": 3,
  17 + "id": 79,
  18 + "isShow": 1,
  19 + "level": 3,
  20 + "parentId": 75,
  21 + "rootId": 74
  22 + }
  23 + ],
  24 + "directoryName": "短视频",
  25 + "directoryWeight": 1,
  26 + "id": 75,
  27 + "isShow": 1,
  28 + "level": 2,
  29 + "parentId": 74,
  30 + "rootId": 74
  31 + }
  32 + ]
  33 + }
  34 + */
  35 +
  36 +@Observed
  37 +export class FollowListItem{
  38 + constructor(directoryName:string) {
  39 + this.directoryName = directoryName
  40 + }
  41 + directoryName:string = ""
  42 + directoryWeight:number = 0
  43 + id:number = 0
  44 + isShow:number = 1
  45 + level:number = 1
  46 + parentId:number = 0
  47 + rootId:number = 0
  48 + children:FollowSecondListItem[] = []
  49 +}
  50 +@Observed
  51 +export class FollowSecondListItem{
  52 + directoryName:string = ""
  53 + directoryWeight:number = 0
  54 + id:number = 0
  55 + isShow:number = 1
  56 + level:number = 1
  57 + parentId:number = 0
  58 + rootId:number = 0
  59 + children:FollowThirdListItem[] = []
  60 +}
  61 +@Observed
  62 +export class FollowThirdListItem{
  63 + directoryName:string = ""
  64 + directoryWeight:number = 0
  65 + id:number = 0
  66 + isShow:number = 1
  67 + level:number = 1
  68 + parentId:number = 0
  69 + rootId:number = 0
  70 +}