mui.ajax('http://127.0.0.1:8080/ZMSoft/LoginAction?act=login',{
type: "post",
dataType:"text",
success: function (text) {
mui.alert(text);
},
error: function () {
}
});
页面报:
XMLHttpRequest cannot load http://127.0.0.1:8080/ZMSoft/LoginAction?act=login. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://127.0.0.1:8020' is therefore not allowed access." /aa/login.html
1 个回复
Trust - 少说废话
请在命令行输入ipconfig查询本地IPv4地址,如:192.168.0.111,将127.0.0.1替换为该地址。同时,调试用手机和本地PC必须在同一局域网内,再进行真机调试,方可访问到本地的服务。