vue api 请求报错 Error occurred while trying to proxy request /user/report-user from localhost:83....
一.报错信息
Error occurred while trying to proxy request /user/report-user from localhost:83 ....
二.index.js 配置信息
proxyTable: { '/api': { target: 'http://localhost:81', changeOrigin: true, pathRewrite: { '^/api': '' } } },
三. 由于首次尝试vue ,于是各种百度,然各有云云,无果后,回过头看了眼后台服务配置的 ip ,print("惊喜"+"就是你了")
后台配置如下
#配置端口,ip server: port: 81 address: 192.168.0.114
四. 于是乎,修改后台为 address 为 localhost,或者修改vue localhost 为 192.168.0.114 IP 就OK拉.