[mod] iOS可以用的溝通Cocos
This commit is contained in:
parent
cfe31371af
commit
ecad6d01e3
@ -62,7 +62,7 @@ export default class Manager extends cc.Component {
|
|||||||
self.Birdge(method, value);
|
self.Birdge(method, value);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
let scheme: string = "http";
|
let scheme: string = "jmka";
|
||||||
this.webview.setJavascriptInterfaceScheme(scheme);
|
this.webview.setJavascriptInterfaceScheme(scheme);
|
||||||
this.webview.setOnJSCallback((sender: any, url: any) => {
|
this.webview.setOnJSCallback((sender: any, url: any) => {
|
||||||
let content: string = decodeURI(url.split(`${scheme}://?data=`)[1]);
|
let content: string = decodeURI(url.split(`${scheme}://?data=`)[1]);
|
||||||
|
Loading…
Reference in New Issue
Block a user