[add] 接webview事件

This commit is contained in:
建喵 2022-01-04 22:46:30 +08:00
parent 25ea4df6f8
commit a60dd01944

View File

@ -32,10 +32,9 @@ export default class Manager extends cc.Component {
console.log(`not function: ${method}, value: ${value}`); console.log(`not function: ${method}, value: ${value}`);
}, false); }, false);
let href: string = window.location.href; let href: string = window.location.href;
// window.open(`https://jianmiau.ml:3334/googletest?host=${href}`, "newwindow", "height=100,width=400");
// this.webview.url = `https://karolchang.github.io/jm-expense-vue-ts/?ignore=${Date.now()}`; this.webview.url = `https://karolchang.github.io/jm-expense-vue-ts/?ignore=${Date.now()}`;
this.webview.url = `http://localhost:8080/jm-expense-vue-ts/?ignore=${Date.now()}&host=${href}`; // this.webview.url = `http://localhost:8080/jm-expense-vue-ts/?ignore=${Date.now()}&host=${href}`;
this.webview.node.active = true; this.webview.node.active = true;
cc.view.setResizeCallback(this._resize.bind(this)); cc.view.setResizeCallback(this._resize.bind(this));