Merge branch 'main' of http://192.168.1.42/developOne/harmonyPool
# Conflicts: # sight_harmony/commons/wdNetwork/src/main/ets/http/HttpUrlUtils.ets # sight_harmony/commons/wdRouter/src/main/ets/router/Action2Page.ets # sight_harmony/commons/wdRouter/src/main/ets/router/WDRouterPage.ets
Showing
189 changed files
with
6713 additions
and
452 deletions
| 1 | +export class GlobalContext { | ||
| 2 | + private constructor() { } | ||
| 3 | + private static instance: GlobalContext; | ||
| 4 | + private _objects = new Map<string, Object>(); | ||
| 5 | + | ||
| 6 | + public static getContext(): GlobalContext { | ||
| 7 | + if (!GlobalContext.instance) { | ||
| 8 | + GlobalContext.instance = new GlobalContext(); | ||
| 9 | + } | ||
| 10 | + return GlobalContext.instance; | ||
| 11 | + } | ||
| 12 | + | ||
| 13 | + getObject(value: string): Object | undefined { | ||
| 14 | + return this._objects.get(value); | ||
| 15 | + } | ||
| 16 | + | ||
| 17 | + setObject(key: string, objectClass: Object): void { | ||
| 18 | + this._objects.set(key, objectClass); | ||
| 19 | + } | ||
| 20 | +} |
| @@ -16,7 +16,7 @@ export default class EntryAbility extends UIAbility { | @@ -16,7 +16,7 @@ export default class EntryAbility extends UIAbility { | ||
| 16 | // Main window is created, set main page for this ability | 16 | // Main window is created, set main page for this ability |
| 17 | hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onWindowStageCreate'); | 17 | hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onWindowStageCreate'); |
| 18 | 18 | ||
| 19 | - windowStage.loadContent('pages/MainPage', (err, data) => { | 19 | + windowStage.loadContent('pages/LaunchPage', (err, data) => { |
| 20 | if (err.code) { | 20 | if (err.code) { |
| 21 | hilog.error(0x0000, 'testTag', 'Failed to load the content. Cause: %{public}s', JSON.stringify(err) ?? ''); | 21 | hilog.error(0x0000, 'testTag', 'Failed to load the content. Cause: %{public}s', JSON.stringify(err) ?? ''); |
| 22 | return; | 22 | return; |
| @@ -6,12 +6,10 @@ import { Params } from 'wdComponent/src/main/ets/repository/bean/Params'; | @@ -6,12 +6,10 @@ import { Params } from 'wdComponent/src/main/ets/repository/bean/Params'; | ||
| 6 | @Entry | 6 | @Entry |
| 7 | @Component | 7 | @Component |
| 8 | struct FollowListPage { | 8 | struct FollowListPage { |
| 9 | - | ||
| 10 | - @State params:Params = router.getParams() as Params; | ||
| 11 | @State curIndex: string = '0'; | 9 | @State curIndex: string = '0'; |
| 12 | 10 | ||
| 13 | onPageShow() { | 11 | onPageShow() { |
| 14 | - this.curIndex = "1"; | 12 | + this.curIndex = router.getParams()?.["index"]; |
| 15 | } | 13 | } |
| 16 | 14 | ||
| 17 | build() { | 15 | build() { |
| 1 | +import router from '@ohos.router' | ||
| 2 | + | ||
| 3 | +@Entry | ||
| 4 | +@Component | ||
| 5 | +struct LaunchAdvertisingPage { | ||
| 6 | + @State time: number = 4 | ||
| 7 | + timer :number = -1 | ||
| 8 | + | ||
| 9 | + enter() { | ||
| 10 | + router.replaceUrl({ | ||
| 11 | + url:'pages/MainPage' | ||
| 12 | + }) | ||
| 13 | + } | ||
| 14 | + | ||
| 15 | + onPageShow(){ | ||
| 16 | + this.timer = setInterval(() => { | ||
| 17 | + this.time-- | ||
| 18 | + if (this.time < 1) { | ||
| 19 | + this.enter() | ||
| 20 | + clearInterval(this.timer) | ||
| 21 | + } | ||
| 22 | + },1000) | ||
| 23 | + | ||
| 24 | + } | ||
| 25 | + | ||
| 26 | + build(){ | ||
| 27 | + Column(){ | ||
| 28 | + Stack({alignContent:Alignment.Bottom}){ | ||
| 29 | + | ||
| 30 | + Stack({alignContent:Alignment.Bottom}){ | ||
| 31 | + Column(){ | ||
| 32 | + Image($r('app.media.app_icon')) | ||
| 33 | + .margin({ | ||
| 34 | + top:'128lpx',left:'48lpx',right:'48lpx',bottom:'128lpx' | ||
| 35 | + }) | ||
| 36 | + } | ||
| 37 | + .justifyContent(FlexAlign.Center) | ||
| 38 | + .width('100%') | ||
| 39 | + .height('100%') | ||
| 40 | + .margin({ | ||
| 41 | + bottom: 0 | ||
| 42 | + }) | ||
| 43 | + | ||
| 44 | + Stack({alignContent:Alignment.TopEnd}){ | ||
| 45 | + Button(){ | ||
| 46 | + Text(this.time + 's 跳过') | ||
| 47 | + .fontSize('27lpx') | ||
| 48 | + .fontColor(Color.White) | ||
| 49 | + .margin({left:'28lpx',right:'28lpx'}) | ||
| 50 | + | ||
| 51 | + } | ||
| 52 | + .width('148lpx') | ||
| 53 | + .height('56lpx') | ||
| 54 | + .margin({top:'54lpx',right:'19lpx'}) | ||
| 55 | + .backgroundColor('#80000000') | ||
| 56 | + .onClick(() => { | ||
| 57 | + this.enter() | ||
| 58 | + }) | ||
| 59 | + } | ||
| 60 | + .width('100%') | ||
| 61 | + .height('100%') | ||
| 62 | + | ||
| 63 | + Button(){ | ||
| 64 | + Row(){ | ||
| 65 | + Text('点击跳转至详情或第三方应用') | ||
| 66 | + .fontSize('31lpx') | ||
| 67 | + .fontColor(Color.White) | ||
| 68 | + .margin({ | ||
| 69 | + left:'55lpx' | ||
| 70 | + }) | ||
| 71 | + Image($r('app.media.Slice')) | ||
| 72 | + .width('46lpx') | ||
| 73 | + .height('46lpx') | ||
| 74 | + .margin({right:'55lpx'}) | ||
| 75 | + }.alignItems(VerticalAlign.Center) | ||
| 76 | + } | ||
| 77 | + .width('566lpx') | ||
| 78 | + .height('111lpx') | ||
| 79 | + .margin({ | ||
| 80 | + bottom: '51lpx' | ||
| 81 | + }) | ||
| 82 | + .backgroundColor('#80000000') | ||
| 83 | + | ||
| 84 | + } | ||
| 85 | + | ||
| 86 | + } | ||
| 87 | + .width('100%') | ||
| 88 | + .height('84%') | ||
| 89 | + .backgroundColor('#FF6C75') | ||
| 90 | + .margin({top:'0'}) | ||
| 91 | + | ||
| 92 | + Image($r('app.media.LaunchPage_logo')) | ||
| 93 | + .width('278lpx') | ||
| 94 | + .height('154lpx') | ||
| 95 | + .margin({bottom: '48lpx'}) | ||
| 96 | + } | ||
| 97 | + .width('100%') | ||
| 98 | + .height('100%') | ||
| 99 | + .backgroundColor(Color.White) | ||
| 100 | + | ||
| 101 | + } | ||
| 102 | + | ||
| 103 | + | ||
| 104 | + | ||
| 105 | + | ||
| 106 | +} |
| 1 | +import media from '@ohos.multimedia.media' | ||
| 2 | +import App from '@system.app' | ||
| 3 | +import Router from '@system.router' | ||
| 4 | +import router from '@ohos.router' | ||
| 5 | +import common from '@ohos.app.ability.common' | ||
| 6 | +import CustomDialogComponent from '../view/CustomDialogComponent' | ||
| 7 | +import preferences from '@ohos.data.preferences' | ||
| 8 | +import { GlobalContext } from '../common/utils/GlobalContext' | ||
| 9 | + | ||
| 10 | +@Entry | ||
| 11 | +@Component | ||
| 12 | +struct LaunchPage { | ||
| 13 | + private context?: common.UIAbilityContext; | ||
| 14 | + private timerId: number = 0; | ||
| 15 | + private isJumpToAdvertising: boolean = false; | ||
| 16 | + | ||
| 17 | + dialogController: CustomDialogController = new CustomDialogController({ | ||
| 18 | + builder: CustomDialogComponent( | ||
| 19 | + { | ||
| 20 | + cancel: () => { | ||
| 21 | + this.onCancel(); | ||
| 22 | + }, | ||
| 23 | + confirm: () => { | ||
| 24 | + this.onConfirm(); | ||
| 25 | + } | ||
| 26 | + }), | ||
| 27 | + alignment: DialogAlignment.Center, | ||
| 28 | + offset: { dx: 0, dy: '-24' }, | ||
| 29 | + customStyle: true, | ||
| 30 | + autoCancel: false | ||
| 31 | + }); | ||
| 32 | + | ||
| 33 | + onCancel() { | ||
| 34 | + // Exit the application. | ||
| 35 | + this.context?.terminateSelf(); | ||
| 36 | + } | ||
| 37 | + | ||
| 38 | + onConfirm() { | ||
| 39 | + // Save privacy agreement status. | ||
| 40 | + this.saveIsPrivacy(); | ||
| 41 | + this.jumpToAdvertisingPage(); | ||
| 42 | + } | ||
| 43 | + | ||
| 44 | + jumpToAdvertisingPage() { | ||
| 45 | + this.timerId = setTimeout(() => { | ||
| 46 | + this.isJumpToAdvertising = true; | ||
| 47 | + router.pushUrl({ | ||
| 48 | + url: 'pages/LaunchAdvertisingPage' | ||
| 49 | + }).catch((error: Error) => { | ||
| 50 | + //Logger.error(CommonConstants.LAUNCHER_PAGE_TAG, 'LauncherPage pushUrl error ' + JSON.stringify(error)); | ||
| 51 | + }); | ||
| 52 | + }, 1000); | ||
| 53 | + } | ||
| 54 | + | ||
| 55 | + onPageShow() { | ||
| 56 | + this.context = getContext(this) as common.UIAbilityContext; | ||
| 57 | + // Get the operation class for saving data. | ||
| 58 | + this.getDataPreferences(this).then((preferences: preferences.Preferences) => { | ||
| 59 | + preferences.get('isPrivacy', true).then((value: preferences.ValueType) => { | ||
| 60 | + //Logger.info(CommonConstants.LAUNCHER_PAGE_TAG, 'onPageShow value: ' + value); | ||
| 61 | + if (value) { | ||
| 62 | + // let isJumpPrivacy: boolean = globalThis.isJumpPrivacy ?? false; | ||
| 63 | + // let isJumpPrivacy: boolean = (GlobalContext.getContext().getObject('isJumpPrivacy') as boolean) ?? false; | ||
| 64 | + // if (!isJumpPrivacy) { | ||
| 65 | + this.dialogController.open(); | ||
| 66 | + // } | ||
| 67 | + } else { | ||
| 68 | + this.jumpToAdvertisingPage(); | ||
| 69 | + } | ||
| 70 | + }); | ||
| 71 | + }); | ||
| 72 | + } | ||
| 73 | + | ||
| 74 | + onPageHide() { | ||
| 75 | + if (this.isJumpToAdvertising) { | ||
| 76 | + router.clear(); | ||
| 77 | + } | ||
| 78 | + // globalThis.isJumpPrivacy = true; | ||
| 79 | + //GlobalContext.getContext().setObject('isJumpPrivacy', true); | ||
| 80 | + clearTimeout(this.timerId); | ||
| 81 | + } | ||
| 82 | + | ||
| 83 | + getDataPreferences(common: Object) { | ||
| 84 | + return preferences.getPreferences(getContext(common), 'myStore'); | ||
| 85 | + } | ||
| 86 | + | ||
| 87 | + saveIsPrivacy() { | ||
| 88 | + let preferences: Promise<preferences.Preferences> = this.getDataPreferences(this); | ||
| 89 | + preferences.then((result: preferences.Preferences) => { | ||
| 90 | + let privacyPut = result.put('isPrivacy', false); | ||
| 91 | + result.flush(); | ||
| 92 | + privacyPut.then(() => { | ||
| 93 | + //Logger.info('LauncherPage', 'Put the value of startup Successfully.'); | ||
| 94 | + }).catch((err: Error) => { | ||
| 95 | + //Logger.error('LauncherPage', 'Put the value of startup Failed, err: ' + err); | ||
| 96 | + }); | ||
| 97 | + }).catch((err: Error) => { | ||
| 98 | + //Logger.error('LauncherPage', 'Get the preferences Failed, err: ' + err); | ||
| 99 | + }); | ||
| 100 | + } | ||
| 101 | + | ||
| 102 | + | ||
| 103 | + | ||
| 104 | + build(){ | ||
| 105 | + | ||
| 106 | + Stack({alignContent:Alignment.Bottom}){ | ||
| 107 | + Image($r('app.media.LaunchPage_logo')) | ||
| 108 | + .width('278lpx') | ||
| 109 | + .height('154lpx') | ||
| 110 | + .margin({ | ||
| 111 | + bottom:'48lpx' | ||
| 112 | + }) | ||
| 113 | + | ||
| 114 | + } | ||
| 115 | + .width('100%') | ||
| 116 | + .height('100%') | ||
| 117 | + .backgroundColor(Color.White) | ||
| 118 | + | ||
| 119 | + | ||
| 120 | + } | ||
| 121 | + | ||
| 122 | + | ||
| 123 | + | ||
| 124 | +} |
| 1 | +import { OtherUserHomeComponent } from 'wdComponent' | ||
| 2 | +import router from '@ohos.router'; | ||
| 3 | + | ||
| 4 | +@Entry | ||
| 5 | +@Component | ||
| 6 | +struct OtherNormalUserHomePage { | ||
| 7 | + @State userId: string = "111111111"; | ||
| 8 | + | ||
| 9 | + onPageShow() { | ||
| 10 | + this.userId = router.getParams()?.["userId"] | ||
| 11 | + console.log("ycg","==="+this.userId); | ||
| 12 | + } | ||
| 13 | + build() { | ||
| 14 | + Column() { | ||
| 15 | + OtherUserHomeComponent({curUserId:this.userId}) | ||
| 16 | + } | ||
| 17 | + .height('100%') | ||
| 18 | + .width('100%') | ||
| 19 | + } | ||
| 20 | +} |
| 1 | + | ||
| 2 | +import webview from '@ohos.web.webview'; | ||
| 3 | +import router from '@ohos.router'; | ||
| 4 | +import { GlobalContext } from '../common/utils/GlobalContext' | ||
| 5 | + | ||
| 6 | +@Entry | ||
| 7 | +@Component | ||
| 8 | +struct PrivacyPage { | ||
| 9 | + @State message: string = 'Hello World' | ||
| 10 | + webController: webview.WebviewController = new webview.WebviewController(); | ||
| 11 | + //@State params: object = router.getParams(); | ||
| 12 | + | ||
| 13 | + build() { | ||
| 14 | + Row() { | ||
| 15 | + Column() { | ||
| 16 | + // Web component loading H5. | ||
| 17 | + Web({ src: 'https://www.baidu.com', controller: this.webController }) | ||
| 18 | + .zoomAccess(false) | ||
| 19 | + .width('100%') | ||
| 20 | + .height('100%') | ||
| 21 | + .aspectRatio(1) | ||
| 22 | + // .onConfirm((event) => { | ||
| 23 | + // AlertDialog.show({ | ||
| 24 | + // message: Const.WEB_ALERT_DIALOG_TEXT_VALUE + event?.message, | ||
| 25 | + // confirm: { | ||
| 26 | + // value: $r('app.string.web_alert_dialog_button_value'), | ||
| 27 | + // action: () => { | ||
| 28 | + // event?.result.handleConfirm(); | ||
| 29 | + // } | ||
| 30 | + // }, | ||
| 31 | + // cancel: () => { | ||
| 32 | + // event?.result.handleCancel(); | ||
| 33 | + // } | ||
| 34 | + // }); | ||
| 35 | + // return true; | ||
| 36 | + // }) | ||
| 37 | + // .onErrorReceive((event) => { | ||
| 38 | + // if (event?.error.getErrorInfo() === 'ERR_INTERNET_DISCONNECTED') { | ||
| 39 | + // prompt.showToast({ | ||
| 40 | + // message: $r('app.string.internet_err'), | ||
| 41 | + // duration: Const.WebConstant_DURATION | ||
| 42 | + // }) | ||
| 43 | + // } | ||
| 44 | + // if (event?.error.getErrorInfo() === 'ERR_CONNECTION_TIMED_OUT') { | ||
| 45 | + // prompt.showToast({ | ||
| 46 | + // message: $r('app.string.internet_err'), | ||
| 47 | + // duration: Const.WebConstant_DURATION | ||
| 48 | + // }) | ||
| 49 | + // } | ||
| 50 | + // }) | ||
| 51 | + // .onProgressChange((event) => { | ||
| 52 | + // if (event?.newProgress === Const.WebConstant_PROGRESS_MAX) { | ||
| 53 | + // this.isLoading = false; | ||
| 54 | + // clearInterval(this.intervalLoading); | ||
| 55 | + // this.intervalLoading = -1; | ||
| 56 | + // } | ||
| 57 | + // }) | ||
| 58 | + } | ||
| 59 | + .width('100%') | ||
| 60 | + } | ||
| 61 | + .height('100%') | ||
| 62 | + } | ||
| 63 | +} |
| 1 | +import router from '@ohos.router'; | ||
| 2 | +import { GlobalContext } from '../common/utils/GlobalContext' | ||
| 3 | +import { NavigatorModel } from '../viewModel/NavigatorModel'; | ||
| 4 | + | ||
| 5 | +@CustomDialog | ||
| 6 | +export default struct CustomDialogComponent { | ||
| 7 | + | ||
| 8 | + controller: CustomDialogController = new CustomDialogController({'builder': ''}) | ||
| 9 | + cancel: Function = () => {} | ||
| 10 | + confirm: Function = () => {} | ||
| 11 | + | ||
| 12 | + | ||
| 13 | + build(){ | ||
| 14 | + Column(){ | ||
| 15 | + Text($r('app.string.dialog_text_title')) | ||
| 16 | + .width("90%") | ||
| 17 | + .fontColor($r('app.color.dialog_text_color')) | ||
| 18 | + .fontSize($r('app.float.dialog_text_privacy_size')) | ||
| 19 | + .textAlign(TextAlign.Center) | ||
| 20 | + .fontWeight('600') | ||
| 21 | + .margin({ | ||
| 22 | + top: $r('app.float.dialog_text_privacy_top'), | ||
| 23 | + bottom: $r('app.float.dialog_text_privacy_bottom') | ||
| 24 | + }) | ||
| 25 | + Text($r('app.string.dialog_text_privacy_content')) | ||
| 26 | + .fontSize($r('app.float.dialog_common_text_size')) | ||
| 27 | + .width('90%') | ||
| 28 | + Row(){ | ||
| 29 | + | ||
| 30 | + // Button(){ | ||
| 31 | + // Text($r('app.string.privacy_text_title_policy')) | ||
| 32 | + // .fontSize('27lpx') | ||
| 33 | + // .fontColor(Color.Red) | ||
| 34 | + // .margin({left:'10lpx',right:'10lpx'}) | ||
| 35 | + // } | ||
| 36 | + // .width('90%') | ||
| 37 | + // .height('56lpx') | ||
| 38 | + // .margin({top:'54lpx',right:'19lpx'}) | ||
| 39 | + // .backgroundColor('#80000000') | ||
| 40 | + // .onClick(() => { | ||
| 41 | + // | ||
| 42 | + // }) | ||
| 43 | + // Button(){ | ||
| 44 | + // Text($r('app.string.privacy_text_title_protocol')) | ||
| 45 | + // .fontSize('27lpx') | ||
| 46 | + // .fontColor(Color.Red) | ||
| 47 | + // .margin({left:'10lpx',right:'10lpx'}) | ||
| 48 | + // } | ||
| 49 | + // .width('90%') | ||
| 50 | + // .height('56lpx') | ||
| 51 | + // .margin({top:'54lpx',right:'19lpx'}) | ||
| 52 | + // .backgroundColor('#80000000') | ||
| 53 | + // .onClick(() => { | ||
| 54 | + // | ||
| 55 | + // }) | ||
| 56 | + | ||
| 57 | + // Navigator({ target: 'pages/PrivacyPage', type: NavigationType.Push }) { | ||
| 58 | + // Button($r('app.string.privacy_text_title_policy')) | ||
| 59 | + // .onClick(()=>{ | ||
| 60 | + // GlobalContext.getContext().setObject('isJumpPrivacy', true); | ||
| 61 | + // }) | ||
| 62 | + // { | ||
| 63 | + // // Text($r('app.string.privacy_text_title_policy')) | ||
| 64 | + // // .fontSize($r('app.float.dialog_common_text_size')) | ||
| 65 | + // // .width('50%') | ||
| 66 | + // // .fontColor(Color.Red) | ||
| 67 | + // // .onClick(() => { | ||
| 68 | + // // GlobalContext.getContext().setObject('isJumpPrivacy', true); | ||
| 69 | + // // }) | ||
| 70 | + // } | ||
| 71 | + // .fancy(Const.MainConstant_BUTTON_MARGIN_TOP) | ||
| 72 | + // } | ||
| 73 | + // .params({ path: 'https://www.baidu.com', tips: '在线' } as NavigatorModel) | ||
| 74 | + | ||
| 75 | + Text($r('app.string.privacy_text_title_policy')) | ||
| 76 | + .fontSize($r('app.float.dialog_common_text_size')) | ||
| 77 | + .width('40%') | ||
| 78 | + .fontColor(Color.Red) | ||
| 79 | + .onClick(() => { | ||
| 80 | + //GlobalContext.getContext().setObject('isJumpPrivacy', false); | ||
| 81 | + router.pushUrl({ | ||
| 82 | + url: 'pages/PrivacyPage' | ||
| 83 | + }).catch((error: Error) => { | ||
| 84 | + //Logger.error(CommonConstants.CUSTOM_DIALOG_TAG, 'CustomDialog pushUrl error ' + JSON.stringify(error)); | ||
| 85 | + }); | ||
| 86 | + }) | ||
| 87 | + Text($r('app.string.privacy_text_title_protocol')) | ||
| 88 | + .fontSize($r('app.float.dialog_common_text_size')) | ||
| 89 | + .width('40%') | ||
| 90 | + .fontColor(Color.Red) | ||
| 91 | + .onClick(() => { | ||
| 92 | + //GlobalContext.getContext().setObject('isJumpPrivacy', true); | ||
| 93 | + router.pushUrl({ | ||
| 94 | + url: 'pages/PrivacyPage' | ||
| 95 | + }).catch((error: Error) => { | ||
| 96 | + //Logger.error(CommonConstants.CUSTOM_DIALOG_TAG, 'CustomDialog pushUrl error ' + JSON.stringify(error)); | ||
| 97 | + }); | ||
| 98 | + }) | ||
| 99 | + } | ||
| 100 | + Text($r('app.string.dialog_text_privacy_statement')) | ||
| 101 | + .width('90%') | ||
| 102 | + .fontColor($r('app.color.dialog_text_statement_color')) | ||
| 103 | + .fontSize($r('app.float.dialog_common_text_size')) | ||
| 104 | + Row() { | ||
| 105 | + Text($r('app.string.dialog_button_disagree')) | ||
| 106 | + .fancy() | ||
| 107 | + .onClick(() => { | ||
| 108 | + this.controller.close(); | ||
| 109 | + this.cancel(); | ||
| 110 | + }) | ||
| 111 | + Blank() | ||
| 112 | + .backgroundColor($r('app.color.dialog_blank_background_color')) | ||
| 113 | + .width($r('app.float.dialog_blank_width')) | ||
| 114 | + .height($r('app.float.dialog_blank_height')) | ||
| 115 | + Text($r('app.string.dialog_button_agree')) | ||
| 116 | + .fancy() | ||
| 117 | + .onClick(() => { | ||
| 118 | + this.controller.close(); | ||
| 119 | + this.confirm(); | ||
| 120 | + }) | ||
| 121 | + } | ||
| 122 | + .margin({ bottom: '1' }) | ||
| 123 | + | ||
| 124 | + } | ||
| 125 | + .width('93%') | ||
| 126 | + .borderRadius('15') | ||
| 127 | + .backgroundColor(Color.White) | ||
| 128 | + | ||
| 129 | + } | ||
| 130 | + | ||
| 131 | + | ||
| 132 | + | ||
| 133 | +} | ||
| 134 | +// Common text styles. | ||
| 135 | +@Extend(Text) function fancy () { | ||
| 136 | + .fontColor($r("app.color.dialog_fancy_text_color")) | ||
| 137 | + .fontSize($r("app.float.dialog_fancy_text_size")) | ||
| 138 | + .textAlign(TextAlign.Center) | ||
| 139 | + .fontWeight(FontWeight.Medium) | ||
| 140 | + .layoutWeight('1') | ||
| 141 | +} |
| @@ -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() |
| @@ -76,10 +76,33 @@ export class HttpUrlUtils { | @@ -76,10 +76,33 @@ export class HttpUrlUtils { | ||
| 76 | static readonly MINE_USER_LEVEL_DATA_PATH: string = "/api/rmrb-user-point/auth/level/zh/c/queryUserLevel"; | 76 | static readonly MINE_USER_LEVEL_DATA_PATH: string = "/api/rmrb-user-point/auth/level/zh/c/queryUserLevel"; |
| 77 | 77 | ||
| 78 | /** | 78 | /** |
| 79 | + * 个人中心 APP获取其他用户等级 | ||
| 80 | + */ | ||
| 81 | + static readonly OTHER_USER_LEVEL_DATA_PATH: string = "/api/rmrb-user-point/auth/level/zh/c/batchUser"; | ||
| 82 | + | ||
| 83 | + /** | ||
| 79 | * 个人中心 (号主/普通用户)我的基本信息 | 84 | * 个人中心 (号主/普通用户)我的基本信息 |
| 80 | */ | 85 | */ |
| 81 | static readonly MINE_USER_DETAIL_DATA_PATH: string = "/api/rmrb-contact/contact/zh/c/my/detail"; | 86 | static readonly MINE_USER_DETAIL_DATA_PATH: string = "/api/rmrb-contact/contact/zh/c/my/detail"; |
| 82 | 87 | ||
| 88 | + /** | ||
| 89 | + * 个人中心 (普通用户)其他用户 的基本信息 | ||
| 90 | + */ | ||
| 91 | + static readonly OTHER_USER_DETAIL_DATA_PATH: string = "/api/rmrb-contact/contact/zh/c/master/detail"; | ||
| 92 | + /** | ||
| 93 | + * 个人中心 其他用户的评论列表 | ||
| 94 | + */ | ||
| 95 | + static readonly OTHER_COMMENT_LIST_DATA_PATH: string = "/api/rmrb-comment/comment/zh/c/othersCommentList"; | ||
| 96 | + /** | ||
| 97 | + * 个人中心 我的关注列表 | ||
| 98 | + */ | ||
| 99 | + static readonly OTHER_USER_FOLLOW_LIST_DATA_PATH: string = "/api/rmrb-interact/interact/zh/c/userAttention/list"; | ||
| 100 | + | ||
| 101 | + /** | ||
| 102 | + * 预约操作 | ||
| 103 | + */ | ||
| 104 | + static readonly APPOINTMENT_OPERATION_STATUS_PATH: string = "/api/live-center-message/zh/c/live/subscribe"; | ||
| 105 | + | ||
| 83 | private static hostUrl: string = HttpUrlUtils.HOST_UAT; | 106 | private static hostUrl: string = HttpUrlUtils.HOST_UAT; |
| 84 | 107 | ||
| 85 | static getCommonHeaders(): HashMap<string, string> { | 108 | static getCommonHeaders(): HashMap<string, string> { |
| @@ -200,6 +223,50 @@ export class HttpUrlUtils { | @@ -200,6 +223,50 @@ export class HttpUrlUtils { | ||
| 200 | return url | 223 | return url |
| 201 | } | 224 | } |
| 202 | 225 | ||
| 226 | + static getOtherUserLevelDataUrl() { | ||
| 227 | + let url = HttpUrlUtils.HOST_SIT + HttpUrlUtils.OTHER_USER_LEVEL_DATA_PATH | ||
| 228 | + return url | ||
| 229 | + } | ||
| 230 | + | ||
| 231 | + static getOtherUserDetailDataUrl() { | ||
| 232 | + let url = HttpUrlUtils.HOST_SIT + HttpUrlUtils.OTHER_USER_DETAIL_DATA_PATH | ||
| 233 | + return url | ||
| 234 | + } | ||
| 235 | + | ||
| 236 | + static getOtherCommentListDataUrl() { | ||
| 237 | + let url = HttpUrlUtils.HOST_SIT + HttpUrlUtils.OTHER_COMMENT_LIST_DATA_PATH | ||
| 238 | + return url | ||
| 239 | + } | ||
| 240 | + | ||
| 241 | + static getOtherUserFollowListDataUrl() { | ||
| 242 | + let url = HttpUrlUtils.HOST_SIT + HttpUrlUtils.OTHER_USER_FOLLOW_LIST_DATA_PATH | ||
| 243 | + return url | ||
| 244 | + } | ||
| 245 | + | ||
| 246 | + static getAppointmentOperationUrl() { | ||
| 247 | + let url = HttpUrlUtils.HOST_SIT + HttpUrlUtils.APPOINTMENT_OPERATION_STATUS_PATH | ||
| 248 | + return url | ||
| 249 | + } | ||
| 250 | + | ||
| 251 | + static getCommentLikeOperationUrl() { | ||
| 252 | + let url = HttpUrlUtils.HOST_SIT + HttpUrlUtils.COMMENT_LIKE_OPERATION_PATH | ||
| 253 | + return url | ||
| 254 | + } | ||
| 255 | + | ||
| 256 | + static getFollowOperationUrl() { | ||
| 257 | + let url = HttpUrlUtils.HOST_SIT + HttpUrlUtils.FOLLOW_OPERATION_PATH | ||
| 258 | + return url | ||
| 259 | + } | ||
| 260 | + | ||
| 261 | + | ||
| 262 | + /** | ||
| 263 | + * 预约操作 | ||
| 264 | + */ | ||
| 265 | + static readonly COMMENT_LIKE_OPERATION_PATH: string = "/api/rmrb-comment/comment/zh/c/commentLike"; | ||
| 266 | + /** | ||
| 267 | + * 关注操作 | ||
| 268 | + */ | ||
| 269 | + static readonly FOLLOW_OPERATION_PATH: string = "https://pd-apis-sit.pdnews.cn/api/rmrb-interact/interact/zh/c/attention/operation"; | ||
| 203 | 270 | ||
| 204 | static getYcgCommonHeaders(): HashMap<string, string> { | 271 | static getYcgCommonHeaders(): HashMap<string, string> { |
| 205 | let headers: HashMap<string, string> = new HashMap<string, string>() | 272 | let headers: HashMap<string, string> = new HashMap<string, string>() |
| @@ -355,4 +422,12 @@ export class HttpUrlUtils { | @@ -355,4 +422,12 @@ export class HttpUrlUtils { | ||
| 355 | private static getUserType() { | 422 | private static getUserType() { |
| 356 | return '2'; | 423 | return '2'; |
| 357 | } | 424 | } |
| 425 | + | ||
| 426 | + public static getYcgUserType() { | ||
| 427 | + return '1'; | ||
| 428 | + } | ||
| 429 | + | ||
| 430 | + public static getYcgUserId() { | ||
| 431 | + return '459776297474949'; | ||
| 432 | + } | ||
| 358 | } | 433 | } |
| @@ -10,9 +10,7 @@ class RouteManager{ | @@ -10,9 +10,7 @@ class RouteManager{ | ||
| 10 | jumpNewPage(target_url: string,params?: Object){ | 10 | jumpNewPage(target_url: string,params?: Object){ |
| 11 | router.pushUrl({ | 11 | router.pushUrl({ |
| 12 | url: target_url, | 12 | url: target_url, |
| 13 | - params: { | ||
| 14 | - params | ||
| 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="32" height="32" viewBox="0 0 32 32"><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,6 +26,7 @@ export class HttpUrlUtils { | @@ -26,6 +26,7 @@ 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 | + | ||
| 29 | /** | 30 | /** |
| 30 | * 展现pageInfo接口 | 31 | * 展现pageInfo接口 |
| 31 | */ | 32 | */ |
| @@ -55,10 +56,12 @@ export class HttpUrlUtils { | @@ -55,10 +56,12 @@ export class HttpUrlUtils { | ||
| 55 | * 浏览历史新增、删除接口 | 56 | * 浏览历史新增、删除接口 |
| 56 | */ | 57 | */ |
| 57 | static readonly INTERACT_BROWS_OPERATE: string = "/api/rmrb-interact/interact/zh/c/brows/operate"; | 58 | static readonly INTERACT_BROWS_OPERATE: string = "/api/rmrb-interact/interact/zh/c/brows/operate"; |
| 59 | + | ||
| 58 | /** | 60 | /** |
| 59 | * 电子报信息 | 61 | * 电子报信息 |
| 60 | */ | 62 | */ |
| 61 | static readonly E_NEWSPAPER_INFO_PATH: string = "/api/rmrb-bff-display-zh/display/zh/c/paperApi/paperTime"; | 63 | static readonly E_NEWSPAPER_INFO_PATH: string = "/api/rmrb-bff-display-zh/display/zh/c/paperApi/paperTime"; |
| 64 | + | ||
| 62 | /** | 65 | /** |
| 63 | * 电子报列表 | 66 | * 电子报列表 |
| 64 | */ | 67 | */ |
| @@ -76,7 +79,7 @@ export class HttpUrlUtils { | @@ -76,7 +79,7 @@ export class HttpUrlUtils { | ||
| 76 | */ | 79 | */ |
| 77 | static readonly APPOINTMENT_QueryUserDetail_PATH: string = "/api/rmrb-user-center/user/zh/c/queryUserDetail"; | 80 | static readonly APPOINTMENT_QueryUserDetail_PATH: string = "/api/rmrb-user-center/user/zh/c/queryUserDetail"; |
| 78 | /** | 81 | /** |
| 79 | - /** | 82 | + /** |
| 80 | * 个人中心 关注列表详情 | 83 | * 个人中心 关注列表详情 |
| 81 | */ | 84 | */ |
| 82 | static readonly FOLLOW_LIST_DETAIL_DATA_PATH: string = "/api/rmrb-creator-user/c/creatorDirectory/getContactMasterDetaiPage"; | 85 | static readonly FOLLOW_LIST_DETAIL_DATA_PATH: string = "/api/rmrb-creator-user/c/creatorDirectory/getContactMasterDetaiPage"; |
| @@ -93,21 +96,29 @@ export class HttpUrlUtils { | @@ -93,21 +96,29 @@ export class HttpUrlUtils { | ||
| 93 | */ | 96 | */ |
| 94 | static readonly FOLLOW_LIST_STATUS_DATA_PATH: string = "/api/rmrb-interact/interact/zh/c/batchAttention/status"; | 97 | static readonly FOLLOW_LIST_STATUS_DATA_PATH: string = "/api/rmrb-interact/interact/zh/c/batchAttention/status"; |
| 95 | /** | 98 | /** |
| 99 | + * 个人中心 启用用户 有没有被当前用户点赞状态 | ||
| 100 | + */ | ||
| 101 | + static readonly COMMENT_LIST_STATUS_DATA_PATH: string = "/api/rmrb-comment/comment/zh/c/batchCommentStatus"; | ||
| 102 | + /** | ||
| 96 | * 我的收藏 | 103 | * 我的收藏 |
| 97 | */ | 104 | */ |
| 98 | static readonly APPOINTMENT_MyCollectionList_PATH: string = "/api/rmrb-interact/content/zh/c/interact"; | 105 | static readonly APPOINTMENT_MyCollectionList_PATH: string = "/api/rmrb-interact/content/zh/c/interact"; |
| 106 | + | ||
| 99 | /** | 107 | /** |
| 100 | * 个人中心 我的评论列表 | 108 | * 个人中心 我的评论列表 |
| 101 | */ | 109 | */ |
| 102 | static readonly MINE_COMMENT_LIST_DATA_PATH: string = "/api/rmrb-comment/comment/zh/c/myCommentList"; | 110 | static readonly MINE_COMMENT_LIST_DATA_PATH: string = "/api/rmrb-comment/comment/zh/c/myCommentList"; |
| 111 | + | ||
| 103 | /** | 112 | /** |
| 104 | * 个人中心 APP获取用户等级 | 113 | * 个人中心 APP获取用户等级 |
| 105 | */ | 114 | */ |
| 106 | static readonly MINE_USER_LEVEL_DATA_PATH: string = "/api/rmrb-user-point/auth/level/zh/c/queryUserLevel"; | 115 | static readonly MINE_USER_LEVEL_DATA_PATH: string = "/api/rmrb-user-point/auth/level/zh/c/queryUserLevel"; |
| 116 | + | ||
| 107 | /** | 117 | /** |
| 108 | * 个人中心 APP获取其他用户等级 | 118 | * 个人中心 APP获取其他用户等级 |
| 109 | */ | 119 | */ |
| 110 | static readonly OTHER_USER_LEVEL_DATA_PATH: string = "/api/rmrb-user-point/auth/level/zh/c/batchUser"; | 120 | static readonly OTHER_USER_LEVEL_DATA_PATH: string = "/api/rmrb-user-point/auth/level/zh/c/batchUser"; |
| 121 | + | ||
| 111 | /** | 122 | /** |
| 112 | * 个人中心 (号主/普通用户)我的基本信息 | 123 | * 个人中心 (号主/普通用户)我的基本信息 |
| 113 | */ | 124 | */ |
| @@ -124,6 +135,20 @@ export class HttpUrlUtils { | @@ -124,6 +135,20 @@ export class HttpUrlUtils { | ||
| 124 | * 个人中心 我的关注列表 | 135 | * 个人中心 我的关注列表 |
| 125 | */ | 136 | */ |
| 126 | static readonly OTHER_USER_FOLLOW_LIST_DATA_PATH: string = "/api/rmrb-interact/interact/zh/c/userAttention/list"; | 137 | static readonly OTHER_USER_FOLLOW_LIST_DATA_PATH: string = "/api/rmrb-interact/interact/zh/c/userAttention/list"; |
| 138 | + | ||
| 139 | + /** | ||
| 140 | + * 预约操作 | ||
| 141 | + */ | ||
| 142 | + static readonly APPOINTMENT_OPERATION_STATUS_PATH: string = "/api/live-center-message/zh/c/live/subscribe"; | ||
| 143 | + | ||
| 144 | + /** | ||
| 145 | + * 点赞操作 | ||
| 146 | + */ | ||
| 147 | + static readonly COMMENT_LIKE_OPERATION_PATH: string = "/api/rmrb-comment/comment/zh/c/commentLike"; | ||
| 148 | + /** | ||
| 149 | + * 关注操作 | ||
| 150 | + */ | ||
| 151 | + static readonly FOLLOW_OPERATION_PATH: string = "/api/rmrb-interact/interact/zh/c/attention/operation"; | ||
| 127 | /** | 152 | /** |
| 128 | * 早晚报列表 | 153 | * 早晚报列表 |
| 129 | * 根据页面id获取页面楼层列表 | 154 | * 根据页面id获取页面楼层列表 |
| @@ -134,11 +159,13 @@ export class HttpUrlUtils { | @@ -134,11 +159,13 @@ export class HttpUrlUtils { | ||
| 134 | * pageSize=20&pageNum=1&topicId=10000009445 | 159 | * pageSize=20&pageNum=1&topicId=10000009445 |
| 135 | * */ | 160 | * */ |
| 136 | static readonly MORNING_EVENING_PAGE_INFO_PATH: string = "/api/rmrb-bff-display-zh/display/zh/c/pageInfo"; | 161 | static readonly MORNING_EVENING_PAGE_INFO_PATH: string = "/api/rmrb-bff-display-zh/display/zh/c/pageInfo"; |
| 162 | + | ||
| 137 | static readonly MORNING_EVENING_COMP_INFO_PATH: string = "/api/rmrb-bff-display-zh/display/zh/c/compInfo"; | 163 | static readonly MORNING_EVENING_COMP_INFO_PATH: string = "/api/rmrb-bff-display-zh/display/zh/c/compInfo"; |
| 164 | + | ||
| 138 | private static hostUrl: string = HttpUrlUtils.HOST_PRODUCT; | 165 | private static hostUrl: string = HttpUrlUtils.HOST_PRODUCT; |
| 139 | - private static userId = '' | ||
| 140 | - private static userType = '' | ||
| 141 | - private static token = '' | 166 | + private static userId='' |
| 167 | + private static userType='' | ||
| 168 | + private static token='' | ||
| 142 | 169 | ||
| 143 | static getCommonHeaders(): HashMap<string, string> { | 170 | static getCommonHeaders(): HashMap<string, string> { |
| 144 | let headers: HashMap<string, string> = new HashMap<string, string>() | 171 | let headers: HashMap<string, string> = new HashMap<string, string>() |
| @@ -151,8 +178,8 @@ export class HttpUrlUtils { | @@ -151,8 +178,8 @@ export class HttpUrlUtils { | ||
| 151 | headers.set('timestamp', HttpUrlUtils.getTimestamp()) | 178 | headers.set('timestamp', HttpUrlUtils.getTimestamp()) |
| 152 | headers.set('RMRB-X-TOKEN', HttpUrlUtils.getXToken()) | 179 | headers.set('RMRB-X-TOKEN', HttpUrlUtils.getXToken()) |
| 153 | headers.set('device_id', HttpUrlUtils.getDeviceId()) | 180 | headers.set('device_id', HttpUrlUtils.getDeviceId()) |
| 154 | - if (HttpUrlUtils.token != '') { | ||
| 155 | - headers.set('cookie', 'RMRB-X-TOKEN=' + HttpUrlUtils.token) | 181 | + if(HttpUrlUtils.getXToken()!=''){ |
| 182 | + headers.set('cookie', 'RMRB-X-TOKEN='+HttpUrlUtils.getXToken()) | ||
| 156 | } | 183 | } |
| 157 | headers.set('build_version', HttpUrlUtils.getVersion()) | 184 | headers.set('build_version', HttpUrlUtils.getVersion()) |
| 158 | headers.set('adcode', HttpUrlUtils.getAdCode()) | 185 | headers.set('adcode', HttpUrlUtils.getAdCode()) |
| @@ -233,6 +260,13 @@ export class HttpUrlUtils { | @@ -233,6 +260,13 @@ export class HttpUrlUtils { | ||
| 233 | } | 260 | } |
| 234 | 261 | ||
| 235 | private static getXToken() { | 262 | private static getXToken() { |
| 263 | + if(StringUtils.isNotEmpty(HttpUrlUtils.token)){ | ||
| 264 | + return HttpUrlUtils.token | ||
| 265 | + } | ||
| 266 | + HttpUrlUtils.token = SPHelper.default.getSync(SpConstants.USER_JWT_TOKEN,"") as string | ||
| 267 | + if(StringUtils.isNotEmpty(HttpUrlUtils.token)) { | ||
| 268 | + return HttpUrlUtils.token | ||
| 269 | + } | ||
| 236 | return 'eyJhbGciOiJIUzI1NiIsImtpZCI6ImQ4WkI2QkhxSEZrdjJ2U25BNlRwZEdKRjBHcjItVzBvS2FaYzdLOUUycmcifQ.eyJpc3MiOiJwZW9wbGVzLWRhaWx5LWZvdXJhIiwic3ViIjoicGVvcGxlcy1kYWlseS1mb3VyYSIsImV4cCI6MTcwMzY0OTYwNiwidXNlcklkIjo0NTk3NzYyOTc0NzQ5NDksInVzZXJWZXJzaW9uIjoiNDU5Nzc2Mjk3NDc0OTQ5XzIiLCJ1c2VyTmFtZSI6IkJ1bGlraWtpMTgxIiwidXNlclR5cGUiOjIsImNyZWF0b3JJZCI6NDI2NTM5MH0.jhQ9kylcm3FxWf0-lBMZuLkdtIQ6XpFnAi0AFZJNwfc'; | 270 | return 'eyJhbGciOiJIUzI1NiIsImtpZCI6ImQ4WkI2QkhxSEZrdjJ2U25BNlRwZEdKRjBHcjItVzBvS2FaYzdLOUUycmcifQ.eyJpc3MiOiJwZW9wbGVzLWRhaWx5LWZvdXJhIiwic3ViIjoicGVvcGxlcy1kYWlseS1mb3VyYSIsImV4cCI6MTcwMzY0OTYwNiwidXNlcklkIjo0NTk3NzYyOTc0NzQ5NDksInVzZXJWZXJzaW9uIjoiNDU5Nzc2Mjk3NDc0OTQ5XzIiLCJ1c2VyTmFtZSI6IkJ1bGlraWtpMTgxIiwidXNlclR5cGUiOjIsImNyZWF0b3JJZCI6NDI2NTM5MH0.jhQ9kylcm3FxWf0-lBMZuLkdtIQ6XpFnAi0AFZJNwfc'; |
| 237 | } | 271 | } |
| 238 | 272 | ||
| @@ -294,14 +328,18 @@ export class HttpUrlUtils { | @@ -294,14 +328,18 @@ export class HttpUrlUtils { | ||
| 294 | 328 | ||
| 295 | public static getUserId() { | 329 | public static getUserId() { |
| 296 | // TODO 对接登录 | 330 | // TODO 对接登录 |
| 297 | - // let userid = await SPHelper.default.get(SpConstants.USER_ID,"") | ||
| 298 | - // if(StringUtils.isNotEmpty(userid)) { | ||
| 299 | - // return userid as string; | ||
| 300 | - // } | ||
| 301 | - return HttpUrlUtils.userId; | 331 | + if(StringUtils.isNotEmpty(HttpUrlUtils.userId)){ |
| 332 | + return HttpUrlUtils.userId | ||
| 333 | + } | ||
| 334 | + HttpUrlUtils.userId = SPHelper.default.getSync(SpConstants.USER_ID,"") as string | ||
| 335 | + return HttpUrlUtils.userId; | ||
| 302 | } | 336 | } |
| 303 | 337 | ||
| 304 | - private static getUserType() { | 338 | + public static getUserType() { |
| 339 | + if(StringUtils.isNotEmpty(HttpUrlUtils.userType)){ | ||
| 340 | + return HttpUrlUtils.userType | ||
| 341 | + } | ||
| 342 | + HttpUrlUtils.userType = SPHelper.default.getSync(SpConstants.USER_Type,"") as string | ||
| 305 | return HttpUrlUtils.userType; | 343 | return HttpUrlUtils.userType; |
| 306 | } | 344 | } |
| 307 | 345 | ||
| @@ -332,11 +370,11 @@ export class HttpUrlUtils { | @@ -332,11 +370,11 @@ export class HttpUrlUtils { | ||
| 332 | } | 370 | } |
| 333 | 371 | ||
| 334 | static editUserDetail() { | 372 | static editUserDetail() { |
| 335 | - let url = HttpUrlUtils.hostUrl + "/user/zh/c/editUserDetail"; | 373 | + let url = HttpUrlUtils.hostUrl + "/api/rmrb-user-center/user/zh/c/editUserDetail"; |
| 336 | return url; | 374 | return url; |
| 337 | } | 375 | } |
| 338 | 376 | ||
| 339 | - static getAppLoginUrl(): string { | 377 | + static getAppLoginUrl() :string{ |
| 340 | let url = HttpUrlUtils.getHost() + "/api/rmrb-user-center/auth/zh/c/appLogin"; | 378 | let url = HttpUrlUtils.getHost() + "/api/rmrb-user-center/auth/zh/c/appLogin"; |
| 341 | return url; | 379 | return url; |
| 342 | } | 380 | } |
| @@ -352,7 +390,7 @@ export class HttpUrlUtils { | @@ -352,7 +390,7 @@ export class HttpUrlUtils { | ||
| 352 | } | 390 | } |
| 353 | 391 | ||
| 354 | static getAppointmentListDataUrl() { | 392 | static getAppointmentListDataUrl() { |
| 355 | - let url = HttpUrlUtils.HOST_SIT + HttpUrlUtils.APPOINTMENT_LIST_DATA_PATH | 393 | + let url = HttpUrlUtils.hostUrl + HttpUrlUtils.APPOINTMENT_LIST_DATA_PATH |
| 356 | return url | 394 | return url |
| 357 | } | 395 | } |
| 358 | 396 | ||
| @@ -362,108 +400,129 @@ export class HttpUrlUtils { | @@ -362,108 +400,129 @@ export class HttpUrlUtils { | ||
| 362 | } | 400 | } |
| 363 | 401 | ||
| 364 | static getFollowListDetailDataUrl() { | 402 | static getFollowListDetailDataUrl() { |
| 365 | - let url = HttpUrlUtils.HOST_SIT + HttpUrlUtils.FOLLOW_LIST_DETAIL_DATA_PATH | 403 | + let url = HttpUrlUtils.hostUrl + HttpUrlUtils.FOLLOW_LIST_DETAIL_DATA_PATH |
| 366 | return url | 404 | return url |
| 367 | } | 405 | } |
| 368 | 406 | ||
| 369 | static getFollowListDataUrl() { | 407 | static getFollowListDataUrl() { |
| 370 | - let url = HttpUrlUtils.HOST_SIT + HttpUrlUtils.FOLLOW_LIST_DATA_PATH | 408 | + let url = HttpUrlUtils.hostUrl + HttpUrlUtils.FOLLOW_LIST_DATA_PATH |
| 371 | return url | 409 | return url |
| 372 | } | 410 | } |
| 373 | 411 | ||
| 374 | static getMineFollowListDataUrl() { | 412 | static getMineFollowListDataUrl() { |
| 375 | - let url = HttpUrlUtils.HOST_SIT + HttpUrlUtils.MINE_FOLLOW_LIST_DATA_PATH | 413 | + let url = HttpUrlUtils.hostUrl + HttpUrlUtils.MINE_FOLLOW_LIST_DATA_PATH |
| 376 | return url | 414 | return url |
| 377 | } | 415 | } |
| 378 | 416 | ||
| 379 | static getFollowListStatusDataUrl() { | 417 | static getFollowListStatusDataUrl() { |
| 380 | - let url = HttpUrlUtils.HOST_SIT + HttpUrlUtils.FOLLOW_LIST_STATUS_DATA_PATH | 418 | + let url = HttpUrlUtils.hostUrl + HttpUrlUtils.FOLLOW_LIST_STATUS_DATA_PATH |
| 419 | + return url | ||
| 420 | + } | ||
| 421 | + | ||
| 422 | + static getCommentListStatusDataUrl() { | ||
| 423 | + let url = HttpUrlUtils.hostUrl + HttpUrlUtils.COMMENT_LIST_STATUS_DATA_PATH | ||
| 381 | return url | 424 | return url |
| 382 | } | 425 | } |
| 383 | 426 | ||
| 384 | static getMineCommentListDataUrl() { | 427 | static getMineCommentListDataUrl() { |
| 385 | - let url = HttpUrlUtils.HOST_SIT + HttpUrlUtils.MINE_COMMENT_LIST_DATA_PATH | 428 | + let url = HttpUrlUtils.hostUrl + HttpUrlUtils.MINE_COMMENT_LIST_DATA_PATH |
| 386 | return url | 429 | return url |
| 387 | } | 430 | } |
| 388 | 431 | ||
| 389 | static getMineUserLevelDataUrl() { | 432 | static getMineUserLevelDataUrl() { |
| 390 | - let url = HttpUrlUtils.HOST_SIT + HttpUrlUtils.MINE_USER_LEVEL_DATA_PATH | 433 | + let url = HttpUrlUtils.hostUrl + HttpUrlUtils.MINE_USER_LEVEL_DATA_PATH |
| 391 | return url | 434 | return url |
| 392 | } | 435 | } |
| 393 | 436 | ||
| 394 | static getOtherUserLevelDataUrl() { | 437 | static getOtherUserLevelDataUrl() { |
| 395 | - let url = HttpUrlUtils.HOST_SIT + HttpUrlUtils.OTHER_USER_LEVEL_DATA_PATH | 438 | + let url = HttpUrlUtils.hostUrl + HttpUrlUtils.OTHER_USER_LEVEL_DATA_PATH |
| 396 | return url | 439 | return url |
| 397 | } | 440 | } |
| 398 | 441 | ||
| 399 | static getMineUserDetailDataUrl() { | 442 | static getMineUserDetailDataUrl() { |
| 400 | - let url = HttpUrlUtils.HOST_SIT + HttpUrlUtils.MINE_USER_DETAIL_DATA_PATH | 443 | + let url = HttpUrlUtils.hostUrl + HttpUrlUtils.MINE_USER_DETAIL_DATA_PATH |
| 401 | return url | 444 | return url |
| 402 | } | 445 | } |
| 403 | 446 | ||
| 404 | static getOtherUserDetailDataUrl() { | 447 | static getOtherUserDetailDataUrl() { |
| 405 | - let url = HttpUrlUtils.HOST_SIT + HttpUrlUtils.OTHER_USER_DETAIL_DATA_PATH | 448 | + let url = HttpUrlUtils.hostUrl + HttpUrlUtils.OTHER_USER_DETAIL_DATA_PATH |
| 406 | return url | 449 | return url |
| 407 | } | 450 | } |
| 408 | 451 | ||
| 409 | static getOtherCommentListDataUrl() { | 452 | static getOtherCommentListDataUrl() { |
| 410 | - let url = HttpUrlUtils.HOST_SIT + HttpUrlUtils.OTHER_COMMENT_LIST_DATA_PATH | 453 | + let url = HttpUrlUtils.hostUrl + HttpUrlUtils.OTHER_COMMENT_LIST_DATA_PATH |
| 411 | return url | 454 | return url |
| 412 | } | 455 | } |
| 413 | 456 | ||
| 414 | static getOtherUserFollowListDataUrl() { | 457 | static getOtherUserFollowListDataUrl() { |
| 415 | - let url = HttpUrlUtils.HOST_SIT + HttpUrlUtils.OTHER_USER_FOLLOW_LIST_DATA_PATH | 458 | + let url = HttpUrlUtils.hostUrl + HttpUrlUtils.OTHER_USER_FOLLOW_LIST_DATA_PATH |
| 416 | return url | 459 | return url |
| 417 | } | 460 | } |
| 418 | 461 | ||
| 419 | - | ||
| 420 | - static getYcgCommonHeaders(): HashMap<string, string> { | ||
| 421 | - let headers: HashMap<string, string> = new HashMap<string, string>() | ||
| 422 | - | ||
| 423 | - headers.set('mpassid', 'XGt6jfGUx8ADAKruTyAMdhHj') | ||
| 424 | - headers.set('city', "%E5%90%88%E8%82%A5%E5%B8%82") | ||
| 425 | - headers.set('User-Agent', 'Dalvik/2.1.0 (Linux; U; Android 10; PCT-AL10 Build/HUAWEIPCT-AL10)') | ||
| 426 | - headers.set('channel', "rmrb_china_0000") | ||
| 427 | - headers.set('appCode', "0af1f9085e484c97b2a44704bae72c07") | ||
| 428 | - headers.set('Authorization', "APPCODE 0af1f9085e484c97b2a44704bae72c07") | ||
| 429 | - headers.set('X-Ca-Stage', "TEST") | ||
| 430 | - headers.set('plat', "Phone") | ||
| 431 | - headers.set('Content-Type', 'application/json; charset=utf-8') | ||
| 432 | - headers.set('timestamp', "740977741") | ||
| 433 | - headers.set('RMRB-X-TOKEN', "eyJhbGciOiJIUzI1NiIsImtpZCI6IklFazBGclhfV2RYMEx1ZktDU01iYTVYd0VmUHZ6a043T0F5UTRFLWIwWU0ifQ.eyJpc3MiOiJwZW9wbGVzLWRhaWx5LWZvdXJhIiwic3ViIjoicGVvcGxlcy1kYWlseS1mb3VyYSIsImV4cCI6MTcxMDc1NjM3NywidXNlcklkIjo1NjczODc0NzcwNjM2MjEsInVzZXJWZXJzaW9uIjoiNTY3Mzg3NDc3MDYzNjIxXzAiLCJ1c2VyTmFtZSI6IiVFNCVCQSVCQSVFNiVCMCU5MSVFNiU5NyVBNSVFNiU4QSVBNSVFNyVCRCU5MSVFNSU4RiU4QmFQcnRxNSIsInVzZXJUeXBlIjoxLCJjcmVhdG9ySWQiOm51bGwsInVzZXJJZFpoIjpudWxsfQ.KBkF0Yki-JWlq0ZIOCzgKwQc1ycBnFHa6CF-rMPRgHU") | ||
| 434 | - headers.set('device_id', "5156098c-6c44-3514-af70-04a0139a9327") | ||
| 435 | - // headers.set('cookie', 'RMRB-X-TOKEN=eyJhbGciOiJIUzI1NiIsImtpZCI6IklFazBGclhfV2RYMEx1ZktDU01iYTVYd0VmUHZ6a043T0F5UTRFLWIwWU0ifQ.eyJpc3MiOiJwZW9wbGVzLWRhaWx5LWZvdXJhIiwic3ViIjoicGVvcGxlcy1kYWlseS1mb3VyYSIsImV4cCI6MTcxMDU4Mzk0MywidXNlcklkIjo1NjczODc0NzcwNjM2MjEsInVzZXJWZXJzaW9uIjoiNTY3Mzg3NDc3MDYzNjIxXzAiLCJ1c2VyTmFtZSI6IiVFNCVCQSVCQSVFNiVCMCU5MSVFNiU5NyVBNSVFNiU4QSVBNSVFNyVCRCU5MSVFNSU4RiU4QmFQcnRxNSIsInVzZXJUeXBlIjoxLCJjcmVhdG9ySWQiOm51bGwsInVzZXJJZFpoIjpudWxsfQ._LTKrUxQozpCj1XMhx1TWOIxn5gjDveoPuMFGpI0g_8') | ||
| 436 | - headers.set('build_version', "202403112023") | ||
| 437 | - headers.set('adcode', "340000") | ||
| 438 | - headers.set('os_version', "10") | ||
| 439 | - headers.set('city_dode', "340100") | ||
| 440 | - headers.set('userId', "567387477063621") | ||
| 441 | - headers.set('versionCode', "7302") | ||
| 442 | - headers.set('system', "Android") | ||
| 443 | - headers.set('version_name', "7.3.0.2") | ||
| 444 | - headers.set('EagleEye-TraceID', '101118E4D006453DA549A82AA8CAFBFE') | ||
| 445 | - headers.set('imei', "5156098c-6c44-3514-af70-04a0139a9327") | ||
| 446 | - headers.set('userType', "1") | ||
| 447 | - headers.set('Accept-Language', 'zh') | ||
| 448 | - | ||
| 449 | - // HttpUrlUtils.addSpecialHeaders(headers); | ||
| 450 | - // Logger.debug("TAG", '******************* commonHeaders headers start ******************************** '); | ||
| 451 | - // headers.forEach((v,k)=>{ | ||
| 452 | - // Logger.debug("TAG", 'getCommonHeaders header: ' + k + ': ' + v); | ||
| 453 | - // }) | ||
| 454 | - // Logger.debug("TAG", '******************* commonHeaders headers end ******************************** '); | ||
| 455 | - return headers; | 462 | + static getAppointmentOperationUrl() { |
| 463 | + let url = HttpUrlUtils.hostUrl + HttpUrlUtils.APPOINTMENT_OPERATION_STATUS_PATH | ||
| 464 | + return url | ||
| 456 | } | 465 | } |
| 457 | 466 | ||
| 458 | - public static setUserId(userId: string) { | ||
| 459 | - HttpUrlUtils.userId = userId; | 467 | + static getCommentLikeOperationUrl() { |
| 468 | + let url = HttpUrlUtils.hostUrl + HttpUrlUtils.COMMENT_LIKE_OPERATION_PATH | ||
| 469 | + return url | ||
| 460 | } | 470 | } |
| 461 | 471 | ||
| 462 | - public static setUserType(userType: string) { | ||
| 463 | - HttpUrlUtils.userType = userType; | 472 | + static getFollowOperationUrl() { |
| 473 | + let url = HttpUrlUtils.hostUrl + HttpUrlUtils.FOLLOW_OPERATION_PATH | ||
| 474 | + return url | ||
| 464 | } | 475 | } |
| 465 | 476 | ||
| 466 | - public static setUserToken(token: string) { | ||
| 467 | - HttpUrlUtils.token = token; | 477 | + |
| 478 | + // static getYcgCommonHeaders(): HashMap<string, string> { | ||
| 479 | + // let headers: HashMap<string, string> = new HashMap<string, string>() | ||
| 480 | + // | ||
| 481 | + // headers.set('mpassid', 'XGt6jfGUx8ADAKruTyAMdhHj') | ||
| 482 | + // headers.set('city', "%E5%90%88%E8%82%A5%E5%B8%82") | ||
| 483 | + // headers.set('User-Agent', 'Dalvik/2.1.0 (Linux; U; Android 10; PCT-AL10 Build/HUAWEIPCT-AL10)') | ||
| 484 | + // headers.set('channel', "rmrb_china_0000") | ||
| 485 | + // headers.set('appCode', "0af1f9085e484c97b2a44704bae72c07") | ||
| 486 | + // headers.set('Authorization', "APPCODE 0af1f9085e484c97b2a44704bae72c07") | ||
| 487 | + // headers.set('X-Ca-Stage', "TEST") | ||
| 488 | + // headers.set('plat', "Phone") | ||
| 489 | + // headers.set('Content-Type', 'application/json; charset=utf-8') | ||
| 490 | + // headers.set('timestamp', "740977741") | ||
| 491 | + // headers.set('RMRB-X-TOKEN', "eyJhbGciOiJIUzI1NiIsImtpZCI6IklFazBGclhfV2RYMEx1ZktDU01iYTVYd0VmUHZ6a043T0F5UTRFLWIwWU0ifQ.eyJpc3MiOiJwZW9wbGVzLWRhaWx5LWZvdXJhIiwic3ViIjoicGVvcGxlcy1kYWlseS1mb3VyYSIsImV4cCI6MTcxMDc1NjM3NywidXNlcklkIjo1NjczODc0NzcwNjM2MjEsInVzZXJWZXJzaW9uIjoiNTY3Mzg3NDc3MDYzNjIxXzAiLCJ1c2VyTmFtZSI6IiVFNCVCQSVCQSVFNiVCMCU5MSVFNiU5NyVBNSVFNiU4QSVBNSVFNyVCRCU5MSVFNSU4RiU4QmFQcnRxNSIsInVzZXJUeXBlIjoxLCJjcmVhdG9ySWQiOm51bGwsInVzZXJJZFpoIjpudWxsfQ.KBkF0Yki-JWlq0ZIOCzgKwQc1ycBnFHa6CF-rMPRgHU") | ||
| 492 | + // headers.set('device_id', "5156098c-6c44-3514-af70-04a0139a9327") | ||
| 493 | + // // headers.set('cookie', 'RMRB-X-TOKEN=eyJhbGciOiJIUzI1NiIsImtpZCI6IklFazBGclhfV2RYMEx1ZktDU01iYTVYd0VmUHZ6a043T0F5UTRFLWIwWU0ifQ.eyJpc3MiOiJwZW9wbGVzLWRhaWx5LWZvdXJhIiwic3ViIjoicGVvcGxlcy1kYWlseS1mb3VyYSIsImV4cCI6MTcxMDU4Mzk0MywidXNlcklkIjo1NjczODc0NzcwNjM2MjEsInVzZXJWZXJzaW9uIjoiNTY3Mzg3NDc3MDYzNjIxXzAiLCJ1c2VyTmFtZSI6IiVFNCVCQSVCQSVFNiVCMCU5MSVFNiU5NyVBNSVFNiU4QSVBNSVFNyVCRCU5MSVFNSU4RiU4QmFQcnRxNSIsInVzZXJUeXBlIjoxLCJjcmVhdG9ySWQiOm51bGwsInVzZXJJZFpoIjpudWxsfQ._LTKrUxQozpCj1XMhx1TWOIxn5gjDveoPuMFGpI0g_8') | ||
| 494 | + // headers.set('build_version', "202403112023") | ||
| 495 | + // headers.set('adcode', "340000") | ||
| 496 | + // headers.set('os_version', "10") | ||
| 497 | + // headers.set('city_dode', "340100") | ||
| 498 | + // headers.set('userId', "567387477063621") | ||
| 499 | + // headers.set('versionCode', "7302") | ||
| 500 | + // headers.set('system', "Android") | ||
| 501 | + // headers.set('version_name', "7.3.0.2") | ||
| 502 | + // headers.set('EagleEye-TraceID', '101118E4D006453DA549A82AA8CAFBFE') | ||
| 503 | + // headers.set('imei', "5156098c-6c44-3514-af70-04a0139a9327") | ||
| 504 | + // headers.set('userType', "1") | ||
| 505 | + // headers.set('Accept-Language', 'zh') | ||
| 506 | + // | ||
| 507 | + // // HttpUrlUtils.addSpecialHeaders(headers); | ||
| 508 | + // // Logger.debug("TAG", '******************* commonHeaders headers start ******************************** '); | ||
| 509 | + // // headers.forEach((v,k)=>{ | ||
| 510 | + // // Logger.debug("TAG", 'getCommonHeaders header: ' + k + ': ' + v); | ||
| 511 | + // // }) | ||
| 512 | + // // Logger.debug("TAG", '******************* commonHeaders headers end ******************************** '); | ||
| 513 | + // return headers; | ||
| 514 | + // } | ||
| 515 | + | ||
| 516 | + public static setUserId(userId:string){ | ||
| 517 | + HttpUrlUtils.userId=userId; | ||
| 518 | + } | ||
| 519 | + | ||
| 520 | + public static setUserType(userType:string){ | ||
| 521 | + HttpUrlUtils.userType=userType; | ||
| 522 | + } | ||
| 523 | + | ||
| 524 | + public static setUserToken(token:string){ | ||
| 525 | + HttpUrlUtils.token=token; | ||
| 468 | } | 526 | } |
| 527 | + | ||
| 469 | } | 528 | } |
| @@ -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.detailVideoListPage | ||
| 57 | - } else if (action.params?.detailPageType == 9) { | 56 | + return WDRouterPage.detailPlayShortVideoPage |
| 57 | + } else if (action.params?.detailPageType == 9 ) { | ||
| 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 |
| @@ -35,7 +35,10 @@ export class WDRouterPage { | @@ -35,7 +35,10 @@ export class WDRouterPage { | ||
| 35 | static detailPlayLivePage = new WDRouterPage("wdDetailPlayLive", "ets/pages/DetailPlayLivePage"); | 35 | static detailPlayLivePage = new WDRouterPage("wdDetailPlayLive", "ets/pages/DetailPlayLivePage"); |
| 36 | // 多图(图集)详情页 | 36 | // 多图(图集)详情页 |
| 37 | static multiPictureDetailPage = new WDRouterPage("phone", "ets/pages/detail/MultiPictureDetailPage"); | 37 | static multiPictureDetailPage = new WDRouterPage("phone", "ets/pages/detail/MultiPictureDetailPage"); |
| 38 | + // 音乐详情页 | ||
| 39 | + static audioDetail = new WDRouterPage("phone", "ets/pages/detail/AudioDetail"); | ||
| 38 | static loginPage = new WDRouterPage("wdLogin", "ets/pages/login/LoginPage"); | 40 | static loginPage = new WDRouterPage("wdLogin", "ets/pages/login/LoginPage"); |
| 41 | + | ||
| 39 | static forgetPasswordPage = new WDRouterPage("wdLogin", "ets/pages/login/ForgetPasswordPage"); | 42 | static forgetPasswordPage = new WDRouterPage("wdLogin", "ets/pages/login/ForgetPasswordPage"); |
| 40 | //我的 预约 | 43 | //我的 预约 |
| 41 | static appointmentListPage = new WDRouterPage("wdComponent", "ets/components/page/AppointmentListPage"); | 44 | static appointmentListPage = new WDRouterPage("wdComponent", "ets/components/page/AppointmentListPage"); |
| @@ -62,7 +65,19 @@ export class WDRouterPage { | @@ -62,7 +65,19 @@ export class WDRouterPage { | ||
| 62 | static settingPage = new WDRouterPage("wdComponent", "ets/components/page/SettingPage"); | 65 | static settingPage = new WDRouterPage("wdComponent", "ets/components/page/SettingPage"); |
| 63 | // 设置密码页、设置手机号页等等 (需要传参) | 66 | // 设置密码页、设置手机号页等等 (需要传参) |
| 64 | static settingPasswordPage = new WDRouterPage("wdLogin", "ets/pages/login/SettingPasswordPage"); | 67 | static settingPasswordPage = new WDRouterPage("wdLogin", "ets/pages/login/SettingPasswordPage"); |
| 68 | + | ||
| 65 | //其他普通用户 主页 | 69 | //其他普通用户 主页 |
| 66 | static otherNormalUserHomePagePage = new WDRouterPage("wdComponent", "ets/pages/OtherNormalUserHomePage"); | 70 | static otherNormalUserHomePagePage = new WDRouterPage("wdComponent", "ets/pages/OtherNormalUserHomePage"); |
| 71 | + | ||
| 72 | + static guidePage = new WDRouterPage("wdLogin", "ets/pages/guide/GuidePages"); | ||
| 73 | + | ||
| 74 | + //隐私政策页面 | ||
| 75 | + static privacyPage = new WDRouterPage("phone", "ets/pages/launchPage/PrivacyPage"); | ||
| 76 | + //启动广告页面 | ||
| 77 | + static launchAdvertisingPage = new WDRouterPage("phone", "ets/pages/launchPage/LaunchAdvertisingPage"); | ||
| 78 | + //主页 | ||
| 79 | + static mainPage = new WDRouterPage("phone", "ets/pages/MainPage"); | ||
| 80 | + | ||
| 81 | + | ||
| 67 | // static loginProtocolPage = new WDRouterPage("wdLogin", "ets/pages/login/LoginProtocolWebview"); | 82 | // static loginProtocolPage = new WDRouterPage("wdLogin", "ets/pages/login/LoginProtocolWebview"); |
| 68 | } | 83 | } |
| @@ -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 | } |
| 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,12 +8,12 @@ | @@ -8,12 +8,12 @@ | ||
| 8 | "version": "1.0.0", | 8 | "version": "1.0.0", |
| 9 | "dependencies": { | 9 | "dependencies": { |
| 10 | "wdConstant": "file:../../commons/wdConstant", | 10 | "wdConstant": "file:../../commons/wdConstant", |
| 11 | + "wdPlayer": "file:../../features/wdPlayer", | ||
| 12 | + "wdLogin": "file:../../features/wdLogin", | ||
| 11 | "wdKit": "file:../../commons/wdKit", | 13 | "wdKit": "file:../../commons/wdKit", |
| 12 | "wdWebComponent": "file:../../commons/wdWebComponent", | 14 | "wdWebComponent": "file:../../commons/wdWebComponent", |
| 13 | "wdBean": "file:../../features/wdBean", | 15 | "wdBean": "file:../../features/wdBean", |
| 14 | "wdRouter": "file:../../commons/wdRouter", | 16 | "wdRouter": "file:../../commons/wdRouter", |
| 15 | - "wdNetwork": "file:../../commons/wdNetwork", | ||
| 16 | - "wdPlayer": "file:../../features/wdPlayer", | ||
| 17 | - "wdLogin": "file:../../features/wdLogin" | 17 | + "wdNetwork": "file:../../commons/wdNetwork" |
| 18 | } | 18 | } |
| 19 | } | 19 | } |
| 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 |
| @@ -7,7 +7,8 @@ import { MorningEveningViewModel } from '../../viewmodel/MorningEveningViewModel | @@ -7,7 +7,8 @@ import { MorningEveningViewModel } from '../../viewmodel/MorningEveningViewModel | ||
| 7 | import { PaperTitleComponent } from './PaperTitleComponent'; | 7 | import { PaperTitleComponent } from './PaperTitleComponent'; |
| 8 | import { SingleColumn999Component } from './SingleColumn999Component'; | 8 | import { SingleColumn999Component } from './SingleColumn999Component'; |
| 9 | import { topicInfoView } from './topicInfoView'; | 9 | import { topicInfoView } from './topicInfoView'; |
| 10 | -import { WDPlayerController } from 'wdPlayer'; | 10 | +import { DateFormatUtil, PlayerConstants, WDPlayerController } from 'wdPlayer'; |
| 11 | +import { AudioDataList } from 'wdBean/src/main/ets/bean/morningevening/AudioDataList'; | ||
| 11 | 12 | ||
| 12 | const TAG = 'MorningEveningPaperComponent'; | 13 | const TAG = 'MorningEveningPaperComponent'; |
| 13 | 14 | ||
| @@ -39,17 +40,57 @@ export struct MorningEveningPaperComponent { | @@ -39,17 +40,57 @@ export struct MorningEveningPaperComponent { | ||
| 39 | // } as MorningEveningPaperDTO | 40 | // } as MorningEveningPaperDTO |
| 40 | @Provide title: string = '' | 41 | @Provide title: string = '' |
| 41 | @Provide subTitle: string = '' | 42 | @Provide subTitle: string = '' |
| 43 | + @Provide audioTitle: string = '' | ||
| 42 | @Provide isAudioPlaying: boolean = false | 44 | @Provide isAudioPlaying: boolean = false |
| 45 | + @Provide status: number = PlayerConstants.STATUS_START; | ||
| 46 | + @Provide currentTime: string = "00:00"; | ||
| 47 | + @Provide totalTime: string = "00:00"; | ||
| 48 | + @Provide progressVal: number = 0; | ||
| 49 | + private audioDataList: AudioDataList[] = [] | ||
| 43 | private playerController: WDPlayerController = new WDPlayerController(); | 50 | private playerController: WDPlayerController = new WDPlayerController(); |
| 44 | - private xComponentController: XComponentController = new XComponentController(); | ||
| 45 | simpleAudioDialog: CustomDialogController = new CustomDialogController({ | 51 | simpleAudioDialog: CustomDialogController = new CustomDialogController({ |
| 46 | - builder: PaperReaderSimpleDialog(), | 52 | + builder: PaperReaderSimpleDialog({ |
| 53 | + cancel: this.onCancel, | ||
| 54 | + confirm: this.onConfirm, | ||
| 55 | + playerController: this.playerController | ||
| 56 | + }), | ||
| 47 | autoCancel: false, | 57 | autoCancel: false, |
| 48 | customStyle: true, | 58 | customStyle: true, |
| 49 | alignment: DialogAlignment.CenterStart, | 59 | alignment: DialogAlignment.CenterStart, |
| 50 | - offset: { dx: 12, dy: -150 } | 60 | + offset: { dx: 12, dy: -150 }, |
| 61 | + | ||
| 51 | }) | 62 | }) |
| 52 | 63 | ||
| 64 | + onCancel() { | ||
| 65 | + Logger.info(TAG, "cj2024 onCancel = ") | ||
| 66 | + } | ||
| 67 | + | ||
| 68 | + /** | ||
| 69 | + * 回调无用 | ||
| 70 | + **/ | ||
| 71 | + onConfirm() { | ||
| 72 | + Logger.info(TAG, "cj2024 onConfirm = ") | ||
| 73 | + // if (this.playerController != undefined) { | ||
| 74 | + // | ||
| 75 | + // } | ||
| 76 | + // this.status = PlayerConstants.STATUS_PAUSE; | ||
| 77 | + // this.playerController?.pause() | ||
| 78 | + } | ||
| 79 | + | ||
| 80 | + // 续播判断 | ||
| 81 | + changeContinue() { | ||
| 82 | + Logger.info(TAG, "cj2024 changeContinue = 1") | ||
| 83 | + // if (this.nextContId) { | ||
| 84 | + this.playerController.continue = () => { | ||
| 85 | + Logger.info(TAG, "cj2024 changeContinue = 2") | ||
| 86 | + this.playerController?.stop(); | ||
| 87 | + // this.playVM.playWithContentId(this.nextContId ?? ''); | ||
| 88 | + } | ||
| 89 | + return; | ||
| 90 | + // } | ||
| 91 | + this.playerController.continue = undefined; | ||
| 92 | + } | ||
| 93 | + | ||
| 53 | async aboutToAppear() { | 94 | async aboutToAppear() { |
| 54 | console.info(TAG, `aboutToAppear`) | 95 | console.info(TAG, `aboutToAppear`) |
| 55 | 96 | ||
| @@ -74,16 +115,26 @@ export struct MorningEveningPaperComponent { | @@ -74,16 +115,26 @@ export struct MorningEveningPaperComponent { | ||
| 74 | this.compListItem = compInfoBean?.compList[0] | 115 | this.compListItem = compInfoBean?.compList[0] |
| 75 | if (compInfoBean?.compList[0].audioDataList) { | 116 | if (compInfoBean?.compList[0].audioDataList) { |
| 76 | this.audioPlayUrl = compInfoBean?.compList[0].audioDataList[0].audioUrl | 117 | this.audioPlayUrl = compInfoBean?.compList[0].audioDataList[0].audioUrl |
| 118 | + this.audioTitle = compInfoBean?.compList[0].audioDataList[0].title | ||
| 77 | } | 119 | } |
| 78 | } | 120 | } |
| 79 | 121 | ||
| 80 | Logger.info(TAG, "compInfoBean compStyle = " + compInfoBean.compList[0].compStyle) | 122 | Logger.info(TAG, "compInfoBean compStyle = " + compInfoBean.compList[0].compStyle) |
| 81 | - | 123 | + this.playerController.onTimeUpdate = (position, duration) => { |
| 124 | + this.currentTime = DateFormatUtil.secondToTime(position); | ||
| 125 | + this.totalTime = DateFormatUtil.secondToTime(duration); | ||
| 126 | + this.progressVal = Math.floor(position * 100 / duration); | ||
| 127 | + } | ||
| 82 | } catch (exception) { | 128 | } catch (exception) { |
| 83 | 129 | ||
| 84 | } | 130 | } |
| 85 | } | 131 | } |
| 86 | 132 | ||
| 133 | + onPageHide() { | ||
| 134 | + this.status = PlayerConstants.STATUS_PAUSE; | ||
| 135 | + this.playerController?.pause(); | ||
| 136 | + } | ||
| 137 | + | ||
| 87 | build() { | 138 | build() { |
| 88 | Stack({ alignContent: Alignment.Top }) { | 139 | Stack({ alignContent: Alignment.Top }) { |
| 89 | List() { | 140 | List() { |
| 1 | import { PhotoListBean } from 'wdBean'; | 1 | import { PhotoListBean } from 'wdBean'; |
| 2 | +import { Logger } from 'wdKit'; | ||
| 3 | + | ||
| 4 | +const TAG = 'MultiPictureDetailPageComponent'; | ||
| 2 | 5 | ||
| 3 | @Component | 6 | @Component |
| 4 | export struct MultiPictureDetailItemComponent { | 7 | export struct MultiPictureDetailItemComponent { |
| 8 | + private photoListLength: number = 1; | ||
| 9 | + private index: number = 1; | ||
| 5 | private newsTitle: string = ''; | 10 | private newsTitle: string = ''; |
| 6 | private MultiPictureDetailItem: PhotoListBean = {} as PhotoListBean | 11 | private MultiPictureDetailItem: PhotoListBean = {} as PhotoListBean |
| 7 | 12 | ||
| 13 | + | ||
| 14 | + async aboutToAppear() { | ||
| 15 | + Logger.info(TAG, 'pictures preview') | ||
| 16 | + } | ||
| 17 | + | ||
| 8 | build() { | 18 | build() { |
| 9 | - Stack() { | ||
| 10 | - Image(this.MultiPictureDetailItem.picPath) | ||
| 11 | - .width('100%') | ||
| 12 | - .aspectRatio(this.MultiPictureDetailItem.width / this.MultiPictureDetailItem.height) | ||
| 13 | - .objectFit(ImageFit.Fill) | 19 | + Stack({ alignContent: Alignment.BottomStart }) { |
| 20 | + Row() { | ||
| 21 | + Image(this.MultiPictureDetailItem.picPath) | ||
| 22 | + .alt($r('app.media.picture_loading')) | ||
| 23 | + .width('100%') | ||
| 24 | + .aspectRatio(this.MultiPictureDetailItem.width / this.MultiPictureDetailItem.height) | ||
| 25 | + .objectFit(ImageFit.Fill) | ||
| 26 | + } | ||
| 27 | + .height('100%') | ||
| 28 | + .width('100%') | ||
| 29 | + | ||
| 30 | + | ||
| 31 | + Row() { | ||
| 32 | + Flex({ | ||
| 33 | + direction: FlexDirection.Column, | ||
| 34 | + justifyContent: FlexAlign.Start | ||
| 35 | + }) { | ||
| 36 | + Text() { | ||
| 37 | + Span(`${this.index + 1}`).fontSize(24).fontFamily('PingFang SC-Medium').fontWeight(500).lineHeight(28) | ||
| 38 | + Span(`/${this.photoListLength}`).fontSize(14).fontFamily('PingFang SC-Medium').fontWeight(500).lineHeight(19) | ||
| 39 | + }.fontColor(Color.White).margin(4) | ||
| 40 | + | ||
| 41 | + Text(`${this.newsTitle}`).fontColor(Color.White).fontSize(16).fontFamily('PingFang SC-Semibold') | ||
| 42 | + .fontWeight(600).lineHeight(24) | ||
| 43 | + .margin ({ | ||
| 44 | + top: 4, | ||
| 45 | + left: 0, | ||
| 46 | + bottom: 4, | ||
| 47 | + right: 0 | ||
| 48 | + }) | ||
| 49 | + Text(`${this.MultiPictureDetailItem.picDesc}`).fontColor(Color.White) | ||
| 50 | + .fontSize(14).fontFamily('PingFang SC-Regular').fontWeight(400).lineHeight(22) | ||
| 51 | + .textOverflow({ overflow: TextOverflow.Ellipsis }) | ||
| 52 | + .margin ({ | ||
| 53 | + top: 4, | ||
| 54 | + left: 0, | ||
| 55 | + bottom: 4, | ||
| 56 | + right: 18 | ||
| 57 | + }) | ||
| 58 | + } | ||
| 59 | + } | ||
| 60 | + .width('100%') | ||
| 61 | + .height(178) | ||
| 62 | + .margin ({ | ||
| 63 | + top: 8, | ||
| 64 | + left: 18, | ||
| 65 | + bottom: 8, | ||
| 66 | + right: 18 | ||
| 67 | + }) | ||
| 68 | + | ||
| 14 | } | 69 | } |
| 15 | .backgroundColor(Color.Black) | 70 | .backgroundColor(Color.Black) |
| 16 | .width('100%') | 71 | .width('100%') |
| @@ -8,16 +8,15 @@ import { MultiPictureDetailItemComponent } from './MultiPictureDetailItemCompone | @@ -8,16 +8,15 @@ import { MultiPictureDetailItemComponent } from './MultiPictureDetailItemCompone | ||
| 8 | 8 | ||
| 9 | const TAG = 'MultiPictureDetailPageComponent'; | 9 | const TAG = 'MultiPictureDetailPageComponent'; |
| 10 | 10 | ||
| 11 | -@Preview | ||
| 12 | @Component | 11 | @Component |
| 13 | export struct MultiPictureDetailPageComponent { | 12 | export struct MultiPictureDetailPageComponent { |
| 13 | + private relId: string = '' | ||
| 14 | + private contentId: string = '' | ||
| 15 | + private relType: string = '' | ||
| 14 | private displayTool = display.getDefaultDisplaySync() | 16 | private displayTool = display.getDefaultDisplaySync() |
| 15 | private screenWidth: number = 0 | 17 | private screenWidth: number = 0 |
| 16 | private picWidth: number = 0 | 18 | private picWidth: number = 0 |
| 17 | @State picHeight: number = 0 | 19 | @State picHeight: number = 0 |
| 18 | - @State relId: string = '500005189942' | ||
| 19 | - @State contentId: string = '30043715146' | ||
| 20 | - @State relType: string = '1' | ||
| 21 | @State contentDetailData: ContentDetailDTO[] = [] as ContentDetailDTO[] | 20 | @State contentDetailData: ContentDetailDTO[] = [] as ContentDetailDTO[] |
| 22 | @Provide @Watch('onCurrentPageNumUpdated') currentPageNum: string = '01' | 21 | @Provide @Watch('onCurrentPageNumUpdated') currentPageNum: string = '01' |
| 23 | private swiperController: SwiperController = new SwiperController() | 22 | private swiperController: SwiperController = new SwiperController() |
| @@ -35,7 +34,8 @@ export struct MultiPictureDetailPageComponent { | @@ -35,7 +34,8 @@ export struct MultiPictureDetailPageComponent { | ||
| 35 | async aboutToAppear() { | 34 | async aboutToAppear() { |
| 36 | //获取宽高尺寸 | 35 | //获取宽高尺寸 |
| 37 | this.screenWidth = this.displayTool.width | 36 | this.screenWidth = this.displayTool.width |
| 38 | - this.picWidth = this.screenWidth - vp2px(52) | 37 | + // this.picWidth = this.screenWidth - vp2px(52) |
| 38 | + this.picWidth = this.screenWidth | ||
| 39 | this.picHeight = this.picWidth * 566 / 378 | 39 | this.picHeight = this.picWidth * 566 / 378 |
| 40 | //注册字体 | 40 | //注册字体 |
| 41 | font.registerFont({ | 41 | font.registerFont({ |
| @@ -54,12 +54,12 @@ export struct MultiPictureDetailPageComponent { | @@ -54,12 +54,12 @@ export struct MultiPictureDetailPageComponent { | ||
| 54 | if (this.contentDetailData && this.contentDetailData.length > 0 && this.contentDetailData[0].photoList && this.contentDetailData[0].photoList?.length > 0) { | 54 | if (this.contentDetailData && this.contentDetailData.length > 0 && this.contentDetailData[0].photoList && this.contentDetailData[0].photoList?.length > 0) { |
| 55 | Swiper(this.swiperController) { | 55 | Swiper(this.swiperController) { |
| 56 | ForEach(this.contentDetailData[0].photoList, (item: PhotoListBean, index: number) => { | 56 | ForEach(this.contentDetailData[0].photoList, (item: PhotoListBean, index: number) => { |
| 57 | - MultiPictureDetailItemComponent({ MultiPictureDetailItem: item }) | 57 | + MultiPictureDetailItemComponent({ photoListLength: this.contentDetailData[0].photoList?.length , index: index, newsTitle: this.contentDetailData[0].newsTitle, MultiPictureDetailItem: item }) |
| 58 | }) | 58 | }) |
| 59 | } | 59 | } |
| 60 | .index(this.swiperIndex) | 60 | .index(this.swiperIndex) |
| 61 | .width('100%') | 61 | .width('100%') |
| 62 | - .height(px2vp(this.picHeight) + 32) | 62 | + .height(px2vp(this.picHeight)) |
| 63 | .vertical(false) | 63 | .vertical(false) |
| 64 | .autoPlay(false) | 64 | .autoPlay(false) |
| 65 | .cachedCount(3) | 65 | .cachedCount(3) |
| 1 | -import { Logger } from 'wdKit' | 1 | +import { Logger, UserDataLocal } from 'wdKit' |
| 2 | import { WDRouterPage, WDRouterRule } from 'wdRouter' | 2 | import { WDRouterPage, WDRouterRule } from 'wdRouter' |
| 3 | import MinePageDatasModel from '../../model/MinePageDatasModel' | 3 | import MinePageDatasModel from '../../model/MinePageDatasModel' |
| 4 | const TAG = "MinePageUserSimpleInfoUI" | 4 | const TAG = "MinePageUserSimpleInfoUI" |
| @@ -13,24 +13,12 @@ export default struct MinePageUserSimpleInfoUI { | @@ -13,24 +13,12 @@ export default struct MinePageUserSimpleInfoUI { | ||
| 13 | @State levelId:number = 0 | 13 | @State levelId:number = 0 |
| 14 | 14 | ||
| 15 | 15 | ||
| 16 | - aboutToAppear(){ | ||
| 17 | - if(this.isLogin){ | ||
| 18 | - this.getUserInfo() | ||
| 19 | - this.getUserLevel() | ||
| 20 | - } | ||
| 21 | - } | ||
| 22 | - | ||
| 23 | - | ||
| 24 | - @Consume('isLogin')@Watch('loginChange') loginState:Record<string,string> | 16 | + @Consume('isLogin') @Watch('loginChange') loginState:Record<string,string> |
| 25 | loginChange(){ | 17 | loginChange(){ |
| 26 | Logger.debug("isLogin",'MinePageUserSimpleInfoUI') | 18 | Logger.debug("isLogin",'MinePageUserSimpleInfoUI') |
| 27 | if(this.loginState){ | 19 | if(this.loginState){ |
| 28 | this.isLogin=true | 20 | this.isLogin=true |
| 29 | } | 21 | } |
| 30 | - if(this.isLogin){ | ||
| 31 | - this.getUserInfo() | ||
| 32 | - this.getUserLevel() | ||
| 33 | - } | ||
| 34 | } | 22 | } |
| 35 | loginStateChange(){ | 23 | loginStateChange(){ |
| 36 | if(this.isLogin){ | 24 | if(this.isLogin){ |
| @@ -42,20 +30,19 @@ export default struct MinePageUserSimpleInfoUI { | @@ -42,20 +30,19 @@ export default struct MinePageUserSimpleInfoUI { | ||
| 42 | build(){ | 30 | build(){ |
| 43 | Row(){ | 31 | Row(){ |
| 44 | //头像 | 32 | //头像 |
| 45 | - Stack(){ | 33 | + Stack({alignContent: Alignment.Center}){ |
| 46 | Image(this.headPhotoUrl) | 34 | Image(this.headPhotoUrl) |
| 47 | .alt($r('app.media.default_head')) | 35 | .alt($r('app.media.default_head')) |
| 48 | .width('108lpx') | 36 | .width('108lpx') |
| 49 | .height('108lpx') | 37 | .height('108lpx') |
| 50 | - .objectFit(ImageFit.Cover) | 38 | + .objectFit(ImageFit.Auto) |
| 51 | .borderRadius(50) | 39 | .borderRadius(50) |
| 52 | Image(this.levelHead) | 40 | Image(this.levelHead) |
| 53 | - .width('120lpx') | ||
| 54 | - .height('120lpx') | ||
| 55 | - .objectFit(ImageFit.Cover) | ||
| 56 | - .borderRadius(50) | ||
| 57 | - }.width('120lpx') | ||
| 58 | - .height('120lpx') | 41 | + .width('130lpx') |
| 42 | + .height('130lpx') | ||
| 43 | + .objectFit(ImageFit.Auto) | ||
| 44 | + }.width('130lpx') | ||
| 45 | + .height('130lpx') | ||
| 59 | .alignContent(Alignment.Center) | 46 | .alignContent(Alignment.Center) |
| 60 | .onClick(()=>{ | 47 | .onClick(()=>{ |
| 61 | this.jumpLogin() | 48 | this.jumpLogin() |
| @@ -156,6 +143,7 @@ export default struct MinePageUserSimpleInfoUI { | @@ -156,6 +143,7 @@ export default struct MinePageUserSimpleInfoUI { | ||
| 156 | if(value!=null){ | 143 | if(value!=null){ |
| 157 | this.userName = value.userName | 144 | this.userName = value.userName |
| 158 | this.headPhotoUrl = value.headPhotoUrl | 145 | this.headPhotoUrl = value.headPhotoUrl |
| 146 | + UserDataLocal.setUserHeaderUrl(value.headPhotoUrl) | ||
| 159 | } | 147 | } |
| 160 | }).catch((err:Error)=>{ | 148 | }).catch((err:Error)=>{ |
| 161 | console.log(TAG,JSON.stringify(err)) | 149 | console.log(TAG,JSON.stringify(err)) |
| @@ -166,6 +154,8 @@ export default struct MinePageUserSimpleInfoUI { | @@ -166,6 +154,8 @@ export default struct MinePageUserSimpleInfoUI { | ||
| 166 | if(value!=null){ | 154 | if(value!=null){ |
| 167 | this.levelHead = value.levelHead | 155 | this.levelHead = value.levelHead |
| 168 | this.levelId = value.levelId | 156 | this.levelId = value.levelId |
| 157 | + UserDataLocal.setUserLevel(value.levelId) | ||
| 158 | + UserDataLocal.setUserLevelHeaderUrl(value.levelHead + "") | ||
| 169 | } | 159 | } |
| 170 | }).catch((err:Error)=>{ | 160 | }).catch((err:Error)=>{ |
| 171 | console.log(TAG,JSON.stringify(err)) | 161 | console.log(TAG,JSON.stringify(err)) |
| 1 | +import MinePageDatasModel from '../../../model/MinePageDatasModel' | ||
| 2 | +import { AppointmentOperationRequestItem } from '../../../viewmodel/AppointmentOperationRequestItem' | ||
| 1 | import { MineAppointmentItem } from '../../../viewmodel/MineAppointmentItem' | 3 | import { MineAppointmentItem } from '../../../viewmodel/MineAppointmentItem' |
| 4 | +import { MyCustomDialog } from '../../reusable/MyCustomDialog' | ||
| 2 | 5 | ||
| 3 | @Component | 6 | @Component |
| 4 | export struct AppointmentListChildComponent{ | 7 | export struct AppointmentListChildComponent{ |
| 5 | @ObjectLink item: MineAppointmentItem | 8 | @ObjectLink item: MineAppointmentItem |
| 9 | + dialogController: CustomDialogController = new CustomDialogController({ | ||
| 10 | + builder: MyCustomDialog({ | ||
| 11 | + cancel: this.onCancel, | ||
| 12 | + confirm: () => { | ||
| 13 | + this.onAccept() | ||
| 14 | + }, | ||
| 15 | + title: "提示", | ||
| 16 | + tipValue: '是否确认取消预约' | ||
| 17 | + }), | ||
| 18 | + autoCancel: true, | ||
| 19 | + alignment: DialogAlignment.Center, | ||
| 20 | + offset: { dx: 0, dy: -20 }, | ||
| 21 | + gridCount: 4, | ||
| 22 | + customStyle: false | ||
| 23 | + }) | ||
| 24 | + | ||
| 6 | 25 | ||
| 7 | build() { | 26 | build() { |
| 8 | Column(){ | 27 | Column(){ |
| @@ -102,8 +121,7 @@ export struct AppointmentListChildComponent{ | @@ -102,8 +121,7 @@ export struct AppointmentListChildComponent{ | ||
| 102 | .height('46lpx') | 121 | .height('46lpx') |
| 103 | .borderRadius('6lpx') | 122 | .borderRadius('6lpx') |
| 104 | .onClick(()=>{ | 123 | .onClick(()=>{ |
| 105 | - this.item.isAppointment = !this.item.isAppointment | ||
| 106 | - //TODO 预约动作 | 124 | + this.dialogController.open() |
| 107 | }) | 125 | }) |
| 108 | }else { | 126 | }else { |
| 109 | Text(this.item.relType === 2?"去观看":"看回放") | 127 | Text(this.item.relType === 2?"去观看":"看回放") |
| @@ -124,4 +142,25 @@ export struct AppointmentListChildComponent{ | @@ -124,4 +142,25 @@ export struct AppointmentListChildComponent{ | ||
| 124 | .backgroundColor($r('app.color.white')) | 142 | .backgroundColor($r('app.color.white')) |
| 125 | .borderRadius('8lpx') | 143 | .borderRadius('8lpx') |
| 126 | } | 144 | } |
| 145 | + | ||
| 146 | + onCancel() { | ||
| 147 | + console.info('Callback when the first button is clicked') | ||
| 148 | + } | ||
| 149 | + | ||
| 150 | + onAccept(){ | ||
| 151 | + console.info('Callback when the second button is clicked') | ||
| 152 | + this.appointmentOperation() | ||
| 153 | + } | ||
| 154 | + | ||
| 155 | + appointmentOperation(){ | ||
| 156 | + let item = new AppointmentOperationRequestItem(this.item.relId,this.item.liveId+"",!this.item.isAppointment) | ||
| 157 | + MinePageDatasModel.getAppointmentOperation(item,getContext(this)).then((value)=>{ | ||
| 158 | + if(value!=null){ | ||
| 159 | + if (value.code === 0 || value.code.toString() === "0") { | ||
| 160 | + this.item.isAppointment = !this.item.isAppointment | ||
| 161 | + } | ||
| 162 | + } | ||
| 163 | + }) | ||
| 164 | + } | ||
| 165 | + | ||
| 127 | } | 166 | } |
| @@ -71,9 +71,9 @@ export struct AppointmentListUI{ | @@ -71,9 +71,9 @@ export struct AppointmentListUI{ | ||
| 71 | value.list.forEach((value)=>{ | 71 | value.list.forEach((value)=>{ |
| 72 | let dealTime = this.DealStartTime(value.planStartTime) | 72 | let dealTime = this.DealStartTime(value.planStartTime) |
| 73 | if(dealTime!=null && dealTime.length === 2){ | 73 | if(dealTime!=null && dealTime.length === 2){ |
| 74 | - this.data.push(new MineAppointmentItem(value.imageUrl,value.status,value.title,true,dealTime[0],dealTime[1],value.relType)) | 74 | + this.data.push(new MineAppointmentItem(value.imageUrl,value.status,value.title,true,dealTime[0],dealTime[1],value.relType,value.liveId,value.relId)) |
| 75 | }else { | 75 | }else { |
| 76 | - this.data.push(new MineAppointmentItem(value.imageUrl,value.status,value.title,true,"","",value.relType)) | 76 | + this.data.push(new MineAppointmentItem(value.imageUrl,value.status,value.title,true,"","",value.relType,value.liveId,value.relId)) |
| 77 | } | 77 | } |
| 78 | }) | 78 | }) |
| 79 | this.data.notifyDataReload() | 79 | this.data.notifyDataReload() |
| @@ -13,10 +13,6 @@ export struct FollowFirstTabsComponent{ | @@ -13,10 +13,6 @@ export struct FollowFirstTabsComponent{ | ||
| 13 | selectedFontColor: string = '#000000' | 13 | selectedFontColor: string = '#000000' |
| 14 | 14 | ||
| 15 | aboutToAppear(){ | 15 | aboutToAppear(){ |
| 16 | - // let res = JSON.parse(`{"code":"0","data":[{"children":[],"directoryName":"阅读","directoryWeight":99,"id":165,"isShow":1,"level":1,"parentId":0,"rootId":0},{"children":[{"children":[{"directoryName":"三二","directoryWeight":2,"id":120,"isShow":1,"level":3,"parentId":118,"rootId":117},{"directoryName":"三级","directoryWeight":1,"id":119,"isShow":1,"level":3,"parentId":118,"rootId":117}],"directoryName":"二级","directoryWeight":1,"id":118,"isShow":1,"level":2,"parentId":117,"rootId":117}],"directoryName":"幽游白书","directoryWeight":33,"id":117,"isShow":1,"level":1,"parentId":0,"rootId":0},{"children":[],"directoryName":"推荐","directoryWeight":9,"id":386,"isShow":1,"level":1,"parentId":0,"rootId":0},{"children":[],"directoryName":"政务","directoryWeight":9,"id":379,"isShow":1,"level":1,"parentId":0,"rootId":0},{"children":[{"children":[],"directoryName":"推荐","directoryWeight":0,"id":335,"isShow":1,"level":2,"parentId":320,"rootId":320}],"directoryName":"推荐","directoryWeight":9,"id":320,"isShow":1,"level":1,"parentId":0,"rootId":0},{"children":[],"directoryName":"媒体","directoryWeight":8,"id":390,"isShow":1,"level":1,"parentId":0,"rootId":0},{"children":[],"directoryName":"媒体","directoryWeight":8,"id":323,"isShow":1,"level":1,"parentId":0,"rootId":0},{"children":[],"directoryName":"自媒体","directoryWeight":7,"id":329,"isShow":1,"level":1,"parentId":0,"rootId":0},{"children":[],"directoryName":"名人","directoryWeight":6,"id":389,"isShow":1,"level":1,"parentId":0,"rootId":0},{"children":[{"children":[],"directoryName":"测试","directoryWeight":0,"id":338,"isShow":1,"level":2,"parentId":324,"rootId":324}],"directoryName":"名人","directoryWeight":6,"id":324,"isShow":1,"level":1,"parentId":0,"rootId":0},{"children":[{"children":[],"directoryName":"2级目录","directoryWeight":0,"id":340,"isShow":1,"level":2,"parentId":312,"rootId":312},{"children":[{"directoryName":"3级测试","directoryWeight":0,"id":368,"isShow":1,"level":3,"parentId":339,"rootId":312}],"directoryName":"二级目录","directoryWeight":0,"id":339,"isShow":1,"level":2,"parentId":312,"rootId":312},{"children":[{"directoryName":"企业","directoryWeight":1,"id":348,"isShow":1,"level":3,"parentId":336,"rootId":312},{"directoryName":"部委","directoryWeight":0,"id":344,"isShow":1,"level":3,"parentId":336,"rootId":312},{"directoryName":"地方","directoryWeight":0,"id":341,"isShow":1,"level":3,"parentId":336,"rootId":312}],"directoryName":"类型","directoryWeight":0,"id":336,"isShow":1,"level":2,"parentId":312,"rootId":312},{"children":[{"directoryName":"贵州省","directoryWeight":0,"id":378,"isShow":1,"level":3,"parentId":332,"rootId":312},{"directoryName":"西藏自治区","directoryWeight":0,"id":377,"isShow":1,"level":3,"parentId":332,"rootId":312},{"directoryName":"四川省","directoryWeight":0,"id":376,"isShow":1,"level":3,"parentId":332,"rootId":312},{"directoryName":"重庆市","directoryWeight":0,"id":375,"isShow":1,"level":3,"parentId":332,"rootId":312},{"directoryName":"湖南省","directoryWeight":0,"id":374,"isShow":1,"level":3,"parentId":332,"rootId":312},{"directoryName":"云南省","directoryWeight":0,"id":373,"isShow":1,"level":3,"parentId":332,"rootId":312},{"directoryName":"广西壮族自治区","directoryWeight":0,"id":372,"isShow":1,"level":3,"parentId":332,"rootId":312},{"directoryName":"宁夏回族自治区","directoryWeight":0,"id":371,"isShow":1,"level":3,"parentId":332,"rootId":312},{"directoryName":"湖北省","directoryWeight":0,"id":370,"isShow":1,"level":3,"parentId":332,"rootId":312},{"directoryName":"青海省","directoryWeight":0,"id":369,"isShow":1,"level":3,"parentId":332,"rootId":312},{"directoryName":"陕西省","directoryWeight":0,"id":367,"isShow":1,"level":3,"parentId":332,"rootId":312},{"directoryName":"甘肃省","directoryWeight":0,"id":366,"isShow":1,"level":3,"parentId":332,"rootId":312},{"directoryName":"吉林省","directoryWeight":0,"id":365,"isShow":1,"level":3,"parentId":332,"rootId":312},{"directoryName":"广东省","directoryWeight":0,"id":364,"isShow":1,"level":3,"parentId":332,"rootId":312},{"directoryName":"海南省","directoryWeight":0,"id":363,"isShow":1,"level":3,"parentId":332,"rootId":312},{"directoryName":"辽宁省","directoryWeight":0,"id":362,"isShow":1,"level":3,"parentId":332,"rootId":312},{"directoryName":"江苏省","directoryWeight":0,"id":361,"isShow":1,"level":3,"parentId":332,"rootId":312},{"directoryName":"新疆维吾尔族自治区","directoryWeight":0,"id":360,"isShow":1,"level":3,"parentId":332,"rootId":312},{"directoryName":"福建省","directoryWeight":0,"id":359,"isShow":1,"level":3,"parentId":332,"rootId":312},{"directoryName":"山东省","directoryWeight":0,"id":358,"isShow":1,"level":3,"parentId":332,"rootId":312},{"directoryName":"河南省","directoryWeight":0,"id":357,"isShow":1,"level":3,"parentId":332,"rootId":312},{"directoryName":"浙江省","directoryWeight":0,"id":356,"isShow":1,"level":3,"parentId":332,"rootId":312},{"directoryName":"安徽省","directoryWeight":0,"id":355,"isShow":1,"level":3,"parentId":332,"rootId":312},{"directoryName":"上海市","directoryWeight":0,"id":354,"isShow":1,"level":3,"parentId":332,"rootId":312},{"directoryName":"河北省","directoryWeight":0,"id":353,"isShow":1,"level":3,"parentId":332,"rootId":312},{"directoryName":"黑龙江省","directoryWeight":0,"id":352,"isShow":1,"level":3,"parentId":332,"rootId":312},{"directoryName":"江西省","directoryWeight":0,"id":351,"isShow":1,"level":3,"parentId":332,"rootId":312},{"directoryName":"内蒙古自治区","directoryWeight":0,"id":350,"isShow":1,"level":3,"parentId":332,"rootId":312},{"directoryName":"北京市","directoryWeight":0,"id":349,"isShow":1,"level":3,"parentId":332,"rootId":312},{"directoryName":"山西省","directoryWeight":0,"id":346,"isShow":1,"level":3,"parentId":332,"rootId":312}],"directoryName":"地域","directoryWeight":0,"id":332,"isShow":1,"level":2,"parentId":312,"rootId":312}],"directoryName":"政务","directoryWeight":5,"id":312,"isShow":1,"level":1,"parentId":0,"rootId":0},{"children":[],"directoryName":"学校","directoryWeight":4,"id":331,"isShow":1,"level":1,"parentId":0,"rootId":0},{"children":[],"directoryName":"机构","directoryWeight":3,"id":330,"isShow":1,"level":1,"parentId":0,"rootId":0},{"children":[{"children":[{"directoryName":"新闻联播","directoryWeight":3,"id":79,"isShow":1,"level":3,"parentId":75,"rootId":74},{"directoryName":"第三季","directoryWeight":2,"id":78,"isShow":1,"level":3,"parentId":75,"rootId":74},{"directoryName":"三级","directoryWeight":1,"id":76,"isShow":1,"level":3,"parentId":75,"rootId":74}],"directoryName":"短视频","directoryWeight":1,"id":75,"isShow":1,"level":2,"parentId":74,"rootId":74}],"directoryName":"创作","directoryWeight":3,"id":74,"isShow":1,"level":1,"parentId":0,"rootId":0},{"children":[{"children":[],"directoryName":"教学","directoryWeight":2,"id":72,"isShow":1,"level":2,"parentId":64,"rootId":64},{"children":[],"directoryName":"热门","directoryWeight":1,"id":73,"isShow":1,"level":2,"parentId":64,"rootId":64},{"children":[],"directoryName":"赛事","directoryWeight":1,"id":71,"isShow":1,"level":2,"parentId":64,"rootId":64}],"directoryName":"游戏","directoryWeight":2,"id":64,"isShow":1,"level":1,"parentId":0,"rootId":0},{"children":[],"directoryName":"新闻","directoryWeight":1,"id":315,"isShow":1,"level":1,"parentId":0,"rootId":0},{"children":[{"children":[],"directoryName":"趣闻","directoryWeight":6,"id":70,"isShow":1,"level":2,"parentId":63,"rootId":63},{"children":[],"directoryName":"时政","directoryWeight":5,"id":69,"isShow":1,"level":2,"parentId":63,"rootId":63},{"children":[],"directoryName":"农业","directoryWeight":3,"id":68,"isShow":1,"level":2,"parentId":63,"rootId":63},{"children":[],"directoryName":"娱乐","directoryWeight":3,"id":67,"isShow":1,"level":2,"parentId":63,"rootId":63},{"children":[],"directoryName":"科技","directoryWeight":2,"id":66,"isShow":1,"level":2,"parentId":63,"rootId":63},{"children":[],"directoryName":"国际","directoryWeight":1,"id":65,"isShow":1,"level":2,"parentId":63,"rootId":63}],"directoryName":"新闻","directoryWeight":1,"id":63,"isShow":1,"level":1,"parentId":0,"rootId":0},{"children":[],"directoryName":"公安","directoryWeight":0,"id":388,"isShow":1,"level":1,"parentId":0,"rootId":0},{"children":[],"directoryName":"dddd","directoryWeight":0,"id":387,"isShow":1,"level":1,"parentId":0,"rootId":0},{"children":[],"directoryName":"健康","directoryWeight":0,"id":384,"isShow":1,"level":1,"parentId":0,"rootId":0},{"children":[],"directoryName":"综合","directoryWeight":0,"id":328,"isShow":1,"level":1,"parentId":0,"rootId":0},{"children":[],"directoryName":"房产","directoryWeight":0,"id":327,"isShow":1,"level":1,"parentId":0,"rootId":0},{"children":[],"directoryName":"健康","directoryWeight":0,"id":318,"isShow":1,"level":1,"parentId":0,"rootId":0},{"children":[],"directoryName":"历史","directoryWeight":0,"id":310,"isShow":1,"level":1,"parentId":0,"rootId":0},{"children":[],"directoryName":"dddd","directoryWeight":0,"id":309,"isShow":1,"level":1,"parentId":0,"rootId":0},{"children":[{"children":[],"directoryName":"aaaa","directoryWeight":1,"id":333,"isShow":1,"level":2,"parentId":308,"rootId":308},{"children":[],"directoryName":"qqq","directoryWeight":0,"id":334,"isShow":1,"level":2,"parentId":308,"rootId":308}],"directoryName":"dddd","directoryWeight":0,"id":308,"isShow":1,"level":1,"parentId":0,"rootId":0}],"message":"Success","success":true,"timestamp":1710741803593}`) as ResponseDTO<FollowListItem[]> | ||
| 17 | - // res.data.forEach(element => { | ||
| 18 | - // this.data.push(element) | ||
| 19 | - // }); | ||
| 20 | MinePageDatasModel.getFollowListData(getContext(this)).then((value)=>{ | 16 | MinePageDatasModel.getFollowListData(getContext(this)).then((value)=>{ |
| 21 | this.data.push(new FollowListItem("我的")) | 17 | this.data.push(new FollowListItem("我的")) |
| 22 | value.forEach((element)=>{ | 18 | value.forEach((element)=>{ |
| 1 | import { Params } from 'wdBean'; | 1 | import { Params } from 'wdBean'; |
| 2 | import { LazyDataSource, StringUtils } from 'wdKit'; | 2 | import { LazyDataSource, StringUtils } from 'wdKit'; |
| 3 | +import { HttpUrlUtils } from 'wdNetwork'; | ||
| 3 | import { WDRouterPage, WDRouterRule } from 'wdRouter'; | 4 | import { WDRouterPage, WDRouterRule } from 'wdRouter'; |
| 4 | import MinePageDatasModel from '../../../model/MinePageDatasModel'; | 5 | import MinePageDatasModel from '../../../model/MinePageDatasModel'; |
| 5 | import { FollowListDetailItem } from '../../../viewmodel/FollowListDetailItem' | 6 | import { FollowListDetailItem } from '../../../viewmodel/FollowListDetailItem' |
| 6 | import { FollowListDetailRequestItem } from '../../../viewmodel/FollowListDetailRequestItem'; | 7 | import { FollowListDetailRequestItem } from '../../../viewmodel/FollowListDetailRequestItem'; |
| 7 | import { FollowListStatusRequestItem } from '../../../viewmodel/FollowListStatusRequestItem'; | 8 | import { FollowListStatusRequestItem } from '../../../viewmodel/FollowListStatusRequestItem'; |
| 9 | +import { FollowOperationRequestItem } from '../../../viewmodel/FollowOperationRequestItem'; | ||
| 8 | import { MineFollowListDetailItem } from '../../../viewmodel/MineFollowListDetailItem'; | 10 | import { MineFollowListDetailItem } from '../../../viewmodel/MineFollowListDetailItem'; |
| 9 | import { QueryListIsFollowedItem } from '../../../viewmodel/QueryListIsFollowedItem'; | 11 | import { QueryListIsFollowedItem } from '../../../viewmodel/QueryListIsFollowedItem'; |
| 10 | import { ListHasNoMoreDataUI } from '../../reusable/ListHasNoMoreDataUI'; | 12 | import { ListHasNoMoreDataUI } from '../../reusable/ListHasNoMoreDataUI'; |
| @@ -67,14 +69,14 @@ export struct FollowListDetailUI{ | @@ -67,14 +69,14 @@ export struct FollowListDetailUI{ | ||
| 67 | //我的关注列表 | 69 | //我的关注列表 |
| 68 | if (this.creatorDirectoryId === -1){ | 70 | if (this.creatorDirectoryId === -1){ |
| 69 | if(this.hasMore){ | 71 | if(this.hasMore){ |
| 70 | - let object = new FollowListDetailRequestItem(20,this.curPageNum) | 72 | + let object = new FollowListDetailRequestItem(-1,20,this.curPageNum) |
| 71 | 73 | ||
| 72 | MinePageDatasModel.getMineFollowListData(object,getContext(this)).then((value)=>{ | 74 | MinePageDatasModel.getMineFollowListData(object,getContext(this)).then((value)=>{ |
| 73 | if (!this.data || value.list.length == 0){ | 75 | if (!this.data || value.list.length == 0){ |
| 74 | this.hasMore = false | 76 | this.hasMore = false |
| 75 | }else{ | 77 | }else{ |
| 76 | value.list.forEach((value)=>{ | 78 | value.list.forEach((value)=>{ |
| 77 | - this.data.push(new FollowListDetailItem(value.attentionHeadPhotoUrl,value.attentionUserName,value.fansNum,value.introduction,value.attentionCreatorId,"1",value.attentionUserId)) | 79 | + this.data.push(new FollowListDetailItem(value.attentionHeadPhotoUrl,value.attentionUserName,value.fansNum,value.introduction,value.attentionCreatorId,"1",value.attentionUserId,value.attentionUserType,value.attentionUserId)) |
| 78 | }) | 80 | }) |
| 79 | this.data.notifyDataReload() | 81 | this.data.notifyDataReload() |
| 80 | this.count = this.data.totalCount() | 82 | this.count = this.data.totalCount() |
| @@ -114,7 +116,7 @@ export struct FollowListDetailUI{ | @@ -114,7 +116,7 @@ export struct FollowListDetailUI{ | ||
| 114 | let data : FollowListDetailItem[] = [] | 116 | let data : FollowListDetailItem[] = [] |
| 115 | value.list.forEach((item)=>{ | 117 | value.list.forEach((item)=>{ |
| 116 | status.creatorIds.push(new QueryListIsFollowedItem(item.creatorId)) | 118 | status.creatorIds.push(new QueryListIsFollowedItem(item.creatorId)) |
| 117 | - data.push(new FollowListDetailItem(item.headPhotoUrl,item.cnUserName,item.cnFansNum,item.introduction,item.creatorId,"0",item.attentionUserId)) | 119 | + data.push(new FollowListDetailItem(item.headPhotoUrl,item.cnUserName,item.cnFansNum,item.introduction,item.creatorId,"0",item.attentionUserId,item.cnUserType,item.cnUserId)) |
| 118 | }) | 120 | }) |
| 119 | 121 | ||
| 120 | MinePageDatasModel.getFollowListStatusData(status,getContext(this)).then((newValue)=>{ | 122 | MinePageDatasModel.getFollowListStatusData(status,getContext(this)).then((newValue)=>{ |
| @@ -127,7 +129,7 @@ export struct FollowListDetailUI{ | @@ -127,7 +129,7 @@ export struct FollowListDetailUI{ | ||
| 127 | }) | 129 | }) |
| 128 | 130 | ||
| 129 | data.forEach((item)=>{ | 131 | data.forEach((item)=>{ |
| 130 | - this.data.push(new FollowListDetailItem(item.headPhotoUrl,item.cnUserName,item.cnFansNum,item.introduction,item.creatorId,item.status,item.attentionUserId)) | 132 | + this.data.push(new FollowListDetailItem(item.headPhotoUrl,item.cnUserName,item.cnFansNum,item.introduction,item.creatorId,item.status,item.attentionUserId,item.cnUserType,item.cnUserId)) |
| 131 | }) | 133 | }) |
| 132 | 134 | ||
| 133 | this.data.notifyDataReload() | 135 | this.data.notifyDataReload() |
| @@ -197,7 +199,8 @@ struct ChildComponent { | @@ -197,7 +199,8 @@ struct ChildComponent { | ||
| 197 | .height('46lpx') | 199 | .height('46lpx') |
| 198 | .margin({left:'4lpx',top:'23lpx'}) | 200 | .margin({left:'4lpx',top:'23lpx'}) |
| 199 | .onClick(()=>{ | 201 | .onClick(()=>{ |
| 200 | - this.data.status = "0" | 202 | + this.followOperation() |
| 203 | + // this.data.status = "0" | ||
| 201 | }) | 204 | }) |
| 202 | }else{ | 205 | }else{ |
| 203 | Row(){ | 206 | Row(){ |
| @@ -218,7 +221,8 @@ struct ChildComponent { | @@ -218,7 +221,8 @@ struct ChildComponent { | ||
| 218 | .height('46lpx') | 221 | .height('46lpx') |
| 219 | .margin({left:'4lpx',top:'23lpx'}) | 222 | .margin({left:'4lpx',top:'23lpx'}) |
| 220 | .onClick(()=>{ | 223 | .onClick(()=>{ |
| 221 | - this.data.status = "1" | 224 | + this.followOperation() |
| 225 | + // this.data.status = "1" | ||
| 222 | }) | 226 | }) |
| 223 | } | 227 | } |
| 224 | }.alignItems(VerticalAlign.Top) | 228 | }.alignItems(VerticalAlign.Top) |
| @@ -233,10 +237,22 @@ struct ChildComponent { | @@ -233,10 +237,22 @@ struct ChildComponent { | ||
| 233 | }.height('146lpx') | 237 | }.height('146lpx') |
| 234 | .justifyContent(FlexAlign.Center) | 238 | .justifyContent(FlexAlign.Center) |
| 235 | .onClick(()=>{ | 239 | .onClick(()=>{ |
| 236 | - let params: Params = { | ||
| 237 | - pageID: this.data.attentionUserId | 240 | + //跳转 人民号的 主页 |
| 241 | + // let params: Params = { | ||
| 242 | + // pageID: this.data.attentionUserId | ||
| 243 | + // } | ||
| 244 | + // WDRouterRule.jumpWithPage(WDRouterPage.otherNormalUserHomePagePage,params) | ||
| 245 | + }) | ||
| 246 | + } | ||
| 247 | + | ||
| 248 | + followOperation(){ | ||
| 249 | + let item = new FollowOperationRequestItem(this.data.cnUserType,this.data.cnUserId,this.data.creatorId,HttpUrlUtils.getUserType(),HttpUrlUtils.getUserId(),this.data.status==="0" ? 1:0) | ||
| 250 | + MinePageDatasModel.getFollowOperation(item,getContext(this)).then((value)=>{ | ||
| 251 | + if(value!=null){ | ||
| 252 | + if (value.code === 0 || value.code.toString() === "0") { | ||
| 253 | + this.data.status = this.data.status ==="0"?"1":"0" | ||
| 254 | + } | ||
| 238 | } | 255 | } |
| 239 | - WDRouterRule.jumpWithPage(WDRouterPage.otherNormalUserHomePagePage,params) | ||
| 240 | }) | 256 | }) |
| 241 | } | 257 | } |
| 242 | } | 258 | } |
| 1 | import { Params } from 'wdBean'; | 1 | import { Params } from 'wdBean'; |
| 2 | -import { LazyDataSource, StringUtils } from 'wdKit'; | 2 | +import { DateTimeUtils, LazyDataSource, StringUtils, UserDataLocal } from 'wdKit'; |
| 3 | +import { HttpUrlUtils } from 'wdNetwork'; | ||
| 3 | import { WDRouterPage, WDRouterRule } from 'wdRouter'; | 4 | import { WDRouterPage, WDRouterRule } from 'wdRouter'; |
| 4 | import MinePageDatasModel from '../../../model/MinePageDatasModel'; | 5 | import MinePageDatasModel from '../../../model/MinePageDatasModel'; |
| 5 | import { CommentListItem } from '../../../viewmodel/CommentListItem'; | 6 | import { CommentListItem } from '../../../viewmodel/CommentListItem'; |
| 6 | import { FollowListDetailItem } from '../../../viewmodel/FollowListDetailItem'; | 7 | import { FollowListDetailItem } from '../../../viewmodel/FollowListDetailItem'; |
| 7 | import { FollowListDetailRequestItem } from '../../../viewmodel/FollowListDetailRequestItem'; | 8 | import { FollowListDetailRequestItem } from '../../../viewmodel/FollowListDetailRequestItem'; |
| 9 | +import { FollowOperationRequestItem } from '../../../viewmodel/FollowOperationRequestItem'; | ||
| 8 | import { ListHasNoMoreDataUI } from '../../reusable/ListHasNoMoreDataUI'; | 10 | import { ListHasNoMoreDataUI } from '../../reusable/ListHasNoMoreDataUI'; |
| 9 | 11 | ||
| 10 | const TAG = "HomePageBottomComponent" | 12 | const TAG = "HomePageBottomComponent" |
| @@ -32,8 +34,35 @@ export struct HomePageBottomComponent{ | @@ -32,8 +34,35 @@ export struct HomePageBottomComponent{ | ||
| 32 | .backgroundColor($r('app.color.color_EDEDED')) | 34 | .backgroundColor($r('app.color.color_EDEDED')) |
| 33 | 35 | ||
| 34 | if(this.count === 0){ | 36 | if(this.count === 0){ |
| 35 | - ListHasNoMoreDataUI({style:2}) | ||
| 36 | - .height('100%') | 37 | + if(this.style === 1){ |
| 38 | + Row(){ | ||
| 39 | + Text("关注更多人民号") | ||
| 40 | + .fontWeight('400lpx') | ||
| 41 | + .fontColor($r('app.color.color_222222')) | ||
| 42 | + .lineHeight('38lpx') | ||
| 43 | + .fontSize('27lpx') | ||
| 44 | + .textAlign(TextAlign.Center) | ||
| 45 | + .margin({right:'4lpx'}) | ||
| 46 | + Image($r('app.media.arrow_icon_right')) | ||
| 47 | + .objectFit(ImageFit.Auto) | ||
| 48 | + .width('27lpx') | ||
| 49 | + .height('27lpx') | ||
| 50 | + }.height('69lpx') | ||
| 51 | + .width('659lpx') | ||
| 52 | + .alignItems(VerticalAlign.Center) | ||
| 53 | + .justifyContent(FlexAlign.Center) | ||
| 54 | + .backgroundColor($r('app.color.color_F5F5F5')) | ||
| 55 | + .margin({top:'31lpx',bottom:'4lpx'}) | ||
| 56 | + .onClick(()=>{ | ||
| 57 | + let params: Params = { | ||
| 58 | + pageID: "1" | ||
| 59 | + } | ||
| 60 | + WDRouterRule.jumpWithPage(WDRouterPage.followListPage,params) | ||
| 61 | + }) | ||
| 62 | + }else{ | ||
| 63 | + ListHasNoMoreDataUI({style:2}) | ||
| 64 | + .layoutWeight(1) | ||
| 65 | + } | ||
| 37 | }else{ | 66 | }else{ |
| 38 | if(this.style === 1){ | 67 | if(this.style === 1){ |
| 39 | List({ space: 3 }) { | 68 | List({ space: 3 }) { |
| @@ -129,7 +158,8 @@ export struct HomePageBottomComponent{ | @@ -129,7 +158,8 @@ export struct HomePageBottomComponent{ | ||
| 129 | }) | 158 | }) |
| 130 | } | 159 | } |
| 131 | } | 160 | } |
| 132 | - } | 161 | + }.height('100%') |
| 162 | + .justifyContent(FlexAlign.Start) | ||
| 133 | .width('100%') | 163 | .width('100%') |
| 134 | } | 164 | } |
| 135 | 165 | ||
| @@ -147,14 +177,14 @@ export struct HomePageBottomComponent{ | @@ -147,14 +177,14 @@ export struct HomePageBottomComponent{ | ||
| 147 | //我的关注列表 | 177 | //我的关注列表 |
| 148 | if (this.style === 1){ | 178 | if (this.style === 1){ |
| 149 | if(this.hasMore){ | 179 | if(this.hasMore){ |
| 150 | - let object = new FollowListDetailRequestItem(20,this.curPageNum) | 180 | + let object = new FollowListDetailRequestItem(-1,20,this.curPageNum) |
| 151 | 181 | ||
| 152 | MinePageDatasModel.getMineFollowListData(object,getContext(this)).then((value)=>{ | 182 | MinePageDatasModel.getMineFollowListData(object,getContext(this)).then((value)=>{ |
| 153 | if (!this.data_follow || value.list.length == 0){ | 183 | if (!this.data_follow || value.list.length == 0){ |
| 154 | this.hasMore = false | 184 | this.hasMore = false |
| 155 | }else{ | 185 | }else{ |
| 156 | value.list.forEach((value)=>{ | 186 | value.list.forEach((value)=>{ |
| 157 | - this.data_follow.push(new FollowListDetailItem(value.attentionHeadPhotoUrl,value.attentionUserName,value.fansNum,value.introduction,value.attentionCreatorId,"1",value.attentionUserId)) | 187 | + this.data_follow.push(new FollowListDetailItem(value.attentionHeadPhotoUrl,value.attentionUserName,value.fansNum,value.introduction,value.attentionCreatorId,"1",value.attentionUserId,value.attentionUserType,value.attentionUserId)) |
| 158 | }) | 188 | }) |
| 159 | this.data_follow.notifyDataReload() | 189 | this.data_follow.notifyDataReload() |
| 160 | this.count = this.data_follow.totalCount() | 190 | this.count = this.data_follow.totalCount() |
| @@ -172,14 +202,15 @@ export struct HomePageBottomComponent{ | @@ -172,14 +202,15 @@ export struct HomePageBottomComponent{ | ||
| 172 | } | 202 | } |
| 173 | }else if(this.style === 0){ | 203 | }else if(this.style === 0){ |
| 174 | if(this.hasMore){ | 204 | if(this.hasMore){ |
| 175 | - let object = new FollowListDetailRequestItem(20,this.curPageNum) | 205 | + let time = encodeURI(DateTimeUtils.getCurDate(DateTimeUtils.PATTERN_DATE_TIME_HYPHEN)) |
| 206 | + let object = new FollowListDetailRequestItem(-1,20,this.curPageNum) | ||
| 176 | 207 | ||
| 177 | - MinePageDatasModel.getMineCommentListData(object,getContext(this)).then((value)=>{ | 208 | + MinePageDatasModel.getMineCommentListData(time,object,getContext(this)).then((value)=>{ |
| 178 | if (!this.data_comment || value.list.length == 0){ | 209 | if (!this.data_comment || value.list.length == 0){ |
| 179 | this.hasMore = false | 210 | this.hasMore = false |
| 180 | }else{ | 211 | }else{ |
| 181 | value.list.forEach((value)=>{ | 212 | value.list.forEach((value)=>{ |
| 182 | - this.data_comment.push(new CommentListItem(value.fromUserHeader,value.fromUserName,value.targetTitle,value.createTime,value.commentContent,value.likeNum,0,value.id)) | 213 | + this.data_comment.push(new CommentListItem(value.fromUserHeader,value.fromUserName,value.targetTitle,value.createTime,value.commentContent,value.likeNum,0,value.id,value.targetId,value.targetType)) |
| 183 | }) | 214 | }) |
| 184 | this.data_comment.notifyDataReload() | 215 | this.data_comment.notifyDataReload() |
| 185 | this.count = this.data_comment.totalCount() | 216 | this.count = this.data_comment.totalCount() |
| @@ -248,7 +279,8 @@ struct ChildFollowComponent { | @@ -248,7 +279,8 @@ struct ChildFollowComponent { | ||
| 248 | .height('46lpx') | 279 | .height('46lpx') |
| 249 | .margin({left:'4lpx',top:'23lpx'}) | 280 | .margin({left:'4lpx',top:'23lpx'}) |
| 250 | .onClick(()=>{ | 281 | .onClick(()=>{ |
| 251 | - this.data.status = "0" | 282 | + // this.data.status = "0" |
| 283 | + this.followOperation() | ||
| 252 | }) | 284 | }) |
| 253 | }else{ | 285 | }else{ |
| 254 | Row(){ | 286 | Row(){ |
| @@ -269,7 +301,8 @@ struct ChildFollowComponent { | @@ -269,7 +301,8 @@ struct ChildFollowComponent { | ||
| 269 | .height('46lpx') | 301 | .height('46lpx') |
| 270 | .margin({left:'4lpx',top:'23lpx'}) | 302 | .margin({left:'4lpx',top:'23lpx'}) |
| 271 | .onClick(()=>{ | 303 | .onClick(()=>{ |
| 272 | - this.data.status = "1" | 304 | + // this.data.status = "1" |
| 305 | + this.followOperation() | ||
| 273 | }) | 306 | }) |
| 274 | } | 307 | } |
| 275 | }.alignItems(VerticalAlign.Top) | 308 | }.alignItems(VerticalAlign.Top) |
| @@ -284,6 +317,18 @@ struct ChildFollowComponent { | @@ -284,6 +317,18 @@ struct ChildFollowComponent { | ||
| 284 | }.height('146lpx') | 317 | }.height('146lpx') |
| 285 | .justifyContent(FlexAlign.Center) | 318 | .justifyContent(FlexAlign.Center) |
| 286 | } | 319 | } |
| 320 | + | ||
| 321 | + followOperation(){ | ||
| 322 | + let item = new FollowOperationRequestItem(this.data.cnUserType,this.data.cnUserId,this.data.creatorId,UserDataLocal.getUserType(),UserDataLocal.getUserId(),this.data.status==="0" ? 1:0) | ||
| 323 | + MinePageDatasModel.getFollowOperation(item,getContext(this)).then((value)=>{ | ||
| 324 | + if(value!=null){ | ||
| 325 | + if (value.code === 0 || value.code.toString() === "0") { | ||
| 326 | + this.data.status = this.data.status ==="0"?"1":"0" | ||
| 327 | + } | ||
| 328 | + } | ||
| 329 | + }) | ||
| 330 | + } | ||
| 331 | + | ||
| 287 | } | 332 | } |
| 288 | 333 | ||
| 289 | @Component | 334 | @Component |
| @@ -293,11 +338,21 @@ struct ChildCommentComponent { | @@ -293,11 +338,21 @@ struct ChildCommentComponent { | ||
| 293 | build() { | 338 | build() { |
| 294 | Column(){ | 339 | Column(){ |
| 295 | Row() { | 340 | Row() { |
| 296 | - Image(StringUtils.isEmpty(this.data.fromUserHeader)?$r('app.media.default_head'):this.data.fromUserHeader) | ||
| 297 | - .objectFit(ImageFit.Auto) | ||
| 298 | - .width('69lpx') | ||
| 299 | - .height('69lpx') | ||
| 300 | - .margin({right:'15lpx'}) | 341 | + Stack({alignContent: Alignment.Center}){ |
| 342 | + Image(this.data.fromUserHeader) | ||
| 343 | + .alt($r('app.media.default_head')) | ||
| 344 | + .objectFit(ImageFit.Auto) | ||
| 345 | + .width('69lpx') | ||
| 346 | + .height('69lpx') | ||
| 347 | + .borderRadius(50) | ||
| 348 | + Image(UserDataLocal.getUserLevelHeaderUrl()) | ||
| 349 | + .width('89lpx') | ||
| 350 | + .height('89lpx') | ||
| 351 | + .objectFit(ImageFit.Cover) | ||
| 352 | + .borderRadius(50) | ||
| 353 | + }.width('89lpx') | ||
| 354 | + .height('89lpx') | ||
| 355 | + .margin({right:'15lpx'}) | ||
| 301 | 356 | ||
| 302 | Column(){ | 357 | Column(){ |
| 303 | Text(this.data.fromUserName) | 358 | Text(this.data.fromUserName) |
| 1 | -import { DateTimeUtils, LazyDataSource } from 'wdKit'; | 1 | +import { DateTimeUtils, LazyDataSource, UserDataLocal } from 'wdKit'; |
| 2 | import MinePageDatasModel from '../../../model/MinePageDatasModel'; | 2 | import MinePageDatasModel from '../../../model/MinePageDatasModel'; |
| 3 | import { CommentListItem } from '../../../viewmodel/CommentListItem'; | 3 | import { CommentListItem } from '../../../viewmodel/CommentListItem'; |
| 4 | import { OtherUserCommentListRequestItem } from '../../../viewmodel/OtherUserCommentListRequestItem'; | 4 | import { OtherUserCommentListRequestItem } from '../../../viewmodel/OtherUserCommentListRequestItem'; |
| 5 | import { ListHasNoMoreDataUI } from '../../reusable/ListHasNoMoreDataUI'; | 5 | import { ListHasNoMoreDataUI } from '../../reusable/ListHasNoMoreDataUI'; |
| 6 | import { MineCommentListDetailItem } from '../../../viewmodel/MineCommentListDetailItem'; | 6 | import { MineCommentListDetailItem } from '../../../viewmodel/MineCommentListDetailItem'; |
| 7 | import { OtherUserCommentLikeStatusRequestItem } from '../../../viewmodel/OtherUserCommentLikeStatusRequestItem'; | 7 | import { OtherUserCommentLikeStatusRequestItem } from '../../../viewmodel/OtherUserCommentLikeStatusRequestItem'; |
| 8 | +import { CommentLikeOperationRequestItem } from '../../../viewmodel/CommentLikeOperationRequestItem'; | ||
| 8 | 9 | ||
| 9 | const TAG = "HomePageBottomComponent" | 10 | const TAG = "HomePageBottomComponent" |
| 10 | @Component | 11 | @Component |
| @@ -16,6 +17,7 @@ export struct OtherHomePageBottomCommentComponent{ | @@ -16,6 +17,7 @@ export struct OtherHomePageBottomCommentComponent{ | ||
| 16 | curPageNum:number = 1; | 17 | curPageNum:number = 1; |
| 17 | @State count:number = 0; | 18 | @State count:number = 0; |
| 18 | @Prop levelHead:string | 19 | @Prop levelHead:string |
| 20 | + @Link commentNum:number | ||
| 19 | 21 | ||
| 20 | aboutToAppear(){ | 22 | aboutToAppear(){ |
| 21 | this.getNewPageData() | 23 | this.getNewPageData() |
| @@ -87,7 +89,7 @@ export struct OtherHomePageBottomCommentComponent{ | @@ -87,7 +89,7 @@ export struct OtherHomePageBottomCommentComponent{ | ||
| 87 | if (!this.data_comment || value.list.length == 0){ | 89 | if (!this.data_comment || value.list.length == 0){ |
| 88 | this.hasMore = false | 90 | this.hasMore = false |
| 89 | }else{ | 91 | }else{ |
| 90 | - this.getFollowListStatus(value) | 92 | + this.getCommentListStatus(value) |
| 91 | } | 93 | } |
| 92 | }).catch((err:Error)=>{ | 94 | }).catch((err:Error)=>{ |
| 93 | console.log(TAG,"请求失败") | 95 | console.log(TAG,"请求失败") |
| @@ -96,13 +98,13 @@ export struct OtherHomePageBottomCommentComponent{ | @@ -96,13 +98,13 @@ export struct OtherHomePageBottomCommentComponent{ | ||
| 96 | } | 98 | } |
| 97 | } | 99 | } |
| 98 | 100 | ||
| 99 | - getFollowListStatus(value:MineCommentListDetailItem){ | 101 | + getCommentListStatus(value:MineCommentListDetailItem){ |
| 100 | 102 | ||
| 101 | let status = new OtherUserCommentLikeStatusRequestItem() | 103 | let status = new OtherUserCommentLikeStatusRequestItem() |
| 102 | let data : CommentListItem[] = [] | 104 | let data : CommentListItem[] = [] |
| 103 | value.list.forEach((item)=>{ | 105 | value.list.forEach((item)=>{ |
| 104 | status.commentIdList.push(item.id) | 106 | status.commentIdList.push(item.id) |
| 105 | - data.push(new CommentListItem(item.fromUserHeader,item.fromUserName,item.targetTitle,item.createTime,item.commentContent,item.likeNum,0,item.id)) | 107 | + data.push(new CommentListItem(item.fromUserHeader,item.fromUserName,item.targetTitle,item.createTime,item.commentContent,item.likeNum,0,item.id,item.targetId,item.targetType)) |
| 106 | }) | 108 | }) |
| 107 | 109 | ||
| 108 | MinePageDatasModel.getOtherUserCommentLikeStatusData(status,getContext(this)).then((newValue)=>{ | 110 | MinePageDatasModel.getOtherUserCommentLikeStatusData(status,getContext(this)).then((newValue)=>{ |
| @@ -115,12 +117,13 @@ export struct OtherHomePageBottomCommentComponent{ | @@ -115,12 +117,13 @@ export struct OtherHomePageBottomCommentComponent{ | ||
| 115 | }) | 117 | }) |
| 116 | 118 | ||
| 117 | data.forEach((item)=>{ | 119 | data.forEach((item)=>{ |
| 118 | - this.data_comment.push(new CommentListItem(item.fromUserHeader,item.fromUserName,item.targetTitle,item.createTime,item.commentContent,item.likeNum,item.like_status,item.id)) | 120 | + this.data_comment.push(new CommentListItem(item.fromUserHeader,item.fromUserName,item.targetTitle,item.createTime,item.commentContent,item.likeNum,item.like_status,item.id,item.targetId,item.targetType)) |
| 119 | }) | 121 | }) |
| 120 | 122 | ||
| 121 | this.data_comment.notifyDataReload() | 123 | this.data_comment.notifyDataReload() |
| 122 | 124 | ||
| 123 | this.count = this.data_comment.totalCount() | 125 | this.count = this.data_comment.totalCount() |
| 126 | + this.commentNum = value.totalCount | ||
| 124 | if (this.data_comment.totalCount() < value.totalCount) { | 127 | if (this.data_comment.totalCount() < value.totalCount) { |
| 125 | this.curPageNum++ | 128 | this.curPageNum++ |
| 126 | }else { | 129 | }else { |
| @@ -144,20 +147,21 @@ struct ChildCommentComponent { | @@ -144,20 +147,21 @@ struct ChildCommentComponent { | ||
| 144 | build() { | 147 | build() { |
| 145 | Column(){ | 148 | Column(){ |
| 146 | Row() { | 149 | Row() { |
| 147 | - Stack(){ | 150 | + Stack({alignContent: Alignment.Center}){ |
| 148 | Image(this.data.fromUserHeader) | 151 | Image(this.data.fromUserHeader) |
| 149 | .alt($r('app.media.default_head')) | 152 | .alt($r('app.media.default_head')) |
| 150 | .objectFit(ImageFit.Auto) | 153 | .objectFit(ImageFit.Auto) |
| 151 | .width('69lpx') | 154 | .width('69lpx') |
| 152 | .height('69lpx') | 155 | .height('69lpx') |
| 153 | - .margin({right:'15lpx'}) | ||
| 154 | .borderRadius(50) | 156 | .borderRadius(50) |
| 155 | Image(this.levelHead) | 157 | Image(this.levelHead) |
| 156 | .width('89lpx') | 158 | .width('89lpx') |
| 157 | .height('89lpx') | 159 | .height('89lpx') |
| 158 | .objectFit(ImageFit.Cover) | 160 | .objectFit(ImageFit.Cover) |
| 159 | .borderRadius(50) | 161 | .borderRadius(50) |
| 160 | - } | 162 | + }.width('89lpx') |
| 163 | + .height('89lpx') | ||
| 164 | + .margin({right:'15lpx'}) | ||
| 161 | 165 | ||
| 162 | Column(){ | 166 | Column(){ |
| 163 | Text(this.data.fromUserName) | 167 | Text(this.data.fromUserName) |
| @@ -189,8 +193,9 @@ struct ChildCommentComponent { | @@ -189,8 +193,9 @@ struct ChildCommentComponent { | ||
| 189 | .objectFit(ImageFit.Auto) | 193 | .objectFit(ImageFit.Auto) |
| 190 | .interpolation(ImageInterpolation.Medium) | 194 | .interpolation(ImageInterpolation.Medium) |
| 191 | .borderRadius(50) | 195 | .borderRadius(50) |
| 192 | - } | ||
| 193 | - | 196 | + }.onClick(()=>{ |
| 197 | + this.commentLikeOperation() | ||
| 198 | + }) | ||
| 194 | } | 199 | } |
| 195 | .margin({bottom:'10lpx'}) | 200 | .margin({bottom:'10lpx'}) |
| 196 | .width('100%') | 201 | .width('100%') |
| @@ -237,4 +242,16 @@ struct ChildCommentComponent { | @@ -237,4 +242,16 @@ struct ChildCommentComponent { | ||
| 237 | } | 242 | } |
| 238 | .justifyContent(FlexAlign.Center) | 243 | .justifyContent(FlexAlign.Center) |
| 239 | } | 244 | } |
| 245 | + | ||
| 246 | + commentLikeOperation(){ | ||
| 247 | + let item = new CommentLikeOperationRequestItem(this.data.targetId,this.data.id+"",this.data.targetType+"",UserDataLocal.getUserName(),UserDataLocal.getUserHeaderUrl(),this.data.like_status===0?1:0) | ||
| 248 | + MinePageDatasModel.getCommentLikeOperation(item,getContext(this)).then((value)=>{ | ||
| 249 | + if(value!=null){ | ||
| 250 | + if (value.code === 0 || value.code.toString() === "0") { | ||
| 251 | + this.data.like_status = this.data.like_status===0?1:0 | ||
| 252 | + this.data.likeNum = this.data.like_status===0?this.data.likeNum-1:this.data.likeNum+1 | ||
| 253 | + } | ||
| 254 | + } | ||
| 255 | + }) | ||
| 256 | + } | ||
| 240 | } | 257 | } |
| @@ -3,7 +3,6 @@ import { LazyDataSource, StringUtils } from 'wdKit'; | @@ -3,7 +3,6 @@ import { LazyDataSource, StringUtils } from 'wdKit'; | ||
| 3 | import { WDRouterRule, WDRouterPage } from 'wdRouter'; | 3 | import { WDRouterRule, WDRouterPage } from 'wdRouter'; |
| 4 | import MinePageDatasModel from '../../../model/MinePageDatasModel'; | 4 | import MinePageDatasModel from '../../../model/MinePageDatasModel'; |
| 5 | import { FollowListDetailItem } from '../../../viewmodel/FollowListDetailItem'; | 5 | import { FollowListDetailItem } from '../../../viewmodel/FollowListDetailItem'; |
| 6 | -import { FollowListDetailRequestItem } from '../../../viewmodel/FollowListDetailRequestItem'; | ||
| 7 | import { UserFollowListRequestItem } from '../../../viewmodel/UserFollowListRequestItem'; | 6 | import { UserFollowListRequestItem } from '../../../viewmodel/UserFollowListRequestItem'; |
| 8 | import { ListHasNoMoreDataUI } from '../../reusable/ListHasNoMoreDataUI'; | 7 | import { ListHasNoMoreDataUI } from '../../reusable/ListHasNoMoreDataUI'; |
| 9 | 8 | ||
| @@ -17,6 +16,7 @@ export struct OtherHomePageBottomFollowComponent{ | @@ -17,6 +16,7 @@ export struct OtherHomePageBottomFollowComponent{ | ||
| 17 | @State count:number = 0; | 16 | @State count:number = 0; |
| 18 | @Prop curUserId: string | 17 | @Prop curUserId: string |
| 19 | 18 | ||
| 19 | + | ||
| 20 | aboutToAppear(){ | 20 | aboutToAppear(){ |
| 21 | this.getNewPageData() | 21 | this.getNewPageData() |
| 22 | } | 22 | } |
| @@ -107,7 +107,7 @@ export struct OtherHomePageBottomFollowComponent{ | @@ -107,7 +107,7 @@ export struct OtherHomePageBottomFollowComponent{ | ||
| 107 | 107 | ||
| 108 | getNewPageData(){ | 108 | getNewPageData(){ |
| 109 | this.isLoading = true | 109 | this.isLoading = true |
| 110 | - //我的关注列表 | 110 | + //关注列表 |
| 111 | if(this.hasMore){ | 111 | if(this.hasMore){ |
| 112 | let object = new UserFollowListRequestItem(Number(this.curUserId),20,this.curPageNum,"1") | 112 | let object = new UserFollowListRequestItem(Number(this.curUserId),20,this.curPageNum,"1") |
| 113 | 113 | ||
| @@ -116,10 +116,11 @@ export struct OtherHomePageBottomFollowComponent{ | @@ -116,10 +116,11 @@ export struct OtherHomePageBottomFollowComponent{ | ||
| 116 | this.hasMore = false | 116 | this.hasMore = false |
| 117 | }else{ | 117 | }else{ |
| 118 | value.list.forEach((value)=>{ | 118 | value.list.forEach((value)=>{ |
| 119 | - this.data_follow.push(new FollowListDetailItem(value.attentionHeadPhotoUrl,value.attentionUserName,value.fansNum,value.introduction,value.attentionCreatorId,"1",value.attentionUserId)) | 119 | + this.data_follow.push(new FollowListDetailItem(value.attentionHeadPhotoUrl,value.attentionUserName,value.fansNum,value.introduction,value.attentionCreatorId,"1",value.attentionUserId,value.cnUserType,value.cnUserId)) |
| 120 | }) | 120 | }) |
| 121 | this.data_follow.notifyDataReload() | 121 | this.data_follow.notifyDataReload() |
| 122 | this.count = this.data_follow.totalCount() | 122 | this.count = this.data_follow.totalCount() |
| 123 | + | ||
| 123 | if (this.data_follow.totalCount() < value.totalCount) { | 124 | if (this.data_follow.totalCount() < value.totalCount) { |
| 124 | this.curPageNum++ | 125 | this.curPageNum++ |
| 125 | }else { | 126 | }else { |
| @@ -167,47 +168,6 @@ struct ChildFollowComponent { | @@ -167,47 +168,6 @@ struct ChildFollowComponent { | ||
| 167 | .textOverflow({ overflow: TextOverflow.Ellipsis }) | 168 | .textOverflow({ overflow: TextOverflow.Ellipsis }) |
| 168 | }.layoutWeight(1) | 169 | }.layoutWeight(1) |
| 169 | .alignItems(HorizontalAlign.Start) | 170 | .alignItems(HorizontalAlign.Start) |
| 170 | - | ||
| 171 | - if(this.data.status == "1"){ | ||
| 172 | - Row(){ | ||
| 173 | - Text(`已关注`) | ||
| 174 | - .fontColor($r('app.color.color_CCCCCC')) | ||
| 175 | - .fontSize('23lpx') | ||
| 176 | - .fontWeight('500lpx') | ||
| 177 | - .lineHeight('35lpx') | ||
| 178 | - }.backgroundColor($r('app.color.color_F5F5F5')) | ||
| 179 | - .borderRadius('6lpx') | ||
| 180 | - .borderColor($r('app.color.color_F5F5F5')) | ||
| 181 | - .borderWidth('2lpx') | ||
| 182 | - .justifyContent(FlexAlign.Center) | ||
| 183 | - .width('100lpx') | ||
| 184 | - .height('46lpx') | ||
| 185 | - .margin({left:'4lpx',top:'23lpx'}) | ||
| 186 | - .onClick(()=>{ | ||
| 187 | - this.data.status = "0" | ||
| 188 | - }) | ||
| 189 | - }else{ | ||
| 190 | - Row(){ | ||
| 191 | - Image($r('app.media.follow_icon')) | ||
| 192 | - .margin({right:'4lpx'}) | ||
| 193 | - .width('23lpx') | ||
| 194 | - .height('23lpx') | ||
| 195 | - Text(`关注`) | ||
| 196 | - .fontColor($r('app.color.color_ED2800')) | ||
| 197 | - .fontSize('23lpx') | ||
| 198 | - .fontWeight('500lpx') | ||
| 199 | - .lineHeight('35lpx') | ||
| 200 | - }.borderColor($r('app.color.color_1AED2800')) | ||
| 201 | - .borderRadius('6lpx') | ||
| 202 | - .borderWidth('2lpx') | ||
| 203 | - .justifyContent(FlexAlign.Center) | ||
| 204 | - .width('100lpx') | ||
| 205 | - .height('46lpx') | ||
| 206 | - .margin({left:'4lpx',top:'23lpx'}) | ||
| 207 | - .onClick(()=>{ | ||
| 208 | - this.data.status = "1" | ||
| 209 | - }) | ||
| 210 | - } | ||
| 211 | }.alignItems(VerticalAlign.Top) | 171 | }.alignItems(VerticalAlign.Top) |
| 212 | .width('100%') | 172 | .width('100%') |
| 213 | .layoutWeight(1) | 173 | .layoutWeight(1) |
sight_harmony/features/wdComponent/src/main/ets/components/page/ChannelSubscriptionLayout.ets
0 → 100644
| 1 | +import { TopNavDTO } from 'wdBean'; | ||
| 2 | + | ||
| 3 | + | ||
| 4 | +const INDEX_SETTING_TITLE: string = '首页设置' | ||
| 5 | +const INDEX_SETTING_SUBTITLE: string = '将指定频道设置为首页' | ||
| 6 | +const MY_CHANNEL: string = '我的频道' | ||
| 7 | +const EDIT_TEXT: string = '编辑' | ||
| 8 | +const EDIT_DOWN: string = '完成' | ||
| 9 | +const MORE_CHANNEL: string = '更多频道' | ||
| 10 | +const LOCAL_CHANNEL: string = '地方频道' | ||
| 11 | + | ||
| 12 | +@CustomDialog | ||
| 13 | +struct ChannelDialog { | ||
| 14 | + @State indexSettingTabIndex: number = 1 | ||
| 15 | + @State isEditIng: boolean = false | ||
| 16 | + @Link currentTopNavSelectedIndex : number | ||
| 17 | + @Link myChannelList: Array<TopNavDTO> | ||
| 18 | + @Link moreChannelList: Array<TopNavDTO> | ||
| 19 | + @Link localChannelList: Array<TopNavDTO> | ||
| 20 | + @Link indexSettingArray: Array<string> | ||
| 21 | + @Link topNavList: Array<TopNavDTO> | ||
| 22 | + myChannelItemEditHandle = (index: number): void => { | ||
| 23 | + let item = this.myChannelList.splice(index, 1)[0] | ||
| 24 | + console.info(`itemitemitem${JSON.stringify(item)}`) | ||
| 25 | + if (item.moreChannel === '1') { | ||
| 26 | + this.moreChannelList.unshift(item) | ||
| 27 | + } | ||
| 28 | + if (item.localChannel === '1') { | ||
| 29 | + this.localChannelList.unshift(item) | ||
| 30 | + } | ||
| 31 | + } | ||
| 32 | + controller?: CustomDialogController | ||
| 33 | + | ||
| 34 | + build() { | ||
| 35 | + Column() { | ||
| 36 | + | ||
| 37 | + Flex({ justifyContent: FlexAlign.SpaceBetween, alignItems: ItemAlign.Center }) { | ||
| 38 | + Image($r('app.media.icon_ren_min_ri_bao')) | ||
| 39 | + .width(72) | ||
| 40 | + .height(29) | ||
| 41 | + Image($r('app.media.close_button')) | ||
| 42 | + .width(24) | ||
| 43 | + .onClick(() => { | ||
| 44 | + this.controller?.close() | ||
| 45 | + }) | ||
| 46 | + } | ||
| 47 | + .width('100%') | ||
| 48 | + .margin({ top: 30, bottom: 10 }) | ||
| 49 | + | ||
| 50 | + List() { | ||
| 51 | + | ||
| 52 | + ListItem() { | ||
| 53 | + Row() { | ||
| 54 | + Text(INDEX_SETTING_TITLE) | ||
| 55 | + .fontSize(16) | ||
| 56 | + .fontWeight(600) | ||
| 57 | + .margin({ right: 4 }) | ||
| 58 | + | ||
| 59 | + Text(INDEX_SETTING_SUBTITLE) | ||
| 60 | + .fontSize(12) | ||
| 61 | + .fontWeight(400) | ||
| 62 | + } | ||
| 63 | + .width('100%') | ||
| 64 | + .margin({ top: 22, bottom: 16 }) | ||
| 65 | + | ||
| 66 | + } | ||
| 67 | + | ||
| 68 | + ListItem() { | ||
| 69 | + Flex({ justifyContent: FlexAlign.SpaceBetween }) { | ||
| 70 | + ForEach(this.indexSettingArray, (text: string, index: number) => { | ||
| 71 | + Button(text, { type: ButtonType.Normal, stateEffect: false }) | ||
| 72 | + .width('48%') | ||
| 73 | + .borderRadius(2) | ||
| 74 | + .fontColor(index === this.indexSettingTabIndex ? '#ffffff' : '#ED2800') | ||
| 75 | + .fontSize(16) | ||
| 76 | + .fontWeight(400) | ||
| 77 | + .backgroundColor(index === this.indexSettingTabIndex ? '#ED2800' : '#FDE9E5') | ||
| 78 | + .onClick(() => { | ||
| 79 | + this.indexSettingTabIndex = index | ||
| 80 | + }) | ||
| 81 | + }) | ||
| 82 | + } | ||
| 83 | + .height(36) | ||
| 84 | + .margin({ bottom: 36 }) | ||
| 85 | + } | ||
| 86 | + | ||
| 87 | + ListItem() { | ||
| 88 | + Row() { | ||
| 89 | + Text(MY_CHANNEL) | ||
| 90 | + .fontSize(16) | ||
| 91 | + .fontWeight(600) | ||
| 92 | + Text(this.isEditIng ? EDIT_DOWN : EDIT_TEXT) | ||
| 93 | + .fontSize(14) | ||
| 94 | + .fontColor('#ED2800') | ||
| 95 | + .onClick(() => { | ||
| 96 | + this.isEditIng = !this.isEditIng | ||
| 97 | + }) | ||
| 98 | + } | ||
| 99 | + .width('100%') | ||
| 100 | + .justifyContent(FlexAlign.SpaceBetween) | ||
| 101 | + .margin({ bottom: 12 }) | ||
| 102 | + } | ||
| 103 | + | ||
| 104 | + ListItem() { | ||
| 105 | + GridRow({ columns: 4, gutter: 10 }) { | ||
| 106 | + ForEach(this.myChannelList, (item: TopNavDTO, index: number) => { | ||
| 107 | + GridCol() { | ||
| 108 | + Row() { | ||
| 109 | + Text(item.name) | ||
| 110 | + .fontSize(14) | ||
| 111 | + .fontColor( this.currentTopNavSelectedIndex === index ? '#ED2800' : (item.homeChannel === '1' ? '#999999' : '#222222')) | ||
| 112 | + | ||
| 113 | + if (this.isEditIng && item.myChannel !== '1') { | ||
| 114 | + Image($r('app.media.icon_audio_close')) | ||
| 115 | + .width(12) | ||
| 116 | + .margin({ left: 1 }) | ||
| 117 | + } | ||
| 118 | + } | ||
| 119 | + .width('100%') | ||
| 120 | + .height('100%') | ||
| 121 | + .justifyContent(FlexAlign.Center) | ||
| 122 | + .backgroundColor(item.homeChannel === '1' ? '#F5F5F5' : '') | ||
| 123 | + .onClick(() => { | ||
| 124 | + if (this.isEditIng) { | ||
| 125 | + if(item.myChannel !== '1'){ | ||
| 126 | + this.myChannelItemEditHandle(index) | ||
| 127 | + } | ||
| 128 | + }else{ | ||
| 129 | + this.controller?.close() | ||
| 130 | + } | ||
| 131 | + }) | ||
| 132 | + } | ||
| 133 | + .width(80) | ||
| 134 | + .height(40) | ||
| 135 | + .border({ | ||
| 136 | + width: item.homeChannel === '1' ? 0 : 1, | ||
| 137 | + color: '#EDEDED', | ||
| 138 | + radius: 3 | ||
| 139 | + }) | ||
| 140 | + }, (item: TopNavDTO) => JSON.stringify(item)) | ||
| 141 | + } | ||
| 142 | + .width('100%') | ||
| 143 | + .margin({ bottom: 24 }) | ||
| 144 | + } | ||
| 145 | + | ||
| 146 | + ListItem() { | ||
| 147 | + Column() { | ||
| 148 | + if (this.moreChannelList.length > 0) { | ||
| 149 | + Text(MORE_CHANNEL) | ||
| 150 | + .width('100%') | ||
| 151 | + .fontSize(16) | ||
| 152 | + .fontWeight(600) | ||
| 153 | + .margin({ bottom: 12 }) | ||
| 154 | + .textAlign(TextAlign.Start) | ||
| 155 | + } | ||
| 156 | + | ||
| 157 | + GridRow({ columns: 4, gutter: 10 }) { | ||
| 158 | + ForEach(this.moreChannelList, (item: TopNavDTO, index: number) => { | ||
| 159 | + GridCol() { | ||
| 160 | + Row() { | ||
| 161 | + Text(item.name) | ||
| 162 | + .fontSize(14) | ||
| 163 | + | ||
| 164 | + Image($r('app.media.add_icon')) | ||
| 165 | + .width(12) | ||
| 166 | + .margin({ left: 1 }) | ||
| 167 | + } | ||
| 168 | + .width('100%').height('100%') | ||
| 169 | + .justifyContent(FlexAlign.Center) | ||
| 170 | + .onClick(() => { | ||
| 171 | + this.myChannelList.push(this.moreChannelList.splice(index, 1)[0]) | ||
| 172 | + }) | ||
| 173 | + } | ||
| 174 | + .width(80) | ||
| 175 | + .height(40) | ||
| 176 | + .border({ | ||
| 177 | + width: 1, | ||
| 178 | + color: '#EDEDED' | ||
| 179 | + }) | ||
| 180 | + }, (item: TopNavDTO) => JSON.stringify(item)) | ||
| 181 | + } | ||
| 182 | + .width('100%') | ||
| 183 | + .margin({ bottom: 24 }) | ||
| 184 | + | ||
| 185 | + } | ||
| 186 | + .width('100%') | ||
| 187 | + } | ||
| 188 | + | ||
| 189 | + ListItem() { | ||
| 190 | + Column() { | ||
| 191 | + if (this.localChannelList.length > 0) { | ||
| 192 | + Text(LOCAL_CHANNEL) | ||
| 193 | + .width('100%') | ||
| 194 | + .fontSize(16) | ||
| 195 | + .fontWeight(600) | ||
| 196 | + .margin({ bottom: 12 }) | ||
| 197 | + .textAlign(TextAlign.Start) | ||
| 198 | + } | ||
| 199 | + | ||
| 200 | + GridRow({ columns: 4, gutter: 10 }) { | ||
| 201 | + ForEach(this.localChannelList, (item: TopNavDTO, index: number) => { | ||
| 202 | + GridCol() { | ||
| 203 | + Row() { | ||
| 204 | + Text(item.name) | ||
| 205 | + .fontSize(14) | ||
| 206 | + | ||
| 207 | + Image($r('app.media.add_icon')) | ||
| 208 | + .width(12) | ||
| 209 | + .margin({ left: 1 }) | ||
| 210 | + } | ||
| 211 | + .width('100%').height('100%') | ||
| 212 | + .justifyContent(FlexAlign.Center) | ||
| 213 | + .onClick(() => { | ||
| 214 | + this.myChannelList.push(this.localChannelList.splice(index, 1)[0]) | ||
| 215 | + }) | ||
| 216 | + } | ||
| 217 | + .width(80) | ||
| 218 | + .height(40) | ||
| 219 | + .border({ | ||
| 220 | + width: 1, | ||
| 221 | + color: '#EDEDED' | ||
| 222 | + }) | ||
| 223 | + }, (item: TopNavDTO) => JSON.stringify(item)) | ||
| 224 | + } | ||
| 225 | + .width('100%') | ||
| 226 | + .margin({ bottom: 24 }) | ||
| 227 | + } | ||
| 228 | + .width('100%') | ||
| 229 | + } | ||
| 230 | + | ||
| 231 | + }.width('100%').height('100%') | ||
| 232 | + | ||
| 233 | + } | ||
| 234 | + .padding(16) | ||
| 235 | + .backgroundColor('#ffffff') | ||
| 236 | + } | ||
| 237 | + | ||
| 238 | + onTopNavigationDataUpdated() { | ||
| 239 | + } | ||
| 240 | +} | ||
| 241 | + | ||
| 242 | +@Entry | ||
| 243 | +@Component | ||
| 244 | +struct ChannelSubscriptionLayout { | ||
| 245 | + //当前选中的频道 | ||
| 246 | + @Prop currentTopNavSelectedIndex?: number; | ||
| 247 | + | ||
| 248 | + @State indexSettingArray: Array<string> = ['推荐', '热点'] | ||
| 249 | + @State myChannelList: Array<TopNavDTO> = [ | ||
| 250 | + // { | ||
| 251 | + // channelId: 0, | ||
| 252 | + // channelStyle: 1, | ||
| 253 | + // channelType: 1, | ||
| 254 | + // defaultPermitted: 1, | ||
| 255 | + // delPermitted: 1, | ||
| 256 | + // fontCColor: '#000000', | ||
| 257 | + // fontColor: '#000000', | ||
| 258 | + // headlinesOn: 0, | ||
| 259 | + // homeChannel: '1', | ||
| 260 | + // iconCUrl: '', | ||
| 261 | + // iconCUrlSize: '', | ||
| 262 | + // iconUrl: '', | ||
| 263 | + // iconUrlSize: '', | ||
| 264 | + // localChannel: '', | ||
| 265 | + // moreChannel: '', | ||
| 266 | + // movePermitted: 0, | ||
| 267 | + // myChannel: '1', | ||
| 268 | + // name: '推荐', | ||
| 269 | + // num: 0, | ||
| 270 | + // pageId: 21212, | ||
| 271 | + // pageType: '', | ||
| 272 | + // underlineCColor: '' | ||
| 273 | + // }, | ||
| 274 | + // { | ||
| 275 | + // channelId: 1, | ||
| 276 | + // channelStyle: 1, | ||
| 277 | + // channelType: 1, | ||
| 278 | + // defaultPermitted: 1, | ||
| 279 | + // delPermitted: 1, | ||
| 280 | + // fontCColor: '#000000', | ||
| 281 | + // fontColor: '#000000', | ||
| 282 | + // headlinesOn: 0, | ||
| 283 | + // homeChannel: '1', | ||
| 284 | + // iconCUrl: '', | ||
| 285 | + // iconCUrlSize: '', | ||
| 286 | + // iconUrl: '', | ||
| 287 | + // iconUrlSize: '', | ||
| 288 | + // localChannel: '', | ||
| 289 | + // moreChannel: '', | ||
| 290 | + // movePermitted: 0, | ||
| 291 | + // myChannel: '1', | ||
| 292 | + // name: '热点', | ||
| 293 | + // num: 0, | ||
| 294 | + // pageId: 21212, | ||
| 295 | + // pageType: '', | ||
| 296 | + // underlineCColor: '' | ||
| 297 | + // }, | ||
| 298 | + // { | ||
| 299 | + // channelId: 2, | ||
| 300 | + // channelStyle: 1, | ||
| 301 | + // channelType: 1, | ||
| 302 | + // defaultPermitted: 1, | ||
| 303 | + // delPermitted: 1, | ||
| 304 | + // fontCColor: '#000000', | ||
| 305 | + // fontColor: '#000000', | ||
| 306 | + // headlinesOn: 0, | ||
| 307 | + // homeChannel: '', | ||
| 308 | + // iconCUrl: '', | ||
| 309 | + // iconCUrlSize: '', | ||
| 310 | + // iconUrl: '', | ||
| 311 | + // iconUrlSize: '', | ||
| 312 | + // localChannel: '', | ||
| 313 | + // moreChannel: '', | ||
| 314 | + // movePermitted: 0, | ||
| 315 | + // myChannel: '1', | ||
| 316 | + // name: '视频', | ||
| 317 | + // num: 0, | ||
| 318 | + // pageId: 21212, | ||
| 319 | + // pageType: '', | ||
| 320 | + // underlineCColor: '' | ||
| 321 | + // }, | ||
| 322 | + // { | ||
| 323 | + // channelId: 3, | ||
| 324 | + // channelStyle: 1, | ||
| 325 | + // channelType: 1, | ||
| 326 | + // defaultPermitted: 1, | ||
| 327 | + // delPermitted: 1, | ||
| 328 | + // fontCColor: '#000000', | ||
| 329 | + // fontColor: '#000000', | ||
| 330 | + // headlinesOn: 0, | ||
| 331 | + // homeChannel: '', | ||
| 332 | + // iconCUrl: '', | ||
| 333 | + // iconCUrlSize: '', | ||
| 334 | + // iconUrl: '', | ||
| 335 | + // iconUrlSize: '', | ||
| 336 | + // localChannel: '', | ||
| 337 | + // moreChannel: '', | ||
| 338 | + // movePermitted: 0, | ||
| 339 | + // myChannel: '1', | ||
| 340 | + // name: '云课堂', | ||
| 341 | + // num: 0, | ||
| 342 | + // pageId: 21212, | ||
| 343 | + // pageType: '', | ||
| 344 | + // underlineCColor: '' | ||
| 345 | + // }, | ||
| 346 | + ] | ||
| 347 | + @State moreChannelList: Array<TopNavDTO> = [ | ||
| 348 | + // { | ||
| 349 | + // channelId: 4, | ||
| 350 | + // channelStyle: 1, | ||
| 351 | + // channelType: 1, | ||
| 352 | + // defaultPermitted: 1, | ||
| 353 | + // delPermitted: 1, | ||
| 354 | + // fontCColor: '#000000', | ||
| 355 | + // fontColor: '#000000', | ||
| 356 | + // headlinesOn: 0, | ||
| 357 | + // homeChannel: '', | ||
| 358 | + // iconCUrl: '', | ||
| 359 | + // iconCUrlSize: '', | ||
| 360 | + // iconUrl: '', | ||
| 361 | + // iconUrlSize: '', | ||
| 362 | + // localChannel: '', | ||
| 363 | + // moreChannel: '1', | ||
| 364 | + // movePermitted: 0, | ||
| 365 | + // myChannel: '', | ||
| 366 | + // name: '房产', | ||
| 367 | + // num: 0, | ||
| 368 | + // pageId: 21212, | ||
| 369 | + // pageType: '', | ||
| 370 | + // underlineCColor: '' | ||
| 371 | + // }, | ||
| 372 | + // { | ||
| 373 | + // channelId: 5, | ||
| 374 | + // channelStyle: 1, | ||
| 375 | + // channelType: 1, | ||
| 376 | + // defaultPermitted: 1, | ||
| 377 | + // delPermitted: 1, | ||
| 378 | + // fontCColor: '#000000', | ||
| 379 | + // fontColor: '#000000', | ||
| 380 | + // headlinesOn: 0, | ||
| 381 | + // homeChannel: '', | ||
| 382 | + // iconCUrl: '', | ||
| 383 | + // iconCUrlSize: '', | ||
| 384 | + // iconUrl: '', | ||
| 385 | + // iconUrlSize: '', | ||
| 386 | + // localChannel: '', | ||
| 387 | + // moreChannel: '1', | ||
| 388 | + // movePermitted: 0, | ||
| 389 | + // myChannel: '', | ||
| 390 | + // name: '生态', | ||
| 391 | + // num: 0, | ||
| 392 | + // pageId: 21212, | ||
| 393 | + // pageType: '', | ||
| 394 | + // underlineCColor: '' | ||
| 395 | + // }, | ||
| 396 | + // { | ||
| 397 | + // channelId: 6, | ||
| 398 | + // channelStyle: 1, | ||
| 399 | + // channelType: 1, | ||
| 400 | + // defaultPermitted: 1, | ||
| 401 | + // delPermitted: 1, | ||
| 402 | + // fontCColor: '#000000', | ||
| 403 | + // fontColor: '#000000', | ||
| 404 | + // headlinesOn: 0, | ||
| 405 | + // homeChannel: '', | ||
| 406 | + // iconCUrl: '', | ||
| 407 | + // iconCUrlSize: '', | ||
| 408 | + // iconUrl: '', | ||
| 409 | + // iconUrlSize: '', | ||
| 410 | + // localChannel: '', | ||
| 411 | + // moreChannel: '1', | ||
| 412 | + // movePermitted: 0, | ||
| 413 | + // myChannel: '', | ||
| 414 | + // name: '健康', | ||
| 415 | + // num: 0, | ||
| 416 | + // pageId: 21212, | ||
| 417 | + // pageType: '', | ||
| 418 | + // underlineCColor: '' | ||
| 419 | + // } | ||
| 420 | + ] | ||
| 421 | + @State localChannelList: Array<TopNavDTO> = [ | ||
| 422 | + // { | ||
| 423 | + // channelId: 7, | ||
| 424 | + // channelStyle: 1, | ||
| 425 | + // channelType: 1, | ||
| 426 | + // defaultPermitted: 1, | ||
| 427 | + // delPermitted: 1, | ||
| 428 | + // fontCColor: '#000000', | ||
| 429 | + // fontColor: '#000000', | ||
| 430 | + // headlinesOn: 0, | ||
| 431 | + // homeChannel: '', | ||
| 432 | + // iconCUrl: '', | ||
| 433 | + // iconCUrlSize: '', | ||
| 434 | + // iconUrl: '', | ||
| 435 | + // iconUrlSize: '', | ||
| 436 | + // localChannel: '1', | ||
| 437 | + // moreChannel: '', | ||
| 438 | + // movePermitted: 0, | ||
| 439 | + // myChannel: '', | ||
| 440 | + // name: '北京', | ||
| 441 | + // num: 0, | ||
| 442 | + // pageId: 21212, | ||
| 443 | + // pageType: '', | ||
| 444 | + // underlineCColor: '' | ||
| 445 | + // }, | ||
| 446 | + // { | ||
| 447 | + // channelId: 8, | ||
| 448 | + // channelStyle: 1, | ||
| 449 | + // channelType: 1, | ||
| 450 | + // defaultPermitted: 1, | ||
| 451 | + // delPermitted: 1, | ||
| 452 | + // fontCColor: '#000000', | ||
| 453 | + // fontColor: '#000000', | ||
| 454 | + // headlinesOn: 0, | ||
| 455 | + // homeChannel: '', | ||
| 456 | + // iconCUrl: '', | ||
| 457 | + // iconCUrlSize: '', | ||
| 458 | + // iconUrl: '', | ||
| 459 | + // iconUrlSize: '', | ||
| 460 | + // localChannel: '1', | ||
| 461 | + // moreChannel: '', | ||
| 462 | + // movePermitted: 0, | ||
| 463 | + // myChannel: '', | ||
| 464 | + // name: '上海', | ||
| 465 | + // num: 0, | ||
| 466 | + // pageId: 21212, | ||
| 467 | + // pageType: '', | ||
| 468 | + // underlineCColor: '' | ||
| 469 | + // }, | ||
| 470 | + // { | ||
| 471 | + // channelId: 9, | ||
| 472 | + // channelStyle: 1, | ||
| 473 | + // channelType: 1, | ||
| 474 | + // defaultPermitted: 1, | ||
| 475 | + // delPermitted: 1, | ||
| 476 | + // fontCColor: '#000000', | ||
| 477 | + // fontColor: '#000000', | ||
| 478 | + // headlinesOn: 0, | ||
| 479 | + // homeChannel: '', | ||
| 480 | + // iconCUrl: '', | ||
| 481 | + // iconCUrlSize: '', | ||
| 482 | + // iconUrl: '', | ||
| 483 | + // iconUrlSize: '', | ||
| 484 | + // localChannel: '1', | ||
| 485 | + // moreChannel: '', | ||
| 486 | + // movePermitted: 0, | ||
| 487 | + // myChannel: '', | ||
| 488 | + // name: '江苏', | ||
| 489 | + // num: 0, | ||
| 490 | + // pageId: 21212, | ||
| 491 | + // pageType: '', | ||
| 492 | + // underlineCColor: '' | ||
| 493 | + // } | ||
| 494 | + ] | ||
| 495 | + // 顶导数据 | ||
| 496 | + @State topNavList: TopNavDTO[] = [] | ||
| 497 | + dialogController: CustomDialogController | null = new CustomDialogController({ | ||
| 498 | + builder: ChannelDialog({ | ||
| 499 | + currentTopNavSelectedIndex:this.currentTopNavSelectedIndex, | ||
| 500 | + indexSettingArray: this.indexSettingArray, | ||
| 501 | + topNavList: this.topNavList, | ||
| 502 | + myChannelList: this.myChannelList, | ||
| 503 | + moreChannelList: this.moreChannelList, | ||
| 504 | + localChannelList: this.localChannelList, | ||
| 505 | + }), | ||
| 506 | + cancel: this.exitApp, | ||
| 507 | + alignment: DialogAlignment.TopEnd, | ||
| 508 | + customStyle: true, | ||
| 509 | + }) | ||
| 510 | + aboutToAppear() { | ||
| 511 | + this.topNavList.forEach((item,index)=>{ | ||
| 512 | + if(item.myChannel === '1'){ | ||
| 513 | + this.myChannelList.push(item) | ||
| 514 | + } | ||
| 515 | + if(item.moreChannel === '1'){ | ||
| 516 | + this.moreChannelList.push(item) | ||
| 517 | + } | ||
| 518 | + if(item.localChannel === '1'){ | ||
| 519 | + this.localChannelList.push(item) | ||
| 520 | + } | ||
| 521 | + }) | ||
| 522 | + } | ||
| 523 | + aboutToDisappear() { | ||
| 524 | + this.dialogController = null // 将dialogController置空 | ||
| 525 | + } | ||
| 526 | + | ||
| 527 | + onCancel() { | ||
| 528 | + console.info('Callback when the first button is clicked') | ||
| 529 | + } | ||
| 530 | + | ||
| 531 | + onAccept() { | ||
| 532 | + console.info('Callback when the second button is clicked') | ||
| 533 | + } | ||
| 534 | + | ||
| 535 | + exitApp() { | ||
| 536 | + console.info('Click the callback in the blank area') | ||
| 537 | + } | ||
| 538 | + | ||
| 539 | + build() { | ||
| 540 | + Row() { | ||
| 541 | + Image($r('app.media.channel_button')) | ||
| 542 | + .width(18) | ||
| 543 | + } | ||
| 544 | + .width(36) | ||
| 545 | + .height(30) | ||
| 546 | + .justifyContent(FlexAlign.Center) | ||
| 547 | + .backgroundColor('#ffffff') | ||
| 548 | + .onClick(() => { | ||
| 549 | + if (this.dialogController != null) { | ||
| 550 | + this.dialogController.open() | ||
| 551 | + } | ||
| 552 | + }) | ||
| 553 | + } | ||
| 554 | +} | ||
| 555 | + | ||
| 556 | +export { ChannelSubscriptionLayout } |
| 1 | -import router from '@ohos.router'; | 1 | + |
| 2 | import { CustomTitleUI } from '../reusable/CustomTitleUI'; | 2 | import { CustomTitleUI } from '../reusable/CustomTitleUI'; |
| 3 | -import { EditInfoModel, EditListInfo, editModel } from '../../model/EditInfoModel'; | 3 | +import { EditListInfo } from '../../model/EditInfoModel'; |
| 4 | import EditInfoViewModel from '../../viewmodel/EditInfoViewModel'; | 4 | import EditInfoViewModel from '../../viewmodel/EditInfoViewModel'; |
| 5 | import { WDRouterPage, WDRouterRule } from 'wdRouter'; | 5 | import { WDRouterPage, WDRouterRule } from 'wdRouter'; |
| 6 | +import {AreaPickerDialog} from '../view/areaPickerDialog/AreaPickerDialog' | ||
| 7 | +import { AreaListModel } from '../../model/AreaListModel'; | ||
| 6 | 8 | ||
| 7 | 9 | ||
| 8 | @Entry | 10 | @Entry |
| 9 | @Component | 11 | @Component |
| 10 | struct EditUserInfoPage { | 12 | struct EditUserInfoPage { |
| 11 | - private listData: EditListInfo[] = [] | ||
| 12 | - // editM: editModel | 13 | + @State listData: EditListInfo[] = [] |
| 14 | + @State headerImg: string = '' | ||
| 15 | + @State dataSource: AreaListModel[] = [] | ||
| 16 | + | ||
| 17 | + dialogController: CustomDialogController = new CustomDialogController({ | ||
| 18 | + builder: AreaPickerDialog({dataSource:this.dataSource}), | ||
| 19 | + alignment: DialogAlignment.Bottom, | ||
| 20 | + offset:{dx:0,dy:-20} | ||
| 21 | + }) | ||
| 13 | 22 | ||
| 14 | aboutToAppear() { | 23 | aboutToAppear() { |
| 15 | - // this.listData = EditInfoViewModel.getEditListInfo(this.editM) | ||
| 16 | this.getAccountOwnerInfo() | 24 | this.getAccountOwnerInfo() |
| 25 | + this.getAreaList() | ||
| 17 | } | 26 | } |
| 18 | 27 | ||
| 19 | build() { | 28 | build() { |
| 20 | Row() { | 29 | Row() { |
| 21 | Column() { | 30 | Column() { |
| 22 | CustomTitleUI({titleName:'资料编辑'}) | 31 | CustomTitleUI({titleName:'资料编辑'}) |
| 23 | - Image('') | 32 | + Image(this.headerImg) |
| 33 | + .alt($r('app.media.default_head')) | ||
| 24 | .backgroundColor(Color.Gray) | 34 | .backgroundColor(Color.Gray) |
| 25 | .width(100) | 35 | .width(100) |
| 26 | .height(100) | 36 | .height(100) |
| @@ -87,6 +97,8 @@ struct EditUserInfoPage { | @@ -87,6 +97,8 @@ struct EditUserInfoPage { | ||
| 87 | // url:'pages/EditUserInstoductionPage', | 97 | // url:'pages/EditUserInstoductionPage', |
| 88 | // params:{pageNum:i} | 98 | // params:{pageNum:i} |
| 89 | // }) | 99 | // }) |
| 100 | + }else if (i === 3){ | ||
| 101 | + this.dialogController.open() | ||
| 90 | } else if (i === 4) { | 102 | } else if (i === 4) { |
| 91 | DatePickerDialog.show({ | 103 | DatePickerDialog.show({ |
| 92 | start:new Date('1900-1-1'), | 104 | start:new Date('1900-1-1'), |
| @@ -110,9 +122,15 @@ struct EditUserInfoPage { | @@ -110,9 +122,15 @@ struct EditUserInfoPage { | ||
| 110 | } | 122 | } |
| 111 | 123 | ||
| 112 | getAccountOwnerInfo(){ | 124 | getAccountOwnerInfo(){ |
| 113 | - EditInfoViewModel.queryAccountOwnerInfo(1,getContext(this)).then((result) => { | ||
| 114 | - // this.editM = result | 125 | + EditInfoViewModel.queryAccountOwnerInfo(1,getContext(this)).then((editModel) => { |
| 126 | + this.headerImg = editModel.userExtend.headPhotoUrl | ||
| 127 | + this.listData.push(...EditInfoViewModel.getEditListInfo(editModel)) | ||
| 115 | }); | 128 | }); |
| 116 | } | 129 | } |
| 117 | 130 | ||
| 131 | + getAreaList(){ | ||
| 132 | + EditInfoViewModel.getAreaList(getContext(this)).then((value) =>{ | ||
| 133 | + this.dataSource.push(...value) | ||
| 134 | + }) | ||
| 135 | + } | ||
| 118 | } | 136 | } |
| @@ -78,7 +78,8 @@ export struct MinePageComponent { | @@ -78,7 +78,8 @@ export struct MinePageComponent { | ||
| 78 | .height('100%') | 78 | .height('100%') |
| 79 | } | 79 | } |
| 80 | 80 | ||
| 81 | - async getUserLogin() { | 81 | + async getUserLogin() { |
| 82 | + // let userid = SPHelper.default.getSync(SpConstants.USER_ID,"") as string | ||
| 82 | let userid = await SPHelper.default.get(SpConstants.USER_ID,"") | 83 | let userid = await SPHelper.default.get(SpConstants.USER_ID,"") |
| 83 | if(StringUtils.isNotEmpty(userid)){ | 84 | if(StringUtils.isNotEmpty(userid)){ |
| 84 | this.isLogin = true | 85 | this.isLogin = true |
| @@ -2,6 +2,7 @@ import { Action, CompDTO, Params, TopNavDTO } from 'wdBean'; | @@ -2,6 +2,7 @@ import { Action, CompDTO, Params, TopNavDTO } from 'wdBean'; | ||
| 2 | import { LazyDataSource, Logger } from 'wdKit'; | 2 | import { LazyDataSource, Logger } from 'wdKit'; |
| 3 | import { WDRouterRule } from 'wdRouter'; | 3 | import { WDRouterRule } from 'wdRouter'; |
| 4 | import { PageComponent } from './PageComponent'; | 4 | import { PageComponent } from './PageComponent'; |
| 5 | +import { ChannelSubscriptionLayout } from './ChannelSubscriptionLayout' | ||
| 5 | 6 | ||
| 6 | const TAG = 'TopNavigationComponent'; | 7 | const TAG = 'TopNavigationComponent'; |
| 7 | 8 | ||
| @@ -16,8 +17,48 @@ export struct TopNavigationComponent { | @@ -16,8 +17,48 @@ export struct TopNavigationComponent { | ||
| 16 | // 顶导数据 | 17 | // 顶导数据 |
| 17 | @State @Watch('onTopNavigationDataUpdated') topNavList: TopNavDTO[] = [] | 18 | @State @Watch('onTopNavigationDataUpdated') topNavList: TopNavDTO[] = [] |
| 18 | @State compList: LazyDataSource<CompDTO> = new LazyDataSource(); | 19 | @State compList: LazyDataSource<CompDTO> = new LazyDataSource(); |
| 20 | + @State handledTopNavList: TopNavDTO[] = [] | ||
| 19 | readonly MAX_LINE: number = 1; | 21 | readonly MAX_LINE: number = 1; |
| 20 | 22 | ||
| 23 | + topNavListHandle() { | ||
| 24 | + let defaultMyChannelList: TopNavDTO[] = [] | ||
| 25 | + this.handledTopNavList = [...this.topNavList] | ||
| 26 | + this.handledTopNavList.sort((a, b) => { | ||
| 27 | + return a.num - b.num; | ||
| 28 | + }); | ||
| 29 | + Logger.info(TAG, `aboutToAppear this.handledTopNavListsort : ${JSON.stringify(this.handledTopNavList)}`); | ||
| 30 | + for (let i = 0; i < this.handledTopNavList.length; i++) { | ||
| 31 | + if (this.handledTopNavList[i].defaultPermitted === 0 || this.handledTopNavList[i].movePermitted === 0 || this.handledTopNavList[i].delPermitted === 0 || this.handledTopNavList[i].headlinesOn === 1) { | ||
| 32 | + defaultMyChannelList.push(this.handledTopNavList.splice(i, 1)[0]); | ||
| 33 | + } | ||
| 34 | + } | ||
| 35 | + | ||
| 36 | + Logger.info(TAG, `aboutToAppear defaultMyChannelListsort : ${JSON.stringify(defaultMyChannelList)}`); | ||
| 37 | + | ||
| 38 | + for (const element of defaultMyChannelList) { | ||
| 39 | + element.myChannel = '1' | ||
| 40 | + if (element.defaultPermitted === 1) { | ||
| 41 | + element.homeChannel = '1' | ||
| 42 | + } | ||
| 43 | + } | ||
| 44 | + this.handledTopNavList.unshift(...defaultMyChannelList) | ||
| 45 | + for (let i = 0; i < this.handledTopNavList.length; i++) { | ||
| 46 | + if(this.handledTopNavList[i].channelType === 2){ | ||
| 47 | + this.handledTopNavList[i].localChannel = '1' | ||
| 48 | + } | ||
| 49 | + if(i>=11){ | ||
| 50 | + if(this.handledTopNavList[i].channelType === 1){ | ||
| 51 | + this.handledTopNavList[i].moreChannel = '1' | ||
| 52 | + } | ||
| 53 | + }else{ | ||
| 54 | + if(this.handledTopNavList[i].channelType === 1 && this.handledTopNavList[i].myChannel !== '1'){ | ||
| 55 | + this.handledTopNavList[i].moreChannel = '1' | ||
| 56 | + } | ||
| 57 | + } | ||
| 58 | + } | ||
| 59 | + console.info(`handledTopNavList:${JSON.stringify(this.handledTopNavList)}`) | ||
| 60 | + } | ||
| 61 | + | ||
| 21 | build() { | 62 | build() { |
| 22 | Column() { | 63 | Column() { |
| 23 | RelativeContainer() { | 64 | RelativeContainer() { |
| @@ -44,8 +85,10 @@ export struct TopNavigationComponent { | @@ -44,8 +85,10 @@ export struct TopNavigationComponent { | ||
| 44 | .height(30) | 85 | .height(30) |
| 45 | .width(123) | 86 | .width(123) |
| 46 | .id('search') | 87 | .id('search') |
| 47 | - .alignRules({ left: { anchor: "__container__", align: HorizontalAlign.Start }, | ||
| 48 | - center: { anchor: "__container__", align: VerticalAlign.Center } }) | 88 | + .alignRules({ |
| 89 | + left: { anchor: "__container__", align: HorizontalAlign.Start }, | ||
| 90 | + center: { anchor: "__container__", align: VerticalAlign.Center } | ||
| 91 | + }) | ||
| 49 | 92 | ||
| 50 | Image($r('app.media.icon_ren_min_ri_bao')) | 93 | Image($r('app.media.icon_ren_min_ri_bao')) |
| 51 | .width(72) | 94 | .width(72) |
| @@ -60,8 +103,10 @@ export struct TopNavigationComponent { | @@ -60,8 +103,10 @@ export struct TopNavigationComponent { | ||
| 60 | WDRouterRule.jumpWithAction(taskAction) | 103 | WDRouterRule.jumpWithAction(taskAction) |
| 61 | }) | 104 | }) |
| 62 | .id('ren_min') | 105 | .id('ren_min') |
| 63 | - .alignRules({ middle: { anchor: "__container__", align: HorizontalAlign.Center }, | ||
| 64 | - center: { anchor: "__container__", align: VerticalAlign.Center } }) | 106 | + .alignRules({ |
| 107 | + middle: { anchor: "__container__", align: HorizontalAlign.Center }, | ||
| 108 | + center: { anchor: "__container__", align: VerticalAlign.Center } | ||
| 109 | + }) | ||
| 65 | 110 | ||
| 66 | Stack({ alignContent: Alignment.Center }) { | 111 | Stack({ alignContent: Alignment.Center }) { |
| 67 | Image($r('app.media.background_read_paper_home')) | 112 | Image($r('app.media.background_read_paper_home')) |
| @@ -83,8 +128,10 @@ export struct TopNavigationComponent { | @@ -83,8 +128,10 @@ export struct TopNavigationComponent { | ||
| 83 | .height(30) | 128 | .height(30) |
| 84 | .width(124) | 129 | .width(124) |
| 85 | .id('read') | 130 | .id('read') |
| 86 | - .alignRules({ right: { anchor: "__container__", align: HorizontalAlign.End }, | ||
| 87 | - center: { anchor: "__container__", align: VerticalAlign.Center } }) | 131 | + .alignRules({ |
| 132 | + right: { anchor: "__container__", align: HorizontalAlign.End }, | ||
| 133 | + center: { anchor: "__container__", align: VerticalAlign.Center } | ||
| 134 | + }) | ||
| 88 | .onClick((event: ClickEvent) => { | 135 | .onClick((event: ClickEvent) => { |
| 89 | 136 | ||
| 90 | let taskAction: Action = { | 137 | let taskAction: Action = { |
| @@ -100,26 +147,35 @@ export struct TopNavigationComponent { | @@ -100,26 +147,35 @@ export struct TopNavigationComponent { | ||
| 100 | .height(40) | 147 | .height(40) |
| 101 | .visibility(this._currentNavIndex == 0 ? Visibility.Visible : Visibility.None) | 148 | .visibility(this._currentNavIndex == 0 ? Visibility.Visible : Visibility.None) |
| 102 | 149 | ||
| 103 | - Tabs() { | ||
| 104 | - ForEach(this.topNavList, (navItem: TopNavDTO, index: number) => { | ||
| 105 | - TabContent() { | ||
| 106 | - PageComponent({ | ||
| 107 | - currentTopNavSelectedIndex: $currentTopNavSelectedIndex, | ||
| 108 | - navIndex: index, | ||
| 109 | - pageId: navItem.pageId + '', | ||
| 110 | - channelId: navItem.channelId + '' | ||
| 111 | - }) | ||
| 112 | - } | ||
| 113 | - .tabBar(this.tabBarBuilder(navItem, index)) | ||
| 114 | - }, (navItem: TopNavDTO) => JSON.stringify(navItem)); | 150 | + Stack({ alignContent: Alignment.TopEnd }) { |
| 151 | + | ||
| 152 | + Tabs() { | ||
| 153 | + ForEach(this.handledTopNavList, (navItem: TopNavDTO, index: number) => { | ||
| 154 | + TabContent() { | ||
| 155 | + PageComponent({ | ||
| 156 | + currentTopNavSelectedIndex: $currentTopNavSelectedIndex, | ||
| 157 | + navIndex: index, | ||
| 158 | + pageId: navItem.pageId + '', | ||
| 159 | + channelId: navItem.channelId + '' | ||
| 160 | + }) | ||
| 161 | + } | ||
| 162 | + .tabBar(this.tabBarBuilder(navItem, index)) | ||
| 163 | + }, (navItem: TopNavDTO) => JSON.stringify(navItem)); | ||
| 164 | + } | ||
| 165 | + .barHeight($r('app.float.top_tab_bar_height')) | ||
| 166 | + .barMode(BarMode.Scrollable) | ||
| 167 | + .vertical(false) | ||
| 168 | + .onChange((index: number) => { | ||
| 169 | + Logger.info(TAG, `onChange index : ${index}`); | ||
| 170 | + this.currentTopNavSelectedIndex = index; | ||
| 171 | + }) | ||
| 172 | + | ||
| 173 | + ChannelSubscriptionLayout({ | ||
| 174 | + topNavList: this.handledTopNavList, | ||
| 175 | + currentTopNavSelectedIndex: this.currentTopNavSelectedIndex | ||
| 176 | + }) | ||
| 115 | } | 177 | } |
| 116 | - .barHeight($r('app.float.top_tab_bar_height')) | ||
| 117 | - .barMode(BarMode.Scrollable) | ||
| 118 | - .vertical(false) | ||
| 119 | - .onChange((index: number) => { | ||
| 120 | - Logger.info(TAG, `onChange index : ${index}`); | ||
| 121 | - this.currentTopNavSelectedIndex = index; | ||
| 122 | - }) | 178 | + |
| 123 | } | 179 | } |
| 124 | } | 180 | } |
| 125 | 181 | ||
| @@ -144,6 +200,7 @@ export struct TopNavigationComponent { | @@ -144,6 +200,7 @@ export struct TopNavigationComponent { | ||
| 144 | minWidth: $r('app.float.top_tab_item_min_width'), | 200 | minWidth: $r('app.float.top_tab_item_min_width'), |
| 145 | maxWidth: $r('app.float.top_tab_item_max_width') | 201 | maxWidth: $r('app.float.top_tab_item_max_width') |
| 146 | }) | 202 | }) |
| 203 | + // .margin({ right: 36 }) | ||
| 147 | // .backgroundColor(Color.Black) | 204 | // .backgroundColor(Color.Black) |
| 148 | .padding({ | 205 | .padding({ |
| 149 | left: $r('app.float.top_tab_item_padding_horizontal'), | 206 | left: $r('app.float.top_tab_item_padding_horizontal'), |
| @@ -151,9 +208,11 @@ export struct TopNavigationComponent { | @@ -151,9 +208,11 @@ export struct TopNavigationComponent { | ||
| 151 | bottom: $r('app.float.top_tab_item_padding_bottom') | 208 | bottom: $r('app.float.top_tab_item_padding_bottom') |
| 152 | }) | 209 | }) |
| 153 | .id(`col_tabBar${index}`) | 210 | .id(`col_tabBar${index}`) |
| 211 | + | ||
| 154 | } | 212 | } |
| 155 | 213 | ||
| 156 | aboutToAppear() { | 214 | aboutToAppear() { |
| 215 | + this.topNavListHandle() | ||
| 157 | Logger.info(TAG, `aboutToAppear this.topNavList : ${JSON.stringify(this.topNavList)}`); | 216 | Logger.info(TAG, `aboutToAppear this.topNavList : ${JSON.stringify(this.topNavList)}`); |
| 158 | } | 217 | } |
| 159 | 218 |
| 1 | +import { MineAppointmentItem } from '../../viewmodel/MineAppointmentItem' | ||
| 2 | + | ||
| 3 | +@CustomDialog | ||
| 4 | +export struct MyCustomDialog { | ||
| 5 | + @State title: string = "标题" | ||
| 6 | + @State tipValue: string ="提示文字" | ||
| 7 | + | ||
| 8 | + @State leftText: string = "取消" | ||
| 9 | + @State rightText: string = "确认" | ||
| 10 | + | ||
| 11 | + controller: CustomDialogController | ||
| 12 | + cancel: () => void = () => { | ||
| 13 | + } | ||
| 14 | + confirm: () => void = () => { | ||
| 15 | + } | ||
| 16 | + | ||
| 17 | + build() { | ||
| 18 | + Column() { | ||
| 19 | + Text(this.title) | ||
| 20 | + .fontSize("32lpx") | ||
| 21 | + .margin({ top: "40lpx", bottom: "15lpx" }) | ||
| 22 | + .fontColor($r('app.color.color_333333')) | ||
| 23 | + .fontSize('35lpx') | ||
| 24 | + .fontWeight('600lpx') | ||
| 25 | + Text(this.tipValue) | ||
| 26 | + .margin({ bottom: "30lpx" }) | ||
| 27 | + .fontSize("27lpx") | ||
| 28 | + .fontColor($r('app.color.color_B0B0B0')) | ||
| 29 | + | ||
| 30 | + Divider() | ||
| 31 | + .width("100%") | ||
| 32 | + .strokeWidth('1lpx') | ||
| 33 | + .height('1lpx') | ||
| 34 | + .color($r('app.color.color_EEEEEE')) | ||
| 35 | + | ||
| 36 | + Row(){ | ||
| 37 | + Text(this.leftText) | ||
| 38 | + .fontSize('35lpx') | ||
| 39 | + .fontWeight('400lpx') | ||
| 40 | + .fontColor($r('app.color.color_333333')) | ||
| 41 | + .onClick(() => { | ||
| 42 | + this.controller.close() | ||
| 43 | + this.cancel() | ||
| 44 | + }).layoutWeight(1) | ||
| 45 | + .textAlign(TextAlign.Center) | ||
| 46 | + Divider() | ||
| 47 | + .width("1lpx") | ||
| 48 | + .strokeWidth('1lpx') | ||
| 49 | + .vertical(true) | ||
| 50 | + .height('92lpx') | ||
| 51 | + .color($r('app.color.color_EEEEEE')) | ||
| 52 | + | ||
| 53 | + Text(this.rightText) | ||
| 54 | + .fontSize('35lpx') | ||
| 55 | + .textAlign(TextAlign.Center) | ||
| 56 | + .fontWeight('400lpx') | ||
| 57 | + .fontColor($r('app.color.color_648DF2')) | ||
| 58 | + .onClick(() => { | ||
| 59 | + if (this.controller != undefined) { | ||
| 60 | + this.controller.close() | ||
| 61 | + this.confirm() | ||
| 62 | + } | ||
| 63 | + }).layoutWeight(1) | ||
| 64 | + } | ||
| 65 | + .alignItems(VerticalAlign.Center) | ||
| 66 | + .height('96lpx') | ||
| 67 | + }.borderRadius(10) | ||
| 68 | + } | ||
| 69 | +} |
| 1 | import { Params } from 'wdBean'; | 1 | import { Params } from 'wdBean'; |
| 2 | import { WDRouterPage, WDRouterRule } from 'wdRouter'; | 2 | import { WDRouterPage, WDRouterRule } from 'wdRouter'; |
| 3 | +import featureAbility from '@ohos.ability.featureAbility'; | ||
| 3 | 4 | ||
| 4 | const TAG = 'AboutPageUI'; | 5 | const TAG = 'AboutPageUI'; |
| 5 | 6 | ||
| @@ -7,7 +8,7 @@ const TAG = 'AboutPageUI'; | @@ -7,7 +8,7 @@ const TAG = 'AboutPageUI'; | ||
| 7 | export struct AboutPageUI { | 8 | export struct AboutPageUI { |
| 8 | @State listData: Array<string | Array<string>> = ['隐私授权协议', '软件许可及用户协议']; | 9 | @State listData: Array<string | Array<string>> = ['隐私授权协议', '软件许可及用户协议']; |
| 9 | @State message: string = '京ICP备16066560号-6A Copyright © 人民日报客户端\nall rights reserved.' | 10 | @State message: string = '京ICP备16066560号-6A Copyright © 人民日报客户端\nall rights reserved.' |
| 10 | - @State version: string = '版本号:v8.0.1.1' | 11 | + @State version: string = '版本号:v' |
| 11 | 12 | ||
| 12 | 13 | ||
| 13 | build() { | 14 | build() { |
| @@ -18,6 +19,11 @@ export struct AboutPageUI { | @@ -18,6 +19,11 @@ export struct AboutPageUI { | ||
| 18 | .title('关于') | 19 | .title('关于') |
| 19 | } | 20 | } |
| 20 | 21 | ||
| 22 | + aboutToAppear(){ | ||
| 23 | + let context = getContext(); | ||
| 24 | + context.getApplicationContext(); | ||
| 25 | + } | ||
| 26 | + | ||
| 21 | @Builder aboutUi() { | 27 | @Builder aboutUi() { |
| 22 | Column() { | 28 | Column() { |
| 23 | Image($r('app.media.setting_about_logo')) | 29 | Image($r('app.media.setting_about_logo')) |
| @@ -3,12 +3,14 @@ import { PermissionUtil } from 'wdKit' | @@ -3,12 +3,14 @@ import { PermissionUtil } from 'wdKit' | ||
| 3 | import { SPHelper } from 'wdKit' | 3 | import { SPHelper } from 'wdKit' |
| 4 | import hilog from '@ohos.hilog'; | 4 | import hilog from '@ohos.hilog'; |
| 5 | import { PrivacySettingModel } from '../../model/PrivacySettingModel' | 5 | import { PrivacySettingModel } from '../../model/PrivacySettingModel' |
| 6 | +import { Params } from 'wdBean'; | ||
| 7 | +import { WDRouterPage, WDRouterRule } from 'wdRouter'; | ||
| 6 | 8 | ||
| 7 | const TAG = 'PrivacySettingComponents'; | 9 | const TAG = 'PrivacySettingComponents'; |
| 8 | 10 | ||
| 9 | @Component | 11 | @Component |
| 10 | export struct PrivacySettingComponents { | 12 | export struct PrivacySettingComponents { |
| 11 | - @State listData: Array<PrivacySettingModel> = [new PrivacySettingModel('开启个性推荐', false, 'ohos.permission.READ_MEDIA'), new PrivacySettingModel('相册权限', false, 'ohos.permission.READ_MEDIA'), new PrivacySettingModel('相机权限', false, 'ohos.permission.CAMERA'), new PrivacySettingModel('定位权限', false, 'ohos.permission.LOCATION'), new PrivacySettingModel('麦克风权限', false, 'ohos.permission.MICROPHONE')]; | 13 | + @State listData: Array<PrivacySettingModel> = [new PrivacySettingModel('开启个性推荐', false, 'ohos.permission.READ_MEDIA'), new PrivacySettingModel('相册权限', false, 'ohos.permission.READ_MEDIA'), new PrivacySettingModel('相机权限', false, 'ohos.permission.CAMERA'), new PrivacySettingModel('定位权限', false, 'ohos.permission.APPROXIMATELY_LOCATION'), new PrivacySettingModel('麦克风权限', false, 'ohos.permission.MICROPHONE')]; |
| 12 | @State tips: string = '设置前可查阅' | 14 | @State tips: string = '设置前可查阅' |
| 13 | @State privacyTips: string = '《隐私政策》' | 15 | @State privacyTips: string = '《隐私政策》' |
| 14 | 16 | ||
| @@ -26,6 +28,7 @@ export struct PrivacySettingComponents { | @@ -26,6 +28,7 @@ export struct PrivacySettingComponents { | ||
| 26 | for (const element of this.listData) { | 28 | for (const element of this.listData) { |
| 27 | if (element.privacyName == '开启个性推荐') { | 29 | if (element.privacyName == '开启个性推荐') { |
| 28 | element.queryUserDetail(); | 30 | element.queryUserDetail(); |
| 31 | + // element.permission = true; | ||
| 29 | continue; | 32 | continue; |
| 30 | } | 33 | } |
| 31 | const result = await permissionUtil.checkPermissions(element.permissionKey); | 34 | const result = await permissionUtil.checkPermissions(element.permissionKey); |
| @@ -59,7 +62,9 @@ export struct PrivacySettingComponents { | @@ -59,7 +62,9 @@ export struct PrivacySettingComponents { | ||
| 59 | if (!item.permission) { | 62 | if (!item.permission) { |
| 60 | //跳转权限设置 | 63 | //跳转权限设置 |
| 61 | const permissionUtil = new PermissionUtil(); | 64 | const permissionUtil = new PermissionUtil(); |
| 62 | - PermissionUtil.reqPermissionsFromUser([item.permissionKey], this); | 65 | + PermissionUtil.reqPermissionsFromUser([item.permissionKey], this).then((res)=>{ |
| 66 | + item.permission = res; | ||
| 67 | + }); | ||
| 63 | } | 68 | } |
| 64 | } | 69 | } |
| 65 | }) | 70 | }) |
| @@ -82,6 +87,8 @@ export struct PrivacySettingComponents { | @@ -82,6 +87,8 @@ export struct PrivacySettingComponents { | ||
| 82 | .margin({ top: '46lpx' }) | 87 | .margin({ top: '46lpx' }) |
| 83 | .onClick(() => { | 88 | .onClick(() => { |
| 84 | //跳转隐私政策 | 89 | //跳转隐私政策 |
| 90 | + let bean={contentId:"2",pageID:""} as Params | ||
| 91 | + WDRouterRule.jumpWithPage(WDRouterPage.loginProtocolPage,bean) | ||
| 85 | }) | 92 | }) |
| 86 | } | 93 | } |
| 87 | 94 | ||
| @@ -150,6 +157,7 @@ struct getTuiJianCell { | @@ -150,6 +157,7 @@ struct getTuiJianCell { | ||
| 150 | // .selectedColor(Color.Pink) | 157 | // .selectedColor(Color.Pink) |
| 151 | .onChange((isOn: boolean) => { | 158 | .onChange((isOn: boolean) => { |
| 152 | // this.privacySwitch = isOn; | 159 | // this.privacySwitch = isOn; |
| 160 | + this.item.editUserDetail(isOn?'1':'0'); | ||
| 153 | }) | 161 | }) |
| 154 | } | 162 | } |
| 155 | 163 |
| 1 | import { Action, CompDTO, Params } from 'wdBean'; | 1 | import { Action, CompDTO, Params } from 'wdBean'; |
| 2 | +import { ExtraDTO } from 'wdBean/src/main/ets/bean/component/extra/ExtraDTO'; | ||
| 2 | import { DateTimeUtils, Logger } from 'wdKit'; | 3 | import { DateTimeUtils, Logger } from 'wdKit'; |
| 3 | import { WDRouterRule } from 'wdRouter'; | 4 | import { WDRouterRule } from 'wdRouter'; |
| 4 | 5 | ||
| @@ -10,7 +11,7 @@ export struct AlbumCardComponent { | @@ -10,7 +11,7 @@ export struct AlbumCardComponent { | ||
| 10 | @State compDTO: CompDTO = {} as CompDTO | 11 | @State compDTO: CompDTO = {} as CompDTO |
| 11 | 12 | ||
| 12 | aboutToAppear() { | 13 | aboutToAppear() { |
| 13 | - Logger.debug(TAG + "" + JSON.stringify(this.compDTO.operDataList)); | 14 | + Logger.debug(TAG + "this.compDTO.operDataList" + JSON.stringify(this.compDTO.operDataList)); |
| 14 | 15 | ||
| 15 | } | 16 | } |
| 16 | 17 | ||
| @@ -102,7 +103,12 @@ export struct AlbumCardComponent { | @@ -102,7 +103,12 @@ export struct AlbumCardComponent { | ||
| 102 | let taskAction: Action = { | 103 | let taskAction: Action = { |
| 103 | type: 'JUMP_DETAIL_PAGE', | 104 | type: 'JUMP_DETAIL_PAGE', |
| 104 | params: { | 105 | params: { |
| 105 | - detailPageType: 9 | 106 | + detailPageType: 17, |
| 107 | + contentID: this.compDTO.operDataList?.[0].objectId, | ||
| 108 | + extra: { | ||
| 109 | + relType: this.compDTO.operDataList?.[0].relType, | ||
| 110 | + relId: `${this.compDTO.operDataList?.[0].relId}`, | ||
| 111 | + } as ExtraDTO | ||
| 106 | } as Params, | 112 | } as Params, |
| 107 | }; | 113 | }; |
| 108 | WDRouterRule.jumpWithAction(taskAction) | 114 | WDRouterRule.jumpWithAction(taskAction) |
| 1 | +import { CompDTO, slideShows } from 'wdBean'; | ||
| 2 | +import { CommonConstants } from 'wdConstant' | ||
| 3 | +import { DateTimeUtils } from 'wdKit'; | ||
| 4 | +import { ProcessUtils } from '../../utils/ProcessUtils'; | ||
| 5 | +/** | ||
| 6 | + * 时间链卡--CompStyle: 09 | ||
| 7 | + */ | ||
| 8 | +@Component | ||
| 9 | +export struct CompStyle_09 { | ||
| 10 | + @State compDTO: CompDTO = {} as CompDTO | ||
| 11 | + | ||
| 12 | + build() { | ||
| 13 | + Column(){ | ||
| 14 | + // 顶部标题,最多两行 | ||
| 15 | + if(this.compDTO.operDataList[0].newsTitle) { | ||
| 16 | + Text(this.compDTO.operDataList[0].newsTitle) | ||
| 17 | + .width(CommonConstants.FULL_WIDTH) | ||
| 18 | + .fontSize($r('app.float.font_size_17')) | ||
| 19 | + .fontWeight(600) | ||
| 20 | + .maxLines(2) | ||
| 21 | + .textOverflow({overflow: TextOverflow.Ellipsis}) | ||
| 22 | + .margin({ bottom: 19 }) | ||
| 23 | + } | ||
| 24 | + // 大图 | ||
| 25 | + Image(this.compDTO.operDataList[0].coverUrl) | ||
| 26 | + .width('100%') | ||
| 27 | + // 时间线--后端返回三个, | ||
| 28 | + Column(){ | ||
| 29 | + ForEach(this.compDTO.operDataList[0].slideShows, (item:slideShows, index:number) => { | ||
| 30 | + this.timelineItem(item, index) | ||
| 31 | + }) | ||
| 32 | + } | ||
| 33 | + // 底部-查看更多。根据接口返回的isMore判断是否显示查看更多 | ||
| 34 | + if(this.compDTO.operDataList[0].hasMore == 1) { | ||
| 35 | + Row() { | ||
| 36 | + Text("查看更多") | ||
| 37 | + .fontSize($r("app.float.font_size_14")) | ||
| 38 | + .fontColor($r("app.color.color_222222")) | ||
| 39 | + .margin({ right: 1 }) | ||
| 40 | + Image($r("app.media.more")) | ||
| 41 | + .width(14) | ||
| 42 | + .height(14) | ||
| 43 | + } | ||
| 44 | + .backgroundColor($r('app.color.color_F5F5F5')) | ||
| 45 | + .width(CommonConstants.FULL_WIDTH) | ||
| 46 | + .height(40) | ||
| 47 | + .borderRadius(3) | ||
| 48 | + .justifyContent(FlexAlign.Center) | ||
| 49 | + .margin({top: 5}) | ||
| 50 | + } | ||
| 51 | + } | ||
| 52 | + .width(CommonConstants.FULL_WIDTH) | ||
| 53 | + .padding({ | ||
| 54 | + top: 14, | ||
| 55 | + left: 16, | ||
| 56 | + right: 16, | ||
| 57 | + bottom: 14 | ||
| 58 | + }) | ||
| 59 | + .backgroundColor($r("app.color.white")) | ||
| 60 | + .margin({ bottom: 8 }) | ||
| 61 | + .onClick((event: ClickEvent) => { | ||
| 62 | + ProcessUtils.processPage(this.compDTO?.operDataList[0]) | ||
| 63 | + }) | ||
| 64 | + } | ||
| 65 | + | ||
| 66 | + @Builder timelineItem (item:slideShows, index:number) { | ||
| 67 | + Column(){ | ||
| 68 | + Stack() { | ||
| 69 | + if(index < this.compDTO.operDataList[0].slideShows.length - 1) { | ||
| 70 | + Line() | ||
| 71 | + .width(1) | ||
| 72 | + .startPoint([4, index > 0 ? 0 : 20]) | ||
| 73 | + .endPoint([4, 100]) | ||
| 74 | + .stroke($r('app.color.color_EDEDED')) | ||
| 75 | + .strokeWidth(1) | ||
| 76 | + .strokeLineCap(LineCapStyle.Butt) | ||
| 77 | + } | ||
| 78 | + Column(){ | ||
| 79 | + Row() { | ||
| 80 | + // 标题 | ||
| 81 | + Image($r("app.media.point_icon")) | ||
| 82 | + .width(9) | ||
| 83 | + .height(6) | ||
| 84 | + .margin({ right: 5 }) | ||
| 85 | + Text(DateTimeUtils.formatDate(item.publishTime, "MM月dd日 HH:mm")) | ||
| 86 | + .fontSize($r('app.float.font_size_12')) | ||
| 87 | + .fontColor($r('app.color.color_222222')) | ||
| 88 | + .fontWeight(600) | ||
| 89 | + } | ||
| 90 | + .width(CommonConstants.FULL_WIDTH) | ||
| 91 | + .height(32) | ||
| 92 | + Row() { | ||
| 93 | + Text(item.newsTitle) | ||
| 94 | + .fontSize($r('app.float.font_size_17')) | ||
| 95 | + .fontWeight(400) | ||
| 96 | + .fontColor($r('app.color.color_222222')) | ||
| 97 | + .layoutWeight(1) | ||
| 98 | + .maxLines(2) | ||
| 99 | + .textOverflow({ overflow: TextOverflow.Ellipsis }) | ||
| 100 | + .alignSelf(ItemAlign.Center) | ||
| 101 | + .margin({left: 12}) | ||
| 102 | + if(item.fullColumnImgUrls[0] && item.fullColumnImgUrls[0].url) { | ||
| 103 | + Image(item.fullColumnImgUrls[0].url) | ||
| 104 | + .width(90) | ||
| 105 | + .height(60) | ||
| 106 | + .borderRadius(4) | ||
| 107 | + } | ||
| 108 | + } | ||
| 109 | + } | ||
| 110 | + } | ||
| 111 | + .alignContent(Alignment.Start) | ||
| 112 | + } | ||
| 113 | + .height(item.fullColumnImgUrls[0] && item.fullColumnImgUrls[0].url ? 100 : 78) | ||
| 114 | + } | ||
| 115 | +} |
| 1 | +import { CompDTO, slideShows } from 'wdBean'; | ||
| 2 | +import { CommonConstants } from 'wdConstant' | ||
| 3 | +import { DateTimeUtils } from 'wdKit'; | ||
| 4 | + | ||
| 5 | +/** | ||
| 6 | + * 大专题卡--CompStyle: 10 | ||
| 7 | + */ | ||
| 8 | +@Component | ||
| 9 | +export struct CompStyle_10 { | ||
| 10 | + @State compDTO: CompDTO = {} as CompDTO | ||
| 11 | + | ||
| 12 | + build() { | ||
| 13 | + Column(){ | ||
| 14 | + // 顶部标题,最多两行 | ||
| 15 | + if(this.compDTO.operDataList[0].newsTitle) { | ||
| 16 | + Text(this.compDTO.operDataList[0].newsTitle) | ||
| 17 | + .width(CommonConstants.FULL_WIDTH) | ||
| 18 | + .fontSize($r('app.float.font_size_17')) | ||
| 19 | + .fontWeight(600) | ||
| 20 | + .maxLines(2) | ||
| 21 | + .textOverflow({overflow: TextOverflow.Ellipsis}) | ||
| 22 | + .margin({ bottom: 19 }) | ||
| 23 | + } | ||
| 24 | + // 大图 | ||
| 25 | + Image(this.compDTO.operDataList[0] && this.compDTO.operDataList[0].coverUrl) | ||
| 26 | + .width('100%') | ||
| 27 | + // 专题列表--后端返回三个, | ||
| 28 | + Column(){ | ||
| 29 | + ForEach(this.compDTO.operDataList[0].slideShows, (item:slideShows, index:number) => { | ||
| 30 | + this.timelineItem(item, index) | ||
| 31 | + }) | ||
| 32 | + } | ||
| 33 | + // 底部-查看更多。根据接口返回的isMore判断是否显示查看更多 | ||
| 34 | + if(this.compDTO.operDataList[0].hasMore == 1) { | ||
| 35 | + Row() { | ||
| 36 | + Text("查看更多") | ||
| 37 | + .fontSize($r("app.float.font_size_14")) | ||
| 38 | + .fontColor($r("app.color.color_222222")) | ||
| 39 | + .margin({ right: 1 }) | ||
| 40 | + Image($r("app.media.more")) | ||
| 41 | + .width(14) | ||
| 42 | + .height(14) | ||
| 43 | + } | ||
| 44 | + .backgroundColor($r('app.color.color_F5F5F5')) | ||
| 45 | + .width(CommonConstants.FULL_WIDTH) | ||
| 46 | + .height(40) | ||
| 47 | + .borderRadius(3) | ||
| 48 | + .justifyContent(FlexAlign.Center) | ||
| 49 | + .margin({top: 5}) | ||
| 50 | + .onClick(() => { | ||
| 51 | + // TODO | ||
| 52 | + console.log('跳转到查看更多的页面') | ||
| 53 | + }) | ||
| 54 | + } | ||
| 55 | + } | ||
| 56 | + .width(CommonConstants.FULL_WIDTH) | ||
| 57 | + .padding({ | ||
| 58 | + top: 14, | ||
| 59 | + left: 16, | ||
| 60 | + right: 16, | ||
| 61 | + bottom: 14 | ||
| 62 | + }) | ||
| 63 | + .backgroundColor($r("app.color.white")) | ||
| 64 | + .margin({ bottom: 8 }) | ||
| 65 | + } | ||
| 66 | + | ||
| 67 | + @Builder timelineItem (item:slideShows, index:number) { | ||
| 68 | + Column(){ | ||
| 69 | + Row() { | ||
| 70 | + Column(){ | ||
| 71 | + Text(item.newsTitle) | ||
| 72 | + .fontSize($r('app.float.font_size_17')) | ||
| 73 | + .fontWeight(400) | ||
| 74 | + .fontColor($r('app.color.color_222222')) | ||
| 75 | + .maxLines(2) | ||
| 76 | + .textOverflow({ overflow: TextOverflow.Ellipsis }) | ||
| 77 | + Row(){ | ||
| 78 | + // 展示发稿人 | ||
| 79 | + if(item.source) { | ||
| 80 | + Text(item.source) | ||
| 81 | + .fontSize($r('app.float.font_size_12')) | ||
| 82 | + .fontColor($r('app.color.color_B0B0B0')) | ||
| 83 | + .textOverflow({overflow: TextOverflow.Ellipsis}) | ||
| 84 | + .maxLines(1) | ||
| 85 | + .width(item.source.length > 10 ? '60%' : '') | ||
| 86 | + | ||
| 87 | + Image($r('app.media.point')) | ||
| 88 | + .width(16) | ||
| 89 | + .height(16) | ||
| 90 | + } | ||
| 91 | + Text(DateTimeUtils.getCommentTime(Number.parseFloat(String(item.publishTime)))) | ||
| 92 | + .fontSize($r("app.float.font_size_12")) | ||
| 93 | + .fontColor($r("app.color.color_B0B0B0")) | ||
| 94 | + } | ||
| 95 | + .margin({top: 12}) | ||
| 96 | + } | ||
| 97 | + .layoutWeight(1) | ||
| 98 | + .alignItems(HorizontalAlign.Start) | ||
| 99 | + | ||
| 100 | + // 右侧图片 | ||
| 101 | + if(item.fullColumnImgUrls[0] && item.fullColumnImgUrls[0].url) { | ||
| 102 | + Image(item.fullColumnImgUrls[0].url) | ||
| 103 | + .width(117) | ||
| 104 | + .height(78) | ||
| 105 | + .objectFit(ImageFit.Cover) | ||
| 106 | + .borderRadius(4) | ||
| 107 | + .margin({left: 12}) | ||
| 108 | + } | ||
| 109 | + } | ||
| 110 | + .padding({top: 10, bottom: 10}) | ||
| 111 | + } | ||
| 112 | + } | ||
| 113 | +} |
| @@ -93,6 +93,25 @@ export struct SingleImageCardComponent { | @@ -93,6 +93,25 @@ export struct SingleImageCardComponent { | ||
| 93 | bottom: 4 | 93 | bottom: 4 |
| 94 | }) | 94 | }) |
| 95 | .backgroundColor($r('app.color.color_4d000000')) | 95 | .backgroundColor($r('app.color.color_4d000000')) |
| 96 | + } else if(this.compDTO.operDataList[0].voiceInfo) { | ||
| 97 | + Row() { | ||
| 98 | + Image($r('app.media.icon_listen')) | ||
| 99 | + .width(22) | ||
| 100 | + .height(18) | ||
| 101 | + Text(DateTimeUtils.getFormattedDuration(this.compDTO.operDataList[0].voiceInfo | ||
| 102 | + .voiceDuration * 1000)) | ||
| 103 | + .fontSize($r('app.float.font_size_13')) | ||
| 104 | + .fontWeight(400) | ||
| 105 | + .fontColor($r('app.color.color_fff')) | ||
| 106 | + } | ||
| 107 | + .alignItems(VerticalAlign.Bottom) | ||
| 108 | + .height(18) | ||
| 109 | + .padding({ right: 4 }) | ||
| 110 | + .margin({ | ||
| 111 | + right: 4, | ||
| 112 | + bottom: 4 | ||
| 113 | + }) | ||
| 114 | + .backgroundColor($r('app.color.color_4d000000')) | ||
| 96 | } | 115 | } |
| 97 | }.alignContent(Alignment.BottomEnd) | 116 | }.alignContent(Alignment.BottomEnd) |
| 98 | } | 117 | } |
| @@ -67,6 +67,9 @@ export struct ZhSingleRow04 { | @@ -67,6 +67,9 @@ export struct ZhSingleRow04 { | ||
| 67 | Text(item.source) | 67 | Text(item.source) |
| 68 | .fontSize($r('app.float.font_size_12')) | 68 | .fontSize($r('app.float.font_size_12')) |
| 69 | .fontColor($r('app.color.color_B0B0B0')) | 69 | .fontColor($r('app.color.color_B0B0B0')) |
| 70 | + .textOverflow({overflow: TextOverflow.Ellipsis}) | ||
| 71 | + .maxLines(1) | ||
| 72 | + .width(item.source.length > 10 ? '60%' : '') | ||
| 70 | Image($r("app.media.point")) | 73 | Image($r("app.media.point")) |
| 71 | .width(16) | 74 | .width(16) |
| 72 | .height(16) | 75 | .height(16) |
| 1 | +import { AreaListManageModel, AreaListModel } from '../../../model/AreaListModel'; | ||
| 2 | +import EditInfoViewModel from '../../../viewmodel/EditInfoViewModel'; | ||
| 3 | +import { FirstLevelComponent } from './FirstLevelComponent'; | ||
| 4 | +import { SecondLevelComponent } from './SecondLevelComponent'; | ||
| 5 | +import { ThirdLevelComponent } from './ThirdLevelComponent'; | ||
| 6 | +@CustomDialog | ||
| 7 | +export struct AreaPickerDialog { | ||
| 8 | + @Provide currentFirst: AreaListManageModel = new AreaListManageModel('','','',[]) | ||
| 9 | + @Provide currentSecondBean: AreaListManageModel = new AreaListManageModel('','','',[]) | ||
| 10 | + @Provide currentThirdBean: AreaListManageModel = new AreaListManageModel('','','',[]) | ||
| 11 | + controller: CustomDialogController | ||
| 12 | + title: string = '地区选择' | ||
| 13 | + @Provide dataSource: AreaListModel[] = [] | ||
| 14 | + result: JSON[] = []; | ||
| 15 | + | ||
| 16 | + aboutToAppear(){ | ||
| 17 | + this.currentFirst = EditInfoViewModel.getAreaListManageModel(this.dataSource[0]) | ||
| 18 | + this.currentSecondBean = EditInfoViewModel.getAreaListManageModel(this.dataSource[0].children[0]) | ||
| 19 | + this.currentThirdBean = EditInfoViewModel.getAreaListManageModel(this.dataSource[0].children[0].children[0]) | ||
| 20 | + } | ||
| 21 | + | ||
| 22 | + build() { | ||
| 23 | + Column(){ | ||
| 24 | + Row(){ | ||
| 25 | + Button('取消',{type:ButtonType.Normal}) | ||
| 26 | + .onClick(()=> { | ||
| 27 | + this.controller.close() | ||
| 28 | + }) | ||
| 29 | + .backgroundColor(0xffffff) | ||
| 30 | + .fontColor(Color.Black) | ||
| 31 | + .layoutWeight(1) | ||
| 32 | + | ||
| 33 | + Blank() | ||
| 34 | + | ||
| 35 | + Text(this.title) | ||
| 36 | + .fontSize(18).textAlign(TextAlign.Center).margin({top:10,bottom:10}) | ||
| 37 | + | ||
| 38 | + Blank() | ||
| 39 | + | ||
| 40 | + Button('确定',{type:ButtonType.Normal}) | ||
| 41 | + .onClick(()=> { | ||
| 42 | + | ||
| 43 | + }) | ||
| 44 | + .backgroundColor(0xffffff) | ||
| 45 | + .fontColor(Color.Blue) | ||
| 46 | + .layoutWeight(1) | ||
| 47 | + } | ||
| 48 | + .margin({top:0,bottom:10}) | ||
| 49 | + | ||
| 50 | + Row(){ | ||
| 51 | + FirstLevelComponent().width('30%') | ||
| 52 | + SecondLevelComponent().width('30%') | ||
| 53 | + ThirdLevelComponent().width('30%') | ||
| 54 | + } | ||
| 55 | + } | ||
| 56 | + .height('40%') | ||
| 57 | + | ||
| 58 | + } | ||
| 59 | +} |
| 1 | +import { AreaListManageModel, AreaListModel } from '../../../model/AreaListModel'; | ||
| 2 | +import EditInfoViewModel from '../../../viewmodel/EditInfoViewModel'; | ||
| 3 | +@Component | ||
| 4 | +export struct FirstLevelComponent { | ||
| 5 | + @State labelList :string[] = []; | ||
| 6 | + @State select: number = 0; | ||
| 7 | + @Consume currentFirst: AreaListManageModel | ||
| 8 | + @Consume dataSource: AreaListModel[] | ||
| 9 | + | ||
| 10 | + aboutToAppear(){ | ||
| 11 | + for (let index = 0; index < this.dataSource.length; index++) { | ||
| 12 | + const element = this.dataSource[index]; | ||
| 13 | + this.labelList.push(element.label) | ||
| 14 | + } | ||
| 15 | + } | ||
| 16 | + | ||
| 17 | + build() { | ||
| 18 | + Column(){ | ||
| 19 | + Column(){ | ||
| 20 | + if (this.labelList.length === 0){ | ||
| 21 | + Text('暂无数据').fontSize(20) | ||
| 22 | + }else { | ||
| 23 | + TextPicker({range:this.labelList,selected:this.select}) | ||
| 24 | + // .onChange((value:string,index:number) => { | ||
| 25 | + // this.select = index | ||
| 26 | + // this.currentFirst = EditInfoViewModel.getAreaListManageModel(this.dataSource[index]) | ||
| 27 | + // }) | ||
| 28 | + .backgroundColor(Color.White) | ||
| 29 | + .border({color:'#e2e2e2',width:{right:0.5}}) | ||
| 30 | + .width('100%') | ||
| 31 | + .layoutWeight(1) | ||
| 32 | + } | ||
| 33 | + } | ||
| 34 | + .justifyContent(FlexAlign.Center) | ||
| 35 | + } | ||
| 36 | + .height('100%') | ||
| 37 | + | ||
| 38 | + } | ||
| 39 | +} |
| 1 | +import { AreaListManageModel, AreaListModel } from '../../../model/AreaListModel'; | ||
| 2 | + | ||
| 3 | +@Component | ||
| 4 | +export struct SecondLevelComponent { | ||
| 5 | + @State mTip: string = '暂无数据' | ||
| 6 | + @State labelList: string[] = []; | ||
| 7 | + @State select: number = 0; | ||
| 8 | + @Consume @Watch('onFirstChange') currentFirst: AreaListManageModel; | ||
| 9 | + @Consume currentSecondBean: AreaListManageModel | ||
| 10 | + | ||
| 11 | + aboutToAppear(){ | ||
| 12 | + for (let index = 0; index < this.currentFirst.children.length; index++) { | ||
| 13 | + const element = this.currentFirst.children[index]; | ||
| 14 | + this.labelList.push(element.label) | ||
| 15 | + } | ||
| 16 | + } | ||
| 17 | + | ||
| 18 | + build() { | ||
| 19 | + Column(){ | ||
| 20 | + Column(){ | ||
| 21 | + if (this.labelList.length === 0){ | ||
| 22 | + Text(this.mTip).fontSize(20) | ||
| 23 | + }else { | ||
| 24 | + TextPicker({range:this.labelList,selected:this.select}) | ||
| 25 | + // .onChange((value:string,index:number) => { | ||
| 26 | + // this.select = index | ||
| 27 | + // this.currentSecondBean = this.currentFirst.children[index] | ||
| 28 | + // }) | ||
| 29 | + .backgroundColor(Color.White) | ||
| 30 | + .border({color:'#e2e2e2',width:{right:0.5}}) | ||
| 31 | + .width('100%') | ||
| 32 | + .layoutWeight(1) | ||
| 33 | + } | ||
| 34 | + } | ||
| 35 | + .justifyContent(FlexAlign.Center) | ||
| 36 | + } | ||
| 37 | + .height('100%') | ||
| 38 | + | ||
| 39 | + } | ||
| 40 | + | ||
| 41 | + onFirstChange(){ | ||
| 42 | + if (!this.currentFirst) { | ||
| 43 | + this.mTip = '暂无数据'; | ||
| 44 | + } else { | ||
| 45 | + this.labelList = [] | ||
| 46 | + for (let index = 0; index < this.currentFirst.children.length; index++) { | ||
| 47 | + const element = this.currentFirst.children[index]; | ||
| 48 | + this.labelList.push(element.label) | ||
| 49 | + } | ||
| 50 | + // this.currentSecondBean = this.currentFirst.children[this.select] | ||
| 51 | + } | ||
| 52 | + } | ||
| 53 | +} |
| 1 | +import { AreaListManageModel, AreaListModel } from '../../../model/AreaListModel'; | ||
| 2 | + | ||
| 3 | +@Component | ||
| 4 | +export struct ThirdLevelComponent { | ||
| 5 | + @State mTip: string = '暂无数据' | ||
| 6 | + @State labelList: string[] = []; | ||
| 7 | + @State select: number = 0; | ||
| 8 | + @Consume @Watch('onFirstChange') currentFirst: AreaListManageModel; | ||
| 9 | + @Consume @Watch('onSecondChange') currentSecondBean: AreaListManageModel; | ||
| 10 | + @Consume currentThirdBean: AreaListManageModel | ||
| 11 | + | ||
| 12 | + aboutToAppear(){ | ||
| 13 | + for (let index = 0; index < this.currentSecondBean.children.length; index++) { | ||
| 14 | + const element = this.currentSecondBean.children[index]; | ||
| 15 | + this.labelList.push(element.label) | ||
| 16 | + } | ||
| 17 | + } | ||
| 18 | + | ||
| 19 | + build() { | ||
| 20 | + Column(){ | ||
| 21 | + Column(){ | ||
| 22 | + if (this.labelList.length === 0){ | ||
| 23 | + Text(this.mTip).fontSize(20) | ||
| 24 | + }else { | ||
| 25 | + TextPicker({range:this.labelList,selected:this.select}) | ||
| 26 | + // .onChange((value:string,index:number) => { | ||
| 27 | + // this.select = index | ||
| 28 | + // this.currentThirdBean = this.currentSecondBean.children[index] | ||
| 29 | + // }) | ||
| 30 | + .backgroundColor(Color.White) | ||
| 31 | + .border({color:'#e2e2e2',width:{right:0.5}}) | ||
| 32 | + .width('100%') | ||
| 33 | + .layoutWeight(1) | ||
| 34 | + } | ||
| 35 | + } | ||
| 36 | + .justifyContent(FlexAlign.Center) | ||
| 37 | + } | ||
| 38 | + .height('100%') | ||
| 39 | + | ||
| 40 | + } | ||
| 41 | + | ||
| 42 | + onFirstChange(){ | ||
| 43 | + | ||
| 44 | + } | ||
| 45 | + | ||
| 46 | + onSecondChange(){ | ||
| 47 | + if (!this.currentSecondBean) { | ||
| 48 | + this.mTip = '暂无数据'; | ||
| 49 | + } else { | ||
| 50 | + this.labelList = [] | ||
| 51 | + for (let index = 0; index < this.currentSecondBean.children.length; index++) { | ||
| 52 | + const element = this.currentSecondBean.children[index]; | ||
| 53 | + this.labelList.push(element.label) | ||
| 54 | + } | ||
| 55 | + // this.currentThirdBean = this.currentSecondBean.children[this.select] | ||
| 56 | + } | ||
| 57 | + } | ||
| 58 | +} |
| @@ -9,7 +9,15 @@ export class ContentConstants { | @@ -9,7 +9,15 @@ export class ContentConstants { | ||
| 9 | */ | 9 | */ |
| 10 | static readonly TYPE_VOD: string = "1"; | 10 | static readonly TYPE_VOD: string = "1"; |
| 11 | /** | 11 | /** |
| 12 | + * 5:专题详情 | ||
| 13 | + */ | ||
| 14 | + static readonly TYPE_SPECIAL_TOPIC: string = "5"; | ||
| 15 | + /** | ||
| 12 | * 8:图文详情,这里是h5页面 | 16 | * 8:图文详情,这里是h5页面 |
| 13 | */ | 17 | */ |
| 14 | static readonly TYPE_TELETEXT: string = "8"; | 18 | static readonly TYPE_TELETEXT: string = "8"; |
| 19 | + /** | ||
| 20 | + * 13:音频详情 | ||
| 21 | + */ | ||
| 22 | + static readonly TYPE_AUDIO: string = "13"; | ||
| 15 | } | 23 | } |
| 1 | /** | 1 | /** |
| 2 | * 简易音频对话框 | 2 | * 简易音频对话框 |
| 3 | * */ | 3 | * */ |
| 4 | +import { PlayerConstants, WDPlayerController } from 'wdPlayer/Index' | ||
| 5 | + | ||
| 4 | @CustomDialog | 6 | @CustomDialog |
| 5 | export struct PaperReaderSimpleDialog { | 7 | export struct PaperReaderSimpleDialog { |
| 6 | - private controllerSimple?: CustomDialogController; | 8 | + cancel: () => void = () => { |
| 9 | + } | ||
| 10 | + confirm: () => void = () => { | ||
| 11 | + } | ||
| 12 | + playerController: WDPlayerController = new WDPlayerController() | ||
| 13 | + paperReaderDialog: CustomDialogController = new CustomDialogController({ | ||
| 14 | + builder: PaperReaderDialog({ | ||
| 15 | + onCancel: this.cancel, | ||
| 16 | + onConfirm: this.confirm, | ||
| 17 | + playerController: this.playerController | ||
| 18 | + }), | ||
| 19 | + autoCancel: false, | ||
| 20 | + customStyle: true, | ||
| 21 | + | ||
| 22 | + alignment: DialogAlignment.CenterStart, | ||
| 23 | + offset: { dx: 12, dy: -150 } | ||
| 24 | + }) | ||
| 25 | + controllerSimple?: CustomDialogController // // 若尝试在CustomDialog中传入多个其他的Controller,以实现在CustomDialog中打开另一个或另一些CustomDialog,那么此处需要将指向自己的controller放在所有controller的后面 | ||
| 7 | 26 | ||
| 8 | build() { | 27 | build() { |
| 9 | Row() { | 28 | Row() { |
| @@ -19,6 +38,18 @@ export struct PaperReaderSimpleDialog { | @@ -19,6 +38,18 @@ export struct PaperReaderSimpleDialog { | ||
| 19 | .onClick(() => { | 38 | .onClick(() => { |
| 20 | if (this.controllerSimple) { | 39 | if (this.controllerSimple) { |
| 21 | this.controllerSimple.close() | 40 | this.controllerSimple.close() |
| 41 | + this.paperReaderDialog.open() | ||
| 42 | + if (this.paperReaderDialog) { | ||
| 43 | + setTimeout(() => { | ||
| 44 | + console.log('PaperReaderSimpleDialog delay 1s'); | ||
| 45 | + if (this.paperReaderDialog != undefined) { | ||
| 46 | + this.paperReaderDialog.close() | ||
| 47 | + } | ||
| 48 | + if (this.controllerSimple != undefined) { | ||
| 49 | + this.controllerSimple.open() | ||
| 50 | + } | ||
| 51 | + }, 500000); | ||
| 52 | + } | ||
| 22 | } | 53 | } |
| 23 | 54 | ||
| 24 | }) | 55 | }) |
| @@ -31,23 +62,34 @@ export struct PaperReaderSimpleDialog { | @@ -31,23 +62,34 @@ export struct PaperReaderSimpleDialog { | ||
| 31 | * */ | 62 | * */ |
| 32 | @CustomDialog | 63 | @CustomDialog |
| 33 | export struct PaperReaderDialog { | 64 | export struct PaperReaderDialog { |
| 65 | + @Consume audioTitle: string; | ||
| 66 | + @Consume currentTime: string; | ||
| 67 | + @Consume totalTime: string; | ||
| 68 | + @Consume progressVal: number; | ||
| 69 | + @State currentStatus: number = 0; | ||
| 70 | + playerController: WDPlayerController = new WDPlayerController() | ||
| 34 | controllerDetail?: CustomDialogController | 71 | controllerDetail?: CustomDialogController |
| 72 | + onCancel: () => void = () => { | ||
| 73 | + } | ||
| 74 | + onConfirm: () => void = () => { | ||
| 75 | + } | ||
| 35 | 76 | ||
| 36 | build() { | 77 | build() { |
| 37 | - Stack() { | 78 | + Stack({ alignContent: Alignment.End }) { |
| 38 | Column() { //标题 时间 进度条 | 79 | Column() { //标题 时间 进度条 |
| 39 | Marquee({ | 80 | Marquee({ |
| 40 | start: true, | 81 | start: true, |
| 41 | - step: 50, | 82 | + step: 5, |
| 42 | loop: Number.POSITIVE_INFINITY, | 83 | loop: Number.POSITIVE_INFINITY, |
| 43 | fromStart: true, | 84 | fromStart: true, |
| 44 | - src: "Running Marquee starts rolling" | 85 | + src: this.audioTitle |
| 45 | }) | 86 | }) |
| 46 | .width("60%") | 87 | .width("60%") |
| 47 | .height(20) | 88 | .height(20) |
| 48 | .fontColor($r("app.color.color_222222")) | 89 | .fontColor($r("app.color.color_222222")) |
| 49 | .fontSize(14) | 90 | .fontSize(14) |
| 50 | - .margin({ top: 10 }) | 91 | + .margin({ top: 10, left: 10 }) |
| 92 | + .alignSelf(ItemAlign.Start) | ||
| 51 | .onStart(() => { | 93 | .onStart(() => { |
| 52 | console.info('Marquee animation complete onStart') | 94 | console.info('Marquee animation complete onStart') |
| 53 | }) | 95 | }) |
| @@ -59,48 +101,66 @@ export struct PaperReaderDialog { | @@ -59,48 +101,66 @@ export struct PaperReaderDialog { | ||
| 59 | }) | 101 | }) |
| 60 | 102 | ||
| 61 | Row() { | 103 | Row() { |
| 62 | - Text("00:00") | 104 | + Text(this.currentTime) |
| 63 | .fontSize($r('app.float.font_size_12')) | 105 | .fontSize($r('app.float.font_size_12')) |
| 64 | .fontColor($r('app.color.color_999999')) | 106 | .fontColor($r('app.color.color_999999')) |
| 65 | - .width("49%") | ||
| 66 | .height("100%") | 107 | .height("100%") |
| 67 | - Text("/00:00") | 108 | + .alignSelf(ItemAlign.Start) |
| 109 | + Text("/" + this.totalTime) | ||
| 68 | .fontSize($r('app.float.font_size_12')) | 110 | .fontSize($r('app.float.font_size_12')) |
| 69 | .fontColor($r('app.color.color_999999')) | 111 | .fontColor($r('app.color.color_999999')) |
| 70 | - .width("51%") | ||
| 71 | .height("100%") | 112 | .height("100%") |
| 113 | + .alignSelf(ItemAlign.Start) | ||
| 72 | 114 | ||
| 73 | } | 115 | } |
| 74 | .width("100%") | 116 | .width("100%") |
| 75 | .height(16) | 117 | .height(16) |
| 76 | - .margin({ top: 4 }) | 118 | + .margin({ top: 4, left: 10 }) |
| 119 | + | ||
| 120 | + Progress({ value: this.progressVal, total: 100, type: ProgressType.Capsule }) | ||
| 121 | + .color($r('app.color.color_ED2800')) | ||
| 122 | + .backgroundColor($r('app.color.white')) | ||
| 123 | + .width("100%") | ||
| 124 | + .height(3) | ||
| 125 | + .margin({ top: 7 }) | ||
| 77 | } | 126 | } |
| 78 | .width("100%") | 127 | .width("100%") |
| 79 | .height("100%") | 128 | .height("100%") |
| 129 | + .justifyContent(FlexAlign.Start) | ||
| 80 | 130 | ||
| 81 | - Progress({ value: 0, total: 100, type: ProgressType.Linear }) | ||
| 82 | - .color($r('app.color.color_ED2800')) | ||
| 83 | - .width("100%") | ||
| 84 | - .height(3) | 131 | + Row() { |
| 132 | + Image(this.currentStatus != PlayerConstants.STATUS_START ? $r("app.media.icon_audio_pause") : $r("app.media.icon_audio_playing")) | ||
| 133 | + .objectFit(ImageFit.Contain) | ||
| 134 | + .width(24) | ||
| 135 | + .height(24) | ||
| 136 | + .margin({ right: 12 }) | ||
| 137 | + .onClick(() => { | ||
| 138 | + if (this.playerController) { | ||
| 139 | + // this.onConfirm() | ||
| 140 | + this.playerController.switchPlayOrPause() | ||
| 141 | + this.currentStatus = this.playerController.getStatus() | ||
| 142 | + } | ||
| 143 | + }) | ||
| 85 | 144 | ||
| 86 | - Image($r("app.media.icon_audio_pause")) | ||
| 87 | - .objectFit(ImageFit.Auto) | ||
| 88 | - .align(Alignment.End) | ||
| 89 | - .margin({ right: 12 }) | 145 | + Image($r("app.media.icon_audio_close")) |
| 146 | + .objectFit(ImageFit.Contain) | ||
| 147 | + .width(24) | ||
| 148 | + .height(24) | ||
| 149 | + .onClick(() => { | ||
| 150 | + if (this.playerController) { | ||
| 151 | + this.playerController.stop() | ||
| 152 | + } | ||
| 153 | + if (this.controllerDetail) { | ||
| 154 | + this.controllerDetail.close() | ||
| 155 | + } | ||
| 156 | + }) | ||
| 157 | + }.width(80) | ||
| 158 | + .height(60) | ||
| 90 | 159 | ||
| 91 | - Image($r("app.media.icon_audio_close")) | ||
| 92 | - .objectFit(ImageFit.Auto) | ||
| 93 | - .align(Alignment.End) | ||
| 94 | - .margin({ right: 48 }) | ||
| 95 | - .onClick(() => { | ||
| 96 | - if (this.controllerDetail) { | ||
| 97 | - this.controllerDetail.close() | ||
| 98 | - } | ||
| 99 | - }) | ||
| 100 | } | 160 | } |
| 101 | .width("65%") | 161 | .width("65%") |
| 102 | .height(60) | 162 | .height(60) |
| 103 | .backgroundColor(Color.White) | 163 | .backgroundColor(Color.White) |
| 104 | - .borderRadius(5) | 164 | + .borderRadius(2) |
| 105 | } | 165 | } |
| 106 | } | 166 | } |
| 1 | + | ||
| 2 | + | ||
| 3 | + | ||
| 4 | +export interface AreaListModel{ | ||
| 5 | + | ||
| 6 | + code: string | ||
| 7 | + | ||
| 8 | + id: string | ||
| 9 | + | ||
| 10 | + label: string | ||
| 11 | + | ||
| 12 | + children: AreaListModel[] | ||
| 13 | + | ||
| 14 | + | ||
| 15 | +} | ||
| 16 | + | ||
| 17 | +export class AreaListManageModel{ | ||
| 18 | + | ||
| 19 | + code: string = '' | ||
| 20 | + | ||
| 21 | + id: string = '' | ||
| 22 | + | ||
| 23 | + label: string = '' | ||
| 24 | + | ||
| 25 | + children: AreaListModel[] = [] | ||
| 26 | + | ||
| 27 | + constructor(code:string , id:string,label:string, children:AreaListModel[]) { | ||
| 28 | + this.code = code; | ||
| 29 | + this.id = id | ||
| 30 | + this.label = label; | ||
| 31 | + this.children = children | ||
| 32 | + } | ||
| 33 | + | ||
| 34 | +} |
| @@ -23,7 +23,10 @@ export interface EditInfoModel{ | @@ -23,7 +23,10 @@ export interface EditInfoModel{ | ||
| 23 | //生日 | 23 | //生日 |
| 24 | birthday:string | 24 | birthday:string |
| 25 | //性别 | 25 | //性别 |
| 26 | - sex:string | 26 | + sex:number |
| 27 | + | ||
| 28 | + airec:number | ||
| 29 | + | ||
| 27 | } | 30 | } |
| 28 | 31 | ||
| 29 | export interface editModel{ | 32 | export interface editModel{ |
| @@ -20,6 +20,9 @@ import { OtherUserCommentListRequestItem } from '../viewmodel/OtherUserCommentLi | @@ -20,6 +20,9 @@ import { OtherUserCommentListRequestItem } from '../viewmodel/OtherUserCommentLi | ||
| 20 | import { OtherUserCommentLikeStatusRequestItem } from '../viewmodel/OtherUserCommentLikeStatusRequestItem'; | 20 | import { OtherUserCommentLikeStatusRequestItem } from '../viewmodel/OtherUserCommentLikeStatusRequestItem'; |
| 21 | import { QueryCommentListIsLikedItem } from '../viewmodel/QueryCommentListIsLikedItem'; | 21 | import { QueryCommentListIsLikedItem } from '../viewmodel/QueryCommentListIsLikedItem'; |
| 22 | import { UserFollowListRequestItem } from '../viewmodel/UserFollowListRequestItem'; | 22 | import { UserFollowListRequestItem } from '../viewmodel/UserFollowListRequestItem'; |
| 23 | +import { AppointmentOperationRequestItem } from '../viewmodel/AppointmentOperationRequestItem'; | ||
| 24 | +import { CommentLikeOperationRequestItem } from '../viewmodel/CommentLikeOperationRequestItem'; | ||
| 25 | +import { FollowOperationRequestItem } from '../viewmodel/FollowOperationRequestItem'; | ||
| 23 | 26 | ||
| 24 | const TAG = "MinePageDatasModel" | 27 | const TAG = "MinePageDatasModel" |
| 25 | 28 | ||
| @@ -106,7 +109,7 @@ class MinePageDatasModel{ | @@ -106,7 +109,7 @@ class MinePageDatasModel{ | ||
| 106 | */ | 109 | */ |
| 107 | fetchAppointmentListData(pageSize:string,pageNum:string) { | 110 | fetchAppointmentListData(pageSize:string,pageNum:string) { |
| 108 | let url = HttpUrlUtils.getAppointmentListDataUrl()+ `?pageSize=${pageSize}&pageNum=${pageNum}` | 111 | let url = HttpUrlUtils.getAppointmentListDataUrl()+ `?pageSize=${pageSize}&pageNum=${pageNum}` |
| 109 | - let headers: HashMap<string, string> = HttpUrlUtils.getYcgCommonHeaders(); | 112 | + let headers: HashMap<string, string> = HttpUrlUtils.getCommonHeaders(); |
| 110 | return WDHttp.get<ResponseDTO<MineAppointmentListItem>>(url, headers) | 113 | return WDHttp.get<ResponseDTO<MineAppointmentListItem>>(url, headers) |
| 111 | }; | 114 | }; |
| 112 | 115 | ||
| @@ -177,7 +180,7 @@ class MinePageDatasModel{ | @@ -177,7 +180,7 @@ class MinePageDatasModel{ | ||
| 177 | 180 | ||
| 178 | fetchFollowListDetailData(object:FollowListDetailRequestItem) { | 181 | fetchFollowListDetailData(object:FollowListDetailRequestItem) { |
| 179 | let url = HttpUrlUtils.getFollowListDetailDataUrl() | 182 | let url = HttpUrlUtils.getFollowListDetailDataUrl() |
| 180 | - let headers: HashMap<string, string> = HttpUrlUtils.getYcgCommonHeaders(); | 183 | + let headers: HashMap<string, string> = HttpUrlUtils.getCommonHeaders(); |
| 181 | return WDHttp.post<ResponseDTO<MineFollowListDetailItem>>(url, object,headers) | 184 | return WDHttp.post<ResponseDTO<MineFollowListDetailItem>>(url, object,headers) |
| 182 | }; | 185 | }; |
| 183 | 186 | ||
| @@ -187,7 +190,7 @@ class MinePageDatasModel{ | @@ -187,7 +190,7 @@ class MinePageDatasModel{ | ||
| 187 | */ | 190 | */ |
| 188 | fetchFollowListData() { | 191 | fetchFollowListData() { |
| 189 | let url = HttpUrlUtils.getFollowListDataUrl() | 192 | let url = HttpUrlUtils.getFollowListDataUrl() |
| 190 | - let headers: HashMap<string, string> = HttpUrlUtils.getYcgCommonHeaders(); | 193 | + let headers: HashMap<string, string> = HttpUrlUtils.getCommonHeaders(); |
| 191 | return WDHttp.get<ResponseDTO<FollowListItem[]>>(url, headers) | 194 | return WDHttp.get<ResponseDTO<FollowListItem[]>>(url, headers) |
| 192 | }; | 195 | }; |
| 193 | 196 | ||
| @@ -246,7 +249,7 @@ class MinePageDatasModel{ | @@ -246,7 +249,7 @@ class MinePageDatasModel{ | ||
| 246 | 249 | ||
| 247 | fetchMineDetailFollowListData(object:FollowListDetailRequestItem) { | 250 | fetchMineDetailFollowListData(object:FollowListDetailRequestItem) { |
| 248 | let url = HttpUrlUtils.getMineFollowListDataUrl()+`?pageSize=${object.pageSize}&pageNum=${object.pageNum}` | 251 | let url = HttpUrlUtils.getMineFollowListDataUrl()+`?pageSize=${object.pageSize}&pageNum=${object.pageNum}` |
| 249 | - let headers: HashMap<string, string> = HttpUrlUtils.getYcgCommonHeaders(); | 252 | + let headers: HashMap<string, string> = HttpUrlUtils.getCommonHeaders(); |
| 250 | return WDHttp.get<ResponseDTO<MineFollowListItem>>(url, headers) | 253 | return WDHttp.get<ResponseDTO<MineFollowListItem>>(url, headers) |
| 251 | }; | 254 | }; |
| 252 | 255 | ||
| @@ -287,7 +290,7 @@ class MinePageDatasModel{ | @@ -287,7 +290,7 @@ class MinePageDatasModel{ | ||
| 287 | 290 | ||
| 288 | fetchFollowListStatusData(object:FollowListStatusRequestItem) { | 291 | fetchFollowListStatusData(object:FollowListStatusRequestItem) { |
| 289 | let url = HttpUrlUtils.getFollowListStatusDataUrl() | 292 | let url = HttpUrlUtils.getFollowListStatusDataUrl() |
| 290 | - let headers: HashMap<string, string> = HttpUrlUtils.getYcgCommonHeaders(); | 293 | + let headers: HashMap<string, string> = HttpUrlUtils.getCommonHeaders(); |
| 291 | return WDHttp.post<ResponseDTO<QueryListIsFollowedItem[]>>(url,object, headers) | 294 | return WDHttp.post<ResponseDTO<QueryListIsFollowedItem[]>>(url,object, headers) |
| 292 | }; | 295 | }; |
| 293 | 296 | ||
| @@ -309,10 +312,10 @@ class MinePageDatasModel{ | @@ -309,10 +312,10 @@ class MinePageDatasModel{ | ||
| 309 | * @param context | 312 | * @param context |
| 310 | * @returns | 313 | * @returns |
| 311 | */ | 314 | */ |
| 312 | - getMineCommentListData(params:FollowListDetailRequestItem,context: Context): Promise<MineCommentListDetailItem> { | 315 | + getMineCommentListData(time:string,params:FollowListDetailRequestItem,context: Context): Promise<MineCommentListDetailItem> { |
| 313 | return new Promise<MineCommentListDetailItem>((success, error) => { | 316 | return new Promise<MineCommentListDetailItem>((success, error) => { |
| 314 | Logger.info(TAG, `getAppointmentList start`); | 317 | Logger.info(TAG, `getAppointmentList start`); |
| 315 | - this.fetchMineCommentListData(params).then((navResDTO: ResponseDTO<MineCommentListDetailItem>) => { | 318 | + this.fetchMineCommentListData(time,params).then((navResDTO: ResponseDTO<MineCommentListDetailItem>) => { |
| 316 | if (!navResDTO || navResDTO.code != 0) { | 319 | if (!navResDTO || navResDTO.code != 0) { |
| 317 | success(this.getMineCommentListDataLocal(context)) | 320 | success(this.getMineCommentListDataLocal(context)) |
| 318 | return | 321 | return |
| @@ -327,9 +330,9 @@ class MinePageDatasModel{ | @@ -327,9 +330,9 @@ class MinePageDatasModel{ | ||
| 327 | }) | 330 | }) |
| 328 | } | 331 | } |
| 329 | 332 | ||
| 330 | - fetchMineCommentListData(object:FollowListDetailRequestItem) { | ||
| 331 | - let url = HttpUrlUtils.getMineCommentListDataUrl()+`?pageSize=${object.pageSize}&pageNum=${object.pageNum}` | ||
| 332 | - let headers: HashMap<string, string> = HttpUrlUtils.getYcgCommonHeaders(); | 333 | + fetchMineCommentListData(time:string,object:FollowListDetailRequestItem) { |
| 334 | + let url = HttpUrlUtils.getMineCommentListDataUrl()+`?pageSize=${object.pageSize}&pageNum=${object.pageNum}&time=${time}` | ||
| 335 | + let headers: HashMap<string, string> = HttpUrlUtils.getCommonHeaders(); | ||
| 333 | return WDHttp.get<ResponseDTO<MineCommentListDetailItem>>(url, headers) | 336 | return WDHttp.get<ResponseDTO<MineCommentListDetailItem>>(url, headers) |
| 334 | }; | 337 | }; |
| 335 | 338 | ||
| @@ -367,7 +370,7 @@ class MinePageDatasModel{ | @@ -367,7 +370,7 @@ class MinePageDatasModel{ | ||
| 367 | 370 | ||
| 368 | fetchMineUserLevelData() { | 371 | fetchMineUserLevelData() { |
| 369 | let url = HttpUrlUtils.getMineUserLevelDataUrl() | 372 | let url = HttpUrlUtils.getMineUserLevelDataUrl() |
| 370 | - let headers: HashMap<string, string> = HttpUrlUtils.getYcgCommonHeaders(); | 373 | + let headers: HashMap<string, string> = HttpUrlUtils.getCommonHeaders(); |
| 371 | return WDHttp.get<ResponseDTO<MineUserLevelItem>>(url, headers) | 374 | return WDHttp.get<ResponseDTO<MineUserLevelItem>>(url, headers) |
| 372 | }; | 375 | }; |
| 373 | 376 | ||
| @@ -405,7 +408,7 @@ class MinePageDatasModel{ | @@ -405,7 +408,7 @@ class MinePageDatasModel{ | ||
| 405 | 408 | ||
| 406 | fetchMineUserDetailData() { | 409 | fetchMineUserDetailData() { |
| 407 | let url = HttpUrlUtils.getMineUserDetailDataUrl() | 410 | let url = HttpUrlUtils.getMineUserDetailDataUrl() |
| 408 | - let headers: HashMap<string, string> = HttpUrlUtils.getYcgCommonHeaders(); | 411 | + let headers: HashMap<string, string> = HttpUrlUtils.getCommonHeaders(); |
| 409 | return WDHttp.get<ResponseDTO<MineUserDetailItem>>(url, headers) | 412 | return WDHttp.get<ResponseDTO<MineUserDetailItem>>(url, headers) |
| 410 | }; | 413 | }; |
| 411 | 414 | ||
| @@ -442,7 +445,7 @@ class MinePageDatasModel{ | @@ -442,7 +445,7 @@ class MinePageDatasModel{ | ||
| 442 | 445 | ||
| 443 | fetchOtherUserDetailData(item:OtherUserDetailRequestItem) { | 446 | fetchOtherUserDetailData(item:OtherUserDetailRequestItem) { |
| 444 | let url = HttpUrlUtils.getOtherUserDetailDataUrl() | 447 | let url = HttpUrlUtils.getOtherUserDetailDataUrl() |
| 445 | - let headers: HashMap<string, string> = HttpUrlUtils.getYcgCommonHeaders(); | 448 | + let headers: HashMap<string, string> = HttpUrlUtils.getCommonHeaders(); |
| 446 | return WDHttp.post<ResponseDTO<MineUserDetailItem>>(url, item,headers) | 449 | return WDHttp.post<ResponseDTO<MineUserDetailItem>>(url, item,headers) |
| 447 | }; | 450 | }; |
| 448 | 451 | ||
| @@ -484,7 +487,7 @@ class MinePageDatasModel{ | @@ -484,7 +487,7 @@ class MinePageDatasModel{ | ||
| 484 | 487 | ||
| 485 | fetchOtherUserLevelData(item:string[]) { | 488 | fetchOtherUserLevelData(item:string[]) { |
| 486 | let url = HttpUrlUtils.getOtherUserLevelDataUrl() | 489 | let url = HttpUrlUtils.getOtherUserLevelDataUrl() |
| 487 | - let headers: HashMap<string, string> = HttpUrlUtils.getYcgCommonHeaders(); | 490 | + let headers: HashMap<string, string> = HttpUrlUtils.getCommonHeaders(); |
| 488 | return WDHttp.post<ResponseDTO<MineUserLevelItem[]>>(url,item, headers) | 491 | return WDHttp.post<ResponseDTO<MineUserLevelItem[]>>(url,item, headers) |
| 489 | }; | 492 | }; |
| 490 | 493 | ||
| @@ -525,7 +528,7 @@ class MinePageDatasModel{ | @@ -525,7 +528,7 @@ class MinePageDatasModel{ | ||
| 525 | 528 | ||
| 526 | fetchOtherCommentListData(object:OtherUserCommentListRequestItem) { | 529 | fetchOtherCommentListData(object:OtherUserCommentListRequestItem) { |
| 527 | let url = HttpUrlUtils.getOtherCommentListDataUrl()+`?pageSize=${object.pageSize}&pageNum=${object.pageNum}&creatorId=${object.creatorId}&time=${object.time}&userType=${object.userType}&userId=${object.userId}` | 530 | let url = HttpUrlUtils.getOtherCommentListDataUrl()+`?pageSize=${object.pageSize}&pageNum=${object.pageNum}&creatorId=${object.creatorId}&time=${object.time}&userType=${object.userType}&userId=${object.userId}` |
| 528 | - let headers: HashMap<string, string> = HttpUrlUtils.getYcgCommonHeaders(); | 531 | + let headers: HashMap<string, string> = HttpUrlUtils.getCommonHeaders(); |
| 529 | return WDHttp.get<ResponseDTO<MineCommentListDetailItem>>(url, headers) | 532 | return WDHttp.get<ResponseDTO<MineCommentListDetailItem>>(url, headers) |
| 530 | }; | 533 | }; |
| 531 | 534 | ||
| @@ -565,8 +568,8 @@ class MinePageDatasModel{ | @@ -565,8 +568,8 @@ class MinePageDatasModel{ | ||
| 565 | } | 568 | } |
| 566 | 569 | ||
| 567 | fetchOtherUserCommentLikeStatusData(object:OtherUserCommentLikeStatusRequestItem) { | 570 | fetchOtherUserCommentLikeStatusData(object:OtherUserCommentLikeStatusRequestItem) { |
| 568 | - let url = HttpUrlUtils.getFollowListStatusDataUrl() | ||
| 569 | - let headers: HashMap<string, string> = HttpUrlUtils.getYcgCommonHeaders(); | 571 | + let url = HttpUrlUtils.getCommentListStatusDataUrl() |
| 572 | + let headers: HashMap<string, string> = HttpUrlUtils.getCommonHeaders(); | ||
| 570 | return WDHttp.post<ResponseDTO<QueryCommentListIsLikedItem[]>>(url,object, headers) | 573 | return WDHttp.post<ResponseDTO<QueryCommentListIsLikedItem[]>>(url,object, headers) |
| 571 | }; | 574 | }; |
| 572 | 575 | ||
| @@ -607,7 +610,7 @@ class MinePageDatasModel{ | @@ -607,7 +610,7 @@ class MinePageDatasModel{ | ||
| 607 | 610 | ||
| 608 | fetchOtherUserFollowListData(object:UserFollowListRequestItem) { | 611 | fetchOtherUserFollowListData(object:UserFollowListRequestItem) { |
| 609 | let url = HttpUrlUtils.getOtherUserFollowListDataUrl()+`?pageSize=${object.pageSize}&pageNum=${object.pageNum}&queryUserId=${object.queryUserId}&userType=${object.userType}&userId=${HttpUrlUtils.getUserId()}` | 612 | let url = HttpUrlUtils.getOtherUserFollowListDataUrl()+`?pageSize=${object.pageSize}&pageNum=${object.pageNum}&queryUserId=${object.queryUserId}&userType=${object.userType}&userId=${HttpUrlUtils.getUserId()}` |
| 610 | - let headers: HashMap<string, string> = HttpUrlUtils.getYcgCommonHeaders(); | 613 | + let headers: HashMap<string, string> = HttpUrlUtils.getCommonHeaders(); |
| 611 | return WDHttp.get<ResponseDTO<MineFollowListItem>>(url, headers) | 614 | return WDHttp.get<ResponseDTO<MineFollowListItem>>(url, headers) |
| 612 | }; | 615 | }; |
| 613 | 616 | ||
| @@ -622,6 +625,127 @@ class MinePageDatasModel{ | @@ -622,6 +625,127 @@ class MinePageDatasModel{ | ||
| 622 | return compRes.data | 625 | return compRes.data |
| 623 | } | 626 | } |
| 624 | 627 | ||
| 628 | + /** | ||
| 629 | + * 预约 和取消预约操作 | ||
| 630 | + * @param params | ||
| 631 | + * @param context | ||
| 632 | + * @returns | ||
| 633 | + */ | ||
| 634 | + getAppointmentOperation(params:AppointmentOperationRequestItem,context: Context): Promise<ResponseDTO> { | ||
| 635 | + return new Promise((success, error) => { | ||
| 636 | + Logger.info(TAG, `getAppointmentList start`); | ||
| 637 | + this.fetchAppointmentOperation(params).then((navResDTO: ResponseDTO) => { | ||
| 638 | + if (!navResDTO || navResDTO.code != 0) { | ||
| 639 | + success(this.getAppointmentOperationLocal(context)) | ||
| 640 | + return | ||
| 641 | + } | ||
| 642 | + Logger.info(TAG, "getAppointmentList then,AppointmentResDTO.timeStamp:" + navResDTO.timestamp); | ||
| 643 | + success(navResDTO); | ||
| 644 | + }).catch((err: Error) => { | ||
| 645 | + Logger.error(TAG, `fetchAppointmentListDataApi catch, error.name : ${err.name}, error.message:${err.message}`); | ||
| 646 | + success(this.getAppointmentOperationLocal(context)) | ||
| 647 | + }) | ||
| 648 | + }) | ||
| 649 | + } | ||
| 650 | + | ||
| 651 | + fetchAppointmentOperation(object:AppointmentOperationRequestItem) { | ||
| 652 | + let url = HttpUrlUtils.getAppointmentOperationUrl() | ||
| 653 | + let headers: HashMap<string, string> = HttpUrlUtils.getCommonHeaders(); | ||
| 654 | + return WDHttp.post<ResponseDTO>(url,object, headers) | ||
| 655 | + }; | ||
| 656 | + | ||
| 657 | + async getAppointmentOperationLocal(context: Context): Promise<ResponseDTO> { | ||
| 658 | + Logger.info(TAG, `getMineFollowListDataLocal start`); | ||
| 659 | + let compRes: ResponseDTO | null = await ResourcesUtils.getResourcesJson<ResponseDTO>(context,'appointment_operation_data.json'); | ||
| 660 | + if (!compRes ) { | ||
| 661 | + Logger.info(TAG, `getMineFollowListDataLocal compRes is empty`); | ||
| 662 | + return compRes | ||
| 663 | + } | ||
| 664 | + Logger.info(TAG, `getMineFollowListDataLocal getResourcesJsonSync compRes : ${JSON.stringify(compRes)}`); | ||
| 665 | + return compRes | ||
| 666 | + } | ||
| 667 | + | ||
| 668 | + | ||
| 669 | + /** | ||
| 670 | + * 评论点赞操作 | ||
| 671 | + * @param params | ||
| 672 | + * @param context | ||
| 673 | + * @returns | ||
| 674 | + */ | ||
| 675 | + getCommentLikeOperation(params:CommentLikeOperationRequestItem,context: Context): Promise<ResponseDTO> { | ||
| 676 | + return new Promise((success, error) => { | ||
| 677 | + Logger.info(TAG, `getAppointmentList start`); | ||
| 678 | + this.fetchCommentLikeOperation(params).then((navResDTO: ResponseDTO) => { | ||
| 679 | + if (!navResDTO || navResDTO.code != 0) { | ||
| 680 | + success(this.getCommentLikeOperationLocal(context)) | ||
| 681 | + return | ||
| 682 | + } | ||
| 683 | + Logger.info(TAG, "getAppointmentList then,AppointmentResDTO.timeStamp:" + navResDTO.timestamp); | ||
| 684 | + success(navResDTO); | ||
| 685 | + }).catch((err: Error) => { | ||
| 686 | + Logger.error(TAG, `fetchAppointmentListDataApi catch, error.name : ${err.name}, error.message:${err.message}`); | ||
| 687 | + success(this.getCommentLikeOperationLocal(context)) | ||
| 688 | + }) | ||
| 689 | + }) | ||
| 690 | + } | ||
| 691 | + | ||
| 692 | + fetchCommentLikeOperation(object:CommentLikeOperationRequestItem) { | ||
| 693 | + let url = HttpUrlUtils.getCommentLikeOperationUrl() | ||
| 694 | + let headers: HashMap<string, string> = HttpUrlUtils.getCommonHeaders(); | ||
| 695 | + return WDHttp.post<ResponseDTO>(url,object, headers) | ||
| 696 | + }; | ||
| 697 | + | ||
| 698 | + async getCommentLikeOperationLocal(context: Context): Promise<ResponseDTO> { | ||
| 699 | + Logger.info(TAG, `getMineFollowListDataLocal start`); | ||
| 700 | + let compRes: ResponseDTO | null = await ResourcesUtils.getResourcesJson<ResponseDTO>(context,'comment_like_operation_data.json'); | ||
| 701 | + if (!compRes ) { | ||
| 702 | + Logger.info(TAG, `getMineFollowListDataLocal compRes is empty`); | ||
| 703 | + return compRes | ||
| 704 | + } | ||
| 705 | + Logger.info(TAG, `getMineFollowListDataLocal getResourcesJsonSync compRes : ${JSON.stringify(compRes)}`); | ||
| 706 | + return compRes | ||
| 707 | + } | ||
| 708 | + | ||
| 709 | + /** | ||
| 710 | + * 关注 取消关注 操作 | ||
| 711 | + * @param params | ||
| 712 | + * @param context | ||
| 713 | + * @returns | ||
| 714 | + */ | ||
| 715 | + getFollowOperation(params:FollowOperationRequestItem,context: Context): Promise<ResponseDTO> { | ||
| 716 | + return new Promise((success, error) => { | ||
| 717 | + Logger.info(TAG, `getAppointmentList start`); | ||
| 718 | + this.fetchFollowOperation(params).then((navResDTO: ResponseDTO) => { | ||
| 719 | + if (!navResDTO || navResDTO.code != 0) { | ||
| 720 | + success(this.getFollowOperationLocal(context)) | ||
| 721 | + return | ||
| 722 | + } | ||
| 723 | + Logger.info(TAG, "getAppointmentList then,AppointmentResDTO.timeStamp:" + navResDTO.timestamp); | ||
| 724 | + success(navResDTO); | ||
| 725 | + }).catch((err: Error) => { | ||
| 726 | + Logger.error(TAG, `fetchAppointmentListDataApi catch, error.name : ${err.name}, error.message:${err.message}`); | ||
| 727 | + success(this.getFollowOperationLocal(context)) | ||
| 728 | + }) | ||
| 729 | + }) | ||
| 730 | + } | ||
| 731 | + | ||
| 732 | + fetchFollowOperation(object:FollowOperationRequestItem) { | ||
| 733 | + let url = HttpUrlUtils.getFollowOperationUrl() | ||
| 734 | + let headers: HashMap<string, string> = HttpUrlUtils.getCommonHeaders(); | ||
| 735 | + return WDHttp.post<ResponseDTO>(url,object, headers) | ||
| 736 | + }; | ||
| 737 | + | ||
| 738 | + async getFollowOperationLocal(context: Context): Promise<ResponseDTO> { | ||
| 739 | + Logger.info(TAG, `getMineFollowListDataLocal start`); | ||
| 740 | + let compRes: ResponseDTO | null = await ResourcesUtils.getResourcesJson<ResponseDTO>(context,'follow_operation_data.json'); | ||
| 741 | + if (!compRes ) { | ||
| 742 | + Logger.info(TAG, `getMineFollowListDataLocal compRes is empty`); | ||
| 743 | + return compRes | ||
| 744 | + } | ||
| 745 | + Logger.info(TAG, `getMineFollowListDataLocal getResourcesJsonSync compRes : ${JSON.stringify(compRes)}`); | ||
| 746 | + return compRes | ||
| 747 | + } | ||
| 748 | + | ||
| 625 | 749 | ||
| 626 | } | 750 | } |
| 627 | 751 |
| @@ -3,6 +3,8 @@ import HashMap from '@ohos.util.HashMap'; | @@ -3,6 +3,8 @@ import HashMap from '@ohos.util.HashMap'; | ||
| 3 | import { HttpUrlUtils, ResponseDTO } from 'wdNetwork'; | 3 | import { HttpUrlUtils, ResponseDTO } from 'wdNetwork'; |
| 4 | import { Logger } from 'wdKit'; | 4 | import { Logger } from 'wdKit'; |
| 5 | import { HttpRequest } from 'wdNetwork/src/main/ets/http/HttpRequest'; | 5 | import { HttpRequest } from 'wdNetwork/src/main/ets/http/HttpRequest'; |
| 6 | +import EditInfoViewModel from '../viewmodel/EditInfoViewModel'; | ||
| 7 | +import { editModel } from './EditInfoModel'; | ||
| 6 | 8 | ||
| 7 | 9 | ||
| 8 | @Observed | 10 | @Observed |
| @@ -20,10 +22,12 @@ export class PrivacySettingModel{ | @@ -20,10 +22,12 @@ export class PrivacySettingModel{ | ||
| 20 | 22 | ||
| 21 | 23 | ||
| 22 | queryUserDetail() { | 24 | queryUserDetail() { |
| 25 | + // EditInfoViewModel | ||
| 26 | + | ||
| 23 | let bean: Record<string, string> = {}; | 27 | let bean: Record<string, string> = {}; |
| 24 | let headers: HashMap<string, string> = HttpUrlUtils.getCommonHeaders(); | 28 | let headers: HashMap<string, string> = HttpUrlUtils.getCommonHeaders(); |
| 25 | - return new Promise<string>((success, fail) => { | ||
| 26 | - HttpRequest.get<ResponseDTO<string>>(HttpUrlUtils.queryUserDetail(), headers).then((data: ResponseDTO<string>) => { | 29 | + return new Promise<editModel>((success, fail) => { |
| 30 | + HttpRequest.get<ResponseDTO<editModel>>(HttpUrlUtils.queryUserDetail(), headers).then((data: ResponseDTO<editModel>) => { | ||
| 27 | if (!data || !data.data) { | 31 | if (!data || !data.data) { |
| 28 | fail("数据为空") | 32 | fail("数据为空") |
| 29 | return | 33 | return |
| @@ -32,7 +36,8 @@ export class PrivacySettingModel{ | @@ -32,7 +36,8 @@ export class PrivacySettingModel{ | ||
| 32 | fail(data.message) | 36 | fail(data.message) |
| 33 | return | 37 | return |
| 34 | } | 38 | } |
| 35 | - // this.permission = data.data.userExtend.airec as boolean; | 39 | + this.permission = Boolean(data.data.userExtend.airec) |
| 40 | + console.log('this.permission',this.permission); | ||
| 36 | success(data.data) | 41 | success(data.data) |
| 37 | }, (error: Error) => { | 42 | }, (error: Error) => { |
| 38 | fail(error.message) | 43 | fail(error.message) |
| @@ -56,21 +56,21 @@ struct MineHomePage { | @@ -56,21 +56,21 @@ struct MineHomePage { | ||
| 56 | Stack(){ | 56 | Stack(){ |
| 57 | Image(this.headPhotoUrl) | 57 | Image(this.headPhotoUrl) |
| 58 | .alt($r('app.media.default_head')) | 58 | .alt($r('app.media.default_head')) |
| 59 | - .width('115lpx') | ||
| 60 | - .height('115lpx') | ||
| 61 | - .objectFit(ImageFit.Cover) | 59 | + .width('100lpx') |
| 60 | + .height('100lpx') | ||
| 61 | + .objectFit(ImageFit.Auto) | ||
| 62 | .borderRadius(50) | 62 | .borderRadius(50) |
| 63 | Image(this.levelHead) | 63 | Image(this.levelHead) |
| 64 | .width('130lpx') | 64 | .width('130lpx') |
| 65 | .height('130lpx') | 65 | .height('130lpx') |
| 66 | .objectFit(ImageFit.Cover) | 66 | .objectFit(ImageFit.Cover) |
| 67 | - .borderRadius(50) | ||
| 68 | }.onClick(()=>{ | 67 | }.onClick(()=>{ |
| 69 | let params: Params = { | 68 | let params: Params = { |
| 70 | - pageID: "512157124138245" | 69 | + pageID: "531267787833221"//sit 测试用 512157124138245 |
| 71 | } | 70 | } |
| 72 | WDRouterRule.jumpWithPage(WDRouterPage.otherNormalUserHomePagePage,params) | 71 | WDRouterRule.jumpWithPage(WDRouterPage.otherNormalUserHomePagePage,params) |
| 73 | - }) | 72 | + }).width('135lpx') |
| 73 | + .height('135lpx') | ||
| 74 | 74 | ||
| 75 | Column() { | 75 | Column() { |
| 76 | Row() { | 76 | Row() { |
| @@ -12,12 +12,17 @@ const TAG = "OtherNormalUserHomePage" | @@ -12,12 +12,17 @@ const TAG = "OtherNormalUserHomePage" | ||
| 12 | @Component | 12 | @Component |
| 13 | struct OtherNormalUserHomePage { | 13 | struct OtherNormalUserHomePage { |
| 14 | @State params:Params = router.getParams() as Params; | 14 | @State params:Params = router.getParams() as Params; |
| 15 | - @State curUserId: string = '-1'; | 15 | + @Watch('change') @State curUserId: string = '-1'; |
| 16 | 16 | ||
| 17 | - onPageShow() { | 17 | + onPageShow() { |
| 18 | this.curUserId = this.params?.pageID; | 18 | this.curUserId = this.params?.pageID; |
| 19 | } | 19 | } |
| 20 | 20 | ||
| 21 | + change(){ | ||
| 22 | + this.getUserInfo() | ||
| 23 | + this.getUserLevel() | ||
| 24 | + } | ||
| 25 | + | ||
| 21 | @State tileOpacity: number = 0; | 26 | @State tileOpacity: number = 0; |
| 22 | firstPositionY:number = 0; | 27 | firstPositionY:number = 0; |
| 23 | fontColor: string = '#999999' | 28 | fontColor: string = '#999999' |
| @@ -61,8 +66,8 @@ struct OtherNormalUserHomePage { | @@ -61,8 +66,8 @@ struct OtherNormalUserHomePage { | ||
| 61 | Stack(){ | 66 | Stack(){ |
| 62 | Image(this.headPhotoUrl) | 67 | Image(this.headPhotoUrl) |
| 63 | .alt($r('app.media.default_head')) | 68 | .alt($r('app.media.default_head')) |
| 64 | - .width('115lpx') | ||
| 65 | - .height('115lpx') | 69 | + .width('100lpx') |
| 70 | + .height('100lpx') | ||
| 66 | .objectFit(ImageFit.Cover) | 71 | .objectFit(ImageFit.Cover) |
| 67 | .borderRadius(50) | 72 | .borderRadius(50) |
| 68 | Image(this.levelHead) | 73 | Image(this.levelHead) |
| @@ -148,32 +153,32 @@ struct OtherNormalUserHomePage { | @@ -148,32 +153,32 @@ struct OtherNormalUserHomePage { | ||
| 148 | .padding({ left: '35lpx' }) | 153 | .padding({ left: '35lpx' }) |
| 149 | 154 | ||
| 150 | //用户简介区域 | 155 | //用户简介区域 |
| 151 | - Column() { | ||
| 152 | - Row() { | ||
| 153 | - Text(this.desc) | ||
| 154 | - .fontSize('27lpx') | ||
| 155 | - .maxLines(3) | ||
| 156 | - .textOverflow({ overflow: TextOverflow.Ellipsis }) | ||
| 157 | - .lineHeight('40lpx') | ||
| 158 | - .fontWeight('400lpx') | ||
| 159 | - .fontColor($r('app.color.color_222222')) | ||
| 160 | - .textAlign(TextAlign.Start) | ||
| 161 | - | ||
| 162 | - } | ||
| 163 | - }.padding({ left: '31lpx',right:'31lpx',top:'19lpx',bottom:'31lpx'}) | ||
| 164 | - .alignItems(HorizontalAlign.Start) | ||
| 165 | - .justifyContent(FlexAlign.Center) | ||
| 166 | - .width('100%') | ||
| 167 | - .backgroundColor($r('app.color.white')) | ||
| 168 | - .visibility(StringUtils.isEmpty(this.desc)?Visibility.Hidden:Visibility.Visible) | 156 | + if(StringUtils.isNotEmpty(this.desc)){ |
| 157 | + Column() { | ||
| 158 | + Row() { | ||
| 159 | + Text(this.desc) | ||
| 160 | + .fontSize('27lpx') | ||
| 161 | + .maxLines(3) | ||
| 162 | + .textOverflow({ overflow: TextOverflow.Ellipsis }) | ||
| 163 | + .lineHeight('40lpx') | ||
| 164 | + .fontWeight('400lpx') | ||
| 165 | + .fontColor($r('app.color.color_222222')) | ||
| 166 | + .textAlign(TextAlign.Start) | ||
| 169 | 167 | ||
| 168 | + } | ||
| 169 | + }.padding({ left: '31lpx',right:'31lpx',top:'19lpx',bottom:'31lpx'}) | ||
| 170 | + .alignItems(HorizontalAlign.Start) | ||
| 171 | + .justifyContent(FlexAlign.Center) | ||
| 172 | + .width('100%') | ||
| 173 | + .backgroundColor($r('app.color.white')) | ||
| 174 | + } | ||
| 170 | //间隔符 | 175 | //间隔符 |
| 171 | Divider().width('100%').height('12lpx').color($r('app.color.color_F5F5F5')).strokeWidth('12lpx') | 176 | Divider().width('100%').height('12lpx').color($r('app.color.color_F5F5F5')).strokeWidth('12lpx') |
| 172 | 177 | ||
| 173 | //tab 页面 | 178 | //tab 页面 |
| 174 | Tabs({controller: this.controller}) { | 179 | Tabs({controller: this.controller}) { |
| 175 | TabContent() { | 180 | TabContent() { |
| 176 | - OtherHomePageBottomCommentComponent({curUserId:this.curUserId,levelHead:this.levelHead}) | 181 | + OtherHomePageBottomCommentComponent({curUserId:this.curUserId,levelHead:this.levelHead,commentNum:$commentNum}) |
| 177 | }.tabBar(this.TabBuilder(0,"评论")) | 182 | }.tabBar(this.TabBuilder(0,"评论")) |
| 178 | TabContent() { | 183 | TabContent() { |
| 179 | OtherHomePageBottomFollowComponent({curUserId:this.curUserId}) | 184 | OtherHomePageBottomFollowComponent({curUserId:this.curUserId}) |
| @@ -303,6 +308,9 @@ struct OtherNormalUserHomePage { | @@ -303,6 +308,9 @@ struct OtherNormalUserHomePage { | ||
| 303 | 308 | ||
| 304 | 309 | ||
| 305 | getUserInfo(){ | 310 | getUserInfo(){ |
| 311 | + if(this.curUserId === "-1" ){ | ||
| 312 | + return | ||
| 313 | + } | ||
| 306 | let item = new OtherUserDetailRequestItem("","1",this.curUserId) | 314 | let item = new OtherUserDetailRequestItem("","1",this.curUserId) |
| 307 | MinePageDatasModel.getOtherUserDetailData(item,getContext(this)).then((value)=>{ | 315 | MinePageDatasModel.getOtherUserDetailData(item,getContext(this)).then((value)=>{ |
| 308 | if(value!=null){ | 316 | if(value!=null){ |
| @@ -320,6 +328,9 @@ struct OtherNormalUserHomePage { | @@ -320,6 +328,9 @@ struct OtherNormalUserHomePage { | ||
| 320 | }) | 328 | }) |
| 321 | } | 329 | } |
| 322 | getUserLevel(){ | 330 | getUserLevel(){ |
| 331 | + if(this.curUserId === "-1" ){ | ||
| 332 | + return | ||
| 333 | + } | ||
| 323 | MinePageDatasModel.getOtherUserLevelData([this.curUserId],getContext(this)).then((value)=>{ | 334 | MinePageDatasModel.getOtherUserLevelData([this.curUserId],getContext(this)).then((value)=>{ |
| 324 | if(value!=null){ | 335 | if(value!=null){ |
| 325 | this.levelHead = value[0].levelHead | 336 | this.levelHead = value[0].levelHead |
| @@ -99,7 +99,7 @@ export class PageRepository { | @@ -99,7 +99,7 @@ export class PageRepository { | ||
| 99 | } | 99 | } |
| 100 | 100 | ||
| 101 | /** | 101 | /** |
| 102 | - * 早晚报pageInfo请求 | 102 | + * 早晚报pageInfo请求 TODO 现网无数据写死测试环境 |
| 103 | * */ | 103 | * */ |
| 104 | static getMorningEveningPageInfoUrl(pageId: string) { | 104 | static getMorningEveningPageInfoUrl(pageId: string) { |
| 105 | let url = HttpUrlUtils.getHost() + HttpUrlUtils.MORNING_EVENING_PAGE_INFO_PATH; | 105 | let url = HttpUrlUtils.getHost() + HttpUrlUtils.MORNING_EVENING_PAGE_INFO_PATH; |
| @@ -118,7 +118,7 @@ export class PageRepository { | @@ -118,7 +118,7 @@ export class PageRepository { | ||
| 118 | * | 118 | * |
| 119 | * 可选 | 119 | * 可选 |
| 120 | * channelId:频道id | 120 | * channelId:频道id |
| 121 | - * channelStrategy:频道策略 | 121 | + * channelStrategy:频道策略 TODO 现网无数据写死测试环境 |
| 122 | * topicId:专题id | 122 | * topicId:专题id |
| 123 | * */ | 123 | * */ |
| 124 | static getMorningEveningCompInfoUrl(pageId: number, groupId: number, refreshTime: string, topicId: string, pageNum: number, pageSize: number) { | 124 | static getMorningEveningCompInfoUrl(pageId: number, groupId: number, refreshTime: string, topicId: string, pageNum: number, pageSize: number) { |
| @@ -32,15 +32,30 @@ export class ProcessUtils { | @@ -32,15 +32,30 @@ export class ProcessUtils { | ||
| 32 | Logger.debug(TAG, "processPage, nonsupport!!!"); | 32 | Logger.debug(TAG, "processPage, nonsupport!!!"); |
| 33 | ProcessUtils.gotoVod(content) | 33 | ProcessUtils.gotoVod(content) |
| 34 | break; | 34 | break; |
| 35 | + case ContentConstants.TYPE_AUDIO: | ||
| 36 | + ProcessUtils.gotoAudio(content) | ||
| 37 | + break; | ||
| 35 | case ContentConstants.TYPE_TELETEXT: | 38 | case ContentConstants.TYPE_TELETEXT: |
| 36 | // 图文详情,跳转h5 | 39 | // 图文详情,跳转h5 |
| 37 | ProcessUtils.gotoWeb(content); | 40 | ProcessUtils.gotoWeb(content); |
| 38 | break; | 41 | break; |
| 42 | + case ContentConstants.TYPE_SPECIAL_TOPIC: | ||
| 43 | + // 专题详情,跳转h5 | ||
| 44 | + ProcessUtils.gotoSpecialTopic(content); | ||
| 45 | + break; | ||
| 39 | default: | 46 | default: |
| 40 | break; | 47 | break; |
| 41 | } | 48 | } |
| 42 | } | 49 | } |
| 43 | - | 50 | + private static gotoSpecialTopic(content: ContentDTO) { |
| 51 | + let taskAction: Action = { | ||
| 52 | + type: 'JUMP_H5_BY_WEB_VIEW', | ||
| 53 | + params: { | ||
| 54 | + url: content.linkUrl | ||
| 55 | + } as Params, | ||
| 56 | + }; | ||
| 57 | + WDRouterRule.jumpWithAction(taskAction) | ||
| 58 | + } | ||
| 44 | private static gotoWeb(content: ContentDTO) { | 59 | private static gotoWeb(content: ContentDTO) { |
| 45 | // // topicId | 60 | // // topicId |
| 46 | // content.channelId; | 61 | // content.channelId; |
| @@ -83,4 +98,20 @@ export class ProcessUtils { | @@ -83,4 +98,20 @@ export class ProcessUtils { | ||
| 83 | WDRouterRule.jumpWithAction(taskAction) | 98 | WDRouterRule.jumpWithAction(taskAction) |
| 84 | Logger.debug(TAG, `gotoVod, ${content.objectId}`); | 99 | Logger.debug(TAG, `gotoVod, ${content.objectId}`); |
| 85 | } | 100 | } |
| 101 | + private static gotoAudio(content: ContentDTO) { | ||
| 102 | + let taskAction: Action = { | ||
| 103 | + type: 'JUMP_DETAIL_PAGE', | ||
| 104 | + params: { | ||
| 105 | + detailPageType: 13, | ||
| 106 | + contentID: content?.objectId, | ||
| 107 | + extra:{ | ||
| 108 | + relType: content?.relType, | ||
| 109 | + relId: content?.relId, | ||
| 110 | + } as ExtraDTO | ||
| 111 | + } as Params, | ||
| 112 | + }; | ||
| 113 | + WDRouterRule.jumpWithAction(taskAction) | ||
| 114 | + Logger.debug(TAG, `gotoAudio, ${content.objectId}`); | ||
| 115 | + } | ||
| 116 | + | ||
| 86 | } | 117 | } |
sight_harmony/features/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 | +} |
sight_harmony/features/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 | +} |
| @@ -10,8 +10,11 @@ export class CommentListItem{ | @@ -10,8 +10,11 @@ export class CommentListItem{ | ||
| 10 | likeNum:number = 0 | 10 | likeNum:number = 0 |
| 11 | like_status:number = 0 | 11 | like_status:number = 0 |
| 12 | id:number = 0 | 12 | id:number = 0 |
| 13 | + targetId:string = "" | ||
| 14 | + targetType:number = 0 | ||
| 13 | 15 | ||
| 14 | - constructor(fromUserHeader:string,fromUserName:string,targetTitle:string,createTime:string,commentContent:string,likeNum:number,like_status:number,id:number) { | 16 | + |
| 17 | + constructor(fromUserHeader:string,fromUserName:string,targetTitle:string,createTime:string,commentContent:string,likeNum:number,like_status:number,id:number,targetId:string,targetType:number) { | ||
| 15 | this.fromUserHeader = fromUserHeader | 18 | this.fromUserHeader = fromUserHeader |
| 16 | this.fromUserName = fromUserName | 19 | this.fromUserName = fromUserName |
| 17 | this.commentContent = commentContent | 20 | this.commentContent = commentContent |
| @@ -20,5 +23,7 @@ export class CommentListItem{ | @@ -20,5 +23,7 @@ export class CommentListItem{ | ||
| 20 | this.likeNum = likeNum | 23 | this.likeNum = likeNum |
| 21 | this.like_status = like_status | 24 | this.like_status = like_status |
| 22 | this.id = id | 25 | this.id = id |
| 26 | + this.targetId = targetId | ||
| 27 | + this.targetType = targetType | ||
| 23 | } | 28 | } |
| 24 | } | 29 | } |
| @@ -3,6 +3,7 @@ import { EditInfoModel, EditListInfo, editModel } from '../model/EditInfoModel'; | @@ -3,6 +3,7 @@ import { EditInfoModel, EditListInfo, editModel } from '../model/EditInfoModel'; | ||
| 3 | import HashMap from '@ohos.util.HashMap'; | 3 | import HashMap from '@ohos.util.HashMap'; |
| 4 | import { HttpUrlUtils, ResponseDTO, WDHttp } from 'wdNetwork'; | 4 | import { HttpUrlUtils, ResponseDTO, WDHttp } from 'wdNetwork'; |
| 5 | import { Logger, ResourcesUtils } from 'wdKit'; | 5 | import { Logger, ResourcesUtils } from 'wdKit'; |
| 6 | +import { AreaListManageModel, AreaListModel } from '../model/AreaListModel'; | ||
| 6 | 7 | ||
| 7 | const TAG = "EditInfoViewModel" | 8 | const TAG = "EditInfoViewModel" |
| 8 | 9 | ||
| @@ -27,13 +28,13 @@ class EditInfoViewModel { | @@ -27,13 +28,13 @@ class EditInfoViewModel { | ||
| 27 | } | 28 | } |
| 28 | 29 | ||
| 29 | 30 | ||
| 30 | - getEditListInfo(item:editModel):EditListInfo[]{ | 31 | + getEditListInfo(item?:editModel):EditListInfo[]{ |
| 31 | this.editListData = [ | 32 | this.editListData = [ |
| 32 | - // new EditListInfo('昵称',item&&item.userName?item.userName:'待完善'), | ||
| 33 | - // new EditListInfo('简介',item&&item.userExtend.introduction?item.userExtend.introduction:'待完善'), | ||
| 34 | - // new EditListInfo('地区',item&&item.userExtend.city?item.userExtend.city:'待完善'), | ||
| 35 | - // new EditListInfo('生日',item&&item.userExtend.birthday?item.userExtend.birthday:'待完善'), | ||
| 36 | - // new EditListInfo('性别',item&&item.userExtend.sex?item.userExtend.sex:'待完善'), | 33 | + new EditListInfo('昵称',item&&item.userName?item.userName:'待完善'), |
| 34 | + new EditListInfo('简介',item&&item.userExtend.introduction?item.userExtend.introduction:'待完善'), | ||
| 35 | + new EditListInfo('地区',item&&item.userExtend.city?item.userExtend.city:'待完善'), | ||
| 36 | + new EditListInfo('生日',item&&item.userExtend.birthday?item.userExtend.birthday:'待完善'), | ||
| 37 | + new EditListInfo('性别',item&&item.userExtend.sex?item.userExtend.sex===1?'男':'女':'待完善'), | ||
| 37 | ] | 38 | ] |
| 38 | return this.editListData | 39 | return this.editListData |
| 39 | } | 40 | } |
| @@ -46,10 +47,10 @@ class EditInfoViewModel { | @@ -46,10 +47,10 @@ class EditInfoViewModel { | ||
| 46 | // let editM = navResDTO.data as EditInfoModel | 47 | // let editM = navResDTO.data as EditInfoModel |
| 47 | // success(JSON.parse(navResDTO.data) | 48 | // success(JSON.parse(navResDTO.data) |
| 48 | } | 49 | } |
| 49 | - return this.GetqueryAccountOwnerLocal(context) | 50 | + success(this.GetqueryAccountOwnerLocal(context)) |
| 50 | }).catch((error: Error) => { | 51 | }).catch((error: Error) => { |
| 51 | Logger.info('EditInfoViewModel','EditInfoViewModel','EditInfoViewModel') | 52 | Logger.info('EditInfoViewModel','EditInfoViewModel','EditInfoViewModel') |
| 52 | - return this.GetqueryAccountOwnerLocal(context) | 53 | + success(this.GetqueryAccountOwnerLocal(context)) |
| 53 | 54 | ||
| 54 | }) | 55 | }) |
| 55 | })) | 56 | })) |
| @@ -66,6 +67,38 @@ class EditInfoViewModel { | @@ -66,6 +67,38 @@ class EditInfoViewModel { | ||
| 66 | return compRes.data | 67 | return compRes.data |
| 67 | } | 68 | } |
| 68 | 69 | ||
| 70 | + getAreaList(context: Context):PromiseLike<AreaListModel[]>{ | ||
| 71 | + return new Promise(((success, error) => { | ||
| 72 | + success(this.getAreaListLocal(context)) | ||
| 73 | + // this.BaseGetRequest(HttpUrlUtils.APPOINTMENT_AccountOwner_PATH).then((navResDTO:ResponseDTO) =>{ | ||
| 74 | + // if (navResDTO.code == 200) { | ||
| 75 | + // // let editM = navResDTO.data as EditInfoModel | ||
| 76 | + // // success(JSON.parse(navResDTO.data) | ||
| 77 | + // } | ||
| 78 | + // | ||
| 79 | + // }).catch((error: Error) => { | ||
| 80 | + // Logger.info('EditInfoViewModel','EditInfoViewModel','EditInfoViewModel') | ||
| 81 | + // success(this.GetqueryAccountOwnerLocal(context)) | ||
| 82 | + // | ||
| 83 | + // }) | ||
| 84 | + })) | ||
| 85 | + } | ||
| 86 | + | ||
| 87 | + async getAreaListLocal(context: Context): Promise<AreaListModel[]> { | ||
| 88 | + Logger.info(TAG, `getBottomNavDataMock start`); | ||
| 89 | + let compRes: ResponseDTO<AreaListModel[]> | null = await ResourcesUtils.getResourcesJson<ResponseDTO<AreaListModel[]>>(context,'areaList_data.json'); | ||
| 90 | + if (!compRes || !compRes.data) { | ||
| 91 | + Logger.info(TAG, `getAppointmentListDataLocal compRes is empty`); | ||
| 92 | + return [] as AreaListModel[] | ||
| 93 | + } | ||
| 94 | + Logger.info(TAG, `getAppointmentListDataLocal getResourcesJsonSync compRes : ${JSON.stringify(compRes)}`); | ||
| 95 | + return compRes.data | ||
| 96 | + } | ||
| 97 | + | ||
| 98 | + getAreaListManageModel(item:AreaListModel):AreaListManageModel{ | ||
| 99 | + return new AreaListManageModel(item.code,item.id,item.label,item.children) | ||
| 100 | + } | ||
| 101 | + | ||
| 69 | updateUserInfo(){ | 102 | updateUserInfo(){ |
| 70 | 103 | ||
| 71 | } | 104 | } |
| @@ -69,13 +69,18 @@ export class FollowListDetailItem{ | @@ -69,13 +69,18 @@ export class FollowListDetailItem{ | ||
| 69 | creatorId:string = "" | 69 | creatorId:string = "" |
| 70 | attentionUserId:string = "" | 70 | attentionUserId:string = "" |
| 71 | 71 | ||
| 72 | + cnUserType:string = "" | ||
| 73 | + cnUserId:string = "" | ||
| 74 | + | ||
| 72 | attentionCreatorId:string = "" | 75 | attentionCreatorId:string = "" |
| 76 | + attentionUserType:string = "" | ||
| 77 | + | ||
| 73 | attentionHeadPhotoUrl:string = "" | 78 | attentionHeadPhotoUrl:string = "" |
| 74 | attentionUserName:string = "" | 79 | attentionUserName:string = "" |
| 75 | fansNum :number = 0 | 80 | fansNum :number = 0 |
| 76 | 81 | ||
| 77 | 82 | ||
| 78 | - constructor(headPhotoUrl:string,cnUserName:string,cnFansNum:number,introduction:string,creatorId:string,status:string,attentionUserId:string) { | 83 | + constructor(headPhotoUrl:string,cnUserName:string,cnFansNum:number,introduction:string,creatorId:string,status:string,attentionUserId:string,cnUserType:string,cnUserId:string) { |
| 79 | this.headPhotoUrl = headPhotoUrl | 84 | this.headPhotoUrl = headPhotoUrl |
| 80 | this.cnUserName = cnUserName | 85 | this.cnUserName = cnUserName |
| 81 | this.cnFansNum = cnFansNum | 86 | this.cnFansNum = cnFansNum |
| @@ -83,5 +88,7 @@ export class FollowListDetailItem{ | @@ -83,5 +88,7 @@ export class FollowListDetailItem{ | ||
| 83 | this.creatorId = creatorId | 88 | this.creatorId = creatorId |
| 84 | this.status = status | 89 | this.status = status |
| 85 | this.attentionUserId = attentionUserId | 90 | this.attentionUserId = attentionUserId |
| 91 | + this.cnUserType = cnUserType | ||
| 92 | + this.cnUserId = cnUserId | ||
| 86 | } | 93 | } |
| 87 | } | 94 | } |
| 1 | +// { | ||
| 2 | +// "attentionUserType":"2", | ||
| 3 | +// "attentionUserId":"444911718724933", | ||
| 4 | +// "attentionCreatorId":"3004861", | ||
| 5 | +// "userType":1, | ||
| 6 | +// "userId":"567387477063621", | ||
| 7 | +// "status":1 | ||
| 8 | +// } | ||
| 9 | +export class FollowOperationRequestItem{ | ||
| 10 | + attentionUserType:string = "" | ||
| 11 | + attentionUserId:string = "" | ||
| 12 | + attentionCreatorId:string = "" | ||
| 13 | + userType:string = "" | ||
| 14 | + userId:string = "" | ||
| 15 | + status:number = 1 | ||
| 16 | + | ||
| 17 | + constructor(attentionUserType:string, attentionUserId:string, attentionCreatorId:string, userType:string, userId:string, status:number) { | ||
| 18 | + this.attentionUserType = attentionUserType | ||
| 19 | + this.attentionUserId = attentionUserId | ||
| 20 | + this.attentionCreatorId = attentionCreatorId | ||
| 21 | + this.userType = userType | ||
| 22 | + this.userId = userId | ||
| 23 | + this.status = status | ||
| 24 | + } | ||
| 25 | + | ||
| 26 | +} |
| @@ -18,8 +18,8 @@ export class MineAppointmentItem{ | @@ -18,8 +18,8 @@ export class MineAppointmentItem{ | ||
| 18 | isAppointment:boolean | 18 | isAppointment:boolean |
| 19 | 19 | ||
| 20 | 20 | ||
| 21 | - constructor(imageUrl:string[],status:string,title:string,isAppointment:boolean,timePre:string,timeBack:string,relType:number,appStyle?:string,liveId?:number,planStartTime?:string, | ||
| 22 | - relId?:string,startTime?:string) { | 21 | + constructor(imageUrl:string[],status:string,title:string,isAppointment:boolean,timePre:string,timeBack:string,relType:number,liveId:number, |
| 22 | + relId:string) { | ||
| 23 | this.imageUrl=imageUrl | 23 | this.imageUrl=imageUrl |
| 24 | this.status=status | 24 | this.status=status |
| 25 | this.title=title | 25 | this.title=title |
| @@ -27,5 +27,7 @@ export class MineAppointmentItem{ | @@ -27,5 +27,7 @@ export class MineAppointmentItem{ | ||
| 27 | this.timePre = timePre | 27 | this.timePre = timePre |
| 28 | this.timeBack = timeBack | 28 | this.timeBack = timeBack |
| 29 | this.relType = relType | 29 | this.relType = relType |
| 30 | + this.liveId = liveId | ||
| 31 | + this.relId = relId | ||
| 30 | } | 32 | } |
| 31 | } | 33 | } |
| @@ -119,6 +119,14 @@ | @@ -119,6 +119,14 @@ | ||
| 119 | { | 119 | { |
| 120 | "name": "color_99636363", | 120 | "name": "color_99636363", |
| 121 | "value": "#99636363" | 121 | "value": "#99636363" |
| 122 | + }, | ||
| 123 | + { | ||
| 124 | + "name":"color_648DF2", | ||
| 125 | + "value": "#648DF2" | ||
| 126 | + }, | ||
| 127 | + { | ||
| 128 | + "name":"color_EEEEEE", | ||
| 129 | + "value": "#EEEEEE" | ||
| 122 | } | 130 | } |
| 123 | ] | 131 | ] |
| 124 | } | 132 | } |
248 Bytes
347 Bytes
617 Bytes
1.48 KB
3.36 KB
| 1 | { | 1 | { |
| 2 | - "lockfileVersion": 2, | 2 | + "lockfileVersion": 1, |
| 3 | "ATTENTION": "THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.", | 3 | "ATTENTION": "THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.", |
| 4 | - "specifiers": { | ||
| 5 | - "@ohos/axios@^2.1.1": "@ohos/axios@2.2.0" | ||
| 6 | - }, | ||
| 7 | - "packages": { | ||
| 8 | - "@ohos/axios@2.2.0": { | ||
| 9 | - "resolved": "https://repo.harmonyos.com/ohpm/@ohos/axios/-/axios-2.2.0.har", | ||
| 10 | - "integrity": "sha512-v1QBWk6DfcN8wUW3D0ieFbHTR1taSI5cOgxp5l6B5cegXuNYhSc8ggKlAIXe6h/14LsfM+NW0ZGfSXcNEIM5yA==", | ||
| 11 | - "registryType": "ohpm" | ||
| 12 | - } | ||
| 13 | - } | 4 | + "specifiers": {}, |
| 5 | + "packages": {} | ||
| 14 | } | 6 | } |
| 1 | +import { WDRouterRule } from 'wdRouter'; | ||
| 2 | +import { WDRouterPage } from 'wdRouter'; | ||
| 3 | + | ||
| 4 | +@Entry | ||
| 5 | +@Component | ||
| 6 | +struct GuidePages { | ||
| 7 | + guideImage = [$r('app.media.guide_static1'), $r('app.media.guide_static2'), $r('app.media.guide_static3'), $r('app.media.guide_static4')] | ||
| 8 | + guideTitle = [$r('app.media.guide_title1'), $r('app.media.guide_title2'), $r('app.media.guide_title3'), $r('app.media.guide_title4')] | ||
| 9 | + guideIndex = [$r('app.media.guide_index1'), $r('app.media.guide_index2'), $r('app.media.guide_index3'), $r('app.media.guide_button')] | ||
| 10 | + | ||
| 11 | + build() { | ||
| 12 | + Column() { | ||
| 13 | + Swiper() { | ||
| 14 | + ForEach(this.guideImage, (item: number, index: number) => { | ||
| 15 | + this.ChildItem(index) | ||
| 16 | + | ||
| 17 | + }, (item: number) => JSON.stringify(item)) | ||
| 18 | + }.loop(false) | ||
| 19 | + .indicator(false) | ||
| 20 | + .width('100%') | ||
| 21 | + .height('100%') | ||
| 22 | + }.width('100%') | ||
| 23 | + .height('100%') | ||
| 24 | + | ||
| 25 | + } | ||
| 26 | + | ||
| 27 | + @Builder | ||
| 28 | + ChildItem(index: number) { | ||
| 29 | + RelativeContainer() { | ||
| 30 | + Image(this.guideImage[index]) | ||
| 31 | + .alignRules({ | ||
| 32 | + top: { anchor: "__container__", align: VerticalAlign.Top }, | ||
| 33 | + bottom: { anchor: "__container__", align: VerticalAlign.Bottom } | ||
| 34 | + }) | ||
| 35 | + .width('100%') | ||
| 36 | + .height('100%') | ||
| 37 | + .id('image') | ||
| 38 | + Image(this.guideTitle[index]) | ||
| 39 | + .objectFit(ImageFit.ScaleDown) | ||
| 40 | + .alignRules({ | ||
| 41 | + bottom: { anchor: "__container__", align: VerticalAlign.Bottom }, | ||
| 42 | + left: { anchor: "__container__", align: HorizontalAlign.Start }, | ||
| 43 | + right: { anchor: "__container__", align: HorizontalAlign.End }, | ||
| 44 | + }) | ||
| 45 | + .margin({ left: 60, bottom: 150, right: 60 }) | ||
| 46 | + .alignSelf(ItemAlign.Center) | ||
| 47 | + .id('title') | ||
| 48 | + | ||
| 49 | + Image(this.guideIndex[index]) | ||
| 50 | + .objectFit(ImageFit.ScaleDown) | ||
| 51 | + .alignRules({ | ||
| 52 | + bottom: { anchor: "__container__", align: VerticalAlign.Bottom }, | ||
| 53 | + left: { anchor: "__container__", align: HorizontalAlign.Start }, | ||
| 54 | + right: { anchor: "__container__", align: HorizontalAlign.End }, | ||
| 55 | + | ||
| 56 | + }) | ||
| 57 | + .margin({ bottom: 85 }) | ||
| 58 | + .height(40) | ||
| 59 | + .onClick(() => { | ||
| 60 | + if (index == 3) { | ||
| 61 | + // 跳转到首页 | ||
| 62 | + WDRouterRule.jumpWithReplacePage(WDRouterPage.mainPage) | ||
| 63 | + } | ||
| 64 | + }) | ||
| 65 | + .id('index') | ||
| 66 | + | ||
| 67 | + | ||
| 68 | + }.width('100%').height('100%') | ||
| 69 | + } | ||
| 70 | +} |
| 1 | export interface LoginBean { | 1 | export interface LoginBean { |
| 2 | - // {"code":"0","data":{"firstMark":1,"id":569350079889669,"jwtToken":"eyJhbGciOiJIUzI1NiIsImtpZCI6ImQ4WkI2QkhxSEZrdjJ2U25BNlRwZEdKRjBHcjItVzBvS2FaYzdLOUUycmcifQ.eyJpc3MiOiJwZW9wbGVzLWRhaWx5LWZvdXJhIiwic3ViIjoicGVvcGxlcy1kYWlseS1mb3VyYSIsImV4cCI6MTcxMDY0NzE0MiwidXNlcklkIjo1NjkzNTAwNzk4ODk2NjksInVzZXJWZXJzaW9uIjoiNTY5MzUwMDc5ODg5NjY5XzAiLCJ1c2VyTmFtZSI6IiVFNCVCQSVCQSVFNiVCMCU5MSVFNiU5NyVBNSVFNiU4QSVBNSVFNyVCRCU5MSVFNSU4RiU4QjJrRDJ4VyIsInVzZXJUeXBlIjoxLCJjcmVhdG9ySWQiOm51bGx9.1M0E_6V60opL7AxamGzINpieTHP11fRbiXKDPc-ywWg","longTimeNoLoginMark":0,"refreshToken":"83fe2f1a-77af-4f73-8490-1cebed037f73","status":1,"userName":"人民日报网友2kD2xW","userType":1},"message":"Success","success":true,"timestamp":1710467142214} | 2 | + // {"code":"0", |
| 3 | + // "data":{ | ||
| 4 | + // "firstMark":1, | ||
| 5 | + // "id":569350079889669, | ||
| 6 | + // "jwtToken":"eyJhbGciOiJIUzI1NiIsImtpZCI6ImQ4WkI2QkhxSEZrdjJ2U25BNlRwZEdKRjBHcjItVzBvS2FaYzdLOUUycmcifQ.eyJpc3MiOiJwZW9wbGVzLWRhaWx5LWZvdXJhIiwic3ViIjoicGVvcGxlcy1kYWlseS1mb3VyYSIsImV4cCI6MTcxMDY0NzE0MiwidXNlcklkIjo1NjkzNTAwNzk4ODk2NjksInVzZXJWZXJzaW9uIjoiNTY5MzUwMDc5ODg5NjY5XzAiLCJ1c2VyTmFtZSI6IiVFNCVCQSVCQSVFNiVCMCU5MSVFNiU5NyVBNSVFNiU4QSVBNSVFNyVCRCU5MSVFNSU4RiU4QjJrRDJ4VyIsInVzZXJUeXBlIjoxLCJjcmVhdG9ySWQiOm51bGx9.1M0E_6V60opL7AxamGzINpieTHP11fRbiXKDPc-ywWg", | ||
| 7 | + // "longTimeNoLoginMark":0, | ||
| 8 | + // "refreshToken":"83fe2f1a-77af-4f73-8490-1cebed037f73", | ||
| 9 | + // "status":1, | ||
| 10 | + // "userName":"人民日报网友2kD2xW", | ||
| 11 | + // "userType":1 | ||
| 12 | + // },"message":"Success","success":true,"timestamp":1710467142214} | ||
| 3 | firstMark: number | 13 | firstMark: number |
| 4 | id: number | 14 | id: number |
| 5 | jwtToken: string | 15 | jwtToken: string |
| @@ -202,6 +202,7 @@ export class LoginModel { | @@ -202,6 +202,7 @@ export class LoginModel { | ||
| 202 | let JwtToken = SPHelper.default.getSync(SpConstants.USER_JWT_TOKEN, '') as string; | 202 | let JwtToken = SPHelper.default.getSync(SpConstants.USER_JWT_TOKEN, '') as string; |
| 203 | 203 | ||
| 204 | headers.set('JwtToken',(JwtToken)); | 204 | headers.set('JwtToken',(JwtToken)); |
| 205 | + headers.set('rmrb-x-token',(JwtToken)); | ||
| 205 | return new Promise<string>((success, fail) => { | 206 | return new Promise<string>((success, fail) => { |
| 206 | HttpRequest.post<ResponseDTO<string>>(HttpUrlUtils.getForgetPasswordUrl(), bean, headers).then((data: ResponseDTO<string>) => { | 207 | HttpRequest.post<ResponseDTO<string>>(HttpUrlUtils.getForgetPasswordUrl(), bean, headers).then((data: ResponseDTO<string>) => { |
| 207 | if (!data || !data.data) { | 208 | if (!data || !data.data) { |
| @@ -188,6 +188,7 @@ export struct SettingPasswordLayout { | @@ -188,6 +188,7 @@ export struct SettingPasswordLayout { | ||
| 188 | Row() { | 188 | Row() { |
| 189 | TextInput({ placeholder: item.inputPlacholder }) | 189 | TextInput({ placeholder: item.inputPlacholder }) |
| 190 | .type(InputType.Password) | 190 | .type(InputType.Password) |
| 191 | + .showPasswordIcon(false) | ||
| 191 | .backgroundColor('#00000000') | 192 | .backgroundColor('#00000000') |
| 192 | .onChange((value: string) => { | 193 | .onChange((value: string) => { |
| 193 | this.inputTextChange(value, item.inputTag) | 194 | this.inputTextChange(value, item.inputTag) |
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
| @@ -5,6 +5,7 @@ | @@ -5,6 +5,7 @@ | ||
| 5 | "pages/login/ForgetPasswordPage", | 5 | "pages/login/ForgetPasswordPage", |
| 6 | "pages/login/LoginProtocolWebview", | 6 | "pages/login/LoginProtocolWebview", |
| 7 | "pages/login/SettingPasswordPage", | 7 | "pages/login/SettingPasswordPage", |
| 8 | - "pages/login/SettingPasswordLayout" | 8 | + "pages/login/SettingPasswordLayout", |
| 9 | + "pages/guide/GuidePages" | ||
| 9 | ] | 10 | ] |
| 10 | } | 11 | } |
| @@ -32,7 +32,8 @@ export default class EntryAbility extends UIAbility { | @@ -32,7 +32,8 @@ export default class EntryAbility extends UIAbility { | ||
| 32 | .catch((err: Error) => { | 32 | .catch((err: Error) => { |
| 33 | hilog.error(0x0000, 'testTag', `setPreferredOrientation catch, error error.name : ${err.name}, error.message:${err.message}`); | 33 | hilog.error(0x0000, 'testTag', `setPreferredOrientation catch, error error.name : ${err.name}, error.message:${err.message}`); |
| 34 | }) | 34 | }) |
| 35 | - windowStage.loadContent('pages/MainPage', (err, data) => { | 35 | + //../../../../../../features/wdLogin/src/main/ets/pages/launchPage/LaunchPage |
| 36 | + windowStage.loadContent('pages/launchPage/LaunchPage', (err, data) => { | ||
| 36 | if (err.code) { | 37 | if (err.code) { |
| 37 | hilog.error(0x0000, 'testTag', 'Failed to load the content. Cause: %{public}s', JSON.stringify(err) ?? ''); | 38 | hilog.error(0x0000, 'testTag', 'Failed to load the content. Cause: %{public}s', JSON.stringify(err) ?? ''); |
| 38 | return; | 39 | return; |
| @@ -4,6 +4,7 @@ import { BreakpointConstants } from 'wdConstant'; | @@ -4,6 +4,7 @@ import { BreakpointConstants } from 'wdConstant'; | ||
| 4 | import { BreakpointSystem, Logger } from 'wdKit'; | 4 | import { BreakpointSystem, Logger } from 'wdKit'; |
| 5 | import router from '@ohos.router'; | 5 | import router from '@ohos.router'; |
| 6 | 6 | ||
| 7 | + | ||
| 7 | const TAG = 'MainPage'; | 8 | const TAG = 'MainPage'; |
| 8 | 9 | ||
| 9 | @Entry | 10 | @Entry |
| 1 | +import featureAbility from '@ohos.ability.featureAbility'; | ||
| 2 | +import fs from '@ohos.file.fs'; | ||
| 3 | +import audio from '@ohos.multimedia.audio'; | ||
| 4 | + | ||
| 5 | + | ||
| 6 | +@Entry | ||
| 7 | +@Component | ||
| 8 | +struct AudioDetail { | ||
| 9 | + @State message: string = '大自然的奇迹展览在中国国家博物馆拉开帷幕'; | ||
| 10 | + @State iocClock: string = '定时'; | ||
| 11 | + @State iconTheOriginal: string = '原文'; | ||
| 12 | + @State iconList: string = '列表'; | ||
| 13 | + @State text:string='' | ||
| 14 | + @State outSetValueOne:number = 40 | ||
| 15 | + @State showList:boolean = false | ||
| 16 | + controller:TextInputController = new TextInputController() | ||
| 17 | + | ||
| 18 | + build() { | ||
| 19 | + Column(){ | ||
| 20 | + Row(){ | ||
| 21 | + Column() { | ||
| 22 | + // 封面 | ||
| 23 | + Row() { | ||
| 24 | + Image($r('app.media.audio')) | ||
| 25 | + .width(240) | ||
| 26 | + .height(160) | ||
| 27 | + .borderRadius('0.00vp') | ||
| 28 | + } | ||
| 29 | + .justifyContent(FlexAlign.Center) | ||
| 30 | + .width('100%') | ||
| 31 | + .margin({ top: 64 }) | ||
| 32 | + // 标题 | ||
| 33 | + Row() { | ||
| 34 | + Text(this.message) | ||
| 35 | + .fontSize(20) | ||
| 36 | + .fontWeight(FontWeight.Bold) | ||
| 37 | + .fontColor('#ffffff') | ||
| 38 | + .textAlign(TextAlign.Center) | ||
| 39 | + .lineHeight(28) | ||
| 40 | + .fontFamily('PingFang SC, PingFang SC') | ||
| 41 | + } | ||
| 42 | + .padding({ left: 34, right: 34 }) | ||
| 43 | + .margin({ top: 32 }) | ||
| 44 | + // 操作矩阵 | ||
| 45 | + Row() { | ||
| 46 | + // 定时 | ||
| 47 | + Column() { | ||
| 48 | + Image($r('app.media.clock')) | ||
| 49 | + .width(28) | ||
| 50 | + .height(28) | ||
| 51 | + Text(this.iocClock) | ||
| 52 | + .fontColor('#fff') | ||
| 53 | + .fontSize(12) | ||
| 54 | + .lineHeight(16) | ||
| 55 | + .margin(2) | ||
| 56 | + } | ||
| 57 | + // 原文 | ||
| 58 | + Column() { | ||
| 59 | + Image($r('app.media.theOriginal')) | ||
| 60 | + .width(28) | ||
| 61 | + .height(28) | ||
| 62 | + Text(this.iconTheOriginal) | ||
| 63 | + .fontColor('#fff') | ||
| 64 | + .fontSize(12) | ||
| 65 | + .lineHeight(16) | ||
| 66 | + .margin(2) | ||
| 67 | + } | ||
| 68 | + // 列表 | ||
| 69 | + Column() { | ||
| 70 | + Image($r('app.media.list')) | ||
| 71 | + .width(28) | ||
| 72 | + .height(28) | ||
| 73 | + Text(this.iconList) | ||
| 74 | + .fontColor('#fff') | ||
| 75 | + .fontSize(12) | ||
| 76 | + .lineHeight(16) | ||
| 77 | + .margin(2) | ||
| 78 | + } | ||
| 79 | + .onClick(()=>{ | ||
| 80 | + this.showList = !this.showList | ||
| 81 | + console.log('列表',this.showList) | ||
| 82 | + }) | ||
| 83 | + } | ||
| 84 | + .width('100%') | ||
| 85 | + .padding({ left: 49, right: 49 }) | ||
| 86 | + .justifyContent(FlexAlign.SpaceBetween) | ||
| 87 | + .margin({ top: 60 }) | ||
| 88 | + // 进度条 | ||
| 89 | + Row(){ | ||
| 90 | + Slider({ | ||
| 91 | + value: this.outSetValueOne, | ||
| 92 | + min: 0, | ||
| 93 | + max: 100, | ||
| 94 | + style: SliderStyle.OutSet | ||
| 95 | + }) | ||
| 96 | + .trackColor('rgba(0,0,0,0.5)') | ||
| 97 | + .selectedColor('#ED2800') | ||
| 98 | + .showTips(true) | ||
| 99 | + .onChange((value: number, mode: SliderChangeMode) => { | ||
| 100 | + this.outSetValueOne = value | ||
| 101 | + console.info('value:' + value + 'mode:' + mode.toString()) | ||
| 102 | + }) | ||
| 103 | + } | ||
| 104 | + .width('100%') | ||
| 105 | + .padding({left:24,right:24}) | ||
| 106 | + .margin({top:110}) | ||
| 107 | + // 播放按钮 | ||
| 108 | + Row(){ | ||
| 109 | + Image($r('app.media.loop')) | ||
| 110 | + .width(24) | ||
| 111 | + .height(24) | ||
| 112 | + Image($r('app.media.Backward')) | ||
| 113 | + .width(24) | ||
| 114 | + .height(24) | ||
| 115 | + Image($r('app.media.play')) | ||
| 116 | + .width(60) | ||
| 117 | + .height(60) | ||
| 118 | + .backgroundColor('rgba(255,255,255,0.1)') | ||
| 119 | + .padding(14) | ||
| 120 | + .borderRadius(50) | ||
| 121 | + Image($r('app.media.fastForward')) | ||
| 122 | + .width(24) | ||
| 123 | + .height(24) | ||
| 124 | + Image($r('app.media.doubleSpeed')) | ||
| 125 | + .width(24) | ||
| 126 | + .height(24) | ||
| 127 | + } | ||
| 128 | + .width('100%') | ||
| 129 | + .justifyContent(FlexAlign.SpaceBetween) | ||
| 130 | + .margin({top:56}) | ||
| 131 | + .padding({left:32,right:32}) | ||
| 132 | + } | ||
| 133 | + } | ||
| 134 | + .height('100%-56') | ||
| 135 | + | ||
| 136 | + Row(){ | ||
| 137 | + Image($r('app.media.leftArrow')) | ||
| 138 | + .width(24) | ||
| 139 | + .height(24) | ||
| 140 | + TextInput({text:this.text,placeholder:'input your word...',controller:this.controller}) | ||
| 141 | + .placeholderColor('#999999') | ||
| 142 | + .placeholderFont({size:12,weight:400}) | ||
| 143 | + .caretColor(Color.White) | ||
| 144 | + .height(30) | ||
| 145 | + .width(115) | ||
| 146 | + .fontSize(12) | ||
| 147 | + .fontColor('#999999') | ||
| 148 | + .backgroundColor('rgba(255,255,255,0.1)') | ||
| 149 | + | ||
| 150 | + .onChange((value:string)=>{ | ||
| 151 | + this.text = value | ||
| 152 | + }) | ||
| 153 | + // 消息 | ||
| 154 | + Badge({ | ||
| 155 | + count:100, | ||
| 156 | + style:{badgeSize:6,badgeColor:'#FA2A2D'}, | ||
| 157 | + }){ | ||
| 158 | + Image($r('app.media.news')) | ||
| 159 | + .width(24) | ||
| 160 | + .height(24) | ||
| 161 | + } | ||
| 162 | + | ||
| 163 | + // 点赞 | ||
| 164 | + Badge({ | ||
| 165 | + count:100, | ||
| 166 | + style:{badgeSize:6,badgeColor:'#FA2A2D'}, | ||
| 167 | + }){ | ||
| 168 | + Image($r('app.media.like')) | ||
| 169 | + .width(24) | ||
| 170 | + .height(24) | ||
| 171 | + } | ||
| 172 | + | ||
| 173 | + // 收藏 | ||
| 174 | + Image($r('app.media.collection')) | ||
| 175 | + .width(24) | ||
| 176 | + .height(24) | ||
| 177 | + // 分享 | ||
| 178 | + Image($r('app.media.share')) | ||
| 179 | + .width(24) | ||
| 180 | + .height(24) | ||
| 181 | + } | ||
| 182 | + .height(56) | ||
| 183 | + .width('100%') | ||
| 184 | + .padding(13) | ||
| 185 | + .justifyContent(FlexAlign.SpaceBetween) | ||
| 186 | + | ||
| 187 | + // 播放列表 | ||
| 188 | + // Panel(this.showList) { // 展示日程 | ||
| 189 | + // Column() { | ||
| 190 | + // Text('Today Calendar') | ||
| 191 | + // Divider() | ||
| 192 | + // Text('1. afternoon 4:00 The project meeting') | ||
| 193 | + // } | ||
| 194 | + // } | ||
| 195 | + // .type(PanelType.Foldable).mode(PanelMode.Half) | ||
| 196 | + // .dragBar(true) // 默认开启 | ||
| 197 | + // .halfHeight(500) // 默认一半 | ||
| 198 | + // .onChange((width: number, height: number, mode: PanelMode) => { | ||
| 199 | + // console.info(`width:${width},height:${height},mode:${mode}`) | ||
| 200 | + // }) | ||
| 201 | + } | ||
| 202 | + .height('100%') | ||
| 203 | + .backgroundColor('#20272E') | ||
| 204 | + .justifyContent(FlexAlign.SpaceBetween) | ||
| 205 | + | ||
| 206 | + } | ||
| 207 | +} |
| 1 | import { Logger } from 'wdKit'; | 1 | import { Logger } from 'wdKit'; |
| 2 | import { MultiPictureDetailPageComponent } from 'wdComponent'; | 2 | import { MultiPictureDetailPageComponent } from 'wdComponent'; |
| 3 | +import router from '@ohos.router'; | ||
| 4 | +import { Params, Action } from 'wdBean'; | ||
| 3 | 5 | ||
| 4 | const TAG = 'MultiPictureDetailPage'; | 6 | const TAG = 'MultiPictureDetailPage'; |
| 5 | 7 | ||
| @@ -10,10 +12,18 @@ const TAG = 'MultiPictureDetailPage'; | @@ -10,10 +12,18 @@ const TAG = 'MultiPictureDetailPage'; | ||
| 10 | @Component | 12 | @Component |
| 11 | struct MultiPictureDetailPage { | 13 | struct MultiPictureDetailPage { |
| 12 | 14 | ||
| 15 | + @State relId: string = '' | ||
| 16 | + @State contentId: string = '' | ||
| 17 | + @State relType: string = '' | ||
| 18 | + | ||
| 13 | build() { | 19 | build() { |
| 14 | Row() { | 20 | Row() { |
| 15 | Column() { | 21 | Column() { |
| 16 | - MultiPictureDetailPageComponent() | 22 | + MultiPictureDetailPageComponent({ |
| 23 | + relId: this.relId, | ||
| 24 | + contentId: this.contentId, | ||
| 25 | + relType: this.relType | ||
| 26 | + }) | ||
| 17 | } | 27 | } |
| 18 | } | 28 | } |
| 19 | } | 29 | } |
| @@ -28,7 +38,13 @@ struct MultiPictureDetailPage { | @@ -28,7 +38,13 @@ struct MultiPictureDetailPage { | ||
| 28 | } | 38 | } |
| 29 | 39 | ||
| 30 | aboutToAppear() { | 40 | aboutToAppear() { |
| 41 | + let par:Action = router.getParams() as Action; | ||
| 42 | + let params = par?.params; | ||
| 43 | + this.relId = params?.extra?.relId || ''; | ||
| 44 | + this.relType = params?.extra?.relType || ''; | ||
| 45 | + this.contentId = params?.contentID || ''; | ||
| 31 | Logger.info(TAG, 'aboutToAppear'); | 46 | Logger.info(TAG, 'aboutToAppear'); |
| 47 | + Logger.info(TAG, 'params', JSON.stringify(params)); | ||
| 32 | } | 48 | } |
| 33 | 49 | ||
| 34 | aboutToDisappear() { | 50 | aboutToDisappear() { |
| 1 | +import router from '@ohos.router' | ||
| 2 | +import { WDRouterRule } from 'wdRouter'; | ||
| 3 | +import { WDRouterPage } from 'wdRouter'; | ||
| 4 | +@Entry | ||
| 5 | +@Component | ||
| 6 | +struct LaunchAdvertisingPage { | ||
| 7 | + @State time: number = 4 | ||
| 8 | + timer :number = -1 | ||
| 9 | + | ||
| 10 | + enter() { | ||
| 11 | + // router.replaceUrl({ | ||
| 12 | + // url:'pages/MainPage' | ||
| 13 | + // }) | ||
| 14 | + WDRouterRule.jumpWithReplacePage(WDRouterPage.mainPage) | ||
| 15 | + } | ||
| 16 | + | ||
| 17 | + onPageShow(){ | ||
| 18 | + this.timer = setInterval(() => { | ||
| 19 | + this.time-- | ||
| 20 | + if (this.time < 1) { | ||
| 21 | + this.enter() | ||
| 22 | + clearInterval(this.timer) | ||
| 23 | + } | ||
| 24 | + },1000) | ||
| 25 | + | ||
| 26 | + } | ||
| 27 | + | ||
| 28 | + build(){ | ||
| 29 | + Column(){ | ||
| 30 | + Stack({alignContent:Alignment.Bottom}){ | ||
| 31 | + | ||
| 32 | + Stack({alignContent:Alignment.Bottom}){ | ||
| 33 | + Column(){ | ||
| 34 | + Image($r('app.media.app_icon')) | ||
| 35 | + .margin({ | ||
| 36 | + top:'128lpx',left:'48lpx',right:'48lpx',bottom:'128lpx' | ||
| 37 | + }) | ||
| 38 | + } | ||
| 39 | + .justifyContent(FlexAlign.Center) | ||
| 40 | + .width('100%') | ||
| 41 | + .height('100%') | ||
| 42 | + .margin({ | ||
| 43 | + bottom: 0 | ||
| 44 | + }) | ||
| 45 | + | ||
| 46 | + Stack({alignContent:Alignment.TopEnd}){ | ||
| 47 | + Button(){ | ||
| 48 | + Text(this.time + 's 跳过') | ||
| 49 | + .fontSize('27lpx') | ||
| 50 | + .fontColor(Color.White) | ||
| 51 | + .margin({left:'28lpx',right:'28lpx'}) | ||
| 52 | + | ||
| 53 | + } | ||
| 54 | + .width('148lpx') | ||
| 55 | + .height('56lpx') | ||
| 56 | + .margin({top:'54lpx',right:'19lpx'}) | ||
| 57 | + .backgroundColor('#80000000') | ||
| 58 | + .onClick(() => { | ||
| 59 | + this.enter() | ||
| 60 | + }) | ||
| 61 | + } | ||
| 62 | + .width('100%') | ||
| 63 | + .height('100%') | ||
| 64 | + | ||
| 65 | + Button(){ | ||
| 66 | + Row(){ | ||
| 67 | + Text('点击跳转至详情或第三方应用') | ||
| 68 | + .fontSize('31lpx') | ||
| 69 | + .fontColor(Color.White) | ||
| 70 | + .margin({ | ||
| 71 | + left:'55lpx' | ||
| 72 | + }) | ||
| 73 | + Image($r('app.media.Slice')) | ||
| 74 | + .width('46lpx') | ||
| 75 | + .height('46lpx') | ||
| 76 | + .margin({right:'55lpx'}) | ||
| 77 | + }.alignItems(VerticalAlign.Center) | ||
| 78 | + } | ||
| 79 | + .width('566lpx') | ||
| 80 | + .height('111lpx') | ||
| 81 | + .margin({ | ||
| 82 | + bottom: '51lpx' | ||
| 83 | + }) | ||
| 84 | + .backgroundColor('#80000000') | ||
| 85 | + | ||
| 86 | + } | ||
| 87 | + | ||
| 88 | + } | ||
| 89 | + .width('100%') | ||
| 90 | + .height('84%') | ||
| 91 | + .backgroundColor('#FF6C75') | ||
| 92 | + .margin({top:'0'}) | ||
| 93 | + | ||
| 94 | + Image($r('app.media.LaunchPage_logo')) | ||
| 95 | + .width('278lpx') | ||
| 96 | + .height('154lpx') | ||
| 97 | + .margin({bottom: '48lpx'}) | ||
| 98 | + } | ||
| 99 | + .width('100%') | ||
| 100 | + .height('100%') | ||
| 101 | + .backgroundColor(Color.White) | ||
| 102 | + | ||
| 103 | + } | ||
| 104 | + | ||
| 105 | + | ||
| 106 | + | ||
| 107 | + | ||
| 108 | +} |
| 1 | +import media from '@ohos.multimedia.media' | ||
| 2 | +import App from '@system.app' | ||
| 3 | +import Router from '@system.router' | ||
| 4 | +import router from '@ohos.router' | ||
| 5 | +import common from '@ohos.app.ability.common' | ||
| 6 | +import CustomDialogComponent from '../view/CustomDialogComponent' | ||
| 7 | +import preferences from '@ohos.data.preferences' | ||
| 8 | +import { GlobalContext } from '../../utils/GlobalContext' | ||
| 9 | +import { WDRouterRule } from 'wdRouter'; | ||
| 10 | +import { WDRouterPage } from 'wdRouter'; | ||
| 11 | + | ||
| 12 | +@Entry | ||
| 13 | +@Component | ||
| 14 | +struct LaunchPage { | ||
| 15 | + private context?: common.UIAbilityContext; | ||
| 16 | + private timerId: number = 0; | ||
| 17 | + private isJumpToAdvertising: boolean = false; | ||
| 18 | + private isJumpToGuide: boolean = false; | ||
| 19 | + | ||
| 20 | + dialogController: CustomDialogController = new CustomDialogController({ | ||
| 21 | + builder: CustomDialogComponent( | ||
| 22 | + { | ||
| 23 | + cancel: () => { | ||
| 24 | + this.onCancel(); | ||
| 25 | + }, | ||
| 26 | + confirm: () => { | ||
| 27 | + this.onConfirm(); | ||
| 28 | + } | ||
| 29 | + }), | ||
| 30 | + alignment: DialogAlignment.Center, | ||
| 31 | + offset: { dx: 0, dy: '-24' }, | ||
| 32 | + customStyle: true, | ||
| 33 | + autoCancel: false | ||
| 34 | + }); | ||
| 35 | + | ||
| 36 | + onCancel() { | ||
| 37 | + // Exit the application. | ||
| 38 | + this.context?.terminateSelf(); | ||
| 39 | + } | ||
| 40 | + | ||
| 41 | + onConfirm() { | ||
| 42 | + // Save privacy agreement status. | ||
| 43 | + this.saveIsPrivacy(); | ||
| 44 | + //跳转引导页 | ||
| 45 | + this.jumpToGuidePage(); | ||
| 46 | + | ||
| 47 | + } | ||
| 48 | + | ||
| 49 | + jumpToAdvertisingPage() { | ||
| 50 | + this.timerId = setTimeout(() => { | ||
| 51 | + this.isJumpToAdvertising = true; | ||
| 52 | + | ||
| 53 | + WDRouterRule.jumpWithPage(WDRouterPage.launchAdvertisingPage) | ||
| 54 | + | ||
| 55 | + // router.pushUrl({ | ||
| 56 | + // url: 'pages/LaunchAdvertisingPage' | ||
| 57 | + // }).catch((error: Error) => { | ||
| 58 | + // //Logger.error(CommonConstants.LAUNCHER_PAGE_TAG, 'LauncherPage pushUrl error ' + JSON.stringify(error)); | ||
| 59 | + // }); | ||
| 60 | + }, 1000); | ||
| 61 | + } | ||
| 62 | + | ||
| 63 | + jumpToGuidePage() { | ||
| 64 | + this.timerId = setTimeout(() => { | ||
| 65 | + this.isJumpToGuide = true; | ||
| 66 | + | ||
| 67 | + WDRouterRule.jumpWithPage(WDRouterPage.guidePage) | ||
| 68 | + | ||
| 69 | + // router.pushUrl({ | ||
| 70 | + // url: 'pages/LaunchAdvertisingPage' | ||
| 71 | + // }).catch((error: Error) => { | ||
| 72 | + // //Logger.error(CommonConstants.LAUNCHER_PAGE_TAG, 'LauncherPage pushUrl error ' + JSON.stringify(error)); | ||
| 73 | + // }); | ||
| 74 | + }, 1000); | ||
| 75 | + } | ||
| 76 | + | ||
| 77 | + | ||
| 78 | + onPageShow() { | ||
| 79 | + this.context = getContext(this) as common.UIAbilityContext; | ||
| 80 | + // Get the operation class for saving data. | ||
| 81 | + this.getDataPreferences(this).then((preferences: preferences.Preferences) => { | ||
| 82 | + preferences.get('isPrivacy', true).then((value: preferences.ValueType) => { | ||
| 83 | + //Logger.info(CommonConstants.LAUNCHER_PAGE_TAG, 'onPageShow value: ' + value); | ||
| 84 | + if (value) { | ||
| 85 | + // let isJumpPrivacy: boolean = globalThis.isJumpPrivacy ?? false; | ||
| 86 | + // let isJumpPrivacy: boolean = (GlobalContext.getContext().getObject('isJumpPrivacy') as boolean) ?? false; | ||
| 87 | + //if (!isJumpPrivacy) { | ||
| 88 | + this.dialogController.open(); | ||
| 89 | + // } | ||
| 90 | + } else { | ||
| 91 | + //跳转广告页 | ||
| 92 | + this.jumpToAdvertisingPage(); | ||
| 93 | + | ||
| 94 | + } | ||
| 95 | + }); | ||
| 96 | + }); | ||
| 97 | + } | ||
| 98 | + | ||
| 99 | + onPageHide() { | ||
| 100 | + if (this.isJumpToAdvertising) { | ||
| 101 | + router.clear(); | ||
| 102 | + } | ||
| 103 | + if (this.isJumpToGuide) { | ||
| 104 | + router.clear(); | ||
| 105 | + } | ||
| 106 | + // globalThis.isJumpPrivacy = true; | ||
| 107 | + // GlobalContext.getContext().setObject('isJumpPrivacy', true); | ||
| 108 | + clearTimeout(this.timerId); | ||
| 109 | + this.dialogController.close(); | ||
| 110 | + } | ||
| 111 | + | ||
| 112 | + getDataPreferences(common: Object) { | ||
| 113 | + return preferences.getPreferences(getContext(common), 'myStore'); | ||
| 114 | + } | ||
| 115 | + | ||
| 116 | + saveIsPrivacy() { | ||
| 117 | + let preferences: Promise<preferences.Preferences> = this.getDataPreferences(this); | ||
| 118 | + preferences.then((result: preferences.Preferences) => { | ||
| 119 | + let privacyPut = result.put('isPrivacy', false); | ||
| 120 | + result.flush(); | ||
| 121 | + privacyPut.then(() => { | ||
| 122 | + //Logger.info('LauncherPage', 'Put the value of startup Successfully.'); | ||
| 123 | + }).catch((err: Error) => { | ||
| 124 | + //Logger.error('LauncherPage', 'Put the value of startup Failed, err: ' + err); | ||
| 125 | + }); | ||
| 126 | + }).catch((err: Error) => { | ||
| 127 | + //Logger.error('LauncherPage', 'Get the preferences Failed, err: ' + err); | ||
| 128 | + }); | ||
| 129 | + } | ||
| 130 | + | ||
| 131 | + build(){ | ||
| 132 | + | ||
| 133 | + Stack({alignContent:Alignment.Bottom}){ | ||
| 134 | + Image($r('app.media.app_icon')) | ||
| 135 | + .width('278lpx') | ||
| 136 | + .height('154lpx') | ||
| 137 | + .margin({ | ||
| 138 | + bottom:'48lpx' | ||
| 139 | + }) | ||
| 140 | + | ||
| 141 | + } | ||
| 142 | + .width('100%') | ||
| 143 | + .height('100%') | ||
| 144 | + .backgroundColor(Color.White) | ||
| 145 | + | ||
| 146 | + | ||
| 147 | + } | ||
| 148 | + | ||
| 149 | + | ||
| 150 | + | ||
| 151 | +} |
| 1 | + | ||
| 2 | +import webview from '@ohos.web.webview'; | ||
| 3 | +import router from '@ohos.router'; | ||
| 4 | +import { GlobalContext } from '../../utils/GlobalContext' | ||
| 5 | +import { WDRouterRule } from 'wdRouter'; | ||
| 6 | + | ||
| 7 | +@Entry | ||
| 8 | +@Component | ||
| 9 | +struct PrivacyPage { | ||
| 10 | + @State message: string = 'Hello World' | ||
| 11 | + webController: webview.WebviewController = new webview.WebviewController(); | ||
| 12 | + //@State params: object = router.getParams(); | ||
| 13 | + | ||
| 14 | + build() { | ||
| 15 | + Row() { | ||
| 16 | + Column() { | ||
| 17 | + // Web component loading H5. | ||
| 18 | + Web({ src: 'https://www.baidu.com', controller: this.webController }) | ||
| 19 | + .zoomAccess(false) | ||
| 20 | + .width('100%') | ||
| 21 | + .height('100%') | ||
| 22 | + .aspectRatio(1) | ||
| 23 | + // .onConfirm((event) => { | ||
| 24 | + // AlertDialog.show({ | ||
| 25 | + // message: Const.WEB_ALERT_DIALOG_TEXT_VALUE + event?.message, | ||
| 26 | + // confirm: { | ||
| 27 | + // value: $r('app.string.web_alert_dialog_button_value'), | ||
| 28 | + // action: () => { | ||
| 29 | + // event?.result.handleConfirm(); | ||
| 30 | + // } | ||
| 31 | + // }, | ||
| 32 | + // cancel: () => { | ||
| 33 | + // event?.result.handleCancel(); | ||
| 34 | + // } | ||
| 35 | + // }); | ||
| 36 | + // return true; | ||
| 37 | + // }) | ||
| 38 | + // .onErrorReceive((event) => { | ||
| 39 | + // if (event?.error.getErrorInfo() === 'ERR_INTERNET_DISCONNECTED') { | ||
| 40 | + // prompt.showToast({ | ||
| 41 | + // message: $r('app.string.internet_err'), | ||
| 42 | + // duration: Const.WebConstant_DURATION | ||
| 43 | + // }) | ||
| 44 | + // } | ||
| 45 | + // if (event?.error.getErrorInfo() === 'ERR_CONNECTION_TIMED_OUT') { | ||
| 46 | + // prompt.showToast({ | ||
| 47 | + // message: $r('app.string.internet_err'), | ||
| 48 | + // duration: Const.WebConstant_DURATION | ||
| 49 | + // }) | ||
| 50 | + // } | ||
| 51 | + // }) | ||
| 52 | + // .onProgressChange((event) => { | ||
| 53 | + // if (event?.newProgress === Const.WebConstant_PROGRESS_MAX) { | ||
| 54 | + // this.isLoading = false; | ||
| 55 | + // clearInterval(this.intervalLoading); | ||
| 56 | + // this.intervalLoading = -1; | ||
| 57 | + // } | ||
| 58 | + // }) | ||
| 59 | + } | ||
| 60 | + .width('100%') | ||
| 61 | + } | ||
| 62 | + .height('100%') | ||
| 63 | + } | ||
| 64 | +} |
| 1 | +import router from '@ohos.router'; | ||
| 2 | +import { GlobalContext } from '../../utils/GlobalContext' | ||
| 3 | +import { NavigatorModel } from '../viewModel/NavigatorModel'; | ||
| 4 | +import { WDRouterRule } from 'wdRouter'; | ||
| 5 | +import { WDRouterPage } from 'wdRouter'; | ||
| 6 | +@CustomDialog | ||
| 7 | +export default struct CustomDialogComponent { | ||
| 8 | + | ||
| 9 | + controller: CustomDialogController = new CustomDialogController({'builder': ''}) | ||
| 10 | + cancel: Function = () => {} | ||
| 11 | + confirm: Function = () => {} | ||
| 12 | + | ||
| 13 | + | ||
| 14 | + build(){ | ||
| 15 | + Column(){ | ||
| 16 | + Text($r('app.string.dialog_text_title')) | ||
| 17 | + .width("90%") | ||
| 18 | + .fontColor($r('app.color.dialog_text_color')) | ||
| 19 | + .fontSize($r('app.float.dialog_text_privacy_size')) | ||
| 20 | + .textAlign(TextAlign.Center) | ||
| 21 | + .fontWeight('500') | ||
| 22 | + .margin({ | ||
| 23 | + top: $r('app.float.dialog_text_privacy_top'), | ||
| 24 | + bottom: $r('app.float.dialog_text_privacy_bottom') | ||
| 25 | + }) | ||
| 26 | + Text($r('app.string.dialog_text_subTitle')) | ||
| 27 | + .fontSize($r('app.float.dialog_common_text_size')) | ||
| 28 | + .width('90%') | ||
| 29 | + Text($r('app.string.dialog_text_privacy_content')) | ||
| 30 | + .fontSize($r('app.float.dialog_common_text_size')) | ||
| 31 | + .width('90%') | ||
| 32 | + Row(){ | ||
| 33 | + | ||
| 34 | + // Button(){ | ||
| 35 | + // Text($r('app.string.privacy_text_title_policy')) | ||
| 36 | + // .fontSize('27lpx') | ||
| 37 | + // .fontColor(Color.Red) | ||
| 38 | + // .margin({left:'10lpx',right:'10lpx'}) | ||
| 39 | + // } | ||
| 40 | + // .width('90%') | ||
| 41 | + // .height('56lpx') | ||
| 42 | + // .margin({top:'54lpx',right:'19lpx'}) | ||
| 43 | + // .backgroundColor('#80000000') | ||
| 44 | + // .onClick(() => { | ||
| 45 | + // | ||
| 46 | + // }) | ||
| 47 | + // Button(){ | ||
| 48 | + // Text($r('app.string.privacy_text_title_protocol')) | ||
| 49 | + // .fontSize('27lpx') | ||
| 50 | + // .fontColor(Color.Red) | ||
| 51 | + // .margin({left:'10lpx',right:'10lpx'}) | ||
| 52 | + // } | ||
| 53 | + // .width('90%') | ||
| 54 | + // .height('56lpx') | ||
| 55 | + // .margin({top:'54lpx',right:'19lpx'}) | ||
| 56 | + // .backgroundColor('#80000000') | ||
| 57 | + // .onClick(() => { | ||
| 58 | + // | ||
| 59 | + // }) | ||
| 60 | + | ||
| 61 | + // Navigator({ target: 'pages/PrivacyPage', type: NavigationType.Push }) { | ||
| 62 | + // Button($r('app.string.privacy_text_title_policy')) | ||
| 63 | + // .onClick(()=>{ | ||
| 64 | + // GlobalContext.getContext().setObject('isJumpPrivacy', true); | ||
| 65 | + // }) | ||
| 66 | + // { | ||
| 67 | + // // Text($r('app.string.privacy_text_title_policy')) | ||
| 68 | + // // .fontSize($r('app.float.dialog_common_text_size')) | ||
| 69 | + // // .width('50%') | ||
| 70 | + // // .fontColor(Color.Red) | ||
| 71 | + // // .onClick(() => { | ||
| 72 | + // // GlobalContext.getContext().setObject('isJumpPrivacy', true); | ||
| 73 | + // // }) | ||
| 74 | + // } | ||
| 75 | + // .fancy(Const.MainConstant_BUTTON_MARGIN_TOP) | ||
| 76 | + // } | ||
| 77 | + // .params({ path: 'https://www.baidu.com', tips: '在线' } as NavigatorModel) | ||
| 78 | + | ||
| 79 | + Text($r('app.string.privacy_text_title_policy')) | ||
| 80 | + .fontSize($r('app.float.dialog_common_text_size')) | ||
| 81 | + .width('40%') | ||
| 82 | + .fontColor(Color.Red) | ||
| 83 | + .onClick(() => { | ||
| 84 | + //GlobalContext.getContext().setObject('isJumpPrivacy', true); | ||
| 85 | + //WDRouterRule.jumpWithPage(WDRouterPage.privacyPage) | ||
| 86 | + // router.pushUrl({ | ||
| 87 | + // url: 'pages/PrivacyPage' | ||
| 88 | + // }).catch((error: Error) => { | ||
| 89 | + // //Logger.error(CommonConstants.CUSTOM_DIALOG_TAG, 'CustomDialog pushUrl error ' + JSON.stringify(error)); | ||
| 90 | + // }); | ||
| 91 | + }) | ||
| 92 | + Text($r('app.string.privacy_text_title_protocol')) | ||
| 93 | + .fontSize($r('app.float.dialog_common_text_size')) | ||
| 94 | + .width('40%') | ||
| 95 | + .fontColor(Color.Red) | ||
| 96 | + .onClick(() => { | ||
| 97 | + //GlobalContext.getContext().setObject('isJumpPrivacy', true); | ||
| 98 | + //WDRouterRule.jumpWithPage(WDRouterPage.privacyPage) | ||
| 99 | + // router.pushUrl({ | ||
| 100 | + // url: 'pages/PrivacyPage' | ||
| 101 | + // }).catch((error: Error) => { | ||
| 102 | + // //Logger.error(CommonConstants.CUSTOM_DIALOG_TAG, 'CustomDialog pushUrl error ' + JSON.stringify(error)); | ||
| 103 | + // }); | ||
| 104 | + }) | ||
| 105 | + } | ||
| 106 | + .margin({ | ||
| 107 | + top:'36lpx', | ||
| 108 | + bottom:'21lpx' | ||
| 109 | + }) | ||
| 110 | + Text($r('app.string.dialog_text_privacy_statement')) | ||
| 111 | + .width('90%') | ||
| 112 | + .fontColor($r('app.color.dialog_text_color')) | ||
| 113 | + .fontSize($r('app.float.dialog_common_text_size')) | ||
| 114 | + Row() { | ||
| 115 | + Text($r('app.string.dialog_button_disagree')) | ||
| 116 | + .fancy() | ||
| 117 | + .onClick(() => { | ||
| 118 | + this.controller.close(); | ||
| 119 | + this.cancel(); | ||
| 120 | + }) | ||
| 121 | + Blank() | ||
| 122 | + .backgroundColor($r('app.color.dialog_blank_background_color')) | ||
| 123 | + .width($r('app.float.dialog_blank_width')) | ||
| 124 | + .height($r('app.float.dialog_blank_height')) | ||
| 125 | + Text($r('app.string.dialog_button_agree')) | ||
| 126 | + .fancyAgree() | ||
| 127 | + .onClick(() => { | ||
| 128 | + this.controller.close(); | ||
| 129 | + this.confirm(); | ||
| 130 | + }) | ||
| 131 | + | ||
| 132 | + } | ||
| 133 | + .margin({ bottom: '21lpx',top:'42lpx' }) | ||
| 134 | + | ||
| 135 | + } | ||
| 136 | + .width('528lpx') | ||
| 137 | + .borderRadius('15') | ||
| 138 | + .backgroundColor(Color.White) | ||
| 139 | + | ||
| 140 | + } | ||
| 141 | + | ||
| 142 | + | ||
| 143 | + | ||
| 144 | +} | ||
| 145 | +// Common text styles. | ||
| 146 | +@Extend(Text) function fancy () { | ||
| 147 | + .fontColor($r("app.color.dialog_fancy_text_left_color")) | ||
| 148 | + .fontSize($r("app.float.dialog_fancy_text_size")) | ||
| 149 | + .textAlign(TextAlign.Center) | ||
| 150 | + .fontWeight(FontWeight.Medium) | ||
| 151 | + .layoutWeight('1') | ||
| 152 | +} | ||
| 153 | +// Common text styles. | ||
| 154 | +@Extend(Text) function fancyAgree () { | ||
| 155 | + .fontColor($r("app.color.dialog_fancy_text_right_color")) | ||
| 156 | + .fontSize($r("app.float.dialog_fancy_text_size")) | ||
| 157 | + .textAlign(TextAlign.Center) | ||
| 158 | + .fontWeight(FontWeight.Medium) | ||
| 159 | + .layoutWeight('1') | ||
| 160 | +} |
| 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 | +} |
| @@ -66,7 +66,7 @@ | @@ -66,7 +66,7 @@ | ||
| 66 | } | 66 | } |
| 67 | }, | 67 | }, |
| 68 | { | 68 | { |
| 69 | - "name": "ohos.permission.LOCATION", | 69 | + "name": "ohos.permission.APPROXIMATELY_LOCATION", |
| 70 | "reason": "$string:EntryAbility_desc", | 70 | "reason": "$string:EntryAbility_desc", |
| 71 | "usedScene": { | 71 | "usedScene": { |
| 72 | "abilities": [ | 72 | "abilities": [ |
| @@ -3,6 +3,54 @@ | @@ -3,6 +3,54 @@ | ||
| 3 | { | 3 | { |
| 4 | "name": "start_window_background", | 4 | "name": "start_window_background", |
| 5 | "value": "#FFFFFF" | 5 | "value": "#FFFFFF" |
| 6 | + }, | ||
| 7 | + { | ||
| 8 | + "name": "color_F9F9F9", | ||
| 9 | + "value": "#F9F9F9" | ||
| 10 | + }, | ||
| 11 | + { | ||
| 12 | + "name": "privacy_back_text", | ||
| 13 | + "value": "#007DFF" | ||
| 14 | + }, | ||
| 15 | + { | ||
| 16 | + "name": "launcher_text_title_color", | ||
| 17 | + "value": "#182431" | ||
| 18 | + }, | ||
| 19 | + { | ||
| 20 | + "name": "launcher_text_introduce_color", | ||
| 21 | + "value": "#182431" | ||
| 22 | + }, | ||
| 23 | + { | ||
| 24 | + "name": "advertising_text_title_color", | ||
| 25 | + "value": "#182431" | ||
| 26 | + }, | ||
| 27 | + { | ||
| 28 | + "name": "advertising_text_background_color", | ||
| 29 | + "value": "#33000000" | ||
| 30 | + }, | ||
| 31 | + { | ||
| 32 | + "name": "home_page_text_color", | ||
| 33 | + "value": "#14224D" | ||
| 34 | + }, | ||
| 35 | + { | ||
| 36 | + "name": "dialog_fancy_text_left_color", | ||
| 37 | + "value": "#999999" | ||
| 38 | + }, | ||
| 39 | + { | ||
| 40 | + "name": "dialog_fancy_text_right_color", | ||
| 41 | + "value": "#ED2800" | ||
| 42 | + }, | ||
| 43 | + { | ||
| 44 | + "name": "dialog_text_color", | ||
| 45 | + "value": "#222222" | ||
| 46 | + }, | ||
| 47 | + { | ||
| 48 | + "name": "dialog_blank_background_color", | ||
| 49 | + "value": "#F5F5F5" | ||
| 50 | + }, | ||
| 51 | + { | ||
| 52 | + "name": "dialog_text_statement_color", | ||
| 53 | + "value": "#007DFF" | ||
| 6 | } | 54 | } |
| 7 | ] | 55 | ] |
| 8 | -} | ||
| 56 | +} |
| 1 | +{ | ||
| 2 | + "float": [ | ||
| 3 | + { | ||
| 4 | + "name": "float_1", | ||
| 5 | + "value": "30.6" | ||
| 6 | + }, | ||
| 7 | + { | ||
| 8 | + "name": "launcher_logo_size", | ||
| 9 | + "value": "119vp" | ||
| 10 | + }, | ||
| 11 | + { | ||
| 12 | + "name": "launcher_life_text_width", | ||
| 13 | + "value": "105vp" | ||
| 14 | + }, | ||
| 15 | + { | ||
| 16 | + "name": "launcher_life_text_height", | ||
| 17 | + "value": "35vp" | ||
| 18 | + }, | ||
| 19 | + { | ||
| 20 | + "name": "launcher_text_title_size", | ||
| 21 | + "value": "26fp" | ||
| 22 | + }, | ||
| 23 | + { | ||
| 24 | + "name": "launcher_text_introduce_size", | ||
| 25 | + "value": "16fp" | ||
| 26 | + }, | ||
| 27 | + { | ||
| 28 | + "name": "launcher_text_opacity", | ||
| 29 | + "value": "0.6" | ||
| 30 | + }, | ||
| 31 | + { | ||
| 32 | + "name": "advertising_text_opacity", | ||
| 33 | + "value": "0.4" | ||
| 34 | + }, | ||
| 35 | + { | ||
| 36 | + "name": "advertising_image_width", | ||
| 37 | + "value": "54vp" | ||
| 38 | + }, | ||
| 39 | + { | ||
| 40 | + "name": "advertising_image_height", | ||
| 41 | + "value": "54vp" | ||
| 42 | + }, | ||
| 43 | + { | ||
| 44 | + "name": "advertising_text_font_size", | ||
| 45 | + "value": "12fp" | ||
| 46 | + }, | ||
| 47 | + { | ||
| 48 | + "name": "advertising_text_introduce_size", | ||
| 49 | + "value": "16fp" | ||
| 50 | + }, | ||
| 51 | + { | ||
| 52 | + "name": "advertising_text_title_size", | ||
| 53 | + "value": "26fp" | ||
| 54 | + }, | ||
| 55 | + { | ||
| 56 | + "name": "advertising_text_border_width", | ||
| 57 | + "value": "1" | ||
| 58 | + }, | ||
| 59 | + { | ||
| 60 | + "name": "advertising_title_text_margin_top", | ||
| 61 | + "value": "30vp" | ||
| 62 | + }, | ||
| 63 | + { | ||
| 64 | + "name": "advertising_title_text_margin_left", | ||
| 65 | + "value": "260vp" | ||
| 66 | + }, | ||
| 67 | + { | ||
| 68 | + "name": "advertising_text_padding_top", | ||
| 69 | + "value": "8vp" | ||
| 70 | + }, | ||
| 71 | + { | ||
| 72 | + "name": "advertising_text_padding_bottom", | ||
| 73 | + "value": "8vp" | ||
| 74 | + }, | ||
| 75 | + { | ||
| 76 | + "name": "advertising_text_padding_left", | ||
| 77 | + "value": "12vp" | ||
| 78 | + }, | ||
| 79 | + { | ||
| 80 | + "name": "advertising_text_padding_right", | ||
| 81 | + "value": "12vp" | ||
| 82 | + }, | ||
| 83 | + { | ||
| 84 | + "name": "advertising_text_radius", | ||
| 85 | + "value": "18vp" | ||
| 86 | + }, | ||
| 87 | + { | ||
| 88 | + "name": "dialog_blank_height", | ||
| 89 | + "value": "32vp" | ||
| 90 | + }, | ||
| 91 | + { | ||
| 92 | + "name": "dialog_blank_width", | ||
| 93 | + "value": "1vp" | ||
| 94 | + }, | ||
| 95 | + { | ||
| 96 | + "name": "dialog_common_text_size", | ||
| 97 | + "value": "18fp" | ||
| 98 | + }, | ||
| 99 | + { | ||
| 100 | + "name": "dialog_text_privacy_size", | ||
| 101 | + "value": "20fp" | ||
| 102 | + }, | ||
| 103 | + { | ||
| 104 | + "name": "dialog_fancy_text_size", | ||
| 105 | + "value": "18fp" | ||
| 106 | + }, | ||
| 107 | + { | ||
| 108 | + "name": "dialog_text_button_left_color", | ||
| 109 | + "value": "#999999" | ||
| 110 | + }, | ||
| 111 | + { | ||
| 112 | + "name": "dialog_text_button_right_color", | ||
| 113 | + "value": "#ED2800" | ||
| 114 | + }, | ||
| 115 | + { | ||
| 116 | + "name": "dialog_text_privacy_bottom", | ||
| 117 | + "value": "23lpx" | ||
| 118 | + }, | ||
| 119 | + { | ||
| 120 | + "name": "dialog_text_privacy_top", | ||
| 121 | + "value": "38lpx" | ||
| 122 | + }, | ||
| 123 | + { | ||
| 124 | + "name": "dialog_text_declaration_bottom", | ||
| 125 | + "value": "24" | ||
| 126 | + }, | ||
| 127 | + { | ||
| 128 | + "name": "dialog_text_opacity", | ||
| 129 | + "value": "0.6" | ||
| 130 | + }, | ||
| 131 | + { | ||
| 132 | + "name": "privacy_text_title_size", | ||
| 133 | + "value": "20fp" | ||
| 134 | + }, | ||
| 135 | + { | ||
| 136 | + "name": "privacy_back_text_size", | ||
| 137 | + "value": "20fp" | ||
| 138 | + }, | ||
| 139 | + { | ||
| 140 | + "name": "privacy_text_margin_top", | ||
| 141 | + "value": "10" | ||
| 142 | + }, | ||
| 143 | + { | ||
| 144 | + "name": "privacy_text_margin_bottom", | ||
| 145 | + "value": "10" | ||
| 146 | + }, | ||
| 147 | + { | ||
| 148 | + "name": "privacy_bottom_text_margin", | ||
| 149 | + "value": "12" | ||
| 150 | + }, | ||
| 151 | + { | ||
| 152 | + "name": "privacy_text_content_left", | ||
| 153 | + "value": "24" | ||
| 154 | + }, | ||
| 155 | + { | ||
| 156 | + "name": "privacy_text_content_right", | ||
| 157 | + "value": "24" | ||
| 158 | + }, | ||
| 159 | + { | ||
| 160 | + "name": "home_page_text_size", | ||
| 161 | + "value": "30vp" | ||
| 162 | + } | ||
| 163 | + ] | ||
| 164 | +} |
| @@ -11,6 +11,39 @@ | @@ -11,6 +11,39 @@ | ||
| 11 | { | 11 | { |
| 12 | "name": "EntryAbility_label", | 12 | "name": "EntryAbility_label", |
| 13 | "value": "$string:app_name" | 13 | "value": "$string:app_name" |
| 14 | + }, | ||
| 15 | + { | ||
| 16 | + "name": "dialog_text_title", | ||
| 17 | + "value": "个人隐私保护指引" | ||
| 18 | + }, | ||
| 19 | + { | ||
| 20 | + "name": "dialog_text_subTitle", | ||
| 21 | + "value": "欢迎您使用人民日报客户端!" | ||
| 22 | + }, | ||
| 23 | + { | ||
| 24 | + "name": "dialog_text_privacy_content", | ||
| 25 | + "value": "为了更好地为您提供阅读新闻、发布评论等相关服务,我们会根据您使用服务的具体功能需要,收集必要的用户信息。您可通过阅读《隐私政策》和《用户协议》了解我们收集、使用、存储和共享个人信息的情况,以及对您个人隐私的保护措施。人民日报客户端深知个人信息对您的重要性,我们将以最高标准遵守法律法规要求,尽全力保护您的个人信息安全。" | ||
| 26 | + }, | ||
| 27 | + { | ||
| 28 | + "name": "dialog_text_privacy_statement", | ||
| 29 | + "value": "如您同意,请点击“同意”开始接受" | ||
| 30 | + }, | ||
| 31 | + { | ||
| 32 | + "name": "dialog_button_disagree", | ||
| 33 | + "value": "暂不使用" | ||
| 34 | + }, | ||
| 35 | + { | ||
| 36 | + "name": "dialog_button_agree", | ||
| 37 | + "value": "同意" | ||
| 38 | + }, | ||
| 39 | + { | ||
| 40 | + "name": "privacy_text_title_policy", | ||
| 41 | + "value": "《隐私政策》" | ||
| 42 | + }, | ||
| 43 | + { | ||
| 44 | + "name": "privacy_text_title_protocol", | ||
| 45 | + "value": "《用户协议》" | ||
| 14 | } | 46 | } |
| 47 | + | ||
| 15 | ] | 48 | ] |
| 16 | } | 49 | } |
6.33 KB
| @@ -5,6 +5,10 @@ | @@ -5,6 +5,10 @@ | ||
| 5 | "pages/ENewspaper", | 5 | "pages/ENewspaper", |
| 6 | "pages/ImageAndTextDetailPage", | 6 | "pages/ImageAndTextDetailPage", |
| 7 | "pages/MorningEveningPaperPage", | 7 | "pages/MorningEveningPaperPage", |
| 8 | - "pages/detail/MultiPictureDetailPage" | 8 | + "pages/detail/AudioDetail", |
| 9 | + "pages/detail/MultiPictureDetailPage", | ||
| 10 | + "pages/launchPage/PrivacyPage", | ||
| 11 | + "pages/launchPage/LaunchPage", | ||
| 12 | + "pages/launchPage/LaunchAdvertisingPage" | ||
| 9 | ] | 13 | ] |
| 10 | -} | ||
| 14 | +} |
| @@ -11,6 +11,39 @@ | @@ -11,6 +11,39 @@ | ||
| 11 | { | 11 | { |
| 12 | "name": "EntryAbility_label", | 12 | "name": "EntryAbility_label", |
| 13 | "value": "$string:app_name" | 13 | "value": "$string:app_name" |
| 14 | + }, | ||
| 15 | + { | ||
| 16 | + "name": "dialog_text_title", | ||
| 17 | + "value": "个人隐私保护指引" | ||
| 18 | + }, | ||
| 19 | + { | ||
| 20 | + "name": "dialog_text_subTitle", | ||
| 21 | + "value": "欢迎您使用人民日报客户端!" | ||
| 22 | + }, | ||
| 23 | + { | ||
| 24 | + "name": "dialog_text_privacy_content", | ||
| 25 | + "value": "为了更好地为您提供阅读新闻、发布评论等相关服务,我们会根据您使用服务的具体功能需要,收集必要的用户信息。您可通过阅读《隐私政策》和《用户协议》了解我们收集、使用、存储和共享个人信息的情况,以及对您个人隐私的保护措施。人民日报客户端深知个人信息对您的重要性,我们将以最高标准遵守法律法规要求,尽全力保护您的个人信息安全。" | ||
| 26 | + }, | ||
| 27 | + { | ||
| 28 | + "name": "dialog_text_privacy_statement", | ||
| 29 | + "value": "如您同意,请点击“同意”开始接受" | ||
| 30 | + }, | ||
| 31 | + { | ||
| 32 | + "name": "dialog_button_disagree", | ||
| 33 | + "value": "暂不使用" | ||
| 34 | + }, | ||
| 35 | + { | ||
| 36 | + "name": "dialog_button_agree", | ||
| 37 | + "value": "同意" | ||
| 38 | + }, | ||
| 39 | + { | ||
| 40 | + "name": "privacy_text_title_policy", | ||
| 41 | + "value": "《隐私政策》" | ||
| 42 | + }, | ||
| 43 | + { | ||
| 44 | + "name": "privacy_text_title_protocol", | ||
| 45 | + "value": "《用户协议》" | ||
| 14 | } | 46 | } |
| 47 | + | ||
| 15 | ] | 48 | ] |
| 16 | } | 49 | } |
This diff could not be displayed because it is too large.
| @@ -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 | } |
-
Please register or login to post a comment