From 8e0a48b563aed67358d907ce4aeff7ff9be1a42e Mon Sep 17 00:00:00 2001 From: liaoanqi <1776106376@qq.com> Date: Tue, 26 Jul 2022 14:10:41 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E6=96=87=E6=A1=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- doc/README.md | 22 ++++++---------------- 1 file changed, 6 insertions(+), 16 deletions(-) diff --git a/doc/README.md b/doc/README.md index 4ceaa80..76b04ad 100644 --- a/doc/README.md +++ b/doc/README.md @@ -88,24 +88,14 @@ npm install -g cnpm --registry=https://registry.npm.taobao.org cnpm i ``` -修改`config/index.js` 里面的`target`为服务器域名端口 +修改文件`.env.production`(生产环境)/ `.env.development`(开发环境) +里面的`VUE_APP_BASE_API`为api接口请求地址, `VUE_APP_RESOURCES_URL`为静态资源文件url ```json -'/proxyApi': { - target: 'http://localhost:8087/', - changeOrigin: true, - pathRewrite: { - '^/proxyApi': '/' -} -``` - -修改`config/index.js` 里面的`host`以便于内网联调 - -```json - // Various Dev Server settings - host: '192.168.1.120', // can be overwritten by process.env.HOST - port: 8002, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined - autoOpenBrowser: true, + // api接口请求地址 + VUE_APP_BASE_API = 'http://192.168.1.120:8002' + // 静态资源文件url + VUE_APP_RESOURCES_URL = 'https://img.mall4j.com/' ```