From 5cd0e96ee4e6991f127b3678aee0cf8a139ed10e Mon Sep 17 00:00:00 2001 From: wangxinbo Date: Tue, 6 May 2025 18:36:45 +0800 Subject: [PATCH 1/2] =?UTF-8?q?fix=EF=BC=9A=E4=BF=AE=E6=94=B9=E5=BA=9F?= =?UTF-8?q?=E5=BC=83api?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- entry/src/main/ets/pages/Index.ets | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/entry/src/main/ets/pages/Index.ets b/entry/src/main/ets/pages/Index.ets index 27770c5..4d3d53d 100644 --- a/entry/src/main/ets/pages/Index.ets +++ b/entry/src/main/ets/pages/Index.ets @@ -17,7 +17,6 @@ import { webview } from '@kit.ArkWeb'; import { common, Want } from '@kit.AbilityKit'; import { BusinessError } from '@kit.BasicServicesKit'; import { distributedDeviceManager } from '@kit.DistributedServiceKit'; -import { promptAction } from '@kit.ArkUI'; import { productViewManager } from '@kit.StoreKit'; import { OriginPage } from './OriginPage'; import { Constants } from '../common/Constants'; @@ -31,7 +30,7 @@ struct Index { @Provide navPathStack: NavPathStack = new NavPathStack(); @StorageProp(Constants.SYSTEM_LANGUAGE_KEY) la: string = '' private controller: WebviewController = new webview.WebviewController(); - private context = getContext(this) as common.UIAbilityContext; + private context = this.getUIContext().getHostContext() as common.UIAbilityContext; private functionsMap: Map void> = new Map(); private bundleName: string = ''; @@ -114,7 +113,7 @@ struct Index { try { let remoteDeviceId = this.getRemoteDeviceId(); if (!remoteDeviceId) { - promptAction.showToast({ + this.getUIContext().getPromptAction().showToast({ message: $r('app.string.not_found_toast'), duration: 2000 }) -- Gitee From c598afb930d7dc3c9f8fc0f9be818fa8a0ee9a5f Mon Sep 17 00:00:00 2001 From: wangxinbo Date: Wed, 7 May 2025 16:52:37 +0800 Subject: [PATCH 2/2] =?UTF-8?q?fix=EF=BC=9Aapi=E5=8D=87=E7=BA=A7=E8=87=B31?= =?UTF-8?q?6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build-profile.json5 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build-profile.json5 b/build-profile.json5 index c033ce4..e8de1a3 100644 --- a/build-profile.json5 +++ b/build-profile.json5 @@ -5,7 +5,7 @@ { "name": "default", "signingConfig": "default", - "compatibleSdkVersion": "5.0.0(12)", + "compatibleSdkVersion": "5.0.4(16)", "runtimeOS": "HarmonyOS", } ], -- Gitee