xingzhaojie

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

# Conflicts:
#	PeopleDaily_Harmony/entry/src/main/resources/base/profile/main_pages.json
#	PeopleDaily_Harmony/wdComponent/src/main/ets/Index.ets
Showing 149 changed files with 6352 additions and 596 deletions
  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 +
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 }
@@ -8,6 +8,7 @@ @@ -8,6 +8,7 @@
8 "pages/PrivacySettingPage", 8 "pages/PrivacySettingPage",
9 "pages/SettingAboutPage", 9 "pages/SettingAboutPage",
10 "pages/AppointmentListPage", 10 "pages/AppointmentListPage",
11 - "pages/SettingPasswordPage" 11 + "pages/SettingPasswordPage",
  12 + "pages/FollowListPage"
12 ] 13 ]
13 -}  
  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 +}
@@ -38,3 +38,4 @@ export { AccountAndSecurityLayout } from "./components/page/AccountAndSecurityLa @@ -38,3 +38,4 @@ export { AccountAndSecurityLayout } from "./components/page/AccountAndSecurityLa
38 38
39 export { SettingPasswordLayout } from "./components/page/SettingPasswordLayout" 39 export { SettingPasswordLayout } from "./components/page/SettingPasswordLayout"
40 40
  41 +export { FollowFirstTabsComponent } from "./components/page/mine/follow/FollowFirstTabsComponent"
@@ -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{
@@ -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 /**
@@ -106,12 +106,13 @@ class MinePageDatasModel{ @@ -106,12 +106,13 @@ class MinePageDatasModel{
106 return WDHttp.get<ResponseDTO<MineAppointmentListItem>>(url, headers) 106 return WDHttp.get<ResponseDTO<MineAppointmentListItem>>(url, headers)
107 }; 107 };
108 108
109 - getAppointmentListData(pageSize:string,pageNum:string): Promise<MineAppointmentListItem> { 109 + getAppointmentListData(pageSize:string,pageNum:string,context?: Context): Promise<MineAppointmentListItem> {
110 return new Promise<MineAppointmentListItem>((success, error) => { 110 return new Promise<MineAppointmentListItem>((success, error) => {
111 Logger.info(TAG, `getAppointmentList start`); 111 Logger.info(TAG, `getAppointmentList start`);
112 this.fetchAppointmentListData(pageSize,pageNum).then((navResDTO: ResponseDTO<MineAppointmentListItem>) => { 112 this.fetchAppointmentListData(pageSize,pageNum).then((navResDTO: ResponseDTO<MineAppointmentListItem>) => {
113 if (!navResDTO) { 113 if (!navResDTO) {
114 error("page data invalid"); 114 error("page data invalid");
  115 + success(this.getAppointmentListDataLocal(context))
115 return 116 return
116 } 117 }
117 Logger.info(TAG, "getAppointmentList then,AppointmentResDTO.timeStamp:" + navResDTO.timestamp); 118 Logger.info(TAG, "getAppointmentList then,AppointmentResDTO.timeStamp:" + navResDTO.timestamp);
@@ -119,11 +120,24 @@ class MinePageDatasModel{ @@ -119,11 +120,24 @@ class MinePageDatasModel{
119 success(navigationBean); 120 success(navigationBean);
120 }).catch((err: Error) => { 121 }).catch((err: Error) => {
121 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}`);
122 - error(err); 123 + // error(err);
  124 + success(this.getAppointmentListDataLocal(context))
123 }) 125 })
124 }) 126 })
125 } 127 }
126 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 +
127 } 141 }
128 142
129 const minePageDatasModel = MinePageDatasModel.getInstance() 143 const minePageDatasModel = MinePageDatasModel.getInstance()
  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 +}
@@ -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 { 1 {
2 - "meta": {  
3 - "stableOrder": true  
4 - },  
5 - "lockfileVersion": 3, 2 + "lockfileVersion": 1,
6 "ATTENTION": "THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.", 3 "ATTENTION": "THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.",
7 "specifiers": { 4 "specifiers": {
8 - "@ohos/axios@^2.1.1": "@ohos/axios@2.1.1",  
9 - "wdConstant@../../../../commons/wdConstant": "wdConstant@../wdConstant",  
10 - "wdKit@../../../../commons/wdKit": "wdKit@../wdKit" 5 + "@ohos/axios@^2.1.1": "@ohos/axios@2.2.0"
11 }, 6 },
12 "packages": { 7 "packages": {
13 - "@ohos/axios@2.1.1": {  
14 - "name": "@ohos/axios",  
15 - "integrity": "sha512-EQax257+eKKT0Rx7h6N6xvmKbDRWDjCCWOP2vyyktySFwvjtypXuXmQKEvRjmAalR6cqf8mbfhWmpg0bD9OQ3w==",  
16 - "resolved": "https://repo.harmonyos.com/ohpm/@ohos/axios/-/axios-2.1.1.har",  
17 - "registryType": "ohpm"  
18 - },  
19 - "wdConstant@../wdConstant": {  
20 - "name": "wdconstant",  
21 - "resolved": "../wdConstant",  
22 - "registryType": "local"  
23 - },  
24 - "wdKit@../wdKit": {  
25 - "name": "wdkit",  
26 - "resolved": "../wdKit",  
27 - "registryType": "local" 8 + "@ohos/axios@2.2.0": {
  9 + "resolved": "https://repo.harmonyos.com/ohpm/@ohos/axios/-/axios-2.2.0.har",
  10 + "integrity": "sha512-v1QBWk6DfcN8wUW3D0ieFbHTR1taSI5cOgxp5l6B5cegXuNYhSc8ggKlAIXe6h/14LsfM+NW0ZGfSXcNEIM5yA=="
28 } 11 }
29 } 12 }
30 } 13 }
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_PRODUCT; 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,10 +237,91 @@ export class HttpUrlUtils { @@ -208,10 +237,91 @@ 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;
  245 + }
  246 +
  247 + static getVerifyCodeUrl() {
  248 + let url = HttpUrlUtils.hostUrl + "/api/rmrb-user-center/auth/zh/c/sendVerifyCode";
  249 + return url;
  250 + }
  251 +
  252 + static getAppLoginUrl() :string{
  253 + let url = HttpUrlUtils.getHost() + "/api/rmrb-user-center/auth/zh/c/appLogin";
  254 + return url;
  255 + }
  256 +
  257 + static getCheckVerifyCodeUrl() {
  258 + let url = HttpUrlUtils.hostUrl + "/api/rmrb-user-center/auth/zh/c/checkVerifyCode";
  259 + return url;
  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
216 } 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 +
217 } 327 }
1 { 1 {
2 - "meta": {  
3 - "stableOrder": true  
4 - },  
5 - "lockfileVersion": 3, 2 + "lockfileVersion": 1,
6 "ATTENTION": "THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.", 3 "ATTENTION": "THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.",
7 - "specifiers": {  
8 - "wdBean@../../../../features/wdBean": "wdBean@../../features/wdBean",  
9 - "wdKit@../../../../commons/wdKit": "wdKit@../wdKit"  
10 - },  
11 - "packages": {  
12 - "wdBean@../../features/wdBean": {  
13 - "name": "wdbean",  
14 - "resolved": "../../features/wdBean",  
15 - "registryType": "local"  
16 - },  
17 - "wdKit@../wdKit": {  
18 - "name": "wdkit",  
19 - "resolved": "../wdKit",  
20 - "registryType": "local"  
21 - }  
22 - } 4 + "specifiers": {},
  5 + "packages": {}
23 } 6 }
@@ -15,21 +15,29 @@ export class WDRouterPage { @@ -15,21 +15,29 @@ export class WDRouterPage {
15 } 15 }
16 16
17 // 主页 17 // 主页
18 - static index = new WDRouterPage("entry", "ets/pages/Index"); 18 + static index = new WDRouterPage("phone", "ets/pages/Index");
19 // 关于页面 19 // 关于页面
20 // static aboutPage = new WDRouterPage("entry", "ets/pages/about/AboutPage"); 20 // static aboutPage = new WDRouterPage("entry", "ets/pages/about/AboutPage");
21 // web默认页面 21 // web默认页面
22 - static defaultWebPage = new WDRouterPage("entry", "ets/pages/web/DefaultWebPage"); 22 + static defaultWebPage = new WDRouterPage("phone", "ets/pages/web/DefaultWebPage");
23 // 电子报页面 23 // 电子报页面
24 - static eNewspaper = new WDRouterPage("entry", "ets/pages/ENewspaper") 24 + static eNewspaper = new WDRouterPage("phone", "ets/pages/ENewspaper")
25 // 早晚报页面 25 // 早晚报页面
26 - static morningEveningPaperPage = new WDRouterPage("entry", "ets/pages/MorningEveningPaperPage") 26 + static morningEveningPaperPage = new WDRouterPage("phone", "ets/pages/MorningEveningPaperPage")
27 // 图文详情页 27 // 图文详情页
28 - static imageTextDetailPage = new WDRouterPage("entry", "ets/pages/ImageAndTextDetailPage"); 28 + static imageTextDetailPage = new WDRouterPage("phone", "ets/pages/ImageAndTextDetailPage");
29 // 短视频详情页 29 // 短视频详情页
30 static detailPlayShortVideoPage = new WDRouterPage("wdDetailPlayShortVideo", "ets/pages/DetailPlayShortVideoPage"); 30 static detailPlayShortVideoPage = new WDRouterPage("wdDetailPlayShortVideo", "ets/pages/DetailPlayShortVideoPage");
31 // 点播详情页 31 // 点播详情页
32 static detailPlayVodPage = new WDRouterPage("wdDetailPlayVod", "ets/pages/DetailPlayVodPage"); 32 static detailPlayVodPage = new WDRouterPage("wdDetailPlayVod", "ets/pages/DetailPlayVodPage");
33 // 直播详情页 33 // 直播详情页
34 static detailPlayLivePage = new WDRouterPage("wdDetailPlayLive", "ets/pages/DetailPlayLivePage"); 34 static detailPlayLivePage = new WDRouterPage("wdDetailPlayLive", "ets/pages/DetailPlayLivePage");
  35 +
  36 + static loginPage = new WDRouterPage("wdLogin", "ets/pages/login/LoginPage");
  37 +
  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");
35 } 43 }
@@ -14,13 +14,15 @@ export class WDRouterRule { @@ -14,13 +14,15 @@ export class WDRouterRule {
14 WDRouterRule.jumpWithPage(page, action) 14 WDRouterRule.jumpWithPage(page, action)
15 } 15 }
16 16
17 - private static jumpWithPage(page?: WDRouterPage, params?: object) { 17 + static jumpWithPage(page?: WDRouterPage, params?: object) {
18 if (page) { 18 if (page) {
19 if (params) { 19 if (params) {
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 { 1 {
2 - "meta": {  
3 - "stableOrder": true  
4 - },  
5 - "lockfileVersion": 3, 2 + "lockfileVersion": 1,
6 "ATTENTION": "THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.", 3 "ATTENTION": "THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.",
7 - "specifiers": {  
8 - "wdBean@../../../../features/wdBean": "wdBean@../../features/wdBean",  
9 - "wdConstant@../../../../commons/wdConstant": "wdConstant@../wdConstant",  
10 - "wdJsBridge@../../../wdJsBridge": "wdJsBridge@../wdJsBridge",  
11 - "wdJsBridge@../wdJsBridge": "wdJsBridge@../wdJsBridge",  
12 - "wdKit@../../../../commons/wdKit": "wdKit@../wdKit",  
13 - "wdRouter@../../../../commons/wdRouter": "wdRouter@../wdRouter"  
14 - },  
15 - "packages": {  
16 - "wdBean@../../features/wdBean": {  
17 - "name": "wdbean",  
18 - "resolved": "../../features/wdBean",  
19 - "registryType": "local"  
20 - },  
21 - "wdConstant@../wdConstant": {  
22 - "name": "wdconstant",  
23 - "resolved": "../wdConstant",  
24 - "registryType": "local"  
25 - },  
26 - "wdJsBridge@../wdJsBridge": {  
27 - "name": "wdjsbridge",  
28 - "resolved": "../wdJsBridge",  
29 - "registryType": "local"  
30 - },  
31 - "wdKit@../wdKit": {  
32 - "name": "wdkit",  
33 - "resolved": "../wdKit",  
34 - "registryType": "local"  
35 - },  
36 - "wdRouter@../wdRouter": {  
37 - "name": "wdrouter",  
38 - "resolved": "../wdRouter",  
39 - "registryType": "local",  
40 - "dependencies": {  
41 - "wdKit": "file:../wdKit",  
42 - "wdBean": "file:../../features/wdBean"  
43 - }  
44 - }  
45 - } 4 + "specifiers": {},
  5 + "packages": {}
46 } 6 }
  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 { 1 {
2 - "meta": {  
3 - "stableOrder": true  
4 - },  
5 - "lockfileVersion": 3, 2 + "lockfileVersion": 1,
6 "ATTENTION": "THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.", 3 "ATTENTION": "THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.",
7 - "specifiers": {  
8 - "@ohos/axios@^2.1.1": "@ohos/axios@2.1.1",  
9 - "wdBean@../../../../features/wdBean": "wdBean@../wdBean",  
10 - "wdConstant@../../../../commons/wdConstant": "wdConstant@../../commons/wdConstant",  
11 - "wdConstant@../../commons/wdConstant": "wdConstant@../commons/wdConstant",  
12 - "wdJsBridge@../../../wdJsBridge": "wdJsBridge@../../commons/wdJsBridge",  
13 - "wdKit@../../../../commons/wdKit": "wdKit@../../commons/wdKit",  
14 - "wdKit@../../commons/wdKit": "wdKit@../commons/wdKit",  
15 - "wdNetwork@../../../../commons/wdNetwork": "wdNetwork@../../commons/wdNetwork",  
16 - "wdRouter@../../../../commons/wdRouter": "wdRouter@../../commons/wdRouter",  
17 - "wdWebComponent@../../../../commons/wdWebComponent": "wdWebComponent@../../commons/wdWebComponent"  
18 - },  
19 - "packages": {  
20 - "@ohos/axios@2.1.1": {  
21 - "name": "@ohos/axios",  
22 - "integrity": "sha512-EQax257+eKKT0Rx7h6N6xvmKbDRWDjCCWOP2vyyktySFwvjtypXuXmQKEvRjmAalR6cqf8mbfhWmpg0bD9OQ3w==",  
23 - "resolved": "https://repo.harmonyos.com/ohpm/@ohos/axios/-/axios-2.1.1.har",  
24 - "registryType": "ohpm"  
25 - },  
26 - "wdBean@../wdBean": {  
27 - "name": "wdbean",  
28 - "resolved": "../wdBean",  
29 - "registryType": "local"  
30 - },  
31 - "wdConstant@../../commons/wdConstant": {  
32 - "name": "wdconstant",  
33 - "resolved": "../../commons/wdConstant",  
34 - "registryType": "local"  
35 - },  
36 - "wdConstant@../commons/wdConstant": {  
37 - "name": "wdconstant",  
38 - "resolved": "../commons/wdConstant",  
39 - "registryType": "local"  
40 - },  
41 - "wdJsBridge@../../commons/wdJsBridge": {  
42 - "name": "wdjsbridge",  
43 - "resolved": "../../commons/wdJsBridge",  
44 - "registryType": "local"  
45 - },  
46 - "wdKit@../../commons/wdKit": {  
47 - "name": "wdkit",  
48 - "resolved": "../../commons/wdKit",  
49 - "registryType": "local"  
50 - },  
51 - "wdKit@../commons/wdKit": {  
52 - "name": "wdkit",  
53 - "resolved": "../commons/wdKit",  
54 - "registryType": "local"  
55 - },  
56 - "wdNetwork@../../commons/wdNetwork": {  
57 - "name": "wdnetwork",  
58 - "resolved": "../../commons/wdNetwork",  
59 - "registryType": "local",  
60 - "dependencies": {  
61 - "wdConstant": "file:../wdConstant",  
62 - "wdKit": "file:../wdKit",  
63 - "@ohos/axios": "^2.1.1"  
64 - }  
65 - },  
66 - "wdRouter@../../commons/wdRouter": {  
67 - "name": "wdrouter",  
68 - "resolved": "../../commons/wdRouter",  
69 - "registryType": "local",  
70 - "dependencies": {  
71 - "wdKit": "file:../wdKit",  
72 - "wdBean": "file:../../features/wdBean"  
73 - }  
74 - },  
75 - "wdWebComponent@../../commons/wdWebComponent": {  
76 - "name": "wdwebcomponent",  
77 - "resolved": "../../commons/wdWebComponent",  
78 - "registryType": "local",  
79 - "dependencies": {  
80 - "wdConstant": "file:../wdConstant",  
81 - "wdKit": "file:../wdKit",  
82 - "wdJsBridge": "file:../wdJsBridge",  
83 - "wdBean": "file:../../features/wdBean",  
84 - "wdRouter": "file:../wdRouter"  
85 - }  
86 - }  
87 - } 4 + "specifiers": {},
  5 + "packages": {}
88 } 6 }
  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 -const TAG = 'PageComponent'; 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'
  12 +
  13 +const TAG = 'MinePageComponent';
2 14
3 /** 15 /**
4 * 我的页面 16 * 我的页面
5 */ 17 */
6 @Component 18 @Component
7 export struct MinePageComponent { 19 export struct MinePageComponent {
8 - // 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 +
9 build() { 43 build() {
10 - Text('我的页面') 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)
11 } 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%')
  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 +
12 } 93 }
13 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 +}
  1 +
  2 +
  3 +export default class FunctionsItem {
  4 + imgSrc:Resource
  5 + msg:string
  6 +
  7 + constructor(msg:string,imgSrc:Resource){
  8 + this.msg = msg
  9 + this.imgSrc = imgSrc
  10 + }
  11 +
  12 +}
  1 +@Observed
  2 +export class MineAppointmentItem{
  3 + appStyle:string ="" //"15"
  4 + /*[
  5 + "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"
  6 + ]*/
  7 + imageUrl:string[]
  8 +
  9 + liveId:number = -1 //20000007348
  10 + planStartTime:string = "" //2023-12-05 15:26:10
  11 + timePre:string //12月05日
  12 + timeBack:string //15:26
  13 + relId:string = "" //"500000017021"
  14 + relType:number //1
  15 + startTime:string = "" //""
  16 + status:string //"wait"
  17 + title:string //"视界运营位加权-加权中删除"
  18 + isAppointment:boolean
  19 +
  20 +
  21 + constructor(imageUrl:string[],status:string,title:string,isAppointment:boolean,timePre:string,timeBack:string,relType:number,appStyle?:string,liveId?:number,planStartTime?:string,
  22 + relId?:string,startTime?:string) {
  23 + this.imageUrl=imageUrl
  24 + this.status=status
  25 + this.title=title
  26 + this.isAppointment=isAppointment
  27 + this.timePre = timePre
  28 + this.timeBack = timeBack
  29 + this.relType = relType
  30 + }
  31 +}
  1 +import { MineAppointmentItem } from './MineAppointmentItem'
  2 +
  3 +export class MineAppointmentListItem{
  4 + list:MineAppointmentItem[] = []
  5 +
  6 + pageNum: number = 0
  7 + pageSize: number = 20
  8 + totalCount: number = 0
  9 +
  10 + constructor(list?:MineAppointmentItem[],pageNum?: number,pageSize?: number,totalCount?: number) {
  11 + }
  12 +
  13 +}
  1 +import { FollowListDetailItem } from './FollowListDetailItem'
  2 +
  3 +export class MineFollowListDetailItem{
  4 + list:FollowListDetailItem[] = []
  5 +
  6 + pageNum: number = 0
  7 + pageSize: number = 20
  8 + totalCount: number = 0
  9 +
  10 + constructor(list?:FollowListDetailItem[],pageNum?: number,pageSize?: number,totalCount?: number) {
  11 + }
  12 +
  13 +}
  1 +
  2 +import FunctionsItem from './FunctionsItem';
  3 +
  4 +export default class MinePageCreatorFunctionsItem extends FunctionsItem{
  5 +}
  1 +
  2 +import FunctionsItem from './FunctionsItem'
  3 +
  4 +export default class MinePageMoreFunctionModel extends FunctionsItem{
  5 +}
  1 +
  2 +import FunctionsItem from './FunctionsItem'
  3 +
  4 +export default class MinePagePersonalFunctionsItem extends FunctionsItem {
  5 +}
  1 +
  2 +
  3 +const TAG = 'MorningEveningViewModel'
  4 +
  5 +export class MorningEveningViewModel {
  6 +
  7 + static async getNewspaperList(date: string, pageSize: string): Promise<NewspaperListBean> {
  8 + return new Promise<NewspaperListBean>((success, error) => {
  9 + Logger.info(TAG, `getNavData start`);
  10 + PageRepository.fetchNewspaperList(date, pageSize).then((resDTO: ResponseDTO<NewspaperListBean>) => {
  11 + if (!resDTO || !resDTO.data) {
  12 + Logger.error(TAG, 'getNewspaperList then navResDTO is empty');
  13 + error('resDTO is empty');
  14 + return
  15 + }
  16 + if (resDTO.code != 0) {
  17 + Logger.error(TAG, `getNewspaperList then code:${resDTO.code}, message:${resDTO.message}`);
  18 + error('resDTO Response Code is failure');
  19 + return
  20 + }
  21 + // let navResStr = JSON.stringify(navResDTO);
  22 + Logger.info(TAG, "getNewspaperList then,navResDTO.timestamp:" + resDTO.timestamp);
  23 + success(resDTO.data);
  24 + }).catch((err: Error) => {
  25 + Logger.error(TAG, `getNewspaperList catch, error.name : ${err.name}, error.message:${err.message}`);
  26 + error(err);
  27 + })
  28 + })
  29 + }
  30 +}
@@ -13,6 +13,7 @@ @@ -13,6 +13,7 @@
13 { 13 {
14 "name": "ohos.permission.INTERNET" 14 "name": "ohos.permission.INTERNET"
15 } 15 }
16 - ] 16 + ],
  17 + "pages": "$profile:main_pages"
17 } 18 }
18 } 19 }
@@ -55,6 +55,49 @@ @@ -55,6 +55,49 @@
55 { 55 {
56 "name": "color_4d000000", 56 "name": "color_4d000000",
57 "value": "#4d000000" 57 "value": "#4d000000"
  58 + },
  59 + {
  60 + "name": "color_F5F5F5",
  61 + "value": "#F5F5F5"
  62 + },
  63 + {
  64 + "name": "color_FFC460",
  65 + "value": "#FFC460"
  66 + },
  67 + {
  68 + "name": "color_FF2E0C",
  69 + "value": "#FF2E0C"
  70 + },
  71 + {
  72 + "name": "color_AD6000",
  73 + "value": "#AD6000"
  74 + },
  75 + {
  76 + "name": "color_F9F9F9",
  77 + "value": "#F9F9F9"
  78 + },
  79 + {
  80 + "name": "color_994D00",
  81 + "value": "#994D00"
  82 + },
  83 + {
  84 + "name":"color_B15900",
  85 + "value": "#B15900"
  86 + },
  87 + {
  88 + "name": "main_red",
  89 + "value": "#E84026"
  90 + }, {
  91 + "name":"color_4D000000",
  92 + "value": "#4D000000"
  93 + },
  94 + {
  95 + "name":"color_CCCCCC",
  96 + "value": "#CCCCCC"
  97 + },
  98 + {
  99 + "name":"color_EDEDED",
  100 + "value": "#EDEDED"
58 } 101 }
59 ] 102 ]
60 } 103 }
1 { 1 {
2 "src": [ 2 "src": [
3 - "components/MorningEveningPaper/MorningEveningPaperComponent" 3 + "components/MorningEveningPaper/MorningEveningPaperComponent",
  4 + "components/page/AppointmentListPage",
  5 + "components/page/FollowListPage"
4 ] 6 ]
5 } 7 }
6 8
1 { 1 {
2 - "meta": {  
3 - "stableOrder": true  
4 - },  
5 - "lockfileVersion": 3, 2 + "lockfileVersion": 1,
6 "ATTENTION": "THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.", 3 "ATTENTION": "THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.",
7 - "specifiers": {  
8 - "@ohos/axios@^2.1.1": "@ohos/axios@2.1.1",  
9 - "wdBean@../../../../features/wdBean": "wdBean@../wdBean",  
10 - "wdConstant@../../../../commons/wdConstant": "wdConstant@../../commons/wdConstant",  
11 - "wdKit@../../../../commons/wdKit": "wdKit@../../commons/wdKit",  
12 - "wdKit@../../commons/wdKit": "wdKit@../commons/wdKit",  
13 - "wdNetwork@../../../../commons/wdNetwork": "wdNetwork@../../commons/wdNetwork",  
14 - "wdPlayer@../../../wdPlayer": "wdPlayer@../wdPlayer",  
15 - "wdPlayer@../wdPlayer": "wdPlayer@../wdPlayer",  
16 - "wdRouter@../../../../commons/wdRouter": "wdRouter@../../commons/wdRouter"  
17 - },  
18 - "packages": {  
19 - "@ohos/axios@2.1.1": {  
20 - "name": "@ohos/axios",  
21 - "integrity": "sha512-EQax257+eKKT0Rx7h6N6xvmKbDRWDjCCWOP2vyyktySFwvjtypXuXmQKEvRjmAalR6cqf8mbfhWmpg0bD9OQ3w==",  
22 - "resolved": "https://repo.harmonyos.com/ohpm/@ohos/axios/-/axios-2.1.1.har",  
23 - "registryType": "ohpm"  
24 - },  
25 - "wdBean@../wdBean": {  
26 - "name": "wdbean",  
27 - "resolved": "../wdBean",  
28 - "registryType": "local"  
29 - },  
30 - "wdConstant@../../commons/wdConstant": {  
31 - "name": "wdconstant",  
32 - "resolved": "../../commons/wdConstant",  
33 - "registryType": "local"  
34 - },  
35 - "wdKit@../../commons/wdKit": {  
36 - "name": "wdkit",  
37 - "resolved": "../../commons/wdKit",  
38 - "registryType": "local"  
39 - },  
40 - "wdKit@../commons/wdKit": {  
41 - "name": "wdkit",  
42 - "resolved": "../commons/wdKit",  
43 - "registryType": "local"  
44 - },  
45 - "wdNetwork@../../commons/wdNetwork": {  
46 - "name": "wdnetwork",  
47 - "resolved": "../../commons/wdNetwork",  
48 - "registryType": "local",  
49 - "dependencies": {  
50 - "wdConstant": "file:../wdConstant",  
51 - "wdKit": "file:../wdKit",  
52 - "@ohos/axios": "^2.1.1"  
53 - }  
54 - },  
55 - "wdPlayer@../wdPlayer": {  
56 - "name": "wdplayer",  
57 - "resolved": "../wdPlayer",  
58 - "registryType": "local",  
59 - "dependencies": {  
60 - "wdKit": "file:../../commons/wdKit"  
61 - }  
62 - },  
63 - "wdRouter@../../commons/wdRouter": {  
64 - "name": "wdrouter",  
65 - "resolved": "../../commons/wdRouter",  
66 - "registryType": "local",  
67 - "dependencies": {  
68 - "wdKit": "file:../wdKit",  
69 - "wdBean": "file:../../features/wdBean"  
70 - }  
71 - }  
72 - } 4 + "specifiers": {},
  5 + "packages": {}
73 } 6 }
1 { 1 {
2 - "meta": {  
3 - "stableOrder": true  
4 - },  
5 - "lockfileVersion": 3, 2 + "lockfileVersion": 1,
6 "ATTENTION": "THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.", 3 "ATTENTION": "THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.",
7 - "specifiers": {  
8 - "@ohos/axios@^2.1.1": "@ohos/axios@2.1.1",  
9 - "wdBean@../../../../features/wdBean": "wdBean@../wdBean",  
10 - "wdConstant@../../../../commons/wdConstant": "wdConstant@../../commons/wdConstant",  
11 - "wdDetailPlayApi@../../../wdDetailPlayApi": "wdDetailPlayApi@../wdDetailPlayApi",  
12 - "wdDetailPlayApi@../wdDetailPlayApi": "wdDetailPlayApi@../wdDetailPlayApi",  
13 - "wdKit@../../../../commons/wdKit": "wdKit@../../commons/wdKit",  
14 - "wdKit@../../commons/wdKit": "wdKit@../commons/wdKit",  
15 - "wdNetwork@../../../../commons/wdNetwork": "wdNetwork@../../commons/wdNetwork",  
16 - "wdPlayer@../../../wdPlayer": "wdPlayer@../wdPlayer",  
17 - "wdRouter@../../../../commons/wdRouter": "wdRouter@../../commons/wdRouter",  
18 - "wdRouter@../../commons/wdRouter": "wdRouter@../commons/wdRouter"  
19 - },  
20 - "packages": {  
21 - "@ohos/axios@2.1.1": {  
22 - "name": "@ohos/axios",  
23 - "integrity": "sha512-EQax257+eKKT0Rx7h6N6xvmKbDRWDjCCWOP2vyyktySFwvjtypXuXmQKEvRjmAalR6cqf8mbfhWmpg0bD9OQ3w==",  
24 - "resolved": "https://repo.harmonyos.com/ohpm/@ohos/axios/-/axios-2.1.1.har",  
25 - "registryType": "ohpm"  
26 - },  
27 - "wdBean@../wdBean": {  
28 - "name": "wdbean",  
29 - "resolved": "../wdBean",  
30 - "registryType": "local"  
31 - },  
32 - "wdConstant@../../commons/wdConstant": {  
33 - "name": "wdconstant",  
34 - "resolved": "../../commons/wdConstant",  
35 - "registryType": "local"  
36 - },  
37 - "wdDetailPlayApi@../wdDetailPlayApi": {  
38 - "name": "wddetailplayapi",  
39 - "resolved": "../wdDetailPlayApi",  
40 - "registryType": "local",  
41 - "dependencies": {  
42 - "wdKit": "file:../../commons/wdKit",  
43 - "wdBean": "file:../../features/wdBean",  
44 - "wdRouter": "file:../../commons/wdRouter",  
45 - "wdNetwork": "file:../../commons/wdNetwork",  
46 - "wdPlayer": "file:../../features/wdPlayer"  
47 - }  
48 - },  
49 - "wdKit@../../commons/wdKit": {  
50 - "name": "wdkit",  
51 - "resolved": "../../commons/wdKit",  
52 - "registryType": "local"  
53 - },  
54 - "wdKit@../commons/wdKit": {  
55 - "name": "wdkit",  
56 - "resolved": "../commons/wdKit",  
57 - "registryType": "local"  
58 - },  
59 - "wdNetwork@../../commons/wdNetwork": {  
60 - "name": "wdnetwork",  
61 - "resolved": "../../commons/wdNetwork",  
62 - "registryType": "local",  
63 - "dependencies": {  
64 - "wdConstant": "file:../wdConstant",  
65 - "wdKit": "file:../wdKit",  
66 - "@ohos/axios": "^2.1.1"  
67 - }  
68 - },  
69 - "wdPlayer@../wdPlayer": {  
70 - "name": "wdplayer",  
71 - "resolved": "../wdPlayer",  
72 - "registryType": "local",  
73 - "dependencies": {  
74 - "wdKit": "file:../../commons/wdKit"  
75 - }  
76 - },  
77 - "wdRouter@../../commons/wdRouter": {  
78 - "name": "wdrouter",  
79 - "resolved": "../../commons/wdRouter",  
80 - "registryType": "local",  
81 - "dependencies": {  
82 - "wdKit": "file:../wdKit",  
83 - "wdBean": "file:../../features/wdBean"  
84 - }  
85 - },  
86 - "wdRouter@../commons/wdRouter": {  
87 - "name": "wdrouter",  
88 - "resolved": "../commons/wdRouter",  
89 - "registryType": "local",  
90 - "dependencies": {  
91 - "wdKit": "file:../wdKit",  
92 - "wdBean": "file:../../wdBean"  
93 - }  
94 - }  
95 - } 4 + "specifiers": {},
  5 + "packages": {}
96 } 6 }
1 { 1 {
2 - "meta": {  
3 - "stableOrder": true  
4 - },  
5 - "lockfileVersion": 3, 2 + "lockfileVersion": 1,
6 "ATTENTION": "THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.", 3 "ATTENTION": "THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.",
7 - "specifiers": {  
8 - "@ohos/axios@^2.1.1": "@ohos/axios@2.1.1",  
9 - "wdBean@../../../../features/wdBean": "wdBean@../wdBean",  
10 - "wdConstant@../../../../commons/wdConstant": "wdConstant@../../commons/wdConstant",  
11 - "wdDetailPlayApi@../../../wdDetailPlayApi": "wdDetailPlayApi@../wdDetailPlayApi",  
12 - "wdKit@../../../../commons/wdKit": "wdKit@../../commons/wdKit",  
13 - "wdKit@../../commons/wdKit": "wdKit@../commons/wdKit",  
14 - "wdNetwork@../../../../commons/wdNetwork": "wdNetwork@../../commons/wdNetwork",  
15 - "wdPlayer@../../../wdPlayer": "wdPlayer@../wdPlayer",  
16 - "wdRouter@../../../../commons/wdRouter": "wdRouter@../../commons/wdRouter",  
17 - "wdRouter@../../commons/wdRouter": "wdRouter@../commons/wdRouter"  
18 - },  
19 - "packages": {  
20 - "@ohos/axios@2.1.1": {  
21 - "name": "@ohos/axios",  
22 - "integrity": "sha512-EQax257+eKKT0Rx7h6N6xvmKbDRWDjCCWOP2vyyktySFwvjtypXuXmQKEvRjmAalR6cqf8mbfhWmpg0bD9OQ3w==",  
23 - "resolved": "https://repo.harmonyos.com/ohpm/@ohos/axios/-/axios-2.1.1.har",  
24 - "registryType": "ohpm"  
25 - },  
26 - "wdBean@../wdBean": {  
27 - "name": "wdbean",  
28 - "resolved": "../wdBean",  
29 - "registryType": "local"  
30 - },  
31 - "wdConstant@../../commons/wdConstant": {  
32 - "name": "wdconstant",  
33 - "resolved": "../../commons/wdConstant",  
34 - "registryType": "local"  
35 - },  
36 - "wdDetailPlayApi@../wdDetailPlayApi": {  
37 - "name": "wddetailplayapi",  
38 - "resolved": "../wdDetailPlayApi",  
39 - "registryType": "local",  
40 - "dependencies": {  
41 - "wdKit": "file:../../commons/wdKit",  
42 - "wdBean": "file:../../features/wdBean",  
43 - "wdRouter": "file:../../commons/wdRouter",  
44 - "wdNetwork": "file:../../commons/wdNetwork",  
45 - "wdPlayer": "file:../../features/wdPlayer"  
46 - }  
47 - },  
48 - "wdKit@../../commons/wdKit": {  
49 - "name": "wdkit",  
50 - "resolved": "../../commons/wdKit",  
51 - "registryType": "local"  
52 - },  
53 - "wdKit@../commons/wdKit": {  
54 - "name": "wdkit",  
55 - "resolved": "../commons/wdKit",  
56 - "registryType": "local"  
57 - },  
58 - "wdNetwork@../../commons/wdNetwork": {  
59 - "name": "wdnetwork",  
60 - "resolved": "../../commons/wdNetwork",  
61 - "registryType": "local",  
62 - "dependencies": {  
63 - "wdConstant": "file:../wdConstant",  
64 - "wdKit": "file:../wdKit",  
65 - "@ohos/axios": "^2.1.1"  
66 - }  
67 - },  
68 - "wdPlayer@../wdPlayer": {  
69 - "name": "wdplayer",  
70 - "resolved": "../wdPlayer",  
71 - "registryType": "local",  
72 - "dependencies": {  
73 - "wdKit": "file:../../commons/wdKit"  
74 - }  
75 - },  
76 - "wdRouter@../../commons/wdRouter": {  
77 - "name": "wdrouter",  
78 - "resolved": "../../commons/wdRouter",  
79 - "registryType": "local",  
80 - "dependencies": {  
81 - "wdKit": "file:../wdKit",  
82 - "wdBean": "file:../../features/wdBean"  
83 - }  
84 - },  
85 - "wdRouter@../commons/wdRouter": {  
86 - "name": "wdrouter",  
87 - "resolved": "../commons/wdRouter",  
88 - "registryType": "local",  
89 - "dependencies": {  
90 - "wdKit": "file:../wdKit",  
91 - "wdBean": "file:../../wdBean"  
92 - }  
93 - }  
94 - } 4 + "specifiers": {},
  5 + "packages": {}
95 } 6 }
  1 +/node_modules
  2 +/oh_modules
  3 +/.preview
  4 +/build
  5 +/.cxx
  6 +/.test
  1 +export { add } from "./src/main/ets/utils/Calc"
  1 +{
  2 + "apiType": "stageMode",
  3 + "buildOption": {
  4 + "arkOptions": {
  5 + // "apPath": "./modules.ap" /* Profile used for profile-guided optimization (PGO), a compiler optimization technique to improve app runtime performance. */
  6 + }
  7 + },
  8 + "buildOptionSet": [
  9 + {
  10 + "name": "release",
  11 + "arkOptions": {
  12 + "obfuscation": {
  13 + "ruleOptions": {
  14 + "enable": true,
  15 + "files": [
  16 + "./obfuscation-rules.txt"
  17 + ]
  18 + }
  19 + }
  20 + }
  21 + },
  22 + ],
  23 + "targets": [
  24 + {
  25 + "name": "default"
  26 + }
  27 + ]
  28 +}
  1 +import { hspTasks } from '@ohos/hvigor-ohos-plugin';
  2 +
  3 +export default {
  4 + system: hspTasks, /* Built-in plugin of Hvigor. It cannot be modified. */
  5 + plugins:[] /* Custom plugin to extend the functionality of Hvigor. */
  6 +}
  1 +# Define project specific obfuscation rules here.
  2 +# You can include the obfuscation configuration files in the current module's build-profile.json5.
  3 +#
  4 +# For more details, see
  5 +# https://gitee.com/openharmony/arkcompiler_ets_frontend/blob/master/arkguard/README.md
  6 +
  7 +# Obfuscation options:
  8 +# -disable-obfuscation: disable all obfuscations
  9 +# -enable-property-obfuscation: obfuscate the property names
  10 +# -enable-toplevel-obfuscation: obfuscate the names in the global scope
  11 +# -compact: remove unnecessary blank spaces and all line feeds
  12 +# -remove-log: remove all console.* statements
  13 +# -print-namecache: print the name cache that contains the mapping from the old names to new names
  14 +# -apply-namecache: reuse the given cache file
  15 +
  16 +# Keep options:
  17 +# -keep-property-name: specifies property names that you want to keep
  18 +# -keep-global-name: specifies names that you want to keep in the global scope
  1 +{
  2 + "name": "wdlogin",
  3 + "version": "1.0.0",
  4 + "description": "Please describe the basic information.",
  5 + "main": "Index.ets",
  6 + "author": "",
  7 + "license": "Apache-2.0",
  8 + "dependencies": {
  9 + "wdConstant": "file:../../commons/wdConstant",
  10 + "wdKit": "file:../../commons/wdKit",
  11 + "wdWebComponent": "file:../../commons/wdWebComponent",
  12 + "wdBean": "file:../../features/wdBean",
  13 + "wdRouter": "file:../../commons/wdRouter",
  14 + "wdNetwork": "file:../../commons/wdNetwork"
  15 + }
  16 +}
  1 +@Entry
  2 +@Component
  3 +struct Index {
  4 + @State message: string = 'Hello World';
  5 +
  6 + build() {
  7 + Row() {
  8 + Column() {
  9 + Text(this.message)
  10 + .fontSize(50)
  11 + .fontWeight(FontWeight.Bold)
  12 + }
  13 + .width('100%')
  14 + }
  15 + .height('100%')
  16 + }
  17 +}
  1 +export interface CheckVerifyBean{
  2 + temToken: string
  3 + jwtToken: string
  4 +}
  1 +@CustomDialog
  2 +export struct CustomProtocolDialog {
  3 + controller: CustomDialogController
  4 +
  5 + cancel: () => void = () => {
  6 + }
  7 +
  8 + confirm: () => void = () => {
  9 + }
  10 +
  11 + build() {
  12 + Column() {
  13 + Text("温馨提示")
  14 + .fontColor("#222222")
  15 + .fontSize(18)
  16 + .width("100%")
  17 + .fontWeight(FontWeight.Bold)
  18 + .textAlign(TextAlign.Center)
  19 + .margin({ top: 20 })
  20 + Text() {
  21 + Span("为保障您的合法权益,请阅读并同意").fontSize(14).fontColor("#666666")
  22 + Span("《用户协议》").fontSize(14).fontColor("#ED2800")
  23 + Span("及").fontSize(14).fontColor("#666666")
  24 + Span("《隐私政策》").fontSize(14).fontColor("#ED2800")
  25 + Span("后进行登录").fontSize(14).fontColor("#666666")
  26 + }.margin({ top: 12, left: 16, right: 16 })
  27 +
  28 + Divider().color("#999999").width("100%").margin({ top: 14 }).height('1vp')
  29 + Row() {
  30 + Text('放弃登录')
  31 + .fontSize(16)
  32 + .fontColor("#999999")
  33 + .layoutWeight(1)
  34 + .fontWeight(FontWeight.Medium)
  35 + .textAlign(TextAlign.Center)
  36 + .onClick(() => {
  37 + this.controller.close()
  38 + if (this.cancel) {
  39 + this.cancel()
  40 + }
  41 +
  42 + })
  43 + .height('100%')
  44 + // Divider().color("#999999").height('100%').width('0.5vp')
  45 + Text('同意并登录')
  46 + .fontSize(16)
  47 + .fontColor("#ED2800")
  48 + .layoutWeight(1)
  49 + .fontWeight(FontWeight.Medium)
  50 + .textAlign(TextAlign.Center)
  51 + .border({
  52 + width: { left: 1 },
  53 + color: "#999999",
  54 + style: { left: BorderStyle.Solid }
  55 +
  56 + })
  57 + .onClick(() => {
  58 + this.controller.close()
  59 + if (this.confirm) {
  60 + this.confirm()
  61 + }
  62 + })
  63 + .height('100%')
  64 + }.layoutWeight(1).justifyContent(FlexAlign.Center)
  65 + }.height(161).backgroundColor(Color.White).borderRadius(6).width('74%')
  66 + }
  67 +}
  1 +import { Logger } from 'wdKit/src/main/ets/utils/Logger'
  2 +import { LoginInputComponent } from './LoginInputComponent'
  3 +import { LoginViewModel } from './LoginViewModel'
  4 +import router from '@ohos.router'
  5 +import promptAction from '@ohos.promptAction'
  6 +
  7 +const TAG = 'ForgetPasswordPage'
  8 +/**
  9 + * 找回密码页面
  10 + * */
  11 +@Entry
  12 +@Component
  13 +struct ForgetPasswordPage {
  14 + @State phoneContent: string = ''
  15 + @State codeContent: string = ''
  16 + @State isSubmit: boolean = false //是否可以提交 默认不可以
  17 + loginViewModel: LoginViewModel = new LoginViewModel()
  18 + @State @Watch('onCodeSend') isCodeSend: boolean = false //验证码点击发送事件
  19 + onCodeSend() {
  20 + if (this.isCodeSend) {
  21 + this.sendVerifyCode()
  22 + }
  23 + }
  24 +
  25 + build() {
  26 + Column() {
  27 + Image($r('app.media.login_back_icon')).width(24).height(24).margin({ left: 15, top: 10 }).onClick(() => {
  28 + router.back()
  29 + })
  30 + Text('找回密码').fontSize(22).fontColor('#333333').fontWeight(FontWeight.Bold).margin({ left: 25, top: 112 })
  31 + LoginInputComponent({
  32 + phoneContent: $phoneContent,
  33 + codeContent: $codeContent,
  34 + isSubmit: $isSubmit,
  35 + isCodeSend: $isCodeSend
  36 + })
  37 + Row() {
  38 + Button("确认", { type: ButtonType.Normal })
  39 + .layoutWeight(1)
  40 + .borderRadius(4)
  41 + .fontSize(16)
  42 + .fontWeight(FontWeight.Medium)
  43 + .margin({ top: 26 })
  44 + .height(44)
  45 + .backgroundColor("#ED2800")
  46 + .opacity(this.isSubmit ? 1 : 0.6)
  47 + .onClick(() => {
  48 + this.checkVerifyCode()
  49 +
  50 + })
  51 + }.padding({ left: 25, right: 25 }).width('100%')
  52 +
  53 + }.width('100%').height('100%').alignItems(HorizontalAlign.Start)
  54 + }
  55 +
  56 + aboutToAppear() {
  57 + if (this.isCodeSend) {
  58 + this.sendVerifyCode()
  59 + }
  60 + }
  61 +
  62 + //发送验证码
  63 + sendVerifyCode() {
  64 + if (this.isEmpty(this.phoneContent)) {
  65 + return
  66 + }
  67 + this.loginViewModel.sendVerifyCode(this.phoneContent).then((verifyCode) => {
  68 + promptAction.showToast({ message: "验证码已发送成功" })
  69 + Logger.debug(TAG, "sendVerifyCode: " + verifyCode)
  70 + })
  71 +
  72 + }
  73 +
  74 +
  75 + //校验验证码
  76 + checkVerifyCode() {
  77 + if (!this.isSubmit) {
  78 + return
  79 + }
  80 + if (this.isEmpty(this.phoneContent)) {
  81 + return
  82 + }
  83 + if (this.isEmpty(this.codeContent)) {
  84 + return
  85 + }
  86 +
  87 + this.loginViewModel.checkVerifyCode(this.phoneContent, this.codeContent).then(() => {
  88 + //todo 跳转密码设置页面
  89 + promptAction.showToast({message:"校验成功,准备跳转设置页面"})
  90 + Logger.debug(TAG,"校验成功")
  91 + }).catch((error:string)=>{
  92 + promptAction.showToast({message:error})
  93 + Logger.debug(TAG,"校验失败")
  94 + })
  95 + }
  96 +
  97 + isEmpty(obj: undefined|null|string): boolean {
  98 + return (obj == undefined || obj == null || obj == '');
  99 + }
  100 +}
  1 +export interface LoginBean {
  2 + // {"code":"0","data":{"firstMark":1,"id":569350079889669,"jwtToken":"eyJhbGciOiJIUzI1NiIsImtpZCI6ImQ4WkI2QkhxSEZrdjJ2U25BNlRwZEdKRjBHcjItVzBvS2FaYzdLOUUycmcifQ.eyJpc3MiOiJwZW9wbGVzLWRhaWx5LWZvdXJhIiwic3ViIjoicGVvcGxlcy1kYWlseS1mb3VyYSIsImV4cCI6MTcxMDY0NzE0MiwidXNlcklkIjo1NjkzNTAwNzk4ODk2NjksInVzZXJWZXJzaW9uIjoiNTY5MzUwMDc5ODg5NjY5XzAiLCJ1c2VyTmFtZSI6IiVFNCVCQSVCQSVFNiVCMCU5MSVFNiU5NyVBNSVFNiU4QSVBNSVFNyVCRCU5MSVFNSU4RiU4QjJrRDJ4VyIsInVzZXJUeXBlIjoxLCJjcmVhdG9ySWQiOm51bGx9.1M0E_6V60opL7AxamGzINpieTHP11fRbiXKDPc-ywWg","longTimeNoLoginMark":0,"refreshToken":"83fe2f1a-77af-4f73-8490-1cebed037f73","status":1,"userName":"人民日报网友2kD2xW","userType":1},"message":"Success","success":true,"timestamp":1710467142214}
  3 + firstMark: number
  4 + id: number
  5 + jwtToken: string
  6 + longTimeNoLoginMark: number
  7 + refreshToken: string
  8 + status: number
  9 + userName: string
  10 + userType: number
  11 + temToken: string
  12 +}
  1 +import { Logger } from 'wdKit'
  2 +
  3 +@Component
  4 +export struct LoginInputComponent {
  5 + @State timeCount: number = 60
  6 + @Link phoneContent: string
  7 + @Link codeContent: string
  8 + @State codeBtnState: boolean = false //发送验证码控件是否可以 默认不可用
  9 + @Link isCodeSend: boolean //验证码控件是否点击 默认没有 发送接口
  10 + @Link isSubmit: boolean //是否可以提交
  11 +
  12 + build() {
  13 + Column() {
  14 + this.addCodeLayout()
  15 + }.width('100%').padding({ left: 25, right: 25 })
  16 + }
  17 +
  18 + @Builder
  19 + addCodeLayout() {
  20 + TextInput({ placeholder: "请输入手机号" })
  21 + .fontSize(16)
  22 + .height(48)
  23 + .margin({ top: 36 })
  24 + .backgroundColor("#F5F5F5")
  25 + .borderRadius(4)
  26 + .type(InputType.PhoneNumber)
  27 + .onChange((content) => {
  28 + this.phoneContent = content
  29 + this.isSubmit = (this.phoneContent.length >= 11 && this.codeContent.length >= 6)
  30 + if (content.length >= 11) {
  31 + this.codeBtnState = true
  32 + } else {
  33 + this.codeBtnState = false
  34 + }
  35 + })
  36 +
  37 + Row() {
  38 + TextInput({ placeholder: "验证码" })
  39 + .layoutWeight(1)
  40 + .fontSize(16)
  41 + .height(48)
  42 + .type(InputType.Number)
  43 + .fontColor("#222222")
  44 + .backgroundColor("#00000000")
  45 + .borderRadius({ topLeft: 4, bottomLeft: 4 })
  46 + .backgroundImage($r('app.media.login_code_bg_one'), ImageRepeat.NoRepeat)
  47 + .backgroundImageSize(ImageSize.Contain)
  48 + .onChange((value) => {
  49 + this.codeContent = value
  50 + this.isSubmit = (this.phoneContent.length >= 11 && this.codeContent.length >= 6)
  51 + })
  52 +
  53 + Text(this.isCodeSend ? this.timeCount + "s" : "发送验证码")
  54 + .backgroundImage($r('app.media.login_code_bg'), ImageRepeat.NoRepeat)
  55 + .backgroundImageSize(ImageSize.Cover)
  56 + .fontColor('#ED2800')
  57 + .width(110)
  58 + .fontSize(14)
  59 + .fontWeight(this.codeBtnState ? FontWeight.Bold : FontWeight.Normal)
  60 + .height(48)
  61 + .enabled(this.codeBtnState)// .align(Alignment.End)
  62 + .textAlign(TextAlign.Center)
  63 + .onClick(() => {
  64 + if (this.phoneContent.length < 11) {
  65 + return
  66 + }
  67 + this.isCodeSend = true
  68 + let time = setInterval(() => {
  69 + Logger.debug("倒计时:" + this.timeCount)
  70 + this.timeCount--
  71 + if (this.timeCount < 1) {
  72 + this.isCodeSend = false
  73 + this.timeCount = 60
  74 + clearInterval(time)
  75 + }
  76 + }, 1000)
  77 +
  78 + })
  79 +
  80 +
  81 + }.margin({ top: 12 }).height(48).alignItems(VerticalAlign.Center).justifyContent(FlexAlign.Start)
  82 +
  83 + }
  84 +}
  1 +import HashMap from '@ohos.util.HashMap';
  2 +import { HttpUrlUtils, ResponseDTO } from 'wdNetwork';
  3 +import { Logger } from 'wdKit';
  4 +import { HttpRequest } from 'wdNetwork/src/main/ets/http/HttpRequest';
  5 +import { LoginBean } from './LoginBean';
  6 +import { CheckVerifyBean } from './CheckVerifyBean';
  7 +
  8 +const TAG = 'LoginModel'
  9 +
  10 +export class LoginModel {
  11 + //获取验证码
  12 + sendVerifyCode(number: string) {
  13 + let bean: Record<string, string> = {};
  14 + bean['phoneNum'] = number
  15 + let headers: HashMap<string, string> = HttpUrlUtils.getCommonHeaders();
  16 + return new Promise<string>((success, fail) => {
  17 + HttpRequest.post<ResponseDTO<string>>(HttpUrlUtils.getVerifyCodeUrl(), bean, headers).then((data: ResponseDTO<string>) => {
  18 + if (!data || !data.data) {
  19 + fail("数据为空")
  20 + return
  21 + }
  22 + if (data.code != 0) {
  23 + fail(data.message)
  24 + return
  25 + }
  26 + success(data.data)
  27 + }, (error: Error) => {
  28 + fail(error.message)
  29 + Logger.debug("LoginViewModel:error ", error.toString())
  30 + })
  31 + })
  32 +
  33 + }
  34 +
  35 +
  36 + //{"phone":"13625644528","loginType":2,"deviceId":"60da5af6-9c59-3566-8622-8c6c00710994","verificationCode":"644528"}
  37 + appLogin(phone: string, loginType: number, verificationCode: string) {
  38 + let headers: HashMap<string, string> = HttpUrlUtils.getCommonHeaders();
  39 + let bean: Record<string, Object> = {};
  40 + bean['phone'] = phone
  41 + bean['loginType'] = loginType
  42 + bean['deviceId'] = '60da5af6-9c59-3566-8622-8c6c00710994'
  43 + bean['verificationCode'] = verificationCode
  44 + return new Promise<LoginBean>((success, fail) => {
  45 + HttpRequest.post<ResponseDTO<LoginBean>>(HttpUrlUtils.getAppLoginUrl(), bean, headers).then((data: ResponseDTO<LoginBean>) => {
  46 + Logger.debug("LoginViewModel:success2 ", data.message)
  47 + if (!data || !data.data) {
  48 + fail("数据为空")
  49 + return
  50 + }
  51 + if (data.code != 0) {
  52 + fail(data.message)
  53 + return
  54 + }
  55 + success(data.data)
  56 + }, (error: Error) => {
  57 + fail(error.message)
  58 + Logger.debug("LoginViewModel:error2 ", error.toString())
  59 + })
  60 + })
  61 + }
  62 +
  63 + // {"password":"523acd319228efde34e8a30268ee8ca5e4fc421d72affa531676e1765940d22c","phone":"13625644528","loginType":0,"oldPassword":"BA5FD74F827AF9B271FE17CADC489C36","deviceId":"60da5af6-9c59-3566-8622-8c6c00710994"}
  64 + appLoginByPassword(phone: string, loginType: number, password: string, oldPassword: string) {
  65 + let headers: HashMap<string, string> = HttpUrlUtils.getCommonHeaders();
  66 + let bean: Record<string, string | number> = {};
  67 + bean['phone'] = phone
  68 + bean['loginType'] = loginType
  69 + bean['deviceId'] = '60da5af6-9c59-3566-8622-8c6c00710994'
  70 + bean['password'] = password
  71 + bean['oldPassword'] = oldPassword
  72 + return new Promise<LoginBean>((success, fail) => {
  73 + HttpRequest.post<ResponseDTO<LoginBean>>(HttpUrlUtils.getAppLoginUrl(), bean, headers).then((data: ResponseDTO<LoginBean>) => {
  74 + Logger.debug("LoginViewModel:success2 ", data.message)
  75 + if (!data || !data.data) {
  76 + fail("数据为空")
  77 + return
  78 + }
  79 + if (data.code != 0) {
  80 + fail(data.message)
  81 + return
  82 + }
  83 + success(data.data)
  84 + }, (error: Error) => {
  85 + Logger.debug("LoginViewModel:error2 ", error.toString())
  86 + fail(error.message)
  87 + })
  88 + })
  89 + }
  90 +
  91 + //忘记密码 校验验证码 {"verifyCode":"644528","phone":"13625644528"} 去除头部cookie 可以正常访问
  92 + checkVerifyCode(phone: string, verifyCode: string) {
  93 + let bean: Record<string, Object> = {};
  94 + bean['verifyCode'] = verifyCode
  95 + bean['phone'] = phone
  96 + let headers: HashMap<string, string> = HttpUrlUtils.getCommonHeaders();
  97 + return new Promise<CheckVerifyBean>((success, fail) => {
  98 + HttpRequest.post<ResponseDTO<CheckVerifyBean>>(HttpUrlUtils.getCheckVerifyCodeUrl(), bean, headers).then((data: ResponseDTO<CheckVerifyBean>) => {
  99 + Logger.debug("LoginViewModel:success2 ", data.message)
  100 + if (!data || !data.data) {
  101 + fail("数据为空")
  102 + return
  103 + }
  104 + if (data.code != 0) {
  105 + fail(data.message)
  106 + return
  107 + }
  108 + success(data.data)
  109 + }, (error: Error) => {
  110 + Logger.debug("LoginViewModel:error2 ", error.toString())
  111 + fail(error.message)
  112 + })
  113 + })
  114 + }
  115 +}
  116 +
  1 +import { Logger } from 'wdKit/src/main/ets/utils/Logger'
  2 +import { CustomProtocolDialog } from './CustomProtocolDialog'
  3 +import router from '@ohos.router'
  4 +import { LoginViewModel } from './LoginViewModel'
  5 +import { LoginInputComponent } from './LoginInputComponent'
  6 +import promptAction from '@ohos.promptAction'
  7 +import { SPHelper } from 'wdKit'
  8 +import { WDRouterPage } from 'wdRouter/src/main/ets/router/WDRouterPage';
  9 +import { WDRouterRule } from 'wdRouter/src/main/ets/router/WDRouterRule';
  10 +
  11 +@Extend(Row)
  12 +function otherStyle() {
  13 + .backgroundImageSize(ImageSize.Cover)
  14 + .layoutWeight(1)
  15 + .height("100%")
  16 + .justifyContent(FlexAlign.Center)
  17 + .alignItems(VerticalAlign.Center)
  18 +}
  19 +
  20 +function isEmpty(obj: undefined | string | null): boolean {
  21 + return (obj == undefined || obj == null || obj == '');
  22 +}
  23 +
  24 +const TAG = "LoginPage"
  25 +
  26 +@Preview
  27 +@Entry
  28 +@Component
  29 +struct LoginPage {
  30 + @State codeBtnState: boolean = false
  31 + @State timeCount: number = 60
  32 + phoneController: TextInputController = new TextInputController()
  33 + codeSendText = ""
  34 + @State @Watch('onCodeSend') isCodeSend: boolean = false //验证码是否发送
  35 + @State phoneContent: string = "" //手机号
  36 + @State codeContent: string = "" //验证码
  37 + @State protocolState: boolean = false //协议勾选状态
  38 + accountContent = '' //账号
  39 + passwordContent = ''
  40 + @State isSubmit: boolean = false
  41 + @State checkCodePage: boolean = true //判断是否是验证码页面 默认验证码登录
  42 + @State passwordSwitch: boolean = true //密码显示
  43 + // @State isPasswordSubmit: boolean = false //账户密码状态 是否出发登录
  44 +
  45 + dialogController: CustomDialogController = new CustomDialogController({
  46 + builder: CustomProtocolDialog({
  47 + cancel: () => {
  48 +
  49 + },
  50 + confirm: () => {
  51 + this.requestLogin()
  52 + }
  53 + }),
  54 + customStyle: true,
  55 + alignment:DialogAlignment.Center
  56 + })
  57 + loginViewModel = new LoginViewModel()
  58 +
  59 + onCodeSend() {
  60 + Logger.debug(TAG, "isCodeSend:" + this.isCodeSend + "")
  61 + if (this.isCodeSend) {
  62 + this.sendVerifyCode()
  63 + }
  64 + }
  65 +
  66 + aboutToAppear() {
  67 + Logger.debug(TAG, "aboutToAppear:" + this.isCodeSend + "")
  68 + }
  69 +
  70 + onPageShow() {
  71 + Logger.debug(TAG, "onPageShow:" + this.isCodeSend + "")
  72 + }
  73 +
  74 + build() {
  75 + RelativeContainer() {
  76 +
  77 + //注册内容
  78 + Column() {
  79 + Image($r("app.media.login_logo"))
  80 + .width(120)
  81 + .height(66)
  82 + .margin({ top: 78 })
  83 + .align(Alignment.Center)
  84 +
  85 + if (this.checkCodePage) {
  86 + LoginInputComponent({
  87 + phoneContent: $phoneContent,
  88 + codeContent: $codeContent,
  89 + isSubmit: $isSubmit,
  90 + isCodeSend: $isCodeSend
  91 + })
  92 + } else {
  93 + this.addPassword()
  94 + }
  95 +
  96 +
  97 + Row() {
  98 + // Checkbox().selectedColor("#ED2800").onChange((value) => {
  99 + // this.protocolState = value
  100 + // })
  101 + Image(this.protocolState ? $r('app.media.login_checkbox_select') : $r('app.media.login_checkbox_unselected'))
  102 + .width(15)
  103 + .height(15)
  104 + .onClick(() => {
  105 + this.protocolState = !this.protocolState
  106 + })
  107 +
  108 + Text() {
  109 + Span("我已阅读并同意").fontColor("#999999").fontSize(12)
  110 + Span("《用户协议》").fontColor("#ED2800").fontSize(12).onClick(() => {
  111 + //todo 协议
  112 + })
  113 + Span("及").fontColor("#999999").fontSize(12)
  114 + Span("《隐私政策》").fontColor("#ED2800").fontSize(12).onClick(() => {
  115 + //todo 协议
  116 + })
  117 + }
  118 + }.margin({ top: 28 }).alignItems(VerticalAlign.Center)
  119 +
  120 + Row() {
  121 + Button("登录", { type: ButtonType.Normal })
  122 + .borderRadius(4)
  123 + .fontSize(20)
  124 + .fontWeight(FontWeight.Medium)
  125 + .margin({ top: 20 })
  126 + .height(44)
  127 + .opacity(this.isSubmit ? 1 : 0.6)
  128 + .enabled(this.isSubmit ? true : false)
  129 + .width("100%")
  130 + .backgroundColor("#ED2800")
  131 + .onClick(() => {
  132 + //todo 登录
  133 + this.loginSubmit()
  134 +
  135 + })
  136 + }.padding({ left: 25, right: 25 }).width('100%')
  137 +
  138 +
  139 + if (!this.checkCodePage) {
  140 + Text('忘记密码').fontColor('#666666').fontSize(14).margin({ top: 16 })
  141 + .onClick(() => {
  142 + // router.pushUrl({ url: 'pages/login/ForgetPasswordPage' })
  143 + WDRouterRule.jumpWithPage(WDRouterPage.forgetPasswordPage)
  144 + })
  145 + }
  146 +
  147 + }.width("100%")
  148 + .alignRules({
  149 + top: { anchor: "__container__", align: VerticalAlign.Top },
  150 + }).id("register")
  151 +
  152 + //其他登录方式
  153 + Column() {
  154 + this.addOtherLogin()
  155 + }.width('100%')
  156 + .alignRules({
  157 + bottom: { anchor: "__container__", align: VerticalAlign.Bottom },
  158 + }).id("other")
  159 +
  160 + //关闭按钮
  161 + Image($r('app.media.login_closed'))
  162 + .width(24)
  163 + .height(24)
  164 + .margin({ top: 10, right: 15 })
  165 + .alignRules({
  166 + top: { anchor: "__container__", align: VerticalAlign.Top },
  167 + right: { anchor: "__container__", align: HorizontalAlign.End }
  168 + })
  169 + .onClick(() => {
  170 + router.back()
  171 + })
  172 + .id('id_close')
  173 +
  174 + }.width('100%').height('100%')
  175 + }
  176 +
  177 + @Builder
  178 + addPassword() {
  179 + Column() {
  180 + TextInput({ placeholder: "请输入账号", controller: this.phoneController })
  181 + .fontSize(16)
  182 + .height(48)
  183 + .backgroundColor("#F5F5F5")
  184 + .borderRadius(4)
  185 + .type(InputType.PhoneNumber)
  186 + .onChange((content) => {
  187 + this.accountContent = content
  188 + this.isSubmit = (this.accountContent.length >= 11 && this.passwordContent.length >= 6)
  189 + })
  190 +
  191 + RelativeContainer() {
  192 + if (this.passwordSwitch) {
  193 + this.addPasswordInputLayout()
  194 + } else {
  195 + this.addPasswordInputLayout()
  196 + }
  197 +
  198 + Image(this.passwordSwitch ? $r('app.media.login_password_off') : $r('app.media.login_password_on'))
  199 + .onClick(() => {
  200 + this.passwordSwitch = !this.passwordSwitch
  201 + })
  202 + .width(24)
  203 + .height(24)
  204 + .alignRules({
  205 + right: { anchor: "__container__", align: HorizontalAlign.End },
  206 + center: { anchor: '__container__', align: VerticalAlign.Center }
  207 + })
  208 + .margin({ right: 12 })
  209 + .id("password_icon")
  210 +
  211 + }.margin({ top: 12 })
  212 + .height(48)
  213 + .width('100%')
  214 + }.padding({ left: 25, right: 25 }).width('100%').margin({ top: 36 })
  215 +
  216 + }
  217 +
  218 + @Builder
  219 + addPasswordInputLayout() {
  220 + TextInput({ placeholder: "请输入密码", text: this.passwordContent })
  221 + .layoutWeight(1)
  222 + .fontSize(16)
  223 + .height(48)
  224 + .fontColor("#222222")
  225 + .backgroundColor("#F5F5F5")
  226 + .type(this.passwordSwitch ? InputType.Password : InputType.Normal)
  227 + .showPasswordIcon(false)
  228 + .borderRadius({ topLeft: 4, bottomLeft: 4 })
  229 + .alignRules({
  230 + // top:{anchor:"__container__",align:VerticalAlign.Top} ,
  231 + left: { anchor: "__container__", align: HorizontalAlign.Start },
  232 +
  233 + })
  234 + .onChange((value) => {
  235 + // Logger.debug(TAG, "onChange" + value + "/" + this.passwordContent)
  236 + this.passwordContent = value
  237 + this.isSubmit = (this.accountContent.length >= 11 && this.passwordContent.length >= 6)
  238 + })
  239 + .id("password")
  240 + }
  241 +
  242 + @Builder
  243 + addOtherLogin() {
  244 + Column() {
  245 + Row() {
  246 + Divider().layoutWeight(1).margin({ left: 25 })
  247 + Text('其他登录方式').margin({ left: 16, right: 16 }).fontSize(14).fontColor("#666666")
  248 + Divider().layoutWeight(1).margin({ right: 25 })
  249 + }.width('100%')
  250 +
  251 + Row() {
  252 + Row() {
  253 + Image($r('app.media.login_wx'))
  254 + .width(20).height(20)
  255 + }.backgroundImage($r('app.media.login_other_left'), ImageRepeat.NoRepeat)
  256 + .otherStyle()
  257 +
  258 + Row() {
  259 + Image($r('app.media.login_qq')).size({ width: 20, height: 20 })
  260 + }.backgroundImage($r('app.media.login_other_middle'), ImageRepeat.NoRepeat)
  261 + .otherStyle()
  262 +
  263 + Row() {
  264 + Image($r('app.media.login_wb')).size({ width: 20, height: 20 })
  265 + }.backgroundImage($r('app.media.login_other_middle'), ImageRepeat.NoRepeat)
  266 + .otherStyle()
  267 +
  268 + Row() {
  269 + Image(this.checkCodePage ? $r('app.media.login_qt') : $r('app.media.login_other_password'))
  270 + .size({ width: 20, height: 20 })
  271 + }.backgroundImage($r('app.media.login_other_right'), ImageRepeat.NoRepeat)
  272 + .otherStyle().onClick(() => {
  273 + this.checkCodePage = !this.checkCodePage;
  274 + this.passwordContent = ''
  275 + this.passwordSwitch = true
  276 + this.isSubmit = false
  277 + })
  278 +
  279 + }.height(36)
  280 + .width('100%')
  281 + .padding({ left: 25, right: 25 })
  282 + // .justifyContent(FlexAlign.SpaceEvenly)
  283 + .margin({ top: 24 })
  284 + }.width('100%').margin({ bottom: 40 })
  285 + }
  286 +
  287 + //发送验证码
  288 + sendVerifyCode() {
  289 + this.loginViewModel.sendVerifyCode(this.phoneContent).then((verifyCode) => {
  290 + promptAction.showToast({ message: "验证码已发送成功" })
  291 + Logger.debug(TAG, "sendVerifyCode: " + verifyCode)
  292 + }).catch((message:string)=>{
  293 + Logger.debug(TAG, "sendVerifyCode: " + message)
  294 + })
  295 + }
  296 +
  297 + requestLogin() {
  298 + Logger.debug('LoginViewModel', "requestLogin")
  299 + if (this.checkCodePage) {
  300 + this.loginViewModel.appLogin(this.phoneContent, 2, this.codeContent).then((data) => {
  301 + Logger.debug(TAG, "requestLogin: " + data.jwtToken)
  302 + let dd = SPHelper.default.get('userName', 'dd').then((value) => {
  303 + Logger.debug(TAG, 'SP:' + value)
  304 + })
  305 + router.back()
  306 + })
  307 + } else {
  308 + this.loginViewModel.appLoginByPassword(this.accountContent, 0, this.passwordContent, "").then((data) => {
  309 + Logger.debug(TAG, "requestLogin: " + data.jwtToken)
  310 + let dd = SPHelper.default.get('userName', 'dd').then((value) => {
  311 + Logger.debug(TAG, 'SP:' + value)
  312 + })
  313 + promptAction.showToast({ message: '登录成功' })
  314 + router.back()
  315 + }).catch((value: string) => {
  316 + promptAction.showToast({ message: value })
  317 + })
  318 + }
  319 +
  320 + }
  321 +
  322 + //登录
  323 + loginSubmit() {
  324 + Logger.debug(TAG, "loginSubmit " + this.checkCodePage)
  325 + //todo 判断是验证码登录还是密码登录
  326 + if (this.checkCodePage) {
  327 + if (isEmpty(this.phoneContent)) {
  328 + Logger.debug(TAG, "手机号为空")
  329 + return
  330 + }
  331 + if (isEmpty(this.codeContent)) {
  332 + Logger.debug(TAG, "验证码为空")
  333 + return
  334 + }
  335 +
  336 + } else {
  337 + if (isEmpty(this.accountContent)) {
  338 + Logger.debug(TAG, "账号为空")
  339 + return
  340 + }
  341 + if (isEmpty(this.passwordContent)) {
  342 + Logger.debug(TAG, "密码为空")
  343 + return
  344 + }
  345 + }
  346 + if (this.protocolState) {
  347 + this.requestLogin()
  348 + } else {
  349 + this.dialogController.open()
  350 + }
  351 +
  352 + }
  353 +}
  1 +import { Logger } from 'wdKit/src/main/ets/utils/Logger'
  2 +import { LoginModel } from './LoginModel'
  3 +import { LoginBean } from './LoginBean'
  4 +import { SPHelper } from 'wdKit'
  5 +import { CheckVerifyBean } from './CheckVerifyBean'
  6 +import cryptoFramework from '@ohos.security.cryptoFramework'
  7 +import buffer from '@ohos.buffer'
  8 +import {
  9 + SpConstants
  10 +} from '../../../../../../../commons/wdNetwork/oh_modules/wdConstant/src/main/ets/constants/SpConstants'
  11 +import { HttpUrlUtils } from 'wdNetwork/src/main/ets/http/HttpUrlUtils'
  12 +
  13 +const TAG = "LoginViewModel"
  14 +
  15 +export class LoginViewModel {
  16 + loginModel: LoginModel
  17 +
  18 + constructor() {
  19 + this.loginModel = new LoginModel()
  20 + }
  21 +
  22 + //发送验证码
  23 + sendVerifyCode(number: string) {
  24 + return new Promise<string>((success, fail) => {
  25 + this.loginModel.sendVerifyCode(number).then((data) => {
  26 + success(data)
  27 + }).catch((message: string) => {
  28 + fail(message)
  29 + })
  30 + })
  31 +
  32 + }
  33 +
  34 + appLogin(phone: string, loginType: number, verificationCode: string) {
  35 +
  36 + return new Promise<LoginBean>((success, fail) => {
  37 + this.loginModel.appLogin(phone, loginType, verificationCode).then((data: LoginBean) => {
  38 + SPHelper.default.save(SpConstants.USER_FIRST_MARK, data.firstMark)
  39 + SPHelper.default.save(SpConstants.USER_ID, data.id)
  40 + SPHelper.default.save(SpConstants.USER_JWT_TOKEN, data.jwtToken)
  41 + SPHelper.default.save(SpConstants.USER_LONG_TIME_NO_LOGIN_MARK, data.longTimeNoLoginMark)
  42 + SPHelper.default.save(SpConstants.USER_REFRESH_TOKEN, data.refreshToken)
  43 + SPHelper.default.save(SpConstants.USER_STATUS, data.status)
  44 + SPHelper.default.save(SpConstants.USER_Type, data.userType)
  45 + SPHelper.default.save(SpConstants.USER_NAME, data.userName)
  46 + HttpUrlUtils.setUserId(data.id+"")
  47 + HttpUrlUtils.setUserType(data.userType+"")
  48 + HttpUrlUtils.setUserToken(data.jwtToken)
  49 + success(data)
  50 + }).catch(() => {
  51 + fail()
  52 + })
  53 + })
  54 + }
  55 +
  56 + async appLoginByPassword(phone: string, loginType: number, password: string, oldPassword: string) {
  57 +
  58 + return new Promise<LoginBean>(async (success, fail) => {
  59 + let passwordNew = await this.doMd(password)
  60 + Logger.debug(TAG, "PASSWORD:" + passwordNew)
  61 + this.loginModel.appLoginByPassword(phone, loginType, passwordNew, oldPassword).then((data: LoginBean) => {
  62 + SPHelper.default.save(SpConstants.USER_FIRST_MARK, data.firstMark)
  63 + SPHelper.default.save(SpConstants.USER_ID, data.id)
  64 + SPHelper.default.save(SpConstants.USER_JWT_TOKEN, data.jwtToken)
  65 + SPHelper.default.save(SpConstants.USER_LONG_TIME_NO_LOGIN_MARK, data.longTimeNoLoginMark)
  66 + SPHelper.default.save(SpConstants.USER_REFRESH_TOKEN, data.refreshToken)
  67 + SPHelper.default.save(SpConstants.USER_STATUS, data.status)
  68 + SPHelper.default.save(SpConstants.USER_Type, data.userType)
  69 + SPHelper.default.save(SpConstants.USER_NAME, data.userName)
  70 + HttpUrlUtils.setUserId(data.id+"")
  71 + HttpUrlUtils.setUserType(data.userType+"")
  72 + HttpUrlUtils.setUserToken(data.jwtToken)
  73 + success(data)
  74 + }).catch((value: string) => {
  75 + fail(value)
  76 + })
  77 + })
  78 + }
  79 +
  80 + //{"code":"0","data":{"tempToken":"eyJhbGciOiJIUzI1NiIsImtpZCI6ImQ4WkI2QkhxSEZrdjJ2U25BNlRwZEdKRjBHcjItVzBvS2FaYzdLOUUycmcifQ.eyJpc3MiOiJwZW9wbGVzLWRhaWx5LWZvdXJhIiwic3ViIjoicGVvcGxlcy1kYWlseS1mb3VyYSIsImV4cCI6MTcxMDQ2ODE5NCwidXNlcklkIjpudWxsLCJ1c2VyVmVyc2lvbiI6Im51bGxfbnVsbCIsInVzZXJOYW1lIjpudWxsLCJ1c2VyVHlwZSI6bnVsbCwiY3JlYXRvcklkIjpudWxsLCJ1c2VySWRaaCI6bnVsbH0.R5gv44Gyni3QTxtWvSxYn0eMuUD5_bI1hh9TaThq25g","jwtToken":"eyJhbGciOiJIUzI1NiIsImtpZCI6ImQ4WkI2QkhxSEZrdjJ2U25BNlRwZEdKRjBHcjItVzBvS2FaYzdLOUUycmcifQ.eyJpc3MiOiJwZW9wbGVzLWRhaWx5LWZvdXJhIiwic3ViIjoicGVvcGxlcy1kYWlseS1mb3VyYSIsImV4cCI6MTcxMDY0NzU5NCwidXNlcklkIjo1NjkzNTAwNzk4ODk2NjksInVzZXJWZXJzaW9uIjoiNTY5MzUwMDc5ODg5NjY5XzAiLCJ1c2VyTmFtZSI6IiVFNCVCQSVCQSVFNiVCMCU5MSVFNiU5NyVBNSVFNiU4QSVBNSVFNyVCRCU5MSVFNSU4RiU4QjJrRDJ4VyIsInVzZXJUeXBlIjoxLCJjcmVhdG9ySWQiOm51bGwsInVzZXJJZFpoIjpudWxsfQ.Ai19vg8-rhJNXt2nwFTfir7s01eLfTtOCKcptIpeyG0"},"message":"Success","success":true,"timestamp":1710467595186}
  81 + checkVerifyCode(phone: string, verifyCode: string) {
  82 + return new Promise<CheckVerifyBean>((success, reject) => {
  83 + this.loginModel.checkVerifyCode(phone, verifyCode).then((data: CheckVerifyBean) => {
  84 + //todo 保存数据
  85 + SPHelper.default.save(SpConstants.USER_TEMP_TOKEN, data.temToken)
  86 + SPHelper.default.save(SpConstants.USER_JWT_TOKEN, data.jwtToken)
  87 + success(data)
  88 +
  89 + }, (value: string) => {
  90 + reject(value)
  91 + })
  92 + })
  93 + }
  94 +
  95 +
  96 + async doMd(content: string): Promise<string> {
  97 + let mdAlgName = 'SHA256'; // 摘要算法名
  98 + let message = content; // 待摘要的数据
  99 + let md = cryptoFramework.createMd(mdAlgName);
  100 + // 数据量较少时,可以只做一次update,将数据全部传入,接口未对入参长度做限制
  101 + await md.update({ data: new Uint8Array(buffer.from(message, 'utf-8').buffer) });
  102 + let mdResult = await md.digest();
  103 + console.info('Md result:' + mdResult.data);
  104 + return this.byte2Hex(mdResult.data)
  105 + }
  106 +
  107 + byte2Hex(data: Uint8Array): string {
  108 + let bufferStr = ''
  109 + for (let i = 0; i < data.length; i++) {
  110 + let temp = data[i].toString(16)
  111 + if (temp.length == 1) {
  112 + temp = "0"+temp
  113 + }
  114 + bufferStr += temp
  115 +
  116 + }
  117 + console.info('Md result2:' + bufferStr);
  118 + return bufferStr;
  119 +
  120 + }
  121 +}
  1 +export function add(a:number, b:number) {
  2 + return a + b;
  3 +}
  1 +{
  2 + "module": {
  3 + "name": "wdLogin",
  4 + "type": "shared",
  5 + "description": "$string:shared_desc",
  6 + "deviceTypes": [
  7 + "phone",
  8 + "tablet",
  9 + "2in1"
  10 + ],
  11 + "deliveryWithInstall": true,
  12 + "pages": "$profile:main_pages"
  13 + }
  14 +}
  1 +{
  2 + "color": [
  3 + {
  4 + "name": "white",
  5 + "value": "#FFFFFF"
  6 + }
  7 + ]
  8 +}
  1 +{
  2 + "string": [
  3 + {
  4 + "name": "shared_desc",
  5 + "value": "description"
  6 + }
  7 + ]
  8 +}
  1 +{
  2 + "src": [
  3 + "pages/Index",
  4 + "pages/login/LoginPage",
  5 + "pages/login/ForgetPasswordPage"
  6 + ]
  7 +}
  1 +import localUnitTest from './LocalUnit.test';
  2 +
  3 +export default function testsuite() {
  4 + localUnitTest();
  5 +}
  1 +import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium';
  2 +
  3 +export default function localUnitTest() {
  4 + describe('localUnitTest',() => {
  5 + // Defines a test suite. Two parameters are supported: test suite name and test suite function.
  6 + beforeAll(() => {
  7 + // Presets an action, which is performed only once before all test cases of the test suite start.
  8 + // This API supports only one parameter: preset action function.
  9 + });
  10 + beforeEach(() => {
  11 + // Presets an action, which is performed before each unit test case starts.
  12 + // The number of execution times is the same as the number of test cases defined by **it**.
  13 + // This API supports only one parameter: preset action function.
  14 + });
  15 + afterEach(() => {
  16 + // Presets a clear action, which is performed after each unit test case ends.
  17 + // The number of execution times is the same as the number of test cases defined by **it**.
  18 + // This API supports only one parameter: clear action function.
  19 + });
  20 + afterAll(() => {
  21 + // Presets a clear action, which is performed after all test cases of the test suite end.
  22 + // This API supports only one parameter: clear action function.
  23 + });
  24 + it('assertContain', 0, () => {
  25 + // Defines a test case. This API supports three parameters: test case name, filter parameter, and test case function.
  26 + let a = 'abc';
  27 + let b = 'b';
  28 + // Defines a variety of assertion methods, which are used to declare expected boolean conditions.
  29 + expect(a).assertContain(b);
  30 + expect(a).assertEqual(a);
  31 + });
  32 + });
  33 +}
1 { 1 {
2 - "meta": {  
3 - "stableOrder": true  
4 - },  
5 - "lockfileVersion": 3, 2 + "lockfileVersion": 1,
6 "ATTENTION": "THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.", 3 "ATTENTION": "THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.",
7 - "specifiers": {  
8 - "wdKit@../../../../commons/wdKit": "wdKit@../../commons/wdKit"  
9 - },  
10 - "packages": {  
11 - "wdKit@../../commons/wdKit": {  
12 - "name": "wdkit",  
13 - "resolved": "../../commons/wdKit",  
14 - "registryType": "local"  
15 - }  
16 - } 4 + "specifiers": {},
  5 + "packages": {}
17 } 6 }
1 { 1 {
2 - "hvigorVersion": "file:../dependencies/hvigor-4.1.1.tgz", 2 + "hvigorVersion": "file:../dependencies/hvigor-3.0.10-s.tgz",
3 "dependencies": { 3 "dependencies": {
4 - "@ohos/hvigor-ohos-plugin": "file:../dependencies/hvigor-ohos-plugin-4.1.1.tgz" 4 + "@ohos/hvigor-ohos-plugin": "file:../dependencies/hvigor-ohos-plugin-3.0.10-s.tgz",
  5 + "rollup": "file:../dependencies/rollup.tgz",
5 }, 6 },
6 "execution": { 7 "execution": {
7 - // "analyze": "default", /* Define the build analyze mode. Value: [ "default" | "verbose" | false ]. Default: "default" */  
8 - // "daemon": true, /* Enable daemon compilation. Value: [ true | false ]. Default: true */  
9 - // "incremental": true, /* Enable incremental compilation. Value: [ true | false ]. Default: true */  
10 - // "parallel": true, /* Enable parallel compilation. Value: [ true | false ]. Default: true */  
11 - // "typeCheck": false, /* Enable typeCheck. Value: [ true | false ]. Default: false */ 8 + // "daemon": true, /* Enable daemon compilation. Default: true */
  9 + // "incremental": true, /* Enable incremental compilation. Default: true */
  10 + // "parallel": true, /* Enable parallel compilation. Default: true */
  11 + // "typeCheck": false, /* Enable typeCheck. Default: false */
12 }, 12 },
13 "logging": { 13 "logging": {
14 // "level": "info" /* Define the log level. Value: [ "debug" | "info" | "warn" | "error" ]. Default: "info" */ 14 // "level": "info" /* Define the log level. Value: [ "debug" | "info" | "warn" | "error" ]. Default: "info" */
15 }, 15 },
16 "debugging": { 16 "debugging": {
17 - // "stacktrace": false /* Disable stacktrace compilation. Value: [ true | false ]. Default: false */  
18 - },  
19 - "nodeOptions": {  
20 - // "maxOldSpaceSize": 4096 /* Enable nodeOptions maxOldSpaceSize compilation. Unit M. Used for the daemon process */ 17 + // "stacktrace": false /* Disable stacktrace compilation. Default: false */
21 } 18 }
22 } 19 }
This diff could not be displayed because it is too large.
1 { 1 {
2 - "meta": {  
3 - "stableOrder": true  
4 - },  
5 - "lockfileVersion": 3, 2 + "lockfileVersion": 1,
6 "ATTENTION": "THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.", 3 "ATTENTION": "THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.",
7 "specifiers": { 4 "specifiers": {
8 "@ohos/hypium@1.0.16": "@ohos/hypium@1.0.16" 5 "@ohos/hypium@1.0.16": "@ohos/hypium@1.0.16"
9 }, 6 },
10 "packages": { 7 "packages": {
11 "@ohos/hypium@1.0.16": { 8 "@ohos/hypium@1.0.16": {
12 - "name": "@ohos/hypium",  
13 - "integrity": "sha512-PC3jpwKERg68V+4dmKU+SLjNps9i5JcQH57rQriaTsh62NBgVZs4SceMmNOtrIOyldbEJ5mXSwoZwiG/nkRmTw==",  
14 "resolved": "https://repo.harmonyos.com/ohpm/@ohos/hypium/-/hypium-1.0.16.har", 9 "resolved": "https://repo.harmonyos.com/ohpm/@ohos/hypium/-/hypium-1.0.16.har",
15 - "registryType": "ohpm" 10 + "integrity": "sha512-PC3jpwKERg68V+4dmKU+SLjNps9i5JcQH57rQriaTsh62NBgVZs4SceMmNOtrIOyldbEJ5mXSwoZwiG/nkRmTw=="
16 } 11 }
17 } 12 }
18 } 13 }
1 { 1 {
2 - "meta": {  
3 - "stableOrder": true  
4 - },  
5 - "lockfileVersion": 3, 2 + "lockfileVersion": 1,
6 "ATTENTION": "THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.", 3 "ATTENTION": "THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.",
7 - "specifiers": {  
8 - "@ohos/axios@^2.1.1": "@ohos/axios@2.1.1",  
9 - "wdBean@../../../../features/wdBean": "wdBean@../../features/wdBean",  
10 - "wdBean@../../features/wdBean": "wdBean@../../features/wdBean",  
11 - "wdComponent@../../../../features/wdComponent": "wdComponent@../../features/wdComponent",  
12 - "wdComponent@../../features/wdComponent": "wdComponent@../../features/wdComponent",  
13 - "wdConstant@../../../../commons/wdConstant": "wdConstant@../../commons/wdConstant",  
14 - "wdConstant@../../commons/wdConstant": "wdConstant@../../commons/wdConstant",  
15 - "wdJsBridge@../../../wdJsBridge": "wdJsBridge@../../commons/wdJsBridge",  
16 - "wdKit@../../../../commons/wdKit": "wdKit@../../commons/wdKit",  
17 - "wdKit@../../commons/wdKit": "wdKit@../../commons/wdKit",  
18 - "wdNetwork@../../../../commons/wdNetwork": "wdNetwork@../../commons/wdNetwork",  
19 - "wdNetwork@../../commons/wdNetwork": "wdNetwork@../../commons/wdNetwork",  
20 - "wdRouter@../../../../commons/wdRouter": "wdRouter@../../commons/wdRouter",  
21 - "wdRouter@../../commons/wdRouter": "wdRouter@../../commons/wdRouter",  
22 - "wdWebComponent@../../../../commons/wdWebComponent": "wdWebComponent@../../commons/wdWebComponent",  
23 - "wdWebComponent@../../commons/wdWebComponent": "wdWebComponent@../../commons/wdWebComponent"  
24 - },  
25 - "packages": {  
26 - "@ohos/axios@2.1.1": {  
27 - "name": "@ohos/axios",  
28 - "integrity": "sha512-EQax257+eKKT0Rx7h6N6xvmKbDRWDjCCWOP2vyyktySFwvjtypXuXmQKEvRjmAalR6cqf8mbfhWmpg0bD9OQ3w==",  
29 - "resolved": "https://repo.harmonyos.com/ohpm/@ohos/axios/-/axios-2.1.1.har",  
30 - "registryType": "ohpm"  
31 - },  
32 - "wdBean@../../features/wdBean": {  
33 - "name": "wdbean",  
34 - "resolved": "../../features/wdBean",  
35 - "registryType": "local"  
36 - },  
37 - "wdComponent@../../features/wdComponent": {  
38 - "name": "wdcomponent",  
39 - "resolved": "../../features/wdComponent",  
40 - "registryType": "local",  
41 - "dependencies": {  
42 - "wdConstant": "file:../../commons/wdConstant",  
43 - "wdKit": "file:../../commons/wdKit",  
44 - "wdWebComponent": "file:../../commons/wdWebComponent",  
45 - "wdBean": "file:../../features/wdBean",  
46 - "wdRouter": "file:../../commons/wdRouter",  
47 - "wdNetwork": "file:../../commons/wdNetwork"  
48 - }  
49 - },  
50 - "wdConstant@../../commons/wdConstant": {  
51 - "name": "wdconstant",  
52 - "resolved": "../../commons/wdConstant",  
53 - "registryType": "local"  
54 - },  
55 - "wdJsBridge@../../commons/wdJsBridge": {  
56 - "name": "wdjsbridge",  
57 - "resolved": "../../commons/wdJsBridge",  
58 - "registryType": "local"  
59 - },  
60 - "wdKit@../../commons/wdKit": {  
61 - "name": "wdkit",  
62 - "resolved": "../../commons/wdKit",  
63 - "registryType": "local"  
64 - },  
65 - "wdNetwork@../../commons/wdNetwork": {  
66 - "name": "wdnetwork",  
67 - "resolved": "../../commons/wdNetwork",  
68 - "registryType": "local",  
69 - "dependencies": {  
70 - "wdConstant": "file:../wdConstant",  
71 - "wdKit": "file:../wdKit",  
72 - "@ohos/axios": "^2.1.1"  
73 - }  
74 - },  
75 - "wdRouter@../../commons/wdRouter": {  
76 - "name": "wdrouter",  
77 - "resolved": "../../commons/wdRouter",  
78 - "registryType": "local",  
79 - "dependencies": {  
80 - "wdKit": "file:../wdKit",  
81 - "wdBean": "file:../../features/wdBean"  
82 - }  
83 - },  
84 - "wdWebComponent@../../commons/wdWebComponent": {  
85 - "name": "wdwebcomponent",  
86 - "resolved": "../../commons/wdWebComponent",  
87 - "registryType": "local",  
88 - "dependencies": {  
89 - "wdConstant": "file:../wdConstant",  
90 - "wdKit": "file:../wdKit",  
91 - "wdJsBridge": "file:../wdJsBridge",  
92 - "wdBean": "file:../../features/wdBean",  
93 - "wdRouter": "file:../wdRouter"  
94 - }  
95 - }  
96 - } 4 + "specifiers": {},
  5 + "packages": {}
97 } 6 }
  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 +}