diff --git a/entry/src/main/ets/view/common/Banner.ets b/entry/src/main/ets/view/common/Banner.ets index 0a9aa7daee906540d61c74b5f4e226d8cc7eb305..3e534357f23b35bd3a4e97a07157698aa66bad21 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 7c6b807cf9f13b19355ea81f0e0d8e0a5cf64a36..4f1b9b0ed8b1b80161eb9f9581ffd5e128954e0e 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 5539d68b5946ba6934483dc2d4f329c6754b8b49..5471129f9c27a10f00b7832667201b872f889eee 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'))