Update home.tsx

This commit is contained in:
Ted 2025-02-20 18:18:03 +08:00
parent 309509d1ad
commit 9d4282aa6f
1 changed files with 2 additions and 4 deletions

View File

@ -280,7 +280,7 @@ export function Home() {
if (isString(data)) { if (isString(data)) {
try { try {
const params = JSON.parse(data); // const params = JSON.parse(data);
window.ReactNativeWebView.postMessage(`${data} 从App获取的数据`); window.ReactNativeWebView.postMessage(`${data} 从App获取的数据`);
@ -298,9 +298,7 @@ export function Home() {
// } // }
// } // }
} catch (err) { } catch (err) {
window.ReactNativeWebView.postMessage( window.ReactNativeWebView.postMessage(`try catch 失败`);
`${(err as Error).message} try catch 失败`,
);
} }
return; return;