From 7e08b852e5791150775f21c3705d321516615826 Mon Sep 17 00:00:00 2001 From: Devil Date: Sat, 26 Jun 2021 13:44:54 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BE=A7=E8=BE=B9=E6=A0=8Flo?= =?UTF-8?q?go=E5=A4=84=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/vue.config.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/web/vue.config.js b/web/vue.config.js index 5b34512a..283e698f 100644 --- a/web/vue.config.js +++ b/web/vue.config.js @@ -25,8 +25,7 @@ module.exports = { // 把key的路径代理到target位置 // detail: https://cli.vuejs.org/config/#devserver-proxy [process.env.VUE_APP_BASE_API]: { // 需要代理的路径 例如 '/api' - // target: `${process.env.VUE_APP_BASE_PATH}:${process.env.VUE_APP_SERVER_PORT}/`, // 代理到 目标路径 - target: `http://demo.gin-vue-admin.com/api/`, // 代理到 目标路径 + target: `${process.env.VUE_APP_BASE_PATH}:${process.env.VUE_APP_SERVER_PORT}/`, // 代理到 目标路径 changeOrigin: true, pathRewrite: { // 修改路径数据 ['^' + process.env.VUE_APP_BASE_API]: '' // 举例 '^/api:""' 把路径中的/api字符串删除