From 8b805eb6ccfa31f83511cef06567367cdc866d14 Mon Sep 17 00:00:00 2001 From: sakuya <81883387@qq.com> Date: Fri, 27 May 2022 02:27:03 +0800 Subject: [PATCH] =?UTF-8?q?ADD=20.env.development=20.env.production=20?= =?UTF-8?q?=E8=B0=83=E6=95=B4=E6=9C=AC=E5=9C=B0=E7=8E=AF=E5=A2=83=E5=92=8C?= =?UTF-8?q?=E7=94=9F=E4=BA=A7=E7=8E=AF=E5=A2=83=E6=A8=A1=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.development | 14 ++++++++++++++ .env.production | 8 ++++++++ public/config.js | 4 ++-- public/index.html | 6 +++--- src/config/index.js | 4 ++-- vue.config.js | 4 ++-- 6 files changed, 31 insertions(+), 9 deletions(-) create mode 100644 .env.development create mode 100644 .env.production diff --git a/.env.development b/.env.development new file mode 100644 index 00000000..aecdae7a --- /dev/null +++ b/.env.development @@ -0,0 +1,14 @@ +# 本地环境 +NODE_ENV = development + +# 标题 +VUE_APP_TITLE = SCUI(DEV) + +# 接口地址 +VUE_APP_API_BASEURL = https://www.fastmock.site/mock/5039c4361c39a7e3252c5b55971f1bd3/api + +# 本地端口 +VUE_APP_PORT = 2800 + +# 是否开启代理 +VUE_APP_PROXY = true \ No newline at end of file diff --git a/.env.production b/.env.production new file mode 100644 index 00000000..900739dd --- /dev/null +++ b/.env.production @@ -0,0 +1,8 @@ +# 生产环境 +NODE_ENV = production + +# 标题 +VUE_APP_TITLE = SCUI + +# 接口地址 +VUE_APP_API_BASEURL = https://www.fastmock.site/mock/5039c4361c39a7e3252c5b55971f1bd3/api \ No newline at end of file diff --git a/public/config.js b/public/config.js index 6ab642ad..306b79f3 100644 --- a/public/config.js +++ b/public/config.js @@ -4,8 +4,8 @@ const APP_CONFIG = { //标题 - APP_NAME: "SCUI", + //APP_NAME: "SCUI", //接口地址,如遇跨域需使用nginx代理 - API_URL: "https://www.fastmock.site/mock/5039c4361c39a7e3252c5b55971f1bd3/api" + //API_URL: "https://www.fastmock.site/mock/5039c4361c39a7e3252c5b55971f1bd3/api" } diff --git a/public/index.html b/public/index.html index 9b2e323f..3101df9a 100644 --- a/public/index.html +++ b/public/index.html @@ -5,14 +5,14 @@ -