Wendy12138
Wendy12138
  • 发布:2020-09-11 15:32
  • 更新:2020-09-11 16:45
  • 阅读:665

mui.ajax怎么才能调用我本机Java写的后台接口呢

分类:MUI

本机springboot写的后台代码 真机调试连的本机win10开得热点
然后mui.ajax 一直超时 网上随便找的接口测试没问题 怎么才能访问本机的接口呢
ajax代码:
// mui.ajax('https://lab.isaaclin.cn/nCoV/api/area',{ // 随便找的在线接口 访问成功
mui.ajax('http://10.192.22.150:8088/user/login', { // 本机IPV4
data: {
username: accountBox.value,
password: passwordBox.value
},
/ data:{
latest:1,
province:'北京市'
},
/// 在线接口的参数
dataType: 'json',
type: 'post',
timeout: 10000,
headers: {
'Content-Type': 'application/json'
},
success: function (data, textStatus, xhr) {
console.log(JSON.stringify(data));
},
error: function (xhr, type, errorThrown) {
//异常处理;
console.log(xhr.readyState, xhr.status);
console.log(type);
console.log(errorThrown);
}
});

2020-09-11 15:32 负责人:无 分享
已邀请:
Wendy12138

Wendy12138 (作者)

啊我去 服了 搞了半天 我没开防火墙!!!

该问题目前已经被锁定, 无法添加新回复