wangliang_wd

desc:解决冲突

Showing 78 changed files with 3242 additions and 675 deletions

Too many changes to show.

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

1 -import { AboutPageUI} from 'wdComponent'; 1 +import { PrivacySettingComponents} from 'wdComponent';
2 2
3 @Entry 3 @Entry
4 @Component 4 @Component
5 struct PrivacySettingPage { 5 struct PrivacySettingPage {
6 build() { 6 build() {
7 Column(){ 7 Column(){
8 - AboutPageUI() 8 + PrivacySettingComponents()
9 } 9 }
10 } 10 }
11 } 11 }
1 import ArrayList from '@ohos.util.ArrayList' 1 import ArrayList from '@ohos.util.ArrayList'
2 import { MineSettingComponent } from 'wdComponent'; 2 import { MineSettingComponent } from 'wdComponent';
  3 +import { AccountAndSecurityLayout } from 'wdComponent';
  4 +import router from '@ohos.router';
3 5
4 @Entry 6 @Entry
5 @Component 7 @Component
6 struct SettingPage { 8 struct SettingPage {
7 @State message: string = 'Hello World 02' 9 @State message: string = 'Hello World 02'
  10 + @State pageType: string = '';
  11 +
  12 + onPageShow() {
  13 + const params = router.getParams(); // 获取传递过来的参数对象
  14 + this.pageType = 'mainSetting';// 获取info属性的值
  15 + }
8 16
9 build() { 17 build() {
10 Column() { 18 Column() {
11 - MineSettingComponent() 19 + if (this.pageType == 'mainSetting') {
  20 + MineSettingComponent()
  21 + } else {
  22 + AccountAndSecurityLayout()
  23 + }
12 }.setFullWidth() 24 }.setFullWidth()
13 } 25 }
14 26
  1 +import { SettingPasswordLayout } from 'wdComponent';
  2 +
  3 +@Entry
  4 +@Component
  5 +struct SettingPasswordPage {
  6 + @State message: string = 'Hello World'
  7 +
  8 + build() {
  9 + Row() {
  10 + Column() {
  11 + SettingPasswordLayout()
  12 + }
  13 + .width('100%')
  14 + }
  15 + .height('100%')
  16 + }
  17 +}
@@ -32,6 +32,58 @@ @@ -32,6 +32,58 @@
32 } 32 }
33 ] 33 ]
34 } 34 }
  35 + ],
  36 + "requestPermissions": [
  37 + {
  38 + "name": "ohos.permission.CAMERA",
  39 + "reason": "$string:EntryAbility_desc",
  40 + "usedScene": {
  41 + "abilities": [
  42 + "FormAbility"
  43 + ],
  44 + "when": "inuse"
  45 + }
  46 + },
  47 + {
  48 + "name": "ohos.permission.READ_MEDIA",
  49 + "reason": "$string:EntryAbility_desc",
  50 + "usedScene": {
  51 + "abilities": [
  52 + "FormAbility"
  53 + ],
  54 + "when": "inuse"
  55 + }
  56 + },
  57 + {
  58 + "name": "ohos.permission.WRITE_MEDIA",
  59 + "reason": "$string:EntryAbility_desc",
  60 + "usedScene": {
  61 + "abilities": [
  62 + "FormAbility"
  63 + ],
  64 + "when": "inuse"
  65 + }
  66 + },
  67 + {
  68 + "name": "ohos.permission.LOCATION",
  69 + "reason": "$string:EntryAbility_desc",
  70 + "usedScene": {
  71 + "abilities": [
  72 + "FormAbility"
  73 + ],
  74 + "when": "inuse"
  75 + }
  76 + },
  77 + {
  78 + "name": "ohos.permission.MICROPHONE",
  79 + "reason": "$string:EntryAbility_desc",
  80 + "usedScene": {
  81 + "abilities": [
  82 + "FormAbility"
  83 + ],
  84 + "when": "inuse"
  85 + }
  86 + }
35 ] 87 ]
36 } 88 }
37 } 89 }
@@ -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/FollowListPage" 12 "pages/FollowListPage"
12 ] 13 ]
13 } 14 }
@@ -32,6 +32,12 @@ export { MineSettingComponent } from "./components/page/MineSettingComponent" @@ -32,6 +32,12 @@ export { MineSettingComponent } from "./components/page/MineSettingComponent"
32 32
33 export { AboutPageUI } from "./components/page/about/AboutPageUI" 33 export { AboutPageUI } from "./components/page/about/AboutPageUI"
34 34
  35 +export { PrivacySettingComponents } from "./components/page/PrivacySettingComponents"
  36 +
35 export { AppointmentListUI } from "./components/page/mine/AppointmentListUI" 37 export { AppointmentListUI } from "./components/page/mine/AppointmentListUI"
36 38
37 -export { FollowFirstTabsComponent } from "./components/page/mine/follow/FollowFirstTabsComponent"  
  39 +export { AccountAndSecurityLayout } from "./components/page/AccountAndSecurityLayout"
  40 +
  41 +export { SettingPasswordLayout } from "./components/page/SettingPasswordLayout"
  42 +
  43 +export { FollowFirstTabsComponent } from "./components/page/mine/follow/FollowFirstTabsComponent"
  1 +// @ts-nocheck
  2 +import { BottomNavi, CommonConstants } from 'wdConstant';
  3 +import { Logger } from 'wdKit';
  4 +import { TopNavigationComponent } from './TopNavigationComponent';
  5 +import { BottomNavDTO } from '../../repository/bean/BottomNavDTO';
  6 +import { UIUtils } from '../../repository/UIUtils';
  7 +import { MinePageComponent } from './MinePageComponent';
  8 +import PageViewModel from '../../viewmodel/PageViewModel';
  9 +import MineSettingDatasModel from '../../model/MineSettingDatasModel';
  10 +import { MineMainSettingFunctionItem } from '../viewmodel/MineMainSettingFunctionItem'
  11 +
  12 +import storageStatistics from "@ohos.file.storageStatistics";
  13 +import { BusinessError } from '@ohos.base';
  14 +import ArrayList from '@ohos.util.ArrayList';
  15 +
  16 +
  17 +@Component
  18 +export struct AccountAndSecurityLayout {
  19 + @State listData: ArrayList<any> = new ArrayList();
  20 + @State privacySwitch: boolean = false
  21 + @State cacheSice: number = 0
  22 +
  23 + aboutToAppear() {
  24 + // 获取设置页面数据
  25 + this.getAccountAndSecurityData()
  26 + }
  27 +
  28 + getAccountAndSecurityData() {
  29 + this.listData = MineSettingDatasModel.getAccountAndSecuritySettingData()
  30 + }
  31 +
  32 + build() {
  33 + Navigation() {
  34 + //滑动区域
  35 + this.settingList()
  36 + }.titleMode(NavigationTitleMode.Mini)
  37 + .title('账号与安全')
  38 + }
  39 +
  40 + // 页面布局
  41 + @Builder settingList() {
  42 + Stack({ alignContent: Alignment.Bottom }) {
  43 + Column() {
  44 + List() {
  45 + ForEach(this.listData, (item: MineMainSettingFunctionItem, index: number) => {
  46 + ListItem() {
  47 + if (item.type == 0) {
  48 + Column() {
  49 + this.getArrowCell(item)
  50 + }.padding({ left: '27lpx' }).height('117lpx').justifyContent(FlexAlign.Center)
  51 + } else if (item.type == 1) {
  52 + Column() {
  53 + this.getSwitchCell(item)
  54 + }.padding({ left: '27lpx' }).height('117lpx').justifyContent(FlexAlign.Center)
  55 + } else {
  56 + Column().width('100%').height('15lpx').backgroundColor(0xf0f0f0)
  57 + }
  58 + }
  59 + .onClick(() => {
  60 + console.log(index + "")
  61 + RouteManager.jumpNewPage("pages/SettingPasswordPage") // 调用跳转方法,跳转新页面
  62 + })
  63 +
  64 + }, item => item)
  65 + }
  66 + .divider({
  67 + strokeWidth: 1,
  68 + startMargin: 15,
  69 + endMargin: 10,
  70 + color: '#f0f0f0'
  71 + })
  72 + .onScrollFrameBegin((offset, state) => {
  73 + return { offsetRemain: 0 }
  74 + })
  75 + }.height("100%")
  76 +
  77 + Column() {
  78 + Button('退出登录',{ stateEffect: true }).width('90%').height('80lpx').backgroundColor('#da3e22').fontColor('#fff').margin('20lpx').onClick(()=>{
  79 + AlertDialog.show({
  80 + title: '🥟id : ' + "button",
  81 + message: '标题:' + '退出登录',
  82 + confirm: {
  83 + value: "OK",
  84 + action: () => {
  85 +
  86 + },
  87 + }
  88 + })
  89 + })
  90 + }
  91 +
  92 + }
  93 + }
  94 +
  95 + @Builder itemHead(text: string) {
  96 + // 列表分组的头部组件,对应联系人分组A、B等位置的组件
  97 + if (text.length > 0) {
  98 + Row().width('100%').height('20lpx').backgroundColor(0xf0f0f0)
  99 + }
  100 + }
  101 +
  102 + // 右侧开关cell
  103 + @Builder getSwitchCell(item: MineMainSettingFunctionItem) {
  104 + Column() {
  105 + Row() {
  106 + // 左侧logo和标题
  107 + Row() {
  108 + // 判断有没有图片
  109 + if (item.imgSrc) {
  110 + Image(item.imgSrc).height('38lpx').margin({ right: '5lpx' })
  111 + Text(`${item.title}`).margin({ top: '8lpx' }).height('38lpx').fontColor('#333333').fontSize('29lpx')
  112 + } else {
  113 + Text(`${item.title}`).margin({ top: '8lpx' }).height('38lpx').fontColor('#333333').fontSize('29lpx')
  114 + }
  115 + }.width('60%')
  116 +
  117 + // 右侧文案和右箭头
  118 + Row() {
  119 + Toggle({ type: ToggleType.Switch, isOn: item.switchState })
  120 + .height('50lpx')
  121 + .margin({ left: '81lpx', right: '29lpx' })
  122 + .selectedColor(Color.Pink)
  123 + .onChange((isOn: boolean) => {
  124 + this.privacySwitch = isOn;
  125 + })
  126 + }.width('40%')
  127 + .margin({ right: '29lpx' })
  128 + .justifyContent(FlexAlign.End)
  129 +
  130 + }
  131 + .alignItems(VerticalAlign.Center)
  132 + .justifyContent(FlexAlign.SpaceBetween)
  133 + }.height('54lpx')
  134 + }
  135 +
  136 + // 右文字+箭头cell
  137 + @Builder getArrowCell(item: MineMainSettingFunctionItem) {
  138 + Column() {
  139 + Row() {
  140 + // 左侧logo和标题
  141 + Row() {
  142 + // 判断有没有图片
  143 + if (item.imgSrc) {
  144 + Image(item.imgSrc)
  145 + .height('38lpx')
  146 + .margin({ right: '5lpx' })
  147 + }
  148 + Text(`${item.title}`)
  149 + .margin({ top: '8lpx' })
  150 + .height('38lpx')
  151 + .fontColor('#333333')
  152 + .fontSize('29lpx')
  153 + }.width('60%')
  154 +
  155 + // 右侧文案和右箭头
  156 + Row() {
  157 + Text(item.subTitle ? item.subTitle : '')
  158 + .fontColor('#999999')
  159 + .maxLines(1)
  160 + Image($r('app.media.mine_user_arrow'))
  161 + .width('27lpx')
  162 + .height('27lpx')
  163 + .objectFit(ImageFit.Auto)
  164 + Column().width('29lpx')
  165 + }.width('40%')
  166 + .margin({ right: '29lpx' })
  167 + .justifyContent(FlexAlign.End)
  168 +
  169 + }
  170 + .alignItems(VerticalAlign.Center)
  171 + .justifyContent(FlexAlign.SpaceBetween)
  172 +
  173 + }
  174 + .height('54lpx')
  175 + }
  176 +}
@@ -6,16 +6,18 @@ import { BottomNavDTO } from '../../repository/bean/BottomNavDTO'; @@ -6,16 +6,18 @@ import { BottomNavDTO } from '../../repository/bean/BottomNavDTO';
6 import { UIUtils } from '../../repository/UIUtils'; 6 import { UIUtils } from '../../repository/UIUtils';
7 import { MinePageComponent } from './MinePageComponent'; 7 import { MinePageComponent } from './MinePageComponent';
8 import PageViewModel from '../../viewmodel/PageViewModel'; 8 import PageViewModel from '../../viewmodel/PageViewModel';
  9 +import RouteManager from '../../utils/RouteManager'
9 10
10 import storageStatistics from "@ohos.file.storageStatistics"; 11 import storageStatistics from "@ohos.file.storageStatistics";
11 import { BusinessError } from '@ohos.base'; 12 import { BusinessError } from '@ohos.base';
  13 +import RouteManager from '../../utils/RouteManager'
12 14
13 15
14 @Component 16 @Component
15 export struct MineSettingComponent { 17 export struct MineSettingComponent {
16 @State listData: Array<string | Array<string>> = new Array(); 18 @State listData: Array<string | Array<string>> = new Array();
17 - @State privacySwitch:boolean = false  
18 - @State cacheSice:number = 0 19 + @State privacySwitch: boolean = false
  20 + @State cacheSice: number = 0
19 21
20 aboutToAppear() { 22 aboutToAppear() {
21 // 获取设置页面数据 23 // 获取设置页面数据
@@ -26,7 +28,7 @@ export struct MineSettingComponent { @@ -26,7 +28,7 @@ export struct MineSettingComponent {
26 if (err) { 28 if (err) {
27 console.error(`Invoke getCurrentBundleStats failed, code is ${err.code}, message is ${err.message}`); 29 console.error(`Invoke getCurrentBundleStats failed, code is ${err.code}, message is ${err.message}`);
28 } else { 30 } else {
29 - this.cacheSice = bundleStats.appSize / 1024.00 / 1024.00.toFixed(2); 31 + this.cacheSice = bundleStats.appSize / 1024.00 / 1024.00.toFixed(2);
30 } 32 }
31 }); 33 });
32 } 34 }
@@ -64,10 +66,20 @@ export struct MineSettingComponent { @@ -64,10 +66,20 @@ export struct MineSettingComponent {
64 66
65 }.padding({ left: '27lpx' }) 67 }.padding({ left: '27lpx' })
66 .onClick(() => { 68 .onClick(() => {
  69 +
  70 + // 在Home页面中
  71 + let paramsInfo: object = {
  72 + pageId: 123,
  73 + pageType:'AccountAndSecurityLayout'
  74 + };
  75 + RouteManager.jumpNewPage("pages/SettingPasswordPage") // 调用跳转方法,跳转新页面
  76 +
67 console.log(subIndex + "") 77 console.log(subIndex + "")
68 - if (subIndex == 4) { 78 + if (subIndex == 2) {
69 // RouteManager.jumpNewPage("pages/SettingPage") // 调用跳转方法,跳转新页面 79 // RouteManager.jumpNewPage("pages/SettingPage") // 调用跳转方法,跳转新页面
  80 + RouteManager.jumpNewPage("pages/PrivacySettingPage")
70 } 81 }
  82 +
71 }) 83 })
72 .height('117lpx') 84 .height('117lpx')
73 }, subItem => subItem) 85 }, subItem => subItem)
  1 +import dataPreferences from '@ohos.data.preferences';
  2 +import { PermissionUtil } from 'wdKit'
  3 +import { SPHelper } from 'wdKit'
  4 +import hilog from '@ohos.hilog';
  5 +import {PrivacySettingModel} from '../../viewmodel/PrivacySettingModel'
  6 +
  7 +const TAG = 'PrivacySettingComponents';
  8 +
  9 +@Component
  10 +export struct PrivacySettingComponents {
  11 + @State listData: Array<PrivacySettingModel> = [new PrivacySettingModel('开启个性推荐', false, null), new PrivacySettingModel('相册权限', false, 'ohos.permission.READ_MEDIA'), new PrivacySettingModel('相机权限', false, 'ohos.permission.CAMERA'), new PrivacySettingModel('定位权限', false, 'ohos.permission.LOCATION'), new PrivacySettingModel('麦克风权限', false, 'ohos.permission.MICROPHONE')];
  12 + @State tips: string = '设置前可查阅'
  13 + @State privacyTips: string = '《隐私政策》'
  14 +
  15 + aboutToAppear() {
  16 + // 获取权限=
  17 + // SPHelper.default.save('sdf','sdf');
  18 + // this.initListData();
  19 + this.getPermissionStatus();
  20 + RefreshStatus;
  21 +
  22 + }
  23 +
  24 + // initListData(){
  25 + // let model1 = new PrivacySettingModel('开启个性推荐', false, null);
  26 + // let model2 = new PrivacySettingModel('相册权限', false, 'ohos.permission.READ_MEDIA');
  27 + // let model3 = new PrivacySettingModel('相机权限', false, 'ohos.permission.CAMERA');
  28 + // let model4 = new PrivacySettingModel('定位权限', false, 'ohos.permission.LOCATION');
  29 + // let model5 = new PrivacySettingModel('麦克风权限', false, 'ohos.permission.MICROPHONE');
  30 + //
  31 + // this.listData.push(model1, model2, model3, model4, model5);
  32 + // }
  33 +
  34 + async getPermissionStatus(){
  35 + const permissionUtil = new PermissionUtil();
  36 + for (const element of this.listData) {
  37 + if (!element.permissionKey) {
  38 + continue;
  39 + }
  40 + const result = await permissionUtil.checkPermissions(element.permissionKey);
  41 + element.permission = result;
  42 + }
  43 + }
  44 +
  45 + build() {
  46 + Navigation() {
  47 + //滑动区域
  48 + this.PrivacySettingComponentsUI()
  49 +
  50 + }.titleMode(NavigationTitleMode.Mini)
  51 + .title('隐私设置')
  52 + .backgroundColor('#F8F8F8')
  53 + }
  54 +
  55 + @Builder PrivacySettingComponentsUI() {
  56 + Column() {
  57 +
  58 + List({space:'23lpx'}){
  59 + ForEach(this.listData, (item:PrivacySettingModel, index) =>{
  60 + ListItem() {
  61 + if (index == 0) {
  62 + getTuiJianCell({item, index});
  63 + }else{
  64 + getArrowCell({item, index});
  65 + }
  66 + }.onClick(()=>{
  67 + if (index != 0) {
  68 + if (!item.permission){
  69 + //跳转权限设置
  70 + const permissionUtil = new PermissionUtil();
  71 + PermissionUtil.reqPermissionsFromUser([item.permissionKey]);
  72 + }
  73 + }
  74 + })
  75 + }, item => item)
  76 + }
  77 + .padding({left:'29lpx', right:'29lpx'})
  78 + .margin({top:'38lpx'})
  79 +
  80 + Row(){
  81 + Text(this.tips)
  82 + .fontSize('25lpx')
  83 + .textAlign(TextAlign.Start)
  84 + .fontColor($r("app.color.color_666666"))
  85 + .margin({left:'29lpx', top:'46lpx'})
  86 + // .backgroundColor(Color.Orange)
  87 + Text(this.privacyTips)
  88 + .fontSize('25lpx')
  89 + .textAlign(TextAlign.Start)
  90 + .fontColor('#ED2800')
  91 + .margin({top:'46lpx'})
  92 + .onClick(()=>{
  93 + //跳转隐私政策
  94 + })
  95 + }
  96 +
  97 +
  98 + }
  99 + .width('100%')
  100 + .height('100%')
  101 + .backgroundColor('#F8F8F8')
  102 + .alignItems(HorizontalAlign.Start)
  103 + }
  104 +}
  105 +
  106 +
  107 +@Component
  108 +struct getArrowCell {
  109 + @ObjectLink item: PrivacySettingModel;
  110 + index;
  111 + // 右文字+箭头cell
  112 + // @Builder getArrowCell(item:PrivacySettingModel, index) {
  113 + build() {
  114 + Row() {
  115 + // 左侧标题
  116 + Text(this.item.privacyName)
  117 + .fontColor('#666666')
  118 + .fontSize('31lpx')
  119 +
  120 + Row() {
  121 + Text(this.item.permission ? '已开启' : '去设置')
  122 + .fontColor(this.item.permission ? '#666666' : '#CCCCCC')
  123 + .fontSize('31lpx')
  124 + .margin({ right: '8lpx' })
  125 +
  126 + Image($r('app.media.mine_user_arrow'))
  127 + .width('27lpx')
  128 + .height('27lpx')
  129 + .objectFit(ImageFit.Auto)
  130 + }
  131 +
  132 + }
  133 + .alignItems(VerticalAlign.Center)
  134 + .justifyContent(FlexAlign.SpaceBetween)
  135 + .height('97lpx')
  136 + .width('100%')
  137 + .padding({ left: '29lpx', right: '29lpx' })
  138 + .backgroundColor('#FFFFFF')
  139 + .borderRadius('8lpx')
  140 + }
  141 +}
  142 +
  143 +@Component
  144 +struct getTuiJianCell{
  145 + @ObjectLink item :PrivacySettingModel;
  146 + index;
  147 + build() {
  148 + //@Builder getTuiJianCell(item:PrivacySettingModel, index)
  149 + Column() {
  150 +
  151 + Row() {
  152 + // 左侧标题
  153 + Text(this.item.privacyName)
  154 + .fontColor('#666666')
  155 + .fontSize('31lpx')
  156 +
  157 + Row() {
  158 + Toggle({ type: ToggleType.Switch, isOn: this.item.permission })
  159 + .height('58lpx')
  160 + .width('96lpx')
  161 + // .selectedColor(Color.Pink)
  162 + .onChange((isOn: boolean) => {
  163 + // this.privacySwitch = isOn;
  164 + })
  165 + }
  166 +
  167 + }
  168 + .alignItems(VerticalAlign.Center)
  169 + .justifyContent(FlexAlign.SpaceBetween)
  170 + .height('97lpx')
  171 + .width('100%')
  172 +
  173 +
  174 + Blank()
  175 + .backgroundColor('#EDEDED')
  176 + .height('1lpx')
  177 +
  178 + Text('关闭后,将无法看到个性化推荐的服务')
  179 + .fontColor('#999999')
  180 + .fontSize('23lpx')
  181 + .margin({ right: '8lpx' })
  182 + .height('69lpx')
  183 +
  184 + }
  185 + .alignItems(HorizontalAlign.Start)
  186 + .backgroundColor('#FFFFFF')
  187 + .borderRadius('8lpx')
  188 + .padding({ left: '29lpx', right: '29lpx' })
  189 + }
  190 +}
  1 +import ArrayList from '@ohos.util.ArrayList';
  2 +import promptAction from '@ohos.promptAction';
  3 +
  4 +export default class AccoutPageDataModel {
  5 + // 页面数据
  6 + compType: number // 0:标题 / 1:密码输入框 / 2:验证码输入框 / 3:desc描述 / 4:按钮 / 5:logo / 6:子标题 7:手机号输入框 7:空白
  7 + compLogo: string
  8 + compTitle: string
  9 + compSubTitle: string
  10 + compDesc: string
  11 + compButtonTitle: string
  12 + inputPlacholder: string
  13 + inputTag: number
  14 +
  15 + constructor(compType: number, compTitle: string, compLogo: string, compDesc: string, compButtonTitle: string, inputPlacholder: string, inputTag: number) {
  16 + this.compType = compType
  17 + this.compTitle = compTitle
  18 + this.compLogo = compLogo
  19 + this.compDesc = compDesc
  20 + this.compButtonTitle = compButtonTitle
  21 + this.inputPlacholder = inputPlacholder
  22 + this.inputTag = inputTag
  23 + }
  24 +}
  25 +
  26 +@Component
  27 +export struct SettingPasswordLayout {
  28 + @State listData: Array<AccoutPageDataModel> = new Array(); // 页面配置数据
  29 + @State btnStatus: boolean = false
  30 + password01: string
  31 + password02: string
  32 + passwordOri: string
  33 +
  34 + aboutToAppear() {
  35 + this.getPageListData(4)
  36 + }
  37 +
  38 + getPageListData(pageId:number) {
  39 + switch (pageId) {
  40 + case 0:
  41 + // 验证/更换手机号
  42 + this.listData.push(new AccoutPageDataModel(0, '更换手机号', null, null, null, null, null))
  43 + this.listData.push(new AccoutPageDataModel(7, null, null, null, null, '请输入手机号', 10010))
  44 + this.listData.push(new AccoutPageDataModel(2, null, null, null, null, '验证码', 10088))
  45 + this.listData.push(new AccoutPageDataModel(4, null, null, null, '确认', null, null))
  46 + break;
  47 +
  48 + case 1:
  49 + // 设置密码
  50 + this.listData.push(new AccoutPageDataModel(0, '设置密码', null, null, null, null, null))
  51 + this.listData.push(new AccoutPageDataModel(1, null, null, null, null, '请输入密码', 10086))
  52 + this.listData.push(new AccoutPageDataModel(1, null, null, null, null, '再次输入密码', 10087))
  53 + this.listData.push(new AccoutPageDataModel(4, null, null, '提示:密码长度6-20位,需答谢字母、小写字母、数字、特殊字符中组合三种及三种以上组成', null, null, null))
  54 + this.listData.push(new AccoutPageDataModel(5, null, null, null, '确认', null, null))
  55 + break;
  56 +
  57 + case 2:
  58 + // 修改密码
  59 + this.listData.push(new AccoutPageDataModel(0, '修改密码', null, null, null, null, null))
  60 + this.listData.push(new AccoutPageDataModel(1, null, null, null, null, '请输入原密码', 10010))
  61 + this.listData.push(new AccoutPageDataModel(1, null, null, null, null, '请输入新密码', 10086))
  62 + this.listData.push(new AccoutPageDataModel(1, null, null, null, null, '请再请输入原密码', 10087))
  63 + this.listData.push(new AccoutPageDataModel(3, null, null, '提示:密码长度6-20位,需答谢字母、小写字母、数字、特殊字符中组合三种及三种以上组成', null, null, null))
  64 + this.listData.push(new AccoutPageDataModel(4, null, null, null, '确认', null, null))
  65 + this.listData.push(new AccoutPageDataModel(3, null, null, '忘记密码', null, null, null))
  66 + break;
  67 +
  68 + case 3:
  69 + // 绑定手机号
  70 + this.listData.push(new AccoutPageDataModel(0, '绑定手机号', null, null, null, null, null))
  71 + this.listData.push(new AccoutPageDataModel(7, null, null, null, null, '请输入手机号', 10010))
  72 + this.listData.push(new AccoutPageDataModel(2, null, null, null, null, '验证码', 10088))
  73 + this.listData.push(new AccoutPageDataModel(4, null, null, null, '确认', null, null))
  74 + break;
  75 +
  76 + case 4:
  77 + // 有logo的
  78 + this.listData.push(new AccoutPageDataModel(5, null, 'https://img-blog.csdnimg.cn/24f43f4d626d428891ebb2adb5c2c2e9.png?x-oss-process=image/watermark,type_ZHJvaWRzYW5zZmFsbGJhY2s,shadow_50,text_Q1NETiBA5YyX5aSn5Z-55paH5byg6ICB5biI,size_20,color_FFFFFF,t_70,g_se,x_16', null, null, null , null))
  79 + this.listData.push(new AccoutPageDataModel(0, '修改密码', null, null, null, null, null))
  80 + this.listData.push(new AccoutPageDataModel(1, null, null, null, null, '请输入原密码', 10010))
  81 + this.listData.push(new AccoutPageDataModel(1, null, null, null, null, '请输入新密码', 10086))
  82 + this.listData.push(new AccoutPageDataModel(1, null, null, null, null, '请再请输入原密码', 10087))
  83 + this.listData.push(new AccoutPageDataModel(2, null, null, null, null, '验证码', 10088))
  84 + this.listData.push(new AccoutPageDataModel(3, null, null, '提示:密码长度6-20位,需答谢字母、小写字母、数字、特殊字符中组合三种及三种以上组成', null, null, null))
  85 + this.listData.push(new AccoutPageDataModel(4, null, null, null, '确认', null, null))
  86 + this.listData.push(new AccoutPageDataModel(3, null, null, '忘记密码', null, null, null))
  87 + break;
  88 +
  89 + default:
  90 + break;
  91 + }
  92 + }
  93 +
  94 + build() {
  95 + Navigation() {
  96 + this.settingList() //滑动区域
  97 + }.titleMode(NavigationTitleMode.Mini)
  98 + .title('')
  99 + }
  100 +
  101 + // 页面布局
  102 + @Builder settingList() {
  103 + Column() {
  104 + List() {
  105 + ForEach(this.listData, (item: AccoutPageDataModel, index: number) => {
  106 + ListItem() {
  107 + if (item.compType == 0) {
  108 + this.getTitleCell(item, HorizontalAlign.Start)
  109 + } else if (item.compType == 1) {
  110 + this.getPasswordCell(item)
  111 + } else if (item.compType == 2) {
  112 + this.getCodeCell(item)
  113 + } else if (item.compType == 3) {
  114 + if (index == this.listData.length - 1) {
  115 + this.getDescCell(item, HorizontalAlign.Center)
  116 + } else {
  117 + this.getDescCell(item, HorizontalAlign.Start)
  118 + }
  119 + } else if (item.compType == 4) {
  120 + this.getButtonCell(item)
  121 + } else if (item.compType == 5) {
  122 + this.getLogoCell(item)
  123 + } else if (item.compType == 7) {
  124 + this.getPhoneCell(item)
  125 + } else {
  126 + Text('' + item.compType)
  127 + }
  128 + }
  129 + })
  130 + }
  131 + // .divider({
  132 + // strokeWidth: 1,
  133 + // startMargin: 15,
  134 + // endMargin: 10,
  135 + // color: '#f0f0f0'
  136 + // })
  137 + }.width('100%').padding('30lpx')
  138 + }
  139 +
  140 + /***************************** UI元素 ******************************************/
  141 +
  142 + // 标题
  143 + @Builder getTitleCell(item: AccoutPageDataModel, alignTitle: HorizontalAlign) {
  144 + Column() {
  145 + Text(item.compTitle).fontWeight(FontWeight.Bold).fontSize(20).maxLines(1)
  146 + }
  147 + .width('100%')
  148 + .height('75lpx')
  149 + .alignItems(alignTitle)
  150 + }
  151 +
  152 + // 密码输入框
  153 + @Builder getPasswordCell(item: AccoutPageDataModel) {
  154 + Row() {
  155 + Row() {
  156 + TextInput({ placeholder: item.inputPlacholder })
  157 + .type(InputType.Password)
  158 + .backgroundColor('#00000000')
  159 + .onChange((value: string) => {
  160 + this.inputTextChange(value, item.inputTag)
  161 + })
  162 + .onSubmit((EnterKeyType) => {
  163 + promptAction.showToast({ message: 'submit' })
  164 + })
  165 + }
  166 + .alignItems(VerticalAlign.Center)
  167 + .height('80lpx')
  168 + .backgroundColor('#f5f5f5')
  169 + .borderRadius('4vp')
  170 + }
  171 + .width('100%')
  172 + .height('110lpx')
  173 + .backgroundColor(0xffffff0)
  174 + .alignItems(VerticalAlign.Center)
  175 + }
  176 +
  177 + // 手机号输入框
  178 + @Builder getPhoneCell(item: AccoutPageDataModel) {
  179 + Row() {
  180 + Row() {
  181 + TextInput({ placeholder: item.inputPlacholder })
  182 + .backgroundColor('#00000000')
  183 + .onChange((value: string) => {
  184 + this.inputTextChange(value, item.inputTag)
  185 + })
  186 + .onSubmit((EnterKeyType) => {
  187 + promptAction.showToast({ message: 'submit' })
  188 + })
  189 + }
  190 + .alignItems(VerticalAlign.Center)
  191 + .height('80lpx')
  192 + .backgroundColor('#f5f5f5')
  193 + .borderRadius('4vp')
  194 + }
  195 + .width('100%')
  196 + .height('110lpx')
  197 + .backgroundColor(0xffffff0)
  198 + .alignItems(VerticalAlign.Center)
  199 + }
  200 +
  201 + // 验证码码输入框
  202 + @Builder getCodeCell(item: AccoutPageDataModel) {
  203 + Row() {
  204 + Stack() {
  205 + Image($r('app.media.get_code_bg')).width('100%').borderRadius('4vp')
  206 + Row() {
  207 + TextInput({ placeholder: item.inputPlacholder })
  208 + .backgroundColor('#00000000')
  209 + .width('67.28%')
  210 + .onChange((value: string) => {
  211 + this.inputTextChange(value, item.inputTag)
  212 + })
  213 + Button('发送验证码')
  214 + .width('32.71%')
  215 + .backgroundColor('#00000000')
  216 + .fontColor('#da3e22')
  217 + }
  218 + .width('100%')
  219 + }.height('80lpx')
  220 + }
  221 + .width('100%')
  222 + .height('110lpx')
  223 + .backgroundColor(0xffffff0)
  224 + .alignItems(VerticalAlign.Center)
  225 + }
  226 +
  227 + // desc
  228 + @Builder getDescCell(item: AccoutPageDataModel, alignTitle: HorizontalAlign) {
  229 + Column() {
  230 + Text(item.compDesc).fontSize(12).maxLines(3).fontColor(0x999999).padding({top:'10lpx'})
  231 + .onClick(()=>{
  232 + if (item.compDesc == '忘记密码') {
  233 + promptAction.showToast({ message: '密码不符合密码规范' })
  234 + }
  235 + })
  236 + }
  237 + .width('100%')
  238 + .height('85lpx')
  239 + .alignItems(alignTitle)
  240 + }
  241 +
  242 + // 按钮
  243 + @Builder getButtonCell(item: AccoutPageDataModel) {
  244 + Row() {
  245 + Button(item.compButtonTitle, { type: ButtonType.Normal, stateEffect: true })
  246 + .width('100%')
  247 + .height('80lpx')
  248 + .backgroundColor(this.btnStatus ? '#da3e22' : '#e5856d')
  249 + .fontColor('#fff')
  250 + .borderRadius('4vp')
  251 + .onClick(() => {
  252 + this.buttonClick()
  253 + })
  254 + }
  255 + .padding({top:'25lpx'})
  256 + .alignItems(VerticalAlign.Center)
  257 + .width('100%')
  258 + .height('120lpx')
  259 + }
  260 +
  261 + // 标题
  262 + @Builder getLogoCell(item: AccoutPageDataModel) {
  263 + Column() {
  264 + Image(item.compLogo).height('150lpx').width('150lpx')
  265 + }
  266 + .width('100%')
  267 + .height('200lpx')
  268 + }
  269 +
  270 + /***************************** 事件处理 ******************************************/
  271 + // 提交按钮点击事件
  272 + buttonClick() {
  273 + if (this.btnStatus) {
  274 + // 需要+手机号校验
  275 + if (this.password01.length < 6 || this.password01.length > 20) {
  276 + promptAction.showToast({ message: '密码不符合密码规范' })
  277 + return
  278 + }
  279 +
  280 + promptAction.showToast({ message: '请求接口' })
  281 + }
  282 + }
  283 +
  284 + // 输入框数据变动:输入数据处理
  285 + inputTextChange(text: string, tag: number) {
  286 + if (tag == 10086) {
  287 + this.password01 = text;
  288 + } else if (tag == 10087) {
  289 + this.password02 = text;
  290 + } else {
  291 + this.passwordOri = text;
  292 + }
  293 +
  294 + if (this.password01) {
  295 + if (this.password01 == this.password02 && this.password01.length >= 6 && this.password01.length <= 20) {
  296 + this.btnStatus = true;
  297 + } else {
  298 + this.btnStatus = false;
  299 + }
  300 + }
  301 + }
  302 +}
@@ -2,28 +2,53 @@ const TAG = 'AboutPageUI'; @@ -2,28 +2,53 @@ const TAG = 'AboutPageUI';
2 2
3 @Component 3 @Component
4 export struct AboutPageUI { 4 export struct AboutPageUI {
  5 + @State listData: Array<string | Array<string>> = ['隐私授权协议', '软件许可及用户协议'];
5 @State message: string = '京ICP备16066560号-6A Copyright © 人民日报客户端\nall rights reserved.' 6 @State message: string = '京ICP备16066560号-6A Copyright © 人民日报客户端\nall rights reserved.'
6 @State version: string = '版本号:v8.0.1.1' 7 @State version: string = '版本号:v8.0.1.1'
7 8
8 9
9 build() { 10 build() {
  11 + Navigation() {
  12 + //滑动区域
  13 + this.aboutUi()
  14 + }.titleMode(NavigationTitleMode.Mini)
  15 + .title('关于')
  16 + }
  17 +
  18 + @Builder aboutUi() {
10 Column() { 19 Column() {
11 Image($r('app.media.setting_about_logo')) 20 Image($r('app.media.setting_about_logo'))
12 .width('278lpx') 21 .width('278lpx')
13 .height('154lpx') 22 .height('154lpx')
14 .margin({top:'173lpx',bottom:'154lpx'}) 23 .margin({top:'173lpx',bottom:'154lpx'})
15 24
16 - Row(){ 25 + // Row(){
  26 + //
  27 + // }.backgroundColor(Color.Yellow)
  28 + // .width('100%')
  29 + // .height('97lpx')
17 30
18 - }.backgroundColor(Color.Yellow)  
19 - .width('100%')  
20 - .height('97lpx') 31 + // Row(){
  32 + //
  33 + // }.backgroundColor(Color.Yellow)
  34 + // .width('100%')
  35 + // .height('97lpx')
21 36
22 - Row(){  
23 37
24 - }.backgroundColor(Color.Yellow)  
25 - .width('100%')  
26 - .height('97lpx') 38 +
  39 +
  40 + List(){
  41 + ForEach(this.listData, (item, index) =>{
  42 + ListItem() {
  43 + this.getArrowCell(item, index)
  44 + }
  45 + }, item => item)
  46 + }.divider({
  47 + strokeWidth: 1,
  48 + startMargin: '29lpx',
  49 + endMargin: '29lpx',
  50 + color: '#EDEDED'
  51 + })
27 52
28 Blank() 53 Blank()
29 54
@@ -46,4 +71,31 @@ export struct AboutPageUI { @@ -46,4 +71,31 @@ export struct AboutPageUI {
46 .width('100%') 71 .width('100%')
47 .height('100%') 72 .height('100%')
48 } 73 }
49 -}  
  74 +
  75 +
  76 +
  77 + // 右文字+箭头cell
  78 + @Builder getArrowCell(item, index) {
  79 +
  80 + Row() {
  81 + // 左侧标题
  82 + Text(`${item}`)
  83 + .fontColor('#666666')
  84 + .fontSize('31lpx')
  85 +
  86 + Image($r('app.media.mine_user_arrow'))
  87 + .width('27lpx')
  88 + .height('27lpx')
  89 + .objectFit(ImageFit.Auto)
  90 + }
  91 + .alignItems(VerticalAlign.Center)
  92 + .justifyContent(FlexAlign.SpaceBetween)
  93 + .height('97lpx')
  94 + .width('100%')
  95 + .padding({left:'29lpx',right:'29lpx'})
  96 + }
  97 +
  98 +
  99 +}
  100 +
  101 +
@@ -67,9 +67,19 @@ export default struct MinePageMoreFunctionUI{ @@ -67,9 +67,19 @@ export default struct MinePageMoreFunctionUI{
67 console.log(index+"") 67 console.log(index+"")
68 if (index == 3) { 68 if (index == 3) {
69 RouteManager.jumpNewPage("pages/SettingPage") 69 RouteManager.jumpNewPage("pages/SettingPage")
70 - } else { 70 + } else if (index == 2) {
71 RouteManager.jumpNewPage("pages/PrivacySettingPage") 71 RouteManager.jumpNewPage("pages/PrivacySettingPage")
  72 + } else if (index == 4) {
  73 + RouteManager.jumpNewPage("pages/SettingAboutPage")
  74 + }else {
  75 + // 在Home页面中
  76 + let paramsInfo: object = {
  77 + pageId: 123,
  78 + pageType:'mainSetting'
  79 + };
  80 + RouteManager.jumpNewPage("pages/PrivacySettingPage",paramsInfo)
72 } 81 }
  82 +
73 }) 83 })
74 .height('117lpx') 84 .height('117lpx')
75 }, item => item) 85 }, item => item)
@@ -84,6 +84,22 @@ class MinePageDatasModel{ @@ -84,6 +84,22 @@ class MinePageDatasModel{
84 return this.moreData 84 return this.moreData
85 } 85 }
86 86
  87 + /**
  88 + * 扫一扫 我的奖品 等5个数据
  89 + * 包含名字和图标
  90 + */
  91 + getSettingFunctionsData():MinePageCreatorFunctionsItem[]{
  92 + if(this.moreData.length === 5){
  93 + return this.moreData
  94 + }
  95 + this.moreData.push(new MinePageMoreFunctionModel("扫一扫",$r('app.media.mine_scan')))
  96 + this.moreData.push(new MinePageMoreFunctionModel("我的奖品",$r('app.media.mine_mygift')))
  97 + this.moreData.push(new MinePageMoreFunctionModel("意见反馈",$r('app.media.mine_suggest')))
  98 + this.moreData.push(new MinePageMoreFunctionModel("设置",$r('app.media.mine_setting')))
  99 + this.moreData.push(new MinePageMoreFunctionModel("关于",$r('app.media.mine_about')))
  100 + return this.moreData
  101 + }
  102 +
87 fetchAppointmentListData(pageSize:string,pageNum:string) { 103 fetchAppointmentListData(pageSize:string,pageNum:string) {
88 let url = HttpUrlUtils.getAppointmentListDataUrl()+ `?pageSize=${pageSize}&pageNum=${pageNum}` 104 let url = HttpUrlUtils.getAppointmentListDataUrl()+ `?pageSize=${pageSize}&pageNum=${pageNum}`
89 let headers: HashMap<string, string> = HttpUrlUtils.getYcgCommonHeaders(); 105 let headers: HashMap<string, string> = HttpUrlUtils.getYcgCommonHeaders();
  1 +
  2 +import MinePagePersonalFunctionsItem from '../viewmodel/MinePagePersonalFunctionsItem'
  3 +import MinePageCreatorFunctionsItem from '../viewmodel/MinePageCreatorFunctionsItem'
  4 +import MinePageMoreFunctionModel from '../viewmodel/MinePageMoreFunctionModel';
  5 +import { HttpUrlUtils } from '../network/HttpUrlUtils';
  6 +import HashMap from '@ohos.util.HashMap';
  7 +import { ResponseDTO, WDHttp } from 'wdNetwork';
  8 +import { Logger } from 'wdKit';
  9 +import { MineMainSettingFunctionItem } from '../viewmodel/MineMainSettingFunctionItem'
  10 +
  11 +const TAG = "MineSettingDatasModel"
  12 +
  13 +/**
  14 + * 我的设置页面 所有数据 获取封装类
  15 + */
  16 +class MineSettingDatasModel{
  17 + private static instance: MineSettingDatasModel;
  18 + mainSettingData:MineMainSettingFunctionItem[] = []
  19 + accountAndSecurityData:MineMainSettingFunctionItem[] = []
  20 +
  21 + private constructor() { }
  22 +
  23 + /**
  24 + * 单例模式
  25 + * @returns
  26 + */
  27 + public static getInstance(): MineSettingDatasModel {
  28 + if (!MineSettingDatasModel.instance) {
  29 + MineSettingDatasModel.instance = new MineSettingDatasModel();
  30 + }
  31 + return MineSettingDatasModel.instance;
  32 + }
  33 +
  34 +
  35 +
  36 +
  37 + /**
  38 + * 评论 关注 收藏 等7个数据
  39 + * 包含名字和图标
  40 + */
  41 + getMineMainSettingFunctionItemData():MineMainSettingFunctionItem[]{
  42 + if(this.mainSettingData.length === 7){
  43 + return this.mainSettingData
  44 + }
  45 + this.mainSettingData = []
  46 + this.mainSettingData.push(new MineMainSettingFunctionItem(null, '账户与安全', '18888888888', 0, false))
  47 + this.mainSettingData.push(new MineMainSettingFunctionItem(null, '接收推送', null, 1, false))
  48 + this.mainSettingData.push(new MineMainSettingFunctionItem(null, '隐私设罝', null, 0, false))
  49 + this.mainSettingData.push(new MineMainSettingFunctionItem(null, '仅WiFi网络加载图片', null, 1, false))
  50 + this.mainSettingData.push(new MineMainSettingFunctionItem(null, 'WiFi网络情况下自动播放视频', null, 1, false))
  51 + this.mainSettingData.push(new MineMainSettingFunctionItem(null, '开户播放器悬浮窗', null, 1, false))
  52 + this.mainSettingData.push(new MineMainSettingFunctionItem(null, null, null, 2, null))
  53 + this.mainSettingData.push(new MineMainSettingFunctionItem(null, '清除缓存', '32MB', 0, false))
  54 + this.mainSettingData.push(new MineMainSettingFunctionItem(null, '去评分', null, 0, false))
  55 +
  56 + return this.mainSettingData
  57 + }
  58 +
  59 + /**
  60 + * 评论 关注 收藏 等7个数据
  61 + * 包含名字和图标
  62 + */
  63 + getAccountAndSecuritySettingData():MineMainSettingFunctionItem[]{
  64 + if(this.accountAndSecurityData.length === 7){
  65 + return this.accountAndSecurityData
  66 + }
  67 + this.accountAndSecurityData = []
  68 + this.accountAndSecurityData.push(new MineMainSettingFunctionItem(null, '更换手机号', '18888888888', 0, false))
  69 + this.accountAndSecurityData.push(new MineMainSettingFunctionItem(null, '设置密码', null, 0, false))
  70 + this.accountAndSecurityData.push(new MineMainSettingFunctionItem(null, null, null, 2, null))
  71 + this.accountAndSecurityData.push(new MineMainSettingFunctionItem($r('app.media.mine_order_icon'), '绑定QQ', '立即绑定', 0, false))
  72 + this.accountAndSecurityData.push(new MineMainSettingFunctionItem($r('app.media.mine_order_icon'), '绑定微信', '立即绑定', 0, false))
  73 + this.accountAndSecurityData.push(new MineMainSettingFunctionItem($r('app.media.mine_order_icon'), '绑定新浪微博', '立即绑定', 0, false))
  74 + this.accountAndSecurityData.push(new MineMainSettingFunctionItem(null, 'Apple ID', null, 0, false))
  75 + this.accountAndSecurityData.push(new MineMainSettingFunctionItem(null, null, null, 2, null))
  76 +
  77 + this.accountAndSecurityData.push(new MineMainSettingFunctionItem(null, '注销账号', null, 0, false))
  78 +
  79 + return this.accountAndSecurityData
  80 + }
  81 +
  82 +
  83 +
  84 + // 网络请求设置数据
  85 + fetchAppointmentListData(pageSize:string,pageNum:string) {
  86 + // let url = HttpUrlUtils.getAppointmentListDataUrl()+ `?pageSize=${pageSize}&pageNum=${pageNum}`
  87 + // let headers: HashMap<string, string> = HttpUrlUtils.getYcgCommonHeaders();
  88 + // return WDHttp.get<ResponseDTO<MineAppointmentListItem>>(url, headers)
  89 + };
  90 +
  91 + // getAppointmentListData(pageSize:string,pageNum:string): Promise<MineAppointmentListItem> {
  92 + // return new Promise<MineAppointmentListItem>((success, error) => {
  93 + // Logger.info(TAG, `getAppointmentList start`);
  94 + // this.fetchAppointmentListData(pageSize,pageNum).then((navResDTO: ResponseDTO<MineAppointmentListItem>) => {
  95 + // if (!navResDTO) {
  96 + // error("page data invalid");
  97 + // return
  98 + // }
  99 + // Logger.info(TAG, "getAppointmentList then,AppointmentResDTO.timeStamp:" + navResDTO.timestamp);
  100 + // let navigationBean = navResDTO.data
  101 + // success(navigationBean);
  102 + // }).catch((err: Error) => {
  103 + // Logger.error(TAG, `fetchAppointmentListDataApi catch, error.name : ${err.name}, error.message:${err.message}`);
  104 + // error(err);
  105 + // })
  106 + // })
  107 + // }
  108 +
  109 +}
  110 +
  111 +const mineSettingDatasModel = MineSettingDatasModel.getInstance()
  112 +export default mineSettingDatasModel as MineSettingDatasModel
  1 +
  2 +@Observed
  3 +export class MineMainSettingFunctionItem {
  4 + imgSrc:Resource // 图标
  5 + title:string // 标题
  6 + subTitle:string // 副标题
  7 + type:number // 数据类型 0默认箭头类型,1右侧switch按钮类型
  8 + switchState:boolean // 右侧switch按钮状态
  9 +
  10 +
  11 + constructor(imgSrc:Resource,title:string,subTitle:string,type:number,switchState:boolean){
  12 + this.imgSrc = imgSrc
  13 + this.title = title
  14 + this.subTitle = subTitle
  15 + this.type = type
  16 + this.switchState = switchState
  17 + }
  18 +}
  1 +import abilityAccessCtrl, { Permissions } from '@ohos.abilityAccessCtrl';
  2 +@Observed
  3 +export class PrivacySettingModel{
  4 + privacyName: string
  5 + permission: boolean
  6 + permissionKey: Permissions
  7 +
  8 + constructor(privacyName: string, permission: boolean, permissionKey: Permissions) {
  9 + this.privacyName = privacyName;
  10 + this.permission = permission;
  11 + this.permissionKey = permissionKey;
  12 + }
  13 +}
@@ -14,3 +14,6 @@ export { DateTimeUtils } from './utils/DateTimeUtils' @@ -14,3 +14,6 @@ export { DateTimeUtils } from './utils/DateTimeUtils'
14 14
15 export { AppContext } from './utils/AppContext' 15 export { AppContext } from './utils/AppContext'
16 16
  17 +export { PermissionUtil } from './utils/PermissionUtil'
  18 +
  19 +export { SPHelper } from './utils/SPHelper'
  1 +import bundleManager from '@ohos.bundle.bundleManager';
  2 +import abilityAccessCtrl, { Permissions } from '@ohos.abilityAccessCtrl';
  3 +import common from '@ohos.app.ability.common';
  4 +import featureAbility from '@ohos.ability.featureAbility';
  5 +import wantConstant from '@ohos.ability.wantConstant';
  6 +
  7 +export class PermissionUtil {
  8 + async checkAccessToken(permission: Permissions): Promise<abilityAccessCtrl.GrantStatus> {
  9 + let atManager = abilityAccessCtrl.createAtManager();
  10 + let grantStatus: abilityAccessCtrl.GrantStatus;
  11 +
  12 + // 获取应用程序的accessTokenID
  13 + let tokenId: number;
  14 + try {
  15 + let bundleInfo: bundleManager.BundleInfo = await bundleManager.getBundleInfoForSelf(bundleManager.BundleFlag.GET_BUNDLE_INFO_WITH_APPLICATION);
  16 + let appInfo: bundleManager.ApplicationInfo = bundleInfo.appInfo;
  17 + tokenId = appInfo.accessTokenId;
  18 + } catch (err) {
  19 + console.error(`getBundleInfoForSelf failed, code is ${err.code}, message is ${err.message}`);
  20 + }
  21 +
  22 + // 校验应用是否被授予权限
  23 + try {
  24 + grantStatus = await atManager.checkAccessToken(tokenId, permission);
  25 + } catch (err) {
  26 + console.error(`checkAccessToken failed, code is ${err.code}, message is ${err.message}`);
  27 + }
  28 +
  29 + return grantStatus;
  30 + }
  31 +
  32 + async checkPermissions(permission: Permissions): Promise<boolean> {
  33 + let hasPermissions = false;
  34 + let grantStatus: abilityAccessCtrl.GrantStatus = await this.checkAccessToken(permission);
  35 +
  36 + if (grantStatus === abilityAccessCtrl.GrantStatus.PERMISSION_GRANTED) {
  37 + // 已经授权,可以继续访问目标操作
  38 + hasPermissions = true;
  39 + } else {
  40 + hasPermissions = false;
  41 + // 申请日历权限
  42 + }
  43 + return hasPermissions;
  44 + }
  45 +
  46 + static reqPermissionsFromUser(permissions: Array<Permissions>): void {
  47 + let context = getContext(this) as common.UIAbilityContext;
  48 + let atManager = abilityAccessCtrl.createAtManager();
  49 + // requestPermissionsFromUser会判断权限的授权状态来决定是否唤起弹窗
  50 + atManager.requestPermissionsFromUser(context, permissions).then((data) => {
  51 + let grantStatus: Array<number> = data.authResults;
  52 + let length: number = grantStatus.length;
  53 + for (let i = 0; i < length; i++) {
  54 + if (grantStatus[i] === 0) {
  55 + // 用户授权,可以继续访问目标操作
  56 +
  57 + } else {
  58 +
  59 + this.jumpSetting();
  60 + // 用户拒绝授权,提示用户必须授权才能访问当前页面的功能,并引导用户到系统设置中打开相应的权限
  61 + AlertDialog.show({
  62 + title: '权限设置',
  63 + message: '到系统设置中打开相应的权限',
  64 + confirm: {
  65 + value: "OK",
  66 + action: () => {
  67 +
  68 + },
  69 + }
  70 + })
  71 + return;
  72 + }
  73 + }
  74 + // 授权成功
  75 + }).catch((err) => {
  76 + console.error(`requestPermissionsFromUser failed, code is ${err.code}, message is ${err.message}`);
  77 + })
  78 + }
  79 +
  80 +
  81 + static jumpSetting() {
  82 +
  83 + }
  84 +}
@@ -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 }
@@ -61,7 +61,22 @@ export class HttpUrlUtils { @@ -61,7 +61,22 @@ export class HttpUrlUtils {
61 * 资料编辑 获取用户信息 61 * 资料编辑 获取用户信息
62 */ 62 */
63 static readonly APPOINTMENT_AccountOwner_PATH: string = "/api/rmrb-contact/contact/zh/c/my/detail"; 63 static readonly APPOINTMENT_AccountOwner_PATH: string = "/api/rmrb-contact/contact/zh/c/my/detail";
64 - 64 + /**
  65 + * 个人中心 关注列表详情
  66 + */
  67 + static readonly FOLLOW_LIST_DETAIL_DATA_PATH: string = "/api/rmrb-creator-user/c/creatorDirectory/getContactMasterDetaiPage";
  68 + /**
  69 + * 个人中心 关注列表
  70 + */
  71 + static readonly FOLLOW_LIST_DATA_PATH: string = "/api/rmrb-creator-user/c/creatorDirectory/getCreatorDirectoryTree";
  72 + /**
  73 + * 个人中心 我的关注列表
  74 + */
  75 + static readonly MINE_FOLLOW_LIST_DATA_PATH: string = "/api/rmrb-interact/interact/zh/c/attention/list";
  76 + /**
  77 + * 个人中心 关注列表状态
  78 + */
  79 + static readonly FOLLOW_LIST_STATUS_DATA_PATH: string = "/api/rmrb-interact/interact/zh/c/batchAttention/status";
65 /** 80 /**
66 * 我的收藏 81 * 我的收藏
67 */ 82 */
@@ -79,7 +94,7 @@ export class HttpUrlUtils { @@ -79,7 +94,7 @@ export class HttpUrlUtils {
79 94
80 static readonly MORNING_EVENING_COMP_INFO_PATH: string = "/api/rmrb-bff-display-zh/display/zh/c/compInfo"; 95 static readonly MORNING_EVENING_COMP_INFO_PATH: string = "/api/rmrb-bff-display-zh/display/zh/c/compInfo";
81 96
82 - private static hostUrl: string = HttpUrlUtils.HOST_UAT; 97 + private static hostUrl: string = HttpUrlUtils.HOST_PRODUCT;
83 private static userId='' 98 private static userId=''
84 private static userType='' 99 private static userType=''
85 private static token='' 100 private static token=''
@@ -270,6 +285,26 @@ export class HttpUrlUtils { @@ -270,6 +285,26 @@ export class HttpUrlUtils {
270 return url 285 return url
271 } 286 }
272 287
  288 + static getFollowListDetailDataUrl() {
  289 + let url = HttpUrlUtils.HOST_SIT + HttpUrlUtils.FOLLOW_LIST_DETAIL_DATA_PATH
  290 + return url
  291 + }
  292 +
  293 + static getFollowListDataUrl() {
  294 + let url = HttpUrlUtils.HOST_SIT + HttpUrlUtils.FOLLOW_LIST_DATA_PATH
  295 + return url
  296 + }
  297 +
  298 + static getMineFollowListDataUrl() {
  299 + let url = HttpUrlUtils.HOST_SIT + HttpUrlUtils.MINE_FOLLOW_LIST_DATA_PATH
  300 + return url
  301 + }
  302 +
  303 + static getFollowListStatusDataUrl() {
  304 + let url = HttpUrlUtils.HOST_SIT + HttpUrlUtils.FOLLOW_LIST_STATUS_DATA_PATH
  305 + return url
  306 + }
  307 +
273 static getYcgCommonHeaders(): HashMap<string, string> { 308 static getYcgCommonHeaders(): HashMap<string, string> {
274 let headers: HashMap<string, string> = new HashMap<string, string>() 309 let headers: HashMap<string, string> = new HashMap<string, string>()
275 310
@@ -282,10 +317,10 @@ export class HttpUrlUtils { @@ -282,10 +317,10 @@ export class HttpUrlUtils {
282 headers.set('X-Ca-Stage', "TEST") 317 headers.set('X-Ca-Stage', "TEST")
283 headers.set('plat', "Phone") 318 headers.set('plat', "Phone")
284 headers.set('Content-Type', 'application/json; charset=utf-8') 319 headers.set('Content-Type', 'application/json; charset=utf-8')
285 - headers.set('timestamp', "649773304")  
286 - headers.set('RMRB-X-TOKEN', "eyJhbGciOiJIUzI1NiIsImtpZCI6IklFazBGclhfV2RYMEx1ZktDU01iYTVYd0VmUHZ6a043T0F5UTRFLWIwWU0ifQ.eyJpc3MiOiJwZW9wbGVzLWRhaWx5LWZvdXJhIiwic3ViIjoicGVvcGxlcy1kYWlseS1mb3VyYSIsImV4cCI6MTcxMDU4Mzk0MywidXNlcklkIjo1NjczODc0NzcwNjM2MjEsInVzZXJWZXJzaW9uIjoiNTY3Mzg3NDc3MDYzNjIxXzAiLCJ1c2VyTmFtZSI6IiVFNCVCQSVCQSVFNiVCMCU5MSVFNiU5NyVBNSVFNiU4QSVBNSVFNyVCRCU5MSVFNSU4RiU4QmFQcnRxNSIsInVzZXJUeXBlIjoxLCJjcmVhdG9ySWQiOm51bGwsInVzZXJJZFpoIjpudWxsfQ._LTKrUxQozpCj1XMhx1TWOIxn5gjDveoPuMFGpI0g_8") 320 + headers.set('timestamp', "740977741")
  321 + headers.set('RMRB-X-TOKEN', "eyJhbGciOiJIUzI1NiIsImtpZCI6IklFazBGclhfV2RYMEx1ZktDU01iYTVYd0VmUHZ6a043T0F5UTRFLWIwWU0ifQ.eyJpc3MiOiJwZW9wbGVzLWRhaWx5LWZvdXJhIiwic3ViIjoicGVvcGxlcy1kYWlseS1mb3VyYSIsImV4cCI6MTcxMDc1NjM3NywidXNlcklkIjo1NjczODc0NzcwNjM2MjEsInVzZXJWZXJzaW9uIjoiNTY3Mzg3NDc3MDYzNjIxXzAiLCJ1c2VyTmFtZSI6IiVFNCVCQSVCQSVFNiVCMCU5MSVFNiU5NyVBNSVFNiU4QSVBNSVFNyVCRCU5MSVFNSU4RiU4QmFQcnRxNSIsInVzZXJUeXBlIjoxLCJjcmVhdG9ySWQiOm51bGwsInVzZXJJZFpoIjpudWxsfQ.KBkF0Yki-JWlq0ZIOCzgKwQc1ycBnFHa6CF-rMPRgHU")
287 headers.set('device_id', "5156098c-6c44-3514-af70-04a0139a9327") 322 headers.set('device_id', "5156098c-6c44-3514-af70-04a0139a9327")
288 - headers.set('cookie', 'RMRB-X-TOKEN=eyJhbGciOiJIUzI1NiIsImtpZCI6IklFazBGclhfV2RYMEx1ZktDU01iYTVYd0VmUHZ6a043T0F5UTRFLWIwWU0ifQ.eyJpc3MiOiJwZW9wbGVzLWRhaWx5LWZvdXJhIiwic3ViIjoicGVvcGxlcy1kYWlseS1mb3VyYSIsImV4cCI6MTcxMDU4Mzk0MywidXNlcklkIjo1NjczODc0NzcwNjM2MjEsInVzZXJWZXJzaW9uIjoiNTY3Mzg3NDc3MDYzNjIxXzAiLCJ1c2VyTmFtZSI6IiVFNCVCQSVCQSVFNiVCMCU5MSVFNiU5NyVBNSVFNiU4QSVBNSVFNyVCRCU5MSVFNSU4RiU4QmFQcnRxNSIsInVzZXJUeXBlIjoxLCJjcmVhdG9ySWQiOm51bGwsInVzZXJJZFpoIjpudWxsfQ._LTKrUxQozpCj1XMhx1TWOIxn5gjDveoPuMFGpI0g_8') 323 + // headers.set('cookie', 'RMRB-X-TOKEN=eyJhbGciOiJIUzI1NiIsImtpZCI6IklFazBGclhfV2RYMEx1ZktDU01iYTVYd0VmUHZ6a043T0F5UTRFLWIwWU0ifQ.eyJpc3MiOiJwZW9wbGVzLWRhaWx5LWZvdXJhIiwic3ViIjoicGVvcGxlcy1kYWlseS1mb3VyYSIsImV4cCI6MTcxMDU4Mzk0MywidXNlcklkIjo1NjczODc0NzcwNjM2MjEsInVzZXJWZXJzaW9uIjoiNTY3Mzg3NDc3MDYzNjIxXzAiLCJ1c2VyTmFtZSI6IiVFNCVCQSVCQSVFNiVCMCU5MSVFNiU5NyVBNSVFNiU4QSVBNSVFNyVCRCU5MSVFNSU4RiU4QmFQcnRxNSIsInVzZXJUeXBlIjoxLCJjcmVhdG9ySWQiOm51bGwsInVzZXJJZFpoIjpudWxsfQ._LTKrUxQozpCj1XMhx1TWOIxn5gjDveoPuMFGpI0g_8')
289 headers.set('build_version', "202403112023") 324 headers.set('build_version', "202403112023")
290 headers.set('adcode', "340000") 325 headers.set('adcode', "340000")
291 headers.set('os_version', "10") 326 headers.set('os_version', "10")
@@ -294,7 +329,7 @@ export class HttpUrlUtils { @@ -294,7 +329,7 @@ export class HttpUrlUtils {
294 headers.set('versionCode', "7302") 329 headers.set('versionCode', "7302")
295 headers.set('system', "Android") 330 headers.set('system', "Android")
296 headers.set('version_name', "7.3.0.2") 331 headers.set('version_name', "7.3.0.2")
297 - headers.set('EagleEye-TraceID', '5C3D0800CF2C4440A43E5B131187629B') 332 + headers.set('EagleEye-TraceID', '101118E4D006453DA549A82AA8CAFBFE')
298 headers.set('imei', "5156098c-6c44-3514-af70-04a0139a9327") 333 headers.set('imei', "5156098c-6c44-3514-af70-04a0139a9327")
299 headers.set('userType', "1") 334 headers.set('userType', "1")
300 headers.set('Accept-Language', 'zh') 335 headers.set('Accept-Language', 'zh')
@@ -46,4 +46,6 @@ export class WDRouterPage { @@ -46,4 +46,6 @@ export class WDRouterPage {
46 static editUserNikeNamePage = new WDRouterPage("wdComponent", "ets/components/page/EditUserNikeNamePage"); 46 static editUserNikeNamePage = new WDRouterPage("wdComponent", "ets/components/page/EditUserNikeNamePage");
47 //修改简介 47 //修改简介
48 static editUserIntroductionPage = new WDRouterPage("wdComponent", "ets/components/page/EditUserIntroductionPage"); 48 static editUserIntroductionPage = new WDRouterPage("wdComponent", "ets/components/page/EditUserIntroductionPage");
  49 +
  50 + static loginProtocolPage = new WDRouterPage("wdLogin", "ets/pages/login/LoginProtocolWebview");
49 } 51 }
  1 +import bundleManager from '@ohos.bundle.bundleManager'
  2 +
  3 +export class WDRouterPage {
  4 + private moduleName: string
  5 + private pagePath: string
  6 +
  7 + constructor(moduleName: string, pagePath: string) {
  8 + this.moduleName = moduleName
  9 + this.pagePath = pagePath
  10 + }
  11 +
  12 + url() {
  13 + let bundleInfo = bundleManager.getBundleInfoForSelfSync(bundleManager.BundleFlag.GET_BUNDLE_INFO_DEFAULT)
  14 + return `@bundle:${bundleInfo.name}/${this.moduleName}/${this.pagePath}`
  15 + }
  16 +
  17 + // 主页
  18 + static index = new WDRouterPage("phone", "ets/pages/Index");
  19 + // 关于页面
  20 + // static aboutPage = new WDRouterPage("entry", "ets/pages/about/AboutPage");
  21 + // web默认页面
  22 + static defaultWebPage = new WDRouterPage("phone", "ets/pages/web/DefaultWebPage");
  23 + // 电子报页面
  24 + static eNewspaper = new WDRouterPage("phone", "ets/pages/ENewspaper")
  25 + // 早晚报页面
  26 + static morningEveningPaperPage = new WDRouterPage("phone", "ets/pages/MorningEveningPaperPage")
  27 + // 图文详情页
  28 + static imageTextDetailPage = new WDRouterPage("phone", "ets/pages/ImageAndTextDetailPage");
  29 + // 短视频详情页
  30 + static detailPlayShortVideoPage = new WDRouterPage("wdDetailPlayShortVideo", "ets/pages/DetailPlayShortVideoPage");
  31 + // 点播详情页
  32 + static detailPlayVodPage = new WDRouterPage("wdDetailPlayVod", "ets/pages/DetailPlayVodPage");
  33 + // 直播详情页
  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");
  43 + //资料编辑
  44 + static editUserInfoPage = new WDRouterPage("wdComponent", "ets/components/page/EditUserInfoPage");
  45 + //修改昵称
  46 + static editUserNikeNamePage = new WDRouterPage("wdComponent", "ets/components/page/EditUserNikeNamePage");
  47 + //修改简介
  48 + static editUserIntroductionPage = new WDRouterPage("wdComponent", "ets/components/page/EditUserIntroductionPage");
  49 +
  50 + static loginProtocolPage = new WDRouterPage("wdLogin", "ets/pages/login/LoginProtocolWebview");
  51 +}
  1 +import bundleManager from '@ohos.bundle.bundleManager'
  2 +
  3 +export class WDRouterPage {
  4 + private moduleName: string
  5 + private pagePath: string
  6 +
  7 + constructor(moduleName: string, pagePath: string) {
  8 + this.moduleName = moduleName
  9 + this.pagePath = pagePath
  10 + }
  11 +
  12 + url() {
  13 + let bundleInfo = bundleManager.getBundleInfoForSelfSync(bundleManager.BundleFlag.GET_BUNDLE_INFO_DEFAULT)
  14 + return `@bundle:${bundleInfo.name}/${this.moduleName}/${this.pagePath}`
  15 + }
  16 +
  17 + // 主页
  18 + static index = new WDRouterPage("phone", "ets/pages/Index");
  19 + // 关于页面
  20 + // static aboutPage = new WDRouterPage("entry", "ets/pages/about/AboutPage");
  21 + // web默认页面
  22 + static defaultWebPage = new WDRouterPage("phone", "ets/pages/web/DefaultWebPage");
  23 + // 电子报页面
  24 + static eNewspaper = new WDRouterPage("phone", "ets/pages/ENewspaper")
  25 + // 早晚报页面
  26 + static morningEveningPaperPage = new WDRouterPage("phone", "ets/pages/MorningEveningPaperPage")
  27 + // 图文详情页
  28 + static imageTextDetailPage = new WDRouterPage("phone", "ets/pages/ImageAndTextDetailPage");
  29 + // 短视频详情页
  30 + static detailPlayShortVideoPage = new WDRouterPage("wdDetailPlayShortVideo", "ets/pages/DetailPlayShortVideoPage");
  31 + // 点播详情页
  32 + static detailPlayVodPage = new WDRouterPage("wdDetailPlayVod", "ets/pages/DetailPlayVodPage");
  33 + // 直播详情页
  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");
  43 +}
  1 +import bundleManager from '@ohos.bundle.bundleManager'
  2 +
  3 +export class WDRouterPage {
  4 + private moduleName: string
  5 + private pagePath: string
  6 +
  7 + constructor(moduleName: string, pagePath: string) {
  8 + this.moduleName = moduleName
  9 + this.pagePath = pagePath
  10 + }
  11 +
  12 + url() {
  13 + let bundleInfo = bundleManager.getBundleInfoForSelfSync(bundleManager.BundleFlag.GET_BUNDLE_INFO_DEFAULT)
  14 + return `@bundle:${bundleInfo.name}/${this.moduleName}/${this.pagePath}`
  15 + }
  16 +
  17 + // 主页
  18 + static index = new WDRouterPage("phone", "ets/pages/Index");
  19 + // 关于页面
  20 + // static aboutPage = new WDRouterPage("entry", "ets/pages/about/AboutPage");
  21 + // web默认页面
  22 + static defaultWebPage = new WDRouterPage("phone", "ets/pages/web/DefaultWebPage");
  23 + // 电子报页面
  24 + static eNewspaper = new WDRouterPage("phone", "ets/pages/ENewspaper")
  25 + // 早晚报页面
  26 + static morningEveningPaperPage = new WDRouterPage("phone", "ets/pages/MorningEveningPaperPage")
  27 + // 图文详情页
  28 + static imageTextDetailPage = new WDRouterPage("phone", "ets/pages/ImageAndTextDetailPage");
  29 + // 短视频详情页
  30 + static detailPlayShortVideoPage = new WDRouterPage("wdDetailPlayShortVideo", "ets/pages/DetailPlayShortVideoPage");
  31 + // 点播详情页
  32 + static detailPlayVodPage = new WDRouterPage("wdDetailPlayVod", "ets/pages/DetailPlayVodPage");
  33 + // 直播详情页
  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");
  43 + //资料编辑
  44 + static editUserInfoPage = new WDRouterPage("wdComponent", "ets/components/page/EditUserInfoPage");
  45 + //修改昵称
  46 + static editUserNikeNamePage = new WDRouterPage("wdComponent", "ets/components/page/EditUserNikeNamePage");
  47 + //修改简介
  48 + static editUserIntroductionPage = new WDRouterPage("wdComponent", "ets/components/page/EditUserIntroductionPage");
  49 +}
  1 +import bundleManager from '@ohos.bundle.bundleManager'
  2 +
  3 +export class WDRouterPage {
  4 + private moduleName: string
  5 + private pagePath: string
  6 +
  7 + constructor(moduleName: string, pagePath: string) {
  8 + this.moduleName = moduleName
  9 + this.pagePath = pagePath
  10 + }
  11 +
  12 + url() {
  13 + let bundleInfo = bundleManager.getBundleInfoForSelfSync(bundleManager.BundleFlag.GET_BUNDLE_INFO_DEFAULT)
  14 + return `@bundle:${bundleInfo.name}/${this.moduleName}/${this.pagePath}`
  15 + }
  16 +
  17 + // 主页
  18 + static index = new WDRouterPage("phone", "ets/pages/Index");
  19 + // 关于页面
  20 + // static aboutPage = new WDRouterPage("entry", "ets/pages/about/AboutPage");
  21 + // web默认页面
  22 + static defaultWebPage = new WDRouterPage("phone", "ets/pages/web/DefaultWebPage");
  23 + // 电子报页面
  24 + static eNewspaper = new WDRouterPage("phone", "ets/pages/ENewspaper")
  25 + // 早晚报页面
  26 + static morningEveningPaperPage = new WDRouterPage("phone", "ets/pages/MorningEveningPaperPage")
  27 + // 图文详情页
  28 + static imageTextDetailPage = new WDRouterPage("phone", "ets/pages/ImageAndTextDetailPage");
  29 + // 短视频详情页
  30 + static detailPlayShortVideoPage = new WDRouterPage("wdDetailPlayShortVideo", "ets/pages/DetailPlayShortVideoPage");
  31 + // 点播详情页
  32 + static detailPlayVodPage = new WDRouterPage("wdDetailPlayVod", "ets/pages/DetailPlayVodPage");
  33 + // 直播详情页
  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");
  43 +
  44 + static loginProtocolPage = new WDRouterPage("wdLogin", "ets/pages/login/LoginProtocolWebview");
  45 +}
@@ -70,3 +70,19 @@ export { ResponseBean } from './src/main/ets/bean/h5/ResponseBean'; @@ -70,3 +70,19 @@ export { ResponseBean } from './src/main/ets/bean/h5/ResponseBean';
70 export { MorningEveningPaperDTO } from './src/main/ets/bean/component/MorningEveningPaperDTO'; 70 export { MorningEveningPaperDTO } from './src/main/ets/bean/component/MorningEveningPaperDTO';
71 71
72 export { FrontLinkObject } from './src/main/ets/bean/component/FrontLinkObject'; 72 export { FrontLinkObject } from './src/main/ets/bean/component/FrontLinkObject';
  73 +
  74 +export { PageInfoBean } from './src/main/ets/bean/morningevening/PageInfoBean';
  75 +
  76 +export { Group } from './src/main/ets/bean/morningevening/Group';
  77 +
  78 +export { TopicInfo } from './src/main/ets/bean/morningevening/TopicInfo';
  79 +
  80 +export { CompInfoBean } from './src/main/ets/bean/morningevening/CompInfoBean';
  81 +
  82 +export { CompList } from './src/main/ets/bean/morningevening/CompList';
  83 +
  84 +export { OperDataList } from './src/main/ets/bean/morningevening/OperDataList';
  85 +
  86 +export { ShareInfo } from './src/main/ets/bean/morningevening/ShareInfo';
  87 +
  88 +
  1 +import { CompList } from './CompList';
  2 +
  3 +export interface CompInfoBean {
  4 + blockDesc: string;
  5 + // compAdList: any[];
  6 + compList: CompList[];
  7 + id: number;
  8 + name: string;
  9 + pageId: string;
  10 + pageNum: number;
  11 + pageSize: number;
  12 + recommend: number;
  13 + totalCount: number;
  14 +}
  1 +import { OperDataList } from './OperDataList';
  2 +
  3 +export interface CompList {
  4 + // audioDataList: any[];
  5 + backgroundImgUrl: string;
  6 + // bottomNavId?: any;
  7 + cardItemId: string;
  8 + // cardUpdateStrategy?: any;
  9 + compStyle: string;
  10 + compType: string;
  11 + dataSourceType: string;
  12 + expIds: string;
  13 + extraData: string;
  14 + // fullColumnImgUrls: any[];
  15 + hasMore: number;
  16 + id: number;
  17 + // imageScale?: any;
  18 + imgSize: string;
  19 + itemId: string;
  20 + itemType: string;
  21 + itemTypeCode: string;
  22 + linkUrl: string;
  23 + // localGovernance?: any;
  24 + name: string;
  25 + objectId: string;
  26 + objectLevel: string;
  27 + objectSummary: string;
  28 + objectTitle: string;
  29 + objectType: string;
  30 + // openComment?: any;
  31 + // openLikes?: any;
  32 + operDataList: OperDataList[];
  33 + pageId: string;
  34 + // position?: any;
  35 + posterSize: string;
  36 + posterUrl: string;
  37 + // questionSection?: any;
  38 + recommend: number;
  39 + relId: number;
  40 + sceneId: string;
  41 + sortValue: number;
  42 + subSceneId: string;
  43 + summaryName: string;
  44 + // tabOperDataList: any[];
  45 + titleShowPolicy: number;
  46 + // topicTemplate?: any;
  47 + traceId: string;
  48 + traceInfo: string;
  49 + viewTime: string;
  50 + // viewTimeBlurred?: any;
  51 +}
  1 +export interface Group {
  2 + blockDesc: string;
  3 + groupStrategy: number;
  4 + id: number;
  5 + showType: number;
  6 + sortValue: number;
  7 +}
  1 +import { ShareInfo } from './ShareInfo';
  2 +
  3 +export interface OperDataList {
  4 + // activityExt?: any;
  5 + appStyle: string;
  6 + // askInfo?: any;
  7 + axisColor: string;
  8 + // bestNoticer?: any;
  9 + // bottomNavId?: any;
  10 + cardItemId: string;
  11 + channelId: number;
  12 + // commentInfo?: any;
  13 + corner: string;
  14 + coverSize: string;
  15 + coverType: number;
  16 + coverUrl: string;
  17 + expIds: string;
  18 + extra: string;
  19 + // fullColumnImgUrls: any[];
  20 + // hasMore?: any;
  21 + itemId: string;
  22 + itemType: string;
  23 + itemTypeCode: string;
  24 + keyArticle: number;
  25 + // landscape?: any;
  26 + // likeStyle?: any;
  27 + linkUrl: string;
  28 + // liveInfo?: any;
  29 + menuShow: number;
  30 + newTags: string;
  31 + newsAuthor: string;
  32 + newsSubTitle: string;
  33 + newsSummary: string;
  34 + newsTitle: string;
  35 + newsTitleColor: string;
  36 + objectId: string;
  37 + objectLevel: string;
  38 + objectType: string;
  39 + // openComment?: any;
  40 + // openLikes?: any;
  41 + pageId: string;
  42 + // photoNum?: any;
  43 + // position?: any;
  44 + publishTime: string;
  45 + // pushTime?: any;
  46 + // pushUnqueId?: any;
  47 + readFlag: number;
  48 + // recommend?: any;
  49 + relId: number;
  50 + relObjectId: string;
  51 + relType: number;
  52 + // rmhInfo?: any;
  53 + rmhPlatform: number;
  54 + sceneId: string;
  55 + shareInfo: ShareInfo;
  56 + // slideShows: any[];
  57 + sortValue: number;
  58 + source: string;
  59 + subSceneId: string;
  60 + // tagIds: any[];
  61 + // tagWord?: any;
  62 + // titleShow?: any;
  63 + // titleShowPolicy?: any;
  64 + // topicTemplate?: any;
  65 + traceId: string;
  66 + traceInfo: string;
  67 + // userInfo?: any;
  68 + // videoInfo?: any;
  69 + visitorComment: number;
  70 + // voiceInfo?: any;
  71 +}
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 +import { Group } from './Group';
  2 +import { TopicInfo } from './TopicInfo';
  3 +
  4 +export interface PageInfoBean {
  5 + backIconUrl: string;
  6 + backgroundColor: string;
  7 + backgroundImgUrl: string;
  8 + baselineColor: string;
  9 + baselineCopywriting: string;
  10 + baselineShow: number;
  11 + description: string;
  12 + groups: Group[];
  13 + hasAdInfo: number;
  14 + hasPopUp: number;
  15 + id: number;
  16 + mainLogoImgUrl: string;
  17 + name: string;
  18 + pageTopType: number;
  19 + pageType: number;
  20 + pushupLogoImgUrl: string;
  21 + shareCoverUrl: string;
  22 + shareIconUrl: string;
  23 + shareName: string;
  24 + shareSummary: string;
  25 + shareUrl: string;
  26 + statusBarColor: string;
  27 + templateType: number;
  28 + titleColor: string;
  29 + topicInfo: TopicInfo;
  30 +}
  31 +
  32 +
  33 +
  1 +export interface ShareInfo {
  2 + shareCoverUrl: string;
  3 + shareOpen: number;
  4 + sharePosterCoverUrl: string;
  5 + sharePosterOpen: number;
  6 + shareSummary: string;
  7 + shareTitle: string;
  8 + shareUrl: string;
  9 +}
  1 +export interface TopicInfo {
  2 + axisColor: string;
  3 + commentFlag: number;
  4 + commentPreviewFlag: number;
  5 + commentShowFlag: number;
  6 + posterFlag: number;
  7 + posterUrl: string;
  8 + shareCoverUrl: string;
  9 + shareOpen: number;
  10 + sharePosterCoverUrl: string;
  11 + shareSummary: string;
  12 + shareTitle: string;
  13 + shareUrl: string;
  14 + slideColor: string;
  15 + summary: string;
  16 + title: string;
  17 + titleShow: number;
  18 + topicDate: string;
  19 + topicId: string;
  20 + topicPattern: number;
  21 + topicType: number;
  22 + transluceImgUrl: string;
  23 + visitorComment: number;
  24 +}
@@ -5,15 +5,25 @@ import { Logger } from 'wdKit'; @@ -5,15 +5,25 @@ import { Logger } from 'wdKit';
5 import { ENewspaperItemComponent } from './ENewspaperItemComponent'; 5 import { ENewspaperItemComponent } from './ENewspaperItemComponent';
6 import { ENewspaperListDialog } from '../dialog/ENewspaperListDialog'; 6 import { ENewspaperListDialog } from '../dialog/ENewspaperListDialog';
7 import display from '@ohos.display'; 7 import display from '@ohos.display';
  8 +import { ENewspaperCalendarDialog } from '../dialog/ENewspaperCalendarDialog';
  9 +import font from '@ohos.font';
8 10
9 @Component 11 @Component
10 export struct ENewspaperPageComponent { 12 export struct ENewspaperPageComponent {
11 @State newspaperListBean: NewspaperListBean = {} as NewspaperListBean 13 @State newspaperListBean: NewspaperListBean = {} as NewspaperListBean
12 @State currentPageNum: string = '01' 14 @State currentPageNum: string = '01'
13 @State pageNumPopup: boolean = false 15 @State pageNumPopup: boolean = false
14 - @State date: string = '2024-01-26' 16 + @State calendarPopup: boolean = false
  17 + @State calendarDateTitle: string = ''
15 @State picHeight: number = 0 18 @State picHeight: number = 0
16 private swiperController: SwiperController = new SwiperController() 19 private swiperController: SwiperController = new SwiperController()
  20 + calendarDialogController: CustomDialogController = new CustomDialogController({
  21 + builder: ENewspaperCalendarDialog(),
  22 + alignment: DialogAlignment.Top,
  23 + offset: { dx: 0, dy: 80 },
  24 + customStyle: true,
  25 + // cornerRadius: 4
  26 + })
17 listDialogController: CustomDialogController = new CustomDialogController({ 27 listDialogController: CustomDialogController = new CustomDialogController({
18 builder: ENewspaperListDialog({ newspaperListBean: this.newspaperListBean, 28 builder: ENewspaperListDialog({ newspaperListBean: this.newspaperListBean,
19 currentPageNum: this.currentPageNum, 29 currentPageNum: this.currentPageNum,
@@ -64,9 +74,10 @@ export struct ENewspaperPageComponent { @@ -64,9 +74,10 @@ export struct ENewspaperPageComponent {
64 }) 74 })
65 75
66 Row() { 76 Row() {
67 - Text(this.date) 77 + Text(this.calendarDateTitle)
68 .fontSize($r('app.float.font_size_20')) 78 .fontSize($r('app.float.font_size_20'))
69 .fontColor($r('app.color.white')) 79 .fontColor($r('app.color.white'))
  80 + .fontFamily('BebasNeue_Regular')
70 81
71 Image($r('app.media.icon_triangle')) 82 Image($r('app.media.icon_triangle'))
72 .width($r('app.float.border_radius_6')) 83 .width($r('app.float.border_radius_6'))
@@ -77,6 +88,14 @@ export struct ENewspaperPageComponent { @@ -77,6 +88,14 @@ export struct ENewspaperPageComponent {
77 .alignRules({ middle: { anchor: "__container__", align: HorizontalAlign.Center }, 88 .alignRules({ middle: { anchor: "__container__", align: HorizontalAlign.Center },
78 center: { anchor: "__container__", align: VerticalAlign.Center } }) 89 center: { anchor: "__container__", align: VerticalAlign.Center } })
79 .id('e_newspaper_date') 90 .id('e_newspaper_date')
  91 + .onClick(() => {
  92 + this.calendarPopup = !this.calendarPopup
  93 + if (this.calendarPopup) {
  94 + this.calendarDialogController.open()
  95 + } else {
  96 + this.calendarDialogController.close()
  97 + }
  98 + })
80 99
81 Image($r('app.media.icon_share')) 100 Image($r('app.media.icon_share'))
82 .height($r('app.float.top_arrow_size')) 101 .height($r('app.float.top_arrow_size'))
@@ -193,25 +212,25 @@ export struct ENewspaperPageComponent { @@ -193,25 +212,25 @@ export struct ENewspaperPageComponent {
193 } 212 }
194 213
195 async aboutToAppear() { 214 async aboutToAppear() {
  215 + //注册字体
  216 + font.registerFont({
  217 + familyName: 'BebasNeue_Regular',
  218 + // familySrc: '/font/roboto_medium_numbers.ttf' // font文件夹与pages目录同级
  219 + familySrc: $rawfile('font/BebasNeue_Regular.otf')
  220 + })
196 let newspaperTimes = await NewspaperViewModel.getNewspaperTime() 221 let newspaperTimes = await NewspaperViewModel.getNewspaperTime()
197 if (newspaperTimes && newspaperTimes.length > 0) { 222 if (newspaperTimes && newspaperTimes.length > 0) {
198 - this.date = newspaperTimes[0].date 223 + this.calendarDateTitle = newspaperTimes[0].date
199 } 224 }
200 try { 225 try {
201 let displayTool = display.getDefaultDisplaySync() 226 let displayTool = display.getDefaultDisplaySync()
202 let screenWidth = displayTool.width 227 let screenWidth = displayTool.width
203 let picWidth = screenWidth - vp2px(52) 228 let picWidth = screenWidth - vp2px(52)
204 this.picHeight = picWidth * 566 / 378 229 this.picHeight = picWidth * 566 / 378
205 - let listBean = await NewspaperViewModel.getNewspaperList(this.date, picWidth + 'x' + this.picHeight) 230 + let listBean = await NewspaperViewModel.getNewspaperList(this.calendarDateTitle, picWidth + 'x' + this.picHeight)
206 this.newspaperListBean = listBean; 231 this.newspaperListBean = listBean;
207 } catch (exception) { 232 } catch (exception) {
208 233
209 } 234 }
210 -  
211 -  
212 - }  
213 -  
214 - aboutToDisappear() {  
215 -  
216 } 235 }
217 } 236 }
1 -import { MorningEveningPaperDTO } from 'wdBean' 1 +import { MorningEveningPaperDTO, PageInfoBean } from 'wdBean'
  2 +import { Logger } from 'wdKit/Index';
2 import { DateTimeUtils } from 'wdKit/src/main/ets/utils/DateTimeUtils'; 3 import { DateTimeUtils } from 'wdKit/src/main/ets/utils/DateTimeUtils';
  4 +import { MorningEveningViewModel } from '../../viewmodel/MorningEveningViewModel';
3 import { AudioBarView } from './AudioBarView'; 5 import { AudioBarView } from './AudioBarView';
4 import { PaperTitleComponent } from './PaperTitleComponent'; 6 import { PaperTitleComponent } from './PaperTitleComponent';
5 import { SingleColumn999Component } from './SingleColumn999Component'; 7 import { SingleColumn999Component } from './SingleColumn999Component';
@@ -12,6 +14,8 @@ const PATTERN_DATE_CN_RN: string = 'yyyy年\nMM月dd日'; // 日期中包含包 @@ -12,6 +14,8 @@ const PATTERN_DATE_CN_RN: string = 'yyyy年\nMM月dd日'; // 日期中包含包
12 @Entry 14 @Entry
13 @Component 15 @Component
14 export struct MorningEveningPaperComponent { 16 export struct MorningEveningPaperComponent {
  17 + @State pageInfoBean: PageInfoBean = {} as PageInfoBean
  18 +
15 @State morningEveningPaperDTO: MorningEveningPaperDTO = { 19 @State morningEveningPaperDTO: MorningEveningPaperDTO = {
16 name: "新闻夜读", 20 name: "新闻夜读",
17 topicInfo: { 21 topicInfo: {
@@ -30,10 +34,21 @@ export struct MorningEveningPaperComponent { @@ -30,10 +34,21 @@ export struct MorningEveningPaperComponent {
30 } as MorningEveningPaperDTO 34 } as MorningEveningPaperDTO
31 @State subTitle: string = '' 35 @State subTitle: string = ''
32 36
33 - aboutToAppear() { 37 + async aboutToAppear() {
34 console.info(TAG, `aboutToAppear`); 38 console.info(TAG, `aboutToAppear`);
35 let dateTime = DateTimeUtils.parseDate(this.morningEveningPaperDTO?.topicInfo?.topicDate ?? '', DateTimeUtils.PATTERN_DATE_HYPHEN); 39 let dateTime = DateTimeUtils.parseDate(this.morningEveningPaperDTO?.topicInfo?.topicDate ?? '', DateTimeUtils.PATTERN_DATE_HYPHEN);
36 this.subTitle = DateTimeUtils.formatDate(dateTime, PATTERN_DATE_CN_RN) 40 this.subTitle = DateTimeUtils.formatDate(dateTime, PATTERN_DATE_CN_RN)
  41 +
  42 + try {
  43 + let listBean = await MorningEveningViewModel.getMorningEveningPageInfo("28927")
  44 + Logger.info(TAG,"listBean title = "+listBean.topicInfo.title)
  45 + Logger.info(TAG,"listBean topicDate = "+listBean.topicInfo.topicDate)
  46 + this.pageInfoBean = listBean;
  47 + let compInfoBean = await MorningEveningViewModel.getMorningEveningCompInfo("28927")
  48 + Logger.info(TAG,"compInfoBean compStyle = "+compInfoBean.compList[0].compStyle)
  49 + } catch (exception) {
  50 +
  51 + }
37 } 52 }
38 53
39 build() { 54 build() {
  1 +import { RMCalendarBean } from './RMCalendarBean'
  2 +import { RMCalenderCell } from './RMCalendarCell'
  3 +
  4 +const TAG = "RMCalendar"
  5 +
  6 +@Component
  7 +export struct RMCalendar {
  8 + @State selectItem: RMCalendarBean = new RMCalendarBean()
  9 + private today: Date = new Date() // 当天
  10 + // 开始日期
  11 + startDate: Date = new Date()
  12 + // 截止日期
  13 + endDate: Date = new Date()
  14 + //当前日期-当前显示的月份的第一天
  15 + private startDay: Date = new Date(
  16 + this.today.getFullYear(),
  17 + this.today.getMonth(),
  18 + 1
  19 + )
  20 + // 是否有上一个月
  21 + @State private hasPre: boolean = true
  22 + // 是否有下一个月
  23 + @State private hasNext: boolean = true
  24 + // 标题栏高度
  25 + titleHeight: Length = '50vp'
  26 + // 星期标题
  27 + weeks: string[] = ["日", "一", "二", "三", "四", "五", "六",]
  28 + // 星期标题字体大小
  29 + weekTitleFontSize: number | string | Resource = 12
  30 + // 星期标题字体颜色
  31 + weekTitleFontColor: ResourceColor = "#999999"
  32 + // 星期标栏高度
  33 + weekTitleHeight: Length = 30
  34 + weekFontWeight: FontWeight = FontWeight.Bold
  35 + // 标题字体大小
  36 + titleFontSize: number | string | Resource = 16
  37 + // 标题字体颜色
  38 + titleFontColor: ResourceColor = "#333333"
  39 + titleFontWeight: FontWeight = FontWeight.Bold
  40 + // 日期每一项字体大小
  41 + itemFontSize: number | string | Resource = 14
  42 + itemFontColor: ResourceColor = "#333333"
  43 + itemFontWeight: FontWeight = FontWeight.Bold
  44 + // 今日字体颜色
  45 + todayFontColor: ResourceColor = "#ED2800"
  46 + // 不能使用的日期字体颜色
  47 + disabledFontColor: ResourceColor = "#CCCCCC"
  48 + // 选中日期字体颜色
  49 + selectFontColor: ResourceColor = "#FFFFFF"
  50 + // 选中日期背景颜色, 默认与todayFontColor一致
  51 + selectItemBgColor: ResourceColor = "#ED2800"
  52 + @State private title: string = ''
  53 + // 计算的总加载
  54 + @State dates: Array<RMCalendarBean> = new Array()
  55 + // 已选日期
  56 + @State selectedDates: Array<RMCalendarBean> = new Array()
  57 + // 自定义每一项布局
  58 + public cellLayout?: (item: RMCalendarBean) => void
  59 + // 仅自定义 今日 样式,当使用cellLayout时,tadayLayout无效
  60 + todayLayout?: (item: RMCalendarBean) => void
  61 + // 计算item时,如需添加更多自定义属性时使用
  62 + reBuildDateItem?: (item: RMCalendarBean) => RMCalendarBean
  63 + // 选择变化监听,
  64 + onDateChange?: (date1: RMCalendarBean) => void
  65 + onMonthChange?: (after: Date, befor: Date) => void
  66 + // 不可选中项的点击事件
  67 + disableCellClick?: (item: RMCalendarBean) => void
  68 +
  69 + @Builder
  70 + createWeekTitle(item: string) {
  71 + Text(item)
  72 + .textAlign(TextAlign.Center)
  73 + .fontColor(this.weekTitleFontColor)
  74 + .fontSize(this.weekTitleFontSize)
  75 + .fontWeight(this.weekFontWeight)
  76 + .layoutWeight(1)
  77 + }
  78 +
  79 + @Builder
  80 + createCell() {
  81 + ForEach(this.dates, (item: RMCalendarBean) => {
  82 + RMCalenderCell({
  83 + item: item,
  84 + cellLayout: this.cellLayout,
  85 + itemFontSize: this.itemFontSize,
  86 + itemFontColor: this.itemFontColor,
  87 + today: this.today.getTime(),
  88 + itemFontWeight: this.itemFontWeight,
  89 + todayFontColor: this.todayFontColor,
  90 + todayLayout: this.todayLayout,
  91 + selectItem: $selectItem,
  92 + selectFontColor: this.selectFontColor,
  93 + selectItemBgColor: this.selectItemBgColor,
  94 + selectedDates: $selectedDates,
  95 + disabledFontColor: this.disabledFontColor,
  96 + hasPre: this.hasPre,
  97 + hasNext: this.hasNext,
  98 + disableClick: (item: RMCalendarBean) => {
  99 + if (this.disableCellClick) {
  100 + this.disableCellClick(item)
  101 + }
  102 + },
  103 + cellClick: (item: RMCalendarBean) => {
  104 + if (item.isPre) {
  105 + this.preMonth()
  106 + } else if (item.isNext) {
  107 + this.nextMonth()
  108 + }
  109 + if (this.onDateChange) {
  110 + this.onDateChange(item)
  111 + if (item.fullYear && item.month) {
  112 + this.title = `${item.fullYear}年${item.month + 1}月`
  113 + }
  114 + }
  115 + }
  116 + })
  117 + .width(`14.28%`)
  118 + }, (item: RMCalendarBean) => JSON.stringify(item))
  119 + }
  120 +
  121 + /**
  122 + * 属性初始化
  123 + */
  124 + initAttr() {
  125 + if (!this.selectItemBgColor) {
  126 + this.selectItemBgColor = this.todayFontColor
  127 + }
  128 + this.today = new Date(
  129 + this.today.getFullYear(),
  130 + this.today.getMonth(),
  131 + this.today.getDate(),
  132 + )
  133 +
  134 + // 开始日期
  135 + if (!this.startDate) {
  136 + this.startDate = new Date(1970, 0, 1)
  137 + }
  138 + // 截止日期
  139 + if (!this.endDate) {
  140 + this.endDate = new Date(this.today.getFullYear() + 10, 11, 31)
  141 + }
  142 +
  143 + if (this.today.getTime() < this.startDate.getTime()) {
  144 + this.startDay.setTime(this.startDate.getTime())
  145 + } else if (this.today.getTime() > this.endDate.getTime()) {
  146 + this.startDay.setTime(this.endDate.getTime())
  147 + } else {
  148 + this.startDay.setTime(this.today.getTime())
  149 + }
  150 + }
  151 +
  152 + aboutToAppear() {
  153 + this.initAttr()
  154 + let temp = new RMCalendarBean()
  155 + temp.time = this.today.getTime()
  156 + this.selectItem = temp
  157 + this.calcDatas()
  158 + }
  159 +
  160 + /**
  161 + * 下一个月
  162 + */
  163 + private nextMonth() {
  164 + // this.dates.slice(0, this.dates.length)
  165 + this.dates = []
  166 + const beforDate = new Date(this.startDay.getFullYear(), this.startDay.getMonth())
  167 + this.startDay.setMonth(this.startDay.getMonth() + 1)
  168 + if (this.onMonthChange) {
  169 + this.onMonthChange(new Date(this.startDay.getFullYear(), this.startDay.getMonth()), beforDate)
  170 + }
  171 + this.calcDatas()
  172 + }
  173 +
  174 + /**
  175 + * 上一个月
  176 + */
  177 + private preMonth() {
  178 + // this.dates.slice(0, this.dates.length)
  179 + this.dates = []
  180 + const beforDate = new Date(this.startDay.getFullYear(), this.startDay.getMonth())
  181 + this.startDay.setMonth(this.startDay.getMonth() - 1)
  182 + if (this.onMonthChange) {
  183 + this.onMonthChange(new Date(this.startDay.getFullYear(), this.startDay.getMonth()), beforDate)
  184 + }
  185 + this.calcDatas()
  186 + }
  187 +
  188 + /**
  189 + * 具体计算
  190 + */
  191 + private calcDatas() {
  192 + const startDay = this.startDay
  193 + this.title = `${startDay.getFullYear()}年${startDay.getMonth() + 1}月`
  194 + startDay.setDate(1)
  195 +
  196 + if (startDay.getFullYear() < this.startDate.getFullYear()
  197 + || (startDay.getFullYear() == this.startDate.getFullYear() && startDay.getMonth() <= this.startDate.getMonth())) {
  198 + this.hasPre = false
  199 + } else {
  200 + this.hasPre = true
  201 + }
  202 +
  203 + if (startDay.getFullYear() > this.endDate.getFullYear()
  204 + || (startDay.getFullYear() == this.endDate.getFullYear() && startDay.getMonth() >= this.endDate.getMonth())) {
  205 + this.hasNext = false
  206 + } else {
  207 + this.hasNext = true
  208 + }
  209 +
  210 + // 计算第一个月
  211 + // 获取第一个月总天数
  212 + let endDay: Date = new Date(
  213 + startDay.getFullYear(),
  214 + startDay.getMonth() + 1,
  215 + 0, 23, 59, 59)
  216 +
  217 + let tempDate: Date = new Date(
  218 + startDay.getFullYear(),
  219 + startDay.getMonth(),
  220 + startDay.getDate()
  221 + )
  222 +
  223 + const count = endDay.getDate()
  224 + const preCount = startDay.getDay()
  225 + // const nextCount = 6 - endDay.getDay()
  226 + const nextCount = 0
  227 + const finilCount = count + preCount + nextCount
  228 +
  229 + // 补齐上一个月
  230 + tempDate.setDate(tempDate.getDate() - preCount)
  231 +
  232 + // 添加日期
  233 + for (let index = 0; index < finilCount; index++) {
  234 + let item = new RMCalendarBean(
  235 + tempDate.getFullYear(),
  236 + tempDate.getMonth(),
  237 + tempDate.getDate(),
  238 + tempDate.getDay(),
  239 + tempDate.getTime(),
  240 + // @ ts-ignore
  241 + // LunarCalendar.convertSolarToLunar(tempDate),
  242 + (index < preCount ? true : false) || this.startDate.getTime() > tempDate.getTime(),
  243 + (index >= preCount + count ? true : false) || this.endDate.getTime() < tempDate.getTime(),
  244 + )
  245 + if (this.reBuildDateItem) {
  246 + this.reBuildDateItem(item)
  247 + }
  248 + this.dates.push(item)
  249 + tempDate.setDate(tempDate.getDate() + 1)
  250 + }
  251 + }
  252 +
  253 + build() {
  254 + Column() {
  255 + Image($r("app.media.iv_e_news_pager_calendar_arrow_up"))
  256 + .width(18).height(8.5)
  257 + Column() {
  258 + Row() {
  259 + Column() {
  260 + Image(this.hasPre ? $r("app.media.iv_e_news_pager_calendar_arrow_pre")
  261 + : $r("app.media.iv_e_news_pager_calendar_arrow_pre_gray"))
  262 + .width(22)
  263 + .aspectRatio(1)
  264 + }
  265 + .justifyContent(FlexAlign.Center)
  266 + .height("100%")
  267 + .aspectRatio(1)
  268 + .onClick(() => {
  269 + if (this.hasPre) {
  270 + this.preMonth()
  271 + }
  272 + })
  273 +
  274 + Blank()
  275 + Row() {
  276 + Text(this.title)
  277 + .fontSize(this.titleFontSize)
  278 + .fontColor(this.titleFontColor)
  279 + .fontWeight(this.titleFontWeight)
  280 + }
  281 +
  282 + Blank()
  283 + Column() {
  284 + Image(this.hasNext ? $r("app.media.iv_e_news_pager_calendar_arrow_next")
  285 + : $r("app.media.iv_e_news_pager_calendar_arrow_next_gray"))
  286 + .width(22)
  287 + .aspectRatio(1)
  288 + }
  289 + .justifyContent(FlexAlign.Center)
  290 + .height("100%")
  291 + .aspectRatio(1)
  292 + .onClick(() => {
  293 + if (this.hasNext) {
  294 + this.nextMonth()
  295 + }
  296 + })
  297 + }
  298 + .alignItems(VerticalAlign.Center)
  299 + .width("100%")
  300 + .height(this.titleHeight)
  301 +
  302 + // 星期title
  303 + Row() {
  304 + ForEach(this.weeks, (item: string) => {
  305 + this.createWeekTitle(item)
  306 + }, (item: string) => {
  307 + return item
  308 + })
  309 + }
  310 + .alignItems(VerticalAlign.Center)
  311 + .height(this.weekTitleHeight)
  312 +
  313 + Flex({ wrap: FlexWrap.Wrap }) {
  314 + this.createCell()
  315 + }
  316 + .width("100%")
  317 + }
  318 + .backgroundColor(Color.White)
  319 + .margin({
  320 + left: 35,
  321 + right: 35
  322 + })
  323 + .border({ radius: 4 })
  324 + }
  325 + }
  326 +}
  1 +@Observed
  2 +export class RMCalendarBean {
  3 + fullYear?: number
  4 + month?: number
  5 + date?: number
  6 + week?: number
  7 + time?: number
  8 + isPre?: boolean // 是否是上一个月的 / 在startDate 之前
  9 + isNext?: boolean // 是否是下一个月的 / 在endDate 之后
  10 +
  11 + constructor(fullYear?: number, month?: number,
  12 + date?: number, day?: number,
  13 + time?: number,
  14 + isPre?: boolean,
  15 + isNext?: boolean) {
  16 + this.fullYear = fullYear
  17 + this.month = month
  18 + this.date = date
  19 + this.week = day
  20 + this.time = time
  21 + this.isPre = isPre
  22 + this.isNext = isNext
  23 + }
  24 +}
  1 +import { RMCalendarBean } from './RMCalendarBean';
  2 +import font from '@ohos.font';
  3 +
  4 +@Component
  5 +export struct RMCalenderCell {
  6 + private selectOpacity: number = 0.15
  7 + itemFontSize: Length = 0
  8 + itemFontColor: ResourceColor = {} as ResourceColor
  9 + itemFontWeight: FontWeight = FontWeight.Normal
  10 + todayFontColor: ResourceColor = {} as ResourceColor
  11 + selectFontColor: ResourceColor = {} as ResourceColor
  12 + selectItemBgColor: ResourceColor = {} as ResourceColor
  13 + disabledFontColor: ResourceColor = {} as ResourceColor
  14 + // 今日时间戳
  15 + today: number = 0
  16 + @Link selectItem: RMCalendarBean
  17 + @Link selectedDates: Array<RMCalendarBean>
  18 + @Prop hasPre: boolean
  19 + @Prop hasNext: boolean
  20 + @ObjectLink item: RMCalendarBean
  21 + // 自定义每一项布局
  22 + cellLayout?: (item: RMCalendarBean) => void
  23 + todayLayout?: (item: RMCalendarBean) => void
  24 + cellClick?: (item: RMCalendarBean) => void
  25 + disableClick?: (item: RMCalendarBean) => void
  26 +
  27 + /**
  28 + * 检测是否包含在数组中
  29 + */
  30 + checkInArrays() {
  31 + for (let index = 0; index < this.selectedDates.length; index++) {
  32 + if (this.item.time == this.selectedDates[index].time) {
  33 + return index
  34 + }
  35 + }
  36 + return -1
  37 + }
  38 +
  39 + getItemColor() {
  40 + if (this.item.isPre) {
  41 + return this.disabledFontColor
  42 + } else if (this.item.isNext) {
  43 + return this.disabledFontColor
  44 + } else if (this.selectItem && this.selectItem.time == this.item.time) {
  45 + return this.selectFontColor
  46 + } else if (this.item.time == this.today) {
  47 + return this.todayFontColor
  48 + }
  49 + return this.itemFontColor
  50 + }
  51 +
  52 + getBorder() {
  53 + if (this.selectItem && this.selectItem.time == this.item.time) {
  54 + return this.border({
  55 + width: 1,
  56 + color: this.getItemColor()
  57 + })
  58 + } else {
  59 + return this.border({
  60 + width: 0,
  61 + }
  62 + )
  63 + }
  64 + }
  65 +
  66 + /**
  67 + * 获取选中项背景颜色
  68 + */
  69 + getSelectItemBg() {
  70 + return this.selectItemBgColor
  71 + }
  72 +
  73 + /**
  74 + * 获取选中项背景透明度
  75 + * @returns
  76 + */
  77 + getSelectItemBgOpa() {
  78 + return this.item.isPre || this.item.isNext ? this.selectOpacity : 1
  79 + }
  80 +
  81 + /**
  82 + * 是否需要显示选项背景
  83 + */
  84 + isShowSelectBg() {
  85 + return this.selectItem && this.selectItem.time == this.item.time
  86 + }
  87 +
  88 + build() {
  89 + Column() {
  90 + Stack() {
  91 + if (!this.item.isPre) {
  92 + if (this.isShowSelectBg()) {
  93 + Column()// .position({ x: "10%", y: "10%" })
  94 + .height("80%")
  95 + .aspectRatio(1)// .borderRadius(999)
  96 + .backgroundColor(this.getSelectItemBg())
  97 + .opacity(this.getSelectItemBgOpa())
  98 + .transition({ type: TransitionType.Insert, opacity: 1 })
  99 + .transition({ type: TransitionType.Delete, opacity: 0 })
  100 + }
  101 + Text(this.item.date + '')
  102 + .fontSize(this.itemFontSize)
  103 + .fontColor(this.getItemColor())
  104 + .fontWeight(this.itemFontWeight)
  105 + .fontFamily('BebasNeue_Regular')
  106 + }
  107 + }
  108 + // .justifyContent(FlexAlign.Center)
  109 + .aspectRatio(1)
  110 + // .border(this.getBorder())
  111 + .width("80%")
  112 + }
  113 + .justifyContent(FlexAlign.Center)
  114 + // .width("100%")
  115 + // .aspectRatio(1)
  116 + .onClick(() => {
  117 + // animateTo({ duration: 200 }, () => {
  118 + //
  119 + // })
  120 +
  121 + if (this.item.isNext) {
  122 + if (!this.hasNext) {
  123 + if (this.disableClick) {
  124 + this.disableClick(this.item)
  125 + }
  126 + return
  127 + }
  128 + }
  129 + if (this.item.isPre) {
  130 + // if (!this.hasPre) {
  131 + if (this.disableClick) {
  132 + this.disableClick(this.item)
  133 + }
  134 + return
  135 + // }
  136 + }
  137 + this.selectItem = this.item
  138 + if (this.cellClick) {
  139 + this.cellClick(this.item)
  140 + }
  141 + })
  142 + }
  143 +}
  1 +import { Logger, StringUtils } from 'wdKit'
1 import { WDRouterPage, WDRouterRule } from 'wdRouter' 2 import { WDRouterPage, WDRouterRule } from 'wdRouter'
2 3
3 @Component 4 @Component
4 export default struct MinePageUserSimpleInfoUI { 5 export default struct MinePageUserSimpleInfoUI {
5 @Prop isLogin:boolean 6 @Prop isLogin:boolean
  7 + @Prop userName:string
  8 + @Consume('isLogin')@Watch('loginChange') isLogin2:Record<string,string>
  9 + loginChange(){
  10 + Logger.debug("isLogin",'MinePageUserSimpleInfoUI')
  11 + if(this.isLogin2){
  12 + this.isLogin=true
  13 + this.userName=this.isLogin2['userName']
  14 + }
  15 + }
6 16
7 build(){ 17 build(){
8 Row(){ 18 Row(){
@@ -21,14 +31,16 @@ export default struct MinePageUserSimpleInfoUI { @@ -21,14 +31,16 @@ export default struct MinePageUserSimpleInfoUI {
21 .height('110lpx') 31 .height('110lpx')
22 .alignContent(Alignment.Center) 32 .alignContent(Alignment.Center)
23 .onClick(()=>{ 33 .onClick(()=>{
24 - WDRouterRule.jumpWithPage(WDRouterPage.loginPage) 34 + if(!this.isLogin){
  35 + WDRouterRule.jumpWithPage(WDRouterPage.loginPage)
  36 + }
25 }) 37 })
26 38
27 if(this.isLogin){ 39 if(this.isLogin){
28 //昵称信息 40 //昵称信息
29 Column(){ 41 Column(){
30 Row(){ 42 Row(){
31 - Text("人民日报6G5E3T") 43 + Text(this.userName)
32 .fontColor($r('app.color.color_222222')) 44 .fontColor($r('app.color.color_222222'))
33 .maxLines(1) 45 .maxLines(1)
34 .textOverflow({ overflow: TextOverflow.Ellipsis }) 46 .textOverflow({ overflow: TextOverflow.Ellipsis })
1 -import { MineAppointmentItem } from '../../viewmodel/MineAppointmentItem' 1 +import { MineAppointmentItem } from '../../../viewmodel/MineAppointmentItem'
2 2
3 @Component 3 @Component
4 export struct AppointmentListChildComponent{ 4 export struct AppointmentListChildComponent{
1 -import { AppointmentListChildComponent } from '../mine/AppointmentListChildComponent';  
2 -import { CustomTitleUI } from '../reusable/CustomTitleUI'  
3 -import { ListHasNoMoreDataUI } from '../reusable/ListHasNoMoreDataUI';  
4 -import { MineAppointmentItem } from '../../viewmodel/MineAppointmentItem'; 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'; 5 import { LazyDataSource, StringUtils } from 'wdKit';
6 -import MinePageDatasModel from '../../model/MinePageDatasModel'; 6 +import MinePageDatasModel from '../../../model/MinePageDatasModel';
7 const TAG = "AppointmentListUI" 7 const TAG = "AppointmentListUI"
8 8
9 @Component 9 @Component
10 export struct AppointmentListUI{ 10 export struct AppointmentListUI{
11 @State data: LazyDataSource<MineAppointmentItem> = new LazyDataSource(); 11 @State data: LazyDataSource<MineAppointmentItem> = new LazyDataSource();
  12 + @State count:number = 0;
12 @State isLoading:boolean = false 13 @State isLoading:boolean = false
13 @State hasMore:boolean = true 14 @State hasMore:boolean = true
14 curPageNum:number = 1; 15 curPageNum:number = 1;
@@ -21,35 +22,39 @@ export struct AppointmentListUI{ @@ -21,35 +22,39 @@ export struct AppointmentListUI{
21 Column() { 22 Column() {
22 //标题栏目 23 //标题栏目
23 CustomTitleUI({titleName:"预约列表"}) 24 CustomTitleUI({titleName:"预约列表"})
24 - //刷新控件 TODO  
25 - //List  
26 - List({ space: '6lpx' }) {  
27 - LazyForEach(this.data, (item: MineAppointmentItem, index: number) => {  
28 - ListItem() {  
29 - AppointmentListChildComponent({item:item})  
30 - }  
31 - .onClick(()=>{  
32 - //TODO 跳转  
33 - })  
34 - }, (item: MineAppointmentItem, index: number) => index.toString()) 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())
35 39
36 - //没有更多数据 显示提示  
37 - if(!this.hasMore){  
38 - ListItem(){  
39 - ListHasNoMoreDataUI() 40 + //没有更多数据 显示提示
  41 + if(!this.hasMore){
  42 + ListItem(){
  43 + ListHasNoMoreDataUI()
  44 + }
40 } 45 }
41 - }  
42 - }.cachedCount(4)  
43 - .scrollBar(BarState.Off)  
44 - .margin({top:'23lpx',left:'23lpx',right:'23lpx'})  
45 - .layoutWeight(1)  
46 - .onReachEnd(()=>{  
47 - console.log(TAG,"触底了");  
48 - if(!this.isLoading){  
49 - //加载分页数据  
50 - this.getNewPageData()  
51 - }  
52 - }) 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 + }
53 } 58 }
54 .backgroundColor($r('app.color.color_F9F9F9')) 59 .backgroundColor($r('app.color.color_F9F9F9'))
55 .height('100%') 60 .height('100%')
@@ -72,6 +77,7 @@ export struct AppointmentListUI{ @@ -72,6 +77,7 @@ export struct AppointmentListUI{
72 } 77 }
73 }) 78 })
74 this.data.notifyDataReload() 79 this.data.notifyDataReload()
  80 + this.count = this.data.totalCount()
75 if (this.data.totalCount() < value.totalCount) { 81 if (this.data.totalCount() < value.totalCount) {
76 this.curPageNum++ 82 this.curPageNum++
77 }else { 83 }else {
1 -import { ResourcesUtils } from 'wdKit'  
2 -import { ResponseDTO } from 'wdNetwork' 1 +import MinePageDatasModel from '../../../model/MinePageDatasModel'
3 import { FollowListItem } from '../../../viewmodel/FollowListItem' 2 import { FollowListItem } from '../../../viewmodel/FollowListItem'
4 import { CustomTitleUI } from '../../reusable/CustomTitleUI' 3 import { CustomTitleUI } from '../../reusable/CustomTitleUI'
5 import { FollowSecondTabsComponent } from './FollowSecondTabsComponent' 4 import { FollowSecondTabsComponent } from './FollowSecondTabsComponent'
6 - 5 +const TAG = "FollowFirstTabsComponent"
7 @Component 6 @Component
8 export struct FollowFirstTabsComponent{ 7 export struct FollowFirstTabsComponent{
9 @State currentIndex: number = 0 8 @State currentIndex: number = 0
@@ -13,17 +12,18 @@ export struct FollowFirstTabsComponent{ @@ -13,17 +12,18 @@ export struct FollowFirstTabsComponent{
13 selectedFontColor: string = '#000000' 12 selectedFontColor: string = '#000000'
14 13
15 aboutToAppear(){ 14 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[]> 15 // 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 => { 16 // res.data.forEach(element => {
19 // this.data.push(element) 17 // this.data.push(element)
20 // }); 18 // });
21 -  
22 - ResourcesUtils.getResourcesJson<ResponseDTO<FollowListItem[]>>(getContext(this),'follow_list_data.json').then((success)=>{  
23 - success.data?.forEach(element => {  
24 - this.data.push(element)  
25 - }); 19 + MinePageDatasModel.getFollowListData(getContext(this)).then((value)=>{
  20 + this.data.push(new FollowListItem("我的"))
  21 + value.forEach((element)=>{
  22 + this.data.push(element)
  23 + })
26 console.log("ycg",this.data.length.toString()); 24 console.log("ycg",this.data.length.toString());
  25 + }).catch((err:Error)=>{
  26 + console.log(TAG,JSON.stringify(err))
27 }) 27 })
28 } 28 }
29 29
1 -import { LazyDataSource } from 'wdKit'; 1 +import { LazyDataSource, StringUtils } from 'wdKit';
  2 +import MinePageDatasModel from '../../../model/MinePageDatasModel';
2 import { FollowListDetailItem } from '../../../viewmodel/FollowListDetailItem' 3 import { FollowListDetailItem } from '../../../viewmodel/FollowListDetailItem'
  4 +import { FollowListDetailRequestItem } from '../../../viewmodel/FollowListDetailRequestItem';
  5 +import { FollowListStatusRequestItem } from '../../../viewmodel/FollowListStatusRequestItem';
  6 +import { MineFollowListDetailItem } from '../../../viewmodel/MineFollowListDetailItem';
  7 +import { QueryListIsFollowedItem } from '../../../viewmodel/QueryListIsFollowedItem';
3 import { ListHasNoMoreDataUI } from '../../reusable/ListHasNoMoreDataUI'; 8 import { ListHasNoMoreDataUI } from '../../reusable/ListHasNoMoreDataUI';
4 9
5 const TAG = "FollowListDetailUI" 10 const TAG = "FollowListDetailUI"
@@ -7,11 +12,10 @@ const TAG = "FollowListDetailUI" @@ -7,11 +12,10 @@ const TAG = "FollowListDetailUI"
7 export struct FollowListDetailUI{ 12 export struct FollowListDetailUI{
8 @State creatorDirectoryId:number = -1; 13 @State creatorDirectoryId:number = -1;
9 @State data: LazyDataSource<FollowListDetailItem> = new LazyDataSource(); 14 @State data: LazyDataSource<FollowListDetailItem> = new LazyDataSource();
  15 + @State count:number = 0;
10 @State isLoading:boolean = false 16 @State isLoading:boolean = false
11 @State hasMore:boolean = true 17 @State hasMore:boolean = true
12 curPageNum:number = 1; 18 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 19
16 aboutToAppear(){ 20 aboutToAppear(){
17 console.log("YCG","aboutToAppear==="+this.creatorDirectoryId); 21 console.log("YCG","aboutToAppear==="+this.creatorDirectoryId);
@@ -20,59 +24,129 @@ export struct FollowListDetailUI{ @@ -20,59 +24,129 @@ export struct FollowListDetailUI{
20 24
21 build(){ 25 build(){
22 Column(){ 26 Column(){
23 - List({ space: 3 }) {  
24 - LazyForEach(this.data, (item: FollowListDetailItem, index: number = 0) => {  
25 - ListItem() {  
26 - ChildComponent({data: item}) 27 + if(this.count === 0){
  28 + ListHasNoMoreDataUI({style:2})
  29 + .height('100%')
  30 + }else{
  31 + List({ space: 3 }) {
  32 + LazyForEach(this.data, (item: FollowListDetailItem, index: number = 0) => {
  33 + ListItem() {
  34 + ChildComponent({data: item})
  35 + }
  36 + .onClick(() => {
  37 + })
  38 + }, (item: FollowListDetailItem, index: number) => index.toString())
  39 +
  40 + //没有更多数据 显示提示
  41 + if(!this.hasMore){
  42 + ListItem(){
  43 + ListHasNoMoreDataUI()
  44 + }
27 } 45 }
28 - .onClick(() => {  
29 - })  
30 - }, (item: FollowListDetailItem, index: number) => index.toString()) 46 + }.cachedCount(7)
  47 + .padding({left:'31lpx',right:'31lpx'})
  48 + .layoutWeight(1)
  49 + .scrollBar(BarState.Off)
  50 + .onReachEnd(()=>{
  51 + console.log(TAG,"触底了");
  52 + if(!this.isLoading){
  53 + this.isLoading = true
  54 + //加载分页数据
  55 + this.getNewPageData()
  56 + }
  57 + })
  58 + }
  59 + }
  60 + .width('100%')
  61 + }
31 62
  63 + getNewPageData(){
  64 + this.isLoading = true
  65 + //我的关注列表
  66 + if (this.creatorDirectoryId === -1){
  67 + if(this.hasMore){
  68 + let object = new FollowListDetailRequestItem(20,this.curPageNum)
32 69
33 - //没有更多数据 显示提示  
34 - if(!this.hasMore){  
35 - ListItem(){  
36 - ListHasNoMoreDataUI() 70 + MinePageDatasModel.getMineFollowListData(object,getContext(this)).then((value)=>{
  71 + if (!this.data || value.list.length == 0){
  72 + this.hasMore = false
  73 + }else{
  74 + value.list.forEach((value)=>{
  75 + this.data.push(new FollowListDetailItem(value.attentionHeadPhotoUrl,value.attentionUserName,value.fansNum,value.introduction,value.attentionCreatorId,"1"))
  76 + })
  77 + this.data.notifyDataReload()
  78 + this.count = this.data.totalCount()
  79 + if (this.data.totalCount() < value.totalCount) {
  80 + this.curPageNum++
  81 + }else {
  82 + this.hasMore = false
  83 + }
37 } 84 }
  85 + this.isLoading = false
  86 + }).catch((err:Error)=>{
  87 + console.log(TAG,"请求失败")
  88 + this.isLoading = false
  89 + })
  90 + }
  91 + }else{
  92 + if(this.hasMore){
  93 + if(this.creatorDirectoryId === 120){
  94 + console.log("console");
38 } 95 }
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) 96 + let object = new FollowListDetailRequestItem(this.creatorDirectoryId,20,this.curPageNum)
  97 +
  98 + MinePageDatasModel.getFollowListDetailData(object,getContext(this)).then((value)=>{
  99 + if (!this.data || value.list.length == 0){
  100 + this.hasMore = false
  101 + this.isLoading = false
  102 + }else{
  103 + this.getFollowListStatus(value)
  104 + }
  105 + }).catch((err:Error)=>{
  106 + console.log(TAG,"请求失败")
  107 + this.isLoading = false
  108 + })
  109 + }
  110 + }
51 } 111 }
52 112
53 - getNewPageData(){  
54 - if(this.hasMore){  
55 - if(this.curPageNum>=4){ 113 + getFollowListStatus(value:MineFollowListDetailItem){
  114 + let status = new FollowListStatusRequestItem()
  115 + let data : FollowListDetailItem[] = []
  116 + value.list.forEach((item)=>{
  117 + status.creatorIds.push(new QueryListIsFollowedItem(item.creatorId))
  118 + data.push(new FollowListDetailItem(item.headPhotoUrl,item.cnUserName,item.cnFansNum,item.introduction,item.creatorId,"0"))
  119 + })
  120 +
  121 + MinePageDatasModel.getFollowListStatusData(status,getContext(this)).then((newValue)=>{
  122 + newValue.forEach((item)=>{
  123 + data.forEach((list)=>{
  124 + if (item.creatorId == list.creatorId) {
  125 + list.status = item.status
  126 + }
  127 + })
  128 + })
  129 +
  130 + data.forEach((item)=>{
  131 + this.data.push(new FollowListDetailItem(item.headPhotoUrl,item.cnUserName,item.cnFansNum,item.introduction,item.creatorId,item.status))
  132 + })
  133 +
  134 + this.data.notifyDataReload()
  135 +
  136 + this.count = this.data.totalCount()
  137 + if (this.data.totalCount() < value.totalCount) {
  138 + this.curPageNum++
  139 + }else {
56 this.hasMore = false 140 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 } 141 }
  142 +
72 this.isLoading = false 143 this.isLoading = false
73 - this.curPageNum++  
74 - } 144 + }).catch((err:Error)=>{
  145 + console.log(TAG,"请求失败")
  146 + this.isLoading = false
  147 + })
75 } 148 }
  149 +
76 } 150 }
77 151
78 @Component 152 @Component
@@ -84,7 +158,7 @@ struct ChildComponent { @@ -84,7 +158,7 @@ struct ChildComponent {
84 Blank().height('27lpx') 158 Blank().height('27lpx')
85 159
86 Row() { 160 Row() {
87 - Image(this.data.headPhotoUrl) 161 + Image(StringUtils.isEmpty(this.data.headPhotoUrl)?$r('app.media.default_head'):this.data.headPhotoUrl)
88 .objectFit(ImageFit.Auto) 162 .objectFit(ImageFit.Auto)
89 .width('92lpx') 163 .width('92lpx')
90 .height('92lpx') 164 .height('92lpx')
@@ -108,7 +182,7 @@ struct ChildComponent { @@ -108,7 +182,7 @@ struct ChildComponent {
108 }.layoutWeight(1) 182 }.layoutWeight(1)
109 .alignItems(HorizontalAlign.Start) 183 .alignItems(HorizontalAlign.Start)
110 184
111 - if(this.data.isFollow){ 185 + if(this.data.status == "1"){
112 Row(){ 186 Row(){
113 Text(`已关注`) 187 Text(`已关注`)
114 .fontColor($r('app.color.color_CCCCCC')) 188 .fontColor($r('app.color.color_CCCCCC'))
@@ -117,13 +191,14 @@ struct ChildComponent { @@ -117,13 +191,14 @@ struct ChildComponent {
117 .lineHeight('35lpx') 191 .lineHeight('35lpx')
118 }.backgroundColor($r('app.color.color_F5F5F5')) 192 }.backgroundColor($r('app.color.color_F5F5F5'))
119 .borderRadius('6lpx') 193 .borderRadius('6lpx')
  194 + .borderColor($r('app.color.color_F5F5F5'))
120 .borderWidth('2lpx') 195 .borderWidth('2lpx')
121 .justifyContent(FlexAlign.Center) 196 .justifyContent(FlexAlign.Center)
122 .width('100lpx') 197 .width('100lpx')
123 .height('46lpx') 198 .height('46lpx')
124 .margin({left:'4lpx',top:'23lpx'}) 199 .margin({left:'4lpx',top:'23lpx'})
125 .onClick(()=>{ 200 .onClick(()=>{
126 - this.data.isFollow = false 201 + this.data.status = "0"
127 }) 202 })
128 }else{ 203 }else{
129 Row(){ 204 Row(){
@@ -136,7 +211,7 @@ struct ChildComponent { @@ -136,7 +211,7 @@ struct ChildComponent {
136 .fontSize('23lpx') 211 .fontSize('23lpx')
137 .fontWeight('500lpx') 212 .fontWeight('500lpx')
138 .lineHeight('35lpx') 213 .lineHeight('35lpx')
139 - }.borderColor($r('app.color.color_ED2800')) 214 + }.borderColor($r('app.color.color_1AED2800'))
140 .borderRadius('6lpx') 215 .borderRadius('6lpx')
141 .borderWidth('2lpx') 216 .borderWidth('2lpx')
142 .justifyContent(FlexAlign.Center) 217 .justifyContent(FlexAlign.Center)
@@ -144,7 +219,7 @@ struct ChildComponent { @@ -144,7 +219,7 @@ struct ChildComponent {
144 .height('46lpx') 219 .height('46lpx')
145 .margin({left:'4lpx',top:'23lpx'}) 220 .margin({left:'4lpx',top:'23lpx'})
146 .onClick(()=>{ 221 .onClick(()=>{
147 - this.data.isFollow = true 222 + this.data.status = "1"
148 }) 223 })
149 } 224 }
150 }.alignItems(VerticalAlign.Top) 225 }.alignItems(VerticalAlign.Top)
1 -import { AppointmentListUI } from '../mine/AppointmentListUI' 1 +import { AppointmentListUI } from '../mine/appointment/AppointmentListUI'
2 2
3 const TAG = "AppointmentListPage" 3 const TAG = "AppointmentListPage"
4 4
@@ -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}`);
@@ -7,6 +7,8 @@ import MinePagePersonFunctionUI from '../mine/MinePagePersonFunctionUI' @@ -7,6 +7,8 @@ import MinePagePersonFunctionUI from '../mine/MinePagePersonFunctionUI'
7 import MinePageCardUI from '../mine/MinePageCardUI' 7 import MinePageCardUI from '../mine/MinePageCardUI'
8 import MinePageCreatorFunctionUI from '../mine/MinePageCreatorFunctionUI' 8 import MinePageCreatorFunctionUI from '../mine/MinePageCreatorFunctionUI'
9 import MinePageMoreFunctionUI from '../mine/MinePageMoreFunctionUI' 9 import MinePageMoreFunctionUI from '../mine/MinePageMoreFunctionUI'
  10 +import { SPHelper, StringUtils } from 'wdKit'
  11 +import { SpConstants } from 'wdConstant'
10 12
11 const TAG = 'MinePageComponent'; 13 const TAG = 'MinePageComponent';
12 14
@@ -18,14 +20,14 @@ export struct MinePageComponent { @@ -18,14 +20,14 @@ export struct MinePageComponent {
18 //是否是创作者 20 //是否是创作者
19 @State isCreator:boolean = false 21 @State isCreator:boolean = false
20 @State isLogin:boolean = false 22 @State isLogin:boolean = false
  23 + @State userName:string = "登陆注册"
21 @State personalData:MinePagePersonalFunctionsItem[] = [] 24 @State personalData:MinePagePersonalFunctionsItem[] = []
22 @State creatorData:MinePageCreatorFunctionsItem[] = [] 25 @State creatorData:MinePageCreatorFunctionsItem[] = []
23 @State moreData:MinePageMoreFunctionModel[] = [] 26 @State moreData:MinePageMoreFunctionModel[] = []
24 scroller: Scroller = new Scroller() 27 scroller: Scroller = new Scroller()
25 28
26 aboutToAppear(){ 29 aboutToAppear(){
27 - //登录信息 TODO  
28 - 30 + this.getUserLogin()
29 this.getFunctionData() 31 this.getFunctionData()
30 } 32 }
31 33
@@ -59,7 +61,7 @@ export struct MinePageComponent { @@ -59,7 +61,7 @@ export struct MinePageComponent {
59 @Builder MinePageUI(){ 61 @Builder MinePageUI(){
60 Column(){ 62 Column(){
61 //头像层 63 //头像层
62 - MinePageUserSimpleInfoUI({isLogin:this.isLogin}) 64 + MinePageUserSimpleInfoUI({isLogin:this.isLogin,userName:this.userName})
63 //Grid 区域 65 //Grid 区域
64 MinePagePersonFunctionUI({personalData:$personalData}) 66 MinePagePersonFunctionUI({personalData:$personalData})
65 //Card 67 //Card
@@ -77,4 +79,16 @@ export struct MinePageComponent { @@ -77,4 +79,16 @@ export struct MinePageComponent {
77 .height('100%') 79 .height('100%')
78 } 80 }
79 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 +
80 } 93 }
  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 == 0 ? 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 @Component 1 @Component
2 export struct ListHasNoMoreDataUI{ 2 export struct ListHasNoMoreDataUI{
  3 + @State style:number = 1;
  4 +
3 build(){ 5 build(){
4 - Row(){  
5 - Text("已显示全部内容")  
6 - .fontColor($r('app.color.color_999999'))  
7 - .fontWeight('500lpx')  
8 - .fontSize('23lpx')  
9 - }.justifyContent(FlexAlign.Center)  
10 - .width('100%')  
11 - .margin({top:'20lpx',bottom:'20lpx'}) 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 +
12 } 32 }
13 } 33 }
  1 +import { RMCalendar } from '../components/calendar/RMCalendar'
  2 +import { RMCalendarBean } from '../components/calendar/RMCalendarBean'
  3 +
  4 +@CustomDialog
  5 +export struct ENewspaperCalendarDialog {
  6 + calendarDialogController?: CustomDialogController
  7 +
  8 + build() {
  9 + RMCalendar({
  10 + // 开始日期
  11 + startDate: new Date(2023, 8, 1),
  12 + // 截止日期
  13 + endDate: new Date(2024, 2, 20),
  14 + // 日期选择变化监听
  15 + onDateChange: (date1: RMCalendarBean) => {
  16 + console.log("onDateChange", "date1:", JSON.stringify(date1))
  17 + if (this.calendarDialogController) {
  18 + this.calendarDialogController.close()
  19 + }
  20 + }
  21 + })
  22 + }
  23 +}
@@ -6,6 +6,13 @@ import HashMap from '@ohos.util.HashMap'; @@ -6,6 +6,13 @@ import HashMap from '@ohos.util.HashMap';
6 import { HttpUrlUtils, ResponseDTO, WDHttp } from 'wdNetwork'; 6 import { HttpUrlUtils, ResponseDTO, WDHttp } from 'wdNetwork';
7 import { MineAppointmentListItem } from '../viewmodel/MineAppointmentListItem'; 7 import { MineAppointmentListItem } from '../viewmodel/MineAppointmentListItem';
8 import { Logger, ResourcesUtils } from 'wdKit'; 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 +import { MineFollowListItem } from '../viewmodel/MineFollowListItem';
  13 +import { QueryListIsFollowedItem } from '../viewmodel/QueryListIsFollowedItem';
  14 +import { FollowListStatusRequestItem } from '../viewmodel/FollowListStatusRequestItem';
  15 +
9 const TAG = "MinePageDatasModel" 16 const TAG = "MinePageDatasModel"
10 17
11 /** 18 /**
@@ -83,6 +90,12 @@ class MinePageDatasModel{ @@ -83,6 +90,12 @@ class MinePageDatasModel{
83 return this.moreData 90 return this.moreData
84 } 91 }
85 92
  93 + /**
  94 + * 预约
  95 + * @param pageSize
  96 + * @param pageNum
  97 + * @returns
  98 + */
86 fetchAppointmentListData(pageSize:string,pageNum:string) { 99 fetchAppointmentListData(pageSize:string,pageNum:string) {
87 let url = HttpUrlUtils.getAppointmentListDataUrl()+ `?pageSize=${pageSize}&pageNum=${pageNum}` 100 let url = HttpUrlUtils.getAppointmentListDataUrl()+ `?pageSize=${pageSize}&pageNum=${pageNum}`
88 let headers: HashMap<string, string> = HttpUrlUtils.getYcgCommonHeaders(); 101 let headers: HashMap<string, string> = HttpUrlUtils.getYcgCommonHeaders();
@@ -93,8 +106,7 @@ class MinePageDatasModel{ @@ -93,8 +106,7 @@ class MinePageDatasModel{
93 return new Promise<MineAppointmentListItem>((success, error) => { 106 return new Promise<MineAppointmentListItem>((success, error) => {
94 Logger.info(TAG, `getAppointmentList start`); 107 Logger.info(TAG, `getAppointmentList start`);
95 this.fetchAppointmentListData(pageSize,pageNum).then((navResDTO: ResponseDTO<MineAppointmentListItem>) => { 108 this.fetchAppointmentListData(pageSize,pageNum).then((navResDTO: ResponseDTO<MineAppointmentListItem>) => {
96 - if (!navResDTO) {  
97 - error("page data invalid"); 109 + if (!navResDTO || navResDTO.code != 0) {
98 success(this.getAppointmentListDataLocal(context)) 110 success(this.getAppointmentListDataLocal(context))
99 return 111 return
100 } 112 }
@@ -103,7 +115,6 @@ class MinePageDatasModel{ @@ -103,7 +115,6 @@ class MinePageDatasModel{
103 success(navigationBean); 115 success(navigationBean);
104 }).catch((err: Error) => { 116 }).catch((err: Error) => {
105 Logger.error(TAG, `fetchAppointmentListDataApi catch, error.name : ${err.name}, error.message:${err.message}`); 117 Logger.error(TAG, `fetchAppointmentListDataApi catch, error.name : ${err.name}, error.message:${err.message}`);
106 - // error(err);  
107 success(this.getAppointmentListDataLocal(context)) 118 success(this.getAppointmentListDataLocal(context))
108 }) 119 })
109 }) 120 })
@@ -120,6 +131,169 @@ class MinePageDatasModel{ @@ -120,6 +131,169 @@ class MinePageDatasModel{
120 return compRes.data 131 return compRes.data
121 } 132 }
122 133
  134 + /**
  135 + * 关注频道详情
  136 + * @param pageSize
  137 + * @param pageNum
  138 + * @param context
  139 + * @returns
  140 + */
  141 + getFollowListDetailData(params:FollowListDetailRequestItem,context: Context): Promise<MineFollowListDetailItem> {
  142 + return new Promise<MineFollowListDetailItem>((success, error) => {
  143 + Logger.info(TAG, `getAppointmentList start`);
  144 + this.fetchFollowListDetailData(params).then((navResDTO: ResponseDTO<MineFollowListDetailItem>) => {
  145 + if (!navResDTO || navResDTO.code != 0) {
  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 + success(this.getFollowListDetailDataLocal(context))
  155 + })
  156 + })
  157 + }
  158 +
  159 + async getFollowListDetailDataLocal(context: Context): Promise<MineFollowListDetailItem> {
  160 + Logger.info(TAG, `getBottomNavDataMock start`);
  161 + let compRes: ResponseDTO<MineFollowListDetailItem> | null = await ResourcesUtils.getResourcesJson<ResponseDTO<MineFollowListDetailItem>>(context,'follow_list_detail_data_id120.json' );
  162 + if (!compRes || !compRes.data) {
  163 + Logger.info(TAG, `getAppointmentListDataLocal compRes is empty`);
  164 + return new MineFollowListDetailItem()
  165 + }
  166 + Logger.info(TAG, `getAppointmentListDataLocal getResourcesJsonSync compRes : ${JSON.stringify(compRes)}`);
  167 + return compRes.data
  168 + }
  169 +
  170 + fetchFollowListDetailData(object:FollowListDetailRequestItem) {
  171 + let url = HttpUrlUtils.getFollowListDetailDataUrl()
  172 + let headers: HashMap<string, string> = HttpUrlUtils.getYcgCommonHeaders();
  173 + return WDHttp.post<ResponseDTO<MineFollowListDetailItem>>(url, object,headers)
  174 + };
  175 +
  176 + /**
  177 + * 关注频道列表
  178 + * @returns
  179 + */
  180 + fetchFollowListData() {
  181 + let url = HttpUrlUtils.getFollowListDataUrl()
  182 + let headers: HashMap<string, string> = HttpUrlUtils.getYcgCommonHeaders();
  183 + return WDHttp.get<ResponseDTO<FollowListItem[]>>(url, headers)
  184 + };
  185 +
  186 + getFollowListData(context: Context): Promise<FollowListItem[]> {
  187 + return new Promise<FollowListItem[]>((success, error) => {
  188 + Logger.info(TAG, `getAppointmentList start`);
  189 + this.fetchFollowListData().then((navResDTO: ResponseDTO<FollowListItem[]>) => {
  190 + if (!navResDTO || navResDTO.code != 0) {
  191 + success(this.getFollowListDataLocal(context))
  192 + return
  193 + }
  194 + Logger.info(TAG, "getAppointmentList then,AppointmentResDTO.timeStamp:" + navResDTO.timestamp);
  195 + let navigationBean = navResDTO.data as FollowListItem[]
  196 + success(navigationBean);
  197 + }).catch((err: Error) => {
  198 + Logger.error(TAG, `fetchAppointmentListDataApi catch, error.name : ${err.name}, error.message:${err.message}`);
  199 + success(this.getFollowListDataLocal(context))
  200 + })
  201 + })
  202 + }
  203 +
  204 + async getFollowListDataLocal(context: Context): Promise<FollowListItem[]> {
  205 + Logger.info(TAG, `getFollowListDataLocal start`);
  206 + let compRes: ResponseDTO<FollowListItem[]> | null = await ResourcesUtils.getResourcesJson<ResponseDTO<FollowListItem[]>>(context,'follow_list_data.json' );
  207 + if (!compRes || !compRes.data) {
  208 + Logger.info(TAG, `getFollowListDataLocal compRes is empty`);
  209 + return []
  210 + }
  211 + Logger.info(TAG, `getFollowListDataLocal getResourcesJsonSync compRes : ${JSON.stringify(compRes)}`);
  212 + return compRes.data
  213 + }
  214 +
  215 + /**
  216 + * 我的关注列表
  217 + * @param params
  218 + * @param context
  219 + * @returns
  220 + */
  221 + getMineFollowListData(params:FollowListDetailRequestItem,context: Context): Promise<MineFollowListItem> {
  222 + return new Promise<MineFollowListItem>((success, error) => {
  223 + Logger.info(TAG, `getAppointmentList start`);
  224 + this.fetchMineDetailFollowListData(params).then((navResDTO: ResponseDTO<MineFollowListItem>) => {
  225 + if (!navResDTO || navResDTO.code != 0) {
  226 + success(this.getMineFollowListDataLocal(context))
  227 + return
  228 + }
  229 + Logger.info(TAG, "getAppointmentList then,AppointmentResDTO.timeStamp:" + navResDTO.timestamp);
  230 + let navigationBean = navResDTO.data as MineFollowListItem
  231 + success(navigationBean);
  232 + }).catch((err: Error) => {
  233 + Logger.error(TAG, `fetchAppointmentListDataApi catch, error.name : ${err.name}, error.message:${err.message}`);
  234 + success(this.getMineFollowListDataLocal(context))
  235 + })
  236 + })
  237 + }
  238 +
  239 + fetchMineDetailFollowListData(object:FollowListDetailRequestItem) {
  240 + let url = HttpUrlUtils.getMineFollowListDataUrl()+`?pageSize=${object.pageSize}&pageNum=${object.pageNum}`
  241 + let headers: HashMap<string, string> = HttpUrlUtils.getYcgCommonHeaders();
  242 + return WDHttp.get<ResponseDTO<MineFollowListItem>>(url, headers)
  243 + };
  244 +
  245 + async getMineFollowListDataLocal(context: Context): Promise<MineFollowListItem> {
  246 + Logger.info(TAG, `getMineFollowListDataLocal start`);
  247 + let compRes: ResponseDTO<MineFollowListItem> | null = await ResourcesUtils.getResourcesJson<ResponseDTO<MineFollowListItem>>(context,'mine_follow_list_data.json' );
  248 + if (!compRes || !compRes.data) {
  249 + Logger.info(TAG, `getMineFollowListDataLocal compRes is empty`);
  250 + return new MineFollowListItem()
  251 + }
  252 + Logger.info(TAG, `getMineFollowListDataLocal getResourcesJsonSync compRes : ${JSON.stringify(compRes)}`);
  253 + return compRes.data
  254 + }
  255 +
  256 + /**
  257 + * 查询是否被关注 列表
  258 + * @param params
  259 + * @param context
  260 + * @returns
  261 + */
  262 + getFollowListStatusData(params:FollowListStatusRequestItem,context: Context): Promise<QueryListIsFollowedItem[]> {
  263 + return new Promise<QueryListIsFollowedItem[]>((success, error) => {
  264 + Logger.info(TAG, `getAppointmentList start`);
  265 + this.fetchFollowListStatusData(params).then((navResDTO: ResponseDTO<QueryListIsFollowedItem[]>) => {
  266 + if (!navResDTO || navResDTO.code != 0) {
  267 + success(this.getFollowListStatusDataLocal(context))
  268 + return
  269 + }
  270 + Logger.info(TAG, "getAppointmentList then,AppointmentResDTO.timeStamp:" + navResDTO.timestamp);
  271 + let navigationBean = navResDTO.data as QueryListIsFollowedItem[]
  272 + success(navigationBean);
  273 + }).catch((err: Error) => {
  274 + Logger.error(TAG, `fetchAppointmentListDataApi catch, error.name : ${err.name}, error.message:${err.message}`);
  275 + success(this.getFollowListStatusDataLocal(context))
  276 + })
  277 + })
  278 + }
  279 +
  280 + fetchFollowListStatusData(object:FollowListStatusRequestItem) {
  281 + let url = HttpUrlUtils.getFollowListStatusDataUrl()
  282 + let headers: HashMap<string, string> = HttpUrlUtils.getYcgCommonHeaders();
  283 + return WDHttp.post<ResponseDTO<QueryListIsFollowedItem[]>>(url,object, headers)
  284 + };
  285 +
  286 + async getFollowListStatusDataLocal(context: Context): Promise<QueryListIsFollowedItem[]> {
  287 + Logger.info(TAG, `getMineFollowListDataLocal start`);
  288 + let compRes: ResponseDTO<QueryListIsFollowedItem[]> | null = await ResourcesUtils.getResourcesJson<ResponseDTO<QueryListIsFollowedItem[]>>(context,'follow_list_id120_isfocus_data.json' );
  289 + if (!compRes || !compRes.data) {
  290 + Logger.info(TAG, `getMineFollowListDataLocal compRes is empty`);
  291 + return []
  292 + }
  293 + Logger.info(TAG, `getMineFollowListDataLocal getResourcesJsonSync compRes : ${JSON.stringify(compRes)}`);
  294 + return compRes.data
  295 + }
  296 +
123 297
124 } 298 }
125 299
1 import HashMap from '@ohos.util.HashMap'; 1 import HashMap from '@ohos.util.HashMap';
2 import { HttpUrlUtils, ResponseDTO, WDHttp } from 'wdNetwork'; 2 import { HttpUrlUtils, ResponseDTO, WDHttp } from 'wdNetwork';
3 -import { DateTimeUtils } from 'wdKit'; 3 +import { DateTimeUtils, Logger } from 'wdKit';
4 import { ContentDetailDTO, NavigationBodyDTO, PageDTO,InteractDataDTO, MorningEveningPaperDTO, 4 import { ContentDetailDTO, NavigationBodyDTO, PageDTO,InteractDataDTO, MorningEveningPaperDTO,
5 NewspaperTimeInfoBean, 5 NewspaperTimeInfoBean,
6 - NewspaperListBean 6 + NewspaperListBean,
  7 + PageInfoBean,
  8 + CompInfoBean
7 } from 'wdBean'; 9 } from 'wdBean';
8 - 10 +const TAG = 'HttpRequest';
9 export class PageRepository { 11 export class PageRepository {
10 static getBottomNavGroupUrl() { 12 static getBottomNavGroupUrl() {
11 // https: //pd-apis-uat.pdnews.cn/api/rmrb-bff-display-zh/display/zh/c/bottomNavGroup 13 // https: //pd-apis-uat.pdnews.cn/api/rmrb-bff-display-zh/display/zh/c/bottomNavGroup
@@ -22,6 +24,7 @@ export class PageRepository { @@ -22,6 +24,7 @@ export class PageRepository {
22 + "&refreshTime=" + DateTimeUtils.getTimeStamp() 24 + "&refreshTime=" + DateTimeUtils.getTimeStamp()
23 + "&pageId=" + pageId 25 + "&pageId=" + pageId
24 // Logger.debug("TAG", 'getCompInfoUrl url: '+url); 26 // Logger.debug("TAG", 'getCompInfoUrl url: '+url);
  27 + Logger.info(TAG,"getPageInfoUrl url = "+url)
25 return url; 28 return url;
26 } 29 }
27 30
@@ -39,6 +42,7 @@ export class PageRepository { @@ -39,6 +42,7 @@ export class PageRepository {
39 + "&pageSize=" + pageSize 42 + "&pageSize=" + pageSize
40 + "&pageNum=" + currentPage; 43 + "&pageNum=" + currentPage;
41 // Logger.debug("TAG", 'getCompInfoUrl url: '+url); 44 // Logger.debug("TAG", 'getCompInfoUrl url: '+url);
  45 + Logger.info(TAG,"getCompInfoUrl url = "+url)
42 return url; 46 return url;
43 } 47 }
44 48
@@ -48,16 +52,19 @@ export class PageRepository { @@ -48,16 +52,19 @@ export class PageRepository {
48 + "&contentId=" + contentId 52 + "&contentId=" + contentId
49 + "&relType=" + relType; 53 + "&relType=" + relType;
50 // Logger.debug("TAG", 'getCompInfoUrl url: '+url); 54 // Logger.debug("TAG", 'getCompInfoUrl url: '+url);
  55 + Logger.info(TAG,"getDetailInfoUrl url = "+url)
51 return url; 56 return url;
52 } 57 }
53 58
54 static getInteractDataUrl() { 59 static getInteractDataUrl() {
55 let url = HttpUrlUtils.getHost() + HttpUrlUtils.INTERACT_DATA_PATH; 60 let url = HttpUrlUtils.getHost() + HttpUrlUtils.INTERACT_DATA_PATH;
  61 + Logger.info(TAG,"getInteractDataUrl url = "+url)
56 return url; 62 return url;
57 } 63 }
58 64
59 static getNewspaperInfoUrl() { 65 static getNewspaperInfoUrl() {
60 let url = HttpUrlUtils.getHost() + HttpUrlUtils.E_NEWSPAPER_INFO_PATH; 66 let url = HttpUrlUtils.getHost() + HttpUrlUtils.E_NEWSPAPER_INFO_PATH;
  67 + Logger.info(TAG,"getNewspaperInfoUrl url = "+url)
61 return url; 68 return url;
62 } 69 }
63 70
@@ -65,6 +72,28 @@ export class PageRepository { @@ -65,6 +72,28 @@ export class PageRepository {
65 let url = HttpUrlUtils.getHost() + HttpUrlUtils.E_NEWSPAPER_LIST_PATH; 72 let url = HttpUrlUtils.getHost() + HttpUrlUtils.E_NEWSPAPER_LIST_PATH;
66 url = url + "?date=" + date 73 url = url + "?date=" + date
67 + "&pagesSize=" + pageSize; 74 + "&pagesSize=" + pageSize;
  75 + Logger.info(TAG,"getNewspaperListUrl url = "+url)
  76 + return url;
  77 + }
  78 +
  79 + /**
  80 + * 早晚报pageInfo请求
  81 + * */
  82 + static getMorningEveningPageInfoUrl(pageId: string) {
  83 + let url = HttpUrlUtils.getHost() + HttpUrlUtils.MORNING_EVENING_PAGE_INFO_PATH;
  84 + url = url + "?pageId=" + pageId;
  85 + Logger.info(TAG,"getMorningEveningPageInfoUrl url = "+url)
  86 + return url;
  87 + }
  88 +
  89 + /**
  90 + * 早晚报compInfo请求
  91 + * */
  92 + static getMorningEveningCompInfoUrl(pageId: string) {
  93 + let url = HttpUrlUtils.getHost() + HttpUrlUtils.MORNING_EVENING_COMP_INFO_PATH;
  94 + url = url + "?loadStrategy=first_load&pageNum=1&refreshTime=1710853254592&pageId="
  95 + +pageId+"&channelStrategy=2&groupId=40621&topicId=10000009445&pageSize=20";
  96 + Logger.info(TAG,"getMorningEveningCompInfoUrl url = "+url)
68 return url; 97 return url;
69 } 98 }
70 99
@@ -118,4 +147,22 @@ export class PageRepository { @@ -118,4 +147,22 @@ export class PageRepository {
118 let headers: HashMap<string, string> = HttpUrlUtils.getCommonHeaders(); 147 let headers: HashMap<string, string> = HttpUrlUtils.getCommonHeaders();
119 return WDHttp.get<ResponseDTO<NewspaperListBean>>(url, headers) 148 return WDHttp.get<ResponseDTO<NewspaperListBean>>(url, headers)
120 }; 149 };
  150 +
  151 + /**
  152 + * 获取早晚报pageInfo
  153 + * */
  154 + static fetchMorningEveningPageInfo(pageId: string) {
  155 + let url = PageRepository.getMorningEveningPageInfoUrl(pageId)
  156 + let headers: HashMap<string, string> = HttpUrlUtils.getCommonHeaders();
  157 + return WDHttp.get<ResponseDTO<PageInfoBean>>(url, headers)
  158 + };
  159 +
  160 + /**
  161 + * 获取早晚报compInfo
  162 + * */
  163 + static fetchMorningEveningCompInfo(pageId: string) {
  164 + let url = PageRepository.getMorningEveningCompInfoUrl(pageId)
  165 + let headers: HashMap<string, string> = HttpUrlUtils.getCommonHeaders();
  166 + return WDHttp.get<ResponseDTO<CompInfoBean>>(url, headers)
  167 + };
121 } 168 }
@@ -65,12 +65,20 @@ export class FollowListDetailItem{ @@ -65,12 +65,20 @@ export class FollowListDetailItem{
65 cnUserName:string //昵称 65 cnUserName:string //昵称
66 cnFansNum:number //粉丝数 66 cnFansNum:number //粉丝数
67 introduction:string //介绍 67 introduction:string //介绍
68 - isFollow:boolean = false //是否已经关注 68 + status:string = "0" //是否已经关注
  69 + creatorId:string = ""
69 70
70 - constructor(headPhotoUrl:string,cnUserName:string,cnFansNum:number,introduction:string) { 71 + attentionCreatorId:string = ""
  72 + attentionHeadPhotoUrl:string = ""
  73 + attentionUserName:string = ""
  74 + fansNum :number = 0
  75 +
  76 + constructor(headPhotoUrl:string,cnUserName:string,cnFansNum:number,introduction:string,creatorId:string,status:string ) {
71 this.headPhotoUrl = headPhotoUrl 77 this.headPhotoUrl = headPhotoUrl
72 this.cnUserName = cnUserName 78 this.cnUserName = cnUserName
73 this.cnFansNum = cnFansNum 79 this.cnFansNum = cnFansNum
74 this.introduction = introduction 80 this.introduction = introduction
  81 + this.creatorId = creatorId
  82 + this.status = status
75 } 83 }
76 } 84 }
  1 +export class FollowListDetailRequestItem{
  2 + creatorDirectoryId:number = -1
  3 + pageSize:number = 20
  4 + pageNum:number = 1
  5 +
  6 + constructor(creatorDirectoryId: number = -1,
  7 + pageSize: number = 20,
  8 + pageNum: number = 1) {
  9 + this.creatorDirectoryId = creatorDirectoryId
  10 + this.pageSize = pageSize
  11 + this.pageNum = pageNum
  12 + }
  13 +}
@@ -40,7 +40,7 @@ export class FollowListItem{ @@ -40,7 +40,7 @@ export class FollowListItem{
40 } 40 }
41 directoryName:string = "" 41 directoryName:string = ""
42 directoryWeight:number = 0 42 directoryWeight:number = 0
43 - id:number = 0 43 + id:number = -1
44 isShow:number = 1 44 isShow:number = 1
45 level:number = 1 45 level:number = 1
46 parentId:number = 0 46 parentId:number = 0
  1 +import { QueryListIsFollowedItem } from './QueryListIsFollowedItem'
  2 +
  3 +// {"creatorIds":[{"creatorId":"3004862"},{"creatorId":"3004855"}]}
  4 +
  5 +export class FollowListStatusRequestItem{
  6 + creatorIds:QueryListIsFollowedItem[] = []
  7 +}
  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 +import { MineFollowListDetailItem } from './MineFollowListDetailItem'
  2 +
  3 +export class MineFollowListItem extends MineFollowListDetailItem{
  4 + hasNext: number = 0
  5 +}
1 - 1 +import { CompInfoBean, PageInfoBean } from 'wdBean/Index';
  2 +import { Logger } from 'wdKit/Index';
  3 +import { ResponseDTO } from 'wdNetwork/Index';
  4 +import { PageRepository } from '../repository/PageRepository';
2 5
3 const TAG = 'MorningEveningViewModel' 6 const TAG = 'MorningEveningViewModel'
4 7
5 export class MorningEveningViewModel { 8 export class MorningEveningViewModel {
6 9
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>) => { 10 + static async getMorningEveningPageInfo(pageId: string): Promise<PageInfoBean> {
  11 + return new Promise<PageInfoBean>((success, error) => {
  12 + Logger.info(TAG, `getMorningEveningPageInfo pageInfo start`);
  13 + PageRepository.fetchMorningEveningPageInfo(pageId).then((resDTO: ResponseDTO<PageInfoBean>) => {
  14 + if (!resDTO || !resDTO.data) {
  15 + Logger.error(TAG, 'getMorningEveningPageInfo then navResDTO is empty');
  16 + error('resDTO is empty');
  17 + return
  18 + }
  19 + if (resDTO.code != 0) {
  20 + Logger.error(TAG, `getMorningEveningPageInfo then code:${resDTO.code}, message:${resDTO.message}`);
  21 + error('resDTO Response Code is failure');
  22 + return
  23 + }
  24 + // let navResStr = JSON.stringify(navResDTO);
  25 + Logger.info(TAG, "getMorningEveningPageInfo then,navResDTO.timestamp:" + resDTO.timestamp);
  26 + success(resDTO.data);
  27 + }).catch((err: Error) => {
  28 + Logger.error(TAG, `getMorningEveningPageInfo catch, error.name : ${err.name}, error.message:${err.message}`);
  29 + error(err);
  30 + })
  31 + })
  32 + }
  33 +
  34 + static async getMorningEveningCompInfo(pageId: string): Promise<CompInfoBean> {
  35 + return new Promise<CompInfoBean>((success, error) => {
  36 + Logger.info(TAG, `getMorningEveningCompInfo pageInfo start`);
  37 + PageRepository.fetchMorningEveningCompInfo(pageId).then((resDTO: ResponseDTO<CompInfoBean>) => {
11 if (!resDTO || !resDTO.data) { 38 if (!resDTO || !resDTO.data) {
12 - Logger.error(TAG, 'getNewspaperList then navResDTO is empty'); 39 + Logger.error(TAG, 'getMorningEveningCompInfo then navResDTO is empty');
13 error('resDTO is empty'); 40 error('resDTO is empty');
14 return 41 return
15 } 42 }
16 if (resDTO.code != 0) { 43 if (resDTO.code != 0) {
17 - Logger.error(TAG, `getNewspaperList then code:${resDTO.code}, message:${resDTO.message}`); 44 + Logger.error(TAG, `getMorningEveningCompInfo then code:${resDTO.code}, message:${resDTO.message}`);
18 error('resDTO Response Code is failure'); 45 error('resDTO Response Code is failure');
19 return 46 return
20 } 47 }
21 // let navResStr = JSON.stringify(navResDTO); 48 // let navResStr = JSON.stringify(navResDTO);
22 - Logger.info(TAG, "getNewspaperList then,navResDTO.timestamp:" + resDTO.timestamp); 49 + Logger.info(TAG, "getMorningEveningCompInfo then,navResDTO.timestamp:" + resDTO.timestamp);
23 success(resDTO.data); 50 success(resDTO.data);
24 }).catch((err: Error) => { 51 }).catch((err: Error) => {
25 - Logger.error(TAG, `getNewspaperList catch, error.name : ${err.name}, error.message:${err.message}`); 52 + Logger.error(TAG, `getMorningEveningCompInfo catch, error.name : ${err.name}, error.message:${err.message}`);
26 error(err); 53 error(err);
27 }) 54 })
28 }) 55 })
  1 +
  2 +// "creatorId": "3004862",
  3 +// "status": "0",
  4 +// "userId": "567387477063621"
  5 +
  6 +export class QueryListIsFollowedItem{
  7 + creatorId:string = "-1"
  8 + status:string = "0"
  9 + userId:string = ""
  10 +
  11 + constructor(creatorId: string) {
  12 + this.creatorId = creatorId
  13 + }
  14 +}
@@ -98,6 +98,10 @@ @@ -98,6 +98,10 @@
98 { 98 {
99 "name":"color_EDEDED", 99 "name":"color_EDEDED",
100 "value": "#EDEDED" 100 "value": "#EDEDED"
  101 + },
  102 + {
  103 + "name": "color_1AED2800",
  104 + "value": "#1AED2800"
101 } 105 }
102 ] 106 ]
103 } 107 }
  1 +import { WDRouterPage } from 'wdRouter/src/main/ets/router/WDRouterPage'
  2 +import { WDRouterRule } from 'wdRouter/src/main/ets/router/WDRouterRule'
  3 +import { Params } from '../../../../../../../commons/wdRouter/oh_modules/wdBean/Index'
  4 +
1 @CustomDialog 5 @CustomDialog
2 export struct CustomProtocolDialog { 6 export struct CustomProtocolDialog {
3 controller: CustomDialogController 7 controller: CustomDialogController
@@ -19,9 +23,17 @@ export struct CustomProtocolDialog { @@ -19,9 +23,17 @@ export struct CustomProtocolDialog {
19 .margin({ top: 20 }) 23 .margin({ top: 20 })
20 Text() { 24 Text() {
21 Span("为保障您的合法权益,请阅读并同意").fontSize(14).fontColor("#666666") 25 Span("为保障您的合法权益,请阅读并同意").fontSize(14).fontColor("#666666")
22 - Span("《用户协议》").fontSize(14).fontColor("#ED2800") 26 + Span("《用户协议》").fontSize(14).fontColor("#ED2800").onClick(()=>{
  27 + let bean={contentId:"1",pageID:""} as Params
  28 + WDRouterRule.jumpWithPage(WDRouterPage.loginProtocolPage,bean)
  29 + this.controller.close()
  30 + })
23 Span("及").fontSize(14).fontColor("#666666") 31 Span("及").fontSize(14).fontColor("#666666")
24 - Span("《隐私政策》").fontSize(14).fontColor("#ED2800") 32 + Span("《隐私政策》").fontSize(14).fontColor("#ED2800").onClick(()=>{
  33 + let bean={contentId:"2",pageID:""} as Params
  34 + WDRouterRule.jumpWithPage(WDRouterPage.loginProtocolPage,bean)
  35 + this.controller.close()
  36 + })
25 Span("后进行登录").fontSize(14).fontColor("#666666") 37 Span("后进行登录").fontSize(14).fontColor("#666666")
26 }.margin({ top: 12, left: 16, right: 16 }) 38 }.margin({ top: 12, left: 16, right: 16 })
27 39
@@ -8,6 +8,7 @@ export struct LoginInputComponent { @@ -8,6 +8,7 @@ export struct LoginInputComponent {
8 @State codeBtnState: boolean = false //发送验证码控件是否可以 默认不可用 8 @State codeBtnState: boolean = false //发送验证码控件是否可以 默认不可用
9 @Link isCodeSend: boolean //验证码控件是否点击 默认没有 发送接口 9 @Link isCodeSend: boolean //验证码控件是否点击 默认没有 发送接口
10 @Link isSubmit: boolean //是否可以提交 10 @Link isSubmit: boolean //是否可以提交
  11 + isFirst:boolean=true//是否第一次获取验证码
11 12
12 build() { 13 build() {
13 Column() { 14 Column() {
@@ -50,7 +51,7 @@ export struct LoginInputComponent { @@ -50,7 +51,7 @@ export struct LoginInputComponent {
50 this.isSubmit = (this.phoneContent.length >= 11 && this.codeContent.length >= 6) 51 this.isSubmit = (this.phoneContent.length >= 11 && this.codeContent.length >= 6)
51 }) 52 })
52 53
53 - Text(this.isCodeSend ? this.timeCount + "s" : "发送验证码") 54 + Text(this.isCodeSend ? this.timeCount + "s" : this.isFirst?"发送验证码":'重新发送')
54 .backgroundImage($r('app.media.login_code_bg'), ImageRepeat.NoRepeat) 55 .backgroundImage($r('app.media.login_code_bg'), ImageRepeat.NoRepeat)
55 .backgroundImageSize(ImageSize.Cover) 56 .backgroundImageSize(ImageSize.Cover)
56 .fontColor('#ED2800') 57 .fontColor('#ED2800')
@@ -65,6 +66,7 @@ export struct LoginInputComponent { @@ -65,6 +66,7 @@ export struct LoginInputComponent {
65 return 66 return
66 } 67 }
67 this.isCodeSend = true 68 this.isCodeSend = true
  69 + this.isFirst=false
68 let time = setInterval(() => { 70 let time = setInterval(() => {
69 Logger.debug("倒计时:" + this.timeCount) 71 Logger.debug("倒计时:" + this.timeCount)
70 this.timeCount-- 72 this.timeCount--
@@ -7,6 +7,7 @@ import promptAction from '@ohos.promptAction' @@ -7,6 +7,7 @@ import promptAction from '@ohos.promptAction'
7 import { SPHelper } from 'wdKit' 7 import { SPHelper } from 'wdKit'
8 import { WDRouterPage } from 'wdRouter/src/main/ets/router/WDRouterPage'; 8 import { WDRouterPage } from 'wdRouter/src/main/ets/router/WDRouterPage';
9 import { WDRouterRule } from 'wdRouter/src/main/ets/router/WDRouterRule'; 9 import { WDRouterRule } from 'wdRouter/src/main/ets/router/WDRouterRule';
  10 +import { Params } from '../../../../../../../commons/wdRouter/oh_modules/wdBean/src/main/ets/bean/content/Params'
10 11
11 @Extend(Row) 12 @Extend(Row)
12 function otherStyle() { 13 function otherStyle() {
@@ -95,9 +96,6 @@ struct LoginPage { @@ -95,9 +96,6 @@ struct LoginPage {
95 96
96 97
97 Row() { 98 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')) 99 Image(this.protocolState ? $r('app.media.login_checkbox_select') : $r('app.media.login_checkbox_unselected'))
102 .width(15) 100 .width(15)
103 .height(15) 101 .height(15)
@@ -109,10 +107,14 @@ struct LoginPage { @@ -109,10 +107,14 @@ struct LoginPage {
109 Span("我已阅读并同意").fontColor("#999999").fontSize(12) 107 Span("我已阅读并同意").fontColor("#999999").fontSize(12)
110 Span("《用户协议》").fontColor("#ED2800").fontSize(12).onClick(() => { 108 Span("《用户协议》").fontColor("#ED2800").fontSize(12).onClick(() => {
111 //todo 协议 109 //todo 协议
  110 + let bean={contentId:"1",pageID:""} as Params
  111 + WDRouterRule.jumpWithPage(WDRouterPage.loginProtocolPage,bean)
112 }) 112 })
113 Span("及").fontColor("#999999").fontSize(12) 113 Span("及").fontColor("#999999").fontSize(12)
114 Span("《隐私政策》").fontColor("#ED2800").fontSize(12).onClick(() => { 114 Span("《隐私政策》").fontColor("#ED2800").fontSize(12).onClick(() => {
115 //todo 协议 115 //todo 协议
  116 + let bean={contentId:"2",pageID:""} as Params
  117 + WDRouterRule.jumpWithPage(WDRouterPage.loginProtocolPage,bean)
116 }) 118 })
117 } 119 }
118 }.margin({ top: 28 }).alignItems(VerticalAlign.Center) 120 }.margin({ top: 28 }).alignItems(VerticalAlign.Center)
@@ -299,19 +301,22 @@ struct LoginPage { @@ -299,19 +301,22 @@ struct LoginPage {
299 if (this.checkCodePage) { 301 if (this.checkCodePage) {
300 this.loginViewModel.appLogin(this.phoneContent, 2, this.codeContent).then((data) => { 302 this.loginViewModel.appLogin(this.phoneContent, 2, this.codeContent).then((data) => {
301 Logger.debug(TAG, "requestLogin: " + data.jwtToken) 303 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() 304 + router.back({
  305 + params: { userName: data.userName,
  306 + userId:data.id},
  307 + url: 'pages/MainPage'
  308 + }
  309 + )
306 }) 310 })
307 } else { 311 } else {
308 this.loginViewModel.appLoginByPassword(this.accountContent, 0, this.passwordContent, "").then((data) => { 312 this.loginViewModel.appLoginByPassword(this.accountContent, 0, this.passwordContent, "").then((data) => {
309 Logger.debug(TAG, "requestLogin: " + data.jwtToken) 313 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 promptAction.showToast({ message: '登录成功' })
314 - router.back() 315 + router.back({
  316 + params: { userName: data.userName,
  317 + userId:data.id},
  318 + url: 'pages/MainPage'
  319 + })
315 }).catch((value: string) => { 320 }).catch((value: string) => {
316 promptAction.showToast({ message: value }) 321 promptAction.showToast({ message: value })
317 }) 322 })
  1 +import router from '@ohos.router';
  2 +import webview from '@ohos.web.webview';
  3 +import { Logger } from 'wdKit';
  4 +import { Params } from '../../../../../../../commons/wdRouter/oh_modules/wdBean/src/main/ets/bean/content/Params';
  5 +
  6 +
  7 +const TAG = 'LoginProtocolWebview';
  8 +
  9 +@Entry
  10 +@Component
  11 +struct LoginProtocolWebview {
  12 + webUrl: string = ''
  13 + webviewController: webview.WebviewController = new webview.WebviewController()
  14 +
  15 + aboutToAppear() {
  16 + if (router.getParams()) {
  17 + let params = router.getParams() as Params
  18 + if (params.contentID == "1") {
  19 + this.webUrl = "https://cdnpeoplefrontuat.aikan.pdnews.cn/rmrb/rmrb-protocol-zh-web/0.0.1/app/protocol-1005.html"
  20 + } else {
  21 + this.webUrl = "https://cdnpeoplefrontuat.aikan.pdnews.cn/rmrb/rmrb-protocol-zh-web/0.0.1/app/protocol-1001.html"
  22 + }
  23 + }
  24 +
  25 + }
  26 +
  27 + build() {
  28 +
  29 + Column() {
  30 + Row() {
  31 + Image($r("app.media.login_back_icon"))
  32 + .width(24)
  33 + .aspectRatio(1)
  34 + .onClick(() => {
  35 + router.back();
  36 + }).margin({left:16})
  37 + Text()
  38 + }
  39 + .alignItems(VerticalAlign.Center)
  40 + .width('100%')
  41 + .height(44)
  42 +
  43 + Web({ src: this.webUrl, controller: this.webviewController })
  44 + .domStorageAccess(true)
  45 + .databaseAccess(true)
  46 + .javaScriptAccess(true)
  47 + .zoomAccess(false)
  48 + .horizontalScrollBarAccess(false)
  49 + .verticalScrollBarAccess(false)
  50 + .onHttpErrorReceive((event) => {
  51 + //TODO 页面加载不成功的时候处理
  52 + Logger.info(TAG, 'onHttpErrorReceive event.request.getRequestUrl:' + event?.request.getRequestUrl());
  53 + Logger.info(TAG, 'onHttpErrorReceive event.response.getResponseCode:' + event?.response.getResponseCode());
  54 + })
  55 + }
  56 + }
  57 +}
@@ -2,6 +2,7 @@ @@ -2,6 +2,7 @@
2 "src": [ 2 "src": [
3 "pages/Index", 3 "pages/Index",
4 "pages/login/LoginPage", 4 "pages/login/LoginPage",
5 - "pages/login/ForgetPasswordPage" 5 + "pages/login/ForgetPasswordPage",
  6 + "pages/login/LoginProtocolWebview"
6 ] 7 ]
7 } 8 }
@@ -2,12 +2,15 @@ import { BottomNavigationComponent} from 'wdComponent'; @@ -2,12 +2,15 @@ import { BottomNavigationComponent} from 'wdComponent';
2 import { BreakpointConstants } from 'wdConstant'; 2 import { BreakpointConstants } from 'wdConstant';
3 3
4 import { BreakpointSystem, Logger } from 'wdKit'; 4 import { BreakpointSystem, Logger } from 'wdKit';
  5 +import router from '@ohos.router';
5 6
6 const TAG = 'MainPage'; 7 const TAG = 'MainPage';
7 8
8 @Entry 9 @Entry
9 @Component 10 @Component
10 struct MainPage { 11 struct MainPage {
  12 + @Provide('isLogin') isLogin:Record<string,string>={}
  13 +
11 private breakpointSystem: BreakpointSystem = new BreakpointSystem() 14 private breakpointSystem: BreakpointSystem = new BreakpointSystem()
12 @StorageLink('currentBreakpoint') @Watch('watchCurrentBreakpoint') currentBreakpoint: string = BreakpointConstants.BREAKPOINT_XS; 15 @StorageLink('currentBreakpoint') @Watch('watchCurrentBreakpoint') currentBreakpoint: string = BreakpointConstants.BREAKPOINT_XS;
13 16
@@ -27,6 +30,8 @@ struct MainPage { @@ -27,6 +30,8 @@ struct MainPage {
27 30
28 onPageShow() { 31 onPageShow() {
29 Logger.info(TAG, 'onPageShow'); 32 Logger.info(TAG, 'onPageShow');
  33 + let params=router.getParams() as Record<string,string>
  34 + this.isLogin=params
30 } 35 }
31 36
32 onPageHide() { 37 onPageHide() {
1 { 1 {
2 "code": "0", 2 "code": "0",
3 "data": { 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 - }], 4 + "list": [
  5 + {
  6 + "attentionNum": 0,
  7 + "authIcon": "",
  8 + "authId": 0,
  9 + "authPersonal": "",
  10 + "authTitle": "",
  11 + "categoryAuth": "",
  12 + "city": "110100",
  13 + "cnAttentionNum": 0,
  14 + "cnCollectNum": 0,
  15 + "cnCommentNum": 0,
  16 + "cnFansNum": 4,
  17 + "cnIsAttention": 1,
  18 + "cnIsComment": 1,
  19 + "cnIsLike": 1,
  20 + "cnLikeNum": 0,
  21 + "cnLiveCommentControl": 1,
  22 + "cnLiveGiftControl": 1,
  23 + "cnLiveLikeControl": 1,
  24 + "cnLiveShareControl": 1,
  25 + "cnMainControl": 1,
  26 + "cnRegistTime": 1695280071000,
  27 + "cnShareControl": 1,
  28 + "cnShareNum": 0,
  29 + "cnUserId": "444937588589253",
  30 + "cnUserName": "QACrawler2115",
  31 + "cnUserType": "2",
  32 + "collectNum": 0,
  33 + "creatorId": "3004862",
  34 + "district": "110101",
  35 + "fansNum": 0,
  36 + "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",
  37 + "honoraryIcon": "",
  38 + "honoraryTitle": "",
  39 + "introduction": "知识博主",
  40 + "isAttention": 1,
  41 + "isComment": 1,
  42 + "isLike": 1,
  43 + "isVisiable": 1,
  44 + "likeNum": 0,
  45 + "liveCommentControl": 1,
  46 + "liveGiftControl": 1,
  47 + "liveLikeControl": 1,
  48 + "liveShareControl": 1,
  49 + "posterShareControl": 1,
  50 + "province": "110000",
  51 + "publishNum": 0,
  52 + "region": "",
  53 + "shareControl": 1,
  54 + "shareNum": 0,
  55 + "shopOpen": 0,
  56 + "storeUrl": "",
  57 + "subjectType": 0,
  58 + "userId": "",
  59 + "userName": "QACrawler2115",
  60 + "userType": "2",
  61 + "waresSwitch": 1
  62 + },
  63 + {
  64 + "attentionNum": 0,
  65 + "authIcon": "",
  66 + "authId": 0,
  67 + "authPersonal": "",
  68 + "authTitle": "",
  69 + "categoryAuth": "",
  70 + "city": "230100",
  71 + "cnAttentionNum": 0,
  72 + "cnCollectNum": 0,
  73 + "cnCommentNum": 0,
  74 + "cnFansNum": 4,
  75 + "cnIsAttention": 1,
  76 + "cnIsComment": 1,
  77 + "cnIsLike": 1,
  78 + "cnLikeNum": 0,
  79 + "cnLiveCommentControl": 1,
  80 + "cnLiveGiftControl": 1,
  81 + "cnLiveLikeControl": 1,
  82 + "cnLiveShareControl": 1,
  83 + "cnMainControl": 1,
  84 + "cnRegistTime": 1695276994000,
  85 + "cnShareControl": 1,
  86 + "cnShareNum": 0,
  87 + "cnUserId": "444911718724933",
  88 + "cnUserName": "一休哥",
  89 + "cnUserType": "2",
  90 + "collectNum": 0,
  91 + "creatorId": "3004861",
  92 + "district": "230102",
  93 + "fansNum": 0,
  94 + "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",
  95 + "honoraryIcon": "",
  96 + "honoraryTitle": "",
  97 + "introduction": "中文端号主",
  98 + "isAttention": 1,
  99 + "isComment": 1,
  100 + "isLike": 1,
  101 + "isVisiable": 1,
  102 + "likeNum": 0,
  103 + "liveCommentControl": 1,
  104 + "liveGiftControl": 1,
  105 + "liveLikeControl": 1,
  106 + "liveShareControl": 1,
  107 + "posterShareControl": 1,
  108 + "province": "230000",
  109 + "publishNum": 0,
  110 + "region": "安徽",
  111 + "shareControl": 1,
  112 + "shareNum": 0,
  113 + "shopOpen": 0,
  114 + "storeUrl": "",
  115 + "subjectType": 2,
  116 + "userId": "",
  117 + "userName": "一休哥",
  118 + "userType": "2",
  119 + "waresSwitch": 1
  120 + },
  121 + {
  122 + "attentionNum": 0,
  123 + "authIcon": "",
  124 + "authId": 0,
  125 + "authPersonal": "",
  126 + "authTitle": "",
  127 + "categoryAuth": "",
  128 + "city": "110100",
  129 + "cnAttentionNum": 0,
  130 + "cnCollectNum": 0,
  131 + "cnCommentNum": 12,
  132 + "cnFansNum": 8,
  133 + "cnIsAttention": 1,
  134 + "cnIsComment": 1,
  135 + "cnIsLike": 1,
  136 + "cnLikeNum": 2,
  137 + "cnLiveCommentControl": 1,
  138 + "cnLiveGiftControl": 1,
  139 + "cnLiveLikeControl": 1,
  140 + "cnLiveShareControl": 1,
  141 + "cnMainControl": 1,
  142 + "cnRegistTime": 1695275999000,
  143 + "cnShareControl": 1,
  144 + "cnShareNum": 1,
  145 + "cnUserId": "444903323309381",
  146 + "cnUserName": "0921媒体",
  147 + "cnUserType": "3",
  148 + "collectNum": 0,
  149 + "creatorId": "3004860",
  150 + "district": "110101",
  151 + "fansNum": 0,
  152 + "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",
  153 + "honoraryIcon": "",
  154 + "honoraryTitle": "",
  155 + "introduction": "0921媒体",
  156 + "isAttention": 1,
  157 + "isComment": 1,
  158 + "isLike": 1,
  159 + "isVisiable": 1,
  160 + "likeNum": 0,
  161 + "liveCommentControl": 1,
  162 + "liveGiftControl": 1,
  163 + "liveLikeControl": 1,
  164 + "liveShareControl": 1,
  165 + "posterShareControl": 0,
  166 + "province": "110000",
  167 + "publishNum": 0,
  168 + "region": "上海",
  169 + "shareControl": 1,
  170 + "shareNum": 0,
  171 + "shopOpen": 0,
  172 + "storeUrl": "",
  173 + "subjectType": 1,
  174 + "userId": "",
  175 + "userName": "0921媒体",
  176 + "userType": "3",
  177 + "waresSwitch": 1
  178 + },
  179 + {
  180 + "attentionNum": 0,
  181 + "authIcon": "",
  182 + "authId": 0,
  183 + "authPersonal": "",
  184 + "authTitle": "",
  185 + "categoryAuth": "",
  186 + "city": "110100",
  187 + "cnAttentionNum": 0,
  188 + "cnCollectNum": 0,
  189 + "cnCommentNum": 0,
  190 + "cnFansNum": 9,
  191 + "cnIsAttention": 1,
  192 + "cnIsComment": 1,
  193 + "cnIsLike": 1,
  194 + "cnLikeNum": 6,
  195 + "cnLiveCommentControl": 1,
  196 + "cnLiveGiftControl": 1,
  197 + "cnLiveLikeControl": 1,
  198 + "cnLiveShareControl": 1,
  199 + "cnMainControl": 1,
  200 + "cnRegistTime": 1695201858000,
  201 + "cnShareControl": 1,
  202 + "cnShareNum": 0,
  203 + "cnUserId": "444296355502149",
  204 + "cnUserName": "0920个人",
  205 + "cnUserType": "2",
  206 + "collectNum": 0,
  207 + "creatorId": "3004851",
  208 + "district": "110101",
  209 + "fansNum": 0,
  210 + "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",
  211 + "honoraryIcon": "https://cdn.aikan.pdnews.cn/image/picture/202312/20231223173451966FdV.png",
  212 + "honoraryTitle": "快乐星球",
  213 + "introduction": "账号简介",
  214 + "isAttention": 1,
  215 + "isComment": 1,
  216 + "isLike": 1,
  217 + "isVisiable": 1,
  218 + "likeNum": 0,
  219 + "liveCommentControl": 1,
  220 + "liveGiftControl": 1,
  221 + "liveLikeControl": 1,
  222 + "liveShareControl": 1,
  223 + "posterShareControl": 1,
  224 + "province": "110000",
  225 + "publishNum": 0,
  226 + "region": "上海",
  227 + "shareControl": 1,
  228 + "shareNum": 0,
  229 + "shopOpen": 0,
  230 + "storeUrl": "",
  231 + "subjectType": 0,
  232 + "userId": "",
  233 + "userName": "0920个人",
  234 + "userType": "2",
  235 + "waresSwitch": 1
  236 + },
  237 + {
  238 + "attentionNum": 0,
  239 + "authIcon": "",
  240 + "authId": 0,
  241 + "authPersonal": "",
  242 + "authTitle": "",
  243 + "categoryAuth": "",
  244 + "city": "120100",
  245 + "cnAttentionNum": 0,
  246 + "cnCollectNum": 0,
  247 + "cnCommentNum": 0,
  248 + "cnFansNum": 10,
  249 + "cnIsAttention": 1,
  250 + "cnIsComment": 1,
  251 + "cnIsLike": 1,
  252 + "cnLikeNum": 0,
  253 + "cnLiveCommentControl": 1,
  254 + "cnLiveGiftControl": 1,
  255 + "cnLiveLikeControl": 1,
  256 + "cnLiveShareControl": 1,
  257 + "cnMainControl": 1,
  258 + "cnRegistTime": 1695190066000,
  259 + "cnShareControl": 1,
  260 + "cnShareNum": 0,
  261 + "cnUserId": "444200272593477",
  262 + "cnUserName": "zhuaqu005",
  263 + "cnUserType": "2",
  264 + "collectNum": 0,
  265 + "creatorId": "3004849",
  266 + "district": "120101",
  267 + "fansNum": 0,
  268 + "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",
  269 + "honoraryIcon": "",
  270 + "honoraryTitle": "",
  271 + "introduction": "aaa",
  272 + "isAttention": 1,
  273 + "isComment": 1,
  274 + "isLike": 1,
  275 + "isVisiable": 1,
  276 + "likeNum": 0,
  277 + "liveCommentControl": 1,
  278 + "liveGiftControl": 1,
  279 + "liveLikeControl": 1,
  280 + "liveShareControl": 1,
  281 + "posterShareControl": 1,
  282 + "province": "120000",
  283 + "publishNum": 0,
  284 + "region": "上海",
  285 + "shareControl": 1,
  286 + "shareNum": 0,
  287 + "shopOpen": 0,
  288 + "storeUrl": "",
  289 + "subjectType": 0,
  290 + "userId": "",
  291 + "userName": "zhuaqu005",
  292 + "userType": "2",
  293 + "waresSwitch": 1
  294 + },
  295 + {
  296 + "attentionNum": 0,
  297 + "authIcon": "https://sitcontentjdcdn.aikan.pdnews.cn/creator-category/icon/auth/yellow.png",
  298 + "authId": 2,
  299 + "authPersonal": "",
  300 + "authTitle": "黄VV",
  301 + "categoryAuth": "黄VV",
  302 + "city": "120100",
  303 + "cnAttentionNum": 1,
  304 + "cnCollectNum": 1,
  305 + "cnCommentNum": 7,
  306 + "cnFansNum": 13,
  307 + "cnIsAttention": 1,
  308 + "cnIsComment": 1,
  309 + "cnIsLike": 1,
  310 + "cnLikeNum": 0,
  311 + "cnLiveCommentControl": 1,
  312 + "cnLiveGiftControl": 1,
  313 + "cnLiveLikeControl": 1,
  314 + "cnLiveShareControl": 1,
  315 + "cnMainControl": 1,
  316 + "cnRegistTime": 1695202406000,
  317 + "cnShareControl": 1,
  318 + "cnShareNum": 0,
  319 + "cnUserId": "444300764043333",
  320 + "cnUserName": "创作者账号7777",
  321 + "cnUserType": "2",
  322 + "collectNum": 0,
  323 + "creatorId": "3004853",
  324 + "district": "120101",
  325 + "fansNum": 0,
  326 + "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",
  327 + "honoraryIcon": "",
  328 + "honoraryTitle": "",
  329 + "introduction": "协作平台是进行团队开发、协作的系统,一般是基于互联网,也有用专业网的情况。协作平台的主要功能是:分工合作、进度控制、版本控制等功能。协作平台是进行团队开发、协作的系统,一般是基于互联网,也有用专业网的情况。协作平台的主要功能是:分工合作、进度控制、版本控制等功能。协作平台是进行团队开发、协作的系统,一般是基于互联网,也有用专业网的情况。协作平台的主要功能是:分工合作、进度控制、版本控制等功能。协作",
  330 + "isAttention": 1,
  331 + "isComment": 1,
  332 + "isLike": 1,
  333 + "isVisiable": 1,
  334 + "likeNum": 0,
  335 + "liveCommentControl": 1,
  336 + "liveGiftControl": 1,
  337 + "liveLikeControl": 1,
  338 + "liveShareControl": 1,
  339 + "posterShareControl": 0,
  340 + "province": "120000",
  341 + "publishNum": 0,
  342 + "region": "安徽",
  343 + "shareControl": 1,
  344 + "shareNum": 0,
  345 + "shopOpen": 1,
  346 + "storeUrl": "",
  347 + "subjectType": 0,
  348 + "userId": "",
  349 + "userName": "创作者账号7777",
  350 + "userType": "2",
  351 + "waresSwitch": 0
  352 + },
  353 + {
  354 + "attentionNum": 0,
  355 + "authIcon": "https://sitcontentjdcdn.aikan.pdnews.cn/creator-category/icon/auth/blue.png",
  356 + "authId": 1,
  357 + "authPersonal": "",
  358 + "authTitle": "黄袍加身V",
  359 + "categoryAuth": "黄袍加身V",
  360 + "city": "340100",
  361 + "cnAttentionNum": 9,
  362 + "cnCollectNum": 0,
  363 + "cnCommentNum": 3,
  364 + "cnFansNum": 9,
  365 + "cnIsAttention": 1,
  366 + "cnIsComment": 1,
  367 + "cnIsLike": 1,
  368 + "cnLikeNum": 7,
  369 + "cnLiveCommentControl": 1,
  370 + "cnLiveGiftControl": 1,
  371 + "cnLiveLikeControl": 1,
  372 + "cnLiveShareControl": 1,
  373 + "cnMainControl": 1,
  374 + "cnRegistTime": 1695260417000,
  375 + "cnShareControl": 1,
  376 + "cnShareNum": 0,
  377 + "cnUserId": "444776025830725",
  378 + "cnUserName": "李智恩3",
  379 + "cnUserType": "2",
  380 + "collectNum": 0,
  381 + "creatorId": "3004855",
  382 + "district": "340102",
  383 + "fansNum": 0,
  384 + "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",
  385 + "honoraryIcon": "",
  386 + "honoraryTitle": "",
  387 + "introduction": "IU",
  388 + "isAttention": 1,
  389 + "isComment": 1,
  390 + "isLike": 1,
  391 + "isVisiable": 1,
  392 + "likeNum": 0,
  393 + "liveCommentControl": 1,
  394 + "liveGiftControl": 1,
  395 + "liveLikeControl": 1,
  396 + "liveShareControl": 1,
  397 + "posterShareControl": 0,
  398 + "province": "340000",
  399 + "publishNum": 0,
  400 + "region": "安徽",
  401 + "shareControl": 1,
  402 + "shareNum": 0,
  403 + "shopOpen": 1,
  404 + "storeUrl": "",
  405 + "subjectType": 1,
  406 + "userId": "",
  407 + "userName": "李智恩3",
  408 + "userType": "2",
  409 + "waresSwitch": 0
  410 + }
  411 + ],
404 "pageNum": 1, 412 "pageNum": 1,
405 "pageSize": 20, 413 "pageSize": 20,
406 "totalCount": 7 414 "totalCount": 7
407 }, 415 },
408 "message": "Success", 416 "message": "Success",
409 "success": true, 417 "success": true,
410 - "timestamp": 1710742034894 418 + "timestamp": 1710989443354
411 } 419 }
  1 +{
  2 + "code": "0",
  3 + "data": [
  4 + {
  5 + "creatorId": "3004862",
  6 + "status": "0",
  7 + "userId": "567387477063621"
  8 + },
  9 + {
  10 + "creatorId": "3004861",
  11 + "status": "0",
  12 + "userId": "567387477063621"
  13 + },
  14 + {
  15 + "creatorId": "3004860",
  16 + "status": "0",
  17 + "userId": "567387477063621"
  18 + },
  19 + {
  20 + "creatorId": "3004851",
  21 + "status": "1",
  22 + "userId": "567387477063621"
  23 + },
  24 + {
  25 + "creatorId": "3004849",
  26 + "status": "1",
  27 + "userId": "567387477063621"
  28 + },
  29 + {
  30 + "creatorId": "3004853",
  31 + "status": "1",
  32 + "userId": "567387477063621"
  33 + },
  34 + {
  35 + "creatorId": "3004855",
  36 + "status": "0",
  37 + "userId": "567387477063621"
  38 + }
  39 + ],
  40 + "message": "Success",
  41 + "meta": null,
  42 + "requestId": "",
  43 + "success": true,
  44 + "timestamp": 1710989443648
  45 +}