From 1a821065aeba964375aa6b3d158257c532f9c7c6 Mon Sep 17 00:00:00 2001 From: hzt Date: Wed, 30 Apr 2025 17:26:37 +0800 Subject: [PATCH] =?UTF-8?q?improvement:=E5=BA=9F=E5=BC=83API=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- entry/src/main/ets/pages/RequestAndResponse.ets | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/entry/src/main/ets/pages/RequestAndResponse.ets b/entry/src/main/ets/pages/RequestAndResponse.ets index 8a5acf3..52f3f54 100644 --- a/entry/src/main/ets/pages/RequestAndResponse.ets +++ b/entry/src/main/ets/pages/RequestAndResponse.ets @@ -52,7 +52,7 @@ export struct RequestAndResponse { @State requestUrl: url.URL | string = ''; @State url: string = ''; @StorageLink('ReplacedInfo') storageLink: string = ''; - private readonly pathToImage: string = getContext().filesDir + '/panda.jpg'; + private readonly pathToImage: string = this.getUIContext().getHostContext()!.filesDir + '/panda.jpg'; private simulateSlowNetwork: boolean = false; private async getImage() { -- Gitee