connect ECONNREFUSED 127.0.0.1:80 TCPConnectWrap.afterConnect
NuxtServerError connect ECONNREFUSED 127.0.0.1:80
造成原因:asyncData方法异步请求数据时,以为/api/${params.id}这个接口的网址是 127.0.0.1:80,所以将请求发送给了127.0.0.1:80,而我的接口服务器并没有跑在80端口上,所以报错
axios请求拦截添加上你的本地后端接口 config.url = 'http://192.168.0.0:50/' + config.url