5-8注册http://192.168.1.3:8081地址出错
来源:5-7 swagger2的使用与接口测试
慕勒5447926
2019-05-02
如图前面章节跟着老师一步一步弄都没出现问题,在编写regist.js回调函数 var serverUrl = app.serverUrl;
wx.request({
url: serverUrl + ‘/regist’,
method:“POST”,
data:{
username: username,
password: password
},
header:{
‘content-type’:‘application/json’//默认值
},
success:function(res){
console.log(res.data);
}
})
后进行测试提示找不到这个链接。。。
但我换成serverUrl:"http://localhost:8081"是可以出现和老师一样的效果的
写回答
1回答
-
Url的问题说明网络不通畅啊。你是手机测试的吗?还是电脑上?
052019-05-02
相似问题