From 2966edc86ed0d0f2c64f47cb9aae9f5d752ff916 Mon Sep 17 00:00:00 2001 From: yangxueli_sylus Date: Wed, 17 Sep 2025 10:27:53 +0800 Subject: [PATCH 1/2] =?UTF-8?q?IDE=E8=AD=A6=E5=91=8A=E6=95=B4=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/ets/view/ChartLegendComponent.ets | 6 +- .../fund/src/main/ets/view/TrendsPage.ets | 26 +++++++-- .../main/ets/viewmodel/ChartAxisFormatter.ets | 11 ++-- .../src/main/ets/viewmodel/ChartViewModel.ets | 18 ++++-- .../home/src/main/ets/view/AccountPage.ets | 31 +++++++--- .../main/ets/entryability/EntryAbility.ets | 35 ++++++++---- product/phone/src/main/ets/pages/Index.ets | 56 ++++++++++++++----- 7 files changed, 133 insertions(+), 50 deletions(-) diff --git a/features/fund/src/main/ets/view/ChartLegendComponent.ets b/features/fund/src/main/ets/view/ChartLegendComponent.ets index 4b79e53..acea6ad 100644 --- a/features/fund/src/main/ets/view/ChartLegendComponent.ets +++ b/features/fund/src/main/ets/view/ChartLegendComponent.ets @@ -15,9 +15,9 @@ @Component export struct ChartLegendComponent { - private name: ResourceStr = ''; - private color: ResourceStr = ''; - private value: ResourceStr = ''; + name: ResourceStr = ''; + color: ResourceStr = ''; + value: ResourceStr = ''; build() { Column() { diff --git a/features/fund/src/main/ets/view/TrendsPage.ets b/features/fund/src/main/ets/view/TrendsPage.ets index dff0d8d..0a8d3b1 100644 --- a/features/fund/src/main/ets/view/TrendsPage.ets +++ b/features/fund/src/main/ets/view/TrendsPage.ets @@ -21,6 +21,8 @@ import { BreakpointUtil, CommonConstants, logger } from '@ohos/basic/'; import ChartViewModel from '../viewmodel/ChartViewModel'; import { ChartLegendComponent } from './ChartLegendComponent'; import { FundConstants } from '../constants/FundConstants'; +import { BusinessError } from '@kit.BasicServicesKit'; +import { hilog } from '@kit.PerformanceAnalysisKit'; @Component export struct TrendsPage { @@ -37,12 +39,16 @@ export struct TrendsPage { private callback: Callback = (data: display.FoldDisplayMode) => { if (this.isLandScape && data === display.FoldDisplayMode.FOLD_DISPLAY_MODE_FULL) { window.getLastWindow(this.getUIContext().getHostContext()).then((stage: window.Window) => { - stage.setPreferredOrientation(window.Orientation.PORTRAIT); + stage.setPreferredOrientation(window.Orientation.PORTRAIT).catch((error: BusinessError) => { + hilog.error(0x0000, 'TrendsPage', `Failed to set window orientation. Cause code: ${error.code}, message: ${error.message}`) + }); }); } if (data === display.FoldDisplayMode.FOLD_DISPLAY_MODE_MAIN) { window.getLastWindow(this.getUIContext().getHostContext()).then((stage: window.Window) => { - stage.setPreferredOrientation(window.Orientation.LANDSCAPE) + stage.setPreferredOrientation(window.Orientation.LANDSCAPE).catch((error: BusinessError) => { + hilog.error(0x0000, 'TrendsPage', `Failed to set window orientation. Cause code: ${error.code}, message: ${error.message}`) + }) }); this.isLandScape = true; } @@ -257,11 +263,15 @@ export struct TrendsPage { .hideTitleBar(true) .onAppear(() => { window.getLastWindow(this.getUIContext().getHostContext()).then((windowStage: window.Window) => { - windowStage.setWindowLayoutFullScreen(true); + windowStage.setWindowLayoutFullScreen(true).catch((error: BusinessError) => { + hilog.error(0x0000, 'TrendsPage', `Failed to set the window layout to full-screen mode. Cause code: ${error.code}, message: ${error.message}`) + }); }) if (!this.isLandScape && this.breakPoint === CommonConstants.BREAK_POINT_SM) { window.getLastWindow(this.getUIContext().getHostContext()).then((stage: window.Window) => { - stage.setPreferredOrientation(window.Orientation.LANDSCAPE); + stage.setPreferredOrientation(window.Orientation.LANDSCAPE).catch((error: BusinessError) => { + hilog.error(0x0000, 'TrendsPage', `Failed to set window orientation. Cause code: ${error.code}, message: ${error.message}`); + }); this.isLandScape = true; }); } @@ -273,11 +283,15 @@ export struct TrendsPage { }) .onWillDisappear(() => { window.getLastWindow(this.getUIContext().getHostContext()).then((windowStage: window.Window) => { - windowStage.setWindowLayoutFullScreen(true); + windowStage.setWindowLayoutFullScreen(true).catch((error: BusinessError) => { + hilog.error(0x0000, 'TrendsPage', `Failed to set the window layout to full-screen mode. Cause code: ${error.code}, message: ${error.message}`); + }); }) if (this.isLandScape) { window.getLastWindow(this.getUIContext().getHostContext()).then((stage: window.Window) => { - stage.setPreferredOrientation(window.Orientation.PORTRAIT); + stage.setPreferredOrientation(window.Orientation.PORTRAIT).catch((error: BusinessError) => { + hilog.error(0x0000, 'TrendsPage', `Failed to set window orientation. Cause code: ${error.code}, message: ${error.message}`); + }); }); this.isLandScape = false; } diff --git a/features/fund/src/main/ets/viewmodel/ChartAxisFormatter.ets b/features/fund/src/main/ets/viewmodel/ChartAxisFormatter.ets index e488755..fac4cdf 100644 --- a/features/fund/src/main/ets/viewmodel/ChartAxisFormatter.ets +++ b/features/fund/src/main/ets/viewmodel/ChartAxisFormatter.ets @@ -15,6 +15,7 @@ import { HashMap } from '@kit.ArkTS'; import { AxisBase, IAxisValueFormatter } from '@ohos/mpchart'; +import { hilog } from '@kit.PerformanceAnalysisKit'; export class ChartAxisFormatter implements IAxisValueFormatter { xAxis: HashMap = new HashMap(); @@ -24,10 +25,12 @@ export class ChartAxisFormatter implements IAxisValueFormatter { } public getFormattedValue(value: number, axis: AxisBase): string { - let xAxis = this.xAxis.get(value); - if (xAxis) { - return xAxis; + let xAxis = ''; + try { + xAxis = this.xAxis.get(value); + } catch (error) { + hilog.error(0x0000, 'ChartAxisFormatter', `Failed to obtain the formatted value. Cause code: ${error.code}, message: ${error.message}`) } - return ''; + return xAxis; } } \ No newline at end of file diff --git a/features/fund/src/main/ets/viewmodel/ChartViewModel.ets b/features/fund/src/main/ets/viewmodel/ChartViewModel.ets index 60d22c3..0e95d07 100644 --- a/features/fund/src/main/ets/viewmodel/ChartViewModel.ets +++ b/features/fund/src/main/ets/viewmodel/ChartViewModel.ets @@ -21,6 +21,7 @@ import { EntryOhos, ILineDataSet, JArrayList, LineChartModel, LineData, LineData Description } from '@ohos/mpchart'; import { ChartAxisFormatter } from './ChartAxisFormatter'; +import { hilog } from '@kit.PerformanceAnalysisKit'; class ChartViewModel { xAxis: XAxis | null = null; @@ -134,9 +135,14 @@ class ChartViewModel { this.xAxis.setAvoidFirstLastClipping(true); this.xAxis.setDrawGridLines(false) let xMap: HashMap = new HashMap(); - xMap.set(0, '07-14'); - xMap.set(22, '08-01'); - xMap.set(44, '08-16'); + try { + xMap.set(0, '07-14'); + xMap.set(22, '08-01'); + xMap.set(44, '08-16'); + } catch (error) { + hilog.error(0x0000, 'ChartViewModel', `Failed to set. Cause code: ${error.code}, message: ${error.message}`) + } + this.xAxis.setValueFormatter(new ChartAxisFormatter(xMap)) } @@ -153,7 +159,11 @@ class ChartViewModel { this.leftAxis.setDrawAxisLine(true); let yMap: HashMap = new HashMap(); for (let i = miny; i <= maxy; i++) { - yMap.set(i, i + '.00%'); + try { + yMap.set(i, i + '.00%'); + } catch (error) { + hilog.error(0x0000, 'ChartViewModel', `Failed to set. Cause code: ${error.code}, message: ${error.message}`) + } } this.leftAxis.setValueFormatter(new ChartAxisFormatter(yMap)) } diff --git a/features/home/src/main/ets/view/AccountPage.ets b/features/home/src/main/ets/view/AccountPage.ets index 2e63072..beee6ef 100644 --- a/features/home/src/main/ets/view/AccountPage.ets +++ b/features/home/src/main/ets/view/AccountPage.ets @@ -16,6 +16,11 @@ import { window } from '@kit.ArkUI'; import { CommonConstants } from '@ohos/basic/Index'; import { AccountComponent } from './AccountComponent'; +import { BusinessError } from '@kit.BasicServicesKit'; +import { hilog } from '@kit.PerformanceAnalysisKit'; + +const DOMAIN = 0x0000; +const TAG = 'AccountPage'; @Component export struct AccountPage { @@ -23,20 +28,32 @@ export struct AccountPage { onPageShow() { window.getLastWindow(this.getUIContext().getHostContext()).then((windowStage: window.Window) => { - let area = windowStage.getWindowAvoidArea(window.AvoidAreaType.TYPE_SYSTEM); - let topHeight = this.getUIContext().px2vp(area.topRect.height); - if (topHeight > 0) { - windowStage.setWindowLayoutFullScreen(true); + try { + let area = windowStage.getWindowAvoidArea(window.AvoidAreaType.TYPE_SYSTEM); + let topHeight = this.getUIContext().px2vp(area.topRect.height); + if (topHeight > 0) { + windowStage.setWindowLayoutFullScreen(true).catch((err: BusinessError) => { + hilog.error(DOMAIN, TAG, `Failed to set the window layout to full-screen mode. Cause code: ${err.code}, message: ${err.message}`) + }); + } + } catch (error) { + hilog.error(DOMAIN, TAG, `Failed to set the window avoid area. Cause code: ${error.code}, message: ${error.message}`) } - }); + }).catch((error: BusinessError) => { + hilog.error(DOMAIN, TAG, `Failed to obtain the last window. Cause code: ${error.code}, message: ${error.message}`) + }) } onPageHide() { window.getLastWindow(this.getUIContext().getHostContext()).then((windowStage: window.Window) => { if (this.topHeight > 0) { - windowStage.setWindowLayoutFullScreen(false); + windowStage.setWindowLayoutFullScreen(false).catch((error: BusinessError) => { + hilog.error(DOMAIN, TAG, `Failed to set the window layout to full-screen mode. Cause code: ${error.code}, message: ${error.message}`) + }); } - }); + }).catch((error: BusinessError) => { + hilog.error(DOMAIN, TAG, `Failed to obtain the last window. Cause code: ${error.code}, message: ${error.message}`) + }) } build() { diff --git a/product/phone/src/main/ets/entryability/EntryAbility.ets b/product/phone/src/main/ets/entryability/EntryAbility.ets index a7dbce9..0c39f47 100644 --- a/product/phone/src/main/ets/entryability/EntryAbility.ets +++ b/product/phone/src/main/ets/entryability/EntryAbility.ets @@ -19,6 +19,9 @@ import { hilog } from '@kit.PerformanceAnalysisKit'; import { display, window } from '@kit.ArkUI'; import { CommonConstants } from '@ohos/basic'; +const DOMAIN = 0x0000; +const TAG = 'EntryAbility'; + export default class EntryAbility extends UIAbility { private windowObj?: window.Window; @@ -36,11 +39,17 @@ export default class EntryAbility extends UIAbility { windowStage.getMainWindow().then((data: window.Window) => { this.windowObj = data; - this.updateBreakpoint(this.windowObj.getWindowProperties().windowRect.width); + try { + this.updateBreakpoint(this.windowObj.getWindowProperties().windowRect.width); + } catch (error) { + hilog.error(DOMAIN, TAG, `Failed to obtain the window properties. Cause code: ${error.code}, message: ${error.message}`) + } this.windowObj.on('windowSizeChange', (windowSize: window.Size) => { this.updateBreakpoint(windowSize.width); }) - }) + }).catch((error: BusinessError) => { + hilog.error(DOMAIN, TAG, `Failed to obtain the main window. Cause code: ${error.code}, message: ${error.message}`) + }); windowStage.loadContent('pages/Index', (err: BusinessError, data) => { if (err.code) { @@ -52,16 +61,20 @@ export default class EntryAbility extends UIAbility { } private updateBreakpoint(windowWidth: number): void{ - let windowWidthVp = windowWidth / display.getDefaultDisplaySync().densityPixels; - let curBp: string = ''; - if (windowWidthVp < CommonConstants.BREAK_POINTS_VALUE_NUMBER[1]) { - curBp = CommonConstants.BREAK_POINT_SM; - } else if (windowWidthVp < CommonConstants.BREAK_POINTS_VALUE_NUMBER[2]) { - curBp = CommonConstants.BREAK_POINT_MD; - } else { - curBp = CommonConstants.BREAK_POINT_LG; + try { + let windowWidthVp = windowWidth / display.getDefaultDisplaySync().densityPixels; + let curBp: string = ''; + if (windowWidthVp < CommonConstants.BREAK_POINTS_VALUE_NUMBER[1]) { + curBp = CommonConstants.BREAK_POINT_SM; + } else if (windowWidthVp < CommonConstants.BREAK_POINTS_VALUE_NUMBER[2]) { + curBp = CommonConstants.BREAK_POINT_MD; + } else { + curBp = CommonConstants.BREAK_POINT_LG; + } + AppStorage.setOrCreate('breakPoint', curBp); + } catch (error) { + hilog.error(DOMAIN, TAG, `Failed to obtain the default display. Cause code: ${error.code}, message: ${error.message}`) } - AppStorage.setOrCreate('breakPoint', curBp); } onWindowStageDestroy(): void { diff --git a/product/phone/src/main/ets/pages/Index.ets b/product/phone/src/main/ets/pages/Index.ets index 2f0d828..1364b0a 100644 --- a/product/phone/src/main/ets/pages/Index.ets +++ b/product/phone/src/main/ets/pages/Index.ets @@ -18,6 +18,11 @@ import { BreakpointUtil, CommonConstants, RouterConstants } from '@ohos/basic'; import { AccountPage, AdvertisementDialog, HomeComponent } from '@ohos/home'; import { Funding, FundingDetail, TrendsPage } from '@ohos/fund'; import { ComparisonDetailPage, ComparisonInfo } from '@ohos/fundComparison'; +import { hilog } from '@kit.PerformanceAnalysisKit'; +import { BusinessError } from '@kit.BasicServicesKit'; + +const DOMAIN = 0x0000; +const TAG = 'Index'; // [Start init_pop_custom_style] @Entry @@ -45,24 +50,37 @@ struct Index { // [StartExclude init_pop_custom_style] onPageShow() { window.getLastWindow(this.getUIContext().getHostContext()).then((windowStage: window.Window) => { - let area = windowStage.getWindowAvoidArea(window.AvoidAreaType.TYPE_SYSTEM); - let topHeight = this.getUIContext().px2vp(area.topRect.height); - let bottomArea = windowStage.getWindowAvoidArea(window.AvoidAreaType.TYPE_NAVIGATION_INDICATOR); - let bottom = this.getUIContext().px2vp(bottomArea.bottomRect.height); - if (topHeight > 0) { - windowStage.setWindowLayoutFullScreen(true); - AppStorage.setOrCreate('avoidArea', topHeight); - AppStorage.setOrCreate('bottom', bottom); + try { + let area = windowStage.getWindowAvoidArea(window.AvoidAreaType.TYPE_SYSTEM); + let topHeight = this.getUIContext().px2vp(area.topRect.height); + let bottomArea = windowStage.getWindowAvoidArea(window.AvoidAreaType.TYPE_NAVIGATION_INDICATOR); + let bottom = this.getUIContext().px2vp(bottomArea.bottomRect.height); + if (topHeight > 0) { + windowStage.setWindowLayoutFullScreen(true).catch((error:BusinessError) => { + hilog.error(DOMAIN, TAG, `Failed to set the window layout to full-screen mode. Cause code: ${error.code}, message: ${error.message}`) + }); + AppStorage.setOrCreate('avoidArea', topHeight); + AppStorage.setOrCreate('bottom', bottom); + } + } catch (error) { + hilog.error(DOMAIN, TAG, `Failed to obtain the window avoid area. Cause code: ${error.code}, message: ${error.message}`) } - }); + + }).catch((error: BusinessError) => { + hilog.error(DOMAIN, TAG, `Failed to obtain the last window. Cause code: ${error.code}, message: ${error.message}`) + }) } onPageHide() { window.getLastWindow(this.getUIContext().getHostContext()).then((windowStage: window.Window) => { if (this.topHeight > 0) { - windowStage.setWindowLayoutFullScreen(false); + windowStage.setWindowLayoutFullScreen(false).catch((error:BusinessError) => { + hilog.error(DOMAIN, TAG, `Failed to set the window layout to full-screen mode. Cause code: ${error.code}, message: ${error.message}`) + }); } - }); + }).catch((error: BusinessError) => { + hilog.error(DOMAIN, TAG, `Failed to obtain the last window. Cause code: ${error.code}, message: ${error.message}`) + }) } getTabBarColor(index: number, currentTabIndex: number, breakPoint: string): ResourceColor { @@ -114,12 +132,16 @@ struct Index { .hideTitleBar(true) .onWillShow(() => { window.getLastWindow(this.getUIContext().getHostContext()).then((windowStage: window.Window) => { - windowStage.setWindowLayoutFullScreen(false); + windowStage.setWindowLayoutFullScreen(false).catch((error: BusinessError) => { + hilog.error(DOMAIN, TAG, `Failed to set the window layout to full-screen mode. Cause code: ${error.code}, message: ${error.message}`) + }); }) }) .onWillDisappear(() => { window.getLastWindow(this.getUIContext().getHostContext()).then((windowStage: window.Window) => { - windowStage.setWindowLayoutFullScreen(true); + windowStage.setWindowLayoutFullScreen(true).catch((error: BusinessError) => { + hilog.error(DOMAIN, TAG, `Failed to set the window layout to full-screen mode. Cause code: ${error.code}, message: ${error.message}`) + }); }) }) } else if (name === RouterConstants.FUNDING_DETAIL_URL) { @@ -133,12 +155,16 @@ struct Index { .hideTitleBar(true) .onWillShow(() => { window.getLastWindow(this.getUIContext().getHostContext()).then((windowStage: window.Window) => { - windowStage.setWindowLayoutFullScreen(false); + windowStage.setWindowLayoutFullScreen(false).catch((error:BusinessError) => { + hilog.error(DOMAIN, TAG, `Failed to set the window layout to full-screen mode. Cause code: ${error.code}, message: ${error.message}`) + }); }) }) .onWillDisappear(() => { window.getLastWindow(this.getUIContext().getHostContext()).then((windowStage: window.Window) => { - windowStage.setWindowLayoutFullScreen(true); + windowStage.setWindowLayoutFullScreen(true).catch((error:BusinessError) => { + hilog.error(DOMAIN, TAG, `Failed to set the window layout to full-screen mode. Cause code: ${error.code}, message: ${error.message}`) + }); }) }) } -- Gitee From 775e6e2240c578ec198d08e962fe471bb3827ce7 Mon Sep 17 00:00:00 2001 From: yangxueli_sylus Date: Mon, 22 Sep 2025 20:20:58 +0800 Subject: [PATCH 2/2] =?UTF-8?q?IDE=E8=AD=A6=E5=91=8A=E6=95=B4=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- features/fund/oh-package.json5 | 6 +++--- features/fund/src/main/ets/view/DetailComponent.ets | 2 +- features/fund/src/main/ets/view/FundComponent.ets | 2 +- .../fund/src/main/ets/view/FundNavigationComponent.ets | 2 +- features/fund/src/main/ets/view/Funding.ets | 2 +- features/fund/src/main/ets/view/FundingDetail.ets | 6 +++--- features/fund/src/main/ets/view/TrendsPage.ets | 2 +- features/fund/src/main/ets/viewmodel/FundingViewModel.ets | 2 +- features/fundComparison/oh-package.json5 | 2 +- .../src/main/ets/view/ComparisonComponent.ets | 2 +- .../src/main/ets/view/ComparisonDetailComponent.ets | 2 +- .../src/main/ets/view/ComparisonDetailPage.ets | 2 +- features/home/oh-package.json5 | 2 +- features/home/src/main/ets/view/AccountComponent.ets | 2 +- features/home/src/main/ets/view/AccountPage.ets | 2 +- features/home/src/main/ets/view/AdvertisementDialog.ets | 2 +- .../home/src/main/ets/view/DemandDepositComponent.ets | 2 +- features/home/src/main/ets/view/HomeComponent.ets | 2 +- features/home/src/main/ets/view/InvestmentComponent.ets | 2 +- features/home/src/main/ets/view/LiabilitiesComponent.ets | 2 +- features/home/src/main/ets/viewmodel/HomeViewModel.ets | 2 +- features/transaction/oh-package.json5 | 2 +- .../src/main/ets/view/TransactionComponent.ets | 2 +- product/phone/oh-package.json5 | 8 ++++---- product/phone/src/main/ets/entryability/EntryAbility.ets | 2 +- product/phone/src/main/ets/pages/Index.ets | 8 ++++---- 26 files changed, 36 insertions(+), 36 deletions(-) diff --git a/features/fund/oh-package.json5 b/features/fund/oh-package.json5 index 1bb4c03..c4700c1 100644 --- a/features/fund/oh-package.json5 +++ b/features/fund/oh-package.json5 @@ -9,9 +9,9 @@ "packageType": "InterfaceHar", "dynamicDependencies": {}, "dependencies": { - "@ohos/transaction": "file:../transaction", - "@ohos/fundComparison": "file:../fundComparison", - "@ohos/basic": "file:../../commons/basic", + "transaction": "file:../transaction", + "fundComparison": "file:../fundComparison", + "basic": "file:../../commons/basic", "@ohos/mpchart": "3.0.23-rc.0" } } diff --git a/features/fund/src/main/ets/view/DetailComponent.ets b/features/fund/src/main/ets/view/DetailComponent.ets index cac46e3..efb160e 100644 --- a/features/fund/src/main/ets/view/DetailComponent.ets +++ b/features/fund/src/main/ets/view/DetailComponent.ets @@ -14,7 +14,7 @@ */ import { LineChart, LineChartModel } from '@ohos/mpchart'; -import { BreakpointUtil, CommonConstants, FundDetail, RouterConstants } from '@ohos/basic'; +import { BreakpointUtil, CommonConstants, FundDetail, RouterConstants } from 'basic'; import ChartViewModel from '../viewmodel/ChartViewModel'; import FundingViewModel from '../viewmodel/FundingViewModel'; import { FundConstants } from '../constants/FundConstants'; diff --git a/features/fund/src/main/ets/view/FundComponent.ets b/features/fund/src/main/ets/view/FundComponent.ets index dd9d273..3ce7eef 100644 --- a/features/fund/src/main/ets/view/FundComponent.ets +++ b/features/fund/src/main/ets/view/FundComponent.ets @@ -13,7 +13,7 @@ * limitations under the License. */ -import { BreakpointUtil, BusinessInfo, CommonConstants, FundDetail, RouterConstants } from '@ohos/basic'; +import { BreakpointUtil, BusinessInfo, CommonConstants, FundDetail, RouterConstants } from 'basic'; import { FundConstants } from '../constants/FundConstants'; import FundingViewModel from '../viewmodel/FundingViewModel'; diff --git a/features/fund/src/main/ets/view/FundNavigationComponent.ets b/features/fund/src/main/ets/view/FundNavigationComponent.ets index b159654..c528ad3 100644 --- a/features/fund/src/main/ets/view/FundNavigationComponent.ets +++ b/features/fund/src/main/ets/view/FundNavigationComponent.ets @@ -13,7 +13,7 @@ * limitations under the License. */ -import { BreakpointUtil, BusinessInfo, CommonConstants, FundDetail } from '@ohos/basic'; +import { BreakpointUtil, BusinessInfo, CommonConstants, FundDetail } from 'basic'; import { FundConstants } from '../constants/FundConstants'; import FundingViewModel from '../viewmodel/FundingViewModel'; diff --git a/features/fund/src/main/ets/view/Funding.ets b/features/fund/src/main/ets/view/Funding.ets index 453f852..7432603 100644 --- a/features/fund/src/main/ets/view/Funding.ets +++ b/features/fund/src/main/ets/view/Funding.ets @@ -13,7 +13,7 @@ * limitations under the License. */ -import { CommonConstants } from '@ohos/basic/'; +import { CommonConstants } from 'basic/'; import { window } from '@kit.ArkUI'; import { FundConstants } from '../constants/FundConstants'; import { FundComponent } from './FundComponent'; diff --git a/features/fund/src/main/ets/view/FundingDetail.ets b/features/fund/src/main/ets/view/FundingDetail.ets index 70731a6..779c873 100644 --- a/features/fund/src/main/ets/view/FundingDetail.ets +++ b/features/fund/src/main/ets/view/FundingDetail.ets @@ -13,9 +13,9 @@ * limitations under the License. */ -import { CommonConstants } from '@ohos/basic/'; -import { ComparisonComponent, ComparisonInfo, ComparisonDetailComponent } from '@ohos/fundComparison/'; -import { TransactionComponent } from '@ohos/transaction/'; +import { CommonConstants } from 'basic/'; +import { ComparisonComponent, ComparisonInfo, ComparisonDetailComponent } from 'fundComparison/'; +import { TransactionComponent } from 'transaction'; import { FundConstants } from '../constants/FundConstants'; import { DetailComponent } from './DetailComponent'; import { FundNavigationComponent } from './FundNavigationComponent'; diff --git a/features/fund/src/main/ets/view/TrendsPage.ets b/features/fund/src/main/ets/view/TrendsPage.ets index 0a8d3b1..b1adcb9 100644 --- a/features/fund/src/main/ets/view/TrendsPage.ets +++ b/features/fund/src/main/ets/view/TrendsPage.ets @@ -17,7 +17,7 @@ import { Callback } from '@kit.BasicServicesKit'; import { display } from '@kit.ArkUI'; import { window } from '@kit.ArkUI'; import { LineChart, LineChartModel } from '@ohos/mpchart'; -import { BreakpointUtil, CommonConstants, logger } from '@ohos/basic/'; +import { BreakpointUtil, CommonConstants, logger } from 'basic/'; import ChartViewModel from '../viewmodel/ChartViewModel'; import { ChartLegendComponent } from './ChartLegendComponent'; import { FundConstants } from '../constants/FundConstants'; diff --git a/features/fund/src/main/ets/viewmodel/FundingViewModel.ets b/features/fund/src/main/ets/viewmodel/FundingViewModel.ets index a36648e..84f0f77 100644 --- a/features/fund/src/main/ets/viewmodel/FundingViewModel.ets +++ b/features/fund/src/main/ets/viewmodel/FundingViewModel.ets @@ -13,7 +13,7 @@ * limitations under the License. */ -import { BusinessInfo, FundDetail } from '@ohos/basic'; +import { BusinessInfo, FundDetail } from 'basic'; /** * Get fund data. diff --git a/features/fundComparison/oh-package.json5 b/features/fundComparison/oh-package.json5 index 8a44952..78e4693 100644 --- a/features/fundComparison/oh-package.json5 +++ b/features/fundComparison/oh-package.json5 @@ -9,6 +9,6 @@ "packageType": "InterfaceHar", "dynamicDependencies": {}, "dependencies": { - "@ohos/basic": "file:../../commons/basic" + "basic": "file:../../commons/basic" } } diff --git a/features/fundComparison/src/main/ets/view/ComparisonComponent.ets b/features/fundComparison/src/main/ets/view/ComparisonComponent.ets index 87d7bfd..48c2412 100644 --- a/features/fundComparison/src/main/ets/view/ComparisonComponent.ets +++ b/features/fundComparison/src/main/ets/view/ComparisonComponent.ets @@ -14,7 +14,7 @@ */ import { TreeMap } from '@kit.ArkTS'; -import { CommonConstants } from '@ohos/basic'; +import { CommonConstants } from 'basic'; import { ComparisonInfo } from '../viewmodel/ComparisonInfo'; import FundComparisonViewModel from '../viewmodel/FundComparisonViewModel'; import { ComparisonConstants } from '../constants/ComparisonConstants'; diff --git a/features/fundComparison/src/main/ets/view/ComparisonDetailComponent.ets b/features/fundComparison/src/main/ets/view/ComparisonDetailComponent.ets index 222a5c7..b15bf91 100644 --- a/features/fundComparison/src/main/ets/view/ComparisonDetailComponent.ets +++ b/features/fundComparison/src/main/ets/view/ComparisonDetailComponent.ets @@ -13,7 +13,7 @@ * limitations under the License. */ -import { CommonConstants, logger, RouterConstants } from '@ohos/basic'; +import { CommonConstants, logger, RouterConstants } from 'basic'; import { ComparisonConstants } from '../constants/ComparisonConstants'; import { ComparisonInfo } from '../viewmodel/ComparisonInfo'; import FundComparisonViewModel from '../viewmodel/FundComparisonViewModel'; diff --git a/features/fundComparison/src/main/ets/view/ComparisonDetailPage.ets b/features/fundComparison/src/main/ets/view/ComparisonDetailPage.ets index 4b06aa9..58277ba 100644 --- a/features/fundComparison/src/main/ets/view/ComparisonDetailPage.ets +++ b/features/fundComparison/src/main/ets/view/ComparisonDetailPage.ets @@ -15,7 +15,7 @@ import { ComparisonDetailComponent } from './ComparisonDetailComponent'; import { ComparisonInfo } from '../viewmodel/ComparisonInfo'; -import { CommonConstants } from '@ohos/basic'; +import { CommonConstants } from 'basic'; @Component export struct ComparisonDetailPage { diff --git a/features/home/oh-package.json5 b/features/home/oh-package.json5 index 31c266b..571001a 100644 --- a/features/home/oh-package.json5 +++ b/features/home/oh-package.json5 @@ -9,6 +9,6 @@ "packageType": "InterfaceHar", "dynamicDependencies": {}, "dependencies": { - "@ohos/basic": "file:../../commons/basic" + "basic": "file:../../commons/basic" } } diff --git a/features/home/src/main/ets/view/AccountComponent.ets b/features/home/src/main/ets/view/AccountComponent.ets index 3f42f68..13ad584 100644 --- a/features/home/src/main/ets/view/AccountComponent.ets +++ b/features/home/src/main/ets/view/AccountComponent.ets @@ -13,7 +13,7 @@ * limitations under the License. */ -import { CommonConstants } from '@ohos/basic/Index'; +import { CommonConstants } from 'basic/Index'; import { DemandDepositComponent } from './DemandDepositComponent'; import { InvestmentComponent } from './InvestmentComponent'; import { LiabilitiesComponent } from './LiabilitiesComponent'; diff --git a/features/home/src/main/ets/view/AccountPage.ets b/features/home/src/main/ets/view/AccountPage.ets index beee6ef..4726afc 100644 --- a/features/home/src/main/ets/view/AccountPage.ets +++ b/features/home/src/main/ets/view/AccountPage.ets @@ -14,7 +14,7 @@ */ import { window } from '@kit.ArkUI'; -import { CommonConstants } from '@ohos/basic/Index'; +import { CommonConstants } from 'basic/Index'; import { AccountComponent } from './AccountComponent'; import { BusinessError } from '@kit.BasicServicesKit'; import { hilog } from '@kit.PerformanceAnalysisKit'; diff --git a/features/home/src/main/ets/view/AdvertisementDialog.ets b/features/home/src/main/ets/view/AdvertisementDialog.ets index 9521196..8b8baac 100644 --- a/features/home/src/main/ets/view/AdvertisementDialog.ets +++ b/features/home/src/main/ets/view/AdvertisementDialog.ets @@ -13,7 +13,7 @@ * limitations under the License. */ -import { BreakpointUtil, CommonConstants } from '@ohos/basic'; +import { BreakpointUtil, CommonConstants } from 'basic'; @CustomDialog export struct AdvertisementDialog { diff --git a/features/home/src/main/ets/view/DemandDepositComponent.ets b/features/home/src/main/ets/view/DemandDepositComponent.ets index 1508377..6672501 100644 --- a/features/home/src/main/ets/view/DemandDepositComponent.ets +++ b/features/home/src/main/ets/view/DemandDepositComponent.ets @@ -13,7 +13,7 @@ * limitations under the License. */ -import { CommonConstants } from '@ohos/basic/Index'; +import { CommonConstants } from 'basic/Index'; import { HomeConstants } from '../constants/HomeConstants'; @Component diff --git a/features/home/src/main/ets/view/HomeComponent.ets b/features/home/src/main/ets/view/HomeComponent.ets index c0437db..6a99969 100644 --- a/features/home/src/main/ets/view/HomeComponent.ets +++ b/features/home/src/main/ets/view/HomeComponent.ets @@ -13,7 +13,7 @@ * limitations under the License. */ -import { BreakpointUtil, BusinessInfo, CommonConstants, RouterConstants } from '@ohos/basic'; +import { BreakpointUtil, BusinessInfo, CommonConstants, RouterConstants } from 'basic'; import { HomeConstants } from '../constants/HomeConstants'; import HomeViewModel from '../viewmodel/HomeViewModel'; diff --git a/features/home/src/main/ets/view/InvestmentComponent.ets b/features/home/src/main/ets/view/InvestmentComponent.ets index 767a0e7..1db3622 100644 --- a/features/home/src/main/ets/view/InvestmentComponent.ets +++ b/features/home/src/main/ets/view/InvestmentComponent.ets @@ -13,7 +13,7 @@ * limitations under the License. */ -import { BreakpointUtil, CommonConstants } from '@ohos/basic/Index'; +import { BreakpointUtil, CommonConstants } from 'basic/Index'; @Component export struct InvestmentComponent { diff --git a/features/home/src/main/ets/view/LiabilitiesComponent.ets b/features/home/src/main/ets/view/LiabilitiesComponent.ets index f274054..4c60c62 100644 --- a/features/home/src/main/ets/view/LiabilitiesComponent.ets +++ b/features/home/src/main/ets/view/LiabilitiesComponent.ets @@ -13,7 +13,7 @@ * limitations under the License. */ -import { BreakpointUtil, CommonConstants } from '@ohos/basic/Index'; +import { BreakpointUtil, CommonConstants } from 'basic/Index'; @Component export struct LiabilitiesComponent { diff --git a/features/home/src/main/ets/viewmodel/HomeViewModel.ets b/features/home/src/main/ets/viewmodel/HomeViewModel.ets index a7b0497..86d6123 100644 --- a/features/home/src/main/ets/viewmodel/HomeViewModel.ets +++ b/features/home/src/main/ets/viewmodel/HomeViewModel.ets @@ -13,7 +13,7 @@ * limitations under the License. */ -import { BusinessInfo, RouterConstants } from '@ohos/basic'; +import { BusinessInfo, RouterConstants } from 'basic'; /** * Get home data. diff --git a/features/transaction/oh-package.json5 b/features/transaction/oh-package.json5 index 5ee1df0..1abba65 100644 --- a/features/transaction/oh-package.json5 +++ b/features/transaction/oh-package.json5 @@ -9,6 +9,6 @@ "packageType": "InterfaceHar", "dynamicDependencies": {}, "dependencies": { - "@ohos/basic": "file:../../commons/basic" + "basic": "file:../../commons/basic" } } diff --git a/features/transaction/src/main/ets/view/TransactionComponent.ets b/features/transaction/src/main/ets/view/TransactionComponent.ets index 9dddd8b..2efe0fa 100644 --- a/features/transaction/src/main/ets/view/TransactionComponent.ets +++ b/features/transaction/src/main/ets/view/TransactionComponent.ets @@ -14,7 +14,7 @@ */ import { window } from '@kit.ArkUI'; -import { CommonConstants, FundDetail } from '@ohos/basic'; +import { CommonConstants, FundDetail } from 'basic'; import { TransactionConstants } from '../constants/TransactionConstants'; @Component diff --git a/product/phone/oh-package.json5 b/product/phone/oh-package.json5 index 7a77716..488b369 100644 --- a/product/phone/oh-package.json5 +++ b/product/phone/oh-package.json5 @@ -8,9 +8,9 @@ "version": "1.0.0", "dynamicDependencies": {}, "dependencies": { - "@ohos/basic": "file:../../commons/basic", - "@ohos/home": "file:../../features/home", - "@ohos/fund": "file:../../features/fund", - "@ohos/fundComparison": "file:../../features/fundComparison" + "basic": "file:../../commons/basic", + "home": "file:../../features/home", + "fund": "file:../../features/fund", + "fundComparison": "file:../../features/fundComparison" } } diff --git a/product/phone/src/main/ets/entryability/EntryAbility.ets b/product/phone/src/main/ets/entryability/EntryAbility.ets index 0c39f47..b3d1604 100644 --- a/product/phone/src/main/ets/entryability/EntryAbility.ets +++ b/product/phone/src/main/ets/entryability/EntryAbility.ets @@ -17,7 +17,7 @@ import { UIAbility, Want, AbilityConstant } from '@kit.AbilityKit'; import { BusinessError } from '@kit.BasicServicesKit'; import { hilog } from '@kit.PerformanceAnalysisKit'; import { display, window } from '@kit.ArkUI'; -import { CommonConstants } from '@ohos/basic'; +import { CommonConstants } from 'basic'; const DOMAIN = 0x0000; const TAG = 'EntryAbility'; diff --git a/product/phone/src/main/ets/pages/Index.ets b/product/phone/src/main/ets/pages/Index.ets index 1364b0a..895f3a0 100644 --- a/product/phone/src/main/ets/pages/Index.ets +++ b/product/phone/src/main/ets/pages/Index.ets @@ -14,10 +14,10 @@ */ import { window } from '@kit.ArkUI'; -import { BreakpointUtil, CommonConstants, RouterConstants } from '@ohos/basic'; -import { AccountPage, AdvertisementDialog, HomeComponent } from '@ohos/home'; -import { Funding, FundingDetail, TrendsPage } from '@ohos/fund'; -import { ComparisonDetailPage, ComparisonInfo } from '@ohos/fundComparison'; +import { BreakpointUtil, CommonConstants, RouterConstants } from 'basic'; +import { AccountPage, AdvertisementDialog, HomeComponent } from 'home'; +import { Funding, FundingDetail, TrendsPage } from 'fund'; +import { ComparisonDetailPage, ComparisonInfo } from 'fundComparison'; import { hilog } from '@kit.PerformanceAnalysisKit'; import { BusinessError } from '@kit.BasicServicesKit'; -- Gitee