[]请问我用下面的代码发送个简单的http get请求,为什么在电脑上能得到成功输出,在手机上总是得到失败输出呢?
function myfunc()
{
var url = "http://43.254.151.248/sf_serve ... 3B%3B
alert("url=" + url);
var req = new laya.net.HttpRequest();
req.on(laya.events.Event.COMPLETE, null, cb_onSuccess);
req.on(laya.events.Event.ERROR, null, cb_onFail);
req.send(url);
}
function cb_onSuccess(response)
{
alert("response=" + response); // 成功输出:{"ret":1478136071}
}
function cb_onFail(message)
{
alert(message); // 失败输出:Request failed Status:0 text:
}
注:url后面部分是sf_server?RequestType=Time,不知怎么被转码了
{
var url = "http://43.254.151.248/sf_serve ... 3B%3B
alert("url=" + url);
var req = new laya.net.HttpRequest();
req.on(laya.events.Event.COMPLETE, null, cb_onSuccess);
req.on(laya.events.Event.ERROR, null, cb_onFail);
req.send(url);
}
function cb_onSuccess(response)
{
alert("response=" + response); // 成功输出:{"ret":1478136071}
}
function cb_onFail(message)
{
alert(message); // 失败输出:Request failed Status:0 text:
}
注:url后面部分是sf_server?RequestType=Time,不知怎么被转码了
没有找到相关结果
已邀请:
要回复问题请先登录
2 个回复
yuanxiaoshu
赞同来自:
var url = "http://43.254.151.248/sf_serve ... 3B%3B
cuixueying
赞同来自:
有问题我们再沟通!