From 76b0819f5293602e988dc72bc992b168311a8c39 Mon Sep 17 00:00:00 2001 From: WX1379483 Date: Tue, 6 May 2025 16:32:55 +0800 Subject: [PATCH] fixed --- entry/src/main/ets/view/common/Banner.ets | 2 +- entry/src/main/ets/view/common/PictureView.ets | 2 +- entry/src/main/ets/view/play/NavigationView.ets | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/entry/src/main/ets/view/common/Banner.ets b/entry/src/main/ets/view/common/Banner.ets index 0a9aa7d..3e53435 100644 --- a/entry/src/main/ets/view/common/Banner.ets +++ b/entry/src/main/ets/view/common/Banner.ets @@ -66,7 +66,7 @@ export struct Banner { .borderRadius(CommonConstants.BORDER_RADIUS) .align(Alignment.Center) .onClick(() => { - router.pushUrl({ url: CommonConstants.PLAY_PAGE }); + this.getUIContext().getRouter().pushUrl({ url: CommonConstants.PLAY_PAGE }); }) Column() { diff --git a/entry/src/main/ets/view/common/PictureView.ets b/entry/src/main/ets/view/common/PictureView.ets index 7c6b807..4f1b9b0 100644 --- a/entry/src/main/ets/view/common/PictureView.ets +++ b/entry/src/main/ets/view/common/PictureView.ets @@ -29,7 +29,7 @@ export struct PictureView { Image(this.photos.image).borderRadius(CommonConstants.BORDER_RADIUS) .height(CommonConstants.WIDTH_PICTURE) .onClick(() => { - router.pushUrl({ url: CommonConstants.PLAY_PAGE }); + this.getUIContext().getRouter().pushUrl({ url: CommonConstants.PLAY_PAGE }); }) Text(this.photos.name).width(CommonConstants.PAGE_WIDTH) diff --git a/entry/src/main/ets/view/play/NavigationView.ets b/entry/src/main/ets/view/play/NavigationView.ets index 5539d68..5471129 100644 --- a/entry/src/main/ets/view/play/NavigationView.ets +++ b/entry/src/main/ets/view/play/NavigationView.ets @@ -28,7 +28,7 @@ export struct NavigationView { .height(CommonConstants.HEIGHT_BACK_ICON) .objectFit(ImageFit.Contain) .onClick(() => { - router.back(); + this.getUIContext().getRouter().back(); }) Text($r('app.string.movie')) -- Gitee