我想在我的WebView中通过脚本编码打开任何这样的网址(https://example.com/mPayment/api.php?playerid=name&method=init)而不是CocosCreator中的设计视图。我已经完成了这个代码,但它没有打开我做错了什么,
var url = "https://example.com/mPayment/api.php?playerid=name&method=init";
this.webPage._url = url;
console.log("Webview1111111 ==== ", this.webPage._url);
并且在url上有我想要传递玩家ID的名称。我很想在我的cocos creator游戏中实现支付网关。
工作良好:
this.webView.url = this.editBox.string;
也许你忘了将webView绑定到设计器中的UI元素。