mirror of
https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web.git
synced 2025-11-17 14:33:41 +08:00
添加发送webview事件
This commit is contained in:
@@ -282,8 +282,17 @@ export function Home() {
|
||||
try {
|
||||
const params = JSON.parse(data);
|
||||
|
||||
if (!isEmpty(params?.omeToken) && params?.from === "OmeOfficeApp")
|
||||
if (!isEmpty(params?.omeToken) && params?.from === "OmeOfficeApp") {
|
||||
appConfig.setOmeToken(params?.omeToken ?? "");
|
||||
|
||||
try {
|
||||
const message = "收到消息";
|
||||
|
||||
window.ReactNativeWebView.postMessage(message);
|
||||
} catch {
|
||||
console.log("window.ReactNativeWebView Err");
|
||||
}
|
||||
}
|
||||
} catch {}
|
||||
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user