VS2017科尔多瓦$ .ajax XMLHTTPREQUEST失败

时间:2019-05-28 00:24:27

标签: jquery ajax web-services visual-studio-cordova

该代码在使用浏览器进行测试时有效。但是在我构建和安装apk时失败了。

invites = await server.invites()
invites = [invite.url for invite in invites]
invites_message = "\n".join(invites)
await fetching.edit(content=f"All Active Invites Codes: \n{invites_message}")

在我的Cordova项目中,我已经设置了:

$.ajax({
    type: "POST",
    async: true,
    url: "http://localhost:60052/Public/Interface.asmx/Test",
    data: JSON.stringify(Params),
    cache: false,
    contentType: "application/json; charset=utf-8",
    success: function (msg) {
    },
    error: function (XHR, errStatus, errorThrown) {
            // NETWORKERROR: 'XMLHTTPREQUEST': FAILED TO LOAD ......
    }
});

0 个答案:

没有答案
相关问题