求大佬指点。
微信开发工具index.js 里的代码
onLoad:function(){
var that = this
wx.request({
url: 'http://127.0.0.1:1080',
success:function(res){
console.log(res)
that.setData(res.data)
}
})
},
submit: function(e){
wx.request({
method: 'post',
url: 'http://127.0.0.1:1080',
data: e.detail.value,
success: function(res) {
console.log(res)
}
})
}
})
本地服务器index.js 里的代码
app.listen(1080, () => {
console.log('server running at http://127.0.0.1:1080')
})
错误:
VM456:1 工具未校验合法域名、web-view(业务域名)、TLS 版本以及 HTTPS 证书。
VM460 asdebug.js:1 GET http://127.0.0.1:1080/ net::ERR_CONNECTION_REFUSED
谢邀:
手动浏览器打开http://127.0.0.1:1080/返回什么呢?
这种错误着重检查服务端
开发者工具里边有个设置,不效验合法域名