yangsunyue_wd
Showing 192 changed files with 6737 additions and 435 deletions
  1 +export class GlobalContext {
  2 + private constructor() { }
  3 + private static instance: GlobalContext;
  4 + private _objects = new Map<string, Object>();
  5 +
  6 + public static getContext(): GlobalContext {
  7 + if (!GlobalContext.instance) {
  8 + GlobalContext.instance = new GlobalContext();
  9 + }
  10 + return GlobalContext.instance;
  11 + }
  12 +
  13 + getObject(value: string): Object | undefined {
  14 + return this._objects.get(value);
  15 + }
  16 +
  17 + setObject(key: string, objectClass: Object): void {
  18 + this._objects.set(key, objectClass);
  19 + }
  20 +}
@@ -16,7 +16,7 @@ export default class EntryAbility extends UIAbility { @@ -16,7 +16,7 @@ export default class EntryAbility extends UIAbility {
16 // Main window is created, set main page for this ability 16 // Main window is created, set main page for this ability
17 hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onWindowStageCreate'); 17 hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onWindowStageCreate');
18 18
19 - windowStage.loadContent('pages/MainPage', (err, data) => { 19 + windowStage.loadContent('pages/LaunchPage', (err, data) => {
20 if (err.code) { 20 if (err.code) {
21 hilog.error(0x0000, 'testTag', 'Failed to load the content. Cause: %{public}s', JSON.stringify(err) ?? ''); 21 hilog.error(0x0000, 'testTag', 'Failed to load the content. Cause: %{public}s', JSON.stringify(err) ?? '');
22 return; 22 return;
@@ -6,12 +6,10 @@ import { Params } from 'wdComponent/src/main/ets/repository/bean/Params'; @@ -6,12 +6,10 @@ import { Params } from 'wdComponent/src/main/ets/repository/bean/Params';
6 @Entry 6 @Entry
7 @Component 7 @Component
8 struct FollowListPage { 8 struct FollowListPage {
9 -  
10 - @State params:Params = router.getParams() as Params;  
11 @State curIndex: string = '0'; 9 @State curIndex: string = '0';
12 10
13 onPageShow() { 11 onPageShow() {
14 - this.curIndex = "1"; 12 + this.curIndex = router.getParams()?.["index"];
15 } 13 }
16 14
17 build() { 15 build() {
  1 +import router from '@ohos.router'
  2 +
  3 +@Entry
  4 +@Component
  5 +struct LaunchAdvertisingPage {
  6 + @State time: number = 4
  7 + timer :number = -1
  8 +
  9 + enter() {
  10 + router.replaceUrl({
  11 + url:'pages/MainPage'
  12 + })
  13 + }
  14 +
  15 + onPageShow(){
  16 + this.timer = setInterval(() => {
  17 + this.time--
  18 + if (this.time < 1) {
  19 + this.enter()
  20 + clearInterval(this.timer)
  21 + }
  22 + },1000)
  23 +
  24 + }
  25 +
  26 + build(){
  27 + Column(){
  28 + Stack({alignContent:Alignment.Bottom}){
  29 +
  30 + Stack({alignContent:Alignment.Bottom}){
  31 + Column(){
  32 + Image($r('app.media.app_icon'))
  33 + .margin({
  34 + top:'128lpx',left:'48lpx',right:'48lpx',bottom:'128lpx'
  35 + })
  36 + }
  37 + .justifyContent(FlexAlign.Center)
  38 + .width('100%')
  39 + .height('100%')
  40 + .margin({
  41 + bottom: 0
  42 + })
  43 +
  44 + Stack({alignContent:Alignment.TopEnd}){
  45 + Button(){
  46 + Text(this.time + 's 跳过')
  47 + .fontSize('27lpx')
  48 + .fontColor(Color.White)
  49 + .margin({left:'28lpx',right:'28lpx'})
  50 +
  51 + }
  52 + .width('148lpx')
  53 + .height('56lpx')
  54 + .margin({top:'54lpx',right:'19lpx'})
  55 + .backgroundColor('#80000000')
  56 + .onClick(() => {
  57 + this.enter()
  58 + })
  59 + }
  60 + .width('100%')
  61 + .height('100%')
  62 +
  63 + Button(){
  64 + Row(){
  65 + Text('点击跳转至详情或第三方应用')
  66 + .fontSize('31lpx')
  67 + .fontColor(Color.White)
  68 + .margin({
  69 + left:'55lpx'
  70 + })
  71 + Image($r('app.media.Slice'))
  72 + .width('46lpx')
  73 + .height('46lpx')
  74 + .margin({right:'55lpx'})
  75 + }.alignItems(VerticalAlign.Center)
  76 + }
  77 + .width('566lpx')
  78 + .height('111lpx')
  79 + .margin({
  80 + bottom: '51lpx'
  81 + })
  82 + .backgroundColor('#80000000')
  83 +
  84 + }
  85 +
  86 + }
  87 + .width('100%')
  88 + .height('84%')
  89 + .backgroundColor('#FF6C75')
  90 + .margin({top:'0'})
  91 +
  92 + Image($r('app.media.LaunchPage_logo'))
  93 + .width('278lpx')
  94 + .height('154lpx')
  95 + .margin({bottom: '48lpx'})
  96 + }
  97 + .width('100%')
  98 + .height('100%')
  99 + .backgroundColor(Color.White)
  100 +
  101 + }
  102 +
  103 +
  104 +
  105 +
  106 +}
  1 +import media from '@ohos.multimedia.media'
  2 +import App from '@system.app'
  3 +import Router from '@system.router'
  4 +import router from '@ohos.router'
  5 +import common from '@ohos.app.ability.common'
  6 +import CustomDialogComponent from '../view/CustomDialogComponent'
  7 +import preferences from '@ohos.data.preferences'
  8 +import { GlobalContext } from '../common/utils/GlobalContext'
  9 +
  10 +@Entry
  11 +@Component
  12 +struct LaunchPage {
  13 + private context?: common.UIAbilityContext;
  14 + private timerId: number = 0;
  15 + private isJumpToAdvertising: boolean = false;
  16 +
  17 + dialogController: CustomDialogController = new CustomDialogController({
  18 + builder: CustomDialogComponent(
  19 + {
  20 + cancel: () => {
  21 + this.onCancel();
  22 + },
  23 + confirm: () => {
  24 + this.onConfirm();
  25 + }
  26 + }),
  27 + alignment: DialogAlignment.Center,
  28 + offset: { dx: 0, dy: '-24' },
  29 + customStyle: true,
  30 + autoCancel: false
  31 + });
  32 +
  33 + onCancel() {
  34 + // Exit the application.
  35 + this.context?.terminateSelf();
  36 + }
  37 +
  38 + onConfirm() {
  39 + // Save privacy agreement status.
  40 + this.saveIsPrivacy();
  41 + this.jumpToAdvertisingPage();
  42 + }
  43 +
  44 + jumpToAdvertisingPage() {
  45 + this.timerId = setTimeout(() => {
  46 + this.isJumpToAdvertising = true;
  47 + router.pushUrl({
  48 + url: 'pages/LaunchAdvertisingPage'
  49 + }).catch((error: Error) => {
  50 + //Logger.error(CommonConstants.LAUNCHER_PAGE_TAG, 'LauncherPage pushUrl error ' + JSON.stringify(error));
  51 + });
  52 + }, 1000);
  53 + }
  54 +
  55 + onPageShow() {
  56 + this.context = getContext(this) as common.UIAbilityContext;
  57 + // Get the operation class for saving data.
  58 + this.getDataPreferences(this).then((preferences: preferences.Preferences) => {
  59 + preferences.get('isPrivacy', true).then((value: preferences.ValueType) => {
  60 + //Logger.info(CommonConstants.LAUNCHER_PAGE_TAG, 'onPageShow value: ' + value);
  61 + if (value) {
  62 + // let isJumpPrivacy: boolean = globalThis.isJumpPrivacy ?? false;
  63 + // let isJumpPrivacy: boolean = (GlobalContext.getContext().getObject('isJumpPrivacy') as boolean) ?? false;
  64 + // if (!isJumpPrivacy) {
  65 + this.dialogController.open();
  66 + // }
  67 + } else {
  68 + this.jumpToAdvertisingPage();
  69 + }
  70 + });
  71 + });
  72 + }
  73 +
  74 + onPageHide() {
  75 + if (this.isJumpToAdvertising) {
  76 + router.clear();
  77 + }
  78 + // globalThis.isJumpPrivacy = true;
  79 + //GlobalContext.getContext().setObject('isJumpPrivacy', true);
  80 + clearTimeout(this.timerId);
  81 + }
  82 +
  83 + getDataPreferences(common: Object) {
  84 + return preferences.getPreferences(getContext(common), 'myStore');
  85 + }
  86 +
  87 + saveIsPrivacy() {
  88 + let preferences: Promise<preferences.Preferences> = this.getDataPreferences(this);
  89 + preferences.then((result: preferences.Preferences) => {
  90 + let privacyPut = result.put('isPrivacy', false);
  91 + result.flush();
  92 + privacyPut.then(() => {
  93 + //Logger.info('LauncherPage', 'Put the value of startup Successfully.');
  94 + }).catch((err: Error) => {
  95 + //Logger.error('LauncherPage', 'Put the value of startup Failed, err: ' + err);
  96 + });
  97 + }).catch((err: Error) => {
  98 + //Logger.error('LauncherPage', 'Get the preferences Failed, err: ' + err);
  99 + });
  100 + }
  101 +
  102 +
  103 +
  104 + build(){
  105 +
  106 + Stack({alignContent:Alignment.Bottom}){
  107 + Image($r('app.media.LaunchPage_logo'))
  108 + .width('278lpx')
  109 + .height('154lpx')
  110 + .margin({
  111 + bottom:'48lpx'
  112 + })
  113 +
  114 + }
  115 + .width('100%')
  116 + .height('100%')
  117 + .backgroundColor(Color.White)
  118 +
  119 +
  120 + }
  121 +
  122 +
  123 +
  124 +}
  1 +import { OtherUserHomeComponent } from 'wdComponent'
  2 +import router from '@ohos.router';
  3 +
  4 +@Entry
  5 +@Component
  6 +struct OtherNormalUserHomePage {
  7 + @State userId: string = "111111111";
  8 +
  9 + onPageShow() {
  10 + this.userId = router.getParams()?.["userId"]
  11 + console.log("ycg","==="+this.userId);
  12 + }
  13 + build() {
  14 + Column() {
  15 + OtherUserHomeComponent({curUserId:this.userId})
  16 + }
  17 + .height('100%')
  18 + .width('100%')
  19 + }
  20 +}
  1 +
  2 +import webview from '@ohos.web.webview';
  3 +import router from '@ohos.router';
  4 +import { GlobalContext } from '../common/utils/GlobalContext'
  5 +
  6 +@Entry
  7 +@Component
  8 +struct PrivacyPage {
  9 + @State message: string = 'Hello World'
  10 + webController: webview.WebviewController = new webview.WebviewController();
  11 + //@State params: object = router.getParams();
  12 +
  13 + build() {
  14 + Row() {
  15 + Column() {
  16 + // Web component loading H5.
  17 + Web({ src: 'https://www.baidu.com', controller: this.webController })
  18 + .zoomAccess(false)
  19 + .width('100%')
  20 + .height('100%')
  21 + .aspectRatio(1)
  22 + // .onConfirm((event) => {
  23 + // AlertDialog.show({
  24 + // message: Const.WEB_ALERT_DIALOG_TEXT_VALUE + event?.message,
  25 + // confirm: {
  26 + // value: $r('app.string.web_alert_dialog_button_value'),
  27 + // action: () => {
  28 + // event?.result.handleConfirm();
  29 + // }
  30 + // },
  31 + // cancel: () => {
  32 + // event?.result.handleCancel();
  33 + // }
  34 + // });
  35 + // return true;
  36 + // })
  37 + // .onErrorReceive((event) => {
  38 + // if (event?.error.getErrorInfo() === 'ERR_INTERNET_DISCONNECTED') {
  39 + // prompt.showToast({
  40 + // message: $r('app.string.internet_err'),
  41 + // duration: Const.WebConstant_DURATION
  42 + // })
  43 + // }
  44 + // if (event?.error.getErrorInfo() === 'ERR_CONNECTION_TIMED_OUT') {
  45 + // prompt.showToast({
  46 + // message: $r('app.string.internet_err'),
  47 + // duration: Const.WebConstant_DURATION
  48 + // })
  49 + // }
  50 + // })
  51 + // .onProgressChange((event) => {
  52 + // if (event?.newProgress === Const.WebConstant_PROGRESS_MAX) {
  53 + // this.isLoading = false;
  54 + // clearInterval(this.intervalLoading);
  55 + // this.intervalLoading = -1;
  56 + // }
  57 + // })
  58 + }
  59 + .width('100%')
  60 + }
  61 + .height('100%')
  62 + }
  63 +}
  1 +import router from '@ohos.router';
  2 +import { GlobalContext } from '../common/utils/GlobalContext'
  3 +import { NavigatorModel } from '../viewModel/NavigatorModel';
  4 +
  5 +@CustomDialog
  6 +export default struct CustomDialogComponent {
  7 +
  8 + controller: CustomDialogController = new CustomDialogController({'builder': ''})
  9 + cancel: Function = () => {}
  10 + confirm: Function = () => {}
  11 +
  12 +
  13 + build(){
  14 + Column(){
  15 + Text($r('app.string.dialog_text_title'))
  16 + .width("90%")
  17 + .fontColor($r('app.color.dialog_text_color'))
  18 + .fontSize($r('app.float.dialog_text_privacy_size'))
  19 + .textAlign(TextAlign.Center)
  20 + .fontWeight('600')
  21 + .margin({
  22 + top: $r('app.float.dialog_text_privacy_top'),
  23 + bottom: $r('app.float.dialog_text_privacy_bottom')
  24 + })
  25 + Text($r('app.string.dialog_text_privacy_content'))
  26 + .fontSize($r('app.float.dialog_common_text_size'))
  27 + .width('90%')
  28 + Row(){
  29 +
  30 + // Button(){
  31 + // Text($r('app.string.privacy_text_title_policy'))
  32 + // .fontSize('27lpx')
  33 + // .fontColor(Color.Red)
  34 + // .margin({left:'10lpx',right:'10lpx'})
  35 + // }
  36 + // .width('90%')
  37 + // .height('56lpx')
  38 + // .margin({top:'54lpx',right:'19lpx'})
  39 + // .backgroundColor('#80000000')
  40 + // .onClick(() => {
  41 + //
  42 + // })
  43 + // Button(){
  44 + // Text($r('app.string.privacy_text_title_protocol'))
  45 + // .fontSize('27lpx')
  46 + // .fontColor(Color.Red)
  47 + // .margin({left:'10lpx',right:'10lpx'})
  48 + // }
  49 + // .width('90%')
  50 + // .height('56lpx')
  51 + // .margin({top:'54lpx',right:'19lpx'})
  52 + // .backgroundColor('#80000000')
  53 + // .onClick(() => {
  54 + //
  55 + // })
  56 +
  57 + // Navigator({ target: 'pages/PrivacyPage', type: NavigationType.Push }) {
  58 + // Button($r('app.string.privacy_text_title_policy'))
  59 + // .onClick(()=>{
  60 + // GlobalContext.getContext().setObject('isJumpPrivacy', true);
  61 + // })
  62 + // {
  63 + // // Text($r('app.string.privacy_text_title_policy'))
  64 + // // .fontSize($r('app.float.dialog_common_text_size'))
  65 + // // .width('50%')
  66 + // // .fontColor(Color.Red)
  67 + // // .onClick(() => {
  68 + // // GlobalContext.getContext().setObject('isJumpPrivacy', true);
  69 + // // })
  70 + // }
  71 + // .fancy(Const.MainConstant_BUTTON_MARGIN_TOP)
  72 + // }
  73 + // .params({ path: 'https://www.baidu.com', tips: '在线' } as NavigatorModel)
  74 +
  75 + Text($r('app.string.privacy_text_title_policy'))
  76 + .fontSize($r('app.float.dialog_common_text_size'))
  77 + .width('40%')
  78 + .fontColor(Color.Red)
  79 + .onClick(() => {
  80 + //GlobalContext.getContext().setObject('isJumpPrivacy', false);
  81 + router.pushUrl({
  82 + url: 'pages/PrivacyPage'
  83 + }).catch((error: Error) => {
  84 + //Logger.error(CommonConstants.CUSTOM_DIALOG_TAG, 'CustomDialog pushUrl error ' + JSON.stringify(error));
  85 + });
  86 + })
  87 + Text($r('app.string.privacy_text_title_protocol'))
  88 + .fontSize($r('app.float.dialog_common_text_size'))
  89 + .width('40%')
  90 + .fontColor(Color.Red)
  91 + .onClick(() => {
  92 + //GlobalContext.getContext().setObject('isJumpPrivacy', true);
  93 + router.pushUrl({
  94 + url: 'pages/PrivacyPage'
  95 + }).catch((error: Error) => {
  96 + //Logger.error(CommonConstants.CUSTOM_DIALOG_TAG, 'CustomDialog pushUrl error ' + JSON.stringify(error));
  97 + });
  98 + })
  99 + }
  100 + Text($r('app.string.dialog_text_privacy_statement'))
  101 + .width('90%')
  102 + .fontColor($r('app.color.dialog_text_statement_color'))
  103 + .fontSize($r('app.float.dialog_common_text_size'))
  104 + Row() {
  105 + Text($r('app.string.dialog_button_disagree'))
  106 + .fancy()
  107 + .onClick(() => {
  108 + this.controller.close();
  109 + this.cancel();
  110 + })
  111 + Blank()
  112 + .backgroundColor($r('app.color.dialog_blank_background_color'))
  113 + .width($r('app.float.dialog_blank_width'))
  114 + .height($r('app.float.dialog_blank_height'))
  115 + Text($r('app.string.dialog_button_agree'))
  116 + .fancy()
  117 + .onClick(() => {
  118 + this.controller.close();
  119 + this.confirm();
  120 + })
  121 + }
  122 + .margin({ bottom: '1' })
  123 +
  124 + }
  125 + .width('93%')
  126 + .borderRadius('15')
  127 + .backgroundColor(Color.White)
  128 +
  129 + }
  130 +
  131 +
  132 +
  133 +}
  134 +// Common text styles.
  135 +@Extend(Text) function fancy () {
  136 + .fontColor($r("app.color.dialog_fancy_text_color"))
  137 + .fontSize($r("app.float.dialog_fancy_text_size"))
  138 + .textAlign(TextAlign.Center)
  139 + .fontWeight(FontWeight.Medium)
  140 + .layoutWeight('1')
  141 +}
  1 +/**
  2 + * NewsData params info.
  3 + */
  4 +export class NavigatorModel {
  5 + /**
  6 + * Jumping Path.
  7 + */
  8 + path: Resource | string = '';
  9 +
  10 + /**
  11 + * Prompt message.
  12 + */
  13 + tips: Resource | string = '';
  14 +}
@@ -7,6 +7,46 @@ @@ -7,6 +7,46 @@
7 { 7 {
8 "name": "color_F9F9F9", 8 "name": "color_F9F9F9",
9 "value": "#F9F9F9" 9 "value": "#F9F9F9"
  10 + },
  11 + {
  12 + "name": "privacy_back_text",
  13 + "value": "#007DFF"
  14 + },
  15 + {
  16 + "name": "launcher_text_title_color",
  17 + "value": "#182431"
  18 + },
  19 + {
  20 + "name": "launcher_text_introduce_color",
  21 + "value": "#182431"
  22 + },
  23 + {
  24 + "name": "advertising_text_title_color",
  25 + "value": "#182431"
  26 + },
  27 + {
  28 + "name": "advertising_text_background_color",
  29 + "value": "#33000000"
  30 + },
  31 + {
  32 + "name": "home_page_text_color",
  33 + "value": "#14224D"
  34 + },
  35 + {
  36 + "name": "dialog_fancy_text_color",
  37 + "value": "#007DFF"
  38 + },
  39 + {
  40 + "name": "dialog_text_color",
  41 + "value": "#182431"
  42 + },
  43 + {
  44 + "name": "dialog_blank_background_color",
  45 + "value": "#F5F5F5"
  46 + },
  47 + {
  48 + "name": "dialog_text_statement_color",
  49 + "value": "#007DFF"
10 } 50 }
11 ] 51 ]
12 } 52 }
  1 +{
  2 + "float": [
  3 + {
  4 + "name": "float_1",
  5 + "value": "30.6"
  6 + },
  7 + {
  8 + "name": "launcher_logo_size",
  9 + "value": "119vp"
  10 + },
  11 + {
  12 + "name": "launcher_life_text_width",
  13 + "value": "105vp"
  14 + },
  15 + {
  16 + "name": "launcher_life_text_height",
  17 + "value": "35vp"
  18 + },
  19 + {
  20 + "name": "launcher_text_title_size",
  21 + "value": "26fp"
  22 + },
  23 + {
  24 + "name": "launcher_text_introduce_size",
  25 + "value": "16fp"
  26 + },
  27 + {
  28 + "name": "launcher_text_opacity",
  29 + "value": "0.6"
  30 + },
  31 + {
  32 + "name": "advertising_text_opacity",
  33 + "value": "0.4"
  34 + },
  35 + {
  36 + "name": "advertising_image_width",
  37 + "value": "54vp"
  38 + },
  39 + {
  40 + "name": "advertising_image_height",
  41 + "value": "54vp"
  42 + },
  43 + {
  44 + "name": "advertising_text_font_size",
  45 + "value": "12fp"
  46 + },
  47 + {
  48 + "name": "advertising_text_introduce_size",
  49 + "value": "16fp"
  50 + },
  51 + {
  52 + "name": "advertising_text_title_size",
  53 + "value": "26fp"
  54 + },
  55 + {
  56 + "name": "advertising_text_border_width",
  57 + "value": "1"
  58 + },
  59 + {
  60 + "name": "advertising_title_text_margin_top",
  61 + "value": "30vp"
  62 + },
  63 + {
  64 + "name": "advertising_title_text_margin_left",
  65 + "value": "260vp"
  66 + },
  67 + {
  68 + "name": "advertising_text_padding_top",
  69 + "value": "8vp"
  70 + },
  71 + {
  72 + "name": "advertising_text_padding_bottom",
  73 + "value": "8vp"
  74 + },
  75 + {
  76 + "name": "advertising_text_padding_left",
  77 + "value": "12vp"
  78 + },
  79 + {
  80 + "name": "advertising_text_padding_right",
  81 + "value": "12vp"
  82 + },
  83 + {
  84 + "name": "advertising_text_radius",
  85 + "value": "18vp"
  86 + },
  87 + {
  88 + "name": "dialog_blank_height",
  89 + "value": "32vp"
  90 + },
  91 + {
  92 + "name": "dialog_blank_width",
  93 + "value": "1vp"
  94 + },
  95 + {
  96 + "name": "dialog_common_text_size",
  97 + "value": "18fp"
  98 + },
  99 + {
  100 + "name": "dialog_text_privacy_size",
  101 + "value": "20fp"
  102 + },
  103 + {
  104 + "name": "dialog_fancy_text_size",
  105 + "value": "16fp"
  106 + },
  107 + {
  108 + "name": "dialog_text_privacy_bottom",
  109 + "value": "12vp"
  110 + },
  111 + {
  112 + "name": "dialog_text_privacy_top",
  113 + "value": "24vp"
  114 + },
  115 + {
  116 + "name": "dialog_text_declaration_bottom",
  117 + "value": "24"
  118 + },
  119 + {
  120 + "name": "dialog_text_opacity",
  121 + "value": "0.6"
  122 + },
  123 + {
  124 + "name": "privacy_text_title_size",
  125 + "value": "20fp"
  126 + },
  127 + {
  128 + "name": "privacy_back_text_size",
  129 + "value": "20fp"
  130 + },
  131 + {
  132 + "name": "privacy_text_margin_top",
  133 + "value": "10"
  134 + },
  135 + {
  136 + "name": "privacy_text_margin_bottom",
  137 + "value": "10"
  138 + },
  139 + {
  140 + "name": "privacy_bottom_text_margin",
  141 + "value": "12"
  142 + },
  143 + {
  144 + "name": "privacy_text_content_left",
  145 + "value": "24"
  146 + },
  147 + {
  148 + "name": "privacy_text_content_right",
  149 + "value": "24"
  150 + },
  151 + {
  152 + "name": "home_page_text_size",
  153 + "value": "30vp"
  154 + }
  155 + ]
  156 +}
@@ -11,6 +11,41 @@ @@ -11,6 +11,41 @@
11 { 11 {
12 "name": "EntryAbility_label", 12 "name": "EntryAbility_label",
13 "value": "$string:app_name" 13 "value": "$string:app_name"
  14 + },
  15 + {
  16 + "name": "dialog_text_title",
  17 + "value": "个人隐私保护指引"
  18 + },
  19 + {
  20 + "name": "dialog_text_subTitle",
  21 + "value": "欢迎您使用人民日报客户端!"
  22 + },
  23 + {
  24 + "name": "dialog_text_privacy_content",
  25 + "value": "为了更好地为您提供阅读新闻、发布评论等相关服务,我们会根据您使用服务的具体功能需要,收集必要的用户信息。您可通过阅读《隐私政策》和《用户协议》了解我们收集、使用、存储和共享个人信息的情况,以及对您个人隐私的保护措施。人民日报客户端深知个人信息对您的重要性,我们将以最高标准遵守法律法规要求,尽全力保护您的个人信息安全。"
  26 + },
  27 + {
  28 + "name": "dialog_text_privacy_statement",
  29 + "value": "如您同意,请点击“同意”开始接受"
  30 + },
  31 + {
  32 + "name": "dialog_button_disagree",
  33 + "value": "暂不使用"
  34 + },
  35 + {
  36 + "name": "dialog_button_agree",
  37 + "value": "同意"
  38 + },
  39 + {
  40 + "name": "privacy_text_title_policy",
  41 + "value": "《隐私政策》"
  42 + },
  43 + {
  44 + "name": "privacy_text_title_protocol",
  45 + "value": "《用户协议》"
14 } 46 }
  47 +
  48 +
  49 +
15 ] 50 ]
16 } 51 }
@@ -10,6 +10,10 @@ @@ -10,6 +10,10 @@
10 "pages/AppointmentListPage", 10 "pages/AppointmentListPage",
11 "pages/SettingPasswordPage", 11 "pages/SettingPasswordPage",
12 "pages/FollowListPage", 12 "pages/FollowListPage",
13 - "pages/MyHomePage" 13 + "pages/MyHomePage",
  14 + "pages/LaunchPage",
  15 + "pages/LaunchAdvertisingPage",
  16 + "pages/PrivacyPage",
  17 + "pages/OtherNormalUserHomePage"
14 ] 18 ]
15 } 19 }
@@ -11,6 +11,40 @@ @@ -11,6 +11,40 @@
11 { 11 {
12 "name": "EntryAbility_label", 12 "name": "EntryAbility_label",
13 "value": "$string:app_name" 13 "value": "$string:app_name"
  14 + },
  15 + {
  16 + "name": "dialog_text_title",
  17 + "value": "个人隐私保护指引"
  18 + },
  19 + {
  20 + "name": "dialog_text_subTitle",
  21 + "value": "欢迎您使用人民日报客户端!"
  22 + },
  23 + {
  24 + "name": "dialog_text_privacy_content",
  25 + "value": "为了更好地为您提供阅读新闻、发布评论等相关服务,我们会根据您使用服务的具体功能需要,收集必要的用户信息。您可通过阅读《隐私政策》和《用户协议》了解我们收集、使用、存储和共享个人信息的情况,以及对您个人隐私的保护措施。人民日报客户端深知个人信息对您的重要性,我们将以最高标准遵守法律法规要求,尽全力保护您的个人信息安全。"
  26 + },
  27 + {
  28 + "name": "dialog_text_privacy_statement",
  29 + "value": "如您同意,请点击“同意”开始接受"
  30 + },
  31 + {
  32 + "name": "dialog_button_disagree",
  33 + "value": "暂不使用"
  34 + },
  35 + {
  36 + "name": "dialog_button_agree",
  37 + "value": "同意"
  38 + },
  39 + {
  40 + "name": "privacy_text_title_policy",
  41 + "value": "《隐私政策》"
  42 + },
  43 + {
  44 + "name": "privacy_text_title_protocol",
  45 + "value": "《用户协议》"
14 } 46 }
  47 +
  48 +
15 ] 49 ]
16 } 50 }
  1 +{
  2 + "code": "0",
  3 + "message": "Success",
  4 + "requestId": "9a63f8f9e61d442880a7537763fd1769",
  5 + "success": true,
  6 + "timestamp": 1711589284588
  7 +}
  1 +{
  2 + "code": "0",
  3 + "data": null,
  4 + "message": "Success",
  5 + "meta": null,
  6 + "requestId": "",
  7 + "success": true,
  8 + "timestamp": 1711609914928
  9 +}
  1 +{
  2 + "code": "0",
  3 + "data": null,
  4 + "message": "Success",
  5 + "meta": null,
  6 + "requestId": "",
  7 + "success": true,
  8 + "timestamp": 1711609966231
  9 +}
  1 +{
  2 + "code": "0",
  3 + "data": {
  4 + "hasNext": 0,
  5 + "list": [
  6 + {
  7 + "avatarFrame": "",
  8 + "checkStatus": 2,
  9 + "commentContent": "方法就是\\ud83d\\udc4d",
  10 + "commentContentSensitive": "",
  11 + "commentLevel": 1,
  12 + "commentPics": "",
  13 + "commentSensitive": "",
  14 + "commentType": "2",
  15 + "createTime": "2024-02-19 14:14:16",
  16 + "fromCreatorId": "",
  17 + "fromDeviceId": "F0B98E7F-6479-462C-BA25-5FC574511C8A",
  18 + "fromUserHeader": "https://sitcontentjdcdn.aikan.pdnews.cn/null20240127/1630371072/1706336907262.jpg?x-oss-process=image/resize,l_100/auto-orient,1/quality,q_90/format,jpg",
  19 + "fromUserId": "512157124138245",
  20 + "fromUserName": "树下🍑 1122334",
  21 + "fromUserType": 1,
  22 + "h5Url": "",
  23 + "id": 403445,
  24 + "keyArticle": 0,
  25 + "likeNum": 3,
  26 + "pageId": null,
  27 + "parentCommentVo": null,
  28 + "parentId": -1,
  29 + "rootCommentId": 403445,
  30 + "sensitiveExist": 0,
  31 + "sensitiveShow": 1,
  32 + "shareInfo": {
  33 + "shareCoverUrl": "http://sitcontentjdcdn.aikan.pdnews.cn/zhbj-20231012/image/content/7f1a342a809d4276aa975ba9e7fe2313.png",
  34 + "shareSummary": "这是一个开始、请持续关注这是一个开始、请持续关注这是一个开始、请持续关注这是一个开始、请持续关注这是",
  35 + "shareTitle": "这是一个开始、请持续关注这是一个开始、请",
  36 + "shareUrl": "https://pd-people-sit.pdnews.cn/column/30000633703-500000008559"
  37 + },
  38 + "targetId": "30000633703",
  39 + "targetRelId": "500000008559",
  40 + "targetRelObjectId": "2002",
  41 + "targetRelType": 1,
  42 + "targetStatus": 0,
  43 + "targetTitle": "这是一个开始、请持续关注这是一个开始、请持续关注这是一个开始、请持续关注这是一个开始、请持续关注这是一个开始、请持续关注这是一个开始、请持续关注这是一个开始、请持续关注",
  44 + "targetType": 8,
  45 + "topicType": null,
  46 + "uuid": "5901a353-79aa-4b81-81d7-f6f13f0a6817"
  47 + },
  48 + {
  49 + "avatarFrame": "",
  50 + "checkStatus": 2,
  51 + "commentContent": "毕业",
  52 + "commentContentSensitive": "",
  53 + "commentLevel": 1,
  54 + "commentPics": "",
  55 + "commentSensitive": "",
  56 + "commentType": "2",
  57 + "createTime": "2024-01-29 17:39:04",
  58 + "fromCreatorId": "",
  59 + "fromDeviceId": "",
  60 + "fromUserHeader": "https://sitcontentjdcdn.aikan.pdnews.cn/null20240127/1630371072/1706336907262.jpg?x-oss-process=image/resize,l_100/auto-orient,1/quality,q_90/format,jpg",
  61 + "fromUserId": "512157124138245",
  62 + "fromUserName": "树下🍑 1122334",
  63 + "fromUserType": 1,
  64 + "h5Url": "",
  65 + "id": 303318,
  66 + "keyArticle": 0,
  67 + "likeNum": 0,
  68 + "pageId": null,
  69 + "parentCommentVo": null,
  70 + "parentId": -1,
  71 + "rootCommentId": 303318,
  72 + "sensitiveExist": 0,
  73 + "sensitiveShow": 1,
  74 + "shareInfo": {
  75 + "shareCoverUrl": "http://sitcontentjdcdn.aikan.pdnews.cn/zhbj-20230923/image/content/4b8f615d1b134546aa4903300c38fb5b.png",
  76 + "shareSummary": "人民日报,有品质的新闻",
  77 + "shareTitle": "【广东爱情故事】人在广东已经漂泊十年",
  78 + "shareUrl": "https://pd-people-sit.pdnews.cn/column/30000627490-500000007811"
  79 + },
  80 + "targetId": "30000627490",
  81 + "targetRelId": "500000007811",
  82 + "targetRelObjectId": "10000002083",
  83 + "targetRelType": 2,
  84 + "targetStatus": 0,
  85 + "targetTitle": "【广东爱情故事】人在广东已经漂泊十年",
  86 + "targetType": 13,
  87 + "topicType": null,
  88 + "uuid": "59339983-a9ee-4054-98aa-0eddbc6275a1"
  89 + },
  90 + {
  91 + "avatarFrame": "",
  92 + "checkStatus": 2,
  93 + "commentContent": "索尼👍",
  94 + "commentContentSensitive": "",
  95 + "commentLevel": 1,
  96 + "commentPics": "",
  97 + "commentSensitive": "",
  98 + "commentType": "2",
  99 + "createTime": "2024-01-29 17:38:56",
  100 + "fromCreatorId": "",
  101 + "fromDeviceId": "",
  102 + "fromUserHeader": "https://sitcontentjdcdn.aikan.pdnews.cn/null20240127/1630371072/1706336907262.jpg?x-oss-process=image/resize,l_100/auto-orient,1/quality,q_90/format,jpg",
  103 + "fromUserId": "512157124138245",
  104 + "fromUserName": "树下🍑 1122334",
  105 + "fromUserType": 1,
  106 + "h5Url": "",
  107 + "id": 303317,
  108 + "keyArticle": 0,
  109 + "likeNum": 0,
  110 + "pageId": null,
  111 + "parentCommentVo": null,
  112 + "parentId": -1,
  113 + "rootCommentId": 303317,
  114 + "sensitiveExist": 0,
  115 + "sensitiveShow": 1,
  116 + "shareInfo": {
  117 + "shareCoverUrl": "http://sitcontentjdcdn.aikan.pdnews.cn/zhbj-20230923/image/content/4b8f615d1b134546aa4903300c38fb5b.png",
  118 + "shareSummary": "人民日报,有品质的新闻",
  119 + "shareTitle": "【广东爱情故事】人在广东已经漂泊十年",
  120 + "shareUrl": "https://pd-people-sit.pdnews.cn/column/30000627490-500000007811"
  121 + },
  122 + "targetId": "30000627490",
  123 + "targetRelId": "500000007811",
  124 + "targetRelObjectId": "10000002083",
  125 + "targetRelType": 2,
  126 + "targetStatus": 0,
  127 + "targetTitle": "【广东爱情故事】人在广东已经漂泊十年",
  128 + "targetType": 13,
  129 + "topicType": null,
  130 + "uuid": "8808cffa-6496-4dc9-ac79-a65c8ada09d2"
  131 + },
  132 + {
  133 + "avatarFrame": "",
  134 + "checkStatus": 2,
  135 + "commentContent": "游客评论苹果",
  136 + "commentContentSensitive": "",
  137 + "commentLevel": 1,
  138 + "commentPics": "",
  139 + "commentSensitive": "",
  140 + "commentType": "2",
  141 + "createTime": "2024-01-27 15:00:24",
  142 + "fromCreatorId": "",
  143 + "fromDeviceId": "F0B98E7F-6479-462C-BA25-5FC574511C8A",
  144 + "fromUserHeader": "https://sitcontentjdcdn.aikan.pdnews.cn/null20240127/1630371072/1706336907262.jpg?x-oss-process=image/resize,l_100/auto-orient,1/quality,q_90/format,jpg",
  145 + "fromUserId": "512157124138245",
  146 + "fromUserName": "树下🍑 1122334",
  147 + "fromUserType": 1,
  148 + "h5Url": "",
  149 + "id": 403426,
  150 + "keyArticle": 0,
  151 + "likeNum": 1,
  152 + "pageId": null,
  153 + "parentCommentVo": null,
  154 + "parentId": -1,
  155 + "rootCommentId": 403426,
  156 + "sensitiveExist": 0,
  157 + "sensitiveShow": 1,
  158 + "shareInfo": {
  159 + "shareCoverUrl": "http://sitcontentjdcdn.aikan.pdnews.cn/zhbj-20231012/image/content/7f1a342a809d4276aa975ba9e7fe2313.png",
  160 + "shareSummary": "这是一个开始、请持续关注这是一个开始、请持续关注这是一个开始、请持续关注这是一个开始、请持续关注这是",
  161 + "shareTitle": "这是一个开始、请持续关注这是一个开始、请",
  162 + "shareUrl": "https://pd-people-sit.pdnews.cn/column/30000633703-500000008559"
  163 + },
  164 + "targetId": "30000633703",
  165 + "targetRelId": "500000008559",
  166 + "targetRelObjectId": "2002",
  167 + "targetRelType": 1,
  168 + "targetStatus": 0,
  169 + "targetTitle": "这是一个开始、请持续关注这是一个开始、请持续关注这是一个开始、请持续关注这是一个开始、请持续关注这是一个开始、请持续关注这是一个开始、请持续关注这是一个开始、请持续关注",
  170 + "targetType": 8,
  171 + "topicType": null,
  172 + "uuid": "a272d091-3697-44ca-95e6-532028eee776"
  173 + },
  174 + {
  175 + "avatarFrame": "",
  176 + "checkStatus": 2,
  177 + "commentContent": "游客账号评论安卓",
  178 + "commentContentSensitive": "",
  179 + "commentLevel": 1,
  180 + "commentPics": "",
  181 + "commentSensitive": "",
  182 + "commentType": "2",
  183 + "createTime": "2024-01-27 15:00:15",
  184 + "fromCreatorId": "",
  185 + "fromDeviceId": "23c43f15-37e9-3f2d-9999-bd1abbb7e0ed",
  186 + "fromUserHeader": "https://sitcontentjdcdn.aikan.pdnews.cn/null20240127/1630371072/1706336907262.jpg?x-oss-process=image/resize,l_100/auto-orient,1/quality,q_90/format,jpg",
  187 + "fromUserId": "512157124138245",
  188 + "fromUserName": "树下🍑 1122334",
  189 + "fromUserType": 1,
  190 + "h5Url": "",
  191 + "id": 403425,
  192 + "keyArticle": 0,
  193 + "likeNum": 0,
  194 + "pageId": null,
  195 + "parentCommentVo": null,
  196 + "parentId": -1,
  197 + "rootCommentId": 403425,
  198 + "sensitiveExist": 0,
  199 + "sensitiveShow": 1,
  200 + "shareInfo": {
  201 + "shareCoverUrl": "http://sitcontentjdcdn.aikan.pdnews.cn/zhbj-20231012/image/content/7f1a342a809d4276aa975ba9e7fe2313.png",
  202 + "shareSummary": "这是一个开始、请持续关注这是一个开始、请持续关注这是一个开始、请持续关注这是一个开始、请持续关注这是",
  203 + "shareTitle": "这是一个开始、请持续关注这是一个开始、请",
  204 + "shareUrl": "https://pd-people-sit.pdnews.cn/column/30000633703-500000008559"
  205 + },
  206 + "targetId": "30000633703",
  207 + "targetRelId": "500000008559",
  208 + "targetRelObjectId": "2002",
  209 + "targetRelType": 1,
  210 + "targetStatus": 0,
  211 + "targetTitle": "这是一个开始、请持续关注这是一个开始、请持续关注这是一个开始、请持续关注这是一个开始、请持续关注这是一个开始、请持续关注这是一个开始、请持续关注这是一个开始、请持续关注",
  212 + "targetType": 8,
  213 + "topicType": null,
  214 + "uuid": "62225e7a-9afd-4b8c-b9b6-71a5d610997d"
  215 + },
  216 + {
  217 + "avatarFrame": "",
  218 + "checkStatus": 2,
  219 + "commentContent": "你理解吗",
  220 + "commentContentSensitive": "",
  221 + "commentLevel": 1,
  222 + "commentPics": "",
  223 + "commentSensitive": "",
  224 + "commentType": "2",
  225 + "createTime": "2024-01-27 14:45:21",
  226 + "fromCreatorId": "",
  227 + "fromDeviceId": "23c43f15-37e9-3f2d-9999-bd1abbb7e0ed",
  228 + "fromUserHeader": "https://sitcontentjdcdn.aikan.pdnews.cn/null20240127/1630371072/1706336907262.jpg?x-oss-process=image/resize,l_100/auto-orient,1/quality,q_90/format,jpg",
  229 + "fromUserId": "512157124138245",
  230 + "fromUserName": "树下🍑 1122334",
  231 + "fromUserType": 1,
  232 + "h5Url": "",
  233 + "id": 403422,
  234 + "keyArticle": 0,
  235 + "likeNum": 0,
  236 + "pageId": null,
  237 + "parentCommentVo": null,
  238 + "parentId": -1,
  239 + "rootCommentId": 403422,
  240 + "sensitiveExist": 0,
  241 + "sensitiveShow": 1,
  242 + "shareInfo": {
  243 + "shareCoverUrl": "http://sitcontentjdcdn.aikan.pdnews.cn/zhbj-20231130/image/content/09ee931569d34781b9bbe85f5348873f.jpg",
  244 + "shareSummary": "人民日报,有品质的新闻",
  245 + "shareTitle": "点亮香港“小航天迷”的“太空梦”——内地航天专家走进香港中小学校园",
  246 + "shareUrl": "https://pd-people-sit.pdnews.cn/rmhphotos/30000650925"
  247 + },
  248 + "targetId": "30000650925",
  249 + "targetRelId": "500000013228",
  250 + "targetRelObjectId": "2058",
  251 + "targetRelType": 1,
  252 + "targetStatus": 0,
  253 + "targetTitle": "点亮香港“小航天迷”的“太空梦”——内地航天专家走进香港中小学校园",
  254 + "targetType": 9,
  255 + "topicType": null,
  256 + "uuid": "cc6b2322-ffa4-4a59-a7af-5e4a18afcbd3"
  257 + },
  258 + {
  259 + "avatarFrame": "",
  260 + "checkStatus": 2,
  261 + "commentContent": "你好我是游客",
  262 + "commentContentSensitive": "",
  263 + "commentLevel": 1,
  264 + "commentPics": "",
  265 + "commentSensitive": "",
  266 + "commentType": "2",
  267 + "createTime": "2024-01-27 14:40:19",
  268 + "fromCreatorId": "",
  269 + "fromDeviceId": "23c43f15-37e9-3f2d-9999-bd1abbb7e0ed",
  270 + "fromUserHeader": "https://sitcontentjdcdn.aikan.pdnews.cn/null20240127/1630371072/1706336907262.jpg?x-oss-process=image/resize,l_100/auto-orient,1/quality,q_90/format,jpg",
  271 + "fromUserId": "512157124138245",
  272 + "fromUserName": "树下🍑 1122334",
  273 + "fromUserType": 1,
  274 + "h5Url": "",
  275 + "id": 303306,
  276 + "keyArticle": 0,
  277 + "likeNum": 0,
  278 + "pageId": null,
  279 + "parentCommentVo": null,
  280 + "parentId": -1,
  281 + "rootCommentId": 303306,
  282 + "sensitiveExist": 0,
  283 + "sensitiveShow": 1,
  284 + "shareInfo": {
  285 + "shareCoverUrl": "http://sitcontentjdcdn.aikan.pdnews.cn/zhbj-20231130/image/content/09ee931569d34781b9bbe85f5348873f.jpg",
  286 + "shareSummary": "人民日报,有品质的新闻",
  287 + "shareTitle": "点亮香港“小航天迷”的“太空梦”——内地航天专家走进香港中小学校园",
  288 + "shareUrl": "https://pd-people-sit.pdnews.cn/rmhphotos/30000650925"
  289 + },
  290 + "targetId": "30000650925",
  291 + "targetRelId": "500000013228",
  292 + "targetRelObjectId": "2058",
  293 + "targetRelType": 1,
  294 + "targetStatus": 0,
  295 + "targetTitle": "点亮香港“小航天迷”的“太空梦”——内地航天专家走进香港中小学校园",
  296 + "targetType": 9,
  297 + "topicType": null,
  298 + "uuid": "9fac53da-603f-444a-8807-4f5feacf55bb"
  299 + },
  300 + {
  301 + "avatarFrame": "",
  302 + "checkStatus": 2,
  303 + "commentContent": "你好我是游客",
  304 + "commentContentSensitive": "",
  305 + "commentLevel": 1,
  306 + "commentPics": "",
  307 + "commentSensitive": "",
  308 + "commentType": "2",
  309 + "createTime": "2024-01-27 14:34:30",
  310 + "fromCreatorId": "",
  311 + "fromDeviceId": "23c43f15-37e9-3f2d-9999-bd1abbb7e0ed",
  312 + "fromUserHeader": "https://sitcontentjdcdn.aikan.pdnews.cn/null20240127/1630371072/1706336907262.jpg?x-oss-process=image/resize,l_100/auto-orient,1/quality,q_90/format,jpg",
  313 + "fromUserId": "512157124138245",
  314 + "fromUserName": "树下🍑 1122334",
  315 + "fromUserType": 1,
  316 + "h5Url": "",
  317 + "id": 403420,
  318 + "keyArticle": 0,
  319 + "likeNum": 0,
  320 + "pageId": null,
  321 + "parentCommentVo": null,
  322 + "parentId": -1,
  323 + "rootCommentId": 403420,
  324 + "sensitiveExist": 0,
  325 + "sensitiveShow": 1,
  326 + "shareInfo": {
  327 + "shareCoverUrl": "http://sitcontentjdcdn.aikan.pdnews.cn/image/creator/2024012911/f2f9fe93ca464d05bc0407a385ad877b.png",
  328 + "shareSummary": "爸爸角色扮演医生,在宝蓝比赛摔倒的时候悉心照顾,其他小朋友也要注意呀!",
  329 + "shareTitle": "爸爸角色扮演医生,在宝蓝比赛摔倒的时候悉心照顾,其他小朋友也要注意呀!",
  330 + "shareUrl": "https://pd-people-sit.pdnews.cn/rmhvideo/30000716043"
  331 + },
  332 + "targetId": "30000716043",
  333 + "targetRelId": "500000030952",
  334 + "targetRelObjectId": "2058",
  335 + "targetRelType": 1,
  336 + "targetStatus": 0,
  337 + "targetTitle": "爸爸角色扮演医生,在宝蓝比赛摔倒的时候悉心照顾,其他小朋友也要注意呀!",
  338 + "targetType": 1,
  339 + "topicType": null,
  340 + "uuid": "31305151-6b9c-49ea-8e5b-9e4b8fffe79d"
  341 + },
  342 + {
  343 + "avatarFrame": "",
  344 + "checkStatus": 2,
  345 + "commentContent": "游客账号",
  346 + "commentContentSensitive": "",
  347 + "commentLevel": 1,
  348 + "commentPics": "",
  349 + "commentSensitive": "",
  350 + "commentType": "2",
  351 + "createTime": "2024-01-27 14:27:52",
  352 + "fromCreatorId": "",
  353 + "fromDeviceId": "23c43f15-37e9-3f2d-9999-bd1abbb7e0ed",
  354 + "fromUserHeader": "https://sitcontentjdcdn.aikan.pdnews.cn/null20240127/1630371072/1706336907262.jpg?x-oss-process=image/resize,l_100/auto-orient,1/quality,q_90/format,jpg",
  355 + "fromUserId": "512157124138245",
  356 + "fromUserName": "树下🍑 1122334",
  357 + "fromUserType": 1,
  358 + "h5Url": "",
  359 + "id": 403417,
  360 + "keyArticle": 0,
  361 + "likeNum": 0,
  362 + "pageId": null,
  363 + "parentCommentVo": null,
  364 + "parentId": -1,
  365 + "rootCommentId": 403417,
  366 + "sensitiveExist": 0,
  367 + "sensitiveShow": 1,
  368 + "shareInfo": {
  369 + "shareCoverUrl": "",
  370 + "shareSummary": "人民日报,有品质的新闻",
  371 + "shareTitle": "跟着习主席看世界|同舟共济 打造人类卫生健康共同体",
  372 + "shareUrl": "https://pd-people-sit.pdnews.cn/column/30000628337-500000004210"
  373 + },
  374 + "targetId": "30000628337",
  375 + "targetRelId": "500000004210",
  376 + "targetRelObjectId": "2002",
  377 + "targetRelType": 1,
  378 + "targetStatus": 0,
  379 + "targetTitle": "跟着习主席看世界|同舟共济 打造人类卫生健康共同体",
  380 + "targetType": 8,
  381 + "topicType": null,
  382 + "uuid": "034911cc-34ca-4209-add2-46f48f4b2104"
  383 + },
  384 + {
  385 + "avatarFrame": "",
  386 + "checkStatus": 2,
  387 + "commentContent": "我是游客",
  388 + "commentContentSensitive": "",
  389 + "commentLevel": 1,
  390 + "commentPics": "",
  391 + "commentSensitive": "",
  392 + "commentType": "2",
  393 + "createTime": "2024-01-27 14:25:34",
  394 + "fromCreatorId": "",
  395 + "fromDeviceId": "F0B98E7F-6479-462C-BA25-5FC574511C8A",
  396 + "fromUserHeader": "https://sitcontentjdcdn.aikan.pdnews.cn/null20240127/1630371072/1706336907262.jpg?x-oss-process=image/resize,l_100/auto-orient,1/quality,q_90/format,jpg",
  397 + "fromUserId": "512157124138245",
  398 + "fromUserName": "树下🍑 1122334",
  399 + "fromUserType": 1,
  400 + "h5Url": "",
  401 + "id": 303305,
  402 + "keyArticle": 0,
  403 + "likeNum": 0,
  404 + "pageId": null,
  405 + "parentCommentVo": null,
  406 + "parentId": -1,
  407 + "rootCommentId": 303305,
  408 + "sensitiveExist": 0,
  409 + "sensitiveShow": 1,
  410 + "shareInfo": {
  411 + "shareCoverUrl": "http://sitcontentjdcdn.aikan.pdnews.cn/zhbj-20240127/image/content/e8d93872483a48c7a4eaa48f70211ab1.png",
  412 + "shareSummary": "人民日报,有品质的新闻",
  413 + "shareTitle": "“大学也有家长群",
  414 + "shareUrl": "https://pd-people-sit.pdnews.cn/column/30000723442-500000031275"
  415 + },
  416 + "targetId": "30000723442",
  417 + "targetRelId": "500000031275",
  418 + "targetRelObjectId": "2002",
  419 + "targetRelType": 1,
  420 + "targetStatus": 0,
  421 + "targetTitle": "“大学也有家长群",
  422 + "targetType": 8,
  423 + "topicType": null,
  424 + "uuid": "0b0aa5ef-b2de-4d01-9f5a-274c5122560f"
  425 + },
  426 + {
  427 + "avatarFrame": "",
  428 + "checkStatus": 2,
  429 + "commentContent": "你好,我是游客动态",
  430 + "commentContentSensitive": "",
  431 + "commentLevel": 1,
  432 + "commentPics": "",
  433 + "commentSensitive": "",
  434 + "commentType": "2",
  435 + "createTime": "2024-01-27 14:24:56",
  436 + "fromCreatorId": "",
  437 + "fromDeviceId": "23c43f15-37e9-3f2d-9999-bd1abbb7e0ed",
  438 + "fromUserHeader": "https://sitcontentjdcdn.aikan.pdnews.cn/null20240127/1630371072/1706336907262.jpg?x-oss-process=image/resize,l_100/auto-orient,1/quality,q_90/format,jpg",
  439 + "fromUserId": "512157124138245",
  440 + "fromUserName": "树下🍑 1122334",
  441 + "fromUserType": 1,
  442 + "h5Url": "",
  443 + "id": 303304,
  444 + "keyArticle": 0,
  445 + "likeNum": 0,
  446 + "pageId": null,
  447 + "parentCommentVo": null,
  448 + "parentId": -1,
  449 + "rootCommentId": 303304,
  450 + "sensitiveExist": 0,
  451 + "sensitiveShow": 1,
  452 + "shareInfo": {
  453 + "shareCoverUrl": "http://sitcontentjdcdn.aikan.pdnews.cn/zhbj-20231130/image/content/3e0cce06724740f0807ff0731c4a1d03/C4BC1C53-2B9C-4A54-BF95-044242D78260.jpg",
  454 + "shareSummary": "发布动态带活动13",
  455 + "shareTitle": "发布动态带活动13",
  456 + "shareUrl": "https://pd-people-sit.pdnews.cn/rmhmoments/30000650969"
  457 + },
  458 + "targetId": "30000650969",
  459 + "targetRelId": "500000013237",
  460 + "targetRelObjectId": "2058",
  461 + "targetRelType": 1,
  462 + "targetStatus": 0,
  463 + "targetTitle": "发布动态带活动13",
  464 + "targetType": 14,
  465 + "topicType": null,
  466 + "uuid": "ae2b2ece-d036-4b01-91e7-9708b0b5fe1c"
  467 + },
  468 + {
  469 + "avatarFrame": "",
  470 + "checkStatus": 2,
  471 + "commentContent": "你好我是游客",
  472 + "commentContentSensitive": "",
  473 + "commentLevel": 1,
  474 + "commentPics": "",
  475 + "commentSensitive": "",
  476 + "commentType": "2",
  477 + "createTime": "2024-01-27 14:24:19",
  478 + "fromCreatorId": "",
  479 + "fromDeviceId": "23c43f15-37e9-3f2d-9999-bd1abbb7e0ed",
  480 + "fromUserHeader": "https://sitcontentjdcdn.aikan.pdnews.cn/null20240127/1630371072/1706336907262.jpg?x-oss-process=image/resize,l_100/auto-orient,1/quality,q_90/format,jpg",
  481 + "fromUserId": "512157124138245",
  482 + "fromUserName": "树下🍑 1122334",
  483 + "fromUserType": 1,
  484 + "h5Url": "",
  485 + "id": 303302,
  486 + "keyArticle": 0,
  487 + "likeNum": 0,
  488 + "pageId": null,
  489 + "parentCommentVo": null,
  490 + "parentId": -1,
  491 + "rootCommentId": 303302,
  492 + "sensitiveExist": 0,
  493 + "sensitiveShow": 1,
  494 + "shareInfo": {
  495 + "shareCoverUrl": "http://sitcontentjdcdn.aikan.pdnews.cn/zhbj-20240127/image/content/e8d93872483a48c7a4eaa48f70211ab1.png",
  496 + "shareSummary": "人民日报,有品质的新闻",
  497 + "shareTitle": "“大学也有家长群",
  498 + "shareUrl": "https://pd-people-sit.pdnews.cn/column/30000723442-500000031275"
  499 + },
  500 + "targetId": "30000723442",
  501 + "targetRelId": "500000031275",
  502 + "targetRelObjectId": "2002",
  503 + "targetRelType": 1,
  504 + "targetStatus": 0,
  505 + "targetTitle": "“大学也有家长群",
  506 + "targetType": 8,
  507 + "topicType": null,
  508 + "uuid": "766a6bac-aa1d-4e88-a798-f19bade201ee"
  509 + }
  510 + ],
  511 + "pageNum": 1,
  512 + "pageSize": 20,
  513 + "totalCommentNum": 12,
  514 + "totalCount": 12
  515 + },
  516 + "message": "Success",
  517 + "meta": null,
  518 + "requestId": "",
  519 + "success": true,
  520 + "timestamp": 1711440876958
  521 +}
  1 +{
  2 + "code": "0",
  3 + "data": [
  4 + {
  5 + "commentId": 403445,
  6 + "status": 1
  7 + },
  8 + {
  9 + "commentId": 303318,
  10 + "status": 0
  11 + },
  12 + {
  13 + "commentId": 303317,
  14 + "status": 0
  15 + },
  16 + {
  17 + "commentId": 403426,
  18 + "status": 1
  19 + },
  20 + {
  21 + "commentId": 403425,
  22 + "status": 0
  23 + },
  24 + {
  25 + "commentId": 403422,
  26 + "status": 0
  27 + },
  28 + {
  29 + "commentId": 303306,
  30 + "status": 0
  31 + },
  32 + {
  33 + "commentId": 403420,
  34 + "status": 0
  35 + },
  36 + {
  37 + "commentId": 403417,
  38 + "status": 0
  39 + },
  40 + {
  41 + "commentId": 303305,
  42 + "status": 0
  43 + },
  44 + {
  45 + "commentId": 303304,
  46 + "status": 0
  47 + },
  48 + {
  49 + "commentId": 303302,
  50 + "status": 0
  51 + }
  52 + ],
  53 + "message": "Success",
  54 + "meta": null,
  55 + "requestId": "",
  56 + "success": true,
  57 + "timestamp": 1711440877105
  58 +}
  1 +{
  2 + "code": "0",
  3 + "data": {
  4 + "articleCreation": 0,
  5 + "attentionNum": 1,
  6 + "authIcon": "",
  7 + "authId": 0,
  8 + "authPersonal": "",
  9 + "authTitle": "",
  10 + "avatarFrame": "",
  11 + "banControl": 0,
  12 + "browseNum": 76,
  13 + "categoryAuth": "",
  14 + "city": "",
  15 + "cnContentPublish": 0,
  16 + "cnIsComment": 0,
  17 + "cnIsLike": 0,
  18 + "cnLiveCommentControl": 0,
  19 + "cnLiveGiftControl": 0,
  20 + "cnLiveLikeControl": 0,
  21 + "cnLivePublish": 0,
  22 + "cnLiveShareControl": 0,
  23 + "cnShareControl": 0,
  24 + "contentPublish": 0,
  25 + "creatorId": "",
  26 + "district": "",
  27 + "dynamicControl": 0,
  28 + "dynamicCreation": 0,
  29 + "fansNum": 0,
  30 + "headPhotoUrl": "https://sitcontentjdcdn.aikan.pdnews.cn/null20240127/1630371072/1706336907262.jpg",
  31 + "honoraryIcon": "",
  32 + "honoraryTitle": "",
  33 + "introduction": "",
  34 + "isAttention": 0,
  35 + "isComment": 0,
  36 + "isLike": 0,
  37 + "liveCommentControl": 0,
  38 + "liveGiftControl": 0,
  39 + "liveLikeControl": 0,
  40 + "livePublish": 0,
  41 + "liveShareControl": 0,
  42 + "liveSwitch": 0,
  43 + "mainControl": 1,
  44 + "originUserId": "",
  45 + "pictureCollectionCreation": 0,
  46 + "posterShareControl": 1,
  47 + "province": "",
  48 + "region": "安徽省",
  49 + "registTime": 1703485580000,
  50 + "shareControl": 0,
  51 + "shareUrl": "",
  52 + "subjectType": 0,
  53 + "userId": "512157124138245",
  54 + "userName": "树下🍑 1122334",
  55 + "userType": "1",
  56 + "videoCollectionCreation": 0,
  57 + "videoCreation": 0
  58 + },
  59 + "message": "Success",
  60 + "meta": null,
  61 + "requestId": "",
  62 + "success": true,
  63 + "timestamp": 1711440875633
  64 +}
  1 +{
  2 + "code": "0",
  3 + "data": [
  4 + {
  5 + "level": 2,
  6 + "levelHead": "http://rmrb-video-content-sit.oss-cn-beijing.aliyuncs.com/sjbj-20240125/image/display/88c45bf56ac941b883c69bd8ed373164.png",
  7 + "userId": 512157124138245
  8 + }
  9 + ],
  10 + "message": "Success",
  11 + "success": true,
  12 + "timestamp": 1711440876088
  13 +}
  1 +{
  2 + "code": "0",
  3 + "data": {
  4 + "hasNext": 0,
  5 + "list": [
  6 + {
  7 + "attentionCreatorId": "3259284",
  8 + "attentionHeadPhotoUrl": "https://sitcontentjdcdn.aikan.pdnews.cn/vod/content/202401/20240127161739536/eUj.png?x-oss-process=image/resize,l_400/auto-orient,1/quality,q_90/format,jpg",
  9 + "attentionNum": 0,
  10 + "attentionUserId": "535571576006021",
  11 + "attentionUserName": "斯特的7778",
  12 + "attentionUserType": 2,
  13 + "authIcon": "",
  14 + "authId": 0,
  15 + "authPersional": "",
  16 + "authTitle": "",
  17 + "banControl": 0,
  18 + "categoryAuth": "",
  19 + "cnLiveCommentControl": 1,
  20 + "cnLiveGiftControl": 1,
  21 + "cnLiveLikeControl": 1,
  22 + "cnLiveShareControl": 1,
  23 + "cnShareControl": 1,
  24 + "collectNum": 1,
  25 + "commentNum": 0,
  26 + "createTime": 1706344099000,
  27 + "fansNum": 1,
  28 + "honoraryIcon": "",
  29 + "honoraryTitle": "",
  30 + "id": 100703,
  31 + "introduction": "暗黑世界顶级",
  32 + "isAttention": 0,
  33 + "isComment": 1,
  34 + "isLike": 1,
  35 + "isVisiable": 1,
  36 + "likeNum": 0,
  37 + "liveCommentControl": 1,
  38 + "liveGiftControl": 1,
  39 + "liveLikeControl": 1,
  40 + "liveShareControl": 1,
  41 + "mainControl": 1,
  42 + "posterShareControl": 0,
  43 + "registTime": 1706343790000,
  44 + "shareControl": 1,
  45 + "shareNum": 7,
  46 + "status": 1,
  47 + "subjectType": null,
  48 + "updateTime": 1706344099000,
  49 + "userId": "512157124138245",
  50 + "userType": 1
  51 + }
  52 + ],
  53 + "pageNum": 1,
  54 + "pageSize": 20,
  55 + "totalCount": 1
  56 + },
  57 + "message": "Success",
  58 + "meta": null,
  59 + "requestId": "",
  60 + "success": true,
  61 + "timestamp": 1711441048304
  62 +}
@@ -11,6 +11,38 @@ @@ -11,6 +11,38 @@
11 { 11 {
12 "name": "EntryAbility_label", 12 "name": "EntryAbility_label",
13 "value": "$string:app_name" 13 "value": "$string:app_name"
  14 + },
  15 + {
  16 + "name": "dialog_text_title",
  17 + "value": "个人隐私保护指引"
  18 + },
  19 + {
  20 + "name": "dialog_text_subTitle",
  21 + "value": "欢迎您使用人民日报客户端!"
  22 + },
  23 + {
  24 + "name": "dialog_text_privacy_content",
  25 + "value": "为了更好地为您提供阅读新闻、发布评论等相关服务,我们会根据您使用服务的具体功能需要,收集必要的用户信息。您可通过阅读《隐私政策》和《用户协议》了解我们收集、使用、存储和共享个人信息的情况,以及对您个人隐私的保护措施。人民日报客户端深知个人信息对您的重要性,我们将以最高标准遵守法律法规要求,尽全力保护您的个人信息安全。"
  26 + },
  27 + {
  28 + "name": "dialog_text_privacy_statement",
  29 + "value": "如您同意,请点击“同意”开始接受"
  30 + },
  31 + {
  32 + "name": "dialog_button_disagree",
  33 + "value": "暂不使用"
  34 + },
  35 + {
  36 + "name": "dialog_button_agree",
  37 + "value": "同意"
  38 + },
  39 + {
  40 + "name": "privacy_text_title_policy",
  41 + "value": "《隐私政策》"
  42 + },
  43 + {
  44 + "name": "privacy_text_title_protocol",
  45 + "value": "《用户协议》"
14 } 46 }
15 ] 47 ]
16 } 48 }
  1 +{
  2 + "requests" : [
  3 +
  4 + ]
  5 +}
@@ -42,4 +42,6 @@ export { SettingPasswordLayout } from "./components/page/SettingPasswordLayout" @@ -42,4 +42,6 @@ export { SettingPasswordLayout } from "./components/page/SettingPasswordLayout"
42 42
43 export { FollowFirstTabsComponent } from "./components/page/mine/follow/FollowFirstTabsComponent" 43 export { FollowFirstTabsComponent } from "./components/page/mine/follow/FollowFirstTabsComponent"
44 44
45 -export { MyHomeComponent } from "./components/page/mine/MyHomeComponent" 45 +export { MyHomeComponent } from "./components/page/mine/home/MyHomeComponent"
  46 +
  47 +export { OtherUserHomeComponent } from "./components/page/mine/home/OtherUserHomeComponent"
  1 +import MinePageDatasModel from '../../../../model/MinePageDatasModel'
  2 +import { AppointmentOperationRequestItem } from '../../../../viewmodel/AppointmentOperationRequestItem'
1 import { MineAppointmentItem } from '../../../../viewmodel/MineAppointmentItem' 3 import { MineAppointmentItem } from '../../../../viewmodel/MineAppointmentItem'
  4 +import { MyCustomDialog } from '../../../reusable/MyCustomDialog'
2 5
3 @Component 6 @Component
4 export struct AppointmentListChildComponent{ 7 export struct AppointmentListChildComponent{
5 @ObjectLink item: MineAppointmentItem 8 @ObjectLink item: MineAppointmentItem
6 9
  10 + dialogController: CustomDialogController = new CustomDialogController({
  11 + builder: MyCustomDialog({
  12 + cancel: this.onCancel,
  13 + confirm: this.onAccept.bind(this),//如果后期回调方法里 要使用this,一定要bind
  14 + title: "提示",
  15 + tipValue: '是否确认取消预约',
  16 + }),
  17 + autoCancel: true,
  18 + alignment: DialogAlignment.Center,
  19 + offset: { dx: 0, dy: -20 },
  20 + gridCount: 4,
  21 + customStyle: false
  22 + })
  23 +
7 build() { 24 build() {
8 Column(){ 25 Column(){
9 Stack(){ 26 Stack(){
@@ -95,8 +112,7 @@ export struct AppointmentListChildComponent{ @@ -95,8 +112,7 @@ export struct AppointmentListChildComponent{
95 .height('46lpx') 112 .height('46lpx')
96 .borderRadius('6lpx') 113 .borderRadius('6lpx')
97 .onClick(()=>{ 114 .onClick(()=>{
98 - this.item.isAppointment = !this.item.isAppointment  
99 - //TODO 预约动作 115 + this.dialogController.open()
100 }) 116 })
101 }else { 117 }else {
102 Text(this.item.relType === 2?"去观看":"看回放") 118 Text(this.item.relType === 2?"去观看":"看回放")
@@ -117,4 +133,25 @@ export struct AppointmentListChildComponent{ @@ -117,4 +133,25 @@ export struct AppointmentListChildComponent{
117 .backgroundColor($r('app.color.white')) 133 .backgroundColor($r('app.color.white'))
118 .borderRadius('8lpx') 134 .borderRadius('8lpx')
119 } 135 }
  136 +
  137 + onCancel() {
  138 + console.info('Callback when the first button is clicked')
  139 + }
  140 +
  141 + onAccept() {
  142 + console.info('Callback when the second button is clicked')
  143 + this.appointmentOperation()
  144 + }
  145 +
  146 + appointmentOperation(){
  147 + let item = new AppointmentOperationRequestItem(this.item.relId,this.item.liveId+"",!this.item.isAppointment)
  148 + MinePageDatasModel.getAppointmentOperation(item,getContext(this)).then((value)=>{
  149 + if(value!=null){
  150 + if (value.code === 0 || value.code.toString() === "0") {
  151 + this.item.isAppointment = !this.item.isAppointment
  152 + }
  153 + }
  154 + })
  155 + }
  156 +
120 } 157 }
@@ -71,9 +71,9 @@ export struct AppointmentListUI{ @@ -71,9 +71,9 @@ export struct AppointmentListUI{
71 value.list.forEach((value)=>{ 71 value.list.forEach((value)=>{
72 let dealTime = this.DealStartTime(value.planStartTime) 72 let dealTime = this.DealStartTime(value.planStartTime)
73 if(dealTime!=null && dealTime.length === 2){ 73 if(dealTime!=null && dealTime.length === 2){
74 - this.data.push(new MineAppointmentItem(value.imageUrl,value.status,value.title,true,dealTime[0],dealTime[1],value.relType)) 74 + this.data.push(new MineAppointmentItem(value.imageUrl,value.status,value.title,true,dealTime[0],dealTime[1],value.relType,value.liveId,value.relId))
75 }else { 75 }else {
76 - this.data.push(new MineAppointmentItem(value.imageUrl,value.status,value.title,true,"","",value.relType)) 76 + this.data.push(new MineAppointmentItem(value.imageUrl,value.status,value.title,true,"","",value.relType,value.liveId,value.relId))
77 } 77 }
78 }) 78 })
79 this.data.notifyDataReload() 79 this.data.notifyDataReload()
1 import { LazyDataSource, StringUtils } from 'wdKit'; 1 import { LazyDataSource, StringUtils } from 'wdKit';
2 import MinePageDatasModel from '../../../../model/MinePageDatasModel'; 2 import MinePageDatasModel from '../../../../model/MinePageDatasModel';
  3 +import { HttpUrlUtils } from '../../../../network/HttpUrlUtils';
  4 +import { Params } from '../../../../repository/bean/Params';
  5 +import RouteManager from '../../../../utils/RouteManager';
3 import { FollowListDetailItem } from '../../../../viewmodel/FollowListDetailItem' 6 import { FollowListDetailItem } from '../../../../viewmodel/FollowListDetailItem'
4 import { FollowListDetailRequestItem } from '../../../../viewmodel/FollowListDetailRequestItem'; 7 import { FollowListDetailRequestItem } from '../../../../viewmodel/FollowListDetailRequestItem';
5 import { FollowListStatusRequestItem } from '../../../../viewmodel/FollowListStatusRequestItem'; 8 import { FollowListStatusRequestItem } from '../../../../viewmodel/FollowListStatusRequestItem';
  9 +import { FollowOperationRequestItem } from '../../../../viewmodel/FollowOperationRequestItem';
6 import { MineFollowListDetailItem } from '../../../../viewmodel/MineFollowListDetailItem'; 10 import { MineFollowListDetailItem } from '../../../../viewmodel/MineFollowListDetailItem';
7 import { QueryListIsFollowedItem } from '../../../../viewmodel/QueryListIsFollowedItem'; 11 import { QueryListIsFollowedItem } from '../../../../viewmodel/QueryListIsFollowedItem';
  12 +import { RouterObject } from '../../../../viewmodel/RouterObject';
8 import { ListHasNoMoreDataUI } from '../../../reusable/ListHasNoMoreDataUI'; 13 import { ListHasNoMoreDataUI } from '../../../reusable/ListHasNoMoreDataUI';
9 14
10 const TAG = "FollowListDetailUI" 15 const TAG = "FollowListDetailUI"
@@ -72,7 +77,7 @@ export struct FollowListDetailUI{ @@ -72,7 +77,7 @@ export struct FollowListDetailUI{
72 this.hasMore = false 77 this.hasMore = false
73 }else{ 78 }else{
74 value.list.forEach((value)=>{ 79 value.list.forEach((value)=>{
75 - this.data.push(new FollowListDetailItem(value.attentionHeadPhotoUrl,value.attentionUserName,value.fansNum,value.introduction,value.attentionCreatorId,"1")) 80 + this.data.push(new FollowListDetailItem(value.attentionHeadPhotoUrl,value.attentionUserName,value.fansNum,value.introduction,value.attentionCreatorId,"1",value.attentionUserId,value.attentionUserType,value.attentionUserId))
76 }) 81 })
77 this.data.notifyDataReload() 82 this.data.notifyDataReload()
78 this.count = this.data.totalCount() 83 this.count = this.data.totalCount()
@@ -90,9 +95,6 @@ export struct FollowListDetailUI{ @@ -90,9 +95,6 @@ export struct FollowListDetailUI{
90 } 95 }
91 }else{ 96 }else{
92 if(this.hasMore){ 97 if(this.hasMore){
93 - if(this.creatorDirectoryId === 120){  
94 - console.log("console");  
95 - }  
96 let object = new FollowListDetailRequestItem(this.creatorDirectoryId,20,this.curPageNum) 98 let object = new FollowListDetailRequestItem(this.creatorDirectoryId,20,this.curPageNum)
97 99
98 MinePageDatasModel.getFollowListDetailData(object,getContext(this)).then((value)=>{ 100 MinePageDatasModel.getFollowListDetailData(object,getContext(this)).then((value)=>{
@@ -115,7 +117,7 @@ export struct FollowListDetailUI{ @@ -115,7 +117,7 @@ export struct FollowListDetailUI{
115 let data : FollowListDetailItem[] = [] 117 let data : FollowListDetailItem[] = []
116 value.list.forEach((item)=>{ 118 value.list.forEach((item)=>{
117 status.creatorIds.push(new QueryListIsFollowedItem(item.creatorId)) 119 status.creatorIds.push(new QueryListIsFollowedItem(item.creatorId))
118 - data.push(new FollowListDetailItem(item.headPhotoUrl,item.cnUserName,item.cnFansNum,item.introduction,item.creatorId,"0")) 120 + data.push(new FollowListDetailItem(item.headPhotoUrl,item.cnUserName,item.cnFansNum,item.introduction,item.creatorId,"0",item.attentionUserId,item.cnUserType,item.cnUserId))
119 }) 121 })
120 122
121 MinePageDatasModel.getFollowListStatusData(status,getContext(this)).then((newValue)=>{ 123 MinePageDatasModel.getFollowListStatusData(status,getContext(this)).then((newValue)=>{
@@ -128,7 +130,7 @@ export struct FollowListDetailUI{ @@ -128,7 +130,7 @@ export struct FollowListDetailUI{
128 }) 130 })
129 131
130 data.forEach((item)=>{ 132 data.forEach((item)=>{
131 - this.data.push(new FollowListDetailItem(item.headPhotoUrl,item.cnUserName,item.cnFansNum,item.introduction,item.creatorId,item.status)) 133 + this.data.push(new FollowListDetailItem(item.headPhotoUrl,item.cnUserName,item.cnFansNum,item.introduction,item.creatorId,item.status,item.attentionUserId,item.cnUserType,item.cnUserId))
132 }) 134 })
133 135
134 this.data.notifyDataReload() 136 this.data.notifyDataReload()
@@ -198,7 +200,8 @@ struct ChildComponent { @@ -198,7 +200,8 @@ struct ChildComponent {
198 .height('46lpx') 200 .height('46lpx')
199 .margin({left:'4lpx',top:'23lpx'}) 201 .margin({left:'4lpx',top:'23lpx'})
200 .onClick(()=>{ 202 .onClick(()=>{
201 - this.data.status = "0" 203 + this.followOperation()
  204 + // this.data.status = "0"
202 }) 205 })
203 }else{ 206 }else{
204 Row(){ 207 Row(){
@@ -219,7 +222,8 @@ struct ChildComponent { @@ -219,7 +222,8 @@ struct ChildComponent {
219 .height('46lpx') 222 .height('46lpx')
220 .margin({left:'4lpx',top:'23lpx'}) 223 .margin({left:'4lpx',top:'23lpx'})
221 .onClick(()=>{ 224 .onClick(()=>{
222 - this.data.status = "1" 225 + this.followOperation()
  226 + // this.data.status = "1"
223 }) 227 })
224 } 228 }
225 }.alignItems(VerticalAlign.Top) 229 }.alignItems(VerticalAlign.Top)
@@ -233,5 +237,19 @@ struct ChildComponent { @@ -233,5 +237,19 @@ struct ChildComponent {
233 237
234 }.height('146lpx') 238 }.height('146lpx')
235 .justifyContent(FlexAlign.Center) 239 .justifyContent(FlexAlign.Center)
  240 + .onClick(()=>{
  241 + //跳转 人民号的 主页
  242 + // RouteManager.jumpNewPage("pages/OtherNormalUserHomePage",new RouterObject(this.data.attentionUserId,0))
  243 + })
  244 + }
  245 + followOperation(){
  246 + let item = new FollowOperationRequestItem(this.data.cnUserType,this.data.cnUserId,this.data.creatorId,HttpUrlUtils.getYcgUserType(),HttpUrlUtils.getYcgUserId(),this.data.status==="0" ? 1:0)
  247 + MinePageDatasModel.getFollowOperation(item,getContext(this)).then((value)=>{
  248 + if(value!=null){
  249 + if (value.code === 0 || value.code.toString() === "0") {
  250 + this.data.status = this.data.status ==="0"?"1":"0"
  251 + }
  252 + }
  253 + })
236 } 254 }
237 } 255 }
1 import { LazyDataSource, StringUtils } from 'wdKit'; 1 import { LazyDataSource, StringUtils } from 'wdKit';
2 import MinePageDatasModel from '../../../../model/MinePageDatasModel'; 2 import MinePageDatasModel from '../../../../model/MinePageDatasModel';
3 -import { Params } from '../../../../repository/bean/Params'; 3 +import { HttpUrlUtils } from '../../../../network/HttpUrlUtils';
4 import RouteManager from '../../../../utils/RouteManager'; 4 import RouteManager from '../../../../utils/RouteManager';
5 import { CommentListItem } from '../../../../viewmodel/CommentListItem'; 5 import { CommentListItem } from '../../../../viewmodel/CommentListItem';
6 import { FollowListDetailItem } from '../../../../viewmodel/FollowListDetailItem'; 6 import { FollowListDetailItem } from '../../../../viewmodel/FollowListDetailItem';
7 import { FollowListDetailRequestItem } from '../../../../viewmodel/FollowListDetailRequestItem'; 7 import { FollowListDetailRequestItem } from '../../../../viewmodel/FollowListDetailRequestItem';
  8 +import { FollowOperationRequestItem } from '../../../../viewmodel/FollowOperationRequestItem';
  9 +import { RouterObject } from '../../../../viewmodel/RouterObject';
8 import { ListHasNoMoreDataUI } from '../../../reusable/ListHasNoMoreDataUI'; 10 import { ListHasNoMoreDataUI } from '../../../reusable/ListHasNoMoreDataUI';
9 11
10 const TAG = "HomePageBottomComponent" 12 const TAG = "HomePageBottomComponent"
@@ -17,6 +19,7 @@ export struct HomePageBottomComponent{ @@ -17,6 +19,7 @@ export struct HomePageBottomComponent{
17 @State hasMore:boolean = true 19 @State hasMore:boolean = true
18 curPageNum:number = 1; 20 curPageNum:number = 1;
19 @State count:number = 0; 21 @State count:number = 0;
  22 + @Prop levelHead:string
20 23
21 aboutToAppear(){ 24 aboutToAppear(){
22 this.getNewPageData() 25 this.getNewPageData()
@@ -56,10 +59,7 @@ export struct HomePageBottomComponent{ @@ -56,10 +59,7 @@ export struct HomePageBottomComponent{
56 .backgroundColor($r('app.color.color_F5F5F5')) 59 .backgroundColor($r('app.color.color_F5F5F5'))
57 .margin({top:'31lpx',bottom:'4lpx'}) 60 .margin({top:'31lpx',bottom:'4lpx'})
58 }.onClick(()=>{ 61 }.onClick(()=>{
59 - let params: Params = {  
60 - pageID: "1"  
61 - }  
62 - RouteManager.jumpNewPage("pages/FollowListPage",params) 62 + RouteManager.jumpNewPage("pages/FollowListPage",new RouterObject('',1))
63 }) 63 })
64 64
65 LazyForEach(this.data_follow, (item: FollowListDetailItem, index: number = 0) => { 65 LazyForEach(this.data_follow, (item: FollowListDetailItem, index: number = 0) => {
@@ -97,7 +97,7 @@ export struct HomePageBottomComponent{ @@ -97,7 +97,7 @@ export struct HomePageBottomComponent{
97 List({ space: 3 }) { 97 List({ space: 3 }) {
98 LazyForEach(this.data_comment, (item: CommentListItem, index: number = 0) => { 98 LazyForEach(this.data_comment, (item: CommentListItem, index: number = 0) => {
99 ListItem() { 99 ListItem() {
100 - ChildCommentComponent({data: item}) 100 + ChildCommentComponent({data: item,levelHead:this.levelHead})
101 } 101 }
102 .onClick(() => { 102 .onClick(() => {
103 }) 103 })
@@ -152,7 +152,7 @@ export struct HomePageBottomComponent{ @@ -152,7 +152,7 @@ export struct HomePageBottomComponent{
152 this.hasMore = false 152 this.hasMore = false
153 }else{ 153 }else{
154 value.list.forEach((value)=>{ 154 value.list.forEach((value)=>{
155 - this.data_follow.push(new FollowListDetailItem(value.attentionHeadPhotoUrl,value.attentionUserName,value.fansNum,value.introduction,value.attentionCreatorId,"1")) 155 + this.data_follow.push(new FollowListDetailItem(value.attentionHeadPhotoUrl,value.attentionUserName,value.fansNum,value.introduction,value.attentionCreatorId,"1",value.attentionUserId,value.attentionUserType,value.attentionUserId))
156 }) 156 })
157 this.data_follow.notifyDataReload() 157 this.data_follow.notifyDataReload()
158 this.count = this.data_follow.totalCount() 158 this.count = this.data_follow.totalCount()
@@ -177,7 +177,7 @@ export struct HomePageBottomComponent{ @@ -177,7 +177,7 @@ export struct HomePageBottomComponent{
177 this.hasMore = false 177 this.hasMore = false
178 }else{ 178 }else{
179 value.list.forEach((value)=>{ 179 value.list.forEach((value)=>{
180 - this.data_comment.push(new CommentListItem(value.fromUserHeader,value.fromUserName,value.targetTitle,value.createTime,value.commentContent)) 180 + this.data_comment.push(new CommentListItem(value.fromUserHeader,value.fromUserName,value.targetTitle,value.createTime,value.commentContent,value.likeNum,0,value.id,value.targetId,value.targetType))
181 }) 181 })
182 this.data_comment.notifyDataReload() 182 this.data_comment.notifyDataReload()
183 this.count = this.data_comment.totalCount() 183 this.count = this.data_comment.totalCount()
@@ -246,7 +246,8 @@ struct ChildFollowComponent { @@ -246,7 +246,8 @@ struct ChildFollowComponent {
246 .height('46lpx') 246 .height('46lpx')
247 .margin({left:'4lpx',top:'23lpx'}) 247 .margin({left:'4lpx',top:'23lpx'})
248 .onClick(()=>{ 248 .onClick(()=>{
249 - this.data.status = "0" 249 + // this.data.status = "0"
  250 + this.followOperation()
250 }) 251 })
251 }else{ 252 }else{
252 Row(){ 253 Row(){
@@ -267,7 +268,8 @@ struct ChildFollowComponent { @@ -267,7 +268,8 @@ struct ChildFollowComponent {
267 .height('46lpx') 268 .height('46lpx')
268 .margin({left:'4lpx',top:'23lpx'}) 269 .margin({left:'4lpx',top:'23lpx'})
269 .onClick(()=>{ 270 .onClick(()=>{
270 - this.data.status = "1" 271 + // this.data.status = "1"
  272 + this.followOperation()
271 }) 273 })
272 } 274 }
273 }.alignItems(VerticalAlign.Top) 275 }.alignItems(VerticalAlign.Top)
@@ -282,20 +284,40 @@ struct ChildFollowComponent { @@ -282,20 +284,40 @@ struct ChildFollowComponent {
282 }.height('146lpx') 284 }.height('146lpx')
283 .justifyContent(FlexAlign.Center) 285 .justifyContent(FlexAlign.Center)
284 } 286 }
  287 +
  288 + followOperation(){
  289 + let item = new FollowOperationRequestItem(this.data.cnUserType,this.data.cnUserId,this.data.creatorId,HttpUrlUtils.getYcgUserType(),HttpUrlUtils.getYcgUserId(),this.data.status==="0" ? 1:0)
  290 + MinePageDatasModel.getFollowOperation(item,getContext(this)).then((value)=>{
  291 + if(value!=null){
  292 + if (value.code === 0 || value.code.toString() === "0") {
  293 + this.data.status = this.data.status ==="0"?"1":"0"
  294 + }
  295 + }
  296 + })
  297 + }
285 } 298 }
286 299
287 @Component 300 @Component
288 struct ChildCommentComponent { 301 struct ChildCommentComponent {
289 @ObjectLink data: CommentListItem 302 @ObjectLink data: CommentListItem
  303 + @Prop levelHead:string
290 304
291 build() { 305 build() {
292 Column(){ 306 Column(){
293 Row() { 307 Row() {
294 - Image(StringUtils.isEmpty(this.data.fromUserHeader)?$r('app.media.default_head'):this.data.fromUserHeader) 308 + Stack(){
  309 + Image(this.data.fromUserHeader)
  310 + .alt($r('app.media.default_head'))
295 .objectFit(ImageFit.Auto) 311 .objectFit(ImageFit.Auto)
296 .width('69lpx') 312 .width('69lpx')
297 .height('69lpx') 313 .height('69lpx')
298 - .margin({right:'15lpx'}) 314 + .borderRadius(50)
  315 + Image(this.levelHead)
  316 + .width('89lpx')
  317 + .height('89lpx')
  318 + .objectFit(ImageFit.Cover)
  319 + .borderRadius(50)
  320 + }.margin({right:'15lpx'})
299 321
300 Column(){ 322 Column(){
301 Text(this.data.fromUserName) 323 Text(this.data.fromUserName)
@@ -359,4 +381,7 @@ struct ChildCommentComponent { @@ -359,4 +381,7 @@ struct ChildCommentComponent {
359 } 381 }
360 .justifyContent(FlexAlign.Center) 382 .justifyContent(FlexAlign.Center)
361 } 383 }
  384 +
  385 +
  386 +
362 } 387 }
1 import router from '@ohos.router'; 1 import router from '@ohos.router';
2 import { StringUtils } from 'wdKit/src/main/ets/utils/StringUtils'; 2 import { StringUtils } from 'wdKit/src/main/ets/utils/StringUtils';
3 -import MinePageDatasModel from '../../../model/MinePageDatasModel';  
4 -import { HomePageBottomComponent } from './home/HomePageBottomComponent'; 3 +import MinePageDatasModel from '../../../../model/MinePageDatasModel';
  4 +import RouteManager from '../../../../utils/RouteManager';
  5 +import { Params } from '../../../../repository/bean/Params';
  6 +import { HomePageBottomComponent } from './HomePageBottomComponent';
  7 +import { RouterObject } from '../../../../viewmodel/RouterObject';
5 8
6 const TAG = "MyHomeComponent" 9 const TAG = "MyHomeComponent"
7 10
@@ -61,7 +64,9 @@ export struct MyHomeComponent { @@ -61,7 +64,9 @@ export struct MyHomeComponent {
61 .height('130lpx') 64 .height('130lpx')
62 .objectFit(ImageFit.Cover) 65 .objectFit(ImageFit.Cover)
63 .borderRadius(50) 66 .borderRadius(50)
64 - } 67 + }.onClick(()=>{
  68 + RouteManager.jumpNewPage("pages/OtherNormalUserHomePage",new RouterObject('512157124138245',0))
  69 + })
65 Column() { 70 Column() {
66 Row() { 71 Row() {
67 Text(`${this.userName}`) 72 Text(`${this.userName}`)
@@ -175,10 +180,10 @@ export struct MyHomeComponent { @@ -175,10 +180,10 @@ export struct MyHomeComponent {
175 //tab 页面 180 //tab 页面
176 Tabs({controller: this.controller}) { 181 Tabs({controller: this.controller}) {
177 TabContent() { 182 TabContent() {
178 - HomePageBottomComponent({style:0}) 183 + HomePageBottomComponent({style:0,levelHead:this.levelHead})
179 }.tabBar(this.TabBuilder(0,"评论")) 184 }.tabBar(this.TabBuilder(0,"评论"))
180 TabContent() { 185 TabContent() {
181 - HomePageBottomComponent({style:1}) 186 + HomePageBottomComponent({style:1,levelHead:this.levelHead})
182 }.tabBar(this.TabBuilder(1,"关注")) 187 }.tabBar(this.TabBuilder(1,"关注"))
183 } 188 }
184 .backgroundColor($r('app.color.white')) 189 .backgroundColor($r('app.color.white'))
@@ -256,7 +261,9 @@ export struct MyHomeComponent { @@ -256,7 +261,9 @@ export struct MyHomeComponent {
256 .onClick(() => { 261 .onClick(() => {
257 router.back() 262 router.back()
258 }) 263 })
259 - Image($r('app.media.default_head')) 264 + Image(this.headPhotoUrl)
  265 + .borderRadius(50)
  266 + .alt($r('app.media.default_head'))
260 .width('60lpx') 267 .width('60lpx')
261 .height('60lpx') 268 .height('60lpx')
262 .objectFit(ImageFit.Auto) 269 .objectFit(ImageFit.Auto)
@@ -270,7 +277,7 @@ export struct MyHomeComponent { @@ -270,7 +277,7 @@ export struct MyHomeComponent {
270 router.back() 277 router.back()
271 }) 278 })
272 279
273 - Text("我的昵称") 280 + Text(this.userName)
274 .height('42lpx') 281 .height('42lpx')
275 .maxLines(1) 282 .maxLines(1)
276 .id("title") 283 .id("title")
  1 +import { DateTimeUtils, LazyDataSource, StringUtils } from 'wdKit';
  2 +import { CommentListItem } from '../../../../viewmodel/CommentListItem';
  3 +import { ListHasNoMoreDataUI } from '../../../reusable/ListHasNoMoreDataUI';
  4 +import { OtherUserCommentListRequestItem } from '../../../../viewmodel/OtherUserCommentListRequestItem';
  5 +import MinePageDatasModel from '../../../../model/MinePageDatasModel';
  6 +import { MineCommentListDetailItem } from '../../../../viewmodel/MineCommentListDetailItem';
  7 +import { OtherUserCommentLikeStatusRequestItem } from '../../../../viewmodel/OtherUserCommentLikeStatusRequestItem';
  8 +import { CommentLikeOperationRequestItem } from '../../../../viewmodel/CommentLikeOperationRequestItem';
  9 +
  10 +const TAG = "HomePageBottomComponent"
  11 +@Component
  12 +export struct OtherHomePageBottomCommentComponent{
  13 + @Prop curUserId: string
  14 + @State data_comment: LazyDataSource<CommentListItem> = new LazyDataSource();
  15 + @State isLoading:boolean = false
  16 + @State hasMore:boolean = true
  17 + curPageNum:number = 1;
  18 + @State count:number = 0;
  19 + @Prop levelHead:string
  20 +
  21 + aboutToAppear(){
  22 + this.getNewPageData()
  23 + }
  24 +
  25 + build(){
  26 + Column(){
  27 + Divider().width('100%')
  28 + .height('2lpx')
  29 + .strokeWidth('1lpx')
  30 + .backgroundColor($r('app.color.color_EDEDED'))
  31 +
  32 + if(this.count === 0){
  33 + ListHasNoMoreDataUI({style:2})
  34 + .height('100%')
  35 + }else{
  36 + List({ space: 3 }) {
  37 + LazyForEach(this.data_comment, (item: CommentListItem, index: number = 0) => {
  38 + ListItem() {
  39 + ChildCommentComponent({data: item,levelHead:this.levelHead})
  40 + }
  41 + .onClick(() => {
  42 + })
  43 + }, (item: CommentListItem, index: number) => index.toString())
  44 +
  45 + //没有更多数据 显示提示
  46 + if(!this.hasMore){
  47 + ListItem(){
  48 + ListHasNoMoreDataUI()
  49 + }
  50 + }
  51 + }.cachedCount(15)
  52 + .layoutWeight(1)
  53 + .scrollBar(BarState.Off)
  54 + .edgeEffect(EdgeEffect.None)
  55 + // .nestedScroll({
  56 + // scrollForward: NestedScrollMode.PARENT_FIRST,
  57 + // scrollBackward: NestedScrollMode.SELF_FIRST
  58 + // })
  59 + .onReachEnd(()=>{
  60 + console.log(TAG,"触底了");
  61 + if(!this.isLoading){
  62 + this.isLoading = true
  63 + //加载分页数据
  64 + this.getNewPageData()
  65 + }
  66 + })
  67 + }
  68 + }
  69 + .width('100%')
  70 + }
  71 +
  72 +
  73 + @Styles
  74 + listStyle() {
  75 + .backgroundColor(Color.White)
  76 + .height(72)
  77 + .width("100%")
  78 + .borderRadius(12)
  79 + }
  80 +
  81 + getNewPageData(){
  82 + this.isLoading = true
  83 + if(this.hasMore){
  84 + let time = encodeURI(DateTimeUtils.getCurDate(DateTimeUtils.PATTERN_DATE_TIME_HYPHEN))
  85 + let object = new OtherUserCommentListRequestItem("",20,this.curPageNum,time,"1",this.curUserId)
  86 +
  87 + MinePageDatasModel.getOtherCommentListData(object,getContext(this)).then((value)=>{
  88 + if (!this.data_comment || value.list.length == 0){
  89 + this.hasMore = false
  90 + }else{
  91 + this.getCommentListStatus(value)
  92 + }
  93 + }).catch((err:Error)=>{
  94 + console.log(TAG,"请求失败")
  95 + this.isLoading = false
  96 + })
  97 + }
  98 + }
  99 +
  100 + getCommentListStatus(value:MineCommentListDetailItem){
  101 +
  102 + let status = new OtherUserCommentLikeStatusRequestItem()
  103 + let data : CommentListItem[] = []
  104 + value.list.forEach((item)=>{
  105 + status.commentIdList.push(item.id)
  106 + data.push(new CommentListItem(item.fromUserHeader,item.fromUserName,item.targetTitle,item.createTime,item.commentContent,item.likeNum,0,item.id,item.targetId,item.targetType))
  107 + })
  108 +
  109 + MinePageDatasModel.getOtherUserCommentLikeStatusData(status,getContext(this)).then((newValue)=>{
  110 + newValue.forEach((item)=>{
  111 + data.forEach((list)=>{
  112 + if (item.commentId == list.id) {
  113 + list.like_status = item.status
  114 + }
  115 + })
  116 + })
  117 +
  118 + data.forEach((item)=>{
  119 + this.data_comment.push(new CommentListItem(item.fromUserHeader,item.fromUserName,item.targetTitle,item.createTime,item.commentContent,item.likeNum,item.like_status,item.id,item.targetId,item.targetType))
  120 + })
  121 +
  122 + this.data_comment.notifyDataReload()
  123 +
  124 + this.count = this.data_comment.totalCount()
  125 + if (this.data_comment.totalCount() < value.totalCount) {
  126 + this.curPageNum++
  127 + }else {
  128 + this.hasMore = false
  129 + }
  130 +
  131 + this.isLoading = false
  132 + }).catch((err:Error)=>{
  133 + console.log(TAG,"请求失败")
  134 + this.isLoading = false
  135 + })
  136 + }
  137 +
  138 +}
  139 +
  140 +@Component
  141 +struct ChildCommentComponent {
  142 + @ObjectLink data: CommentListItem
  143 + @Prop levelHead:string
  144 +
  145 + build() {
  146 + Column(){
  147 + Row() {
  148 + Stack(){
  149 + Image(this.data.fromUserHeader)
  150 + .alt($r('app.media.default_head'))
  151 + .objectFit(ImageFit.Auto)
  152 + .width('69lpx')
  153 + .height('69lpx')
  154 +
  155 + .borderRadius(50)
  156 + Image(this.levelHead)
  157 + .width('89lpx')
  158 + .height('89lpx')
  159 + .objectFit(ImageFit.Cover)
  160 + .borderRadius(50)
  161 + }.margin({right:'15lpx'})
  162 +
  163 + Column(){
  164 + Text(this.data.fromUserName)
  165 + .fontSize('25lpx')
  166 + .lineHeight('35lpx')
  167 + .fontWeight('600lpx')
  168 + .fontColor($r('app.color.color_222222'))
  169 + .margin({bottom:'6lpx'})
  170 + .maxLines(1)
  171 + Text(`${this.data.createTime}`)
  172 + .fontColor($r('app.color.color_B0B0B0'))
  173 + .fontSize('23lpx')
  174 + .lineHeight('31lpx')
  175 + .fontWeight('400lpx')
  176 + .maxLines(1)
  177 + }.layoutWeight(1)
  178 + .alignItems(HorizontalAlign.Start)
  179 +
  180 + Row(){
  181 + Text(this.data.likeNum.toString())
  182 + .fontWeight("500lpx")
  183 + .fontSize("27lpx")
  184 + .lineHeight("31lpx")
  185 + .fontColor(this.data.like_status===0?$r('app.color.color_666666'):$r('app.color.color_ED2800'))
  186 + .margin({right:'8lpx'})
  187 + Image(this.data.like_status===0?$r('app.media.like_default_status'):$r('app.media.liked_status'))
  188 + .width('31lpx')
  189 + .height('31lpx')
  190 + .objectFit(ImageFit.Auto)
  191 + .interpolation(ImageInterpolation.Medium)
  192 + .borderRadius(50)
  193 + }.onClick(()=>{
  194 + this.commentLikeOperation()
  195 + })
  196 +
  197 + }
  198 + .margin({bottom:'10lpx'})
  199 + .width('100%')
  200 + .height('108lpx')
  201 + .padding({left:'31lpx',right:'31lpx'})
  202 +
  203 + Row(){
  204 + Text(this.data.commentContent)
  205 + .maxLines(3)
  206 + .textOverflow({ overflow: TextOverflow.Ellipsis })
  207 + .fontWeight('400lpx')
  208 + .fontSize('31lpx')
  209 + .lineHeight('46lpx')
  210 + .fontColor($r('app.color.color_222222'))
  211 + .margin({bottom:'10lpx'})
  212 + }.padding({left:'31lpx',right:'31lpx'})
  213 + .width('100%')
  214 +
  215 + Row(){
  216 + Text(this.data.targetTitle)
  217 + .fontWeight('400lpx')
  218 + .fontColor($r('app.color.color_222222'))
  219 + .lineHeight('38lpx')
  220 + .fontSize('27lpx')
  221 + .textAlign(TextAlign.Center)
  222 + .margin({right:'4lpx'})
  223 + .maxLines(3)
  224 + .width('616lpx')
  225 + Image($r('app.media.arrow_icon_right'))
  226 + .objectFit(ImageFit.Auto)
  227 + .width('27lpx')
  228 + .height('27lpx')
  229 + }
  230 + .padding({top:'17lpx',bottom:'17lpx',left:'23lpx',right:'23lpx'})
  231 + .width('662lpx')
  232 + .backgroundColor($r('app.color.color_F5F5F5'))
  233 + .margin({top:'19lpx',bottom:'31lpx'})
  234 +
  235 + Divider().width('100%')
  236 + .height('12lpx')
  237 + .strokeWidth('12lpx')
  238 + .backgroundColor($r('app.color.color_F5F5F5'))
  239 +
  240 + }
  241 + .justifyContent(FlexAlign.Center)
  242 + }
  243 +
  244 + commentLikeOperation(){
  245 + let item = new CommentLikeOperationRequestItem(this.data.targetId,this.data.id+"",this.data.targetType+"",this.data.fromUserName,this.data.fromUserHeader,this.data.like_status===0?1:0)
  246 + MinePageDatasModel.getCommentLikeOperation(item,getContext(this)).then((value)=>{
  247 + if(value!=null){
  248 + if (value.code === 0 || value.code.toString() === "0") {
  249 + this.data.like_status = this.data.like_status===0?1:0
  250 + this.data.likeNum = this.data.like_status===0?this.data.likeNum-1:this.data.likeNum+1
  251 + }
  252 + }
  253 + })
  254 + }
  255 +}
  1 +import { LazyDataSource, StringUtils } from 'wdKit';
  2 +import { ListHasNoMoreDataUI } from '../../../reusable/ListHasNoMoreDataUI';
  3 +import { UserFollowListRequestItem } from '../../../../viewmodel/UserFollowListRequestItem';
  4 +import { FollowListDetailItem } from '../../../../viewmodel/FollowListDetailItem';
  5 +import { Params } from '../../../../repository/bean/Params';
  6 +import MinePageDatasModel from '../../../../model/MinePageDatasModel';
  7 +import RouteManager from '../../../../utils/RouteManager';
  8 +import { RouterObject } from '../../../../viewmodel/RouterObject';
  9 +
  10 +const TAG = "HomePageBottomComponent"
  11 +@Component
  12 +export struct OtherHomePageBottomFollowComponent{
  13 + @State data_follow: LazyDataSource<FollowListDetailItem> = new LazyDataSource();
  14 + @State isLoading:boolean = false
  15 + @State hasMore:boolean = true
  16 + curPageNum:number = 1;
  17 + @State count:number = 0;
  18 + @Prop curUserId: string
  19 +
  20 + aboutToAppear(){
  21 + this.getNewPageData()
  22 + }
  23 +
  24 + build(){
  25 + Column(){
  26 + Divider().width('100%')
  27 + .height('2lpx')
  28 + .strokeWidth('1lpx')
  29 + .backgroundColor($r('app.color.color_EDEDED'))
  30 +
  31 + if(this.count === 0){
  32 + ListHasNoMoreDataUI({style:2})
  33 + .height('100%')
  34 + }else{
  35 + List({ space: 3 }) {
  36 +
  37 + ListItem() {
  38 + Row(){
  39 + Text("关注更多人民号")
  40 + .fontWeight('400lpx')
  41 + .fontColor($r('app.color.color_222222'))
  42 + .lineHeight('38lpx')
  43 + .fontSize('27lpx')
  44 + .textAlign(TextAlign.Center)
  45 + .margin({right:'4lpx'})
  46 + Image($r('app.media.arrow_icon_right'))
  47 + .objectFit(ImageFit.Auto)
  48 + .width('27lpx')
  49 + .height('27lpx')
  50 + }.height('69lpx')
  51 + .width('659lpx')
  52 + .alignItems(VerticalAlign.Center)
  53 + .justifyContent(FlexAlign.Center)
  54 + .backgroundColor($r('app.color.color_F5F5F5'))
  55 + .margin({top:'31lpx',bottom:'4lpx'})
  56 + }.onClick(()=>{
  57 + RouteManager.jumpNewPage("pages/FollowListPage",new RouterObject('',1))
  58 + })
  59 +
  60 + LazyForEach(this.data_follow, (item: FollowListDetailItem, index: number = 0) => {
  61 + ListItem() {
  62 + ChildFollowComponent({data: item})
  63 + }
  64 + .onClick(() => {
  65 + })
  66 + }, (item: FollowListDetailItem, index: number) => index.toString())
  67 +
  68 + //没有更多数据 显示提示
  69 + if(!this.hasMore){
  70 + ListItem(){
  71 + ListHasNoMoreDataUI()
  72 + }
  73 + }
  74 + }.cachedCount(15)
  75 + .padding({left:'31lpx',right:'31lpx'})
  76 + .layoutWeight(1)
  77 + .scrollBar(BarState.Off)
  78 + .edgeEffect(EdgeEffect.None)
  79 + // .nestedScroll({
  80 + // scrollForward: NestedScrollMode.PARENT_FIRST,
  81 + // scrollBackward: NestedScrollMode.SELF_FIRST
  82 + // })
  83 + .onReachEnd(()=>{
  84 + console.log(TAG,"触底了");
  85 + if(!this.isLoading){
  86 + this.isLoading = true
  87 + //加载分页数据
  88 + this.getNewPageData()
  89 + }
  90 + })
  91 + }
  92 + }
  93 + .width('100%')
  94 + }
  95 +
  96 +
  97 + @Styles
  98 + listStyle() {
  99 + .backgroundColor(Color.White)
  100 + .height(72)
  101 + .width("100%")
  102 + .borderRadius(12)
  103 + }
  104 +
  105 + getNewPageData(){
  106 + this.isLoading = true
  107 + //我的关注列表
  108 + if(this.hasMore){
  109 + let object = new UserFollowListRequestItem(Number(this.curUserId),20,this.curPageNum,"1")
  110 +
  111 + MinePageDatasModel.getOtherUserFollowListData(object,getContext(this)).then((value)=>{
  112 + if (!this.data_follow || value.list.length == 0){
  113 + this.hasMore = false
  114 + }else{
  115 + value.list.forEach((value)=>{
  116 + this.data_follow.push(new FollowListDetailItem(value.attentionHeadPhotoUrl,value.attentionUserName,value.fansNum,value.introduction,value.attentionCreatorId,"1",value.attentionUserId,value.cnUserType,value.cnUserId))
  117 + })
  118 + this.data_follow.notifyDataReload()
  119 + this.count = this.data_follow.totalCount()
  120 + if (this.data_follow.totalCount() < value.totalCount) {
  121 + this.curPageNum++
  122 + }else {
  123 + this.hasMore = false
  124 + }
  125 + }
  126 + this.isLoading = false
  127 + }).catch((err:Error)=>{
  128 + console.log(TAG,"请求失败")
  129 + this.isLoading = false
  130 + })
  131 + }
  132 + }
  133 +}
  134 +
  135 +@Component
  136 +struct ChildFollowComponent {
  137 + @ObjectLink data: FollowListDetailItem
  138 +
  139 + build() {
  140 + Column(){
  141 + Blank().height('27lpx')
  142 +
  143 + Row() {
  144 + Image(StringUtils.isEmpty(this.data.headPhotoUrl)?$r('app.media.default_head'):this.data.headPhotoUrl)
  145 + .objectFit(ImageFit.Auto)
  146 + .width('92lpx')
  147 + .height('92lpx')
  148 + .margin({right:'15lpx'})
  149 +
  150 + Column(){
  151 + Text(this.data.cnUserName)
  152 + .fontWeight('400lpx')
  153 + .fontSize('31lpx')
  154 + .lineHeight('38lpx')
  155 + .fontColor($r('app.color.color_222222'))
  156 + Text(`粉丝${this.data.cnFansNum}`)
  157 + .fontColor($r('app.color.color_B0B0B0'))
  158 + .fontSize('23lpx')
  159 + .maxLines(1)
  160 + Text(`${this.data.introduction}`)
  161 + .fontColor($r('app.color.color_B0B0B0'))
  162 + .fontSize('23lpx')
  163 + .maxLines(2)
  164 + .textOverflow({ overflow: TextOverflow.Ellipsis })
  165 + }.layoutWeight(1)
  166 + .alignItems(HorizontalAlign.Start)
  167 +
  168 + if(this.data.status == "1"){
  169 + Row(){
  170 + Text(`已关注`)
  171 + .fontColor($r('app.color.color_CCCCCC'))
  172 + .fontSize('23lpx')
  173 + .fontWeight('500lpx')
  174 + .lineHeight('35lpx')
  175 + }.backgroundColor($r('app.color.color_F5F5F5'))
  176 + .borderRadius('6lpx')
  177 + .borderColor($r('app.color.color_F5F5F5'))
  178 + .borderWidth('2lpx')
  179 + .justifyContent(FlexAlign.Center)
  180 + .width('100lpx')
  181 + .height('46lpx')
  182 + .margin({left:'4lpx',top:'23lpx'})
  183 + .onClick(()=>{
  184 + this.data.status = "0"
  185 + })
  186 + }else{
  187 + Row(){
  188 + Image($r('app.media.follow_icon'))
  189 + .margin({right:'4lpx'})
  190 + .width('23lpx')
  191 + .height('23lpx')
  192 + Text(`关注`)
  193 + .fontColor($r('app.color.color_ED2800'))
  194 + .fontSize('23lpx')
  195 + .fontWeight('500lpx')
  196 + .lineHeight('35lpx')
  197 + }.borderColor($r('app.color.color_1AED2800'))
  198 + .borderRadius('6lpx')
  199 + .borderWidth('2lpx')
  200 + .justifyContent(FlexAlign.Center)
  201 + .width('100lpx')
  202 + .height('46lpx')
  203 + .margin({left:'4lpx',top:'23lpx'})
  204 + .onClick(()=>{
  205 + this.data.status = "1"
  206 + })
  207 + }
  208 + }.alignItems(VerticalAlign.Top)
  209 + .width('100%')
  210 + .layoutWeight(1)
  211 +
  212 + Divider().width('100%')
  213 + .height('2lpx')
  214 + .strokeWidth('1lpx')
  215 + .backgroundColor($r('app.color.color_EDEDED'))
  216 +
  217 + }.height('146lpx')
  218 + .justifyContent(FlexAlign.Center)
  219 + }
  220 +}
  1 +import router from '@ohos.router';
  2 +import { StringUtils } from 'wdKit/src/main/ets/utils/StringUtils';
  3 +import MinePageDatasModel from '../../../../model/MinePageDatasModel';
  4 +import { OtherHomePageBottomFollowComponent } from './OtherHomePageBottomFollowComponent';
  5 +import { OtherHomePageBottomCommentComponent } from './OtherHomePageBottomCommentComponent';
  6 +import { OtherUserDetailRequestItem } from '../../../../viewmodel/OtherUserDetailRequestItem';
  7 +
  8 +const TAG = "OtherUserHomeComponent"
  9 +
  10 +@Component
  11 +export struct OtherUserHomeComponent {
  12 + @Prop curUserId: string
  13 +
  14 + @State tileOpacity: number = 0;
  15 + firstPositionY:number = 0;
  16 + fontColor: string = '#999999'
  17 + selectedFontColor: string = '#000000'
  18 + @State currentIndex: number = 0
  19 + private controller: TabsController = new TabsController()
  20 + isChangeToUserEdit = false;
  21 + @State userName:string = ""
  22 + @State headPhotoUrl:string = ""
  23 + @State levelHead:string = ""
  24 + @State levelId:number = 0
  25 + @State browseNum:number = 0//阅读数
  26 + @State commentNum:number = 0//评论数
  27 + @State attentionNum:number = 0//关注数
  28 + @State desc:string = ""
  29 +
  30 + aboutToAppear(){
  31 + this.getUserInfo()
  32 + this.getUserLevel()
  33 + }
  34 +
  35 + build() {
  36 + Stack({ alignContent: Alignment.Top }){
  37 + Image($r('app.media.title_bg'))
  38 + .width('100%')
  39 + .height('355lpx')
  40 + .objectFit(ImageFit.Cover)
  41 +
  42 + Column(){
  43 + Stack({ alignContent: Alignment.Top }){
  44 + this.MineHomeTitleTransparent()
  45 + this.MineHomeTitleWhite()
  46 + }
  47 +
  48 + Scroll() {
  49 + Column() {
  50 + //用户信息区域
  51 + Row() {
  52 + Stack(){
  53 + Image(this.headPhotoUrl)
  54 + .alt($r('app.media.default_head'))
  55 + .width('115lpx')
  56 + .height('115lpx')
  57 + .objectFit(ImageFit.Cover)
  58 + .borderRadius(50)
  59 + Image(this.levelHead)
  60 + .width('130lpx')
  61 + .height('130lpx')
  62 + .objectFit(ImageFit.Cover)
  63 + .borderRadius(50)
  64 + }
  65 +
  66 + Column() {
  67 + Row() {
  68 + Text(`${this.userName}`)
  69 + .fontColor($r('app.color.white'))
  70 + .maxLines(1)
  71 + .textOverflow({ overflow: TextOverflow.Ellipsis })
  72 + .fontSize('38lpx')
  73 + .lineHeight('50lpx')
  74 + .fontWeight('500lpx')
  75 +
  76 + Text(`等级${this.levelId}`)
  77 + .textAlign(TextAlign.Center)
  78 + .fontColor($r('app.color.color_ED2800'))
  79 + .backgroundColor($r('app.color.white'))
  80 + .fontSize('19lpx')
  81 + .width('96lpx')
  82 + .height('35lpx')
  83 + .margin({ left: '10lpx' })
  84 + Blank()
  85 + }.width('507lpx')
  86 +
  87 + Row() {
  88 + Row() {
  89 + Text(`${this.browseNum}`)
  90 + .textStyle()
  91 + Text("阅读")
  92 + .textStyle2()
  93 + }
  94 + .margin({ right: '15lpx' })
  95 +
  96 + Divider()
  97 + .height('19lpx')
  98 + .width('2lpx')
  99 + .color($r('app.color.white'))
  100 + .vertical(true)
  101 + .opacity(0.4)
  102 + Row() {
  103 + Text(`${this.commentNum}`)
  104 + .textStyle()
  105 + Text("评论")
  106 + .textStyle2()
  107 + }.margin({ right: '15lpx', left: '15lpx' })
  108 +
  109 + Divider()
  110 + .height('19lpx')
  111 + .width('2lpx')
  112 + .color($r('app.color.white'))
  113 + .vertical(true)
  114 + .opacity(0.4)
  115 + Row() {
  116 + Text(`${this.attentionNum}`)
  117 + .textStyle()
  118 + Text("关注")
  119 + .textStyle2()
  120 + }.margin({ left: '15lpx' })
  121 + }.margin({ top: '23lpx' })
  122 + }.alignItems(HorizontalAlign.Start)
  123 + .margin({ left: '32lpx' })
  124 + }
  125 + .onAreaChange((oldValue: Area, newValue: Area) => {
  126 + if (this.firstPositionY === 0) {
  127 + this.firstPositionY = newValue.globalPosition.y as number
  128 + }else{
  129 + let persent = (this.firstPositionY - Number(newValue.globalPosition.y)) / (this.firstPositionY * 0.3)
  130 + if(persent > 1){
  131 + persent = 1
  132 + }
  133 + this.tileOpacity = persent
  134 + }
  135 + })
  136 + .backgroundColor($r('app.color.color_transparent'))
  137 + .height('184lpx')
  138 + .width('100%')
  139 + .padding({ left: '35lpx' })
  140 +
  141 + //用户简介区域
  142 + if(StringUtils.isNotEmpty(this.desc)){
  143 + Column() {
  144 + Row() {
  145 + Text(this.desc)
  146 + .fontSize('27lpx')
  147 + .maxLines(3)
  148 + .textOverflow({ overflow: TextOverflow.Ellipsis })
  149 + .lineHeight('40lpx')
  150 + .fontWeight('400lpx')
  151 + .fontColor($r('app.color.color_222222'))
  152 + .textAlign(TextAlign.Start)
  153 +
  154 + }
  155 + }.padding({ left: '31lpx',right:'31lpx',top:'19lpx',bottom:'31lpx'})
  156 + .alignItems(HorizontalAlign.Start)
  157 + .justifyContent(FlexAlign.Center)
  158 + .width('100%')
  159 + .backgroundColor($r('app.color.white'))
  160 + }
  161 +
  162 + //间隔符
  163 + Divider().width('100%').height('12lpx').color($r('app.color.color_F5F5F5')).strokeWidth('12lpx')
  164 +
  165 + //tab 页面
  166 + Tabs({controller: this.controller}) {
  167 + TabContent() {
  168 + OtherHomePageBottomCommentComponent({curUserId:this.curUserId,levelHead:this.levelHead})
  169 + }.tabBar(this.TabBuilder(0,"评论"))
  170 + TabContent() {
  171 + OtherHomePageBottomFollowComponent({curUserId:this.curUserId})
  172 + }.tabBar(this.TabBuilder(1,"关注"))
  173 + }
  174 + .backgroundColor($r('app.color.white'))
  175 + .animationDuration(0)
  176 + .onChange((index: number) => {
  177 + this.currentIndex = index
  178 + })
  179 + .vertical(false)
  180 + .height("100%")
  181 + }.width("100%")
  182 + }
  183 + .edgeEffect(EdgeEffect.None)
  184 + .scrollBar(BarState.Off)
  185 + .width('100%')
  186 + .height('100%')
  187 + }
  188 + }.width('100%')
  189 + .height('100%')
  190 +
  191 + }
  192 + @Builder MineHomeTitleTransparent() {
  193 + RelativeContainer() {
  194 + //标题栏目
  195 + Image($r('app.media.icon_arrow_left_white') )
  196 + .width('46lpx')
  197 + .height('46lpx')
  198 + .objectFit(ImageFit.Auto)
  199 + .id("back_icon")
  200 + .alignRules({
  201 + center: { anchor: "__container__", align: VerticalAlign.Center },
  202 + left: { anchor: "__container__", align: HorizontalAlign.Start }
  203 + })
  204 + .margin({ left: '31lpx' })
  205 + .onClick(() => {
  206 + router.back()
  207 + })
  208 + }
  209 + .visibility(this.tileOpacity > 0 ? 1 : 0)
  210 + .height('84lpx')
  211 + .width('100%')
  212 + .backgroundColor($r('app.color.color_transparent'))
  213 + }
  214 +
  215 + @Builder MineHomeTitleWhite() {
  216 + RelativeContainer() {
  217 + //标题栏目
  218 + Image($r('app.media.back_icon'))
  219 + .width('46lpx')
  220 + .height('46lpx')
  221 + .objectFit(ImageFit.Auto)
  222 + .id("back_icon")
  223 + .alignRules({
  224 + center: { anchor: "__container__", align: VerticalAlign.Center },
  225 + left: { anchor: "__container__", align: HorizontalAlign.Start }
  226 + })
  227 + .margin({ left: '31lpx' })
  228 + .onClick(() => {
  229 + router.back()
  230 + })
  231 + Image(this.headPhotoUrl)
  232 + .alt($r('app.media.default_head'))
  233 + .width('60lpx')
  234 + .height('60lpx')
  235 + .borderRadius(50)
  236 + .objectFit(ImageFit.Auto)
  237 + .id("head_icon")
  238 + .alignRules({
  239 + center: { anchor: "__container__", align: VerticalAlign.Center },
  240 + left: { anchor: "back_icon", align: HorizontalAlign.End }
  241 + })
  242 + .margin({ left: '31lpx' })
  243 + .onClick(() => {
  244 + router.back()
  245 + })
  246 +
  247 + Text(`${this.userName}`)
  248 + .height('42lpx')
  249 + .maxLines(1)
  250 + .id("title")
  251 + .fontSize('35lpx')
  252 + .fontWeight('400lpx')
  253 + .fontColor($r('app.color.color_222222'))
  254 + .lineHeight('42lpx')
  255 + .alignRules({
  256 + center: { anchor: "__container__", align: VerticalAlign.Center },
  257 + left: { anchor: "head_icon", align: HorizontalAlign.End }
  258 + })
  259 + .margin({ left: '12lpx' })
  260 + }
  261 + .visibility(this.tileOpacity > 0 ? 0 : 1)
  262 + .height('84lpx')
  263 + .width('100%')
  264 + .backgroundColor($r('app.color.white'))
  265 + .opacity(this.tileOpacity )
  266 +
  267 + }
  268 +
  269 + @Builder TabBuilder(index: number, title: string) {
  270 + Stack(){
  271 + Text(title)
  272 + .height('38lpx')
  273 + .fontSize('33lpx')
  274 + .fontWeight(this.currentIndex === index ? 600 : 400)
  275 + .fontColor(this.currentIndex === index ? this.selectedFontColor : this.fontColor)
  276 + .lineHeight('38lpx')
  277 +
  278 + if(this.currentIndex === index){
  279 + Divider()
  280 + .width('31lpx')
  281 + .height('4lpx')
  282 + .color('#ED2800')
  283 + .strokeWidth('4lpx')
  284 + .margin({top:'50lpx'})
  285 + .id("divTag")
  286 + }
  287 + }.onClick(()=>{
  288 + this.currentIndex = index
  289 + this.controller.changeIndex(this.currentIndex)
  290 + })
  291 + .height('100%')
  292 + .width('100%')
  293 + .margin({right:'9lpx'})
  294 + }
  295 +
  296 +
  297 + getUserInfo(){
  298 + let item = new OtherUserDetailRequestItem("","1",this.curUserId)
  299 + MinePageDatasModel.getOtherUserDetailData(item,getContext(this)).then((value)=>{
  300 + if(value!=null){
  301 + this.userName = value.userName
  302 + this.headPhotoUrl = value.headPhotoUrl
  303 + if(StringUtils.isNotEmpty(value.introduction)){
  304 + this.desc = value.introduction
  305 + }
  306 + this.browseNum = StringUtils.isEmpty(value.browseNum)?0:value.browseNum
  307 + this.commentNum = StringUtils.isEmpty(value.commentNum)?0:value.commentNum
  308 + this.attentionNum = StringUtils.isEmpty(value.attentionNum)?0:value.attentionNum
  309 + }
  310 + }).catch((err:Error)=>{
  311 + console.log(TAG,JSON.stringify(err))
  312 + })
  313 + }
  314 + getUserLevel(){
  315 + MinePageDatasModel.getOtherUserLevelData([this.curUserId],getContext(this)).then((value)=>{
  316 + if(value!=null){
  317 + this.levelHead = value[0].levelHead
  318 + this.levelId = value[0].level
  319 + }
  320 + }).catch((err:Error)=>{
  321 + console.log(TAG,JSON.stringify(err))
  322 + })
  323 + }
  324 +
  325 +}
  326 +
  327 +@Extend(Text) function textStyle() {
  328 + .fontColor($r('app.color.white'))
  329 + .textStyleDefault()
  330 + .margin({ right: '10lpx' })
  331 +}
  332 +
  333 +@Extend(Text) function textStyle2() {
  334 + .textStyleDefault()
  335 + .fontColor($r('app.color.color_B2FFFFFF'))
  336 +}
  337 +
  338 +@Extend(Text) function textStyleDefault() {
  339 + .textAlign(TextAlign.Start)
  340 + .fontSize('23lpx')
  341 + .fontWeight('400lpx')
  342 + .lineHeight('31lpx')
  343 +}
  1 +@CustomDialog
  2 +export struct MyCustomDialog {
  3 + @State title: string = "标题"
  4 + @State tipValue: string ="提示文字"
  5 +
  6 + @State leftText: string = "取消"
  7 + @State rightText: string = "确认"
  8 +
  9 + controller?: CustomDialogController
  10 + cancel: () => void = () => {
  11 + }
  12 + confirm: () => void = () => {
  13 + }
  14 +
  15 + build() {
  16 + Column() {
  17 + Text(this.title)
  18 + .fontSize("32lpx")
  19 + .margin({ top: "40lpx", bottom: "15lpx" })
  20 + .fontColor($r('app.color.color_333333'))
  21 + .fontSize('35lpx')
  22 + .fontWeight('600lpx')
  23 + Text(this.tipValue)
  24 + .margin({ bottom: "30lpx" })
  25 + .fontSize("27lpx")
  26 + .fontColor($r('app.color.color_B0B0B0'))
  27 +
  28 + Divider()
  29 + .width("100%")
  30 + .strokeWidth('1lpx')
  31 + .height('1lpx')
  32 + .color($r('app.color.color_EEEEEE'))
  33 +
  34 + Row(){
  35 + Text(this.leftText)
  36 + .fontSize('35lpx')
  37 + .fontWeight('400lpx')
  38 + .fontColor($r('app.color.color_333333'))
  39 + .onClick(() => {
  40 + this.controller.close()
  41 + this.cancel()
  42 + }).layoutWeight(1)
  43 + .textAlign(TextAlign.Center)
  44 + Divider()
  45 + .width("1lpx")
  46 + .strokeWidth('1lpx')
  47 + .vertical(true)
  48 + .height('92lpx')
  49 + .color($r('app.color.color_EEEEEE'))
  50 +
  51 + Text(this.rightText)
  52 + .fontSize('35lpx')
  53 + .textAlign(TextAlign.Center)
  54 + .fontWeight('400lpx')
  55 + .fontColor($r('app.color.color_648DF2'))
  56 + .onClick(() => {
  57 + if (this.controller != undefined) {
  58 + this.controller.close()
  59 + this.confirm()
  60 + }
  61 + }).layoutWeight(1)
  62 + }
  63 + .alignItems(VerticalAlign.Center)
  64 + .height('96lpx')
  65 + }.borderRadius(10)
  66 + }
  67 +}
@@ -117,14 +117,14 @@ export struct BannerComponent { @@ -117,14 +117,14 @@ export struct BannerComponent {
117 // 不滚动banner 117 // 不滚动banner
118 Stack() { 118 Stack() {
119 // 背景图 119 // 背景图
120 - Image(this.bannerContent.coverUrl.toString()) 120 + Image(this.bannerContent?.coverUrl.toString())
121 .objectFit(ImageFit.Fill) 121 .objectFit(ImageFit.Fill)
122 .borderRadius(5) 122 .borderRadius(5)
123 123
124 // 底部标题和时间 124 // 底部标题和时间
125 Row() { 125 Row() {
126 // 标题 126 // 标题
127 - Text(this.bannerContent.newsTitle.toString()) 127 + Text(this.bannerContent?.newsTitle.toString())
128 .fontSize(18) 128 .fontSize(18)
129 .fontColor(Color.White) 129 .fontColor(Color.White)
130 .fontWeight(600) 130 .fontWeight(600)
@@ -133,7 +133,7 @@ export struct BannerComponent { @@ -133,7 +133,7 @@ export struct BannerComponent {
133 .padding({ left: 10, right: 0 ,bottom: 5 }) 133 .padding({ left: 10, right: 0 ,bottom: 5 })
134 .width('80%') 134 .width('80%')
135 // 时间 135 // 时间
136 - if (this.bannerContent.lengthTime) { 136 + if (this.bannerContent?.lengthTime) {
137 Row() { 137 Row() {
138 Image($r('app.media.videoTypeIcon')) 138 Image($r('app.media.videoTypeIcon'))
139 .height(20) 139 .height(20)
@@ -6,7 +6,7 @@ import { HttpUrlUtils } from '../network/HttpUrlUtils'; @@ -6,7 +6,7 @@ import { HttpUrlUtils } from '../network/HttpUrlUtils';
6 import HashMap from '@ohos.util.HashMap'; 6 import HashMap from '@ohos.util.HashMap';
7 import { ResponseDTO, WDHttp } from 'wdNetwork'; 7 import { ResponseDTO, WDHttp } from 'wdNetwork';
8 import { MineAppointmentListItem } from '../viewmodel/MineAppointmentListItem'; 8 import { MineAppointmentListItem } from '../viewmodel/MineAppointmentListItem';
9 -import { Logger, ResourcesUtils } from 'wdKit'; 9 +import { Logger, ResourcesUtils, StringUtils } from 'wdKit';
10 import { MineFollowListDetailItem } from '../viewmodel/MineFollowListDetailItem'; 10 import { MineFollowListDetailItem } from '../viewmodel/MineFollowListDetailItem';
11 import { FollowListDetailRequestItem } from '../viewmodel/FollowListDetailRequestItem'; 11 import { FollowListDetailRequestItem } from '../viewmodel/FollowListDetailRequestItem';
12 import { FollowListItem } from '../viewmodel/FollowListItem'; 12 import { FollowListItem } from '../viewmodel/FollowListItem';
@@ -16,6 +16,14 @@ import { MineCommentListDetailItem } from '../viewmodel/MineCommentListDetailIte @@ -16,6 +16,14 @@ import { MineCommentListDetailItem } from '../viewmodel/MineCommentListDetailIte
16 import { FollowListStatusRequestItem } from '../viewmodel/FollowListStatusRequestItem'; 16 import { FollowListStatusRequestItem } from '../viewmodel/FollowListStatusRequestItem';
17 import { MineUserLevelItem } from '../viewmodel/MineUserLevelItem'; 17 import { MineUserLevelItem } from '../viewmodel/MineUserLevelItem';
18 import { MineUserDetailItem } from '../viewmodel/MineUserDetailItem'; 18 import { MineUserDetailItem } from '../viewmodel/MineUserDetailItem';
  19 +import { OtherUserCommentLikeStatusRequestItem } from '../viewmodel/OtherUserCommentLikeStatusRequestItem';
  20 +import { OtherUserCommentListRequestItem } from '../viewmodel/OtherUserCommentListRequestItem';
  21 +import { QueryCommentListIsLikedItem } from '../viewmodel/QueryCommentListIsLikedItem';
  22 +import { UserFollowListRequestItem } from '../viewmodel/UserFollowListRequestItem';
  23 +import { OtherUserDetailRequestItem } from '../viewmodel/OtherUserDetailRequestItem';
  24 +import { AppointmentOperationRequestItem } from '../viewmodel/AppointmentOperationRequestItem';
  25 +import { FollowOperationRequestItem } from '../viewmodel/FollowOperationRequestItem';
  26 +import { CommentLikeOperationRequestItem } from '../viewmodel/CommentLikeOperationRequestItem';
19 const TAG = "MinePageDatasModel" 27 const TAG = "MinePageDatasModel"
20 28
21 /** 29 /**
@@ -427,6 +435,329 @@ class MinePageDatasModel{ @@ -427,6 +435,329 @@ class MinePageDatasModel{
427 return compRes.data 435 return compRes.data
428 } 436 }
429 437
  438 + /**
  439 + * 个人中心 获取其他用户详细信息
  440 + */
  441 + getOtherUserDetailData(item:OtherUserDetailRequestItem,context: Context): Promise<MineUserDetailItem> {
  442 + return new Promise<MineUserDetailItem>((success, error) => {
  443 + Logger.info(TAG, `getAppointmentList start`);
  444 + this.fetchOtherUserDetailData(item).then((navResDTO: ResponseDTO<MineUserDetailItem>) => {
  445 + if (!navResDTO || navResDTO.code != 0) {
  446 + success(this.getOtherUserDetailDataLocal(context))
  447 + return
  448 + }
  449 + Logger.info(TAG, "getUserDetailData then,timeStamp:" + navResDTO.timestamp);
  450 + let navigationBean = navResDTO.data as MineUserDetailItem
  451 + success(navigationBean);
  452 + }).catch((err: Error) => {
  453 + Logger.error(TAG, `fetchMineUserDetailData catch, error.name : ${err.name}, error.message:${err.message}`);
  454 + success(this.getOtherUserDetailDataLocal(context))
  455 + })
  456 + })
  457 + }
  458 +
  459 + fetchOtherUserDetailData(item:OtherUserDetailRequestItem) {
  460 + let url = HttpUrlUtils.getOtherUserDetailDataUrl()
  461 + let headers: HashMap<string, string> = HttpUrlUtils.getYcgCommonHeaders();
  462 + return WDHttp.post<ResponseDTO<MineUserDetailItem>>(url, item,headers)
  463 + };
  464 +
  465 + async getOtherUserDetailDataLocal(context: Context): Promise<MineUserDetailItem> {
  466 + Logger.info(TAG, `getMineUserLevelDataLocal start`);
  467 + let compRes: ResponseDTO<MineUserDetailItem> | null = await ResourcesUtils.getResourcesJson<ResponseDTO<MineUserDetailItem>>('other_user512157124138245_detail.json',context );
  468 + if (!compRes || !compRes.data) {
  469 + Logger.info(TAG, `getMineUserDetailDataLocal compRes is empty`);
  470 + return new MineUserDetailItem()
  471 + }
  472 + Logger.info(TAG, `getMineUserDetailDataLocal getResourcesJsonSync compRes : ${JSON.stringify(compRes)}`);
  473 + return compRes.data
  474 + }
  475 +
  476 + /**
  477 + * 个人中心 获取其他用户等级
  478 + */
  479 + getOtherUserLevelData(item:string[],context: Context): Promise<MineUserLevelItem[]> {
  480 + return new Promise<MineUserLevelItem[]>((success, error) => {
  481 + Logger.info(TAG, `getAppointmentList start`);
  482 + this.fetchOtherUserLevelData(item).then((navResDTO: ResponseDTO<MineUserLevelItem[]>) => {
  483 + if (!navResDTO || navResDTO.code != 0) {
  484 + success(this.getOtherUserLevelDataLocal(context))
  485 + return
  486 + }
  487 + Logger.info(TAG, "getAppointmentList then,AppointmentResDTO.timeStamp:" + navResDTO.timestamp);
  488 + let navigationBean = navResDTO.data as MineUserLevelItem[]
  489 + if(navigationBean.length>0 && StringUtils.isNotEmpty(navigationBean[0].levelHead)){
  490 + success(navigationBean);
  491 + }else{
  492 + success(this.getOtherUserLevelDataLocal(context))
  493 + }
  494 + }).catch((err: Error) => {
  495 + Logger.error(TAG, `fetchMineUserLevelData catch, error.name : ${err.name}, error.message:${err.message}`);
  496 + success(this.getOtherUserLevelDataLocal(context))
  497 + })
  498 + })
  499 + }
  500 +
  501 + fetchOtherUserLevelData(item:string[]) {
  502 + let url = HttpUrlUtils.getOtherUserLevelDataUrl()
  503 + let headers: HashMap<string, string> = HttpUrlUtils.getYcgCommonHeaders();
  504 + return WDHttp.post<ResponseDTO<MineUserLevelItem[]>>(url,item, headers)
  505 + };
  506 +
  507 + async getOtherUserLevelDataLocal(context: Context): Promise<MineUserLevelItem[]> {
  508 + Logger.info(TAG, `getMineUserLevelDataLocal start`);
  509 + let compRes: ResponseDTO<MineUserLevelItem[]> | null = await ResourcesUtils.getResourcesJson<ResponseDTO<MineUserLevelItem[]>>('other_user512157124138245_level.json' ,context);
  510 + if (!compRes || !compRes.data) {
  511 + Logger.info(TAG, `getMineUserLevelDataLocal compRes is empty`);
  512 + return []
  513 + }
  514 + Logger.info(TAG, `getMineUserLevelDataLocal getResourcesJsonSync compRes : ${JSON.stringify(compRes)}`);
  515 + return compRes.data
  516 + }
  517 +
  518 + /**
  519 + * 其他用户的评论列表
  520 + * @param params
  521 + * @param context
  522 + * @returns
  523 + */
  524 + getOtherCommentListData(params:OtherUserCommentListRequestItem,context: Context): Promise<MineCommentListDetailItem> {
  525 + return new Promise<MineCommentListDetailItem>((success, error) => {
  526 + Logger.info(TAG, `getAppointmentList start`);
  527 + this.fetchOtherCommentListData(params).then((navResDTO: ResponseDTO<MineCommentListDetailItem>) => {
  528 + if (!navResDTO || navResDTO.code != 0) {
  529 + success(this.getOtherCommentListDataLocal(context))
  530 + return
  531 + }
  532 + Logger.info(TAG, "getAppointmentList then,AppointmentResDTO.timeStamp:" + navResDTO.timestamp);
  533 + let navigationBean = navResDTO.data as MineCommentListDetailItem
  534 + success(navigationBean);
  535 + }).catch((err: Error) => {
  536 + Logger.error(TAG, `fetchAppointmentListDataApi catch, error.name : ${err.name}, error.message:${err.message}`);
  537 + success(this.getOtherCommentListDataLocal(context))
  538 + })
  539 + })
  540 + }
  541 +
  542 + fetchOtherCommentListData(object:OtherUserCommentListRequestItem) {
  543 + let url = HttpUrlUtils.getOtherCommentListDataUrl()+`?pageSize=${object.pageSize}&pageNum=${object.pageNum}&creatorId=${object.creatorId}&time=${object.time}&userType=${object.userType}&userId=${object.userId}`
  544 + let headers: HashMap<string, string> = HttpUrlUtils.getYcgCommonHeaders();
  545 + return WDHttp.get<ResponseDTO<MineCommentListDetailItem>>(url, headers)
  546 + };
  547 +
  548 + async getOtherCommentListDataLocal(context: Context): Promise<MineCommentListDetailItem> {
  549 + Logger.info(TAG, `getMineFollowListDataLocal start`);
  550 + let compRes: ResponseDTO<MineCommentListDetailItem> | null = await ResourcesUtils.getResourcesJson<ResponseDTO<MineCommentListDetailItem>>('other_user512157124138245_comment_list_data.json' ,context);
  551 + if (!compRes || !compRes.data) {
  552 + Logger.info(TAG, `getMineFollowListDataLocal compRes is empty`);
  553 + return new MineCommentListDetailItem()
  554 + }
  555 + Logger.info(TAG, `getMineFollowListDataLocal getResourcesJsonSync compRes : ${JSON.stringify(compRes)}`);
  556 + return compRes.data
  557 + }
  558 +
  559 + /**
  560 + * 查询是否点赞了这条评论
  561 + * @param params
  562 + * @param context
  563 + * @returns
  564 + */
  565 + getOtherUserCommentLikeStatusData(params:OtherUserCommentLikeStatusRequestItem,context: Context): Promise<QueryCommentListIsLikedItem[]> {
  566 + return new Promise<QueryCommentListIsLikedItem[]>((success, error) => {
  567 + Logger.info(TAG, `getAppointmentList start`);
  568 + this.fetchOtherUserCommentLikeStatusData(params).then((navResDTO: ResponseDTO<QueryCommentListIsLikedItem[]>) => {
  569 + if (!navResDTO || navResDTO.code != 0) {
  570 + success(this.getOtherUserCommentLikeStatusDataLocal(context))
  571 + return
  572 + }
  573 + Logger.info(TAG, "getAppointmentList then,AppointmentResDTO.timeStamp:" + navResDTO.timestamp);
  574 + let navigationBean = navResDTO.data as QueryCommentListIsLikedItem[]
  575 + success(navigationBean);
  576 + }).catch((err: Error) => {
  577 + Logger.error(TAG, `fetchAppointmentListDataApi catch, error.name : ${err.name}, error.message:${err.message}`);
  578 + success(this.getOtherUserCommentLikeStatusDataLocal(context))
  579 + })
  580 + })
  581 + }
  582 +
  583 + fetchOtherUserCommentLikeStatusData(object:OtherUserCommentLikeStatusRequestItem) {
  584 + let url = HttpUrlUtils.getFollowListStatusDataUrl()
  585 + let headers: HashMap<string, string> = HttpUrlUtils.getYcgCommonHeaders();
  586 + return WDHttp.post<ResponseDTO<QueryCommentListIsLikedItem[]>>(url,object, headers)
  587 + };
  588 +
  589 + async getOtherUserCommentLikeStatusDataLocal(context: Context): Promise<QueryCommentListIsLikedItem[]> {
  590 + Logger.info(TAG, `getMineFollowListDataLocal start`);
  591 + let compRes: ResponseDTO<QueryCommentListIsLikedItem[]> | null = await ResourcesUtils.getResourcesJson<ResponseDTO<QueryCommentListIsLikedItem[]>>('other_user512157124138245_comment_list_liked_data.json',context );
  592 + if (!compRes || !compRes.data) {
  593 + Logger.info(TAG, `getMineFollowListDataLocal compRes is empty`);
  594 + return []
  595 + }
  596 + Logger.info(TAG, `getMineFollowListDataLocal getResourcesJsonSync compRes : ${JSON.stringify(compRes)}`);
  597 + return compRes.data
  598 + }
  599 +
  600 + /**
  601 + * 其他用户的关注列表
  602 + * @param params
  603 + * @param context
  604 + * @returns
  605 + */
  606 + getOtherUserFollowListData(params:UserFollowListRequestItem,context: Context): Promise<MineFollowListItem> {
  607 + return new Promise<MineFollowListItem>((success, error) => {
  608 + Logger.info(TAG, `getAppointmentList start`);
  609 + this.fetchOtherUserFollowListData(params).then((navResDTO: ResponseDTO<MineFollowListItem>) => {
  610 + if (!navResDTO || navResDTO.code != 0) {
  611 + success(this.getOtherUserFollowListDataLocal(context))
  612 + return
  613 + }
  614 + Logger.info(TAG, "getAppointmentList then,AppointmentResDTO.timeStamp:" + navResDTO.timestamp);
  615 + let navigationBean = navResDTO.data as MineFollowListItem
  616 + success(navigationBean);
  617 + }).catch((err: Error) => {
  618 + Logger.error(TAG, `fetchAppointmentListDataApi catch, error.name : ${err.name}, error.message:${err.message}`);
  619 + success(this.getOtherUserFollowListDataLocal(context))
  620 + })
  621 + })
  622 + }
  623 +
  624 + fetchOtherUserFollowListData(object:UserFollowListRequestItem) {
  625 + let url = HttpUrlUtils.getOtherUserFollowListDataUrl()+`?pageSize=${object.pageSize}&pageNum=${object.pageNum}&queryUserId=${object.queryUserId}&userType=${object.userType}&userId=${"567387477063621"}`
  626 + let headers: HashMap<string, string> = HttpUrlUtils.getYcgCommonHeaders();
  627 + return WDHttp.get<ResponseDTO<MineFollowListItem>>(url, headers)
  628 + };
  629 +
  630 + async getOtherUserFollowListDataLocal(context: Context): Promise<MineFollowListItem> {
  631 + Logger.info(TAG, `getMineFollowListDataLocal start`);
  632 + let compRes: ResponseDTO<MineFollowListItem> | null = await ResourcesUtils.getResourcesJson<ResponseDTO<MineFollowListItem>>('other_user_follow_list_data.json',context );
  633 + if (!compRes || !compRes.data) {
  634 + Logger.info(TAG, `getMineFollowListDataLocal compRes is empty`);
  635 + return new MineFollowListItem()
  636 + }
  637 + Logger.info(TAG, `getMineFollowListDataLocal getResourcesJsonSync compRes : ${JSON.stringify(compRes)}`);
  638 + return compRes.data
  639 + }
  640 +
  641 + /**
  642 + * 预约 和取消预约操作
  643 + * @param params
  644 + * @param context
  645 + * @returns
  646 + */
  647 + getAppointmentOperation(params:AppointmentOperationRequestItem,context: Context): Promise<ResponseDTO> {
  648 + return new Promise((success, error) => {
  649 + Logger.info(TAG, `getAppointmentList start`);
  650 + this.fetchAppointmentOperation(params).then((navResDTO: ResponseDTO) => {
  651 + if (!navResDTO || navResDTO.code != 0) {
  652 + success(this.getAppointmentOperationLocal(context))
  653 + return
  654 + }
  655 + Logger.info(TAG, "getAppointmentList then,AppointmentResDTO.timeStamp:" + navResDTO.timestamp);
  656 + success(navResDTO);
  657 + }).catch((err: Error) => {
  658 + Logger.error(TAG, `fetchAppointmentListDataApi catch, error.name : ${err.name}, error.message:${err.message}`);
  659 + success(this.getAppointmentOperationLocal(context))
  660 + })
  661 + })
  662 + }
  663 +
  664 + fetchAppointmentOperation(object:AppointmentOperationRequestItem) {
  665 + let url = HttpUrlUtils.getAppointmentOperationUrl()
  666 + let headers: HashMap<string, string> = HttpUrlUtils.getYcgCommonHeaders();
  667 + return WDHttp.post<ResponseDTO>(url,object, headers)
  668 + };
  669 +
  670 + async getAppointmentOperationLocal(context: Context): Promise<ResponseDTO> {
  671 + Logger.info(TAG, `getMineFollowListDataLocal start`);
  672 + let compRes: ResponseDTO | null = await ResourcesUtils.getResourcesJson<ResponseDTO>('appointment_operation_data.json',context );
  673 + if (!compRes ) {
  674 + Logger.info(TAG, `getMineFollowListDataLocal compRes is empty`);
  675 + return null
  676 + }
  677 + Logger.info(TAG, `getMineFollowListDataLocal getResourcesJsonSync compRes : ${JSON.stringify(compRes)}`);
  678 + return compRes
  679 + }
  680 +
  681 + /**
  682 + * 评论点赞操作
  683 + * @param params
  684 + * @param context
  685 + * @returns
  686 + */
  687 + getCommentLikeOperation(params:CommentLikeOperationRequestItem,context: Context): Promise<ResponseDTO> {
  688 + return new Promise((success, error) => {
  689 + Logger.info(TAG, `getAppointmentList start`);
  690 + this.fetchCommentLikeOperation(params).then((navResDTO: ResponseDTO) => {
  691 + if (!navResDTO || navResDTO.code != 0) {
  692 + success(this.getCommentLikeOperationLocal(context))
  693 + return
  694 + }
  695 + Logger.info(TAG, "getAppointmentList then,AppointmentResDTO.timeStamp:" + navResDTO.timestamp);
  696 + success(navResDTO);
  697 + }).catch((err: Error) => {
  698 + Logger.error(TAG, `fetchAppointmentListDataApi catch, error.name : ${err.name}, error.message:${err.message}`);
  699 + success(this.getCommentLikeOperationLocal(context))
  700 + })
  701 + })
  702 + }
  703 +
  704 + fetchCommentLikeOperation(object:CommentLikeOperationRequestItem) {
  705 + let url = HttpUrlUtils.getCommentLikeOperationUrl()
  706 + let headers: HashMap<string, string> = HttpUrlUtils.getYcgCommonHeaders();
  707 + return WDHttp.post<ResponseDTO>(url,object, headers)
  708 + };
  709 +
  710 + async getCommentLikeOperationLocal(context: Context): Promise<ResponseDTO> {
  711 + Logger.info(TAG, `getMineFollowListDataLocal start`);
  712 + let compRes: ResponseDTO | null = await ResourcesUtils.getResourcesJson<ResponseDTO>('comment_like_operation_data.json',context);
  713 + if (!compRes ) {
  714 + Logger.info(TAG, `getMineFollowListDataLocal compRes is empty`);
  715 + return compRes
  716 + }
  717 + Logger.info(TAG, `getMineFollowListDataLocal getResourcesJsonSync compRes : ${JSON.stringify(compRes)}`);
  718 + return compRes
  719 + }
  720 +
  721 + /**
  722 + * 关注 取消关注 操作
  723 + * @param params
  724 + * @param context
  725 + * @returns
  726 + */
  727 + getFollowOperation(params:FollowOperationRequestItem,context: Context): Promise<ResponseDTO> {
  728 + return new Promise((success, error) => {
  729 + Logger.info(TAG, `getAppointmentList start`);
  730 + this.fetchFollowOperation(params).then((navResDTO: ResponseDTO) => {
  731 + if (!navResDTO || navResDTO.code != 0) {
  732 + success(this.getFollowOperationLocal(context))
  733 + return
  734 + }
  735 + Logger.info(TAG, "getAppointmentList then,AppointmentResDTO.timeStamp:" + navResDTO.timestamp);
  736 + success(navResDTO);
  737 + }).catch((err: Error) => {
  738 + Logger.error(TAG, `fetchAppointmentListDataApi catch, error.name : ${err.name}, error.message:${err.message}`);
  739 + success(this.getFollowOperationLocal(context))
  740 + })
  741 + })
  742 + }
  743 +
  744 + fetchFollowOperation(object:FollowOperationRequestItem) {
  745 + let url = HttpUrlUtils.getFollowOperationUrl()
  746 + let headers: HashMap<string, string> = HttpUrlUtils.getYcgCommonHeaders();
  747 + return WDHttp.post<ResponseDTO>(url,object, headers)
  748 + };
  749 +
  750 + async getFollowOperationLocal(context: Context): Promise<ResponseDTO> {
  751 + Logger.info(TAG, `getMineFollowListDataLocal start`);
  752 + let compRes: ResponseDTO | null = await ResourcesUtils.getResourcesJson<ResponseDTO>('follow_operation_data.json',context);
  753 + if (!compRes ) {
  754 + Logger.info(TAG, `getMineFollowListDataLocal compRes is empty`);
  755 + return compRes
  756 + }
  757 + Logger.info(TAG, `getMineFollowListDataLocal getResourcesJsonSync compRes : ${JSON.stringify(compRes)}`);
  758 + return compRes
  759 + }
  760 +
430 } 761 }
431 762
432 const minePageDatasModel = MinePageDatasModel.getInstance() 763 const minePageDatasModel = MinePageDatasModel.getInstance()
@@ -76,10 +76,33 @@ export class HttpUrlUtils { @@ -76,10 +76,33 @@ export class HttpUrlUtils {
76 static readonly MINE_USER_LEVEL_DATA_PATH: string = "/api/rmrb-user-point/auth/level/zh/c/queryUserLevel"; 76 static readonly MINE_USER_LEVEL_DATA_PATH: string = "/api/rmrb-user-point/auth/level/zh/c/queryUserLevel";
77 77
78 /** 78 /**
  79 + * 个人中心 APP获取其他用户等级
  80 + */
  81 + static readonly OTHER_USER_LEVEL_DATA_PATH: string = "/api/rmrb-user-point/auth/level/zh/c/batchUser";
  82 +
  83 + /**
79 * 个人中心 (号主/普通用户)我的基本信息 84 * 个人中心 (号主/普通用户)我的基本信息
80 */ 85 */
81 static readonly MINE_USER_DETAIL_DATA_PATH: string = "/api/rmrb-contact/contact/zh/c/my/detail"; 86 static readonly MINE_USER_DETAIL_DATA_PATH: string = "/api/rmrb-contact/contact/zh/c/my/detail";
82 87
  88 + /**
  89 + * 个人中心 (普通用户)其他用户 的基本信息
  90 + */
  91 + static readonly OTHER_USER_DETAIL_DATA_PATH: string = "/api/rmrb-contact/contact/zh/c/master/detail";
  92 + /**
  93 + * 个人中心 其他用户的评论列表
  94 + */
  95 + static readonly OTHER_COMMENT_LIST_DATA_PATH: string = "/api/rmrb-comment/comment/zh/c/othersCommentList";
  96 + /**
  97 + * 个人中心 我的关注列表
  98 + */
  99 + static readonly OTHER_USER_FOLLOW_LIST_DATA_PATH: string = "/api/rmrb-interact/interact/zh/c/userAttention/list";
  100 +
  101 + /**
  102 + * 预约操作
  103 + */
  104 + static readonly APPOINTMENT_OPERATION_STATUS_PATH: string = "/api/live-center-message/zh/c/live/subscribe";
  105 +
83 private static hostUrl: string = HttpUrlUtils.HOST_UAT; 106 private static hostUrl: string = HttpUrlUtils.HOST_UAT;
84 107
85 static getCommonHeaders(): HashMap<string, string> { 108 static getCommonHeaders(): HashMap<string, string> {
@@ -200,6 +223,50 @@ export class HttpUrlUtils { @@ -200,6 +223,50 @@ export class HttpUrlUtils {
200 return url 223 return url
201 } 224 }
202 225
  226 + static getOtherUserLevelDataUrl() {
  227 + let url = HttpUrlUtils.HOST_SIT + HttpUrlUtils.OTHER_USER_LEVEL_DATA_PATH
  228 + return url
  229 + }
  230 +
  231 + static getOtherUserDetailDataUrl() {
  232 + let url = HttpUrlUtils.HOST_SIT + HttpUrlUtils.OTHER_USER_DETAIL_DATA_PATH
  233 + return url
  234 + }
  235 +
  236 + static getOtherCommentListDataUrl() {
  237 + let url = HttpUrlUtils.HOST_SIT + HttpUrlUtils.OTHER_COMMENT_LIST_DATA_PATH
  238 + return url
  239 + }
  240 +
  241 + static getOtherUserFollowListDataUrl() {
  242 + let url = HttpUrlUtils.HOST_SIT + HttpUrlUtils.OTHER_USER_FOLLOW_LIST_DATA_PATH
  243 + return url
  244 + }
  245 +
  246 + static getAppointmentOperationUrl() {
  247 + let url = HttpUrlUtils.HOST_SIT + HttpUrlUtils.APPOINTMENT_OPERATION_STATUS_PATH
  248 + return url
  249 + }
  250 +
  251 + static getCommentLikeOperationUrl() {
  252 + let url = HttpUrlUtils.HOST_SIT + HttpUrlUtils.COMMENT_LIKE_OPERATION_PATH
  253 + return url
  254 + }
  255 +
  256 + static getFollowOperationUrl() {
  257 + let url = HttpUrlUtils.HOST_SIT + HttpUrlUtils.FOLLOW_OPERATION_PATH
  258 + return url
  259 + }
  260 +
  261 +
  262 + /**
  263 + * 预约操作
  264 + */
  265 + static readonly COMMENT_LIKE_OPERATION_PATH: string = "/api/rmrb-comment/comment/zh/c/commentLike";
  266 + /**
  267 + * 关注操作
  268 + */
  269 + static readonly FOLLOW_OPERATION_PATH: string = "https://pd-apis-sit.pdnews.cn/api/rmrb-interact/interact/zh/c/attention/operation";
203 270
204 static getYcgCommonHeaders(): HashMap<string, string> { 271 static getYcgCommonHeaders(): HashMap<string, string> {
205 let headers: HashMap<string, string> = new HashMap<string, string>() 272 let headers: HashMap<string, string> = new HashMap<string, string>()
@@ -355,4 +422,12 @@ export class HttpUrlUtils { @@ -355,4 +422,12 @@ export class HttpUrlUtils {
355 private static getUserType() { 422 private static getUserType() {
356 return '2'; 423 return '2';
357 } 424 }
  425 +
  426 + public static getYcgUserType() {
  427 + return '1';
  428 + }
  429 +
  430 + public static getYcgUserId() {
  431 + return '459776297474949';
  432 + }
358 } 433 }
@@ -10,9 +10,7 @@ class RouteManager{ @@ -10,9 +10,7 @@ class RouteManager{
10 jumpNewPage(target_url: string,params?: Object){ 10 jumpNewPage(target_url: string,params?: Object){
11 router.pushUrl({ 11 router.pushUrl({
12 url: target_url, 12 url: target_url,
13 - params: {  
14 params 13 params
15 - }  
16 }).catch((error: Error) => { 14 }).catch((error: Error) => {
17 console.log(TAG,JSON.stringify(error)); 15 console.log(TAG,JSON.stringify(error));
18 }); 16 });
  1 +// {"relationId":"500000017021","liveId":"20000007348","isSubscribe":false}
  2 +export class AppointmentOperationRequestItem{
  3 + relationId:string = ""
  4 + liveId:string = ""
  5 + isSubscribe:boolean = false
  6 +
  7 + constructor(relationId: string ,liveId: string ,isSubscribe: boolean ) {
  8 + this.relationId = relationId
  9 + this.liveId = liveId
  10 + this.isSubscribe = isSubscribe
  11 + }
  12 +}
  1 +// {
  2 +// "targetId":"30000627490",
  3 +// "commentId":"303318",
  4 +// "targetType":"13",
  5 +// "userName":"人民日报网友aPrtq5",
  6 +// "userHeaderUrl":"https://sitcontentjdcdn.aikan.pdnews.cn//img/user/2024031215/48d5bd53227d436b9faa937b3ac14600.png",
  7 +// "status":1
  8 +// }
  9 +export class CommentLikeOperationRequestItem{
  10 + targetId:string = ""
  11 + commentId:string = ""
  12 + targetType:string = ""
  13 + userName:string = ""
  14 + userHeaderUrl:string = ""
  15 + status:number = 1
  16 +
  17 + constructor(targetId: string, commentId: string, targetType: string , userName: string,
  18 + userHeaderUrl: string , status:number) {
  19 + this.targetId = targetId
  20 + this.commentId = commentId
  21 + this.targetType = targetType
  22 + this.userName = userName
  23 + this.userHeaderUrl = userHeaderUrl
  24 + this.status = status
  25 +}
  26 +
  27 +}
@@ -7,12 +7,22 @@ export class CommentListItem{ @@ -7,12 +7,22 @@ export class CommentListItem{
7 commentContent:string = "" 7 commentContent:string = ""
8 targetTitle:string = "" 8 targetTitle:string = ""
9 createTime:string = "" 9 createTime:string = ""
  10 + likeNum:number = 0
  11 + like_status:number = 0
  12 + id:number = 0
  13 + targetId:string = ""
  14 + targetType:number = 0
10 15
11 - constructor(fromUserHeader:string,fromUserName:string,targetTitle:string,createTime:string,commentContent:string ) { 16 + constructor(fromUserHeader:string,fromUserName:string,targetTitle:string,createTime:string,commentContent:string,likeNum:number,like_status:number,id:number,targetId:string,targetType:number) {
12 this.fromUserHeader = fromUserHeader 17 this.fromUserHeader = fromUserHeader
13 this.fromUserName = fromUserName 18 this.fromUserName = fromUserName
14 this.commentContent = commentContent 19 this.commentContent = commentContent
15 this.targetTitle = targetTitle 20 this.targetTitle = targetTitle
16 this.createTime = createTime 21 this.createTime = createTime
  22 + this.likeNum = likeNum
  23 + this.like_status = like_status
  24 + this.id = id
  25 + this.targetId = targetId
  26 + this.targetType = targetType
17 } 27 }
18 } 28 }
@@ -67,19 +67,28 @@ export class FollowListDetailItem{ @@ -67,19 +67,28 @@ export class FollowListDetailItem{
67 introduction:string //介绍 67 introduction:string //介绍
68 status:string = "0" //是否已经关注 68 status:string = "0" //是否已经关注
69 creatorId:string = "" 69 creatorId:string = ""
  70 + attentionUserId:string = ""
  71 +
  72 + cnUserType:string = ""
  73 + cnUserId:string = ""
  74 +
70 75
71 attentionCreatorId:string = "" 76 attentionCreatorId:string = ""
  77 + attentionUserType:string = ""
72 attentionHeadPhotoUrl:string = "" 78 attentionHeadPhotoUrl:string = ""
73 attentionUserName:string = "" 79 attentionUserName:string = ""
74 fansNum :number = 0 80 fansNum :number = 0
75 81
76 82
77 - constructor(headPhotoUrl:string,cnUserName:string,cnFansNum:number,introduction:string,creatorId:string,status:string ) { 83 + constructor(headPhotoUrl:string,cnUserName:string,cnFansNum:number,introduction:string,creatorId:string,status:string,attentionUserId:string,cnUserType:string,cnUserId:string) {
78 this.headPhotoUrl = headPhotoUrl 84 this.headPhotoUrl = headPhotoUrl
79 this.cnUserName = cnUserName 85 this.cnUserName = cnUserName
80 this.cnFansNum = cnFansNum 86 this.cnFansNum = cnFansNum
81 this.introduction = introduction 87 this.introduction = introduction
82 this.creatorId = creatorId 88 this.creatorId = creatorId
83 this.status = status 89 this.status = status
  90 + this.attentionUserId = attentionUserId
  91 + this.cnUserType = cnUserType
  92 + this.cnUserId = cnUserId
84 } 93 }
85 } 94 }
  1 +// {
  2 +// "attentionUserType":"2",
  3 +// "attentionUserId":"444911718724933",
  4 +// "attentionCreatorId":"3004861",
  5 +// "userType":1,
  6 +// "userId":"567387477063621",
  7 +// "status":1
  8 +// }
  9 +export class FollowOperationRequestItem{
  10 + attentionUserType:string = ""
  11 + attentionUserId:string = ""
  12 + attentionCreatorId:string = ""
  13 + userType:string = ""
  14 + userId:string = ""
  15 + status:number = 1
  16 +
  17 + constructor(attentionUserType:string, attentionUserId:string, attentionCreatorId:string, userType:string, userId:string, status:number) {
  18 + this.attentionUserType = attentionUserType
  19 + this.attentionUserId = attentionUserId
  20 + this.attentionCreatorId = attentionCreatorId
  21 + this.userType = userType
  22 + this.userId = userId
  23 + this.status = status
  24 + }
  25 +
  26 +}
@@ -18,7 +18,7 @@ export class MineAppointmentItem{ @@ -18,7 +18,7 @@ export class MineAppointmentItem{
18 isAppointment:boolean 18 isAppointment:boolean
19 19
20 20
21 - constructor(imageUrl:string[],status:string,title:string,isAppointment:boolean,timePre:string,timeBack:string,relType:number ) { 21 + constructor(imageUrl:string[],status:string,title:string,isAppointment:boolean,timePre:string,timeBack:string,relType:number,liveId:number,relId:string ) {
22 this.imageUrl=imageUrl 22 this.imageUrl=imageUrl
23 this.status=status 23 this.status=status
24 this.title=title 24 this.title=title
@@ -26,5 +26,7 @@ export class MineAppointmentItem{ @@ -26,5 +26,7 @@ export class MineAppointmentItem{
26 this.timePre = timePre 26 this.timePre = timePre
27 this.timeBack = timeBack 27 this.timeBack = timeBack
28 this.relType = relType 28 this.relType = relType
  29 + this.liveId = liveId
  30 + this.relId = relId
29 } 31 }
30 } 32 }
@@ -2,6 +2,7 @@ @@ -2,6 +2,7 @@
2 export class MineUserLevelItem{ 2 export class MineUserLevelItem{
3 levelHead:string = "" 3 levelHead:string = ""
4 levelId:number = 0 4 levelId:number = 0
  5 + level:number = 0
5 levelName:string = "" 6 levelName:string = ""
6 7
7 } 8 }
  1 +export class OtherUserCommentLikeStatusRequestItem{
  2 + commentIdList:number[] = []
  3 +}
  1 +export class OtherUserCommentListRequestItem {
  2 + creatorId: string = ""
  3 + pageSize: number = 20
  4 + pageNum: number = 1
  5 + time: string = ""
  6 + userType: string = "1"
  7 + userId: string = ""
  8 +
  9 + constructor(creatorId: string, pageSize: number,
  10 + pageNum: number,
  11 + time: string,
  12 + userType: string,
  13 + userId: string) {
  14 + this.creatorId = creatorId
  15 + this.pageSize = pageSize
  16 + this.pageNum = pageNum
  17 + this.time = time
  18 + this.userType = userType
  19 + this.userId = userId
  20 + }
  21 +}
  1 +export class OtherUserDetailRequestItem {
  2 + creatorId: string = ""
  3 + userType: string = "1"
  4 + userId: string = "-1"
  5 +
  6 + constructor(creatorId: string ,
  7 + userType: string,
  8 + userId: string ) {
  9 + this.creatorId = creatorId
  10 + this.userType = userType
  11 + this.userId = userId
  12 + }
  13 +
  14 +}
  1 +
  2 +
  3 +export class QueryCommentListIsLikedItem{
  4 + commentId:number = 0
  5 + status:number = 0
  6 +
  7 +}
  1 +export class RouterObject{
  2 + userId:string = ""
  3 + index:number = 0;
  4 +
  5 + constructor(userId:string,index:number) {
  6 + this.userId = userId
  7 + this.index = index
  8 + }
  9 +}
  1 +export class UserFollowListRequestItem{
  2 + queryUserId:number = -1
  3 + pageSize:number = 20
  4 + pageNum:number = 1
  5 + userType:string = "1"
  6 +
  7 + constructor(queryUserId:number, pageSize:number, pageNum:number, userType:string) {
  8 + this.queryUserId = queryUserId
  9 + this.pageSize = pageSize
  10 + this.pageNum = pageNum
  11 + this.userType = userType
  12 + }
  13 +}
@@ -102,6 +102,14 @@ @@ -102,6 +102,14 @@
102 { 102 {
103 "name":"color_transparent", 103 "name":"color_transparent",
104 "value": "#00000000" 104 "value": "#00000000"
  105 + },
  106 + {
  107 + "name":"color_648DF2",
  108 + "value": "#648DF2"
  109 + },
  110 + {
  111 + "name":"color_EEEEEE",
  112 + "value": "#EEEEEE"
105 } 113 }
106 ] 114 ]
107 } 115 }
  1 +<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="none" version="1.1" width="24" height="24" viewBox="0 0 24 24"><g><g><path d="M6.29805,13.2927L19.701900000000002,20.8323C19.8353,20.9073,20,20.811,20,20.658L20,3.34197C20,3.189004,19.8353,3.0926614,19.701900000000002,3.167654L6.29805,10.70735C6.1647300000000005,10.78234,6,10.686,6,10.53303L6,3.2C6,3.0895431,5.9104600000000005,3,5.8,3L4.2,3C4.0895431,3,4,3.0895431,4,3.2L4,20.6764C4,20.8251,4.156463,20.9218,4.289443,20.8553L5.8894400000000005,20.0553C5.9572,20.0214,6,19.9521,6,19.8764L6,13.467C6,13.314,6.1647300000000005,13.2177,6.29805,13.2927" fill-rule="evenodd" fill="#FFFFFF" fill-opacity="1"/></g></g></svg>
  1 +<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="none" version="1.1" width="28.000001907348633" height="28.000001907348633" viewBox="0 0 28.000001907348633 28.000001907348633"><g><g><path d="M18.083399999999997,2.33349609375L9.91675,2.33349609375L9.91675,4.66682609375L16.9167,4.66682609375L18.083399999999997,2.33349609375ZM14,5.83349609375C19.799,5.83349609375,24.5,10.53450609375,24.5,16.33349609375C24.5,22.13249609375,19.799,26.83349609375,14,26.83349609375C10.73856,26.83349609375,7.72175,25.33539609375,5.74375,22.82139609375C4.299051,20.98519609375,3.5,18.71869609375,3.5,16.33349609375C3.5,10.53450609375,8.20101,5.83349609375,14,5.83349609375ZM13.9999,8.16650609375C9.48959,8.16650609375,5.83325,11.82284609375,5.83325,16.33319609375C5.83325,18.19029609375,6.45355,19.94979609375,7.57746,21.37829609375C9.11766,23.33579609375,11.46167,24.49979609375,13.9999,24.49979609375C18.510199999999998,24.49979609375,22.1666,20.84349609375,22.1666,16.33319609375C22.1666,11.82284609375,18.510199999999998,8.16650609375,13.9999,8.16650609375ZM15.1666,18.66679609375L15.1666,12.83349609375L12.83325,12.83349609375L12.83325,18.66679609375L15.1666,18.66679609375Z" fill-rule="evenodd" fill="#FFFFFF" fill-opacity="1"/></g></g></svg>
  1 +<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="none" version="1.1" width="24" height="24" viewBox="0 0 24 24"><g><g><path d="M15.545709424877167,8.283168125Q15.495009424877166,8.276668125,15.453609424877166,8.246598125Q15.412209424877167,8.216528125,15.390309424877167,8.170278125L12.180809424877166,1.382397125Q12.156009424877167,1.329958425,12.107009424877166,1.298923025Q12.058009424877167,1.267887729,12.000009424877167,1.267887724Q11.942009424877167,1.26788772,11.893009424877167,1.298923025Q11.844009424877166,1.329958325,11.819209424877167,1.382397125L8.609729424877166,8.170278125Q8.587869424877166,8.216528125,8.546479424877166,8.246598125Q8.505099424877166,8.276668125,8.454359424877167,8.283168125L1.0069094248771668,9.238008125Q0.9493754248771668,9.245378125,0.9047162248771667,9.282398125Q0.8600567248771668,9.319418125,0.8421322148771667,9.374578125Q0.8242076348771668,9.429748125,0.8385809248771667,9.485938125Q0.8529542248771668,9.542138125,0.8951645248771667,9.581918125L6.3590394248771664,14.731878125Q6.396259424877167,14.766978125,6.412069424877167,14.815678125Q6.427879424877167,14.864278125,6.418389424877167,14.914578125L5.025099424877166,22.292578125Q5.014339424877167,22.349578125,5.035739424877167,22.403478125Q5.057149424877167,22.457378125,5.104069424877166,22.491478125Q5.150999424877167,22.525578125,5.208889424877166,22.529278125Q5.266769424877166,22.532978125,5.317659424877167,22.505078125L11.904009424877167,18.900078125Q11.948909424877167,18.875578125,12.000009424877167,18.875578125Q12.051209424877166,18.875578125,12.096109424877167,18.900078125L18.682409424877168,22.505078125Q18.733309424877167,22.532978125,18.791209424877167,22.529278125Q18.849109424877167,22.525578125,18.896009424877168,22.491478125Q18.94290942487717,22.457378125,18.964309424877168,22.403478125Q18.985709424877168,22.349578125,18.975009424877168,22.292578125L17.581709424877168,14.914578125Q17.572209424877165,14.864278125,17.588009424877168,14.815678125Q17.603809424877166,14.766978125,17.64100942487717,14.731878125L23.104909424877167,9.581918125Q23.14710942487717,9.542138125,23.161509424877167,9.485938125Q23.175909424877165,9.429748125,23.157909424877168,9.374578125Q23.140009424877167,9.319408125,23.09530942487717,9.282398125Q23.050709424877166,9.245378125,22.993109424877165,9.238008125L15.545709424877167,8.283168125ZM14.158609424877167,10.029038125L12.000009424877167,5.463868125L9.841499424877167,10.029038125L4.832749424877167,10.671208125L8.507459424877167,14.134778125L7.570409424877167,19.096878125L12.000009424877167,16.672278125L16.429709424877167,19.096878125L15.492609424877166,14.134778125L19.167309424877168,10.671208125L14.158609424877167,10.029038125Z" fill-rule="evenodd" fill="#FFFFFF" fill-opacity="1"/></g></g></svg>
  1 +<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="none" version="1.1" width="24" height="24" viewBox="0 0 24 24"><defs><clipPath id="master_svg0_13448_089626"><rect x="0" y="0" width="24" height="24" rx="0"/></clipPath></defs><g clip-path="url(#master_svg0_13448_089626)"><g><path d="M10.67639,4L3.2,4C3.0895431,4,3,4.0895431,3,4.2L3,20.8C3,20.9105,3.0895431,21,3.2,21L20.8,21C20.9105,21,21,20.9105,21,20.8L21,5.12361C21,5.04785,20.9572,4.9786,20.8894,4.944721L19.2894,4.144721C19.1565,4.0782313,19,4.17493,19,4.323607L19,19L5,19L5,6L9.87639,6C9.95215,6,10.0214,5.9572,10.05528,5.8894400000000005L10.85528,4.289443C10.92177,4.156463,10.82507,4,10.67639,4" fill-rule="evenodd" fill="#FFFFFF" fill-opacity="1"/></g><g><path d="M11.5,3.0706476L11.5,6.52935C11.5,6.56044,11.5339189,6.57965,11.5605798,6.56365L14.44283,4.8343C14.46873,4.81876,14.46873,4.78124,14.44283,4.7657L11.5605798,3.0363479C11.5339189,3.0203513,11.5,3.0395558,11.5,3.0706476" fill-rule="evenodd" fill="#FFFFFF" fill-opacity="1"/></g><g><path d="M15,3.0706476L15,6.52935C15,6.56044,15.0339189,6.57965,15.0605798,6.56365L17.94283,4.8343C17.96873,4.81876,17.96873,4.78124,17.94283,4.7657L15.0605798,3.0363479C15.0339189,3.0203513,15,3.0395558,15,3.0706476" fill-rule="evenodd" fill="#FFFFFF" fill-opacity="1"/></g><g><path d="M8.916,11.64L8.916,16L9.964,16L9.964,10.48L8.916,10.48L7.9879999999999995,11.176L7.9879999999999995,12.312000000000001L8.916,11.64ZM10.788,14.864L10.788,16L11.9,16L11.9,14.864L10.788,14.864ZM13.008,15.612C13.27725,15.9294,13.692,16.0881,14.251999999999999,16.088C14.812000000000001,16.088,15.22663,15.928,15.496,15.608C15.76525,15.2881,15.9,14.81338,15.9,14.184L15.9,12.232C15.9,11.623999999999999,15.76525,11.16537,15.496,10.856C15.22663,10.54675,14.812000000000001,10.392,14.251999999999999,10.392C13.71325,10.392,13.304,10.548,13.024000000000001,10.86C12.744,11.172,12.604,11.62937,12.604,12.232L12.604,14.184C12.604,14.81875,12.73863,15.2948,13.008,15.612ZM14.728,14.932C14.64525,15.0947,14.48663,15.176,14.251999999999999,15.176C14.02262,15.176,13.866620000000001,15.0947,13.783999999999999,14.932C13.70125,14.76937,13.66,14.49075,13.66,14.096L13.66,12.384C13.66,11.989370000000001,13.7,11.712,13.780000000000001,11.552C13.86,11.392,14.01725,11.312000000000001,14.251999999999999,11.312000000000001C14.48663,11.312000000000001,14.64525,11.392,14.728,11.552C14.81063,11.712,14.852,11.989370000000001,14.852,12.384L14.852,14.096C14.852,14.49075,14.81063,14.76937,14.728,14.932Z" fill="#FFFFFF" fill-opacity="1"/></g></g></svg>
  1 +<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="none" version="1.1" width="24" height="24" viewBox="0 0 24 24"><g><g><path d="M17.701900000000002,13.2927L4.298053,20.8323C4.164731,20.9073,4,20.811,4,20.658L4,3.34197C4,3.189004,4.164731,3.0926614,4.298052,3.167654L17.701900000000002,10.70735C17.8353,10.78234,18,10.686,18,10.53303L18,3.2C18,3.0895431,18.0895,3,18.2,3L19.8,3C19.9105,3,20,3.0895431,20,3.2L20,20.6764C20,20.8251,19.8435,20.9218,19.7106,20.8553L18.110599999999998,20.0553C18.0428,20.0214,18,19.9521,18,19.8764L18,13.467C18,13.314,17.8353,13.2177,17.701900000000002,13.2927" fill-rule="evenodd" fill="#FFFFFF" fill-opacity="1"/></g></g></svg>
  1 +<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="none" version="1.1" width="24" height="24" viewBox="0 0 24 24"><g><g><path d="M15.455292971801757,2.941157435449219L6.545744871801758,11.850703835449218Q6.486763725801758,11.909683835449218,6.4871686249017575,11.99309383544922Q6.486763725801758,12.076503835449218,6.545744871801758,12.135483835449218L15.455292971801757,21.045043835449217Q15.513872971801758,21.10364383544922,15.596712971801757,21.10364383544922Q15.679552971801758,21.10364383544922,15.738132971801758,21.045043835449217L17.081592971801758,19.70154383544922Q17.10979297180176,19.67344383544922,17.12499297180176,19.63664383544922Q17.14019297180176,19.599843835449217,17.14019297180176,19.560143835449217Q17.14019297180176,19.520343835449218,17.12499297180176,19.48354383544922Q17.10979297180176,19.44684383544922,17.081592971801758,19.41864383544922L9.656042971801758,11.99309383544922L17.081592971801758,4.567503835449219Q17.10979297180176,4.539373835449219,17.12499297180176,4.5026138354492184Q17.14019297180176,4.465863835449219,17.14019297180176,4.4260838354492185Q17.14019297180176,4.3862938354492185,17.12499297180176,4.349543835449219Q17.10979297180176,4.312793835449218,17.081592971801758,4.284663835449219L15.738132971801758,2.941157435449219Q15.679552971801758,2.8825787414492186,15.596712971801757,2.882578739449219Q15.513872971801758,2.8825787374492187,15.455292971801757,2.941157435449219Z" fill-rule="evenodd" fill="#FFFFFF" fill-opacity="1"/></g></g></svg>
  1 +<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="none" version="1.1" width="24" height="24" viewBox="0 0 24 24"><g><g><path d="M20.566968294906616,12.68848429069519C22.714868294906616,10.54059429069519,22.714868294906616,7.058194290695191,20.566968294906616,4.910304290695191C18.419068294906616,2.7624232906951907,14.936668294906616,2.7624232906951907,12.788768294906616,4.910304290695191L11.728268294906616,5.97079429069519L10.668918294906616,4.91139429069519C8.521038294906617,2.7635142906951904,5.038628294906616,2.7635142906951904,2.890748294906616,4.91139429069519C0.7428652949066162,7.0592842906951905,0.7428652949066162,10.54168429069519,2.890748294906616,12.689574290695191L3.9501382949066164,13.74893429069519L3.949968294906616,13.74913429069519L11.728168294906617,21.52733429069519L11.728268294906616,21.52713429069519L11.729568294906617,21.52843429069519L19.507768294906615,13.75023429069519L19.506468294906615,13.74893429069519L20.566968294906616,12.68848429069519ZM13.555568294906616,6.972654290695191L14.202968294906617,6.3252142906951905C15.569868294906616,4.958374290695191,17.785968294906617,4.958374290695191,19.152768294906615,6.3252142906951905L19.284868294906616,6.4646642906951906C20.518068294906616,7.83885429069519,20.474068294906616,9.95369429069519,19.152768294906615,11.27497429069519L18.092668294906616,12.33510429069519L18.089568294906616,12.332024290695191L16.67556829490662,13.74783429069519L16.677768294906617,13.75003429069519L11.728168294906617,18.69963429069519L6.980568294906616,13.95203429069519L6.978238294906617,13.95393429069519L5.366338294906616,12.332774290695191L5.363668294906616,12.33544429069519L4.304448294906616,11.27622429069519C2.9376082949066165,9.90938429069519,2.9376082949066165,7.69330429069519,4.304448294906616,6.32646429069519L4.443898294906616,6.19434429069519C5.818078294906616,4.96115429069519,7.932928294906616,5.00519429069519,9.254208294906615,6.32646429069519L10.115348294906616,7.1876142906951905L11.725968294906616,8.79143429069519L13.555368294906616,6.972464290695191L13.555568294906616,6.972654290695191Z" fill-rule="evenodd" fill="#FFFFFF" fill-opacity="1"/></g></g></svg>
  1 +<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="none" version="1.1" width="28" height="28" viewBox="0 0 28 28"><g><g><path d="M3.5,4.31780565625L3.5,6.18447265625Q3.5,6.2308826562499995,3.5177614,6.27376265625Q3.5355229,6.31664265625,3.5683417,6.34946265625Q3.601161,6.38228265625,3.644041,6.40004265625Q3.68692,6.41780265625,3.733333,6.41780265625L24.2667,6.41780265625Q24.3131,6.41780265625,24.356,6.40004265625Q24.3988,6.38228265625,24.4317,6.34946265625Q24.4645,6.31664265625,24.4822,6.27376265625Q24.5,6.2308826562499995,24.5,6.18447265625L24.5,4.31780565625Q24.5,4.27139265625,24.4822,4.22851365625Q24.4645,4.18563365625,24.4317,4.15281435625Q24.3988,4.11999555625,24.356,4.10223405625Q24.3131,4.08447265625,24.2667,4.08447265625L3.733333,4.08447265625Q3.68692,4.08447265625,3.644041,4.10223405625Q3.601161,4.11999555625,3.5683417,4.15281435625Q3.5355229,4.18563365625,3.5177614,4.22851365625Q3.5,4.27139265625,3.5,4.31780565625ZM10.20878,13.80699265625L3.862763,9.57631265625C3.707701,9.47294265625,3.5,9.58410265625,3.5,9.77046265625L3.5,18.23177265625C3.5,18.41817265625,3.707701,18.52937265625,3.862763,18.42597265625L10.20878,14.19527265625C10.34732,14.10297265625,10.34732,13.89935265625,10.20878,13.80699265625ZM24.2667,12.83349265625L13.5609,12.83349265625C13.47249,12.83349265625,13.3917,12.88343265625,13.35217,12.96248265625L12.41884,14.82917265625C12.34127,14.98427265625,12.45409,15.16687265625,12.62754,15.16687265625L24.2667,15.16687265625C24.3955,15.16687265625,24.5,15.06237265625,24.5,14.93347265625L24.5,13.06683265625C24.5,12.93796265625,24.3955,12.83349265625,24.2667,12.83349265625ZM3.5,21.81777265625L3.5,23.68447265625Q3.5,23.73087265625,3.5177614,23.77377265625Q3.5355229,23.81667265625,3.5683417,23.84947265625Q3.601161,23.88227265625,3.644041,23.90007265625Q3.68692,23.91777265625,3.733333,23.91777265625L24.2667,23.91777265625Q24.3131,23.91777265625,24.356,23.90007265625Q24.3988,23.88227265625,24.4317,23.84947265625Q24.4645,23.81667265625,24.4822,23.77377265625Q24.5,23.73087265625,24.5,23.68447265625L24.5,21.81777265625Q24.5,21.77137265625,24.4822,21.72847265625Q24.4645,21.68567265625,24.4317,21.65277265625Q24.3988,21.61997265625,24.356,21.60227265625Q24.3131,21.58447265625,24.2667,21.58447265625L3.733333,21.58447265625Q3.68692,21.58447265625,3.644041,21.60227265625Q3.601161,21.61997265625,3.5683417,21.65277265625Q3.5355229,21.68567265625,3.5177614,21.72847265625Q3.5,21.77137265625,3.5,21.81777265625Z" fill-rule="evenodd" fill="#FFFFFF" fill-opacity="1"/></g></g></svg>
  1 +<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="none" version="1.1" width="24" height="24" viewBox="0 0 24 24"><g><g><path d="M16.61255231628418,0.6909312143875121L15.48135231628418,1.8221886143875121C15.40315231628418,1.9003386143875123,15.40325231628418,2.0270586143875122,15.48145231628418,2.105148614387512L16.87945231628418,3.5008286143875122L2.19995231628418,3.5008286143875122C2.0894953162841796,3.5008286143875122,1.9999523162841797,3.5903786143875123,1.9999523162841797,3.7008286143875124L1.9999523162841797,14.377268614387512C1.9999523162841797,14.452968614387512,2.0427528162841795,14.522268614387512,2.1105093162841797,14.556068614387513L3.7105123162841798,15.356068614387512C3.8434923162841796,15.422568614387512,3.9999523162841797,15.325868614387511,3.9999523162841797,15.177268614387513L3.9999523162841797,5.500828614387512L18.99995231628418,5.500828614387512L18.99995231628418,5.499258614387513L21.22095231628418,5.499258614387513C21.39905231628418,5.499258614387513,21.48835231628418,5.283828614387512,21.36235231628418,5.157838614387512L16.895452316284178,0.6909312143875121C16.81735231628418,0.6128262143875122,16.69065231628418,0.6128263143875122,16.61255231628418,0.6909312143875121ZM19.99995231628418,8.823458614387512L19.99995231628418,18.499868614387513L5.11660231628418,18.499868614387513L5.115252316284179,18.498468614387512L2.7755723162841797,18.498468614387512C2.5973913162841797,18.498468614387512,2.50815731628418,18.71396861438751,2.6341503162841797,18.839968614387512L7.101052316284179,23.30686861438751C7.17916231628418,23.384968614387514,7.30579231628418,23.384968614387514,7.383902316284179,23.30686861438751L8.51515231628418,22.17556861438751C8.59330231628418,22.097468614387513,8.593252316284179,21.970668614387513,8.51503231628418,21.89256861438751L7.11995231628418,20.499868614387513L21.79995231628418,20.499868614387513C21.91045231628418,20.499868614387513,21.99995231628418,20.410268614387512,21.99995231628418,20.299868614387513L21.99995231628418,9.623458614387513C21.99995231628418,9.547708614387512,21.95715231628418,9.478458614387511,21.889352316284178,9.444578614387511L20.28935231628418,8.644578614387513C20.15645231628418,8.578088614387513,19.99995231628418,8.674788614387513,19.99995231628418,8.823458614387512Z" fill-rule="evenodd" fill="#FFFFFF" fill-opacity="1"/></g></g></svg>
  1 +<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="none" version="1.1" width="24" height="24" viewBox="0 0 24 24"><g><g><path d="M2.7,3.2001953125L21.3,3.2001953125C21.4105,3.2001953125,21.5,3.2897384125,21.5,3.4001953125L21.5,19.0001953125C21.5,19.1106953125,21.4105,19.2001953125,21.3,19.2001953125L14.9442,19.2001953125L13.4142,20.7300953125L13.4198,20.7356953125L12.35915,21.7963953125C12.2601,21.8953953125,12.12982,21.9442953125,12,21.9427953125C11.87018,21.9442953125,11.7399,21.8953953125,11.64085,21.7963953125L10.58019,20.7356953125L10.58579,20.7300953125L9.05585,19.2001953125L2.7,19.2001953125C2.5895431,19.2001953125,2.5,19.1106953125,2.5,19.0001953125L2.5,3.4001953125C2.5,3.2897384125,2.5895431,3.2001953125,2.7,3.2001953125ZM9.88281,17.2016953125L9.88428,17.2001953125L12,19.3158953125L14.1157,17.2001953125L14.1179,17.202395312500002L14.1179,17.2001953125L19.5,17.2001953125L19.5,5.2001953125L4.5,5.2001953125L4.5,17.2001953125L9.88281,17.2001953125L9.88281,17.2016953125ZM15.8553,11.7884653125L15.0553,13.3884953125C15.0214,13.4561953125,14.9521,13.4989953125,14.8764,13.4989953125L9.2,13.4989953125C9.08954,13.4989953125,9,13.4094953125,9,13.2989953125L9,11.6990253125C9,11.5885653125,9.08954,11.4990253125,9.2,11.4990253125L15.6764,11.4990253125C15.8251,11.4990253125,15.9218,11.6554853125,15.8553,11.7884653125Z" fill-rule="evenodd" fill="#FFFFFF" fill-opacity="1"/></g></g></svg>
  1 +<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="none" version="1.1" width="24" height="24" viewBox="0 0 24 24"><g><g><path d="M6.915255046875,4.7314907592749025L11.848588046875001,5.964826319274902C11.937618046875,5.987086319274902,12.000078046875,6.067076319274903,12.000078046875,6.158856319274903L12.000078046875,28.413216319274902C12.000078046875,28.5433163192749,11.877808046875,28.638816319274902,11.751578046875,28.6072163192749L6.818241046875,27.3739163192749C6.729207546875,27.351616319274903,6.666748046875,27.2716163192749,6.666748046875,27.179916319274902L6.666748046875,4.925519319274902C6.666748046875,4.795405019274902,6.789026046875,4.6999334192749025,6.915255046875,4.7314907592749025M20.248548046875,4.7314907592749025L25.181848046875,5.964826319274902C25.270848046875,5.987086319274902,25.333348046875,6.067076319274903,25.333348046875,6.158856319274903L25.333348046875,28.413216319274902C25.333348046875,28.5433163192749,25.211048046875,28.638816319274902,25.084848046875,28.6072163192749L20.151448046875,27.3739163192749C20.062448046874998,27.351616319274903,20.000048046875,27.2716163192749,20.000048046875,27.179916319274902L20.000048046875,4.925519319274902C20.000048046875,4.795405019274902,20.122248046875,4.6999334192749025,20.248548046875,4.7314907592749025" fill-rule="evenodd" fill="#FFFFFF" fill-opacity="1"/></g></g></svg>
  1 +<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="none" version="1.1" width="24" height="24" viewBox="0 0 24 24"><g><g><g></g><g><path d="M1.105417,18.0568234375C1.761066,12.8724234375,5.40289,8.7758634375,10,8.0615634375L10,2.4051984375C10,2.2392634375,10.19042,2.1455014375,10.32194,2.2466744375L11.7395,3.3371434375L12,3.5375034375L21.3599,10.7374734375L21.3737,10.7481134375L22.7939,11.8405934375C22.898,11.9206534375,22.898,12.0776234375,22.7939,12.1576234375L21.3737,13.2501234375L21.3599,13.2607234375L12,20.4606234375L10.32194,21.7514234375C10.19042,21.8525234375,10,21.7588234375,10,21.5928234375L10,15.9352234375C9.25883,15.9524234375,8.59673,16.0094234375,8,16.1030234375C5.56676,16.4847234375,4.220549999999999,17.475123437500002,3.03385,18.8574234375C2.9302799999999998,18.9781234375,2.8279199999999998,19.1017234375,2.72616,19.2282234375C2.5922799999999997,19.3946234375,2.45944,19.5659234375,2.32622,19.7418234375Q2.1580399999999997,19.9639234375,1.9526590000000001,20.2902234375C1.675074,20.7312234375,1.00114143,20.6132234375,1.0000145385,20.0921234375L1,20.0787234375C1,19.7077234375,1.0151771,19.0006234375,1.0448684,18.6383234375C1.0452151,18.6341234375,1.0455638,18.6299234375,1.0459145,18.6256234375C1.0617483,18.4347234375,1.0816148,18.2450234375,1.105417,18.0568234375ZM12,9.774803437500001L12,6.0607734375L19.7198,11.9991234375L12,17.937323437499998L12,13.8883234375L9.95364,13.9357234375Q6.42661,14.0175234375,4.1625,15.3073234375Q3.98453,15.4087234375,3.80699,15.5232234375Q4.40034,14.0850234375,5.42699,12.8756234375Q7.46041,10.4801634375,10.30707,10.0378534375L12,9.774803437500001Z" fill-rule="evenodd" fill="#FFFFFF" fill-opacity="1"/></g></g></g></svg>
  1 +<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="none" version="1.1" width="28.000001907348633" height="28.000001907348633" viewBox="0 0 28.000001907348633 28.000001907348633"><g><g></g><g><path d="M3.5,25.08349609375L3.5,2.91682909375Q3.5,2.85937609375,3.5112086,2.80302709375Q3.5224172,2.74667709375,3.5444036,2.6935970937500002Q3.56639,2.6405170937499998,3.5983094,2.59274709375Q3.630229,2.54497609375,3.670854,2.50435009375Q3.71148,2.46372509375,3.759251,2.43180549375Q3.8070209999999998,2.39988609375,3.8601010000000002,2.37789969375Q3.913181,2.35591329375,3.969531,2.34470469375Q4.02588,2.33349609375,4.083333,2.33349609375L23.9167,2.33349609375Q23.9741,2.33349609375,24.0305,2.34470469375Q24.0868,2.35591329375,24.1399,2.37789969375Q24.193,2.39988609375,24.2407,2.43180549375Q24.2885,2.46372509375,24.3291,2.50435009375Q24.3698,2.54497609375,24.4017,2.59274709375Q24.4336,2.6405170937499998,24.4556,2.6935970937500002Q24.4776,2.74667709375,24.4888,2.80302709375Q24.5,2.85937609375,24.5,2.91682909375L24.5,15.16649609375L22.1666,15.16649609375L22.1666,4.66650609375L5.83325,4.66650609375L5.83325,23.33319609375L14,23.33319609375L14,25.66679609375L4.083333,25.66679609375Q4.02588,25.66679609375,3.969531,25.65559609375Q3.913181,25.64439609375,3.8601010000000002,25.62239609375Q3.8070209999999998,25.60039609375,3.759251,25.56849609375Q3.71148,25.53659609375,3.670854,25.49599609375Q3.630229,25.45539609375,3.5983094,25.40759609375Q3.56639,25.35979609375,3.5444036,25.30669609375Q3.5224172,25.25369609375,3.5112086,25.19729609375Q3.5,25.14099609375,3.5,25.08349609375Z" fill-rule="evenodd" fill="#FFFFFF" fill-opacity="1"/></g><g><path d="M9.333251953125,11.43447265625C9.333251953125,11.56334265625,9.437718953125,11.66780265625,9.566584953125,11.66780265625L17.355711953125002,11.66780265625C17.444091953125,11.66780265625,17.524881953125,11.61787265625,17.564411953125,11.53882265625L18.497741953125,9.67215565625C18.575311953125002,9.51701265625,18.462501953125,9.33447265625,18.289041953125,9.33447265625L9.566584953125,9.33447265625C9.437718953125,9.33447265625,9.333251953125,9.43893965625,9.333251953125,9.56780565625L9.333251953125,11.43447265625Z" fill="#FFFFFF" fill-opacity="1"/></g><g><path d="M9.333251953125,16.68203125C9.333251953125,16.81090125,9.437718953125,16.91536125,9.566584953125,16.91536125L14.439041953124999,16.91536125C14.527421953125,16.91536125,14.608221953125,16.86543125,14.647741953125,16.786381249999998L15.581081953125,14.91971425C15.658651953125,14.76457125,15.545831953124999,14.58203125,15.372381953125,14.58203125L9.566584953125,14.58203125C9.437718953125,14.58203125,9.333251953125,14.68649825,9.333251953125,14.81536425L9.333251953125,16.68203125Z" fill="#FFFFFF" fill-opacity="1"/></g><g><path d="M17.588956390625,19.15734328125L20.566870390625,19.16774328125L20.548890390625,24.31857328125L19.458060390625,24.314763281250002L19.471360390625,20.50559328125C19.471810390625,20.37673328125,19.367710390625,20.27190328125,19.238840390625,20.27145328125L18.346340390625,20.26833328125C18.217470390625,20.26788328125,18.112640390625,20.37198328125,18.112190390625,20.50085328125L18.098890390625,24.31002328125L17.054726390625,24.30637328125C16.925861390625,24.30592328125,16.821030110625,24.410023281249998,16.820580290625,24.53889328125L16.817464871625,25.43139328125C16.817015045625,25.560263281250002,16.921116390625,25.66509328125,17.049982390625,25.66554328125L24.933730390625,25.693063281249998C25.062600390625,25.69351328125,25.167430390625,25.58941328125,25.167880390625,25.46054328125L25.171000390625,24.56804328125C25.171450390624997,24.43917328125,25.067340390625,24.33434328125,24.938480390625,24.33389328125L21.934310390625,24.323413281249998L21.941450390625,22.27882328125L24.105620390625,22.28638328125C24.234480390625002,22.28683328125,24.339310390625002,22.18272328125,24.339760390625,22.05386328125L24.342820390625,21.17886328125C24.343270390625,21.04999328125,24.239170390625,20.94516328125,24.110300390625,20.94471328125L21.946130390625,20.93716328125L21.952290390625002,19.17257328125L24.588960390625,19.18178328125C24.717820390625,19.18223328125,24.822660390625,19.07812328125,24.823100390625,18.94926328125L24.826220390625,18.05675828125C24.826670390625,17.92789328125,24.722570390625002,17.82306218125,24.593700390625,17.82261228125L17.593700390625,17.79817776225C17.464835390625,17.79772793625,17.360004390625,17.90182928125,17.359554390625,18.03069528125L17.356439390625,18.92320328125C17.355989390625,19.05206328125,17.460090390625,19.15689328125,17.588956390625,19.15734328125Z" fill-rule="evenodd" fill="#FFFFFF" fill-opacity="1"/></g></g></svg>
@@ -5,13 +5,13 @@ @@ -5,13 +5,13 @@
5 "name": "default", 5 "name": "default",
6 "type": "HarmonyOS", 6 "type": "HarmonyOS",
7 "material": { 7 "material": {
8 - "certpath": "/Users/ysy/.ohos/config/auto_debug_sight_harmony_com.wondertek.sight_30086000745972390.cer",  
9 - "storePassword": "0000001AD1ABE6FB1D5AEC538066BBDCACCDF8DFB85BA89D4A7B163112F48FDFAD37222DD5D2FBC6738C", 8 + "certpath": "/Users/jrl/.ohos/config/auto_debug_sight_harmony_com.wondertek.sight_2850086000431478878.cer",
  9 + "storePassword": "0000001B1B59DAB22B389A8BCD25A2C43C89DE581FD6AC3EEE1D3FC227D46727A7763AAE553A50B5E81310",
10 "keyAlias": "debugKey", 10 "keyAlias": "debugKey",
11 - "keyPassword": "0000001AA4301CF4CB6CD92BFD749A3C09BC771B02A1E544A47EBBC557DB27E8150CB2AB5CB13029999D",  
12 - "profile": "/Users/ysy/.ohos/config/auto_debug_sight_harmony_com.wondertek.sight_30086000745972390.p7b", 11 + "keyPassword": "0000001B2B0EDD642E43906A1B9A6B72A79F40316E908829B79DD96467FE5C3A8D1DF9E40957DA733DF77F",
  12 + "profile": "/Users/jrl/.ohos/config/auto_debug_sight_harmony_com.wondertek.sight_2850086000431478878.p7b",
13 "signAlg": "SHA256withECDSA", 13 "signAlg": "SHA256withECDSA",
14 - "storeFile": "/Users/ysy/.ohos/config/auto_debug_sight_harmony_com.wondertek.sight_30086000745972390.p12" 14 + "storeFile": "/Users/jrl/.ohos/config/auto_debug_sight_harmony_com.wondertek.sight_2850086000431478878.p12"
15 } 15 }
16 } 16 }
17 ], 17 ],
@@ -31,3 +31,5 @@ export { DisplayUtils } from './src/main/ets/utils/DisplayUtils' @@ -31,3 +31,5 @@ export { DisplayUtils } from './src/main/ets/utils/DisplayUtils'
31 export { SystemUtils } from './src/main/ets/utils/SystemUtils' 31 export { SystemUtils } from './src/main/ets/utils/SystemUtils'
32 32
33 export { PermissionUtil } from './src/main/ets/utils/PermissionUtil' 33 export { PermissionUtil } from './src/main/ets/utils/PermissionUtil'
  34 +
  35 +export { UserDataLocal } from './src/main/ets/utils/UserDataLocal'
  1 +/**
  2 + * 用户信息 暂存管理类
  3 + * 主要用于 不需要调用 用户详情接口 获取 当前用户信息的 数据
  4 + */
  5 +import { SPHelper } from './SPHelper'
  6 +import { StringUtils } from './StringUtils'
  7 +
  8 +export class UserDataLocal {
  9 + public static userId=''
  10 + public static userType=''
  11 + public static token=''
  12 + public static userName=''
  13 +
  14 + public static userHeaderUrl=''
  15 + public static userLevel = -1
  16 + public static userLevelHeaderUrl=''
  17 +
  18 + //先写死
  19 + static USER_ID="userId"
  20 + static USER_Type="userType"
  21 + static USER_JWT_TOKEN="jwtToken"
  22 + static USER_NAME="userName"
  23 +
  24 + static USER_HEADER_URL="userHeaderUrl"
  25 + static USER_LEVEL="userLevel"
  26 + static USER_LEVEL_HEADER_URL="userLevelHeaderUrl"
  27 +
  28 + //刷新token 用到
  29 + static USER_REFRESH_TOKEN="refreshToken"
  30 +
  31 +
  32 + /**
  33 + * 清除 本地用户数据
  34 + */
  35 + public static clearUserData(){
  36 + SPHelper.default.deleteSync(UserDataLocal.USER_ID)
  37 + SPHelper.default.deleteSync(UserDataLocal.USER_Type)
  38 + SPHelper.default.deleteSync(UserDataLocal.USER_JWT_TOKEN) //待确认
  39 + SPHelper.default.deleteSync(UserDataLocal.USER_NAME)
  40 + SPHelper.default.deleteSync(UserDataLocal.USER_HEADER_URL)
  41 + SPHelper.default.deleteSync(UserDataLocal.USER_LEVEL)
  42 + SPHelper.default.deleteSync(UserDataLocal.USER_LEVEL_HEADER_URL)
  43 + }
  44 +
  45 + public static getUserId() {
  46 + if(StringUtils.isNotEmpty(UserDataLocal.userId)){
  47 + return UserDataLocal.userId
  48 + }
  49 + UserDataLocal.userId = SPHelper.default.getSync(UserDataLocal.USER_ID,"") as string
  50 + return UserDataLocal.userId;
  51 + }
  52 +
  53 + public static getUserType() {
  54 + if(StringUtils.isNotEmpty(UserDataLocal.userType)){
  55 + return UserDataLocal.userType
  56 + }
  57 + UserDataLocal.userType = SPHelper.default.getSync(UserDataLocal.USER_Type,"") as string
  58 + return UserDataLocal.userType;
  59 + }
  60 +
  61 + private static getXToken() {
  62 + if(StringUtils.isNotEmpty(UserDataLocal.token)){
  63 + return UserDataLocal.token
  64 + }
  65 + UserDataLocal.token = SPHelper.default.getSync(UserDataLocal.USER_JWT_TOKEN,"") as string
  66 + if(StringUtils.isNotEmpty(UserDataLocal.token)) {
  67 + return UserDataLocal.token
  68 + }
  69 + return 'eyJhbGciOiJIUzI1NiIsImtpZCI6ImQ4WkI2QkhxSEZrdjJ2U25BNlRwZEdKRjBHcjItVzBvS2FaYzdLOUUycmcifQ.eyJpc3MiOiJwZW9wbGVzLWRhaWx5LWZvdXJhIiwic3ViIjoicGVvcGxlcy1kYWlseS1mb3VyYSIsImV4cCI6MTcwMzY0OTYwNiwidXNlcklkIjo0NTk3NzYyOTc0NzQ5NDksInVzZXJWZXJzaW9uIjoiNDU5Nzc2Mjk3NDc0OTQ5XzIiLCJ1c2VyTmFtZSI6IkJ1bGlraWtpMTgxIiwidXNlclR5cGUiOjIsImNyZWF0b3JJZCI6NDI2NTM5MH0.jhQ9kylcm3FxWf0-lBMZuLkdtIQ6XpFnAi0AFZJNwfc';
  70 + }
  71 +
  72 + public static getUserName() {
  73 + if(StringUtils.isNotEmpty(UserDataLocal.userName)){
  74 + return UserDataLocal.userName
  75 + }
  76 + UserDataLocal.userName = SPHelper.default.getSync(UserDataLocal.USER_NAME,"") as string
  77 + return UserDataLocal.userName;
  78 + }
  79 +
  80 + public static getUserHeaderUrl() {
  81 + if(StringUtils.isNotEmpty(UserDataLocal.userHeaderUrl)){
  82 + return UserDataLocal.userHeaderUrl
  83 + }
  84 + UserDataLocal.userHeaderUrl = SPHelper.default.getSync(UserDataLocal.USER_HEADER_URL,"") as string
  85 + return UserDataLocal.userHeaderUrl;
  86 + }
  87 +
  88 + public static setUserHeaderUrl(url:string) {
  89 + SPHelper.default.save(UserDataLocal.USER_HEADER_URL, url)
  90 + }
  91 +
  92 +
  93 + public static getUserLevel() {
  94 + if(UserDataLocal.userLevel != -1){
  95 + return UserDataLocal.userLevel
  96 + }
  97 + UserDataLocal.userLevel = SPHelper.default.getSync(UserDataLocal.USER_LEVEL,-1) as number
  98 + return UserDataLocal.userLevel;
  99 + }
  100 +
  101 + public static setUserLevel(level:number) {
  102 + SPHelper.default.save(UserDataLocal.USER_LEVEL, level)
  103 + }
  104 +
  105 + public static getUserLevelHeaderUrl() {
  106 + if(StringUtils.isNotEmpty(UserDataLocal.userLevelHeaderUrl)){
  107 + return UserDataLocal.userLevelHeaderUrl
  108 + }
  109 + UserDataLocal.userLevelHeaderUrl = SPHelper.default.getSync(UserDataLocal.USER_LEVEL_HEADER_URL,"") as string
  110 + return UserDataLocal.userLevelHeaderUrl;
  111 + }
  112 +
  113 + public static setUserLevelHeaderUrl(url:string) {
  114 + SPHelper.default.save(UserDataLocal.USER_LEVEL_HEADER_URL, url)
  115 + }
  116 +}
@@ -26,7 +26,6 @@ export class HttpUrlUtils { @@ -26,7 +26,6 @@ export class HttpUrlUtils {
26 * 启动接口(底导接口) 26 * 启动接口(底导接口)
27 */ 27 */
28 static readonly BOTTOM_NAV_PATH: string = "/api/rmrb-bff-display-zh/display/zh/c/bottomNavGroup"; 28 static readonly BOTTOM_NAV_PATH: string = "/api/rmrb-bff-display-zh/display/zh/c/bottomNavGroup";
29 -  
30 /** 29 /**
31 * 展现pageInfo接口 30 * 展现pageInfo接口
32 */ 31 */
@@ -42,24 +41,24 @@ export class HttpUrlUtils { @@ -42,24 +41,24 @@ export class HttpUrlUtils {
42 /** 41 /**
43 * 批查接口,查询互动相关数据,如收藏数、评论数等 42 * 批查接口,查询互动相关数据,如收藏数、评论数等
44 */ 43 */
45 - static readonly INTERACT_DATA_PATH: string = "/api/rmrb-contact/contact/zh/c/content/interactData";  
46 - 44 + static readonly INTERACT_DATA_PATH: string = "/api/rmrb-contact/contact/zh/c/v2/content/interactData";
47 // 多图(图集)详情页 45 // 多图(图集)详情页
48 /** 46 /**
49 * 批量查询内容当前用户点赞、收藏状态 47 * 批量查询内容当前用户点赞、收藏状态
50 */ 48 */
51 static readonly INTERACT_DATA_STATUS: string = "/api/rmrb-interact/interact/zh/c/batchLikeAndCollect/status"; 49 static readonly INTERACT_DATA_STATUS: string = "/api/rmrb-interact/interact/zh/c/batchLikeAndCollect/status";
52 - 50 + /**
  51 + * 沉浸式視頻批量查詢20條數據
  52 + */
  53 + static readonly RECOMMEND_VIDEOLIST: string = "/api/rmrb-bff-display-zh/recommend/zh/c/videoList";
53 /** 54 /**
54 * 浏览历史新增、删除接口 55 * 浏览历史新增、删除接口
55 */ 56 */
56 static readonly INTERACT_BROWS_OPERATE: string = "/api/rmrb-interact/interact/zh/c/brows/operate"; 57 static readonly INTERACT_BROWS_OPERATE: string = "/api/rmrb-interact/interact/zh/c/brows/operate";
57 -  
58 /** 58 /**
59 * 电子报信息 59 * 电子报信息
60 */ 60 */
61 static readonly E_NEWSPAPER_INFO_PATH: string = "/api/rmrb-bff-display-zh/display/zh/c/paperApi/paperTime"; 61 static readonly E_NEWSPAPER_INFO_PATH: string = "/api/rmrb-bff-display-zh/display/zh/c/paperApi/paperTime";
62 -  
63 /** 62 /**
64 * 电子报列表 63 * 电子报列表
65 */ 64 */
@@ -94,25 +93,25 @@ export class HttpUrlUtils { @@ -94,25 +93,25 @@ export class HttpUrlUtils {
94 */ 93 */
95 static readonly FOLLOW_LIST_STATUS_DATA_PATH: string = "/api/rmrb-interact/interact/zh/c/batchAttention/status"; 94 static readonly FOLLOW_LIST_STATUS_DATA_PATH: string = "/api/rmrb-interact/interact/zh/c/batchAttention/status";
96 /** 95 /**
  96 + * 个人中心 启用用户 有没有被当前用户点赞状态
  97 + */
  98 + static readonly COMMENT_LIST_STATUS_DATA_PATH: string = "/api/rmrb-comment/comment/zh/c/batchCommentStatus";
  99 + /**
97 * 我的收藏 100 * 我的收藏
98 */ 101 */
99 static readonly APPOINTMENT_MyCollectionList_PATH: string = "/api/rmrb-interact/content/zh/c/interact"; 102 static readonly APPOINTMENT_MyCollectionList_PATH: string = "/api/rmrb-interact/content/zh/c/interact";
100 -  
101 /** 103 /**
102 * 个人中心 我的评论列表 104 * 个人中心 我的评论列表
103 */ 105 */
104 static readonly MINE_COMMENT_LIST_DATA_PATH: string = "/api/rmrb-comment/comment/zh/c/myCommentList"; 106 static readonly MINE_COMMENT_LIST_DATA_PATH: string = "/api/rmrb-comment/comment/zh/c/myCommentList";
105 -  
106 /** 107 /**
107 * 个人中心 APP获取用户等级 108 * 个人中心 APP获取用户等级
108 */ 109 */
109 static readonly MINE_USER_LEVEL_DATA_PATH: string = "/api/rmrb-user-point/auth/level/zh/c/queryUserLevel"; 110 static readonly MINE_USER_LEVEL_DATA_PATH: string = "/api/rmrb-user-point/auth/level/zh/c/queryUserLevel";
110 -  
111 /** 111 /**
112 * 个人中心 APP获取其他用户等级 112 * 个人中心 APP获取其他用户等级
113 */ 113 */
114 static readonly OTHER_USER_LEVEL_DATA_PATH: string = "/api/rmrb-user-point/auth/level/zh/c/batchUser"; 114 static readonly OTHER_USER_LEVEL_DATA_PATH: string = "/api/rmrb-user-point/auth/level/zh/c/batchUser";
115 -  
116 /** 115 /**
117 * 个人中心 (号主/普通用户)我的基本信息 116 * 个人中心 (号主/普通用户)我的基本信息
118 */ 117 */
@@ -129,6 +128,20 @@ export class HttpUrlUtils { @@ -129,6 +128,20 @@ export class HttpUrlUtils {
129 * 个人中心 我的关注列表 128 * 个人中心 我的关注列表
130 */ 129 */
131 static readonly OTHER_USER_FOLLOW_LIST_DATA_PATH: string = "/api/rmrb-interact/interact/zh/c/userAttention/list"; 130 static readonly OTHER_USER_FOLLOW_LIST_DATA_PATH: string = "/api/rmrb-interact/interact/zh/c/userAttention/list";
  131 +
  132 + /**
  133 + * 预约操作
  134 + */
  135 + static readonly APPOINTMENT_OPERATION_STATUS_PATH: string = "/api/live-center-message/zh/c/live/subscribe";
  136 +
  137 + /**
  138 + * 点赞操作
  139 + */
  140 + static readonly COMMENT_LIKE_OPERATION_PATH: string = "/api/rmrb-comment/comment/zh/c/commentLike";
  141 + /**
  142 + * 关注操作
  143 + */
  144 + static readonly FOLLOW_OPERATION_PATH: string = "/api/rmrb-interact/interact/zh/c/attention/operation";
132 /** 145 /**
133 * 早晚报列表 146 * 早晚报列表
134 * 根据页面id获取页面楼层列表 147 * 根据页面id获取页面楼层列表
@@ -139,13 +152,11 @@ export class HttpUrlUtils { @@ -139,13 +152,11 @@ export class HttpUrlUtils {
139 * pageSize=20&pageNum=1&topicId=10000009445 152 * pageSize=20&pageNum=1&topicId=10000009445
140 * */ 153 * */
141 static readonly MORNING_EVENING_PAGE_INFO_PATH: string = "/api/rmrb-bff-display-zh/display/zh/c/pageInfo"; 154 static readonly MORNING_EVENING_PAGE_INFO_PATH: string = "/api/rmrb-bff-display-zh/display/zh/c/pageInfo";
142 -  
143 static readonly MORNING_EVENING_COMP_INFO_PATH: string = "/api/rmrb-bff-display-zh/display/zh/c/compInfo"; 155 static readonly MORNING_EVENING_COMP_INFO_PATH: string = "/api/rmrb-bff-display-zh/display/zh/c/compInfo";
144 -  
145 private static hostUrl: string = HttpUrlUtils.HOST_PRODUCT; 156 private static hostUrl: string = HttpUrlUtils.HOST_PRODUCT;
146 - private static userId=''  
147 - private static userType=''  
148 - private static token='' 157 + private static userId = ''
  158 + private static userType = ''
  159 + private static token = ''
149 160
150 static getCommonHeaders(): HashMap<string, string> { 161 static getCommonHeaders(): HashMap<string, string> {
151 let headers: HashMap<string, string> = new HashMap<string, string>() 162 let headers: HashMap<string, string> = new HashMap<string, string>()
@@ -240,9 +251,12 @@ export class HttpUrlUtils { @@ -240,9 +251,12 @@ export class HttpUrlUtils {
240 } 251 }
241 252
242 private static getXToken() { 253 private static getXToken() {
243 - let jwttoken = SPHelper.default.getSync(SpConstants.USER_JWT_TOKEN,"")  
244 - if(StringUtils.isNotEmpty(jwttoken)) {  
245 - return jwttoken as string; 254 + if(StringUtils.isNotEmpty(HttpUrlUtils.token)){
  255 + return HttpUrlUtils.token
  256 + }
  257 + HttpUrlUtils.token = SPHelper.default.getSync(SpConstants.USER_JWT_TOKEN,"") as string
  258 + if(StringUtils.isNotEmpty(HttpUrlUtils.token)) {
  259 + return HttpUrlUtils.token
246 } 260 }
247 return 'eyJhbGciOiJIUzI1NiIsImtpZCI6ImQ4WkI2QkhxSEZrdjJ2U25BNlRwZEdKRjBHcjItVzBvS2FaYzdLOUUycmcifQ.eyJpc3MiOiJwZW9wbGVzLWRhaWx5LWZvdXJhIiwic3ViIjoicGVvcGxlcy1kYWlseS1mb3VyYSIsImV4cCI6MTcwMzY0OTYwNiwidXNlcklkIjo0NTk3NzYyOTc0NzQ5NDksInVzZXJWZXJzaW9uIjoiNDU5Nzc2Mjk3NDc0OTQ5XzIiLCJ1c2VyTmFtZSI6IkJ1bGlraWtpMTgxIiwidXNlclR5cGUiOjIsImNyZWF0b3JJZCI6NDI2NTM5MH0.jhQ9kylcm3FxWf0-lBMZuLkdtIQ6XpFnAi0AFZJNwfc'; 261 return 'eyJhbGciOiJIUzI1NiIsImtpZCI6ImQ4WkI2QkhxSEZrdjJ2U25BNlRwZEdKRjBHcjItVzBvS2FaYzdLOUUycmcifQ.eyJpc3MiOiJwZW9wbGVzLWRhaWx5LWZvdXJhIiwic3ViIjoicGVvcGxlcy1kYWlseS1mb3VyYSIsImV4cCI6MTcwMzY0OTYwNiwidXNlcklkIjo0NTk3NzYyOTc0NzQ5NDksInVzZXJWZXJzaW9uIjoiNDU5Nzc2Mjk3NDc0OTQ5XzIiLCJ1c2VyTmFtZSI6IkJ1bGlraWtpMTgxIiwidXNlclR5cGUiOjIsImNyZWF0b3JJZCI6NDI2NTM5MH0.jhQ9kylcm3FxWf0-lBMZuLkdtIQ6XpFnAi0AFZJNwfc';
248 } 262 }
@@ -313,19 +327,18 @@ export class HttpUrlUtils { @@ -313,19 +327,18 @@ export class HttpUrlUtils {
313 327
314 public static getUserId() { 328 public static getUserId() {
315 // TODO 对接登录 329 // TODO 对接登录
316 - let userid = SPHelper.default.getSync(SpConstants.USER_ID,"")  
317 - if(StringUtils.isNotEmpty(userid)) {  
318 - return userid as string; 330 + if(StringUtils.isNotEmpty(HttpUrlUtils.userId)){
  331 + return HttpUrlUtils.userId
319 } 332 }
  333 + HttpUrlUtils.userId = SPHelper.default.getSync(SpConstants.USER_ID,"") as string
320 return HttpUrlUtils.userId; 334 return HttpUrlUtils.userId;
321 } 335 }
322 336
323 - private static getUserType() {  
324 - let userType = SPHelper.default.getSync(SpConstants.USER_Type,"")  
325 - if(StringUtils.isNotEmpty(userType)) {  
326 - return userType as string; 337 + public static getUserType() {
  338 + if(StringUtils.isNotEmpty(HttpUrlUtils.userType)){
  339 + return HttpUrlUtils.userType
327 } 340 }
328 - 341 + HttpUrlUtils.userType = SPHelper.default.getSync(SpConstants.USER_Type,"") as string
329 return HttpUrlUtils.userType; 342 return HttpUrlUtils.userType;
330 } 343 }
331 344
@@ -366,7 +379,7 @@ export class HttpUrlUtils { @@ -366,7 +379,7 @@ export class HttpUrlUtils {
366 return url; 379 return url;
367 } 380 }
368 381
369 - static getAppLoginUrl() :string{ 382 + static getAppLoginUrl(): string {
370 let url = HttpUrlUtils.getHost() + "/api/rmrb-user-center/auth/zh/c/appLogin"; 383 let url = HttpUrlUtils.getHost() + "/api/rmrb-user-center/auth/zh/c/appLogin";
371 return url; 384 return url;
372 } 385 }
@@ -382,7 +395,7 @@ export class HttpUrlUtils { @@ -382,7 +395,7 @@ export class HttpUrlUtils {
382 } 395 }
383 396
384 static getAppointmentListDataUrl() { 397 static getAppointmentListDataUrl() {
385 - let url = HttpUrlUtils.HOST_SIT + HttpUrlUtils.APPOINTMENT_LIST_DATA_PATH 398 + let url = HttpUrlUtils.hostUrl + HttpUrlUtils.APPOINTMENT_LIST_DATA_PATH
386 return url 399 return url
387 } 400 }
388 401
@@ -392,110 +405,128 @@ export class HttpUrlUtils { @@ -392,110 +405,128 @@ export class HttpUrlUtils {
392 } 405 }
393 406
394 static getFollowListDetailDataUrl() { 407 static getFollowListDetailDataUrl() {
395 - let url = HttpUrlUtils.HOST_SIT + HttpUrlUtils.FOLLOW_LIST_DETAIL_DATA_PATH 408 + let url = HttpUrlUtils.hostUrl + HttpUrlUtils.FOLLOW_LIST_DETAIL_DATA_PATH
396 return url 409 return url
397 } 410 }
398 411
399 static getFollowListDataUrl() { 412 static getFollowListDataUrl() {
400 - let url = HttpUrlUtils.HOST_SIT + HttpUrlUtils.FOLLOW_LIST_DATA_PATH 413 + let url = HttpUrlUtils.hostUrl + HttpUrlUtils.FOLLOW_LIST_DATA_PATH
401 return url 414 return url
402 } 415 }
403 416
404 static getMineFollowListDataUrl() { 417 static getMineFollowListDataUrl() {
405 - let url = HttpUrlUtils.HOST_SIT + HttpUrlUtils.MINE_FOLLOW_LIST_DATA_PATH 418 + let url = HttpUrlUtils.hostUrl + HttpUrlUtils.MINE_FOLLOW_LIST_DATA_PATH
406 return url 419 return url
407 } 420 }
408 421
409 static getFollowListStatusDataUrl() { 422 static getFollowListStatusDataUrl() {
410 - let url = HttpUrlUtils.HOST_SIT + HttpUrlUtils.FOLLOW_LIST_STATUS_DATA_PATH 423 + let url = HttpUrlUtils.hostUrl + HttpUrlUtils.FOLLOW_LIST_STATUS_DATA_PATH
  424 + return url
  425 + }
  426 +
  427 + static getCommentListStatusDataUrl() {
  428 + let url = HttpUrlUtils.hostUrl + HttpUrlUtils.COMMENT_LIST_STATUS_DATA_PATH
411 return url 429 return url
412 } 430 }
413 431
414 static getMineCommentListDataUrl() { 432 static getMineCommentListDataUrl() {
415 - let url = HttpUrlUtils.HOST_SIT + HttpUrlUtils.MINE_COMMENT_LIST_DATA_PATH 433 + let url = HttpUrlUtils.hostUrl + HttpUrlUtils.MINE_COMMENT_LIST_DATA_PATH
416 return url 434 return url
417 } 435 }
418 436
419 static getMineUserLevelDataUrl() { 437 static getMineUserLevelDataUrl() {
420 - let url = HttpUrlUtils.HOST_SIT + HttpUrlUtils.MINE_USER_LEVEL_DATA_PATH 438 + let url = HttpUrlUtils.hostUrl + HttpUrlUtils.MINE_USER_LEVEL_DATA_PATH
421 return url 439 return url
422 } 440 }
423 441
424 static getOtherUserLevelDataUrl() { 442 static getOtherUserLevelDataUrl() {
425 - let url = HttpUrlUtils.HOST_SIT + HttpUrlUtils.OTHER_USER_LEVEL_DATA_PATH 443 + let url = HttpUrlUtils.hostUrl + HttpUrlUtils.OTHER_USER_LEVEL_DATA_PATH
426 return url 444 return url
427 } 445 }
428 446
429 static getMineUserDetailDataUrl() { 447 static getMineUserDetailDataUrl() {
430 - let url = HttpUrlUtils.HOST_SIT + HttpUrlUtils.MINE_USER_DETAIL_DATA_PATH 448 + let url = HttpUrlUtils.hostUrl + HttpUrlUtils.MINE_USER_DETAIL_DATA_PATH
431 return url 449 return url
432 } 450 }
433 451
434 static getOtherUserDetailDataUrl() { 452 static getOtherUserDetailDataUrl() {
435 - let url = HttpUrlUtils.HOST_SIT + HttpUrlUtils.OTHER_USER_DETAIL_DATA_PATH 453 + let url = HttpUrlUtils.hostUrl + HttpUrlUtils.OTHER_USER_DETAIL_DATA_PATH
436 return url 454 return url
437 } 455 }
438 456
439 static getOtherCommentListDataUrl() { 457 static getOtherCommentListDataUrl() {
440 - let url = HttpUrlUtils.HOST_SIT + HttpUrlUtils.OTHER_COMMENT_LIST_DATA_PATH 458 + let url = HttpUrlUtils.hostUrl + HttpUrlUtils.OTHER_COMMENT_LIST_DATA_PATH
441 return url 459 return url
442 } 460 }
443 461
444 static getOtherUserFollowListDataUrl() { 462 static getOtherUserFollowListDataUrl() {
445 - let url = HttpUrlUtils.HOST_SIT + HttpUrlUtils.OTHER_USER_FOLLOW_LIST_DATA_PATH 463 + let url = HttpUrlUtils.hostUrl + HttpUrlUtils.OTHER_USER_FOLLOW_LIST_DATA_PATH
446 return url 464 return url
447 } 465 }
448 466
449 -  
450 -  
451 - static getYcgCommonHeaders(): HashMap<string, string> {  
452 - let headers: HashMap<string, string> = new HashMap<string, string>()  
453 -  
454 - headers.set('mpassid', 'XGt6jfGUx8ADAKruTyAMdhHj')  
455 - headers.set('city', "%E5%90%88%E8%82%A5%E5%B8%82")  
456 - headers.set('User-Agent', 'Dalvik/2.1.0 (Linux; U; Android 10; PCT-AL10 Build/HUAWEIPCT-AL10)')  
457 - headers.set('channel', "rmrb_china_0000")  
458 - headers.set('appCode', "0af1f9085e484c97b2a44704bae72c07")  
459 - headers.set('Authorization', "APPCODE 0af1f9085e484c97b2a44704bae72c07")  
460 - headers.set('X-Ca-Stage', "TEST")  
461 - headers.set('plat', "Phone")  
462 - headers.set('Content-Type', 'application/json; charset=utf-8')  
463 - headers.set('timestamp', "740977741")  
464 - headers.set('RMRB-X-TOKEN', "eyJhbGciOiJIUzI1NiIsImtpZCI6IklFazBGclhfV2RYMEx1ZktDU01iYTVYd0VmUHZ6a043T0F5UTRFLWIwWU0ifQ.eyJpc3MiOiJwZW9wbGVzLWRhaWx5LWZvdXJhIiwic3ViIjoicGVvcGxlcy1kYWlseS1mb3VyYSIsImV4cCI6MTcxMDc1NjM3NywidXNlcklkIjo1NjczODc0NzcwNjM2MjEsInVzZXJWZXJzaW9uIjoiNTY3Mzg3NDc3MDYzNjIxXzAiLCJ1c2VyTmFtZSI6IiVFNCVCQSVCQSVFNiVCMCU5MSVFNiU5NyVBNSVFNiU4QSVBNSVFNyVCRCU5MSVFNSU4RiU4QmFQcnRxNSIsInVzZXJUeXBlIjoxLCJjcmVhdG9ySWQiOm51bGwsInVzZXJJZFpoIjpudWxsfQ.KBkF0Yki-JWlq0ZIOCzgKwQc1ycBnFHa6CF-rMPRgHU")  
465 - headers.set('device_id', "5156098c-6c44-3514-af70-04a0139a9327")  
466 - // headers.set('cookie', 'RMRB-X-TOKEN=eyJhbGciOiJIUzI1NiIsImtpZCI6IklFazBGclhfV2RYMEx1ZktDU01iYTVYd0VmUHZ6a043T0F5UTRFLWIwWU0ifQ.eyJpc3MiOiJwZW9wbGVzLWRhaWx5LWZvdXJhIiwic3ViIjoicGVvcGxlcy1kYWlseS1mb3VyYSIsImV4cCI6MTcxMDU4Mzk0MywidXNlcklkIjo1NjczODc0NzcwNjM2MjEsInVzZXJWZXJzaW9uIjoiNTY3Mzg3NDc3MDYzNjIxXzAiLCJ1c2VyTmFtZSI6IiVFNCVCQSVCQSVFNiVCMCU5MSVFNiU5NyVBNSVFNiU4QSVBNSVFNyVCRCU5MSVFNSU4RiU4QmFQcnRxNSIsInVzZXJUeXBlIjoxLCJjcmVhdG9ySWQiOm51bGwsInVzZXJJZFpoIjpudWxsfQ._LTKrUxQozpCj1XMhx1TWOIxn5gjDveoPuMFGpI0g_8')  
467 - headers.set('build_version', "202403112023")  
468 - headers.set('adcode', "340000")  
469 - headers.set('os_version', "10")  
470 - headers.set('city_dode', "340100")  
471 - headers.set('userId', "567387477063621")  
472 - headers.set('versionCode', "7302")  
473 - headers.set('system', "Android")  
474 - headers.set('version_name', "7.3.0.2")  
475 - headers.set('EagleEye-TraceID', '101118E4D006453DA549A82AA8CAFBFE')  
476 - headers.set('imei', "5156098c-6c44-3514-af70-04a0139a9327")  
477 - headers.set('userType', "1")  
478 - headers.set('Accept-Language', 'zh')  
479 -  
480 - // HttpUrlUtils.addSpecialHeaders(headers);  
481 - // Logger.debug("TAG", '******************* commonHeaders headers start ******************************** ');  
482 - // headers.forEach((v,k)=>{  
483 - // Logger.debug("TAG", 'getCommonHeaders header: ' + k + ': ' + v);  
484 - // })  
485 - // Logger.debug("TAG", '******************* commonHeaders headers end ******************************** ');  
486 - return headers; 467 + static getAppointmentOperationUrl() {
  468 + let url = HttpUrlUtils.hostUrl + HttpUrlUtils.APPOINTMENT_OPERATION_STATUS_PATH
  469 + return url
487 } 470 }
488 471
489 - public static setUserId(userId:string){  
490 - HttpUrlUtils.userId=userId; 472 + static getCommentLikeOperationUrl() {
  473 + let url = HttpUrlUtils.hostUrl + HttpUrlUtils.COMMENT_LIKE_OPERATION_PATH
  474 + return url
491 } 475 }
492 476
493 - public static setUserType(userType:string){  
494 - HttpUrlUtils.userType=userType; 477 + static getFollowOperationUrl() {
  478 + let url = HttpUrlUtils.hostUrl + HttpUrlUtils.FOLLOW_OPERATION_PATH
  479 + return url
495 } 480 }
496 481
497 - public static setUserToken(token:string){  
498 - HttpUrlUtils.token=token;  
499 - }  
500 482
  483 + // static getYcgCommonHeaders(): HashMap<string, string> {
  484 + // let headers: HashMap<string, string> = new HashMap<string, string>()
  485 + //
  486 + // headers.set('mpassid', 'XGt6jfGUx8ADAKruTyAMdhHj')
  487 + // headers.set('city', "%E5%90%88%E8%82%A5%E5%B8%82")
  488 + // headers.set('User-Agent', 'Dalvik/2.1.0 (Linux; U; Android 10; PCT-AL10 Build/HUAWEIPCT-AL10)')
  489 + // headers.set('channel', "rmrb_china_0000")
  490 + // headers.set('appCode', "0af1f9085e484c97b2a44704bae72c07")
  491 + // headers.set('Authorization', "APPCODE 0af1f9085e484c97b2a44704bae72c07")
  492 + // headers.set('X-Ca-Stage', "TEST")
  493 + // headers.set('plat', "Phone")
  494 + // headers.set('Content-Type', 'application/json; charset=utf-8')
  495 + // headers.set('timestamp', "740977741")
  496 + // headers.set('RMRB-X-TOKEN', "eyJhbGciOiJIUzI1NiIsImtpZCI6IklFazBGclhfV2RYMEx1ZktDU01iYTVYd0VmUHZ6a043T0F5UTRFLWIwWU0ifQ.eyJpc3MiOiJwZW9wbGVzLWRhaWx5LWZvdXJhIiwic3ViIjoicGVvcGxlcy1kYWlseS1mb3VyYSIsImV4cCI6MTcxMDc1NjM3NywidXNlcklkIjo1NjczODc0NzcwNjM2MjEsInVzZXJWZXJzaW9uIjoiNTY3Mzg3NDc3MDYzNjIxXzAiLCJ1c2VyTmFtZSI6IiVFNCVCQSVCQSVFNiVCMCU5MSVFNiU5NyVBNSVFNiU4QSVBNSVFNyVCRCU5MSVFNSU4RiU4QmFQcnRxNSIsInVzZXJUeXBlIjoxLCJjcmVhdG9ySWQiOm51bGwsInVzZXJJZFpoIjpudWxsfQ.KBkF0Yki-JWlq0ZIOCzgKwQc1ycBnFHa6CF-rMPRgHU")
  497 + // headers.set('device_id', "5156098c-6c44-3514-af70-04a0139a9327")
  498 + // // headers.set('cookie', 'RMRB-X-TOKEN=eyJhbGciOiJIUzI1NiIsImtpZCI6IklFazBGclhfV2RYMEx1ZktDU01iYTVYd0VmUHZ6a043T0F5UTRFLWIwWU0ifQ.eyJpc3MiOiJwZW9wbGVzLWRhaWx5LWZvdXJhIiwic3ViIjoicGVvcGxlcy1kYWlseS1mb3VyYSIsImV4cCI6MTcxMDU4Mzk0MywidXNlcklkIjo1NjczODc0NzcwNjM2MjEsInVzZXJWZXJzaW9uIjoiNTY3Mzg3NDc3MDYzNjIxXzAiLCJ1c2VyTmFtZSI6IiVFNCVCQSVCQSVFNiVCMCU5MSVFNiU5NyVBNSVFNiU4QSVBNSVFNyVCRCU5MSVFNSU4RiU4QmFQcnRxNSIsInVzZXJUeXBlIjoxLCJjcmVhdG9ySWQiOm51bGwsInVzZXJJZFpoIjpudWxsfQ._LTKrUxQozpCj1XMhx1TWOIxn5gjDveoPuMFGpI0g_8')
  499 + // headers.set('build_version', "202403112023")
  500 + // headers.set('adcode', "340000")
  501 + // headers.set('os_version', "10")
  502 + // headers.set('city_dode', "340100")
  503 + // headers.set('userId', "567387477063621")
  504 + // headers.set('versionCode', "7302")
  505 + // headers.set('system', "Android")
  506 + // headers.set('version_name', "7.3.0.2")
  507 + // headers.set('EagleEye-TraceID', '101118E4D006453DA549A82AA8CAFBFE')
  508 + // headers.set('imei', "5156098c-6c44-3514-af70-04a0139a9327")
  509 + // headers.set('userType', "1")
  510 + // headers.set('Accept-Language', 'zh')
  511 + //
  512 + // // HttpUrlUtils.addSpecialHeaders(headers);
  513 + // // Logger.debug("TAG", '******************* commonHeaders headers start ******************************** ');
  514 + // // headers.forEach((v,k)=>{
  515 + // // Logger.debug("TAG", 'getCommonHeaders header: ' + k + ': ' + v);
  516 + // // })
  517 + // // Logger.debug("TAG", '******************* commonHeaders headers end ******************************** ');
  518 + // return headers;
  519 + // }
  520 +
  521 + public static setUserId(userId: string) {
  522 + HttpUrlUtils.userId = userId;
  523 + }
  524 +
  525 + public static setUserType(userType: string) {
  526 + HttpUrlUtils.userType = userType;
  527 + }
  528 +
  529 + public static setUserToken(token: string) {
  530 + HttpUrlUtils.token = token;
  531 + }
501 } 532 }
@@ -53,9 +53,11 @@ export function registerRouter() { @@ -53,9 +53,11 @@ export function registerRouter() {
53 // return WDRouterPage.detailPlayLivePage 53 // return WDRouterPage.detailPlayLivePage
54 // } 54 // }
55 if (action.params?.detailPageType == 7 || action.params?.detailPageType == 8) { 55 if (action.params?.detailPageType == 7 || action.params?.detailPageType == 8) {
56 - return WDRouterPage.detailPlayShortVideoPage  
57 - } else if (action.params?.detailPageType == 9 ) { 56 + return WDRouterPage.detailVideoListPage
  57 + } else if (action.params?.detailPageType == 17) {
58 return WDRouterPage.multiPictureDetailPage 58 return WDRouterPage.multiPictureDetailPage
  59 + } else if (action.params?.detailPageType == 13) {
  60 + return WDRouterPage.audioDetail
59 } 61 }
60 return WDRouterPage.detailPlayVodPage 62 return WDRouterPage.detailPlayVodPage
61 }) 63 })
@@ -67,9 +69,9 @@ export function registerRouter() { @@ -67,9 +69,9 @@ export function registerRouter() {
67 Action2Page.register("JUMP_INNER_NEW_PAGE", (action) => { 69 Action2Page.register("JUMP_INNER_NEW_PAGE", (action) => {
68 if (action.params?.pageID == "E_NEWSPAPER") { 70 if (action.params?.pageID == "E_NEWSPAPER") {
69 return WDRouterPage.eNewspaper 71 return WDRouterPage.eNewspaper
70 - } else if (action.params?.pageID == "MorningEveningPaper"){ 72 + } else if (action.params?.pageID == "MorningEveningPaper") {
71 return WDRouterPage.morningEveningPaperPage 73 return WDRouterPage.morningEveningPaperPage
72 - } else if (action.params?.pageID == "IMAGE_TEXT_DETAIL"){ 74 + } else if (action.params?.pageID == "IMAGE_TEXT_DETAIL") {
73 return WDRouterPage.imageTextDetailPage 75 return WDRouterPage.imageTextDetailPage
74 } 76 }
75 return undefined 77 return undefined
@@ -9,6 +9,12 @@ export class WDRouterPage { @@ -9,6 +9,12 @@ export class WDRouterPage {
9 this.pagePath = pagePath 9 this.pagePath = pagePath
10 } 10 }
11 11
  12 + static getBundleInfo(){
  13 + let bundleInfo = bundleManager.getBundleInfoForSelfSync(bundleManager.BundleFlag.GET_BUNDLE_INFO_DEFAULT)
  14 + return `@bundle:${bundleInfo.name}/${"phone"}/${"ets/pages/MainPage"}`
  15 + }
  16 +
  17 +
12 url() { 18 url() {
13 let bundleInfo = bundleManager.getBundleInfoForSelfSync(bundleManager.BundleFlag.GET_BUNDLE_INFO_DEFAULT) 19 let bundleInfo = bundleManager.getBundleInfoForSelfSync(bundleManager.BundleFlag.GET_BUNDLE_INFO_DEFAULT)
14 return `@bundle:${bundleInfo.name}/${this.moduleName}/${this.pagePath}` 20 return `@bundle:${bundleInfo.name}/${this.moduleName}/${this.pagePath}`
@@ -27,6 +33,7 @@ export class WDRouterPage { @@ -27,6 +33,7 @@ export class WDRouterPage {
27 // 图文详情页 33 // 图文详情页
28 static imageTextDetailPage = new WDRouterPage("phone", "ets/pages/ImageAndTextDetailPage"); 34 static imageTextDetailPage = new WDRouterPage("phone", "ets/pages/ImageAndTextDetailPage");
29 // 短视频详情页 35 // 短视频详情页
  36 + static detailVideoListPage = new WDRouterPage("wdDetailPlayShortVideo", "ets/pages/DetailVideoListPage");
30 static detailPlayShortVideoPage = new WDRouterPage("wdDetailPlayShortVideo", "ets/pages/DetailPlayShortVideoPage"); 37 static detailPlayShortVideoPage = new WDRouterPage("wdDetailPlayShortVideo", "ets/pages/DetailPlayShortVideoPage");
31 // 点播详情页 38 // 点播详情页
32 static detailPlayVodPage = new WDRouterPage("wdDetailPlayVod", "ets/pages/DetailPlayVodPage"); 39 static detailPlayVodPage = new WDRouterPage("wdDetailPlayVod", "ets/pages/DetailPlayVodPage");
@@ -34,9 +41,9 @@ export class WDRouterPage { @@ -34,9 +41,9 @@ export class WDRouterPage {
34 static detailPlayLivePage = new WDRouterPage("wdDetailPlayLive", "ets/pages/DetailPlayLivePage"); 41 static detailPlayLivePage = new WDRouterPage("wdDetailPlayLive", "ets/pages/DetailPlayLivePage");
35 // 多图(图集)详情页 42 // 多图(图集)详情页
36 static multiPictureDetailPage = new WDRouterPage("phone", "ets/pages/detail/MultiPictureDetailPage"); 43 static multiPictureDetailPage = new WDRouterPage("phone", "ets/pages/detail/MultiPictureDetailPage");
37 - 44 + // 音乐详情页
  45 + static audioDetail = new WDRouterPage("phone", "ets/pages/detail/AudioDetail");
38 static loginPage = new WDRouterPage("wdLogin", "ets/pages/login/LoginPage"); 46 static loginPage = new WDRouterPage("wdLogin", "ets/pages/login/LoginPage");
39 -  
40 static forgetPasswordPage = new WDRouterPage("wdLogin", "ets/pages/login/ForgetPasswordPage"); 47 static forgetPasswordPage = new WDRouterPage("wdLogin", "ets/pages/login/ForgetPasswordPage");
41 //我的 预约 48 //我的 预约
42 static appointmentListPage = new WDRouterPage("wdComponent", "ets/components/page/AppointmentListPage"); 49 static appointmentListPage = new WDRouterPage("wdComponent", "ets/components/page/AppointmentListPage");
@@ -63,9 +70,17 @@ export class WDRouterPage { @@ -63,9 +70,17 @@ export class WDRouterPage {
63 static settingPage = new WDRouterPage("wdComponent", "ets/components/page/SettingPage"); 70 static settingPage = new WDRouterPage("wdComponent", "ets/components/page/SettingPage");
64 // 设置密码页、设置手机号页等等 (需要传参) 71 // 设置密码页、设置手机号页等等 (需要传参)
65 static settingPasswordPage = new WDRouterPage("wdLogin", "ets/pages/login/SettingPasswordPage"); 72 static settingPasswordPage = new WDRouterPage("wdLogin", "ets/pages/login/SettingPasswordPage");
66 -  
67 //其他普通用户 主页 73 //其他普通用户 主页
68 static otherNormalUserHomePagePage = new WDRouterPage("wdComponent", "ets/pages/OtherNormalUserHomePage"); 74 static otherNormalUserHomePagePage = new WDRouterPage("wdComponent", "ets/pages/OtherNormalUserHomePage");
  75 + static guidePage = new WDRouterPage("wdLogin", "ets/pages/guide/GuidePages");
  76 +
  77 + //隐私政策页面
  78 + static privacyPage = new WDRouterPage("phone", "ets/pages/launchPage/PrivacyPage");
  79 + //启动广告页面
  80 + static launchAdvertisingPage = new WDRouterPage("phone", "ets/pages/launchPage/LaunchAdvertisingPage");
  81 + //主页
  82 + static mainPage = new WDRouterPage("phone", "ets/pages/MainPage");
  83 +
69 84
70 // static loginProtocolPage = new WDRouterPage("wdLogin", "ets/pages/login/LoginProtocolWebview"); 85 // static loginProtocolPage = new WDRouterPage("wdLogin", "ets/pages/login/LoginProtocolWebview");
71 } 86 }
@@ -18,6 +18,7 @@ export class WDRouterRule { @@ -18,6 +18,7 @@ export class WDRouterRule {
18 if (page) { 18 if (page) {
19 if (params) { 19 if (params) {
20 // router.pushUrl({ url: 'pages/routerpage2', , params: params }) 20 // router.pushUrl({ url: 'pages/routerpage2', , params: params })
  21 + console.log('page.url()==',page.url())
21 router.pushUrl({ url: page.url(), params: params }) 22 router.pushUrl({ url: page.url(), params: params })
22 } else { 23 } else {
23 router.pushUrl({ url: page.url() }).catch((error:Error)=>{ 24 router.pushUrl({ url: page.url() }).catch((error:Error)=>{
@@ -28,4 +29,21 @@ export class WDRouterRule { @@ -28,4 +29,21 @@ export class WDRouterRule {
28 ToastUtils.showToast("功能开发中", 1000); 29 ToastUtils.showToast("功能开发中", 1000);
29 } 30 }
30 } 31 }
  32 +
  33 + static jumpWithReplacePage(page?: WDRouterPage, params?: object) {
  34 + if (page) {
  35 + if (params) {
  36 + // router.pushUrl({ url: 'pages/routerpage2', , params: params })
  37 + router.replaceUrl({ url: page.url(), params: params })
  38 + } else {
  39 + router.replaceUrl({ url: page.url() }).catch((error:Error)=>{
  40 + console.log("err",JSON.stringify(error))//100002 uri is not exist
  41 + })
  42 + }
  43 + } else {
  44 + ToastUtils.showToast("功能开发中", 1000);
  45 + }
  46 + }
  47 +
  48 +
31 } 49 }
@@ -28,5 +28,5 @@ export interface CompDTO { @@ -28,5 +28,5 @@ export interface CompDTO {
28 sortValue: number; 28 sortValue: number;
29 subType: string; 29 subType: string;
30 imageScale: number; // 封面图比例 1-4:3, 2-16:9, 3-3:2 30 imageScale: number; // 封面图比例 1-4:3, 2-16:9, 3-3:2
31 - audioDataList:AudioDTO[] 31 + audioDataList: AudioDTO[]
32 } 32 }
@@ -3,7 +3,7 @@ import { LiveInfoDTO } from '../detail/LiveInfoDTO'; @@ -3,7 +3,7 @@ import { LiveInfoDTO } from '../detail/LiveInfoDTO';
3 import { VideoInfoDTO } from '../detail/VideoInfoDTO'; 3 import { VideoInfoDTO } from '../detail/VideoInfoDTO';
4 import { InteractDataDTO } from './InteractDataDTO'; 4 import { InteractDataDTO } from './InteractDataDTO';
5 import { slideShows } from '../morningevening/slideShows' 5 import { slideShows } from '../morningevening/slideShows'
6 - 6 +import { VoiceInfoDTO } from '../detail/VoiceInfoDTO'
7 7
8 export interface ContentDTO { 8 export interface ContentDTO {
9 cityCode: string; 9 cityCode: string;
@@ -62,5 +62,6 @@ export interface ContentDTO { @@ -62,5 +62,6 @@ export interface ContentDTO {
62 interactData:InteractDataDTO; 62 interactData:InteractDataDTO;
63 63
64 hasMore: number, 64 hasMore: number,
65 - slideShows: slideShows[] 65 + slideShows: slideShows[],
  66 + voiceInfo: VoiceInfoDTO
66 } 67 }
@@ -16,6 +16,7 @@ export interface Params { @@ -16,6 +16,7 @@ export interface Params {
16 // 6.挂件详情页 16 // 6.挂件详情页
17 // 7.沉浸式竖屏详情页 17 // 7.沉浸式竖屏详情页
18 // 8.专辑竖屏详情页 18 // 8.专辑竖屏详情页
19 - // 9.多图(图集)详情页 19 + // 13.音频详情页
  20 + // 17.多图(图集)详情页
20 detailPageType?:number; // 详情页类型 21 detailPageType?:number; // 详情页类型
21 } 22 }
@@ -16,5 +16,5 @@ export interface PhotoListBean { @@ -16,5 +16,5 @@ export interface PhotoListBean {
16 height: number; 16 height: number;
17 width: number; 17 width: number;
18 picPath: string; 18 picPath: string;
19 - picDesc: number; 19 + picDesc: string;
20 } 20 }
  1 +export interface VoiceInfoDTO {
  2 + defaultMultiple?: string;
  3 + openMultipleAdjustment?: number;
  4 + type?: number;
  5 + voiceDuration: number;
  6 + voiceUrl?: string;
  7 +}
@@ -2,15 +2,15 @@ import { FullColumnImgUrlDTO } from '../detail/FullColumnImgUrlDTO'; @@ -2,15 +2,15 @@ import { FullColumnImgUrlDTO } from '../detail/FullColumnImgUrlDTO';
2 export interface slideShows { 2 export interface slideShows {
3 fullColumnImgUrls: FullColumnImgUrlDTO[]; 3 fullColumnImgUrls: FullColumnImgUrlDTO[];
4 linkUrl?: string; 4 linkUrl?: string;
5 - newsId?: string; 5 + newsId: string;
6 newsTitle?: string; 6 newsTitle?: string;
7 newsTitleColor?: string; 7 newsTitleColor?: string;
8 objectLevel?: string; 8 objectLevel?: string;
9 - objectType?: string; 9 + objectType: string;
10 pageId?: string; 10 pageId?: string;
11 photoNum?: string; 11 photoNum?: string;
12 publishTime: number; 12 publishTime: number;
13 - relId?: string; 13 + relId: string;
14 source?: string; 14 source?: string;
15 timeBlurred?: string; 15 timeBlurred?: string;
16 videoDuration?: string; 16 videoDuration?: string;
@@ -8,12 +8,12 @@ @@ -8,12 +8,12 @@
8 "version": "1.0.0", 8 "version": "1.0.0",
9 "dependencies": { 9 "dependencies": {
10 "wdConstant": "file:../../commons/wdConstant", 10 "wdConstant": "file:../../commons/wdConstant",
  11 + "wdPlayer": "file:../../features/wdPlayer",
  12 + "wdLogin": "file:../../features/wdLogin",
11 "wdKit": "file:../../commons/wdKit", 13 "wdKit": "file:../../commons/wdKit",
12 "wdWebComponent": "file:../../commons/wdWebComponent", 14 "wdWebComponent": "file:../../commons/wdWebComponent",
13 "wdBean": "file:../../features/wdBean", 15 "wdBean": "file:../../features/wdBean",
14 "wdRouter": "file:../../commons/wdRouter", 16 "wdRouter": "file:../../commons/wdRouter",
15 - "wdNetwork": "file:../../commons/wdNetwork",  
16 - "wdPlayer": "file:../../features/wdPlayer",  
17 - "wdLogin": "file:../../features/wdLogin" 17 + "wdNetwork": "file:../../commons/wdNetwork"
18 } 18 }
19 } 19 }
@@ -7,7 +7,8 @@ import { MorningEveningViewModel } from '../../viewmodel/MorningEveningViewModel @@ -7,7 +7,8 @@ import { MorningEveningViewModel } from '../../viewmodel/MorningEveningViewModel
7 import { PaperTitleComponent } from './PaperTitleComponent'; 7 import { PaperTitleComponent } from './PaperTitleComponent';
8 import { SingleColumn999Component } from './SingleColumn999Component'; 8 import { SingleColumn999Component } from './SingleColumn999Component';
9 import { topicInfoView } from './topicInfoView'; 9 import { topicInfoView } from './topicInfoView';
10 -import { WDPlayerController } from 'wdPlayer'; 10 +import { DateFormatUtil, PlayerConstants, WDPlayerController } from 'wdPlayer';
  11 +import { AudioDataList } from 'wdBean/src/main/ets/bean/morningevening/AudioDataList';
11 12
12 const TAG = 'MorningEveningPaperComponent'; 13 const TAG = 'MorningEveningPaperComponent';
13 14
@@ -39,17 +40,57 @@ export struct MorningEveningPaperComponent { @@ -39,17 +40,57 @@ export struct MorningEveningPaperComponent {
39 // } as MorningEveningPaperDTO 40 // } as MorningEveningPaperDTO
40 @Provide title: string = '' 41 @Provide title: string = ''
41 @Provide subTitle: string = '' 42 @Provide subTitle: string = ''
  43 + @Provide audioTitle: string = ''
42 @Provide isAudioPlaying: boolean = false 44 @Provide isAudioPlaying: boolean = false
  45 + @Provide status: number = PlayerConstants.STATUS_START;
  46 + @Provide currentTime: string = "00:00";
  47 + @Provide totalTime: string = "00:00";
  48 + @Provide progressVal: number = 0;
  49 + private audioDataList: AudioDataList[] = []
43 private playerController: WDPlayerController = new WDPlayerController(); 50 private playerController: WDPlayerController = new WDPlayerController();
44 - private xComponentController: XComponentController = new XComponentController();  
45 simpleAudioDialog: CustomDialogController = new CustomDialogController({ 51 simpleAudioDialog: CustomDialogController = new CustomDialogController({
46 - builder: PaperReaderSimpleDialog(), 52 + builder: PaperReaderSimpleDialog({
  53 + cancel: this.onCancel,
  54 + confirm: this.onConfirm,
  55 + playerController: this.playerController
  56 + }),
47 autoCancel: false, 57 autoCancel: false,
48 customStyle: true, 58 customStyle: true,
49 alignment: DialogAlignment.CenterStart, 59 alignment: DialogAlignment.CenterStart,
50 - offset: { dx: 12, dy: -150 } 60 + offset: { dx: 12, dy: -150 },
  61 +
51 }) 62 })
52 63
  64 + onCancel() {
  65 + Logger.info(TAG, "cj2024 onCancel = ")
  66 + }
  67 +
  68 + /**
  69 + * 回调无用
  70 + **/
  71 + onConfirm() {
  72 + Logger.info(TAG, "cj2024 onConfirm = ")
  73 + // if (this.playerController != undefined) {
  74 + //
  75 + // }
  76 + // this.status = PlayerConstants.STATUS_PAUSE;
  77 + // this.playerController?.pause()
  78 + }
  79 +
  80 + // 续播判断
  81 + changeContinue() {
  82 + Logger.info(TAG, "cj2024 changeContinue = 1")
  83 + // if (this.nextContId) {
  84 + this.playerController.continue = () => {
  85 + Logger.info(TAG, "cj2024 changeContinue = 2")
  86 + this.playerController?.stop();
  87 + // this.playVM.playWithContentId(this.nextContId ?? '');
  88 + }
  89 + return;
  90 + // }
  91 + this.playerController.continue = undefined;
  92 + }
  93 +
53 async aboutToAppear() { 94 async aboutToAppear() {
54 console.info(TAG, `aboutToAppear`) 95 console.info(TAG, `aboutToAppear`)
55 96
@@ -74,16 +115,26 @@ export struct MorningEveningPaperComponent { @@ -74,16 +115,26 @@ export struct MorningEveningPaperComponent {
74 this.compListItem = compInfoBean?.compList[0] 115 this.compListItem = compInfoBean?.compList[0]
75 if (compInfoBean?.compList[0].audioDataList) { 116 if (compInfoBean?.compList[0].audioDataList) {
76 this.audioPlayUrl = compInfoBean?.compList[0].audioDataList[0].audioUrl 117 this.audioPlayUrl = compInfoBean?.compList[0].audioDataList[0].audioUrl
  118 + this.audioTitle = compInfoBean?.compList[0].audioDataList[0].title
77 } 119 }
78 } 120 }
79 121
80 Logger.info(TAG, "compInfoBean compStyle = " + compInfoBean.compList[0].compStyle) 122 Logger.info(TAG, "compInfoBean compStyle = " + compInfoBean.compList[0].compStyle)
81 - 123 + this.playerController.onTimeUpdate = (position, duration) => {
  124 + this.currentTime = DateFormatUtil.secondToTime(position);
  125 + this.totalTime = DateFormatUtil.secondToTime(duration);
  126 + this.progressVal = Math.floor(position * 100 / duration);
  127 + }
82 } catch (exception) { 128 } catch (exception) {
83 129
84 } 130 }
85 } 131 }
86 132
  133 + onPageHide() {
  134 + this.status = PlayerConstants.STATUS_PAUSE;
  135 + this.playerController?.pause();
  136 + }
  137 +
87 build() { 138 build() {
88 Stack({ alignContent: Alignment.Top }) { 139 Stack({ alignContent: Alignment.Top }) {
89 List() { 140 List() {
1 import { PhotoListBean } from 'wdBean'; 1 import { PhotoListBean } from 'wdBean';
  2 +import { Logger } from 'wdKit';
  3 +
  4 +const TAG = 'MultiPictureDetailPageComponent';
2 5
3 @Component 6 @Component
4 export struct MultiPictureDetailItemComponent { 7 export struct MultiPictureDetailItemComponent {
  8 + private photoListLength: number = 1;
  9 + private index: number = 1;
5 private newsTitle: string = ''; 10 private newsTitle: string = '';
6 private MultiPictureDetailItem: PhotoListBean = {} as PhotoListBean 11 private MultiPictureDetailItem: PhotoListBean = {} as PhotoListBean
7 12
  13 +
  14 + async aboutToAppear() {
  15 + Logger.info(TAG, 'pictures preview')
  16 + }
  17 +
8 build() { 18 build() {
9 - Stack() { 19 + Stack({ alignContent: Alignment.BottomStart }) {
  20 + Row() {
10 Image(this.MultiPictureDetailItem.picPath) 21 Image(this.MultiPictureDetailItem.picPath)
  22 + .alt($r('app.media.picture_loading'))
11 .width('100%') 23 .width('100%')
12 .aspectRatio(this.MultiPictureDetailItem.width / this.MultiPictureDetailItem.height) 24 .aspectRatio(this.MultiPictureDetailItem.width / this.MultiPictureDetailItem.height)
13 .objectFit(ImageFit.Fill) 25 .objectFit(ImageFit.Fill)
14 } 26 }
  27 + .height('100%')
  28 + .width('100%')
  29 +
  30 +
  31 + Row() {
  32 + Flex({
  33 + direction: FlexDirection.Column,
  34 + justifyContent: FlexAlign.Start
  35 + }) {
  36 + Text() {
  37 + Span(`${this.index + 1}`).fontSize(24).fontFamily('PingFang SC-Medium').fontWeight(500).lineHeight(28)
  38 + Span(`/${this.photoListLength}`).fontSize(14).fontFamily('PingFang SC-Medium').fontWeight(500).lineHeight(19)
  39 + }.fontColor(Color.White).margin(4)
  40 +
  41 + Text(`${this.newsTitle}`).fontColor(Color.White).fontSize(16).fontFamily('PingFang SC-Semibold')
  42 + .fontWeight(600).lineHeight(24)
  43 + .margin ({
  44 + top: 4,
  45 + left: 0,
  46 + bottom: 4,
  47 + right: 0
  48 + })
  49 + Text(`${this.MultiPictureDetailItem.picDesc}`).fontColor(Color.White)
  50 + .fontSize(14).fontFamily('PingFang SC-Regular').fontWeight(400).lineHeight(22)
  51 + .textOverflow({ overflow: TextOverflow.Ellipsis })
  52 + .margin ({
  53 + top: 4,
  54 + left: 0,
  55 + bottom: 4,
  56 + right: 18
  57 + })
  58 + }
  59 + }
  60 + .width('100%')
  61 + .height(178)
  62 + .margin ({
  63 + top: 8,
  64 + left: 18,
  65 + bottom: 8,
  66 + right: 18
  67 + })
  68 +
  69 + }
15 .backgroundColor(Color.Black) 70 .backgroundColor(Color.Black)
16 .width('100%') 71 .width('100%')
17 } 72 }
@@ -8,16 +8,15 @@ import { MultiPictureDetailItemComponent } from './MultiPictureDetailItemCompone @@ -8,16 +8,15 @@ import { MultiPictureDetailItemComponent } from './MultiPictureDetailItemCompone
8 8
9 const TAG = 'MultiPictureDetailPageComponent'; 9 const TAG = 'MultiPictureDetailPageComponent';
10 10
11 -@Preview  
12 @Component 11 @Component
13 export struct MultiPictureDetailPageComponent { 12 export struct MultiPictureDetailPageComponent {
  13 + private relId: string = ''
  14 + private contentId: string = ''
  15 + private relType: string = ''
14 private displayTool = display.getDefaultDisplaySync() 16 private displayTool = display.getDefaultDisplaySync()
15 private screenWidth: number = 0 17 private screenWidth: number = 0
16 private picWidth: number = 0 18 private picWidth: number = 0
17 @State picHeight: number = 0 19 @State picHeight: number = 0
18 - @State relId: string = '500005189942'  
19 - @State contentId: string = '30043715146'  
20 - @State relType: string = '1'  
21 @State contentDetailData: ContentDetailDTO[] = [] as ContentDetailDTO[] 20 @State contentDetailData: ContentDetailDTO[] = [] as ContentDetailDTO[]
22 @Provide @Watch('onCurrentPageNumUpdated') currentPageNum: string = '01' 21 @Provide @Watch('onCurrentPageNumUpdated') currentPageNum: string = '01'
23 private swiperController: SwiperController = new SwiperController() 22 private swiperController: SwiperController = new SwiperController()
@@ -35,7 +34,8 @@ export struct MultiPictureDetailPageComponent { @@ -35,7 +34,8 @@ export struct MultiPictureDetailPageComponent {
35 async aboutToAppear() { 34 async aboutToAppear() {
36 //获取宽高尺寸 35 //获取宽高尺寸
37 this.screenWidth = this.displayTool.width 36 this.screenWidth = this.displayTool.width
38 - this.picWidth = this.screenWidth - vp2px(52) 37 + // this.picWidth = this.screenWidth - vp2px(52)
  38 + this.picWidth = this.screenWidth
39 this.picHeight = this.picWidth * 566 / 378 39 this.picHeight = this.picWidth * 566 / 378
40 //注册字体 40 //注册字体
41 font.registerFont({ 41 font.registerFont({
@@ -54,12 +54,12 @@ export struct MultiPictureDetailPageComponent { @@ -54,12 +54,12 @@ export struct MultiPictureDetailPageComponent {
54 if (this.contentDetailData && this.contentDetailData.length > 0 && this.contentDetailData[0].photoList && this.contentDetailData[0].photoList?.length > 0) { 54 if (this.contentDetailData && this.contentDetailData.length > 0 && this.contentDetailData[0].photoList && this.contentDetailData[0].photoList?.length > 0) {
55 Swiper(this.swiperController) { 55 Swiper(this.swiperController) {
56 ForEach(this.contentDetailData[0].photoList, (item: PhotoListBean, index: number) => { 56 ForEach(this.contentDetailData[0].photoList, (item: PhotoListBean, index: number) => {
57 - MultiPictureDetailItemComponent({ MultiPictureDetailItem: item }) 57 + MultiPictureDetailItemComponent({ photoListLength: this.contentDetailData[0].photoList?.length , index: index, newsTitle: this.contentDetailData[0].newsTitle, MultiPictureDetailItem: item })
58 }) 58 })
59 } 59 }
60 .index(this.swiperIndex) 60 .index(this.swiperIndex)
61 .width('100%') 61 .width('100%')
62 - .height(px2vp(this.picHeight) + 32) 62 + .height(px2vp(this.picHeight))
63 .vertical(false) 63 .vertical(false)
64 .autoPlay(false) 64 .autoPlay(false)
65 .cachedCount(3) 65 .cachedCount(3)
1 -import { Logger } from 'wdKit' 1 +import { Logger, UserDataLocal } from 'wdKit'
2 import { WDRouterPage, WDRouterRule } from 'wdRouter' 2 import { WDRouterPage, WDRouterRule } from 'wdRouter'
3 import MinePageDatasModel from '../../model/MinePageDatasModel' 3 import MinePageDatasModel from '../../model/MinePageDatasModel'
4 const TAG = "MinePageUserSimpleInfoUI" 4 const TAG = "MinePageUserSimpleInfoUI"
@@ -13,24 +13,12 @@ export default struct MinePageUserSimpleInfoUI { @@ -13,24 +13,12 @@ export default struct MinePageUserSimpleInfoUI {
13 @State levelId:number = 0 13 @State levelId:number = 0
14 14
15 15
16 - aboutToAppear(){  
17 - if(this.isLogin){  
18 - this.getUserInfo()  
19 - this.getUserLevel()  
20 - }  
21 - }  
22 -  
23 -  
24 - @Consume('isLogin')@Watch('loginChange') loginState:Record<string,string> 16 + @Consume('isLogin') @Watch('loginChange') loginState:Record<string,string>
25 loginChange(){ 17 loginChange(){
26 Logger.debug("isLogin",'MinePageUserSimpleInfoUI') 18 Logger.debug("isLogin",'MinePageUserSimpleInfoUI')
27 if(this.loginState){ 19 if(this.loginState){
28 this.isLogin=true 20 this.isLogin=true
29 } 21 }
30 - if(this.isLogin){  
31 - this.getUserInfo()  
32 - this.getUserLevel()  
33 - }  
34 } 22 }
35 loginStateChange(){ 23 loginStateChange(){
36 if(this.isLogin){ 24 if(this.isLogin){
@@ -42,20 +30,19 @@ export default struct MinePageUserSimpleInfoUI { @@ -42,20 +30,19 @@ export default struct MinePageUserSimpleInfoUI {
42 build(){ 30 build(){
43 Row(){ 31 Row(){
44 //头像 32 //头像
45 - Stack(){ 33 + Stack({alignContent: Alignment.Center}){
46 Image(this.headPhotoUrl) 34 Image(this.headPhotoUrl)
47 .alt($r('app.media.default_head')) 35 .alt($r('app.media.default_head'))
48 .width('108lpx') 36 .width('108lpx')
49 .height('108lpx') 37 .height('108lpx')
50 - .objectFit(ImageFit.Cover) 38 + .objectFit(ImageFit.Auto)
51 .borderRadius(50) 39 .borderRadius(50)
52 Image(this.levelHead) 40 Image(this.levelHead)
53 - .width('120lpx')  
54 - .height('120lpx')  
55 - .objectFit(ImageFit.Cover)  
56 - .borderRadius(50)  
57 - }.width('120lpx')  
58 - .height('120lpx') 41 + .width('130lpx')
  42 + .height('130lpx')
  43 + .objectFit(ImageFit.Auto)
  44 + }.width('130lpx')
  45 + .height('130lpx')
59 .alignContent(Alignment.Center) 46 .alignContent(Alignment.Center)
60 .onClick(()=>{ 47 .onClick(()=>{
61 this.jumpLogin() 48 this.jumpLogin()
@@ -156,6 +143,7 @@ export default struct MinePageUserSimpleInfoUI { @@ -156,6 +143,7 @@ export default struct MinePageUserSimpleInfoUI {
156 if(value!=null){ 143 if(value!=null){
157 this.userName = value.userName 144 this.userName = value.userName
158 this.headPhotoUrl = value.headPhotoUrl 145 this.headPhotoUrl = value.headPhotoUrl
  146 + UserDataLocal.setUserHeaderUrl(value.headPhotoUrl)
159 } 147 }
160 }).catch((err:Error)=>{ 148 }).catch((err:Error)=>{
161 console.log(TAG,JSON.stringify(err)) 149 console.log(TAG,JSON.stringify(err))
@@ -166,6 +154,8 @@ export default struct MinePageUserSimpleInfoUI { @@ -166,6 +154,8 @@ export default struct MinePageUserSimpleInfoUI {
166 if(value!=null){ 154 if(value!=null){
167 this.levelHead = value.levelHead 155 this.levelHead = value.levelHead
168 this.levelId = value.levelId 156 this.levelId = value.levelId
  157 + UserDataLocal.setUserLevel(value.levelId)
  158 + UserDataLocal.setUserLevelHeaderUrl(value.levelHead + "")
169 } 159 }
170 }).catch((err:Error)=>{ 160 }).catch((err:Error)=>{
171 console.log(TAG,JSON.stringify(err)) 161 console.log(TAG,JSON.stringify(err))
  1 +import MinePageDatasModel from '../../../model/MinePageDatasModel'
  2 +import { AppointmentOperationRequestItem } from '../../../viewmodel/AppointmentOperationRequestItem'
1 import { MineAppointmentItem } from '../../../viewmodel/MineAppointmentItem' 3 import { MineAppointmentItem } from '../../../viewmodel/MineAppointmentItem'
  4 +import { MyCustomDialog } from '../../reusable/MyCustomDialog'
2 5
3 @Component 6 @Component
4 export struct AppointmentListChildComponent{ 7 export struct AppointmentListChildComponent{
5 @ObjectLink item: MineAppointmentItem 8 @ObjectLink item: MineAppointmentItem
  9 + dialogController: CustomDialogController = new CustomDialogController({
  10 + builder: MyCustomDialog({
  11 + cancel: this.onCancel,
  12 + confirm: () => {
  13 + this.onAccept()
  14 + },
  15 + title: "提示",
  16 + tipValue: '是否确认取消预约'
  17 + }),
  18 + autoCancel: true,
  19 + alignment: DialogAlignment.Center,
  20 + offset: { dx: 0, dy: -20 },
  21 + gridCount: 4,
  22 + customStyle: false
  23 + })
  24 +
6 25
7 build() { 26 build() {
8 Column(){ 27 Column(){
@@ -102,8 +121,7 @@ export struct AppointmentListChildComponent{ @@ -102,8 +121,7 @@ export struct AppointmentListChildComponent{
102 .height('46lpx') 121 .height('46lpx')
103 .borderRadius('6lpx') 122 .borderRadius('6lpx')
104 .onClick(()=>{ 123 .onClick(()=>{
105 - this.item.isAppointment = !this.item.isAppointment  
106 - //TODO 预约动作 124 + this.dialogController.open()
107 }) 125 })
108 }else { 126 }else {
109 Text(this.item.relType === 2?"去观看":"看回放") 127 Text(this.item.relType === 2?"去观看":"看回放")
@@ -124,4 +142,25 @@ export struct AppointmentListChildComponent{ @@ -124,4 +142,25 @@ export struct AppointmentListChildComponent{
124 .backgroundColor($r('app.color.white')) 142 .backgroundColor($r('app.color.white'))
125 .borderRadius('8lpx') 143 .borderRadius('8lpx')
126 } 144 }
  145 +
  146 + onCancel() {
  147 + console.info('Callback when the first button is clicked')
  148 + }
  149 +
  150 + onAccept(){
  151 + console.info('Callback when the second button is clicked')
  152 + this.appointmentOperation()
  153 + }
  154 +
  155 + appointmentOperation(){
  156 + let item = new AppointmentOperationRequestItem(this.item.relId,this.item.liveId+"",!this.item.isAppointment)
  157 + MinePageDatasModel.getAppointmentOperation(item,getContext(this)).then((value)=>{
  158 + if(value!=null){
  159 + if (value.code === 0 || value.code.toString() === "0") {
  160 + this.item.isAppointment = !this.item.isAppointment
  161 + }
  162 + }
  163 + })
  164 + }
  165 +
127 } 166 }
@@ -71,9 +71,9 @@ export struct AppointmentListUI{ @@ -71,9 +71,9 @@ export struct AppointmentListUI{
71 value.list.forEach((value)=>{ 71 value.list.forEach((value)=>{
72 let dealTime = this.DealStartTime(value.planStartTime) 72 let dealTime = this.DealStartTime(value.planStartTime)
73 if(dealTime!=null && dealTime.length === 2){ 73 if(dealTime!=null && dealTime.length === 2){
74 - this.data.push(new MineAppointmentItem(value.imageUrl,value.status,value.title,true,dealTime[0],dealTime[1],value.relType)) 74 + this.data.push(new MineAppointmentItem(value.imageUrl,value.status,value.title,true,dealTime[0],dealTime[1],value.relType,value.liveId,value.relId))
75 }else { 75 }else {
76 - this.data.push(new MineAppointmentItem(value.imageUrl,value.status,value.title,true,"","",value.relType)) 76 + this.data.push(new MineAppointmentItem(value.imageUrl,value.status,value.title,true,"","",value.relType,value.liveId,value.relId))
77 } 77 }
78 }) 78 })
79 this.data.notifyDataReload() 79 this.data.notifyDataReload()
@@ -13,10 +13,6 @@ export struct FollowFirstTabsComponent{ @@ -13,10 +13,6 @@ export struct FollowFirstTabsComponent{
13 selectedFontColor: string = '#000000' 13 selectedFontColor: string = '#000000'
14 14
15 aboutToAppear(){ 15 aboutToAppear(){
16 - // 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[]>  
17 - // res.data.forEach(element => {  
18 - // this.data.push(element)  
19 - // });  
20 MinePageDatasModel.getFollowListData(getContext(this)).then((value)=>{ 16 MinePageDatasModel.getFollowListData(getContext(this)).then((value)=>{
21 this.data.push(new FollowListItem("我的")) 17 this.data.push(new FollowListItem("我的"))
22 value.forEach((element)=>{ 18 value.forEach((element)=>{
1 import { Params } from 'wdBean'; 1 import { Params } from 'wdBean';
2 import { LazyDataSource, StringUtils } from 'wdKit'; 2 import { LazyDataSource, StringUtils } from 'wdKit';
  3 +import { HttpUrlUtils } from 'wdNetwork';
3 import { WDRouterPage, WDRouterRule } from 'wdRouter'; 4 import { WDRouterPage, WDRouterRule } from 'wdRouter';
4 import MinePageDatasModel from '../../../model/MinePageDatasModel'; 5 import MinePageDatasModel from '../../../model/MinePageDatasModel';
5 import { FollowListDetailItem } from '../../../viewmodel/FollowListDetailItem' 6 import { FollowListDetailItem } from '../../../viewmodel/FollowListDetailItem'
6 import { FollowListDetailRequestItem } from '../../../viewmodel/FollowListDetailRequestItem'; 7 import { FollowListDetailRequestItem } from '../../../viewmodel/FollowListDetailRequestItem';
7 import { FollowListStatusRequestItem } from '../../../viewmodel/FollowListStatusRequestItem'; 8 import { FollowListStatusRequestItem } from '../../../viewmodel/FollowListStatusRequestItem';
  9 +import { FollowOperationRequestItem } from '../../../viewmodel/FollowOperationRequestItem';
8 import { MineFollowListDetailItem } from '../../../viewmodel/MineFollowListDetailItem'; 10 import { MineFollowListDetailItem } from '../../../viewmodel/MineFollowListDetailItem';
9 import { QueryListIsFollowedItem } from '../../../viewmodel/QueryListIsFollowedItem'; 11 import { QueryListIsFollowedItem } from '../../../viewmodel/QueryListIsFollowedItem';
10 import { ListHasNoMoreDataUI } from '../../reusable/ListHasNoMoreDataUI'; 12 import { ListHasNoMoreDataUI } from '../../reusable/ListHasNoMoreDataUI';
@@ -67,14 +69,14 @@ export struct FollowListDetailUI{ @@ -67,14 +69,14 @@ export struct FollowListDetailUI{
67 //我的关注列表 69 //我的关注列表
68 if (this.creatorDirectoryId === -1){ 70 if (this.creatorDirectoryId === -1){
69 if(this.hasMore){ 71 if(this.hasMore){
70 - let object = new FollowListDetailRequestItem(20,this.curPageNum) 72 + let object = new FollowListDetailRequestItem(-1,20,this.curPageNum)
71 73
72 MinePageDatasModel.getMineFollowListData(object,getContext(this)).then((value)=>{ 74 MinePageDatasModel.getMineFollowListData(object,getContext(this)).then((value)=>{
73 if (!this.data || value.list.length == 0){ 75 if (!this.data || value.list.length == 0){
74 this.hasMore = false 76 this.hasMore = false
75 }else{ 77 }else{
76 value.list.forEach((value)=>{ 78 value.list.forEach((value)=>{
77 - this.data.push(new FollowListDetailItem(value.attentionHeadPhotoUrl,value.attentionUserName,value.fansNum,value.introduction,value.attentionCreatorId,"1",value.attentionUserId)) 79 + this.data.push(new FollowListDetailItem(value.attentionHeadPhotoUrl,value.attentionUserName,value.fansNum,value.introduction,value.attentionCreatorId,"1",value.attentionUserId,value.attentionUserType,value.attentionUserId))
78 }) 80 })
79 this.data.notifyDataReload() 81 this.data.notifyDataReload()
80 this.count = this.data.totalCount() 82 this.count = this.data.totalCount()
@@ -114,7 +116,7 @@ export struct FollowListDetailUI{ @@ -114,7 +116,7 @@ export struct FollowListDetailUI{
114 let data : FollowListDetailItem[] = [] 116 let data : FollowListDetailItem[] = []
115 value.list.forEach((item)=>{ 117 value.list.forEach((item)=>{
116 status.creatorIds.push(new QueryListIsFollowedItem(item.creatorId)) 118 status.creatorIds.push(new QueryListIsFollowedItem(item.creatorId))
117 - data.push(new FollowListDetailItem(item.headPhotoUrl,item.cnUserName,item.cnFansNum,item.introduction,item.creatorId,"0",item.attentionUserId)) 119 + data.push(new FollowListDetailItem(item.headPhotoUrl,item.cnUserName,item.cnFansNum,item.introduction,item.creatorId,"0",item.attentionUserId,item.cnUserType,item.cnUserId))
118 }) 120 })
119 121
120 MinePageDatasModel.getFollowListStatusData(status,getContext(this)).then((newValue)=>{ 122 MinePageDatasModel.getFollowListStatusData(status,getContext(this)).then((newValue)=>{
@@ -127,7 +129,7 @@ export struct FollowListDetailUI{ @@ -127,7 +129,7 @@ export struct FollowListDetailUI{
127 }) 129 })
128 130
129 data.forEach((item)=>{ 131 data.forEach((item)=>{
130 - this.data.push(new FollowListDetailItem(item.headPhotoUrl,item.cnUserName,item.cnFansNum,item.introduction,item.creatorId,item.status,item.attentionUserId)) 132 + this.data.push(new FollowListDetailItem(item.headPhotoUrl,item.cnUserName,item.cnFansNum,item.introduction,item.creatorId,item.status,item.attentionUserId,item.cnUserType,item.cnUserId))
131 }) 133 })
132 134
133 this.data.notifyDataReload() 135 this.data.notifyDataReload()
@@ -197,7 +199,8 @@ struct ChildComponent { @@ -197,7 +199,8 @@ struct ChildComponent {
197 .height('46lpx') 199 .height('46lpx')
198 .margin({left:'4lpx',top:'23lpx'}) 200 .margin({left:'4lpx',top:'23lpx'})
199 .onClick(()=>{ 201 .onClick(()=>{
200 - this.data.status = "0" 202 + this.followOperation()
  203 + // this.data.status = "0"
201 }) 204 })
202 }else{ 205 }else{
203 Row(){ 206 Row(){
@@ -218,7 +221,8 @@ struct ChildComponent { @@ -218,7 +221,8 @@ struct ChildComponent {
218 .height('46lpx') 221 .height('46lpx')
219 .margin({left:'4lpx',top:'23lpx'}) 222 .margin({left:'4lpx',top:'23lpx'})
220 .onClick(()=>{ 223 .onClick(()=>{
221 - this.data.status = "1" 224 + this.followOperation()
  225 + // this.data.status = "1"
222 }) 226 })
223 } 227 }
224 }.alignItems(VerticalAlign.Top) 228 }.alignItems(VerticalAlign.Top)
@@ -233,10 +237,22 @@ struct ChildComponent { @@ -233,10 +237,22 @@ struct ChildComponent {
233 }.height('146lpx') 237 }.height('146lpx')
234 .justifyContent(FlexAlign.Center) 238 .justifyContent(FlexAlign.Center)
235 .onClick(()=>{ 239 .onClick(()=>{
236 - let params: Params = {  
237 - pageID: this.data.attentionUserId 240 + //跳转 人民号的 主页
  241 + // let params: Params = {
  242 + // pageID: this.data.attentionUserId
  243 + // }
  244 + // WDRouterRule.jumpWithPage(WDRouterPage.otherNormalUserHomePagePage,params)
  245 + })
  246 + }
  247 +
  248 + followOperation(){
  249 + let item = new FollowOperationRequestItem(this.data.cnUserType,this.data.cnUserId,this.data.creatorId,HttpUrlUtils.getUserType(),HttpUrlUtils.getUserId(),this.data.status==="0" ? 1:0)
  250 + MinePageDatasModel.getFollowOperation(item,getContext(this)).then((value)=>{
  251 + if(value!=null){
  252 + if (value.code === 0 || value.code.toString() === "0") {
  253 + this.data.status = this.data.status ==="0"?"1":"0"
  254 + }
238 } 255 }
239 - WDRouterRule.jumpWithPage(WDRouterPage.otherNormalUserHomePagePage,params)  
240 }) 256 })
241 } 257 }
242 } 258 }
1 import { Params } from 'wdBean'; 1 import { Params } from 'wdBean';
2 -import { LazyDataSource, StringUtils } from 'wdKit'; 2 +import { DateTimeUtils, LazyDataSource, StringUtils, UserDataLocal } from 'wdKit';
  3 +import { HttpUrlUtils } from 'wdNetwork';
3 import { WDRouterPage, WDRouterRule } from 'wdRouter'; 4 import { WDRouterPage, WDRouterRule } from 'wdRouter';
4 import MinePageDatasModel from '../../../model/MinePageDatasModel'; 5 import MinePageDatasModel from '../../../model/MinePageDatasModel';
5 import { CommentListItem } from '../../../viewmodel/CommentListItem'; 6 import { CommentListItem } from '../../../viewmodel/CommentListItem';
6 import { FollowListDetailItem } from '../../../viewmodel/FollowListDetailItem'; 7 import { FollowListDetailItem } from '../../../viewmodel/FollowListDetailItem';
7 import { FollowListDetailRequestItem } from '../../../viewmodel/FollowListDetailRequestItem'; 8 import { FollowListDetailRequestItem } from '../../../viewmodel/FollowListDetailRequestItem';
  9 +import { FollowOperationRequestItem } from '../../../viewmodel/FollowOperationRequestItem';
8 import { ListHasNoMoreDataUI } from '../../reusable/ListHasNoMoreDataUI'; 10 import { ListHasNoMoreDataUI } from '../../reusable/ListHasNoMoreDataUI';
9 11
10 const TAG = "HomePageBottomComponent" 12 const TAG = "HomePageBottomComponent"
@@ -32,8 +34,35 @@ export struct HomePageBottomComponent{ @@ -32,8 +34,35 @@ export struct HomePageBottomComponent{
32 .backgroundColor($r('app.color.color_EDEDED')) 34 .backgroundColor($r('app.color.color_EDEDED'))
33 35
34 if(this.count === 0){ 36 if(this.count === 0){
  37 + if(this.style === 1){
  38 + Row(){
  39 + Text("关注更多人民号")
  40 + .fontWeight('400lpx')
  41 + .fontColor($r('app.color.color_222222'))
  42 + .lineHeight('38lpx')
  43 + .fontSize('27lpx')
  44 + .textAlign(TextAlign.Center)
  45 + .margin({right:'4lpx'})
  46 + Image($r('app.media.arrow_icon_right'))
  47 + .objectFit(ImageFit.Auto)
  48 + .width('27lpx')
  49 + .height('27lpx')
  50 + }.height('69lpx')
  51 + .width('659lpx')
  52 + .alignItems(VerticalAlign.Center)
  53 + .justifyContent(FlexAlign.Center)
  54 + .backgroundColor($r('app.color.color_F5F5F5'))
  55 + .margin({top:'31lpx',bottom:'4lpx'})
  56 + .onClick(()=>{
  57 + let params: Params = {
  58 + pageID: "1"
  59 + }
  60 + WDRouterRule.jumpWithPage(WDRouterPage.followListPage,params)
  61 + })
  62 + }else{
35 ListHasNoMoreDataUI({style:2}) 63 ListHasNoMoreDataUI({style:2})
36 - .height('100%') 64 + .layoutWeight(1)
  65 + }
37 }else{ 66 }else{
38 if(this.style === 1){ 67 if(this.style === 1){
39 List({ space: 3 }) { 68 List({ space: 3 }) {
@@ -129,7 +158,8 @@ export struct HomePageBottomComponent{ @@ -129,7 +158,8 @@ export struct HomePageBottomComponent{
129 }) 158 })
130 } 159 }
131 } 160 }
132 - } 161 + }.height('100%')
  162 + .justifyContent(FlexAlign.Start)
133 .width('100%') 163 .width('100%')
134 } 164 }
135 165
@@ -147,14 +177,14 @@ export struct HomePageBottomComponent{ @@ -147,14 +177,14 @@ export struct HomePageBottomComponent{
147 //我的关注列表 177 //我的关注列表
148 if (this.style === 1){ 178 if (this.style === 1){
149 if(this.hasMore){ 179 if(this.hasMore){
150 - let object = new FollowListDetailRequestItem(20,this.curPageNum) 180 + let object = new FollowListDetailRequestItem(-1,20,this.curPageNum)
151 181
152 MinePageDatasModel.getMineFollowListData(object,getContext(this)).then((value)=>{ 182 MinePageDatasModel.getMineFollowListData(object,getContext(this)).then((value)=>{
153 if (!this.data_follow || value.list.length == 0){ 183 if (!this.data_follow || value.list.length == 0){
154 this.hasMore = false 184 this.hasMore = false
155 }else{ 185 }else{
156 value.list.forEach((value)=>{ 186 value.list.forEach((value)=>{
157 - this.data_follow.push(new FollowListDetailItem(value.attentionHeadPhotoUrl,value.attentionUserName,value.fansNum,value.introduction,value.attentionCreatorId,"1",value.attentionUserId)) 187 + this.data_follow.push(new FollowListDetailItem(value.attentionHeadPhotoUrl,value.attentionUserName,value.fansNum,value.introduction,value.attentionCreatorId,"1",value.attentionUserId,value.attentionUserType,value.attentionUserId))
158 }) 188 })
159 this.data_follow.notifyDataReload() 189 this.data_follow.notifyDataReload()
160 this.count = this.data_follow.totalCount() 190 this.count = this.data_follow.totalCount()
@@ -172,14 +202,15 @@ export struct HomePageBottomComponent{ @@ -172,14 +202,15 @@ export struct HomePageBottomComponent{
172 } 202 }
173 }else if(this.style === 0){ 203 }else if(this.style === 0){
174 if(this.hasMore){ 204 if(this.hasMore){
175 - let object = new FollowListDetailRequestItem(20,this.curPageNum) 205 + let time = encodeURI(DateTimeUtils.getCurDate(DateTimeUtils.PATTERN_DATE_TIME_HYPHEN))
  206 + let object = new FollowListDetailRequestItem(-1,20,this.curPageNum)
176 207
177 - MinePageDatasModel.getMineCommentListData(object,getContext(this)).then((value)=>{ 208 + MinePageDatasModel.getMineCommentListData(time,object,getContext(this)).then((value)=>{
178 if (!this.data_comment || value.list.length == 0){ 209 if (!this.data_comment || value.list.length == 0){
179 this.hasMore = false 210 this.hasMore = false
180 }else{ 211 }else{
181 value.list.forEach((value)=>{ 212 value.list.forEach((value)=>{
182 - this.data_comment.push(new CommentListItem(value.fromUserHeader,value.fromUserName,value.targetTitle,value.createTime,value.commentContent,value.likeNum,0,value.id)) 213 + this.data_comment.push(new CommentListItem(value.fromUserHeader,value.fromUserName,value.targetTitle,value.createTime,value.commentContent,value.likeNum,0,value.id,value.targetId,value.targetType))
183 }) 214 })
184 this.data_comment.notifyDataReload() 215 this.data_comment.notifyDataReload()
185 this.count = this.data_comment.totalCount() 216 this.count = this.data_comment.totalCount()
@@ -248,7 +279,8 @@ struct ChildFollowComponent { @@ -248,7 +279,8 @@ struct ChildFollowComponent {
248 .height('46lpx') 279 .height('46lpx')
249 .margin({left:'4lpx',top:'23lpx'}) 280 .margin({left:'4lpx',top:'23lpx'})
250 .onClick(()=>{ 281 .onClick(()=>{
251 - this.data.status = "0" 282 + // this.data.status = "0"
  283 + this.followOperation()
252 }) 284 })
253 }else{ 285 }else{
254 Row(){ 286 Row(){
@@ -269,7 +301,8 @@ struct ChildFollowComponent { @@ -269,7 +301,8 @@ struct ChildFollowComponent {
269 .height('46lpx') 301 .height('46lpx')
270 .margin({left:'4lpx',top:'23lpx'}) 302 .margin({left:'4lpx',top:'23lpx'})
271 .onClick(()=>{ 303 .onClick(()=>{
272 - this.data.status = "1" 304 + // this.data.status = "1"
  305 + this.followOperation()
273 }) 306 })
274 } 307 }
275 }.alignItems(VerticalAlign.Top) 308 }.alignItems(VerticalAlign.Top)
@@ -284,6 +317,18 @@ struct ChildFollowComponent { @@ -284,6 +317,18 @@ struct ChildFollowComponent {
284 }.height('146lpx') 317 }.height('146lpx')
285 .justifyContent(FlexAlign.Center) 318 .justifyContent(FlexAlign.Center)
286 } 319 }
  320 +
  321 + followOperation(){
  322 + let item = new FollowOperationRequestItem(this.data.cnUserType,this.data.cnUserId,this.data.creatorId,UserDataLocal.getUserType(),UserDataLocal.getUserId(),this.data.status==="0" ? 1:0)
  323 + MinePageDatasModel.getFollowOperation(item,getContext(this)).then((value)=>{
  324 + if(value!=null){
  325 + if (value.code === 0 || value.code.toString() === "0") {
  326 + this.data.status = this.data.status ==="0"?"1":"0"
  327 + }
  328 + }
  329 + })
  330 + }
  331 +
287 } 332 }
288 333
289 @Component 334 @Component
@@ -293,10 +338,20 @@ struct ChildCommentComponent { @@ -293,10 +338,20 @@ struct ChildCommentComponent {
293 build() { 338 build() {
294 Column(){ 339 Column(){
295 Row() { 340 Row() {
296 - Image(StringUtils.isEmpty(this.data.fromUserHeader)?$r('app.media.default_head'):this.data.fromUserHeader) 341 + Stack({alignContent: Alignment.Center}){
  342 + Image(this.data.fromUserHeader)
  343 + .alt($r('app.media.default_head'))
297 .objectFit(ImageFit.Auto) 344 .objectFit(ImageFit.Auto)
298 .width('69lpx') 345 .width('69lpx')
299 .height('69lpx') 346 .height('69lpx')
  347 + .borderRadius(50)
  348 + Image(UserDataLocal.getUserLevelHeaderUrl())
  349 + .width('89lpx')
  350 + .height('89lpx')
  351 + .objectFit(ImageFit.Cover)
  352 + .borderRadius(50)
  353 + }.width('89lpx')
  354 + .height('89lpx')
300 .margin({right:'15lpx'}) 355 .margin({right:'15lpx'})
301 356
302 Column(){ 357 Column(){
1 -import { DateTimeUtils, LazyDataSource } from 'wdKit'; 1 +import { DateTimeUtils, LazyDataSource, UserDataLocal } from 'wdKit';
2 import MinePageDatasModel from '../../../model/MinePageDatasModel'; 2 import MinePageDatasModel from '../../../model/MinePageDatasModel';
3 import { CommentListItem } from '../../../viewmodel/CommentListItem'; 3 import { CommentListItem } from '../../../viewmodel/CommentListItem';
4 import { OtherUserCommentListRequestItem } from '../../../viewmodel/OtherUserCommentListRequestItem'; 4 import { OtherUserCommentListRequestItem } from '../../../viewmodel/OtherUserCommentListRequestItem';
5 import { ListHasNoMoreDataUI } from '../../reusable/ListHasNoMoreDataUI'; 5 import { ListHasNoMoreDataUI } from '../../reusable/ListHasNoMoreDataUI';
6 import { MineCommentListDetailItem } from '../../../viewmodel/MineCommentListDetailItem'; 6 import { MineCommentListDetailItem } from '../../../viewmodel/MineCommentListDetailItem';
7 import { OtherUserCommentLikeStatusRequestItem } from '../../../viewmodel/OtherUserCommentLikeStatusRequestItem'; 7 import { OtherUserCommentLikeStatusRequestItem } from '../../../viewmodel/OtherUserCommentLikeStatusRequestItem';
  8 +import { CommentLikeOperationRequestItem } from '../../../viewmodel/CommentLikeOperationRequestItem';
8 9
9 const TAG = "HomePageBottomComponent" 10 const TAG = "HomePageBottomComponent"
10 @Component 11 @Component
@@ -16,6 +17,7 @@ export struct OtherHomePageBottomCommentComponent{ @@ -16,6 +17,7 @@ export struct OtherHomePageBottomCommentComponent{
16 curPageNum:number = 1; 17 curPageNum:number = 1;
17 @State count:number = 0; 18 @State count:number = 0;
18 @Prop levelHead:string 19 @Prop levelHead:string
  20 + @Link commentNum:number
19 21
20 aboutToAppear(){ 22 aboutToAppear(){
21 this.getNewPageData() 23 this.getNewPageData()
@@ -87,7 +89,7 @@ export struct OtherHomePageBottomCommentComponent{ @@ -87,7 +89,7 @@ export struct OtherHomePageBottomCommentComponent{
87 if (!this.data_comment || value.list.length == 0){ 89 if (!this.data_comment || value.list.length == 0){
88 this.hasMore = false 90 this.hasMore = false
89 }else{ 91 }else{
90 - this.getFollowListStatus(value) 92 + this.getCommentListStatus(value)
91 } 93 }
92 }).catch((err:Error)=>{ 94 }).catch((err:Error)=>{
93 console.log(TAG,"请求失败") 95 console.log(TAG,"请求失败")
@@ -96,13 +98,13 @@ export struct OtherHomePageBottomCommentComponent{ @@ -96,13 +98,13 @@ export struct OtherHomePageBottomCommentComponent{
96 } 98 }
97 } 99 }
98 100
99 - getFollowListStatus(value:MineCommentListDetailItem){ 101 + getCommentListStatus(value:MineCommentListDetailItem){
100 102
101 let status = new OtherUserCommentLikeStatusRequestItem() 103 let status = new OtherUserCommentLikeStatusRequestItem()
102 let data : CommentListItem[] = [] 104 let data : CommentListItem[] = []
103 value.list.forEach((item)=>{ 105 value.list.forEach((item)=>{
104 status.commentIdList.push(item.id) 106 status.commentIdList.push(item.id)
105 - data.push(new CommentListItem(item.fromUserHeader,item.fromUserName,item.targetTitle,item.createTime,item.commentContent,item.likeNum,0,item.id)) 107 + data.push(new CommentListItem(item.fromUserHeader,item.fromUserName,item.targetTitle,item.createTime,item.commentContent,item.likeNum,0,item.id,item.targetId,item.targetType))
106 }) 108 })
107 109
108 MinePageDatasModel.getOtherUserCommentLikeStatusData(status,getContext(this)).then((newValue)=>{ 110 MinePageDatasModel.getOtherUserCommentLikeStatusData(status,getContext(this)).then((newValue)=>{
@@ -115,12 +117,13 @@ export struct OtherHomePageBottomCommentComponent{ @@ -115,12 +117,13 @@ export struct OtherHomePageBottomCommentComponent{
115 }) 117 })
116 118
117 data.forEach((item)=>{ 119 data.forEach((item)=>{
118 - this.data_comment.push(new CommentListItem(item.fromUserHeader,item.fromUserName,item.targetTitle,item.createTime,item.commentContent,item.likeNum,item.like_status,item.id)) 120 + this.data_comment.push(new CommentListItem(item.fromUserHeader,item.fromUserName,item.targetTitle,item.createTime,item.commentContent,item.likeNum,item.like_status,item.id,item.targetId,item.targetType))
119 }) 121 })
120 122
121 this.data_comment.notifyDataReload() 123 this.data_comment.notifyDataReload()
122 124
123 this.count = this.data_comment.totalCount() 125 this.count = this.data_comment.totalCount()
  126 + this.commentNum = value.totalCount
124 if (this.data_comment.totalCount() < value.totalCount) { 127 if (this.data_comment.totalCount() < value.totalCount) {
125 this.curPageNum++ 128 this.curPageNum++
126 }else { 129 }else {
@@ -144,20 +147,21 @@ struct ChildCommentComponent { @@ -144,20 +147,21 @@ struct ChildCommentComponent {
144 build() { 147 build() {
145 Column(){ 148 Column(){
146 Row() { 149 Row() {
147 - Stack(){ 150 + Stack({alignContent: Alignment.Center}){
148 Image(this.data.fromUserHeader) 151 Image(this.data.fromUserHeader)
149 .alt($r('app.media.default_head')) 152 .alt($r('app.media.default_head'))
150 .objectFit(ImageFit.Auto) 153 .objectFit(ImageFit.Auto)
151 .width('69lpx') 154 .width('69lpx')
152 .height('69lpx') 155 .height('69lpx')
153 - .margin({right:'15lpx'})  
154 .borderRadius(50) 156 .borderRadius(50)
155 Image(this.levelHead) 157 Image(this.levelHead)
156 .width('89lpx') 158 .width('89lpx')
157 .height('89lpx') 159 .height('89lpx')
158 .objectFit(ImageFit.Cover) 160 .objectFit(ImageFit.Cover)
159 .borderRadius(50) 161 .borderRadius(50)
160 - } 162 + }.width('89lpx')
  163 + .height('89lpx')
  164 + .margin({right:'15lpx'})
161 165
162 Column(){ 166 Column(){
163 Text(this.data.fromUserName) 167 Text(this.data.fromUserName)
@@ -189,8 +193,9 @@ struct ChildCommentComponent { @@ -189,8 +193,9 @@ struct ChildCommentComponent {
189 .objectFit(ImageFit.Auto) 193 .objectFit(ImageFit.Auto)
190 .interpolation(ImageInterpolation.Medium) 194 .interpolation(ImageInterpolation.Medium)
191 .borderRadius(50) 195 .borderRadius(50)
192 - }  
193 - 196 + }.onClick(()=>{
  197 + this.commentLikeOperation()
  198 + })
194 } 199 }
195 .margin({bottom:'10lpx'}) 200 .margin({bottom:'10lpx'})
196 .width('100%') 201 .width('100%')
@@ -237,4 +242,16 @@ struct ChildCommentComponent { @@ -237,4 +242,16 @@ struct ChildCommentComponent {
237 } 242 }
238 .justifyContent(FlexAlign.Center) 243 .justifyContent(FlexAlign.Center)
239 } 244 }
  245 +
  246 + commentLikeOperation(){
  247 + let item = new CommentLikeOperationRequestItem(this.data.targetId,this.data.id+"",this.data.targetType+"",UserDataLocal.getUserName(),UserDataLocal.getUserHeaderUrl(),this.data.like_status===0?1:0)
  248 + MinePageDatasModel.getCommentLikeOperation(item,getContext(this)).then((value)=>{
  249 + if(value!=null){
  250 + if (value.code === 0 || value.code.toString() === "0") {
  251 + this.data.like_status = this.data.like_status===0?1:0
  252 + this.data.likeNum = this.data.like_status===0?this.data.likeNum-1:this.data.likeNum+1
  253 + }
  254 + }
  255 + })
  256 + }
240 } 257 }
@@ -3,7 +3,6 @@ import { LazyDataSource, StringUtils } from 'wdKit'; @@ -3,7 +3,6 @@ import { LazyDataSource, StringUtils } from 'wdKit';
3 import { WDRouterRule, WDRouterPage } from 'wdRouter'; 3 import { WDRouterRule, WDRouterPage } from 'wdRouter';
4 import MinePageDatasModel from '../../../model/MinePageDatasModel'; 4 import MinePageDatasModel from '../../../model/MinePageDatasModel';
5 import { FollowListDetailItem } from '../../../viewmodel/FollowListDetailItem'; 5 import { FollowListDetailItem } from '../../../viewmodel/FollowListDetailItem';
6 -import { FollowListDetailRequestItem } from '../../../viewmodel/FollowListDetailRequestItem';  
7 import { UserFollowListRequestItem } from '../../../viewmodel/UserFollowListRequestItem'; 6 import { UserFollowListRequestItem } from '../../../viewmodel/UserFollowListRequestItem';
8 import { ListHasNoMoreDataUI } from '../../reusable/ListHasNoMoreDataUI'; 7 import { ListHasNoMoreDataUI } from '../../reusable/ListHasNoMoreDataUI';
9 8
@@ -17,6 +16,7 @@ export struct OtherHomePageBottomFollowComponent{ @@ -17,6 +16,7 @@ export struct OtherHomePageBottomFollowComponent{
17 @State count:number = 0; 16 @State count:number = 0;
18 @Prop curUserId: string 17 @Prop curUserId: string
19 18
  19 +
20 aboutToAppear(){ 20 aboutToAppear(){
21 this.getNewPageData() 21 this.getNewPageData()
22 } 22 }
@@ -107,7 +107,7 @@ export struct OtherHomePageBottomFollowComponent{ @@ -107,7 +107,7 @@ export struct OtherHomePageBottomFollowComponent{
107 107
108 getNewPageData(){ 108 getNewPageData(){
109 this.isLoading = true 109 this.isLoading = true
110 - //我的关注列表 110 + //关注列表
111 if(this.hasMore){ 111 if(this.hasMore){
112 let object = new UserFollowListRequestItem(Number(this.curUserId),20,this.curPageNum,"1") 112 let object = new UserFollowListRequestItem(Number(this.curUserId),20,this.curPageNum,"1")
113 113
@@ -116,10 +116,11 @@ export struct OtherHomePageBottomFollowComponent{ @@ -116,10 +116,11 @@ export struct OtherHomePageBottomFollowComponent{
116 this.hasMore = false 116 this.hasMore = false
117 }else{ 117 }else{
118 value.list.forEach((value)=>{ 118 value.list.forEach((value)=>{
119 - this.data_follow.push(new FollowListDetailItem(value.attentionHeadPhotoUrl,value.attentionUserName,value.fansNum,value.introduction,value.attentionCreatorId,"1",value.attentionUserId)) 119 + this.data_follow.push(new FollowListDetailItem(value.attentionHeadPhotoUrl,value.attentionUserName,value.fansNum,value.introduction,value.attentionCreatorId,"1",value.attentionUserId,value.cnUserType,value.cnUserId))
120 }) 120 })
121 this.data_follow.notifyDataReload() 121 this.data_follow.notifyDataReload()
122 this.count = this.data_follow.totalCount() 122 this.count = this.data_follow.totalCount()
  123 +
123 if (this.data_follow.totalCount() < value.totalCount) { 124 if (this.data_follow.totalCount() < value.totalCount) {
124 this.curPageNum++ 125 this.curPageNum++
125 }else { 126 }else {
@@ -167,47 +168,6 @@ struct ChildFollowComponent { @@ -167,47 +168,6 @@ struct ChildFollowComponent {
167 .textOverflow({ overflow: TextOverflow.Ellipsis }) 168 .textOverflow({ overflow: TextOverflow.Ellipsis })
168 }.layoutWeight(1) 169 }.layoutWeight(1)
169 .alignItems(HorizontalAlign.Start) 170 .alignItems(HorizontalAlign.Start)
170 -  
171 - if(this.data.status == "1"){  
172 - Row(){  
173 - Text(`已关注`)  
174 - .fontColor($r('app.color.color_CCCCCC'))  
175 - .fontSize('23lpx')  
176 - .fontWeight('500lpx')  
177 - .lineHeight('35lpx')  
178 - }.backgroundColor($r('app.color.color_F5F5F5'))  
179 - .borderRadius('6lpx')  
180 - .borderColor($r('app.color.color_F5F5F5'))  
181 - .borderWidth('2lpx')  
182 - .justifyContent(FlexAlign.Center)  
183 - .width('100lpx')  
184 - .height('46lpx')  
185 - .margin({left:'4lpx',top:'23lpx'})  
186 - .onClick(()=>{  
187 - this.data.status = "0"  
188 - })  
189 - }else{  
190 - Row(){  
191 - Image($r('app.media.follow_icon'))  
192 - .margin({right:'4lpx'})  
193 - .width('23lpx')  
194 - .height('23lpx')  
195 - Text(`关注`)  
196 - .fontColor($r('app.color.color_ED2800'))  
197 - .fontSize('23lpx')  
198 - .fontWeight('500lpx')  
199 - .lineHeight('35lpx')  
200 - }.borderColor($r('app.color.color_1AED2800'))  
201 - .borderRadius('6lpx')  
202 - .borderWidth('2lpx')  
203 - .justifyContent(FlexAlign.Center)  
204 - .width('100lpx')  
205 - .height('46lpx')  
206 - .margin({left:'4lpx',top:'23lpx'})  
207 - .onClick(()=>{  
208 - this.data.status = "1"  
209 - })  
210 - }  
211 }.alignItems(VerticalAlign.Top) 171 }.alignItems(VerticalAlign.Top)
212 .width('100%') 172 .width('100%')
213 .layoutWeight(1) 173 .layoutWeight(1)
  1 +import { TopNavDTO } from 'wdBean';
  2 +
  3 +
  4 +const INDEX_SETTING_TITLE: string = '首页设置'
  5 +const INDEX_SETTING_SUBTITLE: string = '将指定频道设置为首页'
  6 +const MY_CHANNEL: string = '我的频道'
  7 +const EDIT_TEXT: string = '编辑'
  8 +const EDIT_DOWN: string = '完成'
  9 +const MORE_CHANNEL: string = '更多频道'
  10 +const LOCAL_CHANNEL: string = '地方频道'
  11 +
  12 +@CustomDialog
  13 +struct ChannelDialog {
  14 + @State indexSettingTabIndex: number = 1
  15 + @State isEditIng: boolean = false
  16 + @Link currentTopNavSelectedIndex : number
  17 + @Link myChannelList: Array<TopNavDTO>
  18 + @Link moreChannelList: Array<TopNavDTO>
  19 + @Link localChannelList: Array<TopNavDTO>
  20 + @Link indexSettingArray: Array<string>
  21 + @Link topNavList: Array<TopNavDTO>
  22 + myChannelItemEditHandle = (index: number): void => {
  23 + let item = this.myChannelList.splice(index, 1)[0]
  24 + console.info(`itemitemitem${JSON.stringify(item)}`)
  25 + if (item.moreChannel === '1') {
  26 + this.moreChannelList.unshift(item)
  27 + }
  28 + if (item.localChannel === '1') {
  29 + this.localChannelList.unshift(item)
  30 + }
  31 + }
  32 + controller?: CustomDialogController
  33 +
  34 + build() {
  35 + Column() {
  36 +
  37 + Flex({ justifyContent: FlexAlign.SpaceBetween, alignItems: ItemAlign.Center }) {
  38 + Image($r('app.media.icon_ren_min_ri_bao'))
  39 + .width(72)
  40 + .height(29)
  41 + Image($r('app.media.close_button'))
  42 + .width(24)
  43 + .onClick(() => {
  44 + this.controller?.close()
  45 + })
  46 + }
  47 + .width('100%')
  48 + .margin({ top: 30, bottom: 10 })
  49 +
  50 + List() {
  51 +
  52 + ListItem() {
  53 + Row() {
  54 + Text(INDEX_SETTING_TITLE)
  55 + .fontSize(16)
  56 + .fontWeight(600)
  57 + .margin({ right: 4 })
  58 +
  59 + Text(INDEX_SETTING_SUBTITLE)
  60 + .fontSize(12)
  61 + .fontWeight(400)
  62 + }
  63 + .width('100%')
  64 + .margin({ top: 22, bottom: 16 })
  65 +
  66 + }
  67 +
  68 + ListItem() {
  69 + Flex({ justifyContent: FlexAlign.SpaceBetween }) {
  70 + ForEach(this.indexSettingArray, (text: string, index: number) => {
  71 + Button(text, { type: ButtonType.Normal, stateEffect: false })
  72 + .width('48%')
  73 + .borderRadius(2)
  74 + .fontColor(index === this.indexSettingTabIndex ? '#ffffff' : '#ED2800')
  75 + .fontSize(16)
  76 + .fontWeight(400)
  77 + .backgroundColor(index === this.indexSettingTabIndex ? '#ED2800' : '#FDE9E5')
  78 + .onClick(() => {
  79 + this.indexSettingTabIndex = index
  80 + })
  81 + })
  82 + }
  83 + .height(36)
  84 + .margin({ bottom: 36 })
  85 + }
  86 +
  87 + ListItem() {
  88 + Row() {
  89 + Text(MY_CHANNEL)
  90 + .fontSize(16)
  91 + .fontWeight(600)
  92 + Text(this.isEditIng ? EDIT_DOWN : EDIT_TEXT)
  93 + .fontSize(14)
  94 + .fontColor('#ED2800')
  95 + .onClick(() => {
  96 + this.isEditIng = !this.isEditIng
  97 + })
  98 + }
  99 + .width('100%')
  100 + .justifyContent(FlexAlign.SpaceBetween)
  101 + .margin({ bottom: 12 })
  102 + }
  103 +
  104 + ListItem() {
  105 + GridRow({ columns: 4, gutter: 10 }) {
  106 + ForEach(this.myChannelList, (item: TopNavDTO, index: number) => {
  107 + GridCol() {
  108 + Row() {
  109 + Text(item.name)
  110 + .fontSize(14)
  111 + .fontColor( this.currentTopNavSelectedIndex === index ? '#ED2800' : (item.homeChannel === '1' ? '#999999' : '#222222'))
  112 +
  113 + if (this.isEditIng && item.myChannel !== '1') {
  114 + Image($r('app.media.icon_audio_close'))
  115 + .width(12)
  116 + .margin({ left: 1 })
  117 + }
  118 + }
  119 + .width('100%')
  120 + .height('100%')
  121 + .justifyContent(FlexAlign.Center)
  122 + .backgroundColor(item.homeChannel === '1' ? '#F5F5F5' : '')
  123 + .onClick(() => {
  124 + if (this.isEditIng) {
  125 + if(item.myChannel !== '1'){
  126 + this.myChannelItemEditHandle(index)
  127 + }
  128 + }else{
  129 + this.controller?.close()
  130 + }
  131 + })
  132 + }
  133 + .width(80)
  134 + .height(40)
  135 + .border({
  136 + width: item.homeChannel === '1' ? 0 : 1,
  137 + color: '#EDEDED',
  138 + radius: 3
  139 + })
  140 + }, (item: TopNavDTO) => JSON.stringify(item))
  141 + }
  142 + .width('100%')
  143 + .margin({ bottom: 24 })
  144 + }
  145 +
  146 + ListItem() {
  147 + Column() {
  148 + if (this.moreChannelList.length > 0) {
  149 + Text(MORE_CHANNEL)
  150 + .width('100%')
  151 + .fontSize(16)
  152 + .fontWeight(600)
  153 + .margin({ bottom: 12 })
  154 + .textAlign(TextAlign.Start)
  155 + }
  156 +
  157 + GridRow({ columns: 4, gutter: 10 }) {
  158 + ForEach(this.moreChannelList, (item: TopNavDTO, index: number) => {
  159 + GridCol() {
  160 + Row() {
  161 + Text(item.name)
  162 + .fontSize(14)
  163 +
  164 + Image($r('app.media.add_icon'))
  165 + .width(12)
  166 + .margin({ left: 1 })
  167 + }
  168 + .width('100%').height('100%')
  169 + .justifyContent(FlexAlign.Center)
  170 + .onClick(() => {
  171 + this.myChannelList.push(this.moreChannelList.splice(index, 1)[0])
  172 + })
  173 + }
  174 + .width(80)
  175 + .height(40)
  176 + .border({
  177 + width: 1,
  178 + color: '#EDEDED'
  179 + })
  180 + }, (item: TopNavDTO) => JSON.stringify(item))
  181 + }
  182 + .width('100%')
  183 + .margin({ bottom: 24 })
  184 +
  185 + }
  186 + .width('100%')
  187 + }
  188 +
  189 + ListItem() {
  190 + Column() {
  191 + if (this.localChannelList.length > 0) {
  192 + Text(LOCAL_CHANNEL)
  193 + .width('100%')
  194 + .fontSize(16)
  195 + .fontWeight(600)
  196 + .margin({ bottom: 12 })
  197 + .textAlign(TextAlign.Start)
  198 + }
  199 +
  200 + GridRow({ columns: 4, gutter: 10 }) {
  201 + ForEach(this.localChannelList, (item: TopNavDTO, index: number) => {
  202 + GridCol() {
  203 + Row() {
  204 + Text(item.name)
  205 + .fontSize(14)
  206 +
  207 + Image($r('app.media.add_icon'))
  208 + .width(12)
  209 + .margin({ left: 1 })
  210 + }
  211 + .width('100%').height('100%')
  212 + .justifyContent(FlexAlign.Center)
  213 + .onClick(() => {
  214 + this.myChannelList.push(this.localChannelList.splice(index, 1)[0])
  215 + })
  216 + }
  217 + .width(80)
  218 + .height(40)
  219 + .border({
  220 + width: 1,
  221 + color: '#EDEDED'
  222 + })
  223 + }, (item: TopNavDTO) => JSON.stringify(item))
  224 + }
  225 + .width('100%')
  226 + .margin({ bottom: 24 })
  227 + }
  228 + .width('100%')
  229 + }
  230 +
  231 + }.width('100%').height('100%')
  232 +
  233 + }
  234 + .padding(16)
  235 + .backgroundColor('#ffffff')
  236 + }
  237 +
  238 + onTopNavigationDataUpdated() {
  239 + }
  240 +}
  241 +
  242 +@Entry
  243 +@Component
  244 +struct ChannelSubscriptionLayout {
  245 + //当前选中的频道
  246 + @Prop currentTopNavSelectedIndex?: number;
  247 +
  248 + @State indexSettingArray: Array<string> = ['推荐', '热点']
  249 + @State myChannelList: Array<TopNavDTO> = [
  250 + // {
  251 + // channelId: 0,
  252 + // channelStyle: 1,
  253 + // channelType: 1,
  254 + // defaultPermitted: 1,
  255 + // delPermitted: 1,
  256 + // fontCColor: '#000000',
  257 + // fontColor: '#000000',
  258 + // headlinesOn: 0,
  259 + // homeChannel: '1',
  260 + // iconCUrl: '',
  261 + // iconCUrlSize: '',
  262 + // iconUrl: '',
  263 + // iconUrlSize: '',
  264 + // localChannel: '',
  265 + // moreChannel: '',
  266 + // movePermitted: 0,
  267 + // myChannel: '1',
  268 + // name: '推荐',
  269 + // num: 0,
  270 + // pageId: 21212,
  271 + // pageType: '',
  272 + // underlineCColor: ''
  273 + // },
  274 + // {
  275 + // channelId: 1,
  276 + // channelStyle: 1,
  277 + // channelType: 1,
  278 + // defaultPermitted: 1,
  279 + // delPermitted: 1,
  280 + // fontCColor: '#000000',
  281 + // fontColor: '#000000',
  282 + // headlinesOn: 0,
  283 + // homeChannel: '1',
  284 + // iconCUrl: '',
  285 + // iconCUrlSize: '',
  286 + // iconUrl: '',
  287 + // iconUrlSize: '',
  288 + // localChannel: '',
  289 + // moreChannel: '',
  290 + // movePermitted: 0,
  291 + // myChannel: '1',
  292 + // name: '热点',
  293 + // num: 0,
  294 + // pageId: 21212,
  295 + // pageType: '',
  296 + // underlineCColor: ''
  297 + // },
  298 + // {
  299 + // channelId: 2,
  300 + // channelStyle: 1,
  301 + // channelType: 1,
  302 + // defaultPermitted: 1,
  303 + // delPermitted: 1,
  304 + // fontCColor: '#000000',
  305 + // fontColor: '#000000',
  306 + // headlinesOn: 0,
  307 + // homeChannel: '',
  308 + // iconCUrl: '',
  309 + // iconCUrlSize: '',
  310 + // iconUrl: '',
  311 + // iconUrlSize: '',
  312 + // localChannel: '',
  313 + // moreChannel: '',
  314 + // movePermitted: 0,
  315 + // myChannel: '1',
  316 + // name: '视频',
  317 + // num: 0,
  318 + // pageId: 21212,
  319 + // pageType: '',
  320 + // underlineCColor: ''
  321 + // },
  322 + // {
  323 + // channelId: 3,
  324 + // channelStyle: 1,
  325 + // channelType: 1,
  326 + // defaultPermitted: 1,
  327 + // delPermitted: 1,
  328 + // fontCColor: '#000000',
  329 + // fontColor: '#000000',
  330 + // headlinesOn: 0,
  331 + // homeChannel: '',
  332 + // iconCUrl: '',
  333 + // iconCUrlSize: '',
  334 + // iconUrl: '',
  335 + // iconUrlSize: '',
  336 + // localChannel: '',
  337 + // moreChannel: '',
  338 + // movePermitted: 0,
  339 + // myChannel: '1',
  340 + // name: '云课堂',
  341 + // num: 0,
  342 + // pageId: 21212,
  343 + // pageType: '',
  344 + // underlineCColor: ''
  345 + // },
  346 + ]
  347 + @State moreChannelList: Array<TopNavDTO> = [
  348 + // {
  349 + // channelId: 4,
  350 + // channelStyle: 1,
  351 + // channelType: 1,
  352 + // defaultPermitted: 1,
  353 + // delPermitted: 1,
  354 + // fontCColor: '#000000',
  355 + // fontColor: '#000000',
  356 + // headlinesOn: 0,
  357 + // homeChannel: '',
  358 + // iconCUrl: '',
  359 + // iconCUrlSize: '',
  360 + // iconUrl: '',
  361 + // iconUrlSize: '',
  362 + // localChannel: '',
  363 + // moreChannel: '1',
  364 + // movePermitted: 0,
  365 + // myChannel: '',
  366 + // name: '房产',
  367 + // num: 0,
  368 + // pageId: 21212,
  369 + // pageType: '',
  370 + // underlineCColor: ''
  371 + // },
  372 + // {
  373 + // channelId: 5,
  374 + // channelStyle: 1,
  375 + // channelType: 1,
  376 + // defaultPermitted: 1,
  377 + // delPermitted: 1,
  378 + // fontCColor: '#000000',
  379 + // fontColor: '#000000',
  380 + // headlinesOn: 0,
  381 + // homeChannel: '',
  382 + // iconCUrl: '',
  383 + // iconCUrlSize: '',
  384 + // iconUrl: '',
  385 + // iconUrlSize: '',
  386 + // localChannel: '',
  387 + // moreChannel: '1',
  388 + // movePermitted: 0,
  389 + // myChannel: '',
  390 + // name: '生态',
  391 + // num: 0,
  392 + // pageId: 21212,
  393 + // pageType: '',
  394 + // underlineCColor: ''
  395 + // },
  396 + // {
  397 + // channelId: 6,
  398 + // channelStyle: 1,
  399 + // channelType: 1,
  400 + // defaultPermitted: 1,
  401 + // delPermitted: 1,
  402 + // fontCColor: '#000000',
  403 + // fontColor: '#000000',
  404 + // headlinesOn: 0,
  405 + // homeChannel: '',
  406 + // iconCUrl: '',
  407 + // iconCUrlSize: '',
  408 + // iconUrl: '',
  409 + // iconUrlSize: '',
  410 + // localChannel: '',
  411 + // moreChannel: '1',
  412 + // movePermitted: 0,
  413 + // myChannel: '',
  414 + // name: '健康',
  415 + // num: 0,
  416 + // pageId: 21212,
  417 + // pageType: '',
  418 + // underlineCColor: ''
  419 + // }
  420 + ]
  421 + @State localChannelList: Array<TopNavDTO> = [
  422 + // {
  423 + // channelId: 7,
  424 + // channelStyle: 1,
  425 + // channelType: 1,
  426 + // defaultPermitted: 1,
  427 + // delPermitted: 1,
  428 + // fontCColor: '#000000',
  429 + // fontColor: '#000000',
  430 + // headlinesOn: 0,
  431 + // homeChannel: '',
  432 + // iconCUrl: '',
  433 + // iconCUrlSize: '',
  434 + // iconUrl: '',
  435 + // iconUrlSize: '',
  436 + // localChannel: '1',
  437 + // moreChannel: '',
  438 + // movePermitted: 0,
  439 + // myChannel: '',
  440 + // name: '北京',
  441 + // num: 0,
  442 + // pageId: 21212,
  443 + // pageType: '',
  444 + // underlineCColor: ''
  445 + // },
  446 + // {
  447 + // channelId: 8,
  448 + // channelStyle: 1,
  449 + // channelType: 1,
  450 + // defaultPermitted: 1,
  451 + // delPermitted: 1,
  452 + // fontCColor: '#000000',
  453 + // fontColor: '#000000',
  454 + // headlinesOn: 0,
  455 + // homeChannel: '',
  456 + // iconCUrl: '',
  457 + // iconCUrlSize: '',
  458 + // iconUrl: '',
  459 + // iconUrlSize: '',
  460 + // localChannel: '1',
  461 + // moreChannel: '',
  462 + // movePermitted: 0,
  463 + // myChannel: '',
  464 + // name: '上海',
  465 + // num: 0,
  466 + // pageId: 21212,
  467 + // pageType: '',
  468 + // underlineCColor: ''
  469 + // },
  470 + // {
  471 + // channelId: 9,
  472 + // channelStyle: 1,
  473 + // channelType: 1,
  474 + // defaultPermitted: 1,
  475 + // delPermitted: 1,
  476 + // fontCColor: '#000000',
  477 + // fontColor: '#000000',
  478 + // headlinesOn: 0,
  479 + // homeChannel: '',
  480 + // iconCUrl: '',
  481 + // iconCUrlSize: '',
  482 + // iconUrl: '',
  483 + // iconUrlSize: '',
  484 + // localChannel: '1',
  485 + // moreChannel: '',
  486 + // movePermitted: 0,
  487 + // myChannel: '',
  488 + // name: '江苏',
  489 + // num: 0,
  490 + // pageId: 21212,
  491 + // pageType: '',
  492 + // underlineCColor: ''
  493 + // }
  494 + ]
  495 + // 顶导数据
  496 + @State topNavList: TopNavDTO[] = []
  497 + dialogController: CustomDialogController | null = new CustomDialogController({
  498 + builder: ChannelDialog({
  499 + currentTopNavSelectedIndex:this.currentTopNavSelectedIndex,
  500 + indexSettingArray: this.indexSettingArray,
  501 + topNavList: this.topNavList,
  502 + myChannelList: this.myChannelList,
  503 + moreChannelList: this.moreChannelList,
  504 + localChannelList: this.localChannelList,
  505 + }),
  506 + cancel: this.exitApp,
  507 + alignment: DialogAlignment.TopEnd,
  508 + customStyle: true,
  509 + })
  510 + aboutToAppear() {
  511 + this.topNavList.forEach((item,index)=>{
  512 + if(item.myChannel === '1'){
  513 + this.myChannelList.push(item)
  514 + }
  515 + if(item.moreChannel === '1'){
  516 + this.moreChannelList.push(item)
  517 + }
  518 + if(item.localChannel === '1'){
  519 + this.localChannelList.push(item)
  520 + }
  521 + })
  522 + }
  523 + aboutToDisappear() {
  524 + this.dialogController = null // 将dialogController置空
  525 + }
  526 +
  527 + onCancel() {
  528 + console.info('Callback when the first button is clicked')
  529 + }
  530 +
  531 + onAccept() {
  532 + console.info('Callback when the second button is clicked')
  533 + }
  534 +
  535 + exitApp() {
  536 + console.info('Click the callback in the blank area')
  537 + }
  538 +
  539 + build() {
  540 + Row() {
  541 + Image($r('app.media.channel_button'))
  542 + .width(18)
  543 + }
  544 + .width(36)
  545 + .height(30)
  546 + .justifyContent(FlexAlign.Center)
  547 + .backgroundColor('#ffffff')
  548 + .onClick(() => {
  549 + if (this.dialogController != null) {
  550 + this.dialogController.open()
  551 + }
  552 + })
  553 + }
  554 +}
  555 +
  556 +export { ChannelSubscriptionLayout }
1 -import router from '@ohos.router'; 1 +
2 import { CustomTitleUI } from '../reusable/CustomTitleUI'; 2 import { CustomTitleUI } from '../reusable/CustomTitleUI';
3 -import { EditInfoModel, EditListInfo, editModel } from '../../model/EditInfoModel'; 3 +import { EditListInfo } from '../../model/EditInfoModel';
4 import EditInfoViewModel from '../../viewmodel/EditInfoViewModel'; 4 import EditInfoViewModel from '../../viewmodel/EditInfoViewModel';
5 import { WDRouterPage, WDRouterRule } from 'wdRouter'; 5 import { WDRouterPage, WDRouterRule } from 'wdRouter';
  6 +import {AreaPickerDialog} from '../view/areaPickerDialog/AreaPickerDialog'
  7 +import { AreaListModel } from '../../model/AreaListModel';
6 8
7 9
8 @Entry 10 @Entry
9 @Component 11 @Component
10 struct EditUserInfoPage { 12 struct EditUserInfoPage {
11 - private listData: EditListInfo[] = []  
12 - // editM: editModel 13 + @State listData: EditListInfo[] = []
  14 + @State headerImg: string = ''
  15 + @State dataSource: AreaListModel[] = []
  16 +
  17 + dialogController: CustomDialogController = new CustomDialogController({
  18 + builder: AreaPickerDialog({dataSource:this.dataSource}),
  19 + alignment: DialogAlignment.Bottom,
  20 + offset:{dx:0,dy:-20}
  21 + })
13 22
14 aboutToAppear() { 23 aboutToAppear() {
15 - // this.listData = EditInfoViewModel.getEditListInfo(this.editM)  
16 this.getAccountOwnerInfo() 24 this.getAccountOwnerInfo()
  25 + this.getAreaList()
17 } 26 }
18 27
19 build() { 28 build() {
20 Row() { 29 Row() {
21 Column() { 30 Column() {
22 CustomTitleUI({titleName:'资料编辑'}) 31 CustomTitleUI({titleName:'资料编辑'})
23 - Image('') 32 + Image(this.headerImg)
  33 + .alt($r('app.media.default_head'))
24 .backgroundColor(Color.Gray) 34 .backgroundColor(Color.Gray)
25 .width(100) 35 .width(100)
26 .height(100) 36 .height(100)
@@ -87,6 +97,8 @@ struct EditUserInfoPage { @@ -87,6 +97,8 @@ struct EditUserInfoPage {
87 // url:'pages/EditUserInstoductionPage', 97 // url:'pages/EditUserInstoductionPage',
88 // params:{pageNum:i} 98 // params:{pageNum:i}
89 // }) 99 // })
  100 + }else if (i === 3){
  101 + this.dialogController.open()
90 } else if (i === 4) { 102 } else if (i === 4) {
91 DatePickerDialog.show({ 103 DatePickerDialog.show({
92 start:new Date('1900-1-1'), 104 start:new Date('1900-1-1'),
@@ -110,9 +122,15 @@ struct EditUserInfoPage { @@ -110,9 +122,15 @@ struct EditUserInfoPage {
110 } 122 }
111 123
112 getAccountOwnerInfo(){ 124 getAccountOwnerInfo(){
113 - EditInfoViewModel.queryAccountOwnerInfo(1,getContext(this)).then((result) => {  
114 - // this.editM = result 125 + EditInfoViewModel.queryAccountOwnerInfo(1,getContext(this)).then((editModel) => {
  126 + this.headerImg = editModel.userExtend.headPhotoUrl
  127 + this.listData.push(...EditInfoViewModel.getEditListInfo(editModel))
115 }); 128 });
116 } 129 }
117 130
  131 + getAreaList(){
  132 + EditInfoViewModel.getAreaList(getContext(this)).then((value) =>{
  133 + this.dataSource.push(...value)
  134 + })
  135 + }
118 } 136 }
@@ -79,6 +79,7 @@ export struct MinePageComponent { @@ -79,6 +79,7 @@ export struct MinePageComponent {
79 } 79 }
80 80
81 async getUserLogin() { 81 async getUserLogin() {
  82 + // let userid = SPHelper.default.getSync(SpConstants.USER_ID,"") as string
82 let userid = await SPHelper.default.get(SpConstants.USER_ID,"") 83 let userid = await SPHelper.default.get(SpConstants.USER_ID,"")
83 if(StringUtils.isNotEmpty(userid)){ 84 if(StringUtils.isNotEmpty(userid)){
84 this.isLogin = true 85 this.isLogin = true
@@ -2,6 +2,7 @@ import { Action, CompDTO, Params, TopNavDTO } from 'wdBean'; @@ -2,6 +2,7 @@ import { Action, CompDTO, Params, TopNavDTO } from 'wdBean';
2 import { LazyDataSource, Logger } from 'wdKit'; 2 import { LazyDataSource, Logger } from 'wdKit';
3 import { WDRouterRule } from 'wdRouter'; 3 import { WDRouterRule } from 'wdRouter';
4 import { PageComponent } from './PageComponent'; 4 import { PageComponent } from './PageComponent';
  5 +import { ChannelSubscriptionLayout } from './ChannelSubscriptionLayout'
5 6
6 const TAG = 'TopNavigationComponent'; 7 const TAG = 'TopNavigationComponent';
7 8
@@ -16,8 +17,48 @@ export struct TopNavigationComponent { @@ -16,8 +17,48 @@ export struct TopNavigationComponent {
16 // 顶导数据 17 // 顶导数据
17 @State @Watch('onTopNavigationDataUpdated') topNavList: TopNavDTO[] = [] 18 @State @Watch('onTopNavigationDataUpdated') topNavList: TopNavDTO[] = []
18 @State compList: LazyDataSource<CompDTO> = new LazyDataSource(); 19 @State compList: LazyDataSource<CompDTO> = new LazyDataSource();
  20 + @State handledTopNavList: TopNavDTO[] = []
19 readonly MAX_LINE: number = 1; 21 readonly MAX_LINE: number = 1;
20 22
  23 + topNavListHandle() {
  24 + let defaultMyChannelList: TopNavDTO[] = []
  25 + this.handledTopNavList = [...this.topNavList]
  26 + this.handledTopNavList.sort((a, b) => {
  27 + return a.num - b.num;
  28 + });
  29 + Logger.info(TAG, `aboutToAppear this.handledTopNavListsort : ${JSON.stringify(this.handledTopNavList)}`);
  30 + for (let i = 0; i < this.handledTopNavList.length; i++) {
  31 + if (this.handledTopNavList[i].defaultPermitted === 0 || this.handledTopNavList[i].movePermitted === 0 || this.handledTopNavList[i].delPermitted === 0 || this.handledTopNavList[i].headlinesOn === 1) {
  32 + defaultMyChannelList.push(this.handledTopNavList.splice(i, 1)[0]);
  33 + }
  34 + }
  35 +
  36 + Logger.info(TAG, `aboutToAppear defaultMyChannelListsort : ${JSON.stringify(defaultMyChannelList)}`);
  37 +
  38 + for (const element of defaultMyChannelList) {
  39 + element.myChannel = '1'
  40 + if (element.defaultPermitted === 1) {
  41 + element.homeChannel = '1'
  42 + }
  43 + }
  44 + this.handledTopNavList.unshift(...defaultMyChannelList)
  45 + for (let i = 0; i < this.handledTopNavList.length; i++) {
  46 + if(this.handledTopNavList[i].channelType === 2){
  47 + this.handledTopNavList[i].localChannel = '1'
  48 + }
  49 + if(i>=11){
  50 + if(this.handledTopNavList[i].channelType === 1){
  51 + this.handledTopNavList[i].moreChannel = '1'
  52 + }
  53 + }else{
  54 + if(this.handledTopNavList[i].channelType === 1 && this.handledTopNavList[i].myChannel !== '1'){
  55 + this.handledTopNavList[i].moreChannel = '1'
  56 + }
  57 + }
  58 + }
  59 + console.info(`handledTopNavList:${JSON.stringify(this.handledTopNavList)}`)
  60 + }
  61 +
21 build() { 62 build() {
22 Column() { 63 Column() {
23 RelativeContainer() { 64 RelativeContainer() {
@@ -44,8 +85,10 @@ export struct TopNavigationComponent { @@ -44,8 +85,10 @@ export struct TopNavigationComponent {
44 .height(30) 85 .height(30)
45 .width(123) 86 .width(123)
46 .id('search') 87 .id('search')
47 - .alignRules({ left: { anchor: "__container__", align: HorizontalAlign.Start },  
48 - center: { anchor: "__container__", align: VerticalAlign.Center } }) 88 + .alignRules({
  89 + left: { anchor: "__container__", align: HorizontalAlign.Start },
  90 + center: { anchor: "__container__", align: VerticalAlign.Center }
  91 + })
49 92
50 Image($r('app.media.icon_ren_min_ri_bao')) 93 Image($r('app.media.icon_ren_min_ri_bao'))
51 .width(72) 94 .width(72)
@@ -60,8 +103,10 @@ export struct TopNavigationComponent { @@ -60,8 +103,10 @@ export struct TopNavigationComponent {
60 WDRouterRule.jumpWithAction(taskAction) 103 WDRouterRule.jumpWithAction(taskAction)
61 }) 104 })
62 .id('ren_min') 105 .id('ren_min')
63 - .alignRules({ middle: { anchor: "__container__", align: HorizontalAlign.Center },  
64 - center: { anchor: "__container__", align: VerticalAlign.Center } }) 106 + .alignRules({
  107 + middle: { anchor: "__container__", align: HorizontalAlign.Center },
  108 + center: { anchor: "__container__", align: VerticalAlign.Center }
  109 + })
65 110
66 Stack({ alignContent: Alignment.Center }) { 111 Stack({ alignContent: Alignment.Center }) {
67 Image($r('app.media.background_read_paper_home')) 112 Image($r('app.media.background_read_paper_home'))
@@ -83,8 +128,10 @@ export struct TopNavigationComponent { @@ -83,8 +128,10 @@ export struct TopNavigationComponent {
83 .height(30) 128 .height(30)
84 .width(124) 129 .width(124)
85 .id('read') 130 .id('read')
86 - .alignRules({ right: { anchor: "__container__", align: HorizontalAlign.End },  
87 - center: { anchor: "__container__", align: VerticalAlign.Center } }) 131 + .alignRules({
  132 + right: { anchor: "__container__", align: HorizontalAlign.End },
  133 + center: { anchor: "__container__", align: VerticalAlign.Center }
  134 + })
88 .onClick((event: ClickEvent) => { 135 .onClick((event: ClickEvent) => {
89 136
90 let taskAction: Action = { 137 let taskAction: Action = {
@@ -100,8 +147,10 @@ export struct TopNavigationComponent { @@ -100,8 +147,10 @@ export struct TopNavigationComponent {
100 .height(40) 147 .height(40)
101 .visibility(this._currentNavIndex == 0 ? Visibility.Visible : Visibility.None) 148 .visibility(this._currentNavIndex == 0 ? Visibility.Visible : Visibility.None)
102 149
  150 + Stack({ alignContent: Alignment.TopEnd }) {
  151 +
103 Tabs() { 152 Tabs() {
104 - ForEach(this.topNavList, (navItem: TopNavDTO, index: number) => { 153 + ForEach(this.handledTopNavList, (navItem: TopNavDTO, index: number) => {
105 TabContent() { 154 TabContent() {
106 PageComponent({ 155 PageComponent({
107 currentTopNavSelectedIndex: $currentTopNavSelectedIndex, 156 currentTopNavSelectedIndex: $currentTopNavSelectedIndex,
@@ -120,6 +169,13 @@ export struct TopNavigationComponent { @@ -120,6 +169,13 @@ export struct TopNavigationComponent {
120 Logger.info(TAG, `onChange index : ${index}`); 169 Logger.info(TAG, `onChange index : ${index}`);
121 this.currentTopNavSelectedIndex = index; 170 this.currentTopNavSelectedIndex = index;
122 }) 171 })
  172 +
  173 + ChannelSubscriptionLayout({
  174 + topNavList: this.handledTopNavList,
  175 + currentTopNavSelectedIndex: this.currentTopNavSelectedIndex
  176 + })
  177 + }
  178 +
123 } 179 }
124 } 180 }
125 181
@@ -144,6 +200,7 @@ export struct TopNavigationComponent { @@ -144,6 +200,7 @@ export struct TopNavigationComponent {
144 minWidth: $r('app.float.top_tab_item_min_width'), 200 minWidth: $r('app.float.top_tab_item_min_width'),
145 maxWidth: $r('app.float.top_tab_item_max_width') 201 maxWidth: $r('app.float.top_tab_item_max_width')
146 }) 202 })
  203 + // .margin({ right: 36 })
147 // .backgroundColor(Color.Black) 204 // .backgroundColor(Color.Black)
148 .padding({ 205 .padding({
149 left: $r('app.float.top_tab_item_padding_horizontal'), 206 left: $r('app.float.top_tab_item_padding_horizontal'),
@@ -151,9 +208,11 @@ export struct TopNavigationComponent { @@ -151,9 +208,11 @@ export struct TopNavigationComponent {
151 bottom: $r('app.float.top_tab_item_padding_bottom') 208 bottom: $r('app.float.top_tab_item_padding_bottom')
152 }) 209 })
153 .id(`col_tabBar${index}`) 210 .id(`col_tabBar${index}`)
  211 +
154 } 212 }
155 213
156 aboutToAppear() { 214 aboutToAppear() {
  215 + this.topNavListHandle()
157 Logger.info(TAG, `aboutToAppear this.topNavList : ${JSON.stringify(this.topNavList)}`); 216 Logger.info(TAG, `aboutToAppear this.topNavList : ${JSON.stringify(this.topNavList)}`);
158 } 217 }
159 218
  1 +import { MineAppointmentItem } from '../../viewmodel/MineAppointmentItem'
  2 +
  3 +@CustomDialog
  4 +export struct MyCustomDialog {
  5 + @State title: string = "标题"
  6 + @State tipValue: string ="提示文字"
  7 +
  8 + @State leftText: string = "取消"
  9 + @State rightText: string = "确认"
  10 +
  11 + controller: CustomDialogController
  12 + cancel: () => void = () => {
  13 + }
  14 + confirm: () => void = () => {
  15 + }
  16 +
  17 + build() {
  18 + Column() {
  19 + Text(this.title)
  20 + .fontSize("32lpx")
  21 + .margin({ top: "40lpx", bottom: "15lpx" })
  22 + .fontColor($r('app.color.color_333333'))
  23 + .fontSize('35lpx')
  24 + .fontWeight('600lpx')
  25 + Text(this.tipValue)
  26 + .margin({ bottom: "30lpx" })
  27 + .fontSize("27lpx")
  28 + .fontColor($r('app.color.color_B0B0B0'))
  29 +
  30 + Divider()
  31 + .width("100%")
  32 + .strokeWidth('1lpx')
  33 + .height('1lpx')
  34 + .color($r('app.color.color_EEEEEE'))
  35 +
  36 + Row(){
  37 + Text(this.leftText)
  38 + .fontSize('35lpx')
  39 + .fontWeight('400lpx')
  40 + .fontColor($r('app.color.color_333333'))
  41 + .onClick(() => {
  42 + this.controller.close()
  43 + this.cancel()
  44 + }).layoutWeight(1)
  45 + .textAlign(TextAlign.Center)
  46 + Divider()
  47 + .width("1lpx")
  48 + .strokeWidth('1lpx')
  49 + .vertical(true)
  50 + .height('92lpx')
  51 + .color($r('app.color.color_EEEEEE'))
  52 +
  53 + Text(this.rightText)
  54 + .fontSize('35lpx')
  55 + .textAlign(TextAlign.Center)
  56 + .fontWeight('400lpx')
  57 + .fontColor($r('app.color.color_648DF2'))
  58 + .onClick(() => {
  59 + if (this.controller != undefined) {
  60 + this.controller.close()
  61 + this.confirm()
  62 + }
  63 + }).layoutWeight(1)
  64 + }
  65 + .alignItems(VerticalAlign.Center)
  66 + .height('96lpx')
  67 + }.borderRadius(10)
  68 + }
  69 +}
1 import { Action, CompDTO, Params } from 'wdBean'; 1 import { Action, CompDTO, Params } from 'wdBean';
  2 +import { ExtraDTO } from 'wdBean/src/main/ets/bean/component/extra/ExtraDTO';
2 import { DateTimeUtils, Logger } from 'wdKit'; 3 import { DateTimeUtils, Logger } from 'wdKit';
3 import { WDRouterRule } from 'wdRouter'; 4 import { WDRouterRule } from 'wdRouter';
4 5
@@ -10,7 +11,7 @@ export struct AlbumCardComponent { @@ -10,7 +11,7 @@ export struct AlbumCardComponent {
10 @State compDTO: CompDTO = {} as CompDTO 11 @State compDTO: CompDTO = {} as CompDTO
11 12
12 aboutToAppear() { 13 aboutToAppear() {
13 - Logger.debug(TAG + "" + JSON.stringify(this.compDTO.operDataList)); 14 + Logger.debug(TAG + "this.compDTO.operDataList" + JSON.stringify(this.compDTO.operDataList));
14 15
15 } 16 }
16 17
@@ -102,7 +103,12 @@ export struct AlbumCardComponent { @@ -102,7 +103,12 @@ export struct AlbumCardComponent {
102 let taskAction: Action = { 103 let taskAction: Action = {
103 type: 'JUMP_DETAIL_PAGE', 104 type: 'JUMP_DETAIL_PAGE',
104 params: { 105 params: {
105 - detailPageType: 9 106 + detailPageType: 17,
  107 + contentID: this.compDTO.operDataList?.[0].objectId,
  108 + extra: {
  109 + relType: this.compDTO.operDataList?.[0].relType,
  110 + relId: `${this.compDTO.operDataList?.[0].relId}`,
  111 + } as ExtraDTO
106 } as Params, 112 } as Params,
107 }; 113 };
108 WDRouterRule.jumpWithAction(taskAction) 114 WDRouterRule.jumpWithAction(taskAction)
1 import { CompDTO, slideShows } from 'wdBean'; 1 import { CompDTO, slideShows } from 'wdBean';
2 import { CommonConstants } from 'wdConstant' 2 import { CommonConstants } from 'wdConstant'
3 import { DateTimeUtils } from 'wdKit'; 3 import { DateTimeUtils } from 'wdKit';
4 - 4 +import { ProcessUtils } from '../../utils/ProcessUtils';
5 /** 5 /**
6 * 时间链卡--CompStyle: 09 6 * 时间链卡--CompStyle: 09
7 */ 7 */
@@ -47,10 +47,6 @@ export struct CompStyle_09 { @@ -47,10 +47,6 @@ export struct CompStyle_09 {
47 .borderRadius(3) 47 .borderRadius(3)
48 .justifyContent(FlexAlign.Center) 48 .justifyContent(FlexAlign.Center)
49 .margin({top: 5}) 49 .margin({top: 5})
50 - .onClick(() => {  
51 - // TODO  
52 - console.log('跳转到查看更多的页面')  
53 - })  
54 } 50 }
55 } 51 }
56 .width(CommonConstants.FULL_WIDTH) 52 .width(CommonConstants.FULL_WIDTH)
@@ -62,6 +58,9 @@ export struct CompStyle_09 { @@ -62,6 +58,9 @@ export struct CompStyle_09 {
62 }) 58 })
63 .backgroundColor($r("app.color.white")) 59 .backgroundColor($r("app.color.white"))
64 .margin({ bottom: 8 }) 60 .margin({ bottom: 8 })
  61 + .onClick((event: ClickEvent) => {
  62 + ProcessUtils.processPage(this.compDTO?.operDataList[0])
  63 + })
65 } 64 }
66 65
67 @Builder timelineItem (item:slideShows, index:number) { 66 @Builder timelineItem (item:slideShows, index:number) {
1 -import { CompDTO, slideShows } from 'wdBean'; 1 +import { CompDTO, ContentDTO, slideShows } from 'wdBean';
2 import { CommonConstants } from 'wdConstant' 2 import { CommonConstants } from 'wdConstant'
3 import { DateTimeUtils } from 'wdKit'; 3 import { DateTimeUtils } from 'wdKit';
  4 +import { ProcessUtils } from '../../utils/ProcessUtils';
  5 +
4 6
5 /** 7 /**
6 * 大专题卡--CompStyle: 10 8 * 大专题卡--CompStyle: 10
@@ -22,8 +24,11 @@ export struct CompStyle_10 { @@ -22,8 +24,11 @@ export struct CompStyle_10 {
22 .margin({ bottom: 19 }) 24 .margin({ bottom: 19 })
23 } 25 }
24 // 大图 26 // 大图
25 - Image(this.compDTO.operDataList[0].coverUrl) 27 + Image(this.compDTO.operDataList[0] && this.compDTO.operDataList[0].coverUrl)
26 .width('100%') 28 .width('100%')
  29 + .onClick((event: ClickEvent) => {
  30 + ProcessUtils.processPage(this.compDTO?.operDataList[0])
  31 + })
27 // 专题列表--后端返回三个, 32 // 专题列表--后端返回三个,
28 Column(){ 33 Column(){
29 ForEach(this.compDTO.operDataList[0].slideShows, (item:slideShows, index:number) => { 34 ForEach(this.compDTO.operDataList[0].slideShows, (item:slideShows, index:number) => {
@@ -47,9 +52,8 @@ export struct CompStyle_10 { @@ -47,9 +52,8 @@ export struct CompStyle_10 {
47 .borderRadius(3) 52 .borderRadius(3)
48 .justifyContent(FlexAlign.Center) 53 .justifyContent(FlexAlign.Center)
49 .margin({top: 5}) 54 .margin({top: 5})
50 - .onClick(() => {  
51 - // TODO  
52 - console.log('跳转到查看更多的页面') 55 + .onClick((event: ClickEvent) => {
  56 + ProcessUtils.processPage(this.compDTO?.operDataList[0])
53 }) 57 })
54 } 58 }
55 } 59 }
@@ -63,9 +67,7 @@ export struct CompStyle_10 { @@ -63,9 +67,7 @@ export struct CompStyle_10 {
63 .backgroundColor($r("app.color.white")) 67 .backgroundColor($r("app.color.white"))
64 .margin({ bottom: 8 }) 68 .margin({ bottom: 8 })
65 } 69 }
66 -  
67 @Builder timelineItem (item:slideShows, index:number) { 70 @Builder timelineItem (item:slideShows, index:number) {
68 - Column(){  
69 Row() { 71 Row() {
70 Column(){ 72 Column(){
71 Text(item.newsTitle) 73 Text(item.newsTitle)
@@ -74,18 +76,20 @@ export struct CompStyle_10 { @@ -74,18 +76,20 @@ export struct CompStyle_10 {
74 .fontColor($r('app.color.color_222222')) 76 .fontColor($r('app.color.color_222222'))
75 .maxLines(2) 77 .maxLines(2)
76 .textOverflow({ overflow: TextOverflow.Ellipsis }) 78 .textOverflow({ overflow: TextOverflow.Ellipsis })
77 - .alignSelf(ItemAlign.Center)  
78 Row(){ 79 Row(){
79 // 展示发稿人 80 // 展示发稿人
  81 + if(item.source) {
80 Text(item.source) 82 Text(item.source)
81 .fontSize($r('app.float.font_size_12')) 83 .fontSize($r('app.float.font_size_12'))
82 .fontColor($r('app.color.color_B0B0B0')) 84 .fontColor($r('app.color.color_B0B0B0'))
83 - .layoutWeight(1)  
84 .textOverflow({overflow: TextOverflow.Ellipsis}) 85 .textOverflow({overflow: TextOverflow.Ellipsis})
85 .maxLines(1) 86 .maxLines(1)
  87 + .width(item.source.length > 10 ? '60%' : '')
  88 +
86 Image($r('app.media.point')) 89 Image($r('app.media.point'))
87 .width(16) 90 .width(16)
88 .height(16) 91 .height(16)
  92 + }
89 Text(DateTimeUtils.getCommentTime(Number.parseFloat(String(item.publishTime)))) 93 Text(DateTimeUtils.getCommentTime(Number.parseFloat(String(item.publishTime))))
90 .fontSize($r("app.float.font_size_12")) 94 .fontSize($r("app.float.font_size_12"))
91 .fontColor($r("app.color.color_B0B0B0")) 95 .fontColor($r("app.color.color_B0B0B0"))
@@ -106,6 +110,13 @@ export struct CompStyle_10 { @@ -106,6 +110,13 @@ export struct CompStyle_10 {
106 } 110 }
107 } 111 }
108 .padding({top: 10, bottom: 10}) 112 .padding({top: 10, bottom: 10})
109 - } 113 + .onClick((event: ClickEvent) => {
  114 + const str: string = JSON.stringify(this.compDTO.operDataList[0]);
  115 + const data: ContentDTO = JSON.parse(str)
  116 + data.objectId = item.newsId
  117 + data.relId = item.relId
  118 + data.objectType = String(item.objectType)
  119 + ProcessUtils.processPage(data)
  120 + })
110 } 121 }
111 } 122 }
1 import { CompDTO } from 'wdBean'; 1 import { CompDTO } from 'wdBean';
2 import { CommonConstants } from 'wdConstant'; 2 import { CommonConstants } from 'wdConstant';
  3 +import { ProcessUtils } from '../../utils/ProcessUtils';
3 4
4 @Component 5 @Component
5 export struct HeadPictureCardComponent { 6 export struct HeadPictureCardComponent {
@@ -40,5 +41,8 @@ export struct HeadPictureCardComponent { @@ -40,5 +41,8 @@ export struct HeadPictureCardComponent {
40 .height(200) 41 .height(200)
41 .padding( 42 .padding(
42 { top: 16, bottom: 16, left: 14, right: 14 }) 43 { top: 16, bottom: 16, left: 14, right: 14 })
  44 + .onClick((event: ClickEvent) => {
  45 + ProcessUtils.processPage(this.compDTO?.operDataList[0])
  46 + })
43 } 47 }
44 } 48 }
@@ -93,6 +93,25 @@ export struct SingleImageCardComponent { @@ -93,6 +93,25 @@ export struct SingleImageCardComponent {
93 bottom: 4 93 bottom: 4
94 }) 94 })
95 .backgroundColor($r('app.color.color_4d000000')) 95 .backgroundColor($r('app.color.color_4d000000'))
  96 + } else if(this.compDTO.operDataList[0].voiceInfo) {
  97 + Row() {
  98 + Image($r('app.media.icon_listen'))
  99 + .width(22)
  100 + .height(18)
  101 + Text(DateTimeUtils.getFormattedDuration(this.compDTO.operDataList[0].voiceInfo
  102 + .voiceDuration * 1000))
  103 + .fontSize($r('app.float.font_size_13'))
  104 + .fontWeight(400)
  105 + .fontColor($r('app.color.color_fff'))
  106 + }
  107 + .alignItems(VerticalAlign.Bottom)
  108 + .height(18)
  109 + .padding({ right: 4 })
  110 + .margin({
  111 + right: 4,
  112 + bottom: 4
  113 + })
  114 + .backgroundColor($r('app.color.color_4d000000'))
96 } 115 }
97 }.alignContent(Alignment.BottomEnd) 116 }.alignContent(Alignment.BottomEnd)
98 } 117 }
@@ -67,9 +67,9 @@ export struct ZhSingleRow04 { @@ -67,9 +67,9 @@ export struct ZhSingleRow04 {
67 Text(item.source) 67 Text(item.source)
68 .fontSize($r('app.float.font_size_12')) 68 .fontSize($r('app.float.font_size_12'))
69 .fontColor($r('app.color.color_B0B0B0')) 69 .fontColor($r('app.color.color_B0B0B0'))
70 - .layoutWeight(1)  
71 .textOverflow({overflow: TextOverflow.Ellipsis}) 70 .textOverflow({overflow: TextOverflow.Ellipsis})
72 .maxLines(1) 71 .maxLines(1)
  72 + .width(item.source.length > 10 ? '60%' : '')
73 Image($r("app.media.point")) 73 Image($r("app.media.point"))
74 .width(16) 74 .width(16)
75 .height(16) 75 .height(16)
  1 +import { AreaListManageModel, AreaListModel } from '../../../model/AreaListModel';
  2 +import EditInfoViewModel from '../../../viewmodel/EditInfoViewModel';
  3 +import { FirstLevelComponent } from './FirstLevelComponent';
  4 +import { SecondLevelComponent } from './SecondLevelComponent';
  5 +import { ThirdLevelComponent } from './ThirdLevelComponent';
  6 +@CustomDialog
  7 +export struct AreaPickerDialog {
  8 + @Provide currentFirst: AreaListManageModel = new AreaListManageModel('','','',[])
  9 + @Provide currentSecondBean: AreaListManageModel = new AreaListManageModel('','','',[])
  10 + @Provide currentThirdBean: AreaListManageModel = new AreaListManageModel('','','',[])
  11 + controller: CustomDialogController
  12 + title: string = '地区选择'
  13 + @Provide dataSource: AreaListModel[] = []
  14 + result: JSON[] = [];
  15 +
  16 + aboutToAppear(){
  17 + this.currentFirst = EditInfoViewModel.getAreaListManageModel(this.dataSource[0])
  18 + this.currentSecondBean = EditInfoViewModel.getAreaListManageModel(this.dataSource[0].children[0])
  19 + this.currentThirdBean = EditInfoViewModel.getAreaListManageModel(this.dataSource[0].children[0].children[0])
  20 + }
  21 +
  22 + build() {
  23 + Column(){
  24 + Row(){
  25 + Button('取消',{type:ButtonType.Normal})
  26 + .onClick(()=> {
  27 + this.controller.close()
  28 + })
  29 + .backgroundColor(0xffffff)
  30 + .fontColor(Color.Black)
  31 + .layoutWeight(1)
  32 +
  33 + Blank()
  34 +
  35 + Text(this.title)
  36 + .fontSize(18).textAlign(TextAlign.Center).margin({top:10,bottom:10})
  37 +
  38 + Blank()
  39 +
  40 + Button('确定',{type:ButtonType.Normal})
  41 + .onClick(()=> {
  42 +
  43 + })
  44 + .backgroundColor(0xffffff)
  45 + .fontColor(Color.Blue)
  46 + .layoutWeight(1)
  47 + }
  48 + .margin({top:0,bottom:10})
  49 +
  50 + Row(){
  51 + FirstLevelComponent().width('30%')
  52 + SecondLevelComponent().width('30%')
  53 + ThirdLevelComponent().width('30%')
  54 + }
  55 + }
  56 + .height('40%')
  57 +
  58 + }
  59 +}
  1 +import { AreaListManageModel, AreaListModel } from '../../../model/AreaListModel';
  2 +import EditInfoViewModel from '../../../viewmodel/EditInfoViewModel';
  3 +@Component
  4 +export struct FirstLevelComponent {
  5 + @State labelList :string[] = [];
  6 + @State select: number = 0;
  7 + @Consume currentFirst: AreaListManageModel
  8 + @Consume dataSource: AreaListModel[]
  9 +
  10 + aboutToAppear(){
  11 + for (let index = 0; index < this.dataSource.length; index++) {
  12 + const element = this.dataSource[index];
  13 + this.labelList.push(element.label)
  14 + }
  15 + }
  16 +
  17 + build() {
  18 + Column(){
  19 + Column(){
  20 + if (this.labelList.length === 0){
  21 + Text('暂无数据').fontSize(20)
  22 + }else {
  23 + TextPicker({range:this.labelList,selected:this.select})
  24 + // .onChange((value:string,index:number) => {
  25 + // this.select = index
  26 + // this.currentFirst = EditInfoViewModel.getAreaListManageModel(this.dataSource[index])
  27 + // })
  28 + .backgroundColor(Color.White)
  29 + .border({color:'#e2e2e2',width:{right:0.5}})
  30 + .width('100%')
  31 + .layoutWeight(1)
  32 + }
  33 + }
  34 + .justifyContent(FlexAlign.Center)
  35 + }
  36 + .height('100%')
  37 +
  38 + }
  39 +}
  1 +import { AreaListManageModel, AreaListModel } from '../../../model/AreaListModel';
  2 +
  3 +@Component
  4 +export struct SecondLevelComponent {
  5 + @State mTip: string = '暂无数据'
  6 + @State labelList: string[] = [];
  7 + @State select: number = 0;
  8 + @Consume @Watch('onFirstChange') currentFirst: AreaListManageModel;
  9 + @Consume currentSecondBean: AreaListManageModel
  10 +
  11 + aboutToAppear(){
  12 + for (let index = 0; index < this.currentFirst.children.length; index++) {
  13 + const element = this.currentFirst.children[index];
  14 + this.labelList.push(element.label)
  15 + }
  16 + }
  17 +
  18 + build() {
  19 + Column(){
  20 + Column(){
  21 + if (this.labelList.length === 0){
  22 + Text(this.mTip).fontSize(20)
  23 + }else {
  24 + TextPicker({range:this.labelList,selected:this.select})
  25 + // .onChange((value:string,index:number) => {
  26 + // this.select = index
  27 + // this.currentSecondBean = this.currentFirst.children[index]
  28 + // })
  29 + .backgroundColor(Color.White)
  30 + .border({color:'#e2e2e2',width:{right:0.5}})
  31 + .width('100%')
  32 + .layoutWeight(1)
  33 + }
  34 + }
  35 + .justifyContent(FlexAlign.Center)
  36 + }
  37 + .height('100%')
  38 +
  39 + }
  40 +
  41 + onFirstChange(){
  42 + if (!this.currentFirst) {
  43 + this.mTip = '暂无数据';
  44 + } else {
  45 + this.labelList = []
  46 + for (let index = 0; index < this.currentFirst.children.length; index++) {
  47 + const element = this.currentFirst.children[index];
  48 + this.labelList.push(element.label)
  49 + }
  50 + // this.currentSecondBean = this.currentFirst.children[this.select]
  51 + }
  52 + }
  53 +}
  1 +import { AreaListManageModel, AreaListModel } from '../../../model/AreaListModel';
  2 +
  3 +@Component
  4 +export struct ThirdLevelComponent {
  5 + @State mTip: string = '暂无数据'
  6 + @State labelList: string[] = [];
  7 + @State select: number = 0;
  8 + @Consume @Watch('onFirstChange') currentFirst: AreaListManageModel;
  9 + @Consume @Watch('onSecondChange') currentSecondBean: AreaListManageModel;
  10 + @Consume currentThirdBean: AreaListManageModel
  11 +
  12 + aboutToAppear(){
  13 + for (let index = 0; index < this.currentSecondBean.children.length; index++) {
  14 + const element = this.currentSecondBean.children[index];
  15 + this.labelList.push(element.label)
  16 + }
  17 + }
  18 +
  19 + build() {
  20 + Column(){
  21 + Column(){
  22 + if (this.labelList.length === 0){
  23 + Text(this.mTip).fontSize(20)
  24 + }else {
  25 + TextPicker({range:this.labelList,selected:this.select})
  26 + // .onChange((value:string,index:number) => {
  27 + // this.select = index
  28 + // this.currentThirdBean = this.currentSecondBean.children[index]
  29 + // })
  30 + .backgroundColor(Color.White)
  31 + .border({color:'#e2e2e2',width:{right:0.5}})
  32 + .width('100%')
  33 + .layoutWeight(1)
  34 + }
  35 + }
  36 + .justifyContent(FlexAlign.Center)
  37 + }
  38 + .height('100%')
  39 +
  40 + }
  41 +
  42 + onFirstChange(){
  43 +
  44 + }
  45 +
  46 + onSecondChange(){
  47 + if (!this.currentSecondBean) {
  48 + this.mTip = '暂无数据';
  49 + } else {
  50 + this.labelList = []
  51 + for (let index = 0; index < this.currentSecondBean.children.length; index++) {
  52 + const element = this.currentSecondBean.children[index];
  53 + this.labelList.push(element.label)
  54 + }
  55 + // this.currentThirdBean = this.currentSecondBean.children[this.select]
  56 + }
  57 + }
  58 +}
@@ -9,7 +9,15 @@ export class ContentConstants { @@ -9,7 +9,15 @@ export class ContentConstants {
9 */ 9 */
10 static readonly TYPE_VOD: string = "1"; 10 static readonly TYPE_VOD: string = "1";
11 /** 11 /**
  12 + * 5:专题详情
  13 + */
  14 + static readonly TYPE_SPECIAL_TOPIC: string = "5";
  15 + /**
12 * 8:图文详情,这里是h5页面 16 * 8:图文详情,这里是h5页面
13 */ 17 */
14 static readonly TYPE_TELETEXT: string = "8"; 18 static readonly TYPE_TELETEXT: string = "8";
  19 + /**
  20 + * 13:音频详情
  21 + */
  22 + static readonly TYPE_AUDIO: string = "13";
15 } 23 }
1 /** 1 /**
2 * 简易音频对话框 2 * 简易音频对话框
3 * */ 3 * */
  4 +import { PlayerConstants, WDPlayerController } from 'wdPlayer/Index'
  5 +
4 @CustomDialog 6 @CustomDialog
5 export struct PaperReaderSimpleDialog { 7 export struct PaperReaderSimpleDialog {
6 - private controllerSimple?: CustomDialogController; 8 + cancel: () => void = () => {
  9 + }
  10 + confirm: () => void = () => {
  11 + }
  12 + playerController: WDPlayerController = new WDPlayerController()
  13 + paperReaderDialog: CustomDialogController = new CustomDialogController({
  14 + builder: PaperReaderDialog({
  15 + onCancel: this.cancel,
  16 + onConfirm: this.confirm,
  17 + playerController: this.playerController
  18 + }),
  19 + autoCancel: false,
  20 + customStyle: true,
  21 +
  22 + alignment: DialogAlignment.CenterStart,
  23 + offset: { dx: 12, dy: -150 }
  24 + })
  25 + controllerSimple?: CustomDialogController // // 若尝试在CustomDialog中传入多个其他的Controller,以实现在CustomDialog中打开另一个或另一些CustomDialog,那么此处需要将指向自己的controller放在所有controller的后面
7 26
8 build() { 27 build() {
9 Row() { 28 Row() {
@@ -19,6 +38,18 @@ export struct PaperReaderSimpleDialog { @@ -19,6 +38,18 @@ export struct PaperReaderSimpleDialog {
19 .onClick(() => { 38 .onClick(() => {
20 if (this.controllerSimple) { 39 if (this.controllerSimple) {
21 this.controllerSimple.close() 40 this.controllerSimple.close()
  41 + this.paperReaderDialog.open()
  42 + if (this.paperReaderDialog) {
  43 + setTimeout(() => {
  44 + console.log('PaperReaderSimpleDialog delay 1s');
  45 + if (this.paperReaderDialog != undefined) {
  46 + this.paperReaderDialog.close()
  47 + }
  48 + if (this.controllerSimple != undefined) {
  49 + this.controllerSimple.open()
  50 + }
  51 + }, 500000);
  52 + }
22 } 53 }
23 54
24 }) 55 })
@@ -31,23 +62,34 @@ export struct PaperReaderSimpleDialog { @@ -31,23 +62,34 @@ export struct PaperReaderSimpleDialog {
31 * */ 62 * */
32 @CustomDialog 63 @CustomDialog
33 export struct PaperReaderDialog { 64 export struct PaperReaderDialog {
  65 + @Consume audioTitle: string;
  66 + @Consume currentTime: string;
  67 + @Consume totalTime: string;
  68 + @Consume progressVal: number;
  69 + @State currentStatus: number = 0;
  70 + playerController: WDPlayerController = new WDPlayerController()
34 controllerDetail?: CustomDialogController 71 controllerDetail?: CustomDialogController
  72 + onCancel: () => void = () => {
  73 + }
  74 + onConfirm: () => void = () => {
  75 + }
35 76
36 build() { 77 build() {
37 - Stack() { 78 + Stack({ alignContent: Alignment.End }) {
38 Column() { //标题 时间 进度条 79 Column() { //标题 时间 进度条
39 Marquee({ 80 Marquee({
40 start: true, 81 start: true,
41 - step: 50, 82 + step: 5,
42 loop: Number.POSITIVE_INFINITY, 83 loop: Number.POSITIVE_INFINITY,
43 fromStart: true, 84 fromStart: true,
44 - src: "Running Marquee starts rolling" 85 + src: this.audioTitle
45 }) 86 })
46 .width("60%") 87 .width("60%")
47 .height(20) 88 .height(20)
48 .fontColor($r("app.color.color_222222")) 89 .fontColor($r("app.color.color_222222"))
49 .fontSize(14) 90 .fontSize(14)
50 - .margin({ top: 10 }) 91 + .margin({ top: 10, left: 10 })
  92 + .alignSelf(ItemAlign.Start)
51 .onStart(() => { 93 .onStart(() => {
52 console.info('Marquee animation complete onStart') 94 console.info('Marquee animation complete onStart')
53 }) 95 })
@@ -59,48 +101,66 @@ export struct PaperReaderDialog { @@ -59,48 +101,66 @@ export struct PaperReaderDialog {
59 }) 101 })
60 102
61 Row() { 103 Row() {
62 - Text("00:00") 104 + Text(this.currentTime)
63 .fontSize($r('app.float.font_size_12')) 105 .fontSize($r('app.float.font_size_12'))
64 .fontColor($r('app.color.color_999999')) 106 .fontColor($r('app.color.color_999999'))
65 - .width("49%")  
66 .height("100%") 107 .height("100%")
67 - Text("/00:00") 108 + .alignSelf(ItemAlign.Start)
  109 + Text("/" + this.totalTime)
68 .fontSize($r('app.float.font_size_12')) 110 .fontSize($r('app.float.font_size_12'))
69 .fontColor($r('app.color.color_999999')) 111 .fontColor($r('app.color.color_999999'))
70 - .width("51%")  
71 .height("100%") 112 .height("100%")
  113 + .alignSelf(ItemAlign.Start)
72 114
73 } 115 }
74 .width("100%") 116 .width("100%")
75 .height(16) 117 .height(16)
76 - .margin({ top: 4 })  
77 - }  
78 - .width("100%")  
79 - .height("100%") 118 + .margin({ top: 4, left: 10 })
80 119
81 - Progress({ value: 0, total: 100, type: ProgressType.Linear }) 120 + Progress({ value: this.progressVal, total: 100, type: ProgressType.Capsule })
82 .color($r('app.color.color_ED2800')) 121 .color($r('app.color.color_ED2800'))
  122 + .backgroundColor($r('app.color.white'))
83 .width("100%") 123 .width("100%")
84 .height(3) 124 .height(3)
  125 + .margin({ top: 7 })
  126 + }
  127 + .width("100%")
  128 + .height("100%")
  129 + .justifyContent(FlexAlign.Start)
85 130
86 - Image($r("app.media.icon_audio_pause"))  
87 - .objectFit(ImageFit.Auto)  
88 - .align(Alignment.End) 131 + Row() {
  132 + Image(this.currentStatus != PlayerConstants.STATUS_START ? $r("app.media.icon_audio_pause") : $r("app.media.icon_audio_playing"))
  133 + .objectFit(ImageFit.Contain)
  134 + .width(24)
  135 + .height(24)
89 .margin({ right: 12 }) 136 .margin({ right: 12 })
  137 + .onClick(() => {
  138 + if (this.playerController) {
  139 + // this.onConfirm()
  140 + this.playerController.switchPlayOrPause()
  141 + this.currentStatus = this.playerController.getStatus()
  142 + }
  143 + })
90 144
91 Image($r("app.media.icon_audio_close")) 145 Image($r("app.media.icon_audio_close"))
92 - .objectFit(ImageFit.Auto)  
93 - .align(Alignment.End)  
94 - .margin({ right: 48 }) 146 + .objectFit(ImageFit.Contain)
  147 + .width(24)
  148 + .height(24)
95 .onClick(() => { 149 .onClick(() => {
  150 + if (this.playerController) {
  151 + this.playerController.stop()
  152 + }
96 if (this.controllerDetail) { 153 if (this.controllerDetail) {
97 this.controllerDetail.close() 154 this.controllerDetail.close()
98 } 155 }
99 }) 156 })
  157 + }.width(80)
  158 + .height(60)
  159 +
100 } 160 }
101 .width("65%") 161 .width("65%")
102 .height(60) 162 .height(60)
103 .backgroundColor(Color.White) 163 .backgroundColor(Color.White)
104 - .borderRadius(5) 164 + .borderRadius(2)
105 } 165 }
106 } 166 }
  1 +
  2 +
  3 +
  4 +export interface AreaListModel{
  5 +
  6 + code: string
  7 +
  8 + id: string
  9 +
  10 + label: string
  11 +
  12 + children: AreaListModel[]
  13 +
  14 +
  15 +}
  16 +
  17 +export class AreaListManageModel{
  18 +
  19 + code: string = ''
  20 +
  21 + id: string = ''
  22 +
  23 + label: string = ''
  24 +
  25 + children: AreaListModel[] = []
  26 +
  27 + constructor(code:string , id:string,label:string, children:AreaListModel[]) {
  28 + this.code = code;
  29 + this.id = id
  30 + this.label = label;
  31 + this.children = children
  32 + }
  33 +
  34 +}
@@ -23,9 +23,10 @@ export interface EditInfoModel{ @@ -23,9 +23,10 @@ export interface EditInfoModel{
23 //生日 23 //生日
24 birthday:string 24 birthday:string
25 //性别 25 //性别
26 - sex:string  
27 - // 推荐开关 0:关 1:开(默认) 26 + sex:number
  27 +
28 airec:number 28 airec:number
  29 +
29 } 30 }
30 31
31 export interface editModel{ 32 export interface editModel{
@@ -20,6 +20,9 @@ import { OtherUserCommentListRequestItem } from '../viewmodel/OtherUserCommentLi @@ -20,6 +20,9 @@ import { OtherUserCommentListRequestItem } from '../viewmodel/OtherUserCommentLi
20 import { OtherUserCommentLikeStatusRequestItem } from '../viewmodel/OtherUserCommentLikeStatusRequestItem'; 20 import { OtherUserCommentLikeStatusRequestItem } from '../viewmodel/OtherUserCommentLikeStatusRequestItem';
21 import { QueryCommentListIsLikedItem } from '../viewmodel/QueryCommentListIsLikedItem'; 21 import { QueryCommentListIsLikedItem } from '../viewmodel/QueryCommentListIsLikedItem';
22 import { UserFollowListRequestItem } from '../viewmodel/UserFollowListRequestItem'; 22 import { UserFollowListRequestItem } from '../viewmodel/UserFollowListRequestItem';
  23 +import { AppointmentOperationRequestItem } from '../viewmodel/AppointmentOperationRequestItem';
  24 +import { CommentLikeOperationRequestItem } from '../viewmodel/CommentLikeOperationRequestItem';
  25 +import { FollowOperationRequestItem } from '../viewmodel/FollowOperationRequestItem';
23 26
24 const TAG = "MinePageDatasModel" 27 const TAG = "MinePageDatasModel"
25 28
@@ -106,7 +109,7 @@ class MinePageDatasModel{ @@ -106,7 +109,7 @@ class MinePageDatasModel{
106 */ 109 */
107 fetchAppointmentListData(pageSize:string,pageNum:string) { 110 fetchAppointmentListData(pageSize:string,pageNum:string) {
108 let url = HttpUrlUtils.getAppointmentListDataUrl()+ `?pageSize=${pageSize}&pageNum=${pageNum}` 111 let url = HttpUrlUtils.getAppointmentListDataUrl()+ `?pageSize=${pageSize}&pageNum=${pageNum}`
109 - let headers: HashMap<string, string> = HttpUrlUtils.getYcgCommonHeaders(); 112 + let headers: HashMap<string, string> = HttpUrlUtils.getCommonHeaders();
110 return WDHttp.get<ResponseDTO<MineAppointmentListItem>>(url, headers) 113 return WDHttp.get<ResponseDTO<MineAppointmentListItem>>(url, headers)
111 }; 114 };
112 115
@@ -177,7 +180,7 @@ class MinePageDatasModel{ @@ -177,7 +180,7 @@ class MinePageDatasModel{
177 180
178 fetchFollowListDetailData(object:FollowListDetailRequestItem) { 181 fetchFollowListDetailData(object:FollowListDetailRequestItem) {
179 let url = HttpUrlUtils.getFollowListDetailDataUrl() 182 let url = HttpUrlUtils.getFollowListDetailDataUrl()
180 - let headers: HashMap<string, string> = HttpUrlUtils.getYcgCommonHeaders(); 183 + let headers: HashMap<string, string> = HttpUrlUtils.getCommonHeaders();
181 return WDHttp.post<ResponseDTO<MineFollowListDetailItem>>(url, object,headers) 184 return WDHttp.post<ResponseDTO<MineFollowListDetailItem>>(url, object,headers)
182 }; 185 };
183 186
@@ -187,7 +190,7 @@ class MinePageDatasModel{ @@ -187,7 +190,7 @@ class MinePageDatasModel{
187 */ 190 */
188 fetchFollowListData() { 191 fetchFollowListData() {
189 let url = HttpUrlUtils.getFollowListDataUrl() 192 let url = HttpUrlUtils.getFollowListDataUrl()
190 - let headers: HashMap<string, string> = HttpUrlUtils.getYcgCommonHeaders(); 193 + let headers: HashMap<string, string> = HttpUrlUtils.getCommonHeaders();
191 return WDHttp.get<ResponseDTO<FollowListItem[]>>(url, headers) 194 return WDHttp.get<ResponseDTO<FollowListItem[]>>(url, headers)
192 }; 195 };
193 196
@@ -246,7 +249,7 @@ class MinePageDatasModel{ @@ -246,7 +249,7 @@ class MinePageDatasModel{
246 249
247 fetchMineDetailFollowListData(object:FollowListDetailRequestItem) { 250 fetchMineDetailFollowListData(object:FollowListDetailRequestItem) {
248 let url = HttpUrlUtils.getMineFollowListDataUrl()+`?pageSize=${object.pageSize}&pageNum=${object.pageNum}` 251 let url = HttpUrlUtils.getMineFollowListDataUrl()+`?pageSize=${object.pageSize}&pageNum=${object.pageNum}`
249 - let headers: HashMap<string, string> = HttpUrlUtils.getYcgCommonHeaders(); 252 + let headers: HashMap<string, string> = HttpUrlUtils.getCommonHeaders();
250 return WDHttp.get<ResponseDTO<MineFollowListItem>>(url, headers) 253 return WDHttp.get<ResponseDTO<MineFollowListItem>>(url, headers)
251 }; 254 };
252 255
@@ -287,7 +290,7 @@ class MinePageDatasModel{ @@ -287,7 +290,7 @@ class MinePageDatasModel{
287 290
288 fetchFollowListStatusData(object:FollowListStatusRequestItem) { 291 fetchFollowListStatusData(object:FollowListStatusRequestItem) {
289 let url = HttpUrlUtils.getFollowListStatusDataUrl() 292 let url = HttpUrlUtils.getFollowListStatusDataUrl()
290 - let headers: HashMap<string, string> = HttpUrlUtils.getYcgCommonHeaders(); 293 + let headers: HashMap<string, string> = HttpUrlUtils.getCommonHeaders();
291 return WDHttp.post<ResponseDTO<QueryListIsFollowedItem[]>>(url,object, headers) 294 return WDHttp.post<ResponseDTO<QueryListIsFollowedItem[]>>(url,object, headers)
292 }; 295 };
293 296
@@ -309,10 +312,10 @@ class MinePageDatasModel{ @@ -309,10 +312,10 @@ class MinePageDatasModel{
309 * @param context 312 * @param context
310 * @returns 313 * @returns
311 */ 314 */
312 - getMineCommentListData(params:FollowListDetailRequestItem,context: Context): Promise<MineCommentListDetailItem> { 315 + getMineCommentListData(time:string,params:FollowListDetailRequestItem,context: Context): Promise<MineCommentListDetailItem> {
313 return new Promise<MineCommentListDetailItem>((success, error) => { 316 return new Promise<MineCommentListDetailItem>((success, error) => {
314 Logger.info(TAG, `getAppointmentList start`); 317 Logger.info(TAG, `getAppointmentList start`);
315 - this.fetchMineCommentListData(params).then((navResDTO: ResponseDTO<MineCommentListDetailItem>) => { 318 + this.fetchMineCommentListData(time,params).then((navResDTO: ResponseDTO<MineCommentListDetailItem>) => {
316 if (!navResDTO || navResDTO.code != 0) { 319 if (!navResDTO || navResDTO.code != 0) {
317 success(this.getMineCommentListDataLocal(context)) 320 success(this.getMineCommentListDataLocal(context))
318 return 321 return
@@ -327,9 +330,9 @@ class MinePageDatasModel{ @@ -327,9 +330,9 @@ class MinePageDatasModel{
327 }) 330 })
328 } 331 }
329 332
330 - fetchMineCommentListData(object:FollowListDetailRequestItem) {  
331 - let url = HttpUrlUtils.getMineCommentListDataUrl()+`?pageSize=${object.pageSize}&pageNum=${object.pageNum}`  
332 - let headers: HashMap<string, string> = HttpUrlUtils.getYcgCommonHeaders(); 333 + fetchMineCommentListData(time:string,object:FollowListDetailRequestItem) {
  334 + let url = HttpUrlUtils.getMineCommentListDataUrl()+`?pageSize=${object.pageSize}&pageNum=${object.pageNum}&time=${time}`
  335 + let headers: HashMap<string, string> = HttpUrlUtils.getCommonHeaders();
333 return WDHttp.get<ResponseDTO<MineCommentListDetailItem>>(url, headers) 336 return WDHttp.get<ResponseDTO<MineCommentListDetailItem>>(url, headers)
334 }; 337 };
335 338
@@ -367,7 +370,7 @@ class MinePageDatasModel{ @@ -367,7 +370,7 @@ class MinePageDatasModel{
367 370
368 fetchMineUserLevelData() { 371 fetchMineUserLevelData() {
369 let url = HttpUrlUtils.getMineUserLevelDataUrl() 372 let url = HttpUrlUtils.getMineUserLevelDataUrl()
370 - let headers: HashMap<string, string> = HttpUrlUtils.getYcgCommonHeaders(); 373 + let headers: HashMap<string, string> = HttpUrlUtils.getCommonHeaders();
371 return WDHttp.get<ResponseDTO<MineUserLevelItem>>(url, headers) 374 return WDHttp.get<ResponseDTO<MineUserLevelItem>>(url, headers)
372 }; 375 };
373 376
@@ -405,7 +408,7 @@ class MinePageDatasModel{ @@ -405,7 +408,7 @@ class MinePageDatasModel{
405 408
406 fetchMineUserDetailData() { 409 fetchMineUserDetailData() {
407 let url = HttpUrlUtils.getMineUserDetailDataUrl() 410 let url = HttpUrlUtils.getMineUserDetailDataUrl()
408 - let headers: HashMap<string, string> = HttpUrlUtils.getYcgCommonHeaders(); 411 + let headers: HashMap<string, string> = HttpUrlUtils.getCommonHeaders();
409 return WDHttp.get<ResponseDTO<MineUserDetailItem>>(url, headers) 412 return WDHttp.get<ResponseDTO<MineUserDetailItem>>(url, headers)
410 }; 413 };
411 414
@@ -442,7 +445,7 @@ class MinePageDatasModel{ @@ -442,7 +445,7 @@ class MinePageDatasModel{
442 445
443 fetchOtherUserDetailData(item:OtherUserDetailRequestItem) { 446 fetchOtherUserDetailData(item:OtherUserDetailRequestItem) {
444 let url = HttpUrlUtils.getOtherUserDetailDataUrl() 447 let url = HttpUrlUtils.getOtherUserDetailDataUrl()
445 - let headers: HashMap<string, string> = HttpUrlUtils.getYcgCommonHeaders(); 448 + let headers: HashMap<string, string> = HttpUrlUtils.getCommonHeaders();
446 return WDHttp.post<ResponseDTO<MineUserDetailItem>>(url, item,headers) 449 return WDHttp.post<ResponseDTO<MineUserDetailItem>>(url, item,headers)
447 }; 450 };
448 451
@@ -484,7 +487,7 @@ class MinePageDatasModel{ @@ -484,7 +487,7 @@ class MinePageDatasModel{
484 487
485 fetchOtherUserLevelData(item:string[]) { 488 fetchOtherUserLevelData(item:string[]) {
486 let url = HttpUrlUtils.getOtherUserLevelDataUrl() 489 let url = HttpUrlUtils.getOtherUserLevelDataUrl()
487 - let headers: HashMap<string, string> = HttpUrlUtils.getYcgCommonHeaders(); 490 + let headers: HashMap<string, string> = HttpUrlUtils.getCommonHeaders();
488 return WDHttp.post<ResponseDTO<MineUserLevelItem[]>>(url,item, headers) 491 return WDHttp.post<ResponseDTO<MineUserLevelItem[]>>(url,item, headers)
489 }; 492 };
490 493
@@ -525,7 +528,7 @@ class MinePageDatasModel{ @@ -525,7 +528,7 @@ class MinePageDatasModel{
525 528
526 fetchOtherCommentListData(object:OtherUserCommentListRequestItem) { 529 fetchOtherCommentListData(object:OtherUserCommentListRequestItem) {
527 let url = HttpUrlUtils.getOtherCommentListDataUrl()+`?pageSize=${object.pageSize}&pageNum=${object.pageNum}&creatorId=${object.creatorId}&time=${object.time}&userType=${object.userType}&userId=${object.userId}` 530 let url = HttpUrlUtils.getOtherCommentListDataUrl()+`?pageSize=${object.pageSize}&pageNum=${object.pageNum}&creatorId=${object.creatorId}&time=${object.time}&userType=${object.userType}&userId=${object.userId}`
528 - let headers: HashMap<string, string> = HttpUrlUtils.getYcgCommonHeaders(); 531 + let headers: HashMap<string, string> = HttpUrlUtils.getCommonHeaders();
529 return WDHttp.get<ResponseDTO<MineCommentListDetailItem>>(url, headers) 532 return WDHttp.get<ResponseDTO<MineCommentListDetailItem>>(url, headers)
530 }; 533 };
531 534
@@ -565,8 +568,8 @@ class MinePageDatasModel{ @@ -565,8 +568,8 @@ class MinePageDatasModel{
565 } 568 }
566 569
567 fetchOtherUserCommentLikeStatusData(object:OtherUserCommentLikeStatusRequestItem) { 570 fetchOtherUserCommentLikeStatusData(object:OtherUserCommentLikeStatusRequestItem) {
568 - let url = HttpUrlUtils.getFollowListStatusDataUrl()  
569 - let headers: HashMap<string, string> = HttpUrlUtils.getYcgCommonHeaders(); 571 + let url = HttpUrlUtils.getCommentListStatusDataUrl()
  572 + let headers: HashMap<string, string> = HttpUrlUtils.getCommonHeaders();
570 return WDHttp.post<ResponseDTO<QueryCommentListIsLikedItem[]>>(url,object, headers) 573 return WDHttp.post<ResponseDTO<QueryCommentListIsLikedItem[]>>(url,object, headers)
571 }; 574 };
572 575
@@ -607,7 +610,7 @@ class MinePageDatasModel{ @@ -607,7 +610,7 @@ class MinePageDatasModel{
607 610
608 fetchOtherUserFollowListData(object:UserFollowListRequestItem) { 611 fetchOtherUserFollowListData(object:UserFollowListRequestItem) {
609 let url = HttpUrlUtils.getOtherUserFollowListDataUrl()+`?pageSize=${object.pageSize}&pageNum=${object.pageNum}&queryUserId=${object.queryUserId}&userType=${object.userType}&userId=${HttpUrlUtils.getUserId()}` 612 let url = HttpUrlUtils.getOtherUserFollowListDataUrl()+`?pageSize=${object.pageSize}&pageNum=${object.pageNum}&queryUserId=${object.queryUserId}&userType=${object.userType}&userId=${HttpUrlUtils.getUserId()}`
610 - let headers: HashMap<string, string> = HttpUrlUtils.getYcgCommonHeaders(); 613 + let headers: HashMap<string, string> = HttpUrlUtils.getCommonHeaders();
611 return WDHttp.get<ResponseDTO<MineFollowListItem>>(url, headers) 614 return WDHttp.get<ResponseDTO<MineFollowListItem>>(url, headers)
612 }; 615 };
613 616
@@ -622,6 +625,127 @@ class MinePageDatasModel{ @@ -622,6 +625,127 @@ class MinePageDatasModel{
622 return compRes.data 625 return compRes.data
623 } 626 }
624 627
  628 + /**
  629 + * 预约 和取消预约操作
  630 + * @param params
  631 + * @param context
  632 + * @returns
  633 + */
  634 + getAppointmentOperation(params:AppointmentOperationRequestItem,context: Context): Promise<ResponseDTO> {
  635 + return new Promise((success, error) => {
  636 + Logger.info(TAG, `getAppointmentList start`);
  637 + this.fetchAppointmentOperation(params).then((navResDTO: ResponseDTO) => {
  638 + if (!navResDTO || navResDTO.code != 0) {
  639 + success(this.getAppointmentOperationLocal(context))
  640 + return
  641 + }
  642 + Logger.info(TAG, "getAppointmentList then,AppointmentResDTO.timeStamp:" + navResDTO.timestamp);
  643 + success(navResDTO);
  644 + }).catch((err: Error) => {
  645 + Logger.error(TAG, `fetchAppointmentListDataApi catch, error.name : ${err.name}, error.message:${err.message}`);
  646 + success(this.getAppointmentOperationLocal(context))
  647 + })
  648 + })
  649 + }
  650 +
  651 + fetchAppointmentOperation(object:AppointmentOperationRequestItem) {
  652 + let url = HttpUrlUtils.getAppointmentOperationUrl()
  653 + let headers: HashMap<string, string> = HttpUrlUtils.getCommonHeaders();
  654 + return WDHttp.post<ResponseDTO>(url,object, headers)
  655 + };
  656 +
  657 + async getAppointmentOperationLocal(context: Context): Promise<ResponseDTO> {
  658 + Logger.info(TAG, `getMineFollowListDataLocal start`);
  659 + let compRes: ResponseDTO | null = await ResourcesUtils.getResourcesJson<ResponseDTO>(context,'appointment_operation_data.json');
  660 + if (!compRes ) {
  661 + Logger.info(TAG, `getMineFollowListDataLocal compRes is empty`);
  662 + return compRes
  663 + }
  664 + Logger.info(TAG, `getMineFollowListDataLocal getResourcesJsonSync compRes : ${JSON.stringify(compRes)}`);
  665 + return compRes
  666 + }
  667 +
  668 +
  669 + /**
  670 + * 评论点赞操作
  671 + * @param params
  672 + * @param context
  673 + * @returns
  674 + */
  675 + getCommentLikeOperation(params:CommentLikeOperationRequestItem,context: Context): Promise<ResponseDTO> {
  676 + return new Promise((success, error) => {
  677 + Logger.info(TAG, `getAppointmentList start`);
  678 + this.fetchCommentLikeOperation(params).then((navResDTO: ResponseDTO) => {
  679 + if (!navResDTO || navResDTO.code != 0) {
  680 + success(this.getCommentLikeOperationLocal(context))
  681 + return
  682 + }
  683 + Logger.info(TAG, "getAppointmentList then,AppointmentResDTO.timeStamp:" + navResDTO.timestamp);
  684 + success(navResDTO);
  685 + }).catch((err: Error) => {
  686 + Logger.error(TAG, `fetchAppointmentListDataApi catch, error.name : ${err.name}, error.message:${err.message}`);
  687 + success(this.getCommentLikeOperationLocal(context))
  688 + })
  689 + })
  690 + }
  691 +
  692 + fetchCommentLikeOperation(object:CommentLikeOperationRequestItem) {
  693 + let url = HttpUrlUtils.getCommentLikeOperationUrl()
  694 + let headers: HashMap<string, string> = HttpUrlUtils.getCommonHeaders();
  695 + return WDHttp.post<ResponseDTO>(url,object, headers)
  696 + };
  697 +
  698 + async getCommentLikeOperationLocal(context: Context): Promise<ResponseDTO> {
  699 + Logger.info(TAG, `getMineFollowListDataLocal start`);
  700 + let compRes: ResponseDTO | null = await ResourcesUtils.getResourcesJson<ResponseDTO>(context,'comment_like_operation_data.json');
  701 + if (!compRes ) {
  702 + Logger.info(TAG, `getMineFollowListDataLocal compRes is empty`);
  703 + return compRes
  704 + }
  705 + Logger.info(TAG, `getMineFollowListDataLocal getResourcesJsonSync compRes : ${JSON.stringify(compRes)}`);
  706 + return compRes
  707 + }
  708 +
  709 + /**
  710 + * 关注 取消关注 操作
  711 + * @param params
  712 + * @param context
  713 + * @returns
  714 + */
  715 + getFollowOperation(params:FollowOperationRequestItem,context: Context): Promise<ResponseDTO> {
  716 + return new Promise((success, error) => {
  717 + Logger.info(TAG, `getAppointmentList start`);
  718 + this.fetchFollowOperation(params).then((navResDTO: ResponseDTO) => {
  719 + if (!navResDTO || navResDTO.code != 0) {
  720 + success(this.getFollowOperationLocal(context))
  721 + return
  722 + }
  723 + Logger.info(TAG, "getAppointmentList then,AppointmentResDTO.timeStamp:" + navResDTO.timestamp);
  724 + success(navResDTO);
  725 + }).catch((err: Error) => {
  726 + Logger.error(TAG, `fetchAppointmentListDataApi catch, error.name : ${err.name}, error.message:${err.message}`);
  727 + success(this.getFollowOperationLocal(context))
  728 + })
  729 + })
  730 + }
  731 +
  732 + fetchFollowOperation(object:FollowOperationRequestItem) {
  733 + let url = HttpUrlUtils.getFollowOperationUrl()
  734 + let headers: HashMap<string, string> = HttpUrlUtils.getCommonHeaders();
  735 + return WDHttp.post<ResponseDTO>(url,object, headers)
  736 + };
  737 +
  738 + async getFollowOperationLocal(context: Context): Promise<ResponseDTO> {
  739 + Logger.info(TAG, `getMineFollowListDataLocal start`);
  740 + let compRes: ResponseDTO | null = await ResourcesUtils.getResourcesJson<ResponseDTO>(context,'follow_operation_data.json');
  741 + if (!compRes ) {
  742 + Logger.info(TAG, `getMineFollowListDataLocal compRes is empty`);
  743 + return compRes
  744 + }
  745 + Logger.info(TAG, `getMineFollowListDataLocal getResourcesJsonSync compRes : ${JSON.stringify(compRes)}`);
  746 + return compRes
  747 + }
  748 +
625 749
626 } 750 }
627 751
@@ -56,21 +56,21 @@ struct MineHomePage { @@ -56,21 +56,21 @@ struct MineHomePage {
56 Stack(){ 56 Stack(){
57 Image(this.headPhotoUrl) 57 Image(this.headPhotoUrl)
58 .alt($r('app.media.default_head')) 58 .alt($r('app.media.default_head'))
59 - .width('115lpx')  
60 - .height('115lpx')  
61 - .objectFit(ImageFit.Cover) 59 + .width('100lpx')
  60 + .height('100lpx')
  61 + .objectFit(ImageFit.Auto)
62 .borderRadius(50) 62 .borderRadius(50)
63 Image(this.levelHead) 63 Image(this.levelHead)
64 .width('130lpx') 64 .width('130lpx')
65 .height('130lpx') 65 .height('130lpx')
66 .objectFit(ImageFit.Cover) 66 .objectFit(ImageFit.Cover)
67 - .borderRadius(50)  
68 }.onClick(()=>{ 67 }.onClick(()=>{
69 let params: Params = { 68 let params: Params = {
70 - pageID: "512157124138245" 69 + pageID: "531267787833221"//sit 测试用 512157124138245
71 } 70 }
72 WDRouterRule.jumpWithPage(WDRouterPage.otherNormalUserHomePagePage,params) 71 WDRouterRule.jumpWithPage(WDRouterPage.otherNormalUserHomePagePage,params)
73 - }) 72 + }).width('135lpx')
  73 + .height('135lpx')
74 74
75 Column() { 75 Column() {
76 Row() { 76 Row() {
@@ -12,12 +12,17 @@ const TAG = "OtherNormalUserHomePage" @@ -12,12 +12,17 @@ const TAG = "OtherNormalUserHomePage"
12 @Component 12 @Component
13 struct OtherNormalUserHomePage { 13 struct OtherNormalUserHomePage {
14 @State params:Params = router.getParams() as Params; 14 @State params:Params = router.getParams() as Params;
15 - @State curUserId: string = '-1'; 15 + @Watch('change') @State curUserId: string = '-1';
16 16
17 onPageShow() { 17 onPageShow() {
18 this.curUserId = this.params?.pageID; 18 this.curUserId = this.params?.pageID;
19 } 19 }
20 20
  21 + change(){
  22 + this.getUserInfo()
  23 + this.getUserLevel()
  24 + }
  25 +
21 @State tileOpacity: number = 0; 26 @State tileOpacity: number = 0;
22 firstPositionY:number = 0; 27 firstPositionY:number = 0;
23 fontColor: string = '#999999' 28 fontColor: string = '#999999'
@@ -61,8 +66,8 @@ struct OtherNormalUserHomePage { @@ -61,8 +66,8 @@ struct OtherNormalUserHomePage {
61 Stack(){ 66 Stack(){
62 Image(this.headPhotoUrl) 67 Image(this.headPhotoUrl)
63 .alt($r('app.media.default_head')) 68 .alt($r('app.media.default_head'))
64 - .width('115lpx')  
65 - .height('115lpx') 69 + .width('100lpx')
  70 + .height('100lpx')
66 .objectFit(ImageFit.Cover) 71 .objectFit(ImageFit.Cover)
67 .borderRadius(50) 72 .borderRadius(50)
68 Image(this.levelHead) 73 Image(this.levelHead)
@@ -148,6 +153,7 @@ struct OtherNormalUserHomePage { @@ -148,6 +153,7 @@ struct OtherNormalUserHomePage {
148 .padding({ left: '35lpx' }) 153 .padding({ left: '35lpx' })
149 154
150 //用户简介区域 155 //用户简介区域
  156 + if(StringUtils.isNotEmpty(this.desc)){
151 Column() { 157 Column() {
152 Row() { 158 Row() {
153 Text(this.desc) 159 Text(this.desc)
@@ -165,15 +171,14 @@ struct OtherNormalUserHomePage { @@ -165,15 +171,14 @@ struct OtherNormalUserHomePage {
165 .justifyContent(FlexAlign.Center) 171 .justifyContent(FlexAlign.Center)
166 .width('100%') 172 .width('100%')
167 .backgroundColor($r('app.color.white')) 173 .backgroundColor($r('app.color.white'))
168 - .visibility(StringUtils.isEmpty(this.desc)?Visibility.Hidden:Visibility.Visible)  
169 - 174 + }
170 //间隔符 175 //间隔符
171 Divider().width('100%').height('12lpx').color($r('app.color.color_F5F5F5')).strokeWidth('12lpx') 176 Divider().width('100%').height('12lpx').color($r('app.color.color_F5F5F5')).strokeWidth('12lpx')
172 177
173 //tab 页面 178 //tab 页面
174 Tabs({controller: this.controller}) { 179 Tabs({controller: this.controller}) {
175 TabContent() { 180 TabContent() {
176 - OtherHomePageBottomCommentComponent({curUserId:this.curUserId,levelHead:this.levelHead}) 181 + OtherHomePageBottomCommentComponent({curUserId:this.curUserId,levelHead:this.levelHead,commentNum:$commentNum})
177 }.tabBar(this.TabBuilder(0,"评论")) 182 }.tabBar(this.TabBuilder(0,"评论"))
178 TabContent() { 183 TabContent() {
179 OtherHomePageBottomFollowComponent({curUserId:this.curUserId}) 184 OtherHomePageBottomFollowComponent({curUserId:this.curUserId})
@@ -303,6 +308,9 @@ struct OtherNormalUserHomePage { @@ -303,6 +308,9 @@ struct OtherNormalUserHomePage {
303 308
304 309
305 getUserInfo(){ 310 getUserInfo(){
  311 + if(this.curUserId === "-1" ){
  312 + return
  313 + }
306 let item = new OtherUserDetailRequestItem("","1",this.curUserId) 314 let item = new OtherUserDetailRequestItem("","1",this.curUserId)
307 MinePageDatasModel.getOtherUserDetailData(item,getContext(this)).then((value)=>{ 315 MinePageDatasModel.getOtherUserDetailData(item,getContext(this)).then((value)=>{
308 if(value!=null){ 316 if(value!=null){
@@ -320,6 +328,9 @@ struct OtherNormalUserHomePage { @@ -320,6 +328,9 @@ struct OtherNormalUserHomePage {
320 }) 328 })
321 } 329 }
322 getUserLevel(){ 330 getUserLevel(){
  331 + if(this.curUserId === "-1" ){
  332 + return
  333 + }
323 MinePageDatasModel.getOtherUserLevelData([this.curUserId],getContext(this)).then((value)=>{ 334 MinePageDatasModel.getOtherUserLevelData([this.curUserId],getContext(this)).then((value)=>{
324 if(value!=null){ 335 if(value!=null){
325 this.levelHead = value[0].levelHead 336 this.levelHead = value[0].levelHead
@@ -99,7 +99,7 @@ export class PageRepository { @@ -99,7 +99,7 @@ export class PageRepository {
99 } 99 }
100 100
101 /** 101 /**
102 - * 早晚报pageInfo请求 102 + * 早晚报pageInfo请求 TODO 现网无数据写死测试环境
103 * */ 103 * */
104 static getMorningEveningPageInfoUrl(pageId: string) { 104 static getMorningEveningPageInfoUrl(pageId: string) {
105 let url = HttpUrlUtils.getHost() + HttpUrlUtils.MORNING_EVENING_PAGE_INFO_PATH; 105 let url = HttpUrlUtils.getHost() + HttpUrlUtils.MORNING_EVENING_PAGE_INFO_PATH;
@@ -118,7 +118,7 @@ export class PageRepository { @@ -118,7 +118,7 @@ export class PageRepository {
118 * 118 *
119 * 可选 119 * 可选
120 * channelId:频道id 120 * channelId:频道id
121 - * channelStrategy:频道策略 121 + * channelStrategy:频道策略 TODO 现网无数据写死测试环境
122 * topicId:专题id 122 * topicId:专题id
123 * */ 123 * */
124 static getMorningEveningCompInfoUrl(pageId: number, groupId: number, refreshTime: string, topicId: string, pageNum: number, pageSize: number) { 124 static getMorningEveningCompInfoUrl(pageId: number, groupId: number, refreshTime: string, topicId: string, pageNum: number, pageSize: number) {
@@ -32,15 +32,30 @@ export class ProcessUtils { @@ -32,15 +32,30 @@ export class ProcessUtils {
32 Logger.debug(TAG, "processPage, nonsupport!!!"); 32 Logger.debug(TAG, "processPage, nonsupport!!!");
33 ProcessUtils.gotoVod(content) 33 ProcessUtils.gotoVod(content)
34 break; 34 break;
  35 + case ContentConstants.TYPE_AUDIO:
  36 + ProcessUtils.gotoAudio(content)
  37 + break;
35 case ContentConstants.TYPE_TELETEXT: 38 case ContentConstants.TYPE_TELETEXT:
36 // 图文详情,跳转h5 39 // 图文详情,跳转h5
37 ProcessUtils.gotoWeb(content); 40 ProcessUtils.gotoWeb(content);
38 break; 41 break;
  42 + case ContentConstants.TYPE_SPECIAL_TOPIC:
  43 + // 专题详情,跳转h5
  44 + ProcessUtils.gotoSpecialTopic(content);
  45 + break;
39 default: 46 default:
40 break; 47 break;
41 } 48 }
42 } 49 }
43 - 50 + private static gotoSpecialTopic(content: ContentDTO) {
  51 + let taskAction: Action = {
  52 + type: 'JUMP_H5_BY_WEB_VIEW',
  53 + params: {
  54 + url: content.linkUrl
  55 + } as Params,
  56 + };
  57 + WDRouterRule.jumpWithAction(taskAction)
  58 + }
44 private static gotoWeb(content: ContentDTO) { 59 private static gotoWeb(content: ContentDTO) {
45 // // topicId 60 // // topicId
46 // content.channelId; 61 // content.channelId;
@@ -83,4 +98,20 @@ export class ProcessUtils { @@ -83,4 +98,20 @@ export class ProcessUtils {
83 WDRouterRule.jumpWithAction(taskAction) 98 WDRouterRule.jumpWithAction(taskAction)
84 Logger.debug(TAG, `gotoVod, ${content.objectId}`); 99 Logger.debug(TAG, `gotoVod, ${content.objectId}`);
85 } 100 }
  101 + private static gotoAudio(content: ContentDTO) {
  102 + let taskAction: Action = {
  103 + type: 'JUMP_DETAIL_PAGE',
  104 + params: {
  105 + detailPageType: 13,
  106 + contentID: content?.objectId,
  107 + extra:{
  108 + relType: content?.relType,
  109 + relId: content?.relId,
  110 + } as ExtraDTO
  111 + } as Params,
  112 + };
  113 + WDRouterRule.jumpWithAction(taskAction)
  114 + Logger.debug(TAG, `gotoAudio, ${content.objectId}`);
  115 + }
  116 +
86 } 117 }
  1 +// {"relationId":"500000017021","liveId":"20000007348","isSubscribe":false}
  2 +export class AppointmentOperationRequestItem{
  3 + relationId:string = ""
  4 + liveId:string = ""
  5 + isSubscribe:boolean = false
  6 +
  7 + constructor(relationId: string ,liveId: string ,isSubscribe: boolean ) {
  8 + this.relationId = relationId
  9 + this.liveId = liveId
  10 + this.isSubscribe = isSubscribe
  11 + }
  12 +}
  1 +// {
  2 +// "targetId":"30000627490",
  3 +// "commentId":"303318",
  4 +// "targetType":"13",
  5 +// "userName":"人民日报网友aPrtq5",
  6 +// "userHeaderUrl":"https://sitcontentjdcdn.aikan.pdnews.cn//img/user/2024031215/48d5bd53227d436b9faa937b3ac14600.png",
  7 +// "status":1
  8 +// }
  9 +export class CommentLikeOperationRequestItem{
  10 + targetId:string = ""
  11 + commentId:string = ""
  12 + targetType:string = ""
  13 + userName:string = ""
  14 + userHeaderUrl:string = ""
  15 + status:number = 1
  16 +
  17 + constructor(targetId: string, commentId: string, targetType: string , userName: string,
  18 + userHeaderUrl: string , status:number) {
  19 + this.targetId = targetId
  20 + this.commentId = commentId
  21 + this.targetType = targetType
  22 + this.userName = userName
  23 + this.userHeaderUrl = userHeaderUrl
  24 + this.status = status
  25 +}
  26 +
  27 +}
@@ -10,8 +10,11 @@ export class CommentListItem{ @@ -10,8 +10,11 @@ export class CommentListItem{
10 likeNum:number = 0 10 likeNum:number = 0
11 like_status:number = 0 11 like_status:number = 0
12 id:number = 0 12 id:number = 0
  13 + targetId:string = ""
  14 + targetType:number = 0
13 15
14 - constructor(fromUserHeader:string,fromUserName:string,targetTitle:string,createTime:string,commentContent:string,likeNum:number,like_status:number,id:number) { 16 +
  17 + constructor(fromUserHeader:string,fromUserName:string,targetTitle:string,createTime:string,commentContent:string,likeNum:number,like_status:number,id:number,targetId:string,targetType:number) {
15 this.fromUserHeader = fromUserHeader 18 this.fromUserHeader = fromUserHeader
16 this.fromUserName = fromUserName 19 this.fromUserName = fromUserName
17 this.commentContent = commentContent 20 this.commentContent = commentContent
@@ -20,5 +23,7 @@ export class CommentListItem{ @@ -20,5 +23,7 @@ export class CommentListItem{
20 this.likeNum = likeNum 23 this.likeNum = likeNum
21 this.like_status = like_status 24 this.like_status = like_status
22 this.id = id 25 this.id = id
  26 + this.targetId = targetId
  27 + this.targetType = targetType
23 } 28 }
24 } 29 }
@@ -3,6 +3,7 @@ import { EditInfoModel, EditListInfo, editModel } from '../model/EditInfoModel'; @@ -3,6 +3,7 @@ import { EditInfoModel, EditListInfo, editModel } from '../model/EditInfoModel';
3 import HashMap from '@ohos.util.HashMap'; 3 import HashMap from '@ohos.util.HashMap';
4 import { HttpUrlUtils, ResponseDTO, WDHttp } from 'wdNetwork'; 4 import { HttpUrlUtils, ResponseDTO, WDHttp } from 'wdNetwork';
5 import { Logger, ResourcesUtils } from 'wdKit'; 5 import { Logger, ResourcesUtils } from 'wdKit';
  6 +import { AreaListManageModel, AreaListModel } from '../model/AreaListModel';
6 7
7 const TAG = "EditInfoViewModel" 8 const TAG = "EditInfoViewModel"
8 9
@@ -27,13 +28,13 @@ class EditInfoViewModel { @@ -27,13 +28,13 @@ class EditInfoViewModel {
27 } 28 }
28 29
29 30
30 - getEditListInfo(item:editModel):EditListInfo[]{ 31 + getEditListInfo(item?:editModel):EditListInfo[]{
31 this.editListData = [ 32 this.editListData = [
32 - // new EditListInfo('昵称',item&&item.userName?item.userName:'待完善'),  
33 - // new EditListInfo('简介',item&&item.userExtend.introduction?item.userExtend.introduction:'待完善'),  
34 - // new EditListInfo('地区',item&&item.userExtend.city?item.userExtend.city:'待完善'),  
35 - // new EditListInfo('生日',item&&item.userExtend.birthday?item.userExtend.birthday:'待完善'),  
36 - // new EditListInfo('性别',item&&item.userExtend.sex?item.userExtend.sex:'待完善'), 33 + new EditListInfo('昵称',item&&item.userName?item.userName:'待完善'),
  34 + new EditListInfo('简介',item&&item.userExtend.introduction?item.userExtend.introduction:'待完善'),
  35 + new EditListInfo('地区',item&&item.userExtend.city?item.userExtend.city:'待完善'),
  36 + new EditListInfo('生日',item&&item.userExtend.birthday?item.userExtend.birthday:'待完善'),
  37 + new EditListInfo('性别',item&&item.userExtend.sex?item.userExtend.sex===1?'男':'女':'待完善'),
37 ] 38 ]
38 return this.editListData 39 return this.editListData
39 } 40 }
@@ -46,10 +47,10 @@ class EditInfoViewModel { @@ -46,10 +47,10 @@ class EditInfoViewModel {
46 // let editM = navResDTO.data as EditInfoModel 47 // let editM = navResDTO.data as EditInfoModel
47 // success(JSON.parse(navResDTO.data) 48 // success(JSON.parse(navResDTO.data)
48 } 49 }
49 - return this.GetqueryAccountOwnerLocal(context) 50 + success(this.GetqueryAccountOwnerLocal(context))
50 }).catch((error: Error) => { 51 }).catch((error: Error) => {
51 Logger.info('EditInfoViewModel','EditInfoViewModel','EditInfoViewModel') 52 Logger.info('EditInfoViewModel','EditInfoViewModel','EditInfoViewModel')
52 - return this.GetqueryAccountOwnerLocal(context) 53 + success(this.GetqueryAccountOwnerLocal(context))
53 54
54 }) 55 })
55 })) 56 }))
@@ -66,6 +67,38 @@ class EditInfoViewModel { @@ -66,6 +67,38 @@ class EditInfoViewModel {
66 return compRes.data 67 return compRes.data
67 } 68 }
68 69
  70 + getAreaList(context: Context):PromiseLike<AreaListModel[]>{
  71 + return new Promise(((success, error) => {
  72 + success(this.getAreaListLocal(context))
  73 + // this.BaseGetRequest(HttpUrlUtils.APPOINTMENT_AccountOwner_PATH).then((navResDTO:ResponseDTO) =>{
  74 + // if (navResDTO.code == 200) {
  75 + // // let editM = navResDTO.data as EditInfoModel
  76 + // // success(JSON.parse(navResDTO.data)
  77 + // }
  78 + //
  79 + // }).catch((error: Error) => {
  80 + // Logger.info('EditInfoViewModel','EditInfoViewModel','EditInfoViewModel')
  81 + // success(this.GetqueryAccountOwnerLocal(context))
  82 + //
  83 + // })
  84 + }))
  85 + }
  86 +
  87 + async getAreaListLocal(context: Context): Promise<AreaListModel[]> {
  88 + Logger.info(TAG, `getBottomNavDataMock start`);
  89 + let compRes: ResponseDTO<AreaListModel[]> | null = await ResourcesUtils.getResourcesJson<ResponseDTO<AreaListModel[]>>(context,'areaList_data.json');
  90 + if (!compRes || !compRes.data) {
  91 + Logger.info(TAG, `getAppointmentListDataLocal compRes is empty`);
  92 + return [] as AreaListModel[]
  93 + }
  94 + Logger.info(TAG, `getAppointmentListDataLocal getResourcesJsonSync compRes : ${JSON.stringify(compRes)}`);
  95 + return compRes.data
  96 + }
  97 +
  98 + getAreaListManageModel(item:AreaListModel):AreaListManageModel{
  99 + return new AreaListManageModel(item.code,item.id,item.label,item.children)
  100 + }
  101 +
69 updateUserInfo(){ 102 updateUserInfo(){
70 103
71 } 104 }
@@ -69,13 +69,18 @@ export class FollowListDetailItem{ @@ -69,13 +69,18 @@ export class FollowListDetailItem{
69 creatorId:string = "" 69 creatorId:string = ""
70 attentionUserId:string = "" 70 attentionUserId:string = ""
71 71
  72 + cnUserType:string = ""
  73 + cnUserId:string = ""
  74 +
72 attentionCreatorId:string = "" 75 attentionCreatorId:string = ""
  76 + attentionUserType:string = ""
  77 +
73 attentionHeadPhotoUrl:string = "" 78 attentionHeadPhotoUrl:string = ""
74 attentionUserName:string = "" 79 attentionUserName:string = ""
75 fansNum :number = 0 80 fansNum :number = 0
76 81
77 82
78 - constructor(headPhotoUrl:string,cnUserName:string,cnFansNum:number,introduction:string,creatorId:string,status:string,attentionUserId:string) { 83 + constructor(headPhotoUrl:string,cnUserName:string,cnFansNum:number,introduction:string,creatorId:string,status:string,attentionUserId:string,cnUserType:string,cnUserId:string) {
79 this.headPhotoUrl = headPhotoUrl 84 this.headPhotoUrl = headPhotoUrl
80 this.cnUserName = cnUserName 85 this.cnUserName = cnUserName
81 this.cnFansNum = cnFansNum 86 this.cnFansNum = cnFansNum
@@ -83,5 +88,7 @@ export class FollowListDetailItem{ @@ -83,5 +88,7 @@ export class FollowListDetailItem{
83 this.creatorId = creatorId 88 this.creatorId = creatorId
84 this.status = status 89 this.status = status
85 this.attentionUserId = attentionUserId 90 this.attentionUserId = attentionUserId
  91 + this.cnUserType = cnUserType
  92 + this.cnUserId = cnUserId
86 } 93 }
87 } 94 }
  1 +// {
  2 +// "attentionUserType":"2",
  3 +// "attentionUserId":"444911718724933",
  4 +// "attentionCreatorId":"3004861",
  5 +// "userType":1,
  6 +// "userId":"567387477063621",
  7 +// "status":1
  8 +// }
  9 +export class FollowOperationRequestItem{
  10 + attentionUserType:string = ""
  11 + attentionUserId:string = ""
  12 + attentionCreatorId:string = ""
  13 + userType:string = ""
  14 + userId:string = ""
  15 + status:number = 1
  16 +
  17 + constructor(attentionUserType:string, attentionUserId:string, attentionCreatorId:string, userType:string, userId:string, status:number) {
  18 + this.attentionUserType = attentionUserType
  19 + this.attentionUserId = attentionUserId
  20 + this.attentionCreatorId = attentionCreatorId
  21 + this.userType = userType
  22 + this.userId = userId
  23 + this.status = status
  24 + }
  25 +
  26 +}
@@ -18,8 +18,8 @@ export class MineAppointmentItem{ @@ -18,8 +18,8 @@ export class MineAppointmentItem{
18 isAppointment:boolean 18 isAppointment:boolean
19 19
20 20
21 - constructor(imageUrl:string[],status:string,title:string,isAppointment:boolean,timePre:string,timeBack:string,relType:number,appStyle?:string,liveId?:number,planStartTime?:string,  
22 - relId?:string,startTime?:string) { 21 + constructor(imageUrl:string[],status:string,title:string,isAppointment:boolean,timePre:string,timeBack:string,relType:number,liveId:number,
  22 + relId:string) {
23 this.imageUrl=imageUrl 23 this.imageUrl=imageUrl
24 this.status=status 24 this.status=status
25 this.title=title 25 this.title=title
@@ -27,5 +27,7 @@ export class MineAppointmentItem{ @@ -27,5 +27,7 @@ export class MineAppointmentItem{
27 this.timePre = timePre 27 this.timePre = timePre
28 this.timeBack = timeBack 28 this.timeBack = timeBack
29 this.relType = relType 29 this.relType = relType
  30 + this.liveId = liveId
  31 + this.relId = relId
30 } 32 }
31 } 33 }
@@ -119,6 +119,14 @@ @@ -119,6 +119,14 @@
119 { 119 {
120 "name": "color_99636363", 120 "name": "color_99636363",
121 "value": "#99636363" 121 "value": "#99636363"
  122 + },
  123 + {
  124 + "name":"color_648DF2",
  125 + "value": "#648DF2"
  126 + },
  127 + {
  128 + "name":"color_EEEEEE",
  129 + "value": "#EEEEEE"
122 } 130 }
123 ] 131 ]
124 } 132 }
@@ -13,6 +13,12 @@ export interface ContentDetailRequestParams { @@ -13,6 +13,12 @@ export interface ContentDetailRequestParams {
13 relType: string 13 relType: string
14 } 14 }
15 15
  16 +export interface recommentVideoListParame {
  17 + pageSize: number;
  18 + refreshCnt: number;
  19 +}
  20 +
  21 +
16 export class ContentDetailRequest { 22 export class ContentDetailRequest {
17 static getContentDetailDataMock(context: Context): Promise<ResponseDTO<ContentDetailDTO[]>> { 23 static getContentDetailDataMock(context: Context): Promise<ResponseDTO<ContentDetailDTO[]>> {
18 Logger.info(TAG, `getContentDetailDataMock start`); 24 Logger.info(TAG, `getContentDetailDataMock start`);
@@ -26,10 +32,10 @@ export class ContentDetailRequest { @@ -26,10 +32,10 @@ export class ContentDetailRequest {
26 /** 32 /**
27 * 新闻内容详情【get】接口 33 * 新闻内容详情【get】接口
28 */ 34 */
29 - static readonly CONTENT_DETAIL_PATH: string = "/api/rmrb-bff-display-zh/content/zh/c/content/detail"; 35 + // static readonly CONTENT_DETAIL_PATH: string = "/api/rmrb-bff-display-zh/content/zh/c/content/detail";
30 36
31 static getContentDetailUrl(contentId: string, relId: string, relType: string) { 37 static getContentDetailUrl(contentId: string, relId: string, relType: string) {
32 - let url = HttpUrlUtils.getHost() + ContentDetailRequest.CONTENT_DETAIL_PATH 38 + let url = HttpUrlUtils.getHost() + HttpUrlUtils.DETAIL_PATH
33 url = url + "?&contentId=" + contentId 39 url = url + "?&contentId=" + contentId
34 + "&relId=" + relId 40 + "&relId=" + relId
35 + "&relType=" + relType; 41 + "&relType=" + relType;
@@ -44,4 +50,46 @@ export class ContentDetailRequest { @@ -44,4 +50,46 @@ export class ContentDetailRequest {
44 let headers: HashMap<string, string> = HttpUrlUtils.getCommonHeaders(); 50 let headers: HashMap<string, string> = HttpUrlUtils.getCommonHeaders();
45 return WDHttp.get<ResponseDTO<ContentDetailDTO[]>>(url, headers) 51 return WDHttp.get<ResponseDTO<ContentDetailDTO[]>>(url, headers)
46 } 52 }
  53 +
  54 + /**
  55 + *
  56 + * @returns
  57 + */
  58 + static getContentInteract() {
  59 + let url = HttpUrlUtils.getHost() + HttpUrlUtils.INTERACT_DATA_PATH
  60 + let headers: HashMap<string, string> = HttpUrlUtils.getCommonHeaders();
  61 + return WDHttp.get(url, headers)
  62 + }
  63 +
  64 + /**
  65 + *
  66 + * @returns
  67 + */
  68 + static postBatchLikeAndCollectStatus() {
  69 + let url = HttpUrlUtils.getHost() + HttpUrlUtils.INTERACT_DATA_STATUS
  70 + let headers: HashMap<string, string> = HttpUrlUtils.getCommonHeaders();
  71 + return WDHttp.post(url, headers)
  72 + }
  73 +
  74 + /**
  75 + *
  76 + * @returns
  77 + */
  78 + static postBatchAttentionStatus() {
  79 + let url = HttpUrlUtils.getHost() + HttpUrlUtils.FOLLOW_LIST_STATUS_DATA_PATH
  80 + let headers: HashMap<string, string> = HttpUrlUtils.getCommonHeaders();
  81 + return WDHttp.post(url, headers)
  82 + }
  83 +
  84 +
  85 + /**
  86 + * 沉浸式視頻查詢近20条数据
  87 + * @returns
  88 + */
  89 +
  90 + static postRecommendVideoList(params: recommentVideoListParame): Promise<ResponseDTO<ContentDetailDTO[]>> {
  91 + let url = HttpUrlUtils.getHost() + HttpUrlUtils.RECOMMEND_VIDEOLIST
  92 + let headers: HashMap<string, string> = HttpUrlUtils.getCommonHeaders();
  93 + return WDHttp.post0(url, params, headers)
  94 + }
47 } 95 }
1 import router from '@ohos.router'; 1 import router from '@ohos.router';
2 import mediaquery from '@ohos.mediaquery'; 2 import mediaquery from '@ohos.mediaquery';
3 import window from '@ohos.window'; 3 import window from '@ohos.window';
4 -import { Action, RmhInfoDTO, UserInfoDTO } from 'wdBean'; 4 +import { Action, ContentDetailDTO, RmhInfoDTO, UserInfoDTO } from 'wdBean';
5 import { Logger, SPHelper, WindowModel } from 'wdKit'; 5 import { Logger, SPHelper, WindowModel } from 'wdKit';
6 import { PlayerConstants, WDPlayerController, WDPlayerRenderView } from 'wdPlayer'; 6 import { PlayerConstants, WDPlayerController, WDPlayerRenderView } from 'wdPlayer';
7 import { devicePLSensorManager } from 'wdDetailPlayApi'; 7 import { devicePLSensorManager } from 'wdDetailPlayApi';
@@ -15,12 +15,15 @@ const TAG = 'DetailPlayShortVideoPage'; @@ -15,12 +15,15 @@ const TAG = 'DetailPlayShortVideoPage';
15 /** 15 /**
16 * 详情&短视频播放页面 16 * 详情&短视频播放页面
17 */ 17 */
18 -@Entry 18 +
19 @Component 19 @Component
20 export struct DetailPlayShortVideoPage { 20 export struct DetailPlayShortVideoPage {
21 private contentId?: string = undefined 21 private contentId?: string = undefined
22 private relId?: string = undefined 22 private relId?: string = undefined
23 private relType?: string = undefined 23 private relType?: string = undefined
  24 + private contentDetailData: ContentDetailDTO | undefined = undefined
  25 + @Prop @Watch('currentIndexChange') currentIndex: number = 0
  26 + private index: number = 0
24 private playerController: WDPlayerController = new WDPlayerController(); 27 private playerController: WDPlayerController = new WDPlayerController();
25 @Watch("urlChanged") @State url?: string = undefined 28 @Watch("urlChanged") @State url?: string = undefined
26 @Watch('changeContinue') @Provide nextContId?: string = ''; 29 @Watch('changeContinue') @Provide nextContId?: string = '';
@@ -55,7 +58,21 @@ export struct DetailPlayShortVideoPage { @@ -55,7 +58,21 @@ export struct DetailPlayShortVideoPage {
55 this.userInfo = this.playVM.userInfo 58 this.userInfo = this.playVM.userInfo
56 } 59 }
57 60
  61 + currentIndexChange() {
  62 + console.log('currentIndexChange====', this.currentIndex)
  63 + if (this.currentIndex != this.index) {
  64 + this.playerController.pause()
  65 + } else {
  66 + console.log('currentIndexChange====1', this.playerController)
  67 + this.playerController.switchPlayOrPause()
  68 + }
  69 + }
  70 +
58 aboutToAppear() { 71 aboutToAppear() {
  72 + console.log('开始设置setContentDetailData', JSON.stringify(this.contentDetailData))
  73 +
  74 + this.playVM.setContentDetailData(this.contentDetailData)
  75 +
59 let action: Action = router.getParams() as Action 76 let action: Action = router.getParams() as Action
60 Logger.info(TAG, "action", JSON.stringify(action)) 77 Logger.info(TAG, "action", JSON.stringify(action))
61 if (action) { 78 if (action) {
@@ -79,12 +96,23 @@ export struct DetailPlayShortVideoPage { @@ -79,12 +96,23 @@ export struct DetailPlayShortVideoPage {
79 } 96 }
80 WindowModel.shared.setMainWindowFullScreen(this.isFullScreen) 97 WindowModel.shared.setMainWindowFullScreen(this.isFullScreen)
81 }) 98 })
  99 + console.error('111,', this.index, this.currentIndex)
  100 + if (this.index == 0 && this.currentIndex === this.index) {
  101 + setTimeout(() => {
  102 + this.playerController.play()
  103 + }, 2000)
  104 +
  105 + }
82 } 106 }
83 107
84 onPageShow() { 108 onPageShow() {
85 WindowModel.shared.setPreferredOrientation(window.Orientation.AUTO_ROTATION_RESTRICTED); 109 WindowModel.shared.setPreferredOrientation(window.Orientation.AUTO_ROTATION_RESTRICTED);
86 } 110 }
87 111
  112 + aboutToDisappear(): void {
  113 + this.playerController?.pause();
  114 + }
  115 +
88 onPageHide() { 116 onPageHide() {
89 WindowModel.shared.setPreferredOrientation(window.Orientation.PORTRAIT); 117 WindowModel.shared.setPreferredOrientation(window.Orientation.PORTRAIT);
90 devicePLSensorManager.devicePLSensorOff(); 118 devicePLSensorManager.devicePLSensorOff();
@@ -100,12 +128,16 @@ export struct DetailPlayShortVideoPage { @@ -100,12 +128,16 @@ export struct DetailPlayShortVideoPage {
100 onLoad: async () => { 128 onLoad: async () => {
101 console.log('onload==', this.contentId, this.relId, this.relType) 129 console.log('onload==', this.contentId, this.relId, this.relType)
102 // this.playVM.playWithContentId(this.contentId ?? "846899373") 130 // this.playVM.playWithContentId(this.contentId ?? "846899373")
103 - this.playVM.playWithIds(this.contentId ?? "846899373",  
104 - this.relId ?? "500000301942", this.relType ?? "1") 131 + this.playVM.playWithIds(this.contentId,
  132 + this.relId, this.relType)
105 } 133 }
106 }) 134 })
107 .height('100%') 135 .height('100%')
108 .width('100%') 136 .width('100%')
  137 + .onClick(() => {
  138 + console.error('WDPlayerRenderView=== onClick')
  139 + this.playerController?.switchPlayOrPause();
  140 + })
109 } 141 }
110 142
111 @Builder 143 @Builder
@@ -130,16 +162,21 @@ export struct DetailPlayShortVideoPage { @@ -130,16 +162,21 @@ export struct DetailPlayShortVideoPage {
130 playerView: () => { 162 playerView: () => {
131 this.playerViewContainerBuilder() 163 this.playerViewContainerBuilder()
132 }, playControlView: () => { 164 }, playControlView: () => {
133 - this.playControlViewContainerBuilder() 165 + // this.playControlViewContainerBuilder()
134 }, detailView: () => { 166 }, detailView: () => {
135 this.detailContainerBuilder() 167 this.detailContainerBuilder()
136 } 168 }
137 }) 169 })
138 .height('100%') 170 .height('100%')
139 .width('100%') 171 .width('100%')
  172 + .onClick(() => {
  173 + console.error('PlayerDetailContainer=== onClick')
  174 + this.playerController?.switchPlayOrPause();
  175 + })
140 } 176 }
141 .height('100%') 177 .height('100%')
142 .width('100%') 178 .width('100%')
  179 +
143 .backgroundColor(Color.Black) 180 .backgroundColor(Color.Black)
144 } 181 }
145 182
  1 +import { Action, ContentDetailDTO } from 'wdBean/Index';
  2 +import { ContentDetailRequest } from 'wdDetailPlayApi/Index'
  3 +import { ResponseDTO } from 'wdNetwork/Index';
  4 +import { DetailPlayShortVideoPage } from './DetailPlayShortVideoPage'
  5 +import { Test } from './Test'
  6 +import router from '@ohos.router';
  7 +import window from '@ohos.window';
  8 +
  9 +@Entry
  10 +@Component
  11 +export struct DetailVideoListPage {
  12 + private contentId: string = ''
  13 + private relId: string = ''
  14 + private relType: string = ''
  15 + private swiperController: SwiperController = new SwiperController()
  16 + @State data: ContentDetailDTO[] = []
  17 + @State testData: string[] = ['111', '222', '333']
  18 + @State currentIndex: number = 0
  19 +
  20 + async aboutToAppear(): Promise<void> {
  21 + console.error('=================',)
  22 + let data: ContentDetailDTO[] = []
  23 + let action: Action = router.getParams() as Action
  24 + if (action) {
  25 + this.contentId = action.params?.contentID || ''
  26 + if (action.params && action.params.extra) {
  27 + this.relId = action.params.extra.relId || ''
  28 + this.relType = action.params.extra.relType || ''
  29 + }
  30 + await ContentDetailRequest.getContentDetail({
  31 + contentId: this.contentId,
  32 + relId: this.relId,
  33 + relType: this.relType
  34 + }).then((resDTO: ResponseDTO<ContentDetailDTO[]>) => {
  35 + console.error('resDTO==', JSON.stringify(resDTO.data))
  36 + if (resDTO.data) {
  37 + data.push(resDTO.data[0])
  38 + }
  39 +
  40 + })
  41 + }
  42 +
  43 + await ContentDetailRequest.postRecommendVideoList({
  44 + pageSize: 10,
  45 + refreshCnt: 1
  46 + }).then(res => {
  47 + if (res.data) {
  48 + data = data.concat(res.data)
  49 + }
  50 + // this.data = res.data || []
  51 + console.log('res1===', JSON.stringify(res))
  52 + console.log('res==' + this.data)
  53 + })
  54 +
  55 + this.data = data
  56 + console.error('aboutToAppear===', this.data.length)
  57 +
  58 +
  59 + }
  60 +
  61 + build() {
  62 + Column() {
  63 + Swiper(this.swiperController) {
  64 +
  65 + ForEach(this.data, (item: ContentDetailDTO, index: number) => {
  66 + Column() {
  67 + DetailPlayShortVideoPage({
  68 + contentDetailData: item,
  69 + currentIndex: this.currentIndex,
  70 + index: index
  71 + })
  72 + }.width('100%')
  73 + .height('100%')
  74 + }, (item: ContentDetailDTO) => item.newsId + '')
  75 +
  76 + // ForEach(this.testData, (item: string, index: number) => {
  77 + // Column() {
  78 + // Test({ currentItem: item, currentIndex: this.currentIndex, index: index })
  79 + // }
  80 + // .width('100%')
  81 + // .height('100%')
  82 + // }, (item: string) => item)
  83 +
  84 + }
  85 + .cachedCount(0)
  86 + .indicator(false)
  87 + .vertical(true)
  88 + .loop(false)
  89 + .width('100%')
  90 + .height('100%')
  91 +
  92 + .onChange((index: number) => {
  93 + this.currentIndex = index
  94 + console.info('onChange==', index.toString())
  95 + })
  96 +
  97 + }.width('100%').height('100%')
  98 + }
  99 +}
  1 +@Entry
  2 +@Component
  3 +export struct Test {
  4 + @Prop currentItem: string = '';
  5 + @Prop @Watch('currentIndexChange') currentIndex: number = 0;
  6 + @Prop index: number = 0;
  7 +
  8 + currentIndexChange() {
  9 + console.log('currentIndexChange====', this.currentIndex);
  10 + }
  11 +
  12 + build() {
  13 + Row() {
  14 + Column() {
  15 + Text('currentItem: ' + this.currentItem).fontSize(30)
  16 + Text('currentIndex: ' + this.currentIndex).fontSize(30)
  17 + Text('index: ' + this.index).fontSize(30)
  18 + }
  19 + }
  20 + }
  21 +}
1 /** 1 /**
2 * 详情view&播放器view的容器布局组件 2 * 详情view&播放器view的容器布局组件
3 */ 3 */
4 -@Entry 4 +
5 @Component 5 @Component
6 export struct PlayerDetailContainer { 6 export struct PlayerDetailContainer {
7 @BuilderParam playerView: () => void 7 @BuilderParam playerView: () => void
@@ -77,9 +77,10 @@ export struct PlayerDetailContainer { @@ -77,9 +77,10 @@ export struct PlayerDetailContainer {
77 .zIndex(1) 77 .zIndex(1)
78 } 78 }
79 .width('100%') 79 .width('100%')
  80 + .height('100%')
80 // .aspectRatio(this.isFullScreen ? 0.1 : 16 / 9.0) // 若width值确定,当aspectRatio值越小,则height值越大 81 // .aspectRatio(this.isFullScreen ? 0.1 : 16 / 9.0) // 若width值确定,当aspectRatio值越小,则height值越大
81 - .height(this.isFullScreen ? '100%' : this.buildVideoHeight())  
82 - .margin({ top: this.isFullScreen ? 0 : this.buildVideoTo() }) 82 + // .height(this.isFullScreen ? '100%' : this.buildVideoHeight())
  83 + // .margin({ top: this.isFullScreen ? 0 : this.buildVideoTo() })
83 // .margin({ bottom: this.isFullScreen ? 0 : this.buildVideoBottom() }) 84 // .margin({ bottom: this.isFullScreen ? 0 : this.buildVideoBottom() })
84 .alignRules({ 85 .alignRules({
85 top: { anchor: '__container__', align: VerticalAlign.Top }, 86 top: { anchor: '__container__', align: VerticalAlign.Top },
@@ -102,5 +103,6 @@ export struct PlayerDetailContainer { @@ -102,5 +103,6 @@ export struct PlayerDetailContainer {
102 } 103 }
103 .width('100%') 104 .width('100%')
104 .height('100%') 105 .height('100%')
  106 +
105 } 107 }
106 } 108 }
@@ -29,33 +29,33 @@ export struct PlayerTitleComment { @@ -29,33 +29,33 @@ export struct PlayerTitleComment {
29 29
30 build() { 30 build() {
31 Column() { 31 Column() {
32 - Column() {  
33 - Row() {  
34 - Image($r('app.media.ic_switch_orientation'))  
35 - .width(34)  
36 - .aspectRatio(1)  
37 - .objectFit(ImageFit.Contain)  
38 - .padding({ left: 10, right: 5 })  
39 - Text("全屏观看")  
40 - .fontColor(Color.White)  
41 - .fontSize('14fp')  
42 - .maxLines(2)  
43 - .layoutWeight(1)  
44 - }  
45 - .width(100)  
46 - .backgroundColor(Color.Gray)  
47 - .borderRadius(10)  
48 - .alignItems(VerticalAlign.Center)  
49 - .visibility(this.videoLandScape == 2 ? Visibility.Hidden : Visibility.Visible)  
50 - .onClick(() => {  
51 - this.isFullScreen = !this.isFullScreen;  
52 - WindowModel.shared.setPreferredOrientation(window.Orientation.LANDSCAPE);  
53 - devicePLSensorManager.devicePLSensorOn(window.Orientation.LANDSCAPE);  
54 - })  
55 - }  
56 - .width('100%')  
57 - // .margin({ bottom: 120 })  
58 - .alignItems(HorizontalAlign.Center) 32 + // Column() {
  33 + // Row() {
  34 + // Image($r('app.media.ic_switch_orientation'))
  35 + // .width(34)
  36 + // .aspectRatio(1)
  37 + // .objectFit(ImageFit.Contain)
  38 + // .padding({ left: 10, right: 5 })
  39 + // Text("全屏观看")
  40 + // .fontColor(Color.White)
  41 + // .fontSize('14fp')
  42 + // .maxLines(2)
  43 + // .layoutWeight(1)
  44 + // }
  45 + // .width(100)
  46 + // .backgroundColor(Color.Gray)
  47 + // .borderRadius(10)
  48 + // .alignItems(VerticalAlign.Center)
  49 + // .visibility(this.videoLandScape == 2 ? Visibility.Hidden : Visibility.Visible)
  50 + // .onClick(() => {
  51 + // this.isFullScreen = !this.isFullScreen;
  52 + // WindowModel.shared.setPreferredOrientation(window.Orientation.LANDSCAPE);
  53 + // devicePLSensorManager.devicePLSensorOn(window.Orientation.LANDSCAPE);
  54 + // })
  55 + // }
  56 + // .width('100%')
  57 + // // .margin({ bottom: 120 })
  58 + // .alignItems(HorizontalAlign.Center)
59 59
60 Row() { 60 Row() {
61 Column() { 61 Column() {
@@ -26,25 +26,48 @@ export class PlayViewModel { @@ -26,25 +26,48 @@ export class PlayViewModel {
26 canStart?: boolean 26 canStart?: boolean
27 message?: string 27 message?: string
28 28
29 - constructor() { 29 + constructor(contentId: string = '', relId: string = '', relType: string = '') {
30 // todo: 30 // todo:
31 - this.contentId = '30013266075'  
32 - this.relId = '500000301942'  
33 - this.relType = '1' 31 + this.contentId = contentId // '30013266075'
  32 + this.relId = relId // '500000301942'
  33 + this.relType = relType // '1'
34 34
35 // this.getGlobalInfo(); 35 // this.getGlobalInfo();
36 } 36 }
37 37
38 playWithContentId(contentId: string) { 38 playWithContentId(contentId: string) {
39 this.contentId = contentId; 39 this.contentId = contentId;
40 - this.getContentDetailData() // 包括播放地址PlayUrl 40 + // this.getContentDetailData() // 包括播放地址PlayUrl
41 } 41 }
42 42
43 playWithIds(contentId: string, relId: string, relType: string) { 43 playWithIds(contentId: string, relId: string, relType: string) {
44 this.contentId = contentId; 44 this.contentId = contentId;
45 this.relId = relId; 45 this.relId = relId;
46 this.relType = relType; 46 this.relType = relType;
47 - this.getContentDetailData() // 包括播放地址PlayUrl 47 + // this.getContentDetailData() // 包括播放地址PlayUrl
  48 + }
  49 +
  50 + setContentDetailData(data: ContentDetailDTO | undefined) {
  51 + if (!data) {
  52 + Logger.error(TAG, 'setContentDetailData is empty');
  53 + return
  54 + }
  55 +
  56 + Logger.info(TAG, JSON.stringify(data))
  57 + this.newsTitle = data.newsTitle
  58 + this.editorName = data.editorName
  59 + this.newsSummary = data.newsSummary
  60 + this.userInfo = data.userInfo
  61 + this.rmhInfo = data.rmhInfo
  62 + if (data.videoInfo?.length > 0) {
  63 + this.url = data.videoInfo[0].videoUrl
  64 + this.videoLandScape = data.videoInfo[0].videoLandScape
  65 + }
  66 + if (data.authorList?.length > 0) {
  67 + this.newsSourceName = data.authorList[0].authorName
  68 + }
  69 + this.canStart = true;
  70 + this.message = '';
48 } 71 }
49 72
50 getContentDetailData() { 73 getContentDetailData() {
1 { 1 {
2 "src": [ 2 "src": [
3 - "pages/DetailPlayShortVideoPage" 3 + "pages/DetailVideoListPage",
  4 + "pages/Test"
4 ] 5 ]
5 } 6 }
1 { 1 {
2 - "lockfileVersion": 2, 2 + "lockfileVersion": 1,
3 "ATTENTION": "THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.", 3 "ATTENTION": "THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.",
4 - "specifiers": {  
5 - "@ohos/axios@^2.1.1": "@ohos/axios@2.2.0"  
6 - },  
7 - "packages": {  
8 - "@ohos/axios@2.2.0": {  
9 - "resolved": "https://repo.harmonyos.com/ohpm/@ohos/axios/-/axios-2.2.0.har",  
10 - "integrity": "sha512-v1QBWk6DfcN8wUW3D0ieFbHTR1taSI5cOgxp5l6B5cegXuNYhSc8ggKlAIXe6h/14LsfM+NW0ZGfSXcNEIM5yA==",  
11 - "registryType": "ohpm"  
12 - }  
13 - } 4 + "specifiers": {},
  5 + "packages": {}
14 } 6 }
  1 +import { WDRouterRule } from 'wdRouter';
  2 +import { WDRouterPage } from 'wdRouter';
  3 +
  4 +@Entry
  5 +@Component
  6 +struct GuidePages {
  7 + guideImage = [$r('app.media.guide_static1'), $r('app.media.guide_static2'), $r('app.media.guide_static3'), $r('app.media.guide_static4')]
  8 + guideTitle = [$r('app.media.guide_title1'), $r('app.media.guide_title2'), $r('app.media.guide_title3'), $r('app.media.guide_title4')]
  9 + guideIndex = [$r('app.media.guide_index1'), $r('app.media.guide_index2'), $r('app.media.guide_index3'), $r('app.media.guide_button')]
  10 +
  11 + build() {
  12 + Column() {
  13 + Swiper() {
  14 + ForEach(this.guideImage, (item: number, index: number) => {
  15 + this.ChildItem(index)
  16 +
  17 + }, (item: number) => JSON.stringify(item))
  18 + }.loop(false)
  19 + .indicator(false)
  20 + .width('100%')
  21 + .height('100%')
  22 + }.width('100%')
  23 + .height('100%')
  24 +
  25 + }
  26 +
  27 + @Builder
  28 + ChildItem(index: number) {
  29 + RelativeContainer() {
  30 + Image(this.guideImage[index])
  31 + .alignRules({
  32 + top: { anchor: "__container__", align: VerticalAlign.Top },
  33 + bottom: { anchor: "__container__", align: VerticalAlign.Bottom }
  34 + })
  35 + .width('100%')
  36 + .height('100%')
  37 + .id('image')
  38 + Image(this.guideTitle[index])
  39 + .objectFit(ImageFit.ScaleDown)
  40 + .alignRules({
  41 + bottom: { anchor: "__container__", align: VerticalAlign.Bottom },
  42 + left: { anchor: "__container__", align: HorizontalAlign.Start },
  43 + right: { anchor: "__container__", align: HorizontalAlign.End },
  44 + })
  45 + .margin({ left: 60, bottom: 150, right: 60 })
  46 + .alignSelf(ItemAlign.Center)
  47 + .id('title')
  48 +
  49 + Image(this.guideIndex[index])
  50 + .objectFit(ImageFit.ScaleDown)
  51 + .alignRules({
  52 + bottom: { anchor: "__container__", align: VerticalAlign.Bottom },
  53 + left: { anchor: "__container__", align: HorizontalAlign.Start },
  54 + right: { anchor: "__container__", align: HorizontalAlign.End },
  55 +
  56 + })
  57 + .margin({ bottom: 85 })
  58 + .height(40)
  59 + .onClick(() => {
  60 + if (index == 3) {
  61 + // 跳转到首页
  62 + WDRouterRule.jumpWithReplacePage(WDRouterPage.mainPage)
  63 + }
  64 + })
  65 + .id('index')
  66 +
  67 +
  68 + }.width('100%').height('100%')
  69 + }
  70 +}
1 export interface LoginBean { 1 export interface LoginBean {
2 - // {"code":"0","data":{"firstMark":1,"id":569350079889669,"jwtToken":"eyJhbGciOiJIUzI1NiIsImtpZCI6ImQ4WkI2QkhxSEZrdjJ2U25BNlRwZEdKRjBHcjItVzBvS2FaYzdLOUUycmcifQ.eyJpc3MiOiJwZW9wbGVzLWRhaWx5LWZvdXJhIiwic3ViIjoicGVvcGxlcy1kYWlseS1mb3VyYSIsImV4cCI6MTcxMDY0NzE0MiwidXNlcklkIjo1NjkzNTAwNzk4ODk2NjksInVzZXJWZXJzaW9uIjoiNTY5MzUwMDc5ODg5NjY5XzAiLCJ1c2VyTmFtZSI6IiVFNCVCQSVCQSVFNiVCMCU5MSVFNiU5NyVBNSVFNiU4QSVBNSVFNyVCRCU5MSVFNSU4RiU4QjJrRDJ4VyIsInVzZXJUeXBlIjoxLCJjcmVhdG9ySWQiOm51bGx9.1M0E_6V60opL7AxamGzINpieTHP11fRbiXKDPc-ywWg","longTimeNoLoginMark":0,"refreshToken":"83fe2f1a-77af-4f73-8490-1cebed037f73","status":1,"userName":"人民日报网友2kD2xW","userType":1},"message":"Success","success":true,"timestamp":1710467142214} 2 + // {"code":"0",
  3 + // "data":{
  4 + // "firstMark":1,
  5 + // "id":569350079889669,
  6 + // "jwtToken":"eyJhbGciOiJIUzI1NiIsImtpZCI6ImQ4WkI2QkhxSEZrdjJ2U25BNlRwZEdKRjBHcjItVzBvS2FaYzdLOUUycmcifQ.eyJpc3MiOiJwZW9wbGVzLWRhaWx5LWZvdXJhIiwic3ViIjoicGVvcGxlcy1kYWlseS1mb3VyYSIsImV4cCI6MTcxMDY0NzE0MiwidXNlcklkIjo1NjkzNTAwNzk4ODk2NjksInVzZXJWZXJzaW9uIjoiNTY5MzUwMDc5ODg5NjY5XzAiLCJ1c2VyTmFtZSI6IiVFNCVCQSVCQSVFNiVCMCU5MSVFNiU5NyVBNSVFNiU4QSVBNSVFNyVCRCU5MSVFNSU4RiU4QjJrRDJ4VyIsInVzZXJUeXBlIjoxLCJjcmVhdG9ySWQiOm51bGx9.1M0E_6V60opL7AxamGzINpieTHP11fRbiXKDPc-ywWg",
  7 + // "longTimeNoLoginMark":0,
  8 + // "refreshToken":"83fe2f1a-77af-4f73-8490-1cebed037f73",
  9 + // "status":1,
  10 + // "userName":"人民日报网友2kD2xW",
  11 + // "userType":1
  12 + // },"message":"Success","success":true,"timestamp":1710467142214}
3 firstMark: number 13 firstMark: number
4 id: number 14 id: number
5 jwtToken: string 15 jwtToken: string
@@ -305,7 +305,7 @@ struct LoginPage { @@ -305,7 +305,7 @@ struct LoginPage {
305 router.back({ 305 router.back({
306 params: { userName: data.userName, 306 params: { userName: data.userName,
307 userId:data.id}, 307 userId:data.id},
308 - url: 'pages/MainPage' 308 + url: `${WDRouterPage.getBundleInfo()}`
309 } 309 }
310 ) 310 )
311 }) 311 })
@@ -3,6 +3,14 @@ @@ -3,6 +3,14 @@
3 { 3 {
4 "name": "white", 4 "name": "white",
5 "value": "#FFFFFF" 5 "value": "#FFFFFF"
  6 + },
  7 + {
  8 + "name": "start_window_background",
  9 + "value": "#FFFFFF"
  10 + },
  11 + {
  12 + "name": "color_F9F9F9",
  13 + "value": "#F9F9F9"
6 } 14 }
7 ] 15 ]
8 } 16 }
@@ -5,6 +5,7 @@ @@ -5,6 +5,7 @@
5 "pages/login/ForgetPasswordPage", 5 "pages/login/ForgetPasswordPage",
6 "pages/login/LoginProtocolWebview", 6 "pages/login/LoginProtocolWebview",
7 "pages/login/SettingPasswordPage", 7 "pages/login/SettingPasswordPage",
8 - "pages/login/SettingPasswordLayout" 8 + "pages/login/SettingPasswordLayout",
  9 + "pages/guide/GuidePages"
9 ] 10 ]
10 } 11 }
@@ -72,7 +72,7 @@ export class WDPlayerController { @@ -72,7 +72,7 @@ export class WDPlayerController {
72 if (this.startTime) { 72 if (this.startTime) {
73 this.setSeekTime(this.startTime, SliderChangeMode.Begin); 73 this.setSeekTime(this.startTime, SliderChangeMode.Begin);
74 } 74 }
75 - this.avPlayer.play(); 75 + // this.avPlayer.play();
76 this.duration = this.avPlayer.duration; 76 this.duration = this.avPlayer.duration;
77 break; 77 break;
78 case AVPlayerStatus.PLAYING: 78 case AVPlayerStatus.PLAYING:
@@ -162,6 +162,16 @@ export class WDPlayerController { @@ -162,6 +162,16 @@ export class WDPlayerController {
162 this.avPlayer.pause(); 162 this.avPlayer.pause();
163 } 163 }
164 164
  165 + async play() {
  166 + if (this.avPlayer == null) {
  167 + await this.initPromise;
  168 + }
  169 + if (this.avPlayer == null) {
  170 + return
  171 + }
  172 + this.avPlayer.play();
  173 + }
  174 +
165 async stop() { 175 async stop() {
166 if (this.avPlayer == null) { 176 if (this.avPlayer == null) {
167 await this.initPromise; 177 await this.initPromise;
@@ -80,6 +80,9 @@ export struct WDPlayerRenderView { @@ -80,6 +80,9 @@ export struct WDPlayerRenderView {
80 }) 80 })
81 .onLoad(async (event) => { 81 .onLoad(async (event) => {
82 Logger.info(TAG, 'onLoad') 82 Logger.info(TAG, 'onLoad')
  83 + let surfaceId = this.xComponentController.getXComponentSurfaceId()
  84 + console.log('surfaceId===', surfaceId)
  85 + console.log('insId===', this.insId)
83 this.xComponentController.setXComponentSurfaceSize({ 86 this.xComponentController.setXComponentSurfaceSize({
84 surfaceWidth: 1920, 87 surfaceWidth: 1920,
85 surfaceHeight: 1080 88 surfaceHeight: 1080
@@ -94,7 +97,7 @@ export struct WDPlayerRenderView { @@ -94,7 +97,7 @@ export struct WDPlayerRenderView {
94 } 97 }
95 .id(this.insId) 98 .id(this.insId)
96 .onAreaChange(() => { 99 .onAreaChange(() => {
97 - this.updateLayout() 100 + // this.updateLayout()
98 }) 101 })
99 .backgroundColor("#000000") 102 .backgroundColor("#000000")
100 .justifyContent(FlexAlign.Center) 103 .justifyContent(FlexAlign.Center)
1 { 1 {
2 - "name": "entry", 2 + "name": "phone",
3 "lockfileVersion": 2, 3 "lockfileVersion": 2,
4 "requires": true, 4 "requires": true,
5 "packages": {} 5 "packages": {}
  1 +@Component
  2 +export struct AVPlayer {
  3 + @State outSetValueOne:number = 40
  4 +
  5 + build() {
  6 + Column(){
  7 + // 进度条
  8 + Row(){
  9 + Slider({
  10 + value: this.outSetValueOne,
  11 + min: 0,
  12 + max: 100,
  13 + style: SliderStyle.OutSet
  14 + })
  15 + .trackColor('rgba(0,0,0,0.5)')
  16 + .selectedColor('#ED2800')
  17 + .showTips(true)
  18 + .onChange((value: number, mode: SliderChangeMode) => {
  19 + this.outSetValueOne = value
  20 + console.info('value:' + value + 'mode:' + mode.toString())
  21 + })
  22 + }
  23 + .width('100%')
  24 + .padding({left:24,right:24})
  25 + .margin({top:110})
  26 + // 播放按钮
  27 + Row(){
  28 + Image($r('app.media.loop'))
  29 + .width(24)
  30 + .height(24)
  31 + Image($r('app.media.Backward'))
  32 + .width(24)
  33 + .height(24)
  34 + Stack(){
  35 + Image($r("app.media.playicon"))
  36 + .width(32)
  37 + .height(32)
  38 + }
  39 + .backgroundColor('rgba(255,255,255,0.1)')
  40 + .width(60)
  41 + .height(60)
  42 + .padding(14)
  43 + .borderRadius(50)
  44 + .onClick(()=>{
  45 + // this.avPlayerUrl()
  46 + })
  47 +
  48 + Image($r('app.media.fastForward'))
  49 + .width(24)
  50 + .height(24)
  51 + Image($r('app.media.doubleSpeed'))
  52 + .width(24)
  53 + .height(24)
  54 + }
  55 + .width('100%')
  56 + .justifyContent(FlexAlign.SpaceBetween)
  57 + .margin({top:56})
  58 + .padding({left:32,right:32})
  59 + }
  60 +
  61 + }
  62 +}
@@ -32,7 +32,8 @@ export default class EntryAbility extends UIAbility { @@ -32,7 +32,8 @@ export default class EntryAbility extends UIAbility {
32 .catch((err: Error) => { 32 .catch((err: Error) => {
33 hilog.error(0x0000, 'testTag', `setPreferredOrientation catch, error error.name : ${err.name}, error.message:${err.message}`); 33 hilog.error(0x0000, 'testTag', `setPreferredOrientation catch, error error.name : ${err.name}, error.message:${err.message}`);
34 }) 34 })
35 - windowStage.loadContent('pages/MainPage', (err, data) => { 35 + //../../../../../../features/wdLogin/src/main/ets/pages/launchPage/LaunchPage
  36 + windowStage.loadContent('pages/launchPage/LaunchPage', (err, data) => {
36 if (err.code) { 37 if (err.code) {
37 hilog.error(0x0000, 'testTag', 'Failed to load the content. Cause: %{public}s', JSON.stringify(err) ?? ''); 38 hilog.error(0x0000, 'testTag', 'Failed to load the content. Cause: %{public}s', JSON.stringify(err) ?? '');
38 return; 39 return;
@@ -4,6 +4,7 @@ import { BreakpointConstants } from 'wdConstant'; @@ -4,6 +4,7 @@ import { BreakpointConstants } from 'wdConstant';
4 import { BreakpointSystem, Logger } from 'wdKit'; 4 import { BreakpointSystem, Logger } from 'wdKit';
5 import router from '@ohos.router'; 5 import router from '@ohos.router';
6 6
  7 +
7 const TAG = 'MainPage'; 8 const TAG = 'MainPage';
8 9
9 @Entry 10 @Entry
  1 +import media from '@ohos.multimedia.media';
  2 +import { Song } from '../viewModel/Song'
  3 +import { AVPlayer } from '../../components/AVPlayer'
  4 +
  5 +@Entry
  6 +@Component
  7 +struct AudioDetail {
  8 + @State message: string = '大自然的奇迹展览在中国国家博物馆拉开帷幕';
  9 + @State iocClock: string = '定时';
  10 + @State iconTheOriginal: string = '原文';
  11 + @State iconList: string = '列表';
  12 + @State text: string = ''
  13 + @State showList: boolean = false
  14 + controller: TextInputController = new TextInputController()
  15 + // 音频
  16 + @State songs: Song[] = []
  17 +
  18 + // private avPlayer:media.AVPlayer
  19 +
  20 + async aboutToAppear() {
  21 + //加载音乐列表
  22 + // let response = await axios({
  23 + // method:'get',
  24 + // url:''
  25 + // })
  26 + // //创建avPlayer实例对象
  27 + // this.avPlayer = await media.createAVPlayer()
  28 + // //创建状态机变化回调函数
  29 + // this.setAVPlayerCallback()
  30 + // // this.avPlayer.url =
  31 + }
  32 +
  33 + // 注册avplayer回调函数
  34 + // setAVPlayerCallback() {
  35 + // // seek操作结果回调函数
  36 + // this.avPlayer.on('seekDone', (seekDoneTime) => {
  37 + // console.info(`AVPlayer seek succeeded, seek time is ${seekDoneTime}`);
  38 + // })
  39 + // // error回调监听函数,当avPlayer在操作过程中出现错误时调用reset接口触发重置流程
  40 + // this.avPlayer.on('error', (err) => {
  41 + // console.error(`Invoke avPlayer failed, code is ${err.code}, message is ${err.message}`);
  42 + // this.avPlayer.reset(); // 调用reset重置资源,触发idle状态
  43 + // })
  44 + // // 状态机变化回调函数
  45 + // this.avPlayer.on('stateChange', async (state, reason) => {
  46 + // switch (state) {
  47 + // case 'idle': // 成功调用reset接口后触发该状态机上报
  48 + // console.info('AVPlayer state idle called.');
  49 + // this.avPlayer.release(); // 调用release接口销毁实例对象
  50 + // break;
  51 + // case 'initialized': // avplayer 设置播放源后触发该状态上报
  52 + // console.info('AVPlayerstate initialized called.');
  53 + // this.avPlayer.prepare().then(() => {
  54 + // console.info('AVPlayer prepare succeeded.');
  55 + // })
  56 + // break;
  57 + // case 'prepared': // prepare调用成功后上报该状态机
  58 + // console.info('AVPlayer state prepared called.');
  59 + // this.avPlayer.play(); // 调用播放接口开始播放
  60 + // break;
  61 + // case 'playing': // play成功调用后触发该状态机上报
  62 + // console.info('AVPlayer state playing called.');
  63 + // break;
  64 + // case 'paused': // pause成功调用后触发该状态机上报
  65 + // console.info('AVPlayer state paused called.');
  66 + // this.avPlayer.play(); // 再次播放接口开始播放
  67 + // break;
  68 + // case 'completed': // 播放结束后触发该状态机上报
  69 + // console.info('AVPlayer state completed called.');
  70 + // this.avPlayer.stop(); //调用播放结束接口
  71 + // break;
  72 + // case 'stopped': // stop接口成功调用后触发该状态机上报
  73 + // console.info('AVPlayer state stopped called.');
  74 + // this.avPlayer.reset(); // 调用reset接口初始化avplayer状态
  75 + // break;
  76 + // case 'released':
  77 + // console.info('AVPlayer state released called.');
  78 + // break;
  79 + // default:
  80 + // console.info('AVPlayer state unknown called.');
  81 + // break;
  82 + // }
  83 + // })
  84 + // }
  85 +
  86 + build() {
  87 + Column() {
  88 + Row() {
  89 + Column() {
  90 + // 封面
  91 + Row() {
  92 + Image($r('app.media.audio'))
  93 + .width(240)
  94 + .height(160)
  95 + .borderRadius('0.00vp')
  96 + }
  97 + .justifyContent(FlexAlign.Center)
  98 + .width('100%')
  99 + .margin({ top: 64 })
  100 +
  101 + // 标题
  102 + Row() {
  103 + Text(this.message)
  104 + .fontSize(20)
  105 + .fontWeight(FontWeight.Bold)
  106 + .fontColor('#ffffff')
  107 + .textAlign(TextAlign.Center)
  108 + .lineHeight(28)
  109 + .fontFamily('PingFang SC, PingFang SC')
  110 + }
  111 + .padding({ left: 34, right: 34 })
  112 + .margin({ top: 32 })
  113 +
  114 + // 操作矩阵
  115 + Row() {
  116 + // 定时
  117 + Column() {
  118 + Image($r('app.media.clock'))
  119 + .width(28)
  120 + .height(28)
  121 + Text(this.iocClock)
  122 + .fontColor('#fff')
  123 + .fontSize(12)
  124 + .lineHeight(16)
  125 + .margin(2)
  126 + }
  127 +
  128 + // 原文
  129 + Column() {
  130 + Image($r('app.media.theOriginal'))
  131 + .width(28)
  132 + .height(28)
  133 + Text(this.iconTheOriginal)
  134 + .fontColor('#fff')
  135 + .fontSize(12)
  136 + .lineHeight(16)
  137 + .margin(2)
  138 + }
  139 +
  140 + // 列表
  141 + Column() {
  142 + Image($r('app.media.list'))
  143 + .width(28)
  144 + .height(28)
  145 + Text(this.iconList)
  146 + .fontColor('#fff')
  147 + .fontSize(12)
  148 + .lineHeight(16)
  149 + .margin(2)
  150 + }
  151 + .onClick(() => {
  152 + this.showList = !this.showList
  153 + console.log('列表', this.showList)
  154 + })
  155 + }
  156 + .width('100%')
  157 + .padding({ left: 49, right: 49 })
  158 + .justifyContent(FlexAlign.SpaceBetween)
  159 + .margin({ top: 60 })
  160 +
  161 + AVPlayer()
  162 + }
  163 + }
  164 + .height('100%-56')
  165 +
  166 + Row() {
  167 + Image($r('app.media.leftArrow'))
  168 + .width(24)
  169 + .height(24)
  170 + TextInput({ text: this.text, placeholder: 'input your word...', controller: this.controller })
  171 + .placeholderColor('#999999')
  172 + .placeholderFont({ size: 12, weight: 400 })
  173 + .caretColor(Color.White)
  174 + .height(30)
  175 + .width(115)
  176 + .fontSize(12)
  177 + .fontColor('#999999')
  178 + .backgroundColor('rgba(255,255,255,0.1)')
  179 + .borderRadius(0)
  180 + .backgroundColor('[UIColor colorWithRed:255/255.0 green:255/255.0 blue:255/255.0 alpha:1.0].CGColor')
  181 + .onChange((value: string) => {
  182 + this.text = value
  183 + })
  184 + // 消息
  185 + Badge({
  186 + count: 100,
  187 + style: { fontSize: 12, badgeColor: '#FA2A2D' },
  188 + }) {
  189 + Image($r('app.media.news'))
  190 + .width(24)
  191 + .height(24)
  192 + }
  193 +
  194 + // 点赞
  195 + Badge({
  196 + count: 100,
  197 + style: { fontSize: 12, badgeColor: '#FA2A2D' },
  198 + }) {
  199 + Image($r('app.media.like'))
  200 + .width(24)
  201 + .height(24)
  202 + }
  203 +
  204 + // 收藏
  205 + Image($r('app.media.collection'))
  206 + .width(24)
  207 + .height(24)
  208 + // 分享
  209 + Image($r('app.media.share'))
  210 + .width(24)
  211 + .height(24)
  212 + }
  213 + .height(56)
  214 + .width('100%')
  215 + .padding(13)
  216 + .justifyContent(FlexAlign.SpaceBetween)
  217 +
  218 + // 播放列表
  219 + }
  220 + .height('100%')
  221 + .backgroundColor('#20272E')
  222 + .justifyContent(FlexAlign.SpaceBetween)
  223 +
  224 + }
  225 +}
1 import { Logger } from 'wdKit'; 1 import { Logger } from 'wdKit';
2 import { MultiPictureDetailPageComponent } from 'wdComponent'; 2 import { MultiPictureDetailPageComponent } from 'wdComponent';
  3 +import router from '@ohos.router';
  4 +import { Params, Action } from 'wdBean';
3 5
4 const TAG = 'MultiPictureDetailPage'; 6 const TAG = 'MultiPictureDetailPage';
5 7
@@ -10,10 +12,18 @@ const TAG = 'MultiPictureDetailPage'; @@ -10,10 +12,18 @@ const TAG = 'MultiPictureDetailPage';
10 @Component 12 @Component
11 struct MultiPictureDetailPage { 13 struct MultiPictureDetailPage {
12 14
  15 + @State relId: string = ''
  16 + @State contentId: string = ''
  17 + @State relType: string = ''
  18 +
13 build() { 19 build() {
14 Row() { 20 Row() {
15 Column() { 21 Column() {
16 - MultiPictureDetailPageComponent() 22 + MultiPictureDetailPageComponent({
  23 + relId: this.relId,
  24 + contentId: this.contentId,
  25 + relType: this.relType
  26 + })
17 } 27 }
18 } 28 }
19 } 29 }
@@ -28,7 +38,13 @@ struct MultiPictureDetailPage { @@ -28,7 +38,13 @@ struct MultiPictureDetailPage {
28 } 38 }
29 39
30 aboutToAppear() { 40 aboutToAppear() {
  41 + let par:Action = router.getParams() as Action;
  42 + let params = par?.params;
  43 + this.relId = params?.extra?.relId || '';
  44 + this.relType = params?.extra?.relType || '';
  45 + this.contentId = params?.contentID || '';
31 Logger.info(TAG, 'aboutToAppear'); 46 Logger.info(TAG, 'aboutToAppear');
  47 + Logger.info(TAG, 'params', JSON.stringify(params));
32 } 48 }
33 49
34 aboutToDisappear() { 50 aboutToDisappear() {
  1 +import router from '@ohos.router'
  2 +import { WDRouterRule } from 'wdRouter';
  3 +import { WDRouterPage } from 'wdRouter';
  4 +@Entry
  5 +@Component
  6 +struct LaunchAdvertisingPage {
  7 + @State time: number = 4
  8 + timer :number = -1
  9 +
  10 + enter() {
  11 + // router.replaceUrl({
  12 + // url:'pages/MainPage'
  13 + // })
  14 + WDRouterRule.jumpWithReplacePage(WDRouterPage.mainPage)
  15 + }
  16 +
  17 + onPageShow(){
  18 + this.timer = setInterval(() => {
  19 + this.time--
  20 + if (this.time < 1) {
  21 + this.enter()
  22 + clearInterval(this.timer)
  23 + }
  24 + },1000)
  25 +
  26 + }
  27 +
  28 + build(){
  29 + Column(){
  30 + Stack({alignContent:Alignment.Bottom}){
  31 +
  32 + Stack({alignContent:Alignment.Bottom}){
  33 + Column(){
  34 + Image($r('app.media.app_icon'))
  35 + .margin({
  36 + top:'128lpx',left:'48lpx',right:'48lpx',bottom:'128lpx'
  37 + })
  38 + }
  39 + .justifyContent(FlexAlign.Center)
  40 + .width('100%')
  41 + .height('100%')
  42 + .margin({
  43 + bottom: 0
  44 + })
  45 +
  46 + Stack({alignContent:Alignment.TopEnd}){
  47 + Button(){
  48 + Text(this.time + 's 跳过')
  49 + .fontSize('27lpx')
  50 + .fontColor(Color.White)
  51 + .margin({left:'28lpx',right:'28lpx'})
  52 +
  53 + }
  54 + .width('148lpx')
  55 + .height('56lpx')
  56 + .margin({top:'54lpx',right:'19lpx'})
  57 + .backgroundColor('#80000000')
  58 + .onClick(() => {
  59 + this.enter()
  60 + })
  61 + }
  62 + .width('100%')
  63 + .height('100%')
  64 +
  65 + Button(){
  66 + Row(){
  67 + Text('点击跳转至详情或第三方应用')
  68 + .fontSize('31lpx')
  69 + .fontColor(Color.White)
  70 + .margin({
  71 + left:'55lpx'
  72 + })
  73 + Image($r('app.media.Slice'))
  74 + .width('46lpx')
  75 + .height('46lpx')
  76 + .margin({right:'55lpx'})
  77 + }.alignItems(VerticalAlign.Center)
  78 + }
  79 + .width('566lpx')
  80 + .height('111lpx')
  81 + .margin({
  82 + bottom: '51lpx'
  83 + })
  84 + .backgroundColor('#80000000')
  85 +
  86 + }
  87 +
  88 + }
  89 + .width('100%')
  90 + .height('84%')
  91 + .backgroundColor('#FF6C75')
  92 + .margin({top:'0'})
  93 +
  94 + Image($r('app.media.LaunchPage_logo'))
  95 + .width('278lpx')
  96 + .height('154lpx')
  97 + .margin({bottom: '48lpx'})
  98 + }
  99 + .width('100%')
  100 + .height('100%')
  101 + .backgroundColor(Color.White)
  102 +
  103 + }
  104 +
  105 +
  106 +
  107 +
  108 +}
  1 +import media from '@ohos.multimedia.media'
  2 +import App from '@system.app'
  3 +import Router from '@system.router'
  4 +import router from '@ohos.router'
  5 +import common from '@ohos.app.ability.common'
  6 +import CustomDialogComponent from '../view/CustomDialogComponent'
  7 +import preferences from '@ohos.data.preferences'
  8 +import { GlobalContext } from '../../utils/GlobalContext'
  9 +import { WDRouterRule } from 'wdRouter';
  10 +import { WDRouterPage } from 'wdRouter';
  11 +
  12 +@Entry
  13 +@Component
  14 +struct LaunchPage {
  15 + private context?: common.UIAbilityContext;
  16 + private timerId: number = 0;
  17 + private isJumpToAdvertising: boolean = false;
  18 + private isJumpToGuide: boolean = false;
  19 +
  20 + dialogController: CustomDialogController = new CustomDialogController({
  21 + builder: CustomDialogComponent(
  22 + {
  23 + cancel: () => {
  24 + this.onCancel();
  25 + },
  26 + confirm: () => {
  27 + this.onConfirm();
  28 + }
  29 + }),
  30 + alignment: DialogAlignment.Center,
  31 + offset: { dx: 0, dy: '-24' },
  32 + customStyle: true,
  33 + autoCancel: false
  34 + });
  35 +
  36 + onCancel() {
  37 + // Exit the application.
  38 + this.context?.terminateSelf();
  39 + }
  40 +
  41 + onConfirm() {
  42 + // Save privacy agreement status.
  43 + this.saveIsPrivacy();
  44 + //跳转引导页
  45 + this.jumpToGuidePage();
  46 +
  47 + }
  48 +
  49 + jumpToAdvertisingPage() {
  50 + this.timerId = setTimeout(() => {
  51 + this.isJumpToAdvertising = true;
  52 +
  53 + WDRouterRule.jumpWithPage(WDRouterPage.launchAdvertisingPage)
  54 +
  55 + // router.pushUrl({
  56 + // url: 'pages/LaunchAdvertisingPage'
  57 + // }).catch((error: Error) => {
  58 + // //Logger.error(CommonConstants.LAUNCHER_PAGE_TAG, 'LauncherPage pushUrl error ' + JSON.stringify(error));
  59 + // });
  60 + }, 1000);
  61 + }
  62 +
  63 + jumpToGuidePage() {
  64 + this.timerId = setTimeout(() => {
  65 + this.isJumpToGuide = true;
  66 +
  67 + WDRouterRule.jumpWithPage(WDRouterPage.guidePage)
  68 +
  69 + // router.pushUrl({
  70 + // url: 'pages/LaunchAdvertisingPage'
  71 + // }).catch((error: Error) => {
  72 + // //Logger.error(CommonConstants.LAUNCHER_PAGE_TAG, 'LauncherPage pushUrl error ' + JSON.stringify(error));
  73 + // });
  74 + }, 1000);
  75 + }
  76 +
  77 +
  78 + onPageShow() {
  79 + this.context = getContext(this) as common.UIAbilityContext;
  80 + // Get the operation class for saving data.
  81 + this.getDataPreferences(this).then((preferences: preferences.Preferences) => {
  82 + preferences.get('isPrivacy', true).then((value: preferences.ValueType) => {
  83 + //Logger.info(CommonConstants.LAUNCHER_PAGE_TAG, 'onPageShow value: ' + value);
  84 + if (value) {
  85 + // let isJumpPrivacy: boolean = globalThis.isJumpPrivacy ?? false;
  86 + // let isJumpPrivacy: boolean = (GlobalContext.getContext().getObject('isJumpPrivacy') as boolean) ?? false;
  87 + //if (!isJumpPrivacy) {
  88 + this.dialogController.open();
  89 + // }
  90 + } else {
  91 + //跳转广告页
  92 + this.jumpToAdvertisingPage();
  93 +
  94 + }
  95 + });
  96 + });
  97 + }
  98 +
  99 + onPageHide() {
  100 + if (this.isJumpToAdvertising) {
  101 + router.clear();
  102 + }
  103 + if (this.isJumpToGuide) {
  104 + router.clear();
  105 + }
  106 + // globalThis.isJumpPrivacy = true;
  107 + // GlobalContext.getContext().setObject('isJumpPrivacy', true);
  108 + clearTimeout(this.timerId);
  109 + this.dialogController.close();
  110 + }
  111 +
  112 + getDataPreferences(common: Object) {
  113 + return preferences.getPreferences(getContext(common), 'myStore');
  114 + }
  115 +
  116 + saveIsPrivacy() {
  117 + let preferences: Promise<preferences.Preferences> = this.getDataPreferences(this);
  118 + preferences.then((result: preferences.Preferences) => {
  119 + let privacyPut = result.put('isPrivacy', false);
  120 + result.flush();
  121 + privacyPut.then(() => {
  122 + //Logger.info('LauncherPage', 'Put the value of startup Successfully.');
  123 + }).catch((err: Error) => {
  124 + //Logger.error('LauncherPage', 'Put the value of startup Failed, err: ' + err);
  125 + });
  126 + }).catch((err: Error) => {
  127 + //Logger.error('LauncherPage', 'Get the preferences Failed, err: ' + err);
  128 + });
  129 + }
  130 +
  131 + build(){
  132 +
  133 + Stack({alignContent:Alignment.Bottom}){
  134 + Image($r('app.media.app_icon'))
  135 + .width('278lpx')
  136 + .height('154lpx')
  137 + .margin({
  138 + bottom:'48lpx'
  139 + })
  140 +
  141 + }
  142 + .width('100%')
  143 + .height('100%')
  144 + .backgroundColor(Color.White)
  145 +
  146 +
  147 + }
  148 +
  149 +
  150 +
  151 +}
  1 +
  2 +import webview from '@ohos.web.webview';
  3 +import router from '@ohos.router';
  4 +import { GlobalContext } from '../../utils/GlobalContext'
  5 +import { WDRouterRule } from 'wdRouter';
  6 +
  7 +@Entry
  8 +@Component
  9 +struct PrivacyPage {
  10 + @State message: string = 'Hello World'
  11 + webController: webview.WebviewController = new webview.WebviewController();
  12 + //@State params: object = router.getParams();
  13 +
  14 + build() {
  15 + Row() {
  16 + Column() {
  17 + // Web component loading H5.
  18 + Web({ src: 'https://www.baidu.com', controller: this.webController })
  19 + .zoomAccess(false)
  20 + .width('100%')
  21 + .height('100%')
  22 + .aspectRatio(1)
  23 + // .onConfirm((event) => {
  24 + // AlertDialog.show({
  25 + // message: Const.WEB_ALERT_DIALOG_TEXT_VALUE + event?.message,
  26 + // confirm: {
  27 + // value: $r('app.string.web_alert_dialog_button_value'),
  28 + // action: () => {
  29 + // event?.result.handleConfirm();
  30 + // }
  31 + // },
  32 + // cancel: () => {
  33 + // event?.result.handleCancel();
  34 + // }
  35 + // });
  36 + // return true;
  37 + // })
  38 + // .onErrorReceive((event) => {
  39 + // if (event?.error.getErrorInfo() === 'ERR_INTERNET_DISCONNECTED') {
  40 + // prompt.showToast({
  41 + // message: $r('app.string.internet_err'),
  42 + // duration: Const.WebConstant_DURATION
  43 + // })
  44 + // }
  45 + // if (event?.error.getErrorInfo() === 'ERR_CONNECTION_TIMED_OUT') {
  46 + // prompt.showToast({
  47 + // message: $r('app.string.internet_err'),
  48 + // duration: Const.WebConstant_DURATION
  49 + // })
  50 + // }
  51 + // })
  52 + // .onProgressChange((event) => {
  53 + // if (event?.newProgress === Const.WebConstant_PROGRESS_MAX) {
  54 + // this.isLoading = false;
  55 + // clearInterval(this.intervalLoading);
  56 + // this.intervalLoading = -1;
  57 + // }
  58 + // })
  59 + }
  60 + .width('100%')
  61 + }
  62 + .height('100%')
  63 + }
  64 +}
  1 +import router from '@ohos.router';
  2 +import { GlobalContext } from '../../utils/GlobalContext'
  3 +import { NavigatorModel } from '../viewModel/NavigatorModel';
  4 +import { WDRouterRule } from 'wdRouter';
  5 +import { WDRouterPage } from 'wdRouter';
  6 +import { Params } from 'wdBean';
  7 +@CustomDialog
  8 +export default struct CustomDialogComponent {
  9 +
  10 + controller: CustomDialogController = new CustomDialogController({'builder': ''})
  11 + cancel: Function = () => {}
  12 + confirm: Function = () => {}
  13 +
  14 +
  15 + build(){
  16 + Column(){
  17 + Text($r('app.string.dialog_text_title'))
  18 + .width("90%")
  19 + .fontColor($r('app.color.dialog_text_color'))
  20 + .fontSize($r('app.float.dialog_text_privacy_size'))
  21 + .textAlign(TextAlign.Center)
  22 + .fontWeight('500')
  23 + .margin({
  24 + top: $r('app.float.dialog_text_privacy_top'),
  25 + bottom: $r('app.float.dialog_text_privacy_bottom')
  26 + })
  27 + Text($r('app.string.dialog_text_subTitle'))
  28 + .fontSize($r('app.float.dialog_common_text_size'))
  29 + .width('90%')
  30 + Text($r('app.string.dialog_text_privacy_content'))
  31 + .fontSize($r('app.float.dialog_common_text_size'))
  32 + .width('90%')
  33 + Row(){
  34 +
  35 + // Button(){
  36 + // Text($r('app.string.privacy_text_title_policy'))
  37 + // .fontSize('27lpx')
  38 + // .fontColor(Color.Red)
  39 + // .margin({left:'10lpx',right:'10lpx'})
  40 + // }
  41 + // .width('90%')
  42 + // .height('56lpx')
  43 + // .margin({top:'54lpx',right:'19lpx'})
  44 + // .backgroundColor('#80000000')
  45 + // .onClick(() => {
  46 + //
  47 + // })
  48 + // Button(){
  49 + // Text($r('app.string.privacy_text_title_protocol'))
  50 + // .fontSize('27lpx')
  51 + // .fontColor(Color.Red)
  52 + // .margin({left:'10lpx',right:'10lpx'})
  53 + // }
  54 + // .width('90%')
  55 + // .height('56lpx')
  56 + // .margin({top:'54lpx',right:'19lpx'})
  57 + // .backgroundColor('#80000000')
  58 + // .onClick(() => {
  59 + //
  60 + // })
  61 +
  62 + // Navigator({ target: 'pages/PrivacyPage', type: NavigationType.Push }) {
  63 + // Button($r('app.string.privacy_text_title_policy'))
  64 + // .onClick(()=>{
  65 + // GlobalContext.getContext().setObject('isJumpPrivacy', true);
  66 + // })
  67 + // {
  68 + // // Text($r('app.string.privacy_text_title_policy'))
  69 + // // .fontSize($r('app.float.dialog_common_text_size'))
  70 + // // .width('50%')
  71 + // // .fontColor(Color.Red)
  72 + // // .onClick(() => {
  73 + // // GlobalContext.getContext().setObject('isJumpPrivacy', true);
  74 + // // })
  75 + // }
  76 + // .fancy(Const.MainConstant_BUTTON_MARGIN_TOP)
  77 + // }
  78 + // .params({ path: 'https://www.baidu.com', tips: '在线' } as NavigatorModel)
  79 +
  80 + Text($r('app.string.privacy_text_title_policy'))
  81 + .fontSize($r('app.float.dialog_common_text_size'))
  82 + .width('40%')
  83 + .fontColor(Color.Red)
  84 + .onClick(() => {
  85 +
  86 + let bean={contentId:"1",pageID:""} as Params
  87 + WDRouterRule.jumpWithPage(WDRouterPage.loginProtocolPage,bean)
  88 +
  89 + //GlobalContext.getContext().setObject('isJumpPrivacy', true);
  90 + //WDRouterRule.jumpWithPage(WDRouterPage.privacyPage)
  91 + // router.pushUrl({
  92 + // url: 'pages/PrivacyPage'
  93 + // }).catch((error: Error) => {
  94 + // //Logger.error(CommonConstants.CUSTOM_DIALOG_TAG, 'CustomDialog pushUrl error ' + JSON.stringify(error));
  95 + // });
  96 + })
  97 + Text($r('app.string.privacy_text_title_protocol'))
  98 + .fontSize($r('app.float.dialog_common_text_size'))
  99 + .width('40%')
  100 + .fontColor(Color.Red)
  101 + .onClick(() => {
  102 +
  103 + let bean={contentId:"2",pageID:""} as Params
  104 + WDRouterRule.jumpWithPage(WDRouterPage.loginProtocolPage,bean)
  105 +
  106 + //GlobalContext.getContext().setObject('isJumpPrivacy', true);
  107 + //WDRouterRule.jumpWithPage(WDRouterPage.privacyPage)
  108 + // router.pushUrl({
  109 + // url: 'pages/PrivacyPage'
  110 + // }).catch((error: Error) => {
  111 + // //Logger.error(CommonConstants.CUSTOM_DIALOG_TAG, 'CustomDialog pushUrl error ' + JSON.stringify(error));
  112 + // });
  113 + })
  114 + }
  115 + .margin({
  116 + top:'36lpx',
  117 + bottom:'21lpx'
  118 + })
  119 + Text($r('app.string.dialog_text_privacy_statement'))
  120 + .width('90%')
  121 + .fontColor($r('app.color.dialog_text_color'))
  122 + .fontSize($r('app.float.dialog_common_text_size'))
  123 + Row() {
  124 + Text($r('app.string.dialog_button_disagree'))
  125 + .fancy()
  126 + .onClick(() => {
  127 + this.controller.close();
  128 + this.cancel();
  129 + })
  130 + Blank()
  131 + .backgroundColor($r('app.color.dialog_blank_background_color'))
  132 + .width($r('app.float.dialog_blank_width'))
  133 + .height($r('app.float.dialog_blank_height'))
  134 + Text($r('app.string.dialog_button_agree'))
  135 + .fancyAgree()
  136 + .onClick(() => {
  137 + this.controller.close();
  138 + this.confirm();
  139 + })
  140 +
  141 + }
  142 + .margin({ bottom: '21lpx',top:'42lpx' })
  143 +
  144 + }
  145 + .width('528lpx')
  146 + .borderRadius('15')
  147 + .backgroundColor(Color.White)
  148 +
  149 + }
  150 +
  151 +
  152 +
  153 +}
  154 +// Common text styles.
  155 +@Extend(Text) function fancy () {
  156 + .fontColor($r("app.color.dialog_fancy_text_left_color"))
  157 + .fontSize($r("app.float.dialog_fancy_text_size"))
  158 + .textAlign(TextAlign.Center)
  159 + .fontWeight(FontWeight.Medium)
  160 + .layoutWeight('1')
  161 +}
  162 +// Common text styles.
  163 +@Extend(Text) function fancyAgree () {
  164 + .fontColor($r("app.color.dialog_fancy_text_right_color"))
  165 + .fontSize($r("app.float.dialog_fancy_text_size"))
  166 + .textAlign(TextAlign.Center)
  167 + .fontWeight(FontWeight.Medium)
  168 + .layoutWeight('1')
  169 +}
  1 +/**
  2 + * NewsData params info.
  3 + */
  4 +export class NavigatorModel {
  5 + /**
  6 + * Jumping Path.
  7 + */
  8 + path: Resource | string = '';
  9 +
  10 + /**
  11 + * Prompt message.
  12 + */
  13 + tips: Resource | string = '';
  14 +}
  1 +export class GlobalContext {
  2 + private constructor() { }
  3 + private static instance: GlobalContext;
  4 + private _objects = new Map<string, Object>();
  5 +
  6 + public static getContext(): GlobalContext {
  7 + if (!GlobalContext.instance) {
  8 + GlobalContext.instance = new GlobalContext();
  9 + }
  10 + return GlobalContext.instance;
  11 + }
  12 +
  13 + getObject(value: string): Object | undefined {
  14 + return this._objects.get(value);
  15 + }
  16 +
  17 + setObject(key: string, objectClass: Object): void {
  18 + this._objects.set(key, objectClass);
  19 + }
  20 +}
@@ -3,6 +3,54 @@ @@ -3,6 +3,54 @@
3 { 3 {
4 "name": "start_window_background", 4 "name": "start_window_background",
5 "value": "#FFFFFF" 5 "value": "#FFFFFF"
  6 + },
  7 + {
  8 + "name": "color_F9F9F9",
  9 + "value": "#F9F9F9"
  10 + },
  11 + {
  12 + "name": "privacy_back_text",
  13 + "value": "#007DFF"
  14 + },
  15 + {
  16 + "name": "launcher_text_title_color",
  17 + "value": "#182431"
  18 + },
  19 + {
  20 + "name": "launcher_text_introduce_color",
  21 + "value": "#182431"
  22 + },
  23 + {
  24 + "name": "advertising_text_title_color",
  25 + "value": "#182431"
  26 + },
  27 + {
  28 + "name": "advertising_text_background_color",
  29 + "value": "#33000000"
  30 + },
  31 + {
  32 + "name": "home_page_text_color",
  33 + "value": "#14224D"
  34 + },
  35 + {
  36 + "name": "dialog_fancy_text_left_color",
  37 + "value": "#999999"
  38 + },
  39 + {
  40 + "name": "dialog_fancy_text_right_color",
  41 + "value": "#ED2800"
  42 + },
  43 + {
  44 + "name": "dialog_text_color",
  45 + "value": "#222222"
  46 + },
  47 + {
  48 + "name": "dialog_blank_background_color",
  49 + "value": "#F5F5F5"
  50 + },
  51 + {
  52 + "name": "dialog_text_statement_color",
  53 + "value": "#007DFF"
6 } 54 }
7 ] 55 ]
8 } 56 }
  1 +{
  2 + "float": [
  3 + {
  4 + "name": "float_1",
  5 + "value": "30.6"
  6 + },
  7 + {
  8 + "name": "launcher_logo_size",
  9 + "value": "119vp"
  10 + },
  11 + {
  12 + "name": "launcher_life_text_width",
  13 + "value": "105vp"
  14 + },
  15 + {
  16 + "name": "launcher_life_text_height",
  17 + "value": "35vp"
  18 + },
  19 + {
  20 + "name": "launcher_text_title_size",
  21 + "value": "26fp"
  22 + },
  23 + {
  24 + "name": "launcher_text_introduce_size",
  25 + "value": "16fp"
  26 + },
  27 + {
  28 + "name": "launcher_text_opacity",
  29 + "value": "0.6"
  30 + },
  31 + {
  32 + "name": "advertising_text_opacity",
  33 + "value": "0.4"
  34 + },
  35 + {
  36 + "name": "advertising_image_width",
  37 + "value": "54vp"
  38 + },
  39 + {
  40 + "name": "advertising_image_height",
  41 + "value": "54vp"
  42 + },
  43 + {
  44 + "name": "advertising_text_font_size",
  45 + "value": "12fp"
  46 + },
  47 + {
  48 + "name": "advertising_text_introduce_size",
  49 + "value": "16fp"
  50 + },
  51 + {
  52 + "name": "advertising_text_title_size",
  53 + "value": "26fp"
  54 + },
  55 + {
  56 + "name": "advertising_text_border_width",
  57 + "value": "1"
  58 + },
  59 + {
  60 + "name": "advertising_title_text_margin_top",
  61 + "value": "30vp"
  62 + },
  63 + {
  64 + "name": "advertising_title_text_margin_left",
  65 + "value": "260vp"
  66 + },
  67 + {
  68 + "name": "advertising_text_padding_top",
  69 + "value": "8vp"
  70 + },
  71 + {
  72 + "name": "advertising_text_padding_bottom",
  73 + "value": "8vp"
  74 + },
  75 + {
  76 + "name": "advertising_text_padding_left",
  77 + "value": "12vp"
  78 + },
  79 + {
  80 + "name": "advertising_text_padding_right",
  81 + "value": "12vp"
  82 + },
  83 + {
  84 + "name": "advertising_text_radius",
  85 + "value": "18vp"
  86 + },
  87 + {
  88 + "name": "dialog_blank_height",
  89 + "value": "32vp"
  90 + },
  91 + {
  92 + "name": "dialog_blank_width",
  93 + "value": "1vp"
  94 + },
  95 + {
  96 + "name": "dialog_common_text_size",
  97 + "value": "18fp"
  98 + },
  99 + {
  100 + "name": "dialog_text_privacy_size",
  101 + "value": "20fp"
  102 + },
  103 + {
  104 + "name": "dialog_fancy_text_size",
  105 + "value": "18fp"
  106 + },
  107 + {
  108 + "name": "dialog_text_button_left_color",
  109 + "value": "#999999"
  110 + },
  111 + {
  112 + "name": "dialog_text_button_right_color",
  113 + "value": "#ED2800"
  114 + },
  115 + {
  116 + "name": "dialog_text_privacy_bottom",
  117 + "value": "23lpx"
  118 + },
  119 + {
  120 + "name": "dialog_text_privacy_top",
  121 + "value": "38lpx"
  122 + },
  123 + {
  124 + "name": "dialog_text_declaration_bottom",
  125 + "value": "24"
  126 + },
  127 + {
  128 + "name": "dialog_text_opacity",
  129 + "value": "0.6"
  130 + },
  131 + {
  132 + "name": "privacy_text_title_size",
  133 + "value": "20fp"
  134 + },
  135 + {
  136 + "name": "privacy_back_text_size",
  137 + "value": "20fp"
  138 + },
  139 + {
  140 + "name": "privacy_text_margin_top",
  141 + "value": "10"
  142 + },
  143 + {
  144 + "name": "privacy_text_margin_bottom",
  145 + "value": "10"
  146 + },
  147 + {
  148 + "name": "privacy_bottom_text_margin",
  149 + "value": "12"
  150 + },
  151 + {
  152 + "name": "privacy_text_content_left",
  153 + "value": "24"
  154 + },
  155 + {
  156 + "name": "privacy_text_content_right",
  157 + "value": "24"
  158 + },
  159 + {
  160 + "name": "home_page_text_size",
  161 + "value": "30vp"
  162 + }
  163 + ]
  164 +}
@@ -11,6 +11,39 @@ @@ -11,6 +11,39 @@
11 { 11 {
12 "name": "EntryAbility_label", 12 "name": "EntryAbility_label",
13 "value": "$string:app_name" 13 "value": "$string:app_name"
  14 + },
  15 + {
  16 + "name": "dialog_text_title",
  17 + "value": "个人隐私保护指引"
  18 + },
  19 + {
  20 + "name": "dialog_text_subTitle",
  21 + "value": "欢迎您使用人民日报客户端!"
  22 + },
  23 + {
  24 + "name": "dialog_text_privacy_content",
  25 + "value": "为了更好地为您提供阅读新闻、发布评论等相关服务,我们会根据您使用服务的具体功能需要,收集必要的用户信息。您可通过阅读《隐私政策》和《用户协议》了解我们收集、使用、存储和共享个人信息的情况,以及对您个人隐私的保护措施。人民日报客户端深知个人信息对您的重要性,我们将以最高标准遵守法律法规要求,尽全力保护您的个人信息安全。"
  26 + },
  27 + {
  28 + "name": "dialog_text_privacy_statement",
  29 + "value": "如您同意,请点击“同意”开始接受"
  30 + },
  31 + {
  32 + "name": "dialog_button_disagree",
  33 + "value": "暂不使用"
  34 + },
  35 + {
  36 + "name": "dialog_button_agree",
  37 + "value": "同意"
  38 + },
  39 + {
  40 + "name": "privacy_text_title_policy",
  41 + "value": "《隐私政策》"
  42 + },
  43 + {
  44 + "name": "privacy_text_title_protocol",
  45 + "value": "《用户协议》"
14 } 46 }
  47 +
15 ] 48 ]
16 } 49 }
@@ -5,6 +5,10 @@ @@ -5,6 +5,10 @@
5 "pages/ENewspaper", 5 "pages/ENewspaper",
6 "pages/ImageAndTextDetailPage", 6 "pages/ImageAndTextDetailPage",
7 "pages/MorningEveningPaperPage", 7 "pages/MorningEveningPaperPage",
8 - "pages/detail/MultiPictureDetailPage" 8 + "pages/detail/AudioDetail",
  9 + "pages/detail/MultiPictureDetailPage",
  10 + "pages/launchPage/PrivacyPage",
  11 + "pages/launchPage/LaunchPage",
  12 + "pages/launchPage/LaunchAdvertisingPage"
9 ] 13 ]
10 } 14 }
@@ -11,6 +11,39 @@ @@ -11,6 +11,39 @@
11 { 11 {
12 "name": "EntryAbility_label", 12 "name": "EntryAbility_label",
13 "value": "$string:app_name" 13 "value": "$string:app_name"
  14 + },
  15 + {
  16 + "name": "dialog_text_title",
  17 + "value": "个人隐私保护指引"
  18 + },
  19 + {
  20 + "name": "dialog_text_subTitle",
  21 + "value": "欢迎您使用人民日报客户端!"
  22 + },
  23 + {
  24 + "name": "dialog_text_privacy_content",
  25 + "value": "为了更好地为您提供阅读新闻、发布评论等相关服务,我们会根据您使用服务的具体功能需要,收集必要的用户信息。您可通过阅读《隐私政策》和《用户协议》了解我们收集、使用、存储和共享个人信息的情况,以及对您个人隐私的保护措施。人民日报客户端深知个人信息对您的重要性,我们将以最高标准遵守法律法规要求,尽全力保护您的个人信息安全。"
  26 + },
  27 + {
  28 + "name": "dialog_text_privacy_statement",
  29 + "value": "如您同意,请点击“同意”开始接受"
  30 + },
  31 + {
  32 + "name": "dialog_button_disagree",
  33 + "value": "暂不使用"
  34 + },
  35 + {
  36 + "name": "dialog_button_agree",
  37 + "value": "同意"
  38 + },
  39 + {
  40 + "name": "privacy_text_title_policy",
  41 + "value": "《隐私政策》"
  42 + },
  43 + {
  44 + "name": "privacy_text_title_protocol",
  45 + "value": "《用户协议》"
14 } 46 }
  47 +
15 ] 48 ]
16 } 49 }
  1 +{
  2 + "code": "0",
  3 + "message": "Success",
  4 + "requestId": "9a63f8f9e61d442880a7537763fd1769",
  5 + "success": true,
  6 + "timestamp": 1711589284588
  7 +}
This diff could not be displayed because it is too large.
  1 +{
  2 + "code": "0",
  3 + "data": null,
  4 + "message": "Success",
  5 + "meta": null,
  6 + "requestId": "",
  7 + "success": true,
  8 + "timestamp": 1711609914928
  9 +}
  1 +{
  2 + "code": "0",
  3 + "data": null,
  4 + "message": "Success",
  5 + "meta": null,
  6 + "requestId": "",
  7 + "success": true,
  8 + "timestamp": 1711609966231
  9 +}
@@ -11,6 +11,38 @@ @@ -11,6 +11,38 @@
11 { 11 {
12 "name": "EntryAbility_label", 12 "name": "EntryAbility_label",
13 "value": "$string:app_name" 13 "value": "$string:app_name"
  14 + },
  15 + {
  16 + "name": "dialog_text_title",
  17 + "value": "个人隐私保护指引"
  18 + },
  19 + {
  20 + "name": "dialog_text_subTitle",
  21 + "value": "欢迎您使用人民日报客户端!"
  22 + },
  23 + {
  24 + "name": "dialog_text_privacy_content",
  25 + "value": "为了更好地为您提供阅读新闻、发布评论等相关服务,我们会根据您使用服务的具体功能需要,收集必要的用户信息。您可通过阅读《隐私政策》和《用户协议》了解我们收集、使用、存储和共享个人信息的情况,以及对您个人隐私的保护措施。人民日报客户端深知个人信息对您的重要性,我们将以最高标准遵守法律法规要求,尽全力保护您的个人信息安全。"
  26 + },
  27 + {
  28 + "name": "dialog_text_privacy_statement",
  29 + "value": "如您同意,请点击“同意”开始接受"
  30 + },
  31 + {
  32 + "name": "dialog_button_disagree",
  33 + "value": "暂不使用"
  34 + },
  35 + {
  36 + "name": "dialog_button_agree",
  37 + "value": "同意"
  38 + },
  39 + {
  40 + "name": "privacy_text_title_policy",
  41 + "value": "《隐私政策》"
  42 + },
  43 + {
  44 + "name": "privacy_text_title_protocol",
  45 + "value": "《用户协议》"
14 } 46 }
15 ] 47 ]
16 } 48 }