[add] url

This commit is contained in:
建喵 2022-04-19 11:06:46 +08:00
parent 63b95b3782
commit 3a620cdac1

View File

@ -29,17 +29,18 @@ export default class Manager extends cc.Component {
let data: any = e.data; let data: any = e.data;
let method: string = data.method; let method: string = data.method;
let value: any = data.value; let value: any = data.value;
self.Birdge(method, ...value) self.Birdge(method, ...value);
}, false); }, false);
if (!window["Bridge"]) { if (!window["Bridge"]) {
window["Bridge"] = function (method: string = "", value: string = ""): void { window["Bridge"] = function (method: string = "", value: string = ""): void {
self.Birdge(method, value) self.Birdge(method, value);
}; };
} }
let href: string = window.location.href; let href: string = window.location.href;
this.webview.url = `https://karolchang.github.io/jm-expense-vue-ts/?host=${href}&ignore=${Date.now()}`; let url: string = `https://karolchang.github.io/jm-expense-vue-ts/?host=${href}&ignore=${Date.now()}`;
this.webview.url = url;
// this.webview.url = `http://localhost:8080/jm-expense-vue-ts/?host=${href}&ignore=${Date.now()}`; // this.webview.url = `http://localhost:8080/jm-expense-vue-ts/?host=${href}&ignore=${Date.now()}`;
this.webview.node.active = true; this.webview.node.active = true;