From 5ea18f1468b84d33c8909d6b8c376cb24f151d2a Mon Sep 17 00:00:00 2001 From: xiaoxiao Date: Fri, 8 Aug 2025 17:03:39 +0800 Subject: [PATCH] cookie --- products/expert/src/main/ets/pages/WebView/WebPage.ets | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/products/expert/src/main/ets/pages/WebView/WebPage.ets b/products/expert/src/main/ets/pages/WebView/WebPage.ets index b457cae..2d332f1 100644 --- a/products/expert/src/main/ets/pages/WebView/WebPage.ets +++ b/products/expert/src/main/ets/pages/WebView/WebPage.ets @@ -64,11 +64,7 @@ struct WebPage { }) .onPageBegin(()=>{ if (this.needsCookieInjection(this.url)) { - try { - webview.WebCookieManager.configCookieSync('https://dev-wx.igandan.com', 'hcp_from=expert_app;path=/;domain=.igandan.com;hcp_token='+this.hcp_token+';'); - } catch (error) { - console.error(`ErrorCode: ${(error as BusinessError).code}, Message: ${(error as BusinessError).message}`); - } + this.controller.runJavaScript(`hcp_from=expert_app;path=/;domain=.igandan.com;hcp_token=${this.hcp_token}`) } }) .onPageEnd(() => {