0

我想通过脚本编码而不是从 CocosCreator 中的设计视图在我的 WebView中打开任何这样的 URL( https://example.com/mPayment/api.php?playerid=name&method=init )。我已经完成了这段代码,但它没有打开我做错的事情,

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 游戏中实现支付网关。

4

1 回答 1

1

工作正常:

this.webView.url = this.editBox.string;

也许您忘记在设计器中将 webView 绑定到 UI 元素。

于 2019-03-28T09:47:23.653 回答