diff --git a/features/fund/src/main/ets/view/FundComponent.ets b/features/fund/src/main/ets/view/FundComponent.ets index 3fd6651f96ac63a27fabc24f9a4067807543e07f..00da83d55abc31f412ef36bf218d74aa878a2ace 100644 --- a/features/fund/src/main/ets/view/FundComponent.ets +++ b/features/fund/src/main/ets/view/FundComponent.ets @@ -18,7 +18,9 @@ import { FundConstants } from '../constants/FundConstants'; import FundingViewModel from '../viewmodel/FundingViewModel'; @Component + // [Start fund_component] export struct FundComponent { + // [StartExclude fund_component] @State currentPoint: string = CommonConstants.BREAK_POINT_SM; @State tabBarIndex: number = 0; @State backgroundX: number = 0; @@ -153,6 +155,7 @@ export struct FundComponent { Tabs({ barPosition: BarPosition.Start, controller: this.controller }) { TabContent(){ Row() { + // [EndExclude fund_component] List() { ForEach(new BreakpointUtil({ sm: FundingViewModel.getAllFundInfo(0, 2), @@ -162,27 +165,22 @@ export struct FundComponent { ListItem() { Row() { Text(item.amplitude) - .fontSize($r('app.float.amplitude_text_size')) - .fontColor($r('app.color.amplitude_text_font')) - .fontWeight(CommonConstants.FONT_WEIGHT_700) + .fontSize('24fp') + .fontColor('#E84026') + .fontWeight(700) Text(item.name) - .fontSize($r('app.float.common_font_size')) - .fontWeight(CommonConstants.FONT_WEIGHT_500) - .fontFamily(CommonConstants.FONT_FAMILY_HEI_TI) - .margin({ - left: $r('app.float.margin_text_left') - }) + .fontSize('16fp') + .fontWeight(500) + .fontFamily('HarmonyHeiTi-Medium') + .margin({ left: '16vp' }) } .justifyContent(FlexAlign.SpaceAround) } }) } - .lanes(new BreakpointUtil({ - sm: 1, - md: 2, - lg: 3 - }).getValue(this.currentPoint)) + .lanes(new BreakpointUtil({ sm: 1, md: 2, lg: 3 }).getValue(this.currentPoint)) .width(CommonConstants.FULL_WIDTH_PERCENT) + // [StartExclude fund_component] .scrollBar(BarState.Off) } .height(CommonConstants.FULL_HEIGHT_PERCENT) @@ -490,4 +488,5 @@ export struct FundComponent { this.backgroundX = this.getUIContext().vp2px(this.backgroundX) }) } + // [EndExclude fund_component] } \ No newline at end of file diff --git a/features/fund/src/main/ets/view/FundingDetail.ets b/features/fund/src/main/ets/view/FundingDetail.ets index dc5178d78974a7fd73150325a68db7ad903519f5..70731a6e925062edb92b23b16aab50baae227967 100644 --- a/features/fund/src/main/ets/view/FundingDetail.ets +++ b/features/fund/src/main/ets/view/FundingDetail.ets @@ -56,14 +56,16 @@ export struct FundingDetail { barPosition: this.breakPoint === CommonConstants.BREAK_POINT_LG ? BarPosition.Start : BarPosition.End }) { TabContent() { + // [Start funding_detail] Navigation(this.pageInfo) { FundNavigationComponent({ listIndex: this.index }) } .navDestination(this.buildNavDestination) .hideTitleBar(true) .hideBackButton(true) - .mode(this.breakPoint === CommonConstants.BREAK_POINT_LG ? NavigationMode.Split : NavigationMode.Stack) - .navBarWidth(FundConstants.NAV_BAR_WIDTH) + .mode(this.breakPoint === 'lg' ? NavigationMode.Split : NavigationMode.Stack) + .navBarWidth('40%') + // [End funding_detail] } .tabBar(this.BuildTabs($r('app.media.ic_public_home_filled'), $r('app.string.tab_bar_home'), 0)) @@ -107,27 +109,27 @@ export struct FundingDetail { bottom: this.bottom }) } - + // [Start build_nav_destination] @Builder buildNavDestination(name: string, param: object) { - if (name === CommonConstants.PATH_DETAIL) { + if (name === 'detail') { if (typeof param === 'number') { DetailComponent({ indexList: param }) } - } else if (name === CommonConstants.PATH_COMPARISON) { + } else if (name === 'comparison') { ComparisonComponent() - } else if (name === CommonConstants.PATH_COMPARISON_DETAIL) { + } else if (name === 'comparisonDetail') { NavDestination() { ComparisonDetailComponent({ chooseComparison: (param as ComparisonInfo[]) }) } .hideTitleBar(true) - } else if (name === CommonConstants.PATH_BUYING) { + } else if (name === 'buying') { if (typeof param === 'number') { TransactionComponent({ indexList: param }) } } } - + // [End build_nav_destination] @Builder BuildTabs(icon: Resource, title: ResourceStr, index: number) { Column({ space: FundConstants.TAB_COLUMN_SPACE }) { diff --git a/product/phone/src/main/ets/pages/Index.ets b/product/phone/src/main/ets/pages/Index.ets index baf89924f42441ea14f6a1bada12e57dc26f21a3..6cebc8db165afac90683d4876f2ac8349ecd8fdf 100644 --- a/product/phone/src/main/ets/pages/Index.ets +++ b/product/phone/src/main/ets/pages/Index.ets @@ -21,13 +21,16 @@ import { ComparisonDetailPage, ComparisonInfo } from '@ohos/fundComparison'; @Entry @Component + // [Start init_pop_custom_style] struct Index { + // [StartExclude init_pop_custom_style] @StorageLink('breakPoint') breakPoint: string = CommonConstants.BREAK_POINT_SM; @State currentTabIndex: number = 0; @StorageProp('avoidArea') topHeight: number = 0; @StorageProp('bottom') bottom: number = 0; @State backgroundImageY: number = 0; @StorageLink('pageIndexInfos') pageIndexInfos: NavPathStack = new NavPathStack(); + // [EndExclude init_pop_custom_style] dialogController: CustomDialogController = new CustomDialogController({ builder: AdvertisementDialog(), backgroundColor: $r('app.color.dialog_background'), @@ -39,7 +42,7 @@ struct Index { aboutToAppear() { this.dialogController.open(); } - + // [StartExclude init_pop_custom_style] onPageShow() { window.getLastWindow(this.getUIContext().getHostContext()).then((windowStage: window.Window) => { let area = windowStage.getWindowAvoidArea(window.AvoidAreaType.TYPE_SYSTEM); @@ -230,4 +233,6 @@ struct Index { .hideTitleBar(true) .hideToolBar(true) } -} \ No newline at end of file + // [EndExclude init_pop_custom_style] +} +// [End init_pop_custom_style] \ No newline at end of file