配置代理 配置代理配置文件: vue.config.js devServer: { "proxy": { 'api': { target: "代理地址", pathRewrite: { '^/api': '' } } }}