mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-19 18:45:03 +08:00
配置不同命令,连接不同环境
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
# 页面标题
|
||||
VUE_APP_TITLE = 万车充运营管理平台
|
||||
|
||||
# 开发环境配置
|
||||
# pre环境配置
|
||||
ENV = 'development'
|
||||
|
||||
# 万车充运营管理平台/开发环境
|
||||
VUE_APP_BASE_API = '/dev-api'
|
||||
# 万车充运营管理平台/pre环境
|
||||
VUE_APP_BASE_API = 'https://apitest.jsowellcloud.com'
|
||||
|
||||
# 路由懒加载
|
||||
VUE_CLI_BABEL_TRANSPILE_MODULES = true
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
# 页面标题
|
||||
VUE_APP_TITLE = 万车充运营管理平台
|
||||
|
||||
# 生产环境配置
|
||||
# 正式环境配置
|
||||
ENV = 'production'
|
||||
|
||||
# 万车充运营管理平台/生产环境
|
||||
VUE_APP_BASE_API = '/prod-api'
|
||||
# 万车充运营管理平台/正式环境
|
||||
VUE_APP_BASE_API = 'https://api.jsowellcloud.com'
|
||||
|
||||
@@ -5,7 +5,7 @@ VUE_APP_TITLE = 万车充运营管理平台
|
||||
ENV = 'staging'
|
||||
|
||||
# 万车充运营管理平台/测试环境
|
||||
VUE_APP_BASE_API = '/dev-api'
|
||||
VUE_APP_BASE_API = 'http://192.168.2.21:8080'
|
||||
|
||||
# 开发环境配置
|
||||
NODE_ENV = production
|
||||
|
||||
@@ -3,7 +3,9 @@
|
||||
"version": "1.0.0",
|
||||
"description": "万车充管理系统",
|
||||
"scripts": {
|
||||
"dev": "vue-cli-service serve",
|
||||
"dev": "vue-cli-service serve --mode production",
|
||||
"pre": "vue-cli-service serve --mode development",
|
||||
"test": "vue-cli-service serve --mode staging",
|
||||
"build:prod": "vue-cli-service build",
|
||||
"build:stage": "vue-cli-service build --mode staging",
|
||||
"preview": "node build/index.js --preview",
|
||||
|
||||
@@ -35,12 +35,12 @@ module.exports = {
|
||||
proxy: {
|
||||
// detail: https://cli.vuejs.org/config/#devserver-proxy
|
||||
[process.env.VUE_APP_BASE_API]: {
|
||||
// target: `http://localhost:8080`,
|
||||
target: `http://localhost:8080`,
|
||||
// 更改代理为本地地址
|
||||
// target: `http://106.14.94.149:8080`,
|
||||
// target: `http://192.168.2.21:8080`,
|
||||
// target: `https://api.jsowellcloud.com`,
|
||||
target: `https://apitest.jsowellcloud.com`,
|
||||
// target: `https://apitest.jsowellcloud.com`,
|
||||
changeOrigin: true,
|
||||
pathRewrite: {
|
||||
["^" + process.env.VUE_APP_BASE_API]: "",
|
||||
|
||||
Reference in New Issue
Block a user