config/index.js
@@ -3,6 +3,7 @@ // see http://vuejs-templates.github.io/webpack for documentation. const path = require("path"); let url = 'http://192.168.0.130:8081' module.exports = { dev: { @@ -10,11 +11,11 @@ assetsSubDirectory: "static", // 编译输出的二级目录 assetsPublicPath: "/", // 编译发布的根目录,可配置为资源服务器域名或 CDN 域名 proxyTable: { "/api": { target: "", "/": { target: url, changeOrigin: true, pathRewrite: { "^/api": "" "^/": "" } } },