Commit c1158606 authored by 李维's avatar 李维

feat: 添加webview调用支持

parent 1caef1db
......@@ -252,7 +252,12 @@ export default class middleLayer extends cc.Component {
console.log("关闭游戏中心,加载空页面...");
cc.director.loadScene("empty", () => {
cc.game.removePersistRootNode(this.node);
this.callNativeFunction({ name: "exit", value: "" });
// 发送消息到Flutter
if((window as any).FlutterChannel) {
(window as any).FlutterChannel.postMessage('close_webview');
} else {
this.callNativeFunction({ name: "exit", value: "" });
}
});
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment