From e76c2b19e9ba16ee7249a2aa0722479bcee74ad1 Mon Sep 17 00:00:00 2001 From: huangxiaoyao <976125628@qq.com> Date: Thu, 12 Sep 2024 13:41:48 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dpost=E8=AF=B7=E6=B1=82?= =?UTF-8?q?=E6=96=B9=E5=BC=8F=E5=8A=A0=E8=BD=BDH5=E5=BC=82=E5=B8=B8?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: huangxiaoyao <976125628@qq.com> --- .../components/plugin/webview/in_app_webview/InAppWebView.ets | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/flutter_inappwebview_ohos/ohos/src/main/ets/components/plugin/webview/in_app_webview/InAppWebView.ets b/flutter_inappwebview_ohos/ohos/src/main/ets/components/plugin/webview/in_app_webview/InAppWebView.ets index 39f964fe..c9aace06 100644 --- a/flutter_inappwebview_ohos/ohos/src/main/ets/components/plugin/webview/in_app_webview/InAppWebView.ets +++ b/flutter_inappwebview_ohos/ohos/src/main/ets/components/plugin/webview/in_app_webview/InAppWebView.ets @@ -879,7 +879,9 @@ export default class InAppWebView implements InAppWebViewInterface { async postUrl(url: string, postData: ArrayBuffer | null) { await this.waitControllerAttached(); - this.controller.postUrl(url, postData); + const uint8Array: Uint8Array = postData as Uint8Array; + const buffer: ArrayBuffer = uint8Array.buffer as ArrayBuffer; + this.controller.postUrl(url, buffer); } async loadDataWithBaseURL(baseUrl: string, data: string, mimeType: string, encoding: string, historyUrl: string) { -- Gitee