Merge branch 'main' of http://192.168.1.42/developOne/harmonyPool
Showing
99 changed files
with
3584 additions
and
191 deletions
Too many changes to show.
To preserve performance only 99 of 99+ files are displayed.
| 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 | +} |
| @@ -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 | } |
6.33 KB
| @@ -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 | + "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 | +} |
PeopleDaily_Harmony/entry/src/main/resources/rawfile/other_user512157124138245_detail.json
0 → 100644
| 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 | +} |
PeopleDaily_Harmony/entry/src/main/resources/rawfile/other_user512157124138245_level.json
0 → 100644
| 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 | } |
| @@ -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) | ||
| 295 | - .objectFit(ImageFit.Auto) | ||
| 296 | - .width('69lpx') | ||
| 297 | - .height('69lpx') | ||
| 298 | - .margin({right:'15lpx'}) | 308 | + Stack(){ |
| 309 | + Image(this.data.fromUserHeader) | ||
| 310 | + .alt($r('app.media.default_head')) | ||
| 311 | + .objectFit(ImageFit.Auto) | ||
| 312 | + .width('69lpx') | ||
| 313 | + .height('69lpx') | ||
| 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 | +} |
PeopleDaily_Harmony/wdComponent/src/main/ets/components/page/mine/home/OtherUserHomeComponent.ets
0 → 100644
| 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() |
| @@ -84,10 +84,33 @@ export class HttpUrlUtils { | @@ -84,10 +84,33 @@ export class HttpUrlUtils { | ||
| 84 | static readonly MINE_USER_LEVEL_DATA_PATH: string = "/api/rmrb-user-point/auth/level/zh/c/queryUserLevel"; | 84 | static readonly MINE_USER_LEVEL_DATA_PATH: string = "/api/rmrb-user-point/auth/level/zh/c/queryUserLevel"; |
| 85 | 85 | ||
| 86 | /** | 86 | /** |
| 87 | + * 个人中心 APP获取其他用户等级 | ||
| 88 | + */ | ||
| 89 | + static readonly OTHER_USER_LEVEL_DATA_PATH: string = "/api/rmrb-user-point/auth/level/zh/c/batchUser"; | ||
| 90 | + | ||
| 91 | + /** | ||
| 87 | * 个人中心 (号主/普通用户)我的基本信息 | 92 | * 个人中心 (号主/普通用户)我的基本信息 |
| 88 | */ | 93 | */ |
| 89 | static readonly MINE_USER_DETAIL_DATA_PATH: string = "/api/rmrb-contact/contact/zh/c/my/detail"; | 94 | static readonly MINE_USER_DETAIL_DATA_PATH: string = "/api/rmrb-contact/contact/zh/c/my/detail"; |
| 90 | 95 | ||
| 96 | + /** | ||
| 97 | + * 个人中心 (普通用户)其他用户 的基本信息 | ||
| 98 | + */ | ||
| 99 | + static readonly OTHER_USER_DETAIL_DATA_PATH: string = "/api/rmrb-contact/contact/zh/c/master/detail"; | ||
| 100 | + /** | ||
| 101 | + * 个人中心 其他用户的评论列表 | ||
| 102 | + */ | ||
| 103 | + static readonly OTHER_COMMENT_LIST_DATA_PATH: string = "/api/rmrb-comment/comment/zh/c/othersCommentList"; | ||
| 104 | + /** | ||
| 105 | + * 个人中心 我的关注列表 | ||
| 106 | + */ | ||
| 107 | + static readonly OTHER_USER_FOLLOW_LIST_DATA_PATH: string = "/api/rmrb-interact/interact/zh/c/userAttention/list"; | ||
| 108 | + | ||
| 109 | + /** | ||
| 110 | + * 预约操作 | ||
| 111 | + */ | ||
| 112 | + static readonly APPOINTMENT_OPERATION_STATUS_PATH: string = "/api/live-center-message/zh/c/live/subscribe"; | ||
| 113 | + | ||
| 91 | private static hostUrl: string = HttpUrlUtils.HOST_UAT; | 114 | private static hostUrl: string = HttpUrlUtils.HOST_UAT; |
| 92 | 115 | ||
| 93 | static getCommonHeaders(): HashMap<string, string> { | 116 | static getCommonHeaders(): HashMap<string, string> { |
| @@ -230,6 +253,50 @@ export class HttpUrlUtils { | @@ -230,6 +253,50 @@ export class HttpUrlUtils { | ||
| 230 | return url | 253 | return url |
| 231 | } | 254 | } |
| 232 | 255 | ||
| 256 | + static getOtherUserLevelDataUrl() { | ||
| 257 | + let url = HttpUrlUtils.HOST_SIT + HttpUrlUtils.OTHER_USER_LEVEL_DATA_PATH | ||
| 258 | + return url | ||
| 259 | + } | ||
| 260 | + | ||
| 261 | + static getOtherUserDetailDataUrl() { | ||
| 262 | + let url = HttpUrlUtils.HOST_SIT + HttpUrlUtils.OTHER_USER_DETAIL_DATA_PATH | ||
| 263 | + return url | ||
| 264 | + } | ||
| 265 | + | ||
| 266 | + static getOtherCommentListDataUrl() { | ||
| 267 | + let url = HttpUrlUtils.HOST_SIT + HttpUrlUtils.OTHER_COMMENT_LIST_DATA_PATH | ||
| 268 | + return url | ||
| 269 | + } | ||
| 270 | + | ||
| 271 | + static getOtherUserFollowListDataUrl() { | ||
| 272 | + let url = HttpUrlUtils.HOST_SIT + HttpUrlUtils.OTHER_USER_FOLLOW_LIST_DATA_PATH | ||
| 273 | + return url | ||
| 274 | + } | ||
| 275 | + | ||
| 276 | + static getAppointmentOperationUrl() { | ||
| 277 | + let url = HttpUrlUtils.HOST_SIT + HttpUrlUtils.APPOINTMENT_OPERATION_STATUS_PATH | ||
| 278 | + return url | ||
| 279 | + } | ||
| 280 | + | ||
| 281 | + static getCommentLikeOperationUrl() { | ||
| 282 | + let url = HttpUrlUtils.HOST_SIT + HttpUrlUtils.COMMENT_LIKE_OPERATION_PATH | ||
| 283 | + return url | ||
| 284 | + } | ||
| 285 | + | ||
| 286 | + static getFollowOperationUrl() { | ||
| 287 | + let url = HttpUrlUtils.HOST_SIT + HttpUrlUtils.FOLLOW_OPERATION_PATH | ||
| 288 | + return url | ||
| 289 | + } | ||
| 290 | + | ||
| 291 | + | ||
| 292 | + /** | ||
| 293 | + * 预约操作 | ||
| 294 | + */ | ||
| 295 | + static readonly COMMENT_LIKE_OPERATION_PATH: string = "/api/rmrb-comment/comment/zh/c/commentLike"; | ||
| 296 | + /** | ||
| 297 | + * 关注操作 | ||
| 298 | + */ | ||
| 299 | + static readonly FOLLOW_OPERATION_PATH: string = "https://pd-apis-sit.pdnews.cn/api/rmrb-interact/interact/zh/c/attention/operation"; | ||
| 233 | 300 | ||
| 234 | static getYcgCommonHeaders(): HashMap<string, string> { | 301 | static getYcgCommonHeaders(): HashMap<string, string> { |
| 235 | let headers: HashMap<string, string> = new HashMap<string, string>() | 302 | let headers: HashMap<string, string> = new HashMap<string, string>() |
| @@ -385,4 +452,12 @@ export class HttpUrlUtils { | @@ -385,4 +452,12 @@ export class HttpUrlUtils { | ||
| 385 | private static getUserType() { | 452 | private static getUserType() { |
| 386 | return '2'; | 453 | return '2'; |
| 387 | } | 454 | } |
| 455 | + | ||
| 456 | + public static getYcgUserType() { | ||
| 457 | + return '1'; | ||
| 458 | + } | ||
| 459 | + | ||
| 460 | + public static getYcgUserId() { | ||
| 461 | + return '459776297474949'; | ||
| 462 | + } | ||
| 388 | } | 463 | } |
| @@ -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 | ||
| 15 | - } | 13 | + params |
| 16 | }).catch((error: Error) => { | 14 | }).catch((error: Error) => { |
| 17 | console.log(TAG,JSON.stringify(error)); | 15 | console.log(TAG,JSON.stringify(error)); |
| 18 | }); | 16 | }); |
PeopleDaily_Harmony/wdComponent/src/main/ets/viewmodel/AppointmentOperationRequestItem.ets
0 → 100644
| 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 | +} |
PeopleDaily_Harmony/wdComponent/src/main/ets/viewmodel/CommentLikeOperationRequestItem.ets
0 → 100644
| 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 | } |
PeopleDaily_Harmony/wdComponent/src/main/ets/viewmodel/OtherUserCommentListRequestItem.ets
0 → 100644
| 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 | +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 | } |
533 Bytes
403 Bytes
| 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> |
27.1 KB
| 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> |
| 1 | +a\g)&{]Ϗ |
No preview for this file type
| 1 | +:Ugz4b |
| 1 | +8_bR[Js |
| 1 | +k1Ov7?_ӏQ |
| @@ -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 | ], |
| @@ -28,6 +28,6 @@ export const enum CompStyle { | @@ -28,6 +28,6 @@ export const enum CompStyle { | ||
| 28 | ZhGrid_Layout_03 = 'Zh_Grid_Layout-03', //金刚位卡 | 28 | ZhGrid_Layout_03 = 'Zh_Grid_Layout-03', //金刚位卡 |
| 29 | Album_Card_01 = '17', //图卡集 | 29 | Album_Card_01 = '17', //图卡集 |
| 30 | Zh_Single_Row_04 = 'Zh_Single_Row-04', // 地方精选卡 | 30 | Zh_Single_Row_04 = 'Zh_Single_Row-04', // 地方精选卡 |
| 31 | - CompStyle_09 = 9, // 时间链卡 | ||
| 32 | - CompStyle_10 = 10, // 大专题卡 | 31 | + CompStyle_09 = '9', // 时间链卡 |
| 32 | + CompStyle_10 = '10', // 大专题卡 | ||
| 33 | } | 33 | } |
| @@ -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' |
| @@ -5,6 +5,7 @@ import featureAbility from '@ohos.ability.featureAbility'; | @@ -5,6 +5,7 @@ import featureAbility from '@ohos.ability.featureAbility'; | ||
| 5 | import wantConstant from '@ohos.ability.wantConstant'; | 5 | import wantConstant from '@ohos.ability.wantConstant'; |
| 6 | import Want from '@ohos.app.ability.Want'; | 6 | import Want from '@ohos.app.ability.Want'; |
| 7 | import { AppUtils } from './AppUtils'; | 7 | import { AppUtils } from './AppUtils'; |
| 8 | +import { Callback } from '@ohos.base'; | ||
| 8 | 9 | ||
| 9 | export class PermissionUtil { | 10 | export class PermissionUtil { |
| 10 | async checkAccessToken(permission: Permissions): Promise<abilityAccessCtrl.GrantStatus> { | 11 | async checkAccessToken(permission: Permissions): Promise<abilityAccessCtrl.GrantStatus> { |
| @@ -45,38 +46,34 @@ export class PermissionUtil { | @@ -45,38 +46,34 @@ export class PermissionUtil { | ||
| 45 | return hasPermissions; | 46 | return hasPermissions; |
| 46 | } | 47 | } |
| 47 | 48 | ||
| 48 | - static reqPermissionsFromUser(permissions: Array<Permissions>, component: Object): void { | ||
| 49 | - let context = getContext(component) as common.UIAbilityContext; | ||
| 50 | - let atManager = abilityAccessCtrl.createAtManager(); | ||
| 51 | - // requestPermissionsFromUser会判断权限的授权状态来决定是否唤起弹窗 | ||
| 52 | - atManager.requestPermissionsFromUser(context, permissions).then((data) => { | ||
| 53 | - let grantStatus: Array<number> = data.authResults; | ||
| 54 | - let length: number = grantStatus.length; | ||
| 55 | - for (let i = 0; i < length; i++) { | ||
| 56 | - if (grantStatus[i] === 0) { | ||
| 57 | - // 用户授权,可以继续访问目标操作 | 49 | + static reqPermissionsFromUser(permissions: Array<Permissions>, component: Object): Promise<boolean> { |
| 50 | + // let hasPermissions = false; | ||
| 58 | 51 | ||
| 59 | - } else { | ||
| 60 | 52 | ||
| 61 | - PermissionUtil.openPermissionsInSystemSettings(component); | ||
| 62 | - // 用户拒绝授权,提示用户必须授权才能访问当前页面的功能,并引导用户到系统设置中打开相应的权限 | ||
| 63 | - // AlertDialog.show({ | ||
| 64 | - // title: '权限设置', | ||
| 65 | - // message: '到系统设置中打开相应的权限', | ||
| 66 | - // confirm: { | ||
| 67 | - // value: "OK", | ||
| 68 | - // action: () => { | ||
| 69 | - // | ||
| 70 | - // }, | ||
| 71 | - // } | ||
| 72 | - // }) | ||
| 73 | - return; | 53 | + return new Promise((resolve) => { |
| 54 | + let context = getContext(component) as common.UIAbilityContext; | ||
| 55 | + let atManager = abilityAccessCtrl.createAtManager(); | ||
| 56 | + // requestPermissionsFromUser会判断权限的授权状态来决定是否唤起弹窗 | ||
| 57 | + atManager.requestPermissionsFromUser(context, permissions).then((data) => { | ||
| 58 | + let grantStatus: Array<number> = data.authResults; | ||
| 59 | + let length: number = grantStatus.length; | ||
| 60 | + for (let i = 0; i < length; i++) { | ||
| 61 | + if (grantStatus[i] === 0) { | ||
| 62 | + // 用户授权,可以继续访问目标操作 | ||
| 63 | + resolve(true); | ||
| 64 | + } else { | ||
| 65 | + PermissionUtil.openPermissionsInSystemSettings(component); | ||
| 66 | + } | ||
| 74 | } | 67 | } |
| 75 | - } | ||
| 76 | - // 授权成功 | ||
| 77 | - }).catch((err:Error) => { | ||
| 78 | - // console.error(`requestPermissionsFromUser failed, code is ${err.code}, message is ${err.message}`); | ||
| 79 | - }) | 68 | + // 授权成功 |
| 69 | + }).catch((err:Error) => { | ||
| 70 | + | ||
| 71 | + }) | ||
| 72 | + }); | ||
| 73 | + | ||
| 74 | + | ||
| 75 | + | ||
| 76 | + // return hasPermissions; | ||
| 80 | } | 77 | } |
| 81 | 78 | ||
| 82 | 79 |
| 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 | */ |
| @@ -77,7 +76,7 @@ export class HttpUrlUtils { | @@ -77,7 +76,7 @@ export class HttpUrlUtils { | ||
| 77 | */ | 76 | */ |
| 78 | static readonly APPOINTMENT_QueryUserDetail_PATH: string = "/api/rmrb-user-center/user/zh/c/queryUserDetail"; | 77 | static readonly APPOINTMENT_QueryUserDetail_PATH: string = "/api/rmrb-user-center/user/zh/c/queryUserDetail"; |
| 79 | /** | 78 | /** |
| 80 | - /** | 79 | + /** |
| 81 | * 个人中心 关注列表详情 | 80 | * 个人中心 关注列表详情 |
| 82 | */ | 81 | */ |
| 83 | static readonly FOLLOW_LIST_DETAIL_DATA_PATH: string = "/api/rmrb-creator-user/c/creatorDirectory/getContactMasterDetaiPage"; | 82 | static readonly FOLLOW_LIST_DETAIL_DATA_PATH: string = "/api/rmrb-creator-user/c/creatorDirectory/getContactMasterDetaiPage"; |
| @@ -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 | */ |
| @@ -122,6 +121,28 @@ export class HttpUrlUtils { | @@ -122,6 +121,28 @@ export class HttpUrlUtils { | ||
| 122 | */ | 121 | */ |
| 123 | static readonly OTHER_USER_DETAIL_DATA_PATH: string = "/api/rmrb-contact/contact/zh/c/master/detail"; | 122 | static readonly OTHER_USER_DETAIL_DATA_PATH: string = "/api/rmrb-contact/contact/zh/c/master/detail"; |
| 124 | /** | 123 | /** |
| 124 | + * 个人中心 其他用户的评论列表 | ||
| 125 | + */ | ||
| 126 | + static readonly OTHER_COMMENT_LIST_DATA_PATH: string = "/api/rmrb-comment/comment/zh/c/othersCommentList"; | ||
| 127 | + /** | ||
| 128 | + * 个人中心 我的关注列表 | ||
| 129 | + */ | ||
| 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"; | ||
| 145 | + /** | ||
| 125 | * 早晚报列表 | 146 | * 早晚报列表 |
| 126 | * 根据页面id获取页面楼层列表 | 147 | * 根据页面id获取页面楼层列表 |
| 127 | * https://pdapis.pdnews.cn/api/rmrb-bff-display-zh/display/zh/c/pageInfo?pageId=28927 | 148 | * https://pdapis.pdnews.cn/api/rmrb-bff-display-zh/display/zh/c/pageInfo?pageId=28927 |
| @@ -131,13 +152,11 @@ export class HttpUrlUtils { | @@ -131,13 +152,11 @@ export class HttpUrlUtils { | ||
| 131 | * pageSize=20&pageNum=1&topicId=10000009445 | 152 | * pageSize=20&pageNum=1&topicId=10000009445 |
| 132 | * */ | 153 | * */ |
| 133 | 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"; |
| 134 | - | ||
| 135 | 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"; |
| 136 | - | ||
| 137 | private static hostUrl: string = HttpUrlUtils.HOST_PRODUCT; | 156 | private static hostUrl: string = HttpUrlUtils.HOST_PRODUCT; |
| 138 | - private static userId='' | ||
| 139 | - private static userType='' | ||
| 140 | - private static token='' | 157 | + private static userId = '' |
| 158 | + private static userType = '' | ||
| 159 | + private static token = '' | ||
| 141 | 160 | ||
| 142 | static getCommonHeaders(): HashMap<string, string> { | 161 | static getCommonHeaders(): HashMap<string, string> { |
| 143 | let headers: HashMap<string, string> = new HashMap<string, string>() | 162 | let headers: HashMap<string, string> = new HashMap<string, string>() |
| @@ -150,8 +169,8 @@ export class HttpUrlUtils { | @@ -150,8 +169,8 @@ export class HttpUrlUtils { | ||
| 150 | headers.set('timestamp', HttpUrlUtils.getTimestamp()) | 169 | headers.set('timestamp', HttpUrlUtils.getTimestamp()) |
| 151 | headers.set('RMRB-X-TOKEN', HttpUrlUtils.getXToken()) | 170 | headers.set('RMRB-X-TOKEN', HttpUrlUtils.getXToken()) |
| 152 | headers.set('device_id', HttpUrlUtils.getDeviceId()) | 171 | headers.set('device_id', HttpUrlUtils.getDeviceId()) |
| 153 | - if(HttpUrlUtils.token!=''){ | ||
| 154 | - headers.set('cookie', 'RMRB-X-TOKEN='+HttpUrlUtils.token) | 172 | + if(HttpUrlUtils.getXToken()!=''){ |
| 173 | + headers.set('cookie', 'RMRB-X-TOKEN='+HttpUrlUtils.getXToken()) | ||
| 155 | } | 174 | } |
| 156 | headers.set('build_version', HttpUrlUtils.getVersion()) | 175 | headers.set('build_version', HttpUrlUtils.getVersion()) |
| 157 | headers.set('adcode', HttpUrlUtils.getAdCode()) | 176 | headers.set('adcode', HttpUrlUtils.getAdCode()) |
| @@ -232,9 +251,24 @@ export class HttpUrlUtils { | @@ -232,9 +251,24 @@ export class HttpUrlUtils { | ||
| 232 | } | 251 | } |
| 233 | 252 | ||
| 234 | private static getXToken() { | 253 | private static getXToken() { |
| 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 | ||
| 260 | + } | ||
| 235 | return 'eyJhbGciOiJIUzI1NiIsImtpZCI6ImQ4WkI2QkhxSEZrdjJ2U25BNlRwZEdKRjBHcjItVzBvS2FaYzdLOUUycmcifQ.eyJpc3MiOiJwZW9wbGVzLWRhaWx5LWZvdXJhIiwic3ViIjoicGVvcGxlcy1kYWlseS1mb3VyYSIsImV4cCI6MTcwMzY0OTYwNiwidXNlcklkIjo0NTk3NzYyOTc0NzQ5NDksInVzZXJWZXJzaW9uIjoiNDU5Nzc2Mjk3NDc0OTQ5XzIiLCJ1c2VyTmFtZSI6IkJ1bGlraWtpMTgxIiwidXNlclR5cGUiOjIsImNyZWF0b3JJZCI6NDI2NTM5MH0.jhQ9kylcm3FxWf0-lBMZuLkdtIQ6XpFnAi0AFZJNwfc'; | 261 | return 'eyJhbGciOiJIUzI1NiIsImtpZCI6ImQ4WkI2QkhxSEZrdjJ2U25BNlRwZEdKRjBHcjItVzBvS2FaYzdLOUUycmcifQ.eyJpc3MiOiJwZW9wbGVzLWRhaWx5LWZvdXJhIiwic3ViIjoicGVvcGxlcy1kYWlseS1mb3VyYSIsImV4cCI6MTcwMzY0OTYwNiwidXNlcklkIjo0NTk3NzYyOTc0NzQ5NDksInVzZXJWZXJzaW9uIjoiNDU5Nzc2Mjk3NDc0OTQ5XzIiLCJ1c2VyTmFtZSI6IkJ1bGlraWtpMTgxIiwidXNlclR5cGUiOjIsImNyZWF0b3JJZCI6NDI2NTM5MH0.jhQ9kylcm3FxWf0-lBMZuLkdtIQ6XpFnAi0AFZJNwfc'; |
| 236 | } | 262 | } |
| 237 | 263 | ||
| 264 | + static getRefreshToken() { | ||
| 265 | + let refreshToken = SPHelper.default.getSync(SpConstants.USER_REFRESH_TOKEN,"") | ||
| 266 | + if(StringUtils.isNotEmpty(refreshToken)) { | ||
| 267 | + return refreshToken as string; | ||
| 268 | + } | ||
| 269 | + return ''; | ||
| 270 | + } | ||
| 271 | + | ||
| 238 | private static getDeviceId() { | 272 | private static getDeviceId() { |
| 239 | // TODO | 273 | // TODO |
| 240 | return '8a81226a-cabd-3e1b-b630-b51db4a720ed'; | 274 | return '8a81226a-cabd-3e1b-b630-b51db4a720ed'; |
| @@ -291,16 +325,20 @@ export class HttpUrlUtils { | @@ -291,16 +325,20 @@ export class HttpUrlUtils { | ||
| 291 | return '8a81226a-cabd-3e1b-b630-b51db4a720ed'; | 325 | return '8a81226a-cabd-3e1b-b630-b51db4a720ed'; |
| 292 | } | 326 | } |
| 293 | 327 | ||
| 294 | - private static getUserId() { | 328 | + public static getUserId() { |
| 295 | // TODO 对接登录 | 329 | // TODO 对接登录 |
| 296 | - // let userid = await SPHelper.default.get(SpConstants.USER_ID,"") | ||
| 297 | - // if(StringUtils.isNotEmpty(userid)) { | ||
| 298 | - // return userid as string; | ||
| 299 | - // } | ||
| 300 | - return HttpUrlUtils.userId; | 330 | + if(StringUtils.isNotEmpty(HttpUrlUtils.userId)){ |
| 331 | + return HttpUrlUtils.userId | ||
| 332 | + } | ||
| 333 | + HttpUrlUtils.userId = SPHelper.default.getSync(SpConstants.USER_ID,"") as string | ||
| 334 | + return HttpUrlUtils.userId; | ||
| 301 | } | 335 | } |
| 302 | 336 | ||
| 303 | - private static getUserType() { | 337 | + public static getUserType() { |
| 338 | + if(StringUtils.isNotEmpty(HttpUrlUtils.userType)){ | ||
| 339 | + return HttpUrlUtils.userType | ||
| 340 | + } | ||
| 341 | + HttpUrlUtils.userType = SPHelper.default.getSync(SpConstants.USER_Type,"") as string | ||
| 304 | return HttpUrlUtils.userType; | 342 | return HttpUrlUtils.userType; |
| 305 | } | 343 | } |
| 306 | 344 | ||
| @@ -320,6 +358,12 @@ export class HttpUrlUtils { | @@ -320,6 +358,12 @@ export class HttpUrlUtils { | ||
| 320 | return url; | 358 | return url; |
| 321 | } | 359 | } |
| 322 | 360 | ||
| 361 | + static getLogoutUrl() { | ||
| 362 | + let url = HttpUrlUtils.hostUrl + "/api/rmrb-user-center/user/zh/c/logout"; | ||
| 363 | + return url; | ||
| 364 | + } | ||
| 365 | + | ||
| 366 | + | ||
| 323 | static getResetPassworddUrl() { | 367 | static getResetPassworddUrl() { |
| 324 | let url = HttpUrlUtils.hostUrl + "/api/rmrb-user-center/user/zh/c/resetPassword"; | 368 | let url = HttpUrlUtils.hostUrl + "/api/rmrb-user-center/user/zh/c/resetPassword"; |
| 325 | return url; | 369 | return url; |
| @@ -331,11 +375,11 @@ export class HttpUrlUtils { | @@ -331,11 +375,11 @@ export class HttpUrlUtils { | ||
| 331 | } | 375 | } |
| 332 | 376 | ||
| 333 | static editUserDetail() { | 377 | static editUserDetail() { |
| 334 | - let url = HttpUrlUtils.hostUrl + "/user/zh/c/editUserDetail"; | 378 | + let url = HttpUrlUtils.hostUrl + "/api/rmrb-user-center/user/zh/c/editUserDetail"; |
| 335 | return url; | 379 | return url; |
| 336 | } | 380 | } |
| 337 | 381 | ||
| 338 | - static getAppLoginUrl() :string{ | 382 | + static getAppLoginUrl(): string { |
| 339 | 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"; |
| 340 | return url; | 384 | return url; |
| 341 | } | 385 | } |
| @@ -351,7 +395,7 @@ export class HttpUrlUtils { | @@ -351,7 +395,7 @@ export class HttpUrlUtils { | ||
| 351 | } | 395 | } |
| 352 | 396 | ||
| 353 | static getAppointmentListDataUrl() { | 397 | static getAppointmentListDataUrl() { |
| 354 | - let url = HttpUrlUtils.HOST_SIT + HttpUrlUtils.APPOINTMENT_LIST_DATA_PATH | 398 | + let url = HttpUrlUtils.hostUrl + HttpUrlUtils.APPOINTMENT_LIST_DATA_PATH |
| 355 | return url | 399 | return url |
| 356 | } | 400 | } |
| 357 | 401 | ||
| @@ -361,99 +405,128 @@ export class HttpUrlUtils { | @@ -361,99 +405,128 @@ export class HttpUrlUtils { | ||
| 361 | } | 405 | } |
| 362 | 406 | ||
| 363 | static getFollowListDetailDataUrl() { | 407 | static getFollowListDetailDataUrl() { |
| 364 | - let url = HttpUrlUtils.HOST_SIT + HttpUrlUtils.FOLLOW_LIST_DETAIL_DATA_PATH | 408 | + let url = HttpUrlUtils.hostUrl + HttpUrlUtils.FOLLOW_LIST_DETAIL_DATA_PATH |
| 365 | return url | 409 | return url |
| 366 | } | 410 | } |
| 367 | 411 | ||
| 368 | static getFollowListDataUrl() { | 412 | static getFollowListDataUrl() { |
| 369 | - let url = HttpUrlUtils.HOST_SIT + HttpUrlUtils.FOLLOW_LIST_DATA_PATH | 413 | + let url = HttpUrlUtils.hostUrl + HttpUrlUtils.FOLLOW_LIST_DATA_PATH |
| 370 | return url | 414 | return url |
| 371 | } | 415 | } |
| 372 | 416 | ||
| 373 | static getMineFollowListDataUrl() { | 417 | static getMineFollowListDataUrl() { |
| 374 | - let url = HttpUrlUtils.HOST_SIT + HttpUrlUtils.MINE_FOLLOW_LIST_DATA_PATH | 418 | + let url = HttpUrlUtils.hostUrl + HttpUrlUtils.MINE_FOLLOW_LIST_DATA_PATH |
| 375 | return url | 419 | return url |
| 376 | } | 420 | } |
| 377 | 421 | ||
| 378 | static getFollowListStatusDataUrl() { | 422 | static getFollowListStatusDataUrl() { |
| 379 | - 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 | ||
| 380 | return url | 429 | return url |
| 381 | } | 430 | } |
| 382 | 431 | ||
| 383 | static getMineCommentListDataUrl() { | 432 | static getMineCommentListDataUrl() { |
| 384 | - let url = HttpUrlUtils.HOST_SIT + HttpUrlUtils.MINE_COMMENT_LIST_DATA_PATH | 433 | + let url = HttpUrlUtils.hostUrl + HttpUrlUtils.MINE_COMMENT_LIST_DATA_PATH |
| 385 | return url | 434 | return url |
| 386 | } | 435 | } |
| 387 | 436 | ||
| 388 | static getMineUserLevelDataUrl() { | 437 | static getMineUserLevelDataUrl() { |
| 389 | - let url = HttpUrlUtils.HOST_SIT + HttpUrlUtils.MINE_USER_LEVEL_DATA_PATH | 438 | + let url = HttpUrlUtils.hostUrl + HttpUrlUtils.MINE_USER_LEVEL_DATA_PATH |
| 390 | return url | 439 | return url |
| 391 | } | 440 | } |
| 392 | 441 | ||
| 393 | static getOtherUserLevelDataUrl() { | 442 | static getOtherUserLevelDataUrl() { |
| 394 | - let url = HttpUrlUtils.HOST_SIT + HttpUrlUtils.OTHER_USER_LEVEL_DATA_PATH | 443 | + let url = HttpUrlUtils.hostUrl + HttpUrlUtils.OTHER_USER_LEVEL_DATA_PATH |
| 395 | return url | 444 | return url |
| 396 | } | 445 | } |
| 397 | 446 | ||
| 398 | static getMineUserDetailDataUrl() { | 447 | static getMineUserDetailDataUrl() { |
| 399 | - let url = HttpUrlUtils.HOST_SIT + HttpUrlUtils.MINE_USER_DETAIL_DATA_PATH | 448 | + let url = HttpUrlUtils.hostUrl + HttpUrlUtils.MINE_USER_DETAIL_DATA_PATH |
| 400 | return url | 449 | return url |
| 401 | } | 450 | } |
| 402 | 451 | ||
| 403 | static getOtherUserDetailDataUrl() { | 452 | static getOtherUserDetailDataUrl() { |
| 404 | - let url = HttpUrlUtils.HOST_SIT + HttpUrlUtils.OTHER_USER_DETAIL_DATA_PATH | 453 | + let url = HttpUrlUtils.hostUrl + HttpUrlUtils.OTHER_USER_DETAIL_DATA_PATH |
| 405 | return url | 454 | return url |
| 406 | } | 455 | } |
| 407 | 456 | ||
| 457 | + static getOtherCommentListDataUrl() { | ||
| 458 | + let url = HttpUrlUtils.hostUrl + HttpUrlUtils.OTHER_COMMENT_LIST_DATA_PATH | ||
| 459 | + return url | ||
| 460 | + } | ||
| 408 | 461 | ||
| 409 | - static getYcgCommonHeaders(): HashMap<string, string> { | ||
| 410 | - let headers: HashMap<string, string> = new HashMap<string, string>() | ||
| 411 | - | ||
| 412 | - headers.set('mpassid', 'XGt6jfGUx8ADAKruTyAMdhHj') | ||
| 413 | - headers.set('city', "%E5%90%88%E8%82%A5%E5%B8%82") | ||
| 414 | - headers.set('User-Agent', 'Dalvik/2.1.0 (Linux; U; Android 10; PCT-AL10 Build/HUAWEIPCT-AL10)') | ||
| 415 | - headers.set('channel', "rmrb_china_0000") | ||
| 416 | - headers.set('appCode', "0af1f9085e484c97b2a44704bae72c07") | ||
| 417 | - headers.set('Authorization', "APPCODE 0af1f9085e484c97b2a44704bae72c07") | ||
| 418 | - headers.set('X-Ca-Stage', "TEST") | ||
| 419 | - headers.set('plat', "Phone") | ||
| 420 | - headers.set('Content-Type', 'application/json; charset=utf-8') | ||
| 421 | - headers.set('timestamp', "740977741") | ||
| 422 | - headers.set('RMRB-X-TOKEN', "eyJhbGciOiJIUzI1NiIsImtpZCI6IklFazBGclhfV2RYMEx1ZktDU01iYTVYd0VmUHZ6a043T0F5UTRFLWIwWU0ifQ.eyJpc3MiOiJwZW9wbGVzLWRhaWx5LWZvdXJhIiwic3ViIjoicGVvcGxlcy1kYWlseS1mb3VyYSIsImV4cCI6MTcxMDc1NjM3NywidXNlcklkIjo1NjczODc0NzcwNjM2MjEsInVzZXJWZXJzaW9uIjoiNTY3Mzg3NDc3MDYzNjIxXzAiLCJ1c2VyTmFtZSI6IiVFNCVCQSVCQSVFNiVCMCU5MSVFNiU5NyVBNSVFNiU4QSVBNSVFNyVCRCU5MSVFNSU4RiU4QmFQcnRxNSIsInVzZXJUeXBlIjoxLCJjcmVhdG9ySWQiOm51bGwsInVzZXJJZFpoIjpudWxsfQ.KBkF0Yki-JWlq0ZIOCzgKwQc1ycBnFHa6CF-rMPRgHU") | ||
| 423 | - headers.set('device_id', "5156098c-6c44-3514-af70-04a0139a9327") | ||
| 424 | - // headers.set('cookie', 'RMRB-X-TOKEN=eyJhbGciOiJIUzI1NiIsImtpZCI6IklFazBGclhfV2RYMEx1ZktDU01iYTVYd0VmUHZ6a043T0F5UTRFLWIwWU0ifQ.eyJpc3MiOiJwZW9wbGVzLWRhaWx5LWZvdXJhIiwic3ViIjoicGVvcGxlcy1kYWlseS1mb3VyYSIsImV4cCI6MTcxMDU4Mzk0MywidXNlcklkIjo1NjczODc0NzcwNjM2MjEsInVzZXJWZXJzaW9uIjoiNTY3Mzg3NDc3MDYzNjIxXzAiLCJ1c2VyTmFtZSI6IiVFNCVCQSVCQSVFNiVCMCU5MSVFNiU5NyVBNSVFNiU4QSVBNSVFNyVCRCU5MSVFNSU4RiU4QmFQcnRxNSIsInVzZXJUeXBlIjoxLCJjcmVhdG9ySWQiOm51bGwsInVzZXJJZFpoIjpudWxsfQ._LTKrUxQozpCj1XMhx1TWOIxn5gjDveoPuMFGpI0g_8') | ||
| 425 | - headers.set('build_version', "202403112023") | ||
| 426 | - headers.set('adcode', "340000") | ||
| 427 | - headers.set('os_version', "10") | ||
| 428 | - headers.set('city_dode', "340100") | ||
| 429 | - headers.set('userId', "567387477063621") | ||
| 430 | - headers.set('versionCode', "7302") | ||
| 431 | - headers.set('system', "Android") | ||
| 432 | - headers.set('version_name', "7.3.0.2") | ||
| 433 | - headers.set('EagleEye-TraceID', '101118E4D006453DA549A82AA8CAFBFE') | ||
| 434 | - headers.set('imei', "5156098c-6c44-3514-af70-04a0139a9327") | ||
| 435 | - headers.set('userType', "1") | ||
| 436 | - headers.set('Accept-Language', 'zh') | ||
| 437 | - | ||
| 438 | - // HttpUrlUtils.addSpecialHeaders(headers); | ||
| 439 | - // Logger.debug("TAG", '******************* commonHeaders headers start ******************************** '); | ||
| 440 | - // headers.forEach((v,k)=>{ | ||
| 441 | - // Logger.debug("TAG", 'getCommonHeaders header: ' + k + ': ' + v); | ||
| 442 | - // }) | ||
| 443 | - // Logger.debug("TAG", '******************* commonHeaders headers end ******************************** '); | ||
| 444 | - return headers; | 462 | + static getOtherUserFollowListDataUrl() { |
| 463 | + let url = HttpUrlUtils.hostUrl + HttpUrlUtils.OTHER_USER_FOLLOW_LIST_DATA_PATH | ||
| 464 | + return url | ||
| 445 | } | 465 | } |
| 446 | 466 | ||
| 447 | - public static setUserId(userId:string){ | ||
| 448 | - HttpUrlUtils.userId=userId; | 467 | + static getAppointmentOperationUrl() { |
| 468 | + let url = HttpUrlUtils.hostUrl + HttpUrlUtils.APPOINTMENT_OPERATION_STATUS_PATH | ||
| 469 | + return url | ||
| 449 | } | 470 | } |
| 450 | 471 | ||
| 451 | - public static setUserType(userType:string){ | ||
| 452 | - HttpUrlUtils.userType=userType; | 472 | + static getCommentLikeOperationUrl() { |
| 473 | + let url = HttpUrlUtils.hostUrl + HttpUrlUtils.COMMENT_LIKE_OPERATION_PATH | ||
| 474 | + return url | ||
| 453 | } | 475 | } |
| 454 | 476 | ||
| 455 | - public static setUserToken(token:string){ | ||
| 456 | - HttpUrlUtils.token=token; | 477 | + static getFollowOperationUrl() { |
| 478 | + let url = HttpUrlUtils.hostUrl + HttpUrlUtils.FOLLOW_OPERATION_PATH | ||
| 479 | + return url | ||
| 457 | } | 480 | } |
| 458 | 481 | ||
| 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 | + } | ||
| 459 | } | 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 | } |
| @@ -91,3 +91,4 @@ export { OperDataList } from './src/main/ets/bean/morningevening/OperDataList'; | @@ -91,3 +91,4 @@ export { OperDataList } from './src/main/ets/bean/morningevening/OperDataList'; | ||
| 91 | 91 | ||
| 92 | export { ShareInfo } from './src/main/ets/bean/morningevening/ShareInfo'; | 92 | export { ShareInfo } from './src/main/ets/bean/morningevening/ShareInfo'; |
| 93 | 93 | ||
| 94 | +export { slideShows } from './src/main/ets/bean/morningevening/slideShows'; |
| @@ -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 | } |
| @@ -2,6 +2,8 @@ import { FullColumnImgUrlDTO } from '../detail/FullColumnImgUrlDTO'; | @@ -2,6 +2,8 @@ import { FullColumnImgUrlDTO } from '../detail/FullColumnImgUrlDTO'; | ||
| 2 | import { LiveInfoDTO } from '../detail/LiveInfoDTO'; | 2 | 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' | ||
| 6 | +import { VoiceInfoDTO } from '../detail/VoiceInfoDTO' | ||
| 5 | 7 | ||
| 6 | export interface ContentDTO { | 8 | export interface ContentDTO { |
| 7 | cityCode: string; | 9 | cityCode: string; |
| @@ -58,4 +60,8 @@ export interface ContentDTO { | @@ -58,4 +60,8 @@ export interface ContentDTO { | ||
| 58 | 60 | ||
| 59 | // 二次请求接口,返回的数据,这里组装到content里;TODO 后续优化 | 61 | // 二次请求接口,返回的数据,这里组装到content里;TODO 后续优化 |
| 60 | interactData:InteractDataDTO; | 62 | interactData:InteractDataDTO; |
| 63 | + | ||
| 64 | + hasMore: number, | ||
| 65 | + slideShows: slideShows[], | ||
| 66 | + voiceInfo: VoiceInfoDTO | ||
| 61 | } | 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 | } |
| @@ -11,7 +11,7 @@ import { UserInfoDTO } from './UserInfoDTO' | @@ -11,7 +11,7 @@ import { UserInfoDTO } from './UserInfoDTO' | ||
| 11 | * http://192.168.1.3:3300/project/3802/interface/api/200915 | 11 | * http://192.168.1.3:3300/project/3802/interface/api/200915 |
| 12 | */ | 12 | */ |
| 13 | export interface ContentDetailDTO { | 13 | export interface ContentDetailDTO { |
| 14 | - newsId: string; | 14 | + newsId: number; |
| 15 | newsTitle: string; | 15 | newsTitle: string; |
| 16 | newsShortTitle: string; | 16 | newsShortTitle: string; |
| 17 | newsDownTitle: string; | 17 | newsDownTitle: string; |
| @@ -42,8 +42,8 @@ export interface ContentDetailDTO { | @@ -42,8 +42,8 @@ export interface ContentDetailDTO { | ||
| 42 | videoInfo: VideoInfoDTO[]; | 42 | videoInfo: VideoInfoDTO[]; |
| 43 | liveInfo?: any; | 43 | liveInfo?: any; |
| 44 | voteInfo?: any; | 44 | voteInfo?: any; |
| 45 | - rmhInfo?: RmhInfoDTO; | ||
| 46 | - userInfo?: UserInfoDTO; | 45 | + rmhInfo?: RmhInfoDTO | null; |
| 46 | + userInfo?: UserInfoDTO | null; | ||
| 47 | openLikes: number; | 47 | openLikes: number; |
| 48 | openComment: number; | 48 | openComment: number; |
| 49 | likesStyle: number; | 49 | likesStyle: number; |
| @@ -68,4 +68,7 @@ export interface ContentDetailDTO { | @@ -68,4 +68,7 @@ export interface ContentDetailDTO { | ||
| 68 | timeline?: any; | 68 | timeline?: any; |
| 69 | traceInfo: string; | 69 | traceInfo: string; |
| 70 | viewCount: number; | 70 | viewCount: number; |
| 71 | + isNewspaper: boolean; | ||
| 72 | + oldNewsId: string; | ||
| 73 | + serials: any; | ||
| 71 | } | 74 | } |
| @@ -2,7 +2,7 @@ export interface FullColumnImgUrlDTO { | @@ -2,7 +2,7 @@ export interface FullColumnImgUrlDTO { | ||
| 2 | format?: any; | 2 | format?: any; |
| 3 | height: number; | 3 | height: number; |
| 4 | landscape: number; | 4 | landscape: number; |
| 5 | - size: number; | 5 | + size: number | null; |
| 6 | url: string; | 6 | url: string; |
| 7 | weight: number; | 7 | weight: number; |
| 8 | } | 8 | } |
| 1 | +import { AudioDataList } from './AudioDataList'; | ||
| 1 | import { OperDataList } from './OperDataList'; | 2 | import { OperDataList } from './OperDataList'; |
| 2 | 3 | ||
| 3 | export interface CompList { | 4 | export interface CompList { |
| 4 | - // audioDataList: any[]; | 5 | + audioDataList: AudioDataList[]; |
| 5 | backgroundImgUrl: string; | 6 | backgroundImgUrl: string; |
| 7 | + | ||
| 6 | // bottomNavId?: any; | 8 | // bottomNavId?: any; |
| 7 | cardItemId: string; | 9 | cardItemId: string; |
| 10 | + | ||
| 8 | // cardUpdateStrategy?: any; | 11 | // cardUpdateStrategy?: any; |
| 9 | compStyle: string; | 12 | compStyle: string; |
| 10 | compType: string; | 13 | compType: string; |
| 11 | dataSourceType: string; | 14 | dataSourceType: string; |
| 12 | expIds: string; | 15 | expIds: string; |
| 13 | extraData: string; | 16 | extraData: string; |
| 17 | + | ||
| 14 | // fullColumnImgUrls: any[]; | 18 | // fullColumnImgUrls: any[]; |
| 15 | hasMore: number; | 19 | hasMore: number; |
| 16 | id: number; | 20 | id: number; |
| 21 | + | ||
| 17 | // imageScale?: any; | 22 | // imageScale?: any; |
| 18 | imgSize: string; | 23 | imgSize: string; |
| 19 | itemId: string; | 24 | itemId: string; |
| 20 | itemType: string; | 25 | itemType: string; |
| 21 | itemTypeCode: string; | 26 | itemTypeCode: string; |
| 22 | linkUrl: string; | 27 | linkUrl: string; |
| 28 | + | ||
| 23 | // localGovernance?: any; | 29 | // localGovernance?: any; |
| 24 | name: string; | 30 | name: string; |
| 25 | objectId: string; | 31 | objectId: string; |
| @@ -27,13 +33,16 @@ export interface CompList { | @@ -27,13 +33,16 @@ export interface CompList { | ||
| 27 | objectSummary: string; | 33 | objectSummary: string; |
| 28 | objectTitle: string; | 34 | objectTitle: string; |
| 29 | objectType: string; | 35 | objectType: string; |
| 36 | + | ||
| 30 | // openComment?: any; | 37 | // openComment?: any; |
| 31 | // openLikes?: any; | 38 | // openLikes?: any; |
| 32 | operDataList: OperDataList[]; | 39 | operDataList: OperDataList[]; |
| 33 | pageId: string; | 40 | pageId: string; |
| 41 | + | ||
| 34 | // position?: any; | 42 | // position?: any; |
| 35 | posterSize: string; | 43 | posterSize: string; |
| 36 | posterUrl: string; | 44 | posterUrl: string; |
| 45 | + | ||
| 37 | // questionSection?: any; | 46 | // questionSection?: any; |
| 38 | recommend: number; | 47 | recommend: number; |
| 39 | relId: number; | 48 | relId: number; |
| @@ -41,8 +50,10 @@ export interface CompList { | @@ -41,8 +50,10 @@ export interface CompList { | ||
| 41 | sortValue: number; | 50 | sortValue: number; |
| 42 | subSceneId: string; | 51 | subSceneId: string; |
| 43 | summaryName: string; | 52 | summaryName: string; |
| 53 | + | ||
| 44 | // tabOperDataList: any[]; | 54 | // tabOperDataList: any[]; |
| 45 | titleShowPolicy: number; | 55 | titleShowPolicy: number; |
| 56 | + | ||
| 46 | // topicTemplate?: any; | 57 | // topicTemplate?: any; |
| 47 | traceId: string; | 58 | traceId: string; |
| 48 | traceInfo: string; | 59 | traceInfo: string; |
| 1 | +import { FullColumnImgUrlDTO } from '../detail/FullColumnImgUrlDTO'; | ||
| 2 | +export interface slideShows { | ||
| 3 | + fullColumnImgUrls: FullColumnImgUrlDTO[]; | ||
| 4 | + linkUrl?: string; | ||
| 5 | + newsId: string; | ||
| 6 | + newsTitle?: string; | ||
| 7 | + newsTitleColor?: string; | ||
| 8 | + objectLevel?: string; | ||
| 9 | + objectType: string; | ||
| 10 | + pageId?: string; | ||
| 11 | + photoNum?: string; | ||
| 12 | + publishTime: number; | ||
| 13 | + relId: string; | ||
| 14 | + source?: string; | ||
| 15 | + timeBlurred?: string; | ||
| 16 | + videoDuration?: string; | ||
| 17 | + videoLandscape?: string; | ||
| 18 | + videoUrl?: string; | ||
| 19 | + voiceDuration?: string; | ||
| 20 | +} |
| @@ -8,11 +8,12 @@ | @@ -8,11 +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 | - "wdLogin": "file:../../features/wdLogin" | 17 | + "wdNetwork": "file:../../commons/wdNetwork" |
| 17 | } | 18 | } |
| 18 | } | 19 | } |
| 1 | -import { CompDTO, ContentDTO } from 'wdBean'; | 1 | +import { CompDTO, ContentDTO , slideShows} from 'wdBean'; |
| 2 | import { CommonConstants, CompStyle } from 'wdConstant'; | 2 | import { CommonConstants, CompStyle } from 'wdConstant'; |
| 3 | import { BannerComponent } from './view/BannerComponent'; | 3 | import { BannerComponent } from './view/BannerComponent'; |
| 4 | import { LabelComponent } from './view/LabelComponent'; | 4 | import { LabelComponent } from './view/LabelComponent'; |
| @@ -16,10 +16,10 @@ import { | @@ -16,10 +16,10 @@ import { | ||
| 16 | import { | 16 | import { |
| 17 | HorizontalStrokeCardThreeTwoRadioForOneComponent | 17 | HorizontalStrokeCardThreeTwoRadioForOneComponent |
| 18 | } from './view/HorizontalStrokeCardThreeTwoRadioForOneComponent'; | 18 | } from './view/HorizontalStrokeCardThreeTwoRadioForOneComponent'; |
| 19 | -import { | ||
| 20 | - HorizontalStrokeCardThreeTwoRadioForTwoComponent | ||
| 21 | -} from './view/HorizontalStrokeCardThreeTwoRadioForTwoComponent'; | ||
| 22 | import { AlbumCardComponent } from './view/AlbumCardComponent'; | 19 | import { AlbumCardComponent } from './view/AlbumCardComponent'; |
| 20 | +import { ZhSingleRow04 } from './view/ZhSingleRow04' | ||
| 21 | +import { CompStyle_09 } from './view/CompStyle_09' | ||
| 22 | +import { CompStyle_10 } from './view/CompStyle_10' | ||
| 23 | 23 | ||
| 24 | /** | 24 | /** |
| 25 | * comp适配器. | 25 | * comp适配器. |
| @@ -126,8 +126,12 @@ export struct CompParser { | @@ -126,8 +126,12 @@ export struct CompParser { | ||
| 126 | ZhGridLayoutComponent({ compDTO: compDTO }) | 126 | ZhGridLayoutComponent({ compDTO: compDTO }) |
| 127 | } else if (compDTO.compStyle === CompStyle.Album_Card_01) { | 127 | } else if (compDTO.compStyle === CompStyle.Album_Card_01) { |
| 128 | AlbumCardComponent({ compDTO: compDTO }) | 128 | AlbumCardComponent({ compDTO: compDTO }) |
| 129 | - } else if (compDTO.compStyle === CompStyle.Single_Row_02) { | ||
| 130 | - | 129 | + } else if (compDTO.compStyle === CompStyle.Zh_Single_Row_04) { |
| 130 | + ZhSingleRow04({ compDTO: compDTO}) | ||
| 131 | + } else if (compDTO.compStyle === CompStyle.CompStyle_09) { | ||
| 132 | + CompStyle_09({ compDTO: compDTO}) | ||
| 133 | + } else if (compDTO.compStyle === CompStyle.CompStyle_10) { | ||
| 134 | + CompStyle_10({ compDTO: compDTO}) | ||
| 131 | } | 135 | } |
| 132 | else { | 136 | else { |
| 133 | // todo:组件未实现 / Component Not Implemented | 137 | // todo:组件未实现 / Component Not Implemented |
| 1 | import { AudioDTO } from 'wdBean'; | 1 | import { AudioDTO } from 'wdBean'; |
| 2 | +import { Logger } from 'wdKit/Index'; | ||
| 2 | 3 | ||
| 3 | /** | 4 | /** |
| 4 | * 早晚报页面音频bar | 5 | * 早晚报页面音频bar |
| 5 | */ | 6 | */ |
| 6 | -@Entry | 7 | +// @Entry |
| 7 | @Component | 8 | @Component |
| 8 | export struct AudioBarView { | 9 | export struct AudioBarView { |
| 9 | @State audioDataList?: AudioDTO[] = [] | 10 | @State audioDataList?: AudioDTO[] = [] |
| 11 | + @Consume isAudioPlaying?: boolean | ||
| 10 | 12 | ||
| 11 | aboutToAppear() { | 13 | aboutToAppear() { |
| 12 | } | 14 | } |
| @@ -45,6 +47,11 @@ export struct AudioBarView { | @@ -45,6 +47,11 @@ export struct AudioBarView { | ||
| 45 | .height(24) | 47 | .height(24) |
| 46 | .margin({ left: 10 })// .alignSelf(ItemAlign.Center) | 48 | .margin({ left: 10 })// .alignSelf(ItemAlign.Center) |
| 47 | .objectFit(ImageFit.Contain) | 49 | .objectFit(ImageFit.Contain) |
| 50 | + .onClick(() => { | ||
| 51 | + Logger.info("TAG", "cj compInfoBean onClick1 = " + this.isAudioPlaying) | ||
| 52 | + this.isAudioPlaying = !this.isAudioPlaying | ||
| 53 | + Logger.info("TAG", "cj compInfoBean onClick2 = " + this.isAudioPlaying) | ||
| 54 | + }) | ||
| 48 | } | 55 | } |
| 49 | // .aspectRatio(7 / 4) | 56 | // .aspectRatio(7 / 4) |
| 50 | .height('100%') | 57 | .height('100%') |
-
Please register or login to post a comment