mirror of
http://112.124.100.131/GFRS/ebiz-h5.git
synced 2025-12-10 02:16:44 +08:00
整理环境分支问题
This commit is contained in:
@@ -2,4 +2,6 @@
|
|||||||
NODE_ENV = 'production'
|
NODE_ENV = 'production'
|
||||||
|
|
||||||
# flag
|
# flag
|
||||||
VUE_APP_FLAG='staging'
|
VUE_APP_FLAG='prd'
|
||||||
|
|
||||||
|
|
||||||
@@ -2,6 +2,6 @@
|
|||||||
NODE_ENV = 'production'
|
NODE_ENV = 'production'
|
||||||
|
|
||||||
# flag
|
# flag
|
||||||
VUE_APP_FLAG='production'
|
VUE_APP_FLAG='uat'
|
||||||
|
|
||||||
|
|
||||||
5
.env.dat
Normal file
5
.env.dat
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
# env
|
||||||
|
NODE_ENV = 'production'
|
||||||
|
|
||||||
|
# flag
|
||||||
|
VUE_APP_FLAG='dat'
|
||||||
@@ -2,6 +2,6 @@
|
|||||||
NODE_ENV = 'development'
|
NODE_ENV = 'development'
|
||||||
|
|
||||||
# flag
|
# flag
|
||||||
VUE_APP_FLAG='development'
|
VUE_APP_FLAG='dev'
|
||||||
|
|
||||||
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
# env 用于前端dev环境发布。与.env.development的区别:NODE_ENV = production,开启代码压缩
|
|
||||||
NODE_ENV = 'production'
|
|
||||||
|
|
||||||
# flag
|
|
||||||
VUE_APP_FLAG='development'
|
|
||||||
|
|
||||||
|
|
||||||
11
package.json
11
package.json
@@ -6,9 +6,14 @@
|
|||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"serve": "vue-cli-service serve",
|
"serve": "vue-cli-service serve",
|
||||||
"build:dev": "vue-cli-service build --mode development-deploy",
|
"build:dev": "vue-cli-service build --mode dev",
|
||||||
"build:prod": "vue-cli-service build",
|
"build:prd": "vue-cli-service build --mode prd",
|
||||||
"build:stage": "vue-cli-service build --mode staging",
|
"build:uat": "vue-cli-service build --mode uat",
|
||||||
|
"build:dat": "vue-cli-service build --mode dat",
|
||||||
|
"dev": "vue-cli-service serve --mode dev",
|
||||||
|
"dat": "vue-cli-service serve --mode dat",
|
||||||
|
"uat": "vue-cli-service serve --mode uat",
|
||||||
|
"prd": "vue-cli-service serve --mode prd",
|
||||||
"lint": "vue-cli-service lint",
|
"lint": "vue-cli-service lint",
|
||||||
"lint:fix": "eslint --fix --ext .js,.vue src",
|
"lint:fix": "eslint --fix --ext .js,.vue src",
|
||||||
"format": "prettier --config ./.prettierrc --write \"src/**/*.js\" \"src/**/*.vue\"",
|
"format": "prettier --config ./.prettierrc --write \"src/**/*.js\" \"src/**/*.vue\"",
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ let apiDomain, imgDomain, assetsUrl, mainUrl, payUrl // 保融支付的收银台
|
|||||||
// 可以多个接口域名,按需添加
|
// 可以多个接口域名,按需添加
|
||||||
console.log('环境:', process.env.VUE_APP_FLAG)
|
console.log('环境:', process.env.VUE_APP_FLAG)
|
||||||
switch (process.env.VUE_APP_FLAG) {
|
switch (process.env.VUE_APP_FLAG) {
|
||||||
case 'development':
|
case 'dev':
|
||||||
// apiDomain = 'http://47.96.143.111:7000/api/v1'
|
// apiDomain = 'http://47.96.143.111:7000/api/v1'
|
||||||
apiDomain = 'http://139.199.50.151:7000/api/v1' // 国富api
|
apiDomain = 'http://139.199.50.151:7000/api/v1' // 国富api
|
||||||
// imgDomain = 'http://10.10.100.98:7012/updown' // dev
|
// imgDomain = 'http://10.10.100.98:7012/updown' // dev
|
||||||
@@ -21,15 +21,15 @@ switch (process.env.VUE_APP_FLAG) {
|
|||||||
mainUrl = 'http://139.199.50.151'
|
mainUrl = 'http://139.199.50.151'
|
||||||
payUrl = 'http://10.10.100.84:7003/s3-modules-gateway/embed/gateway.action'
|
payUrl = 'http://10.10.100.84:7003/s3-modules-gateway/embed/gateway.action'
|
||||||
break
|
break
|
||||||
case 'staging':
|
case 'uat':
|
||||||
apiDomain = 'http://47.96.143.111:7000/api/v1'
|
apiDomain = ''
|
||||||
imgDomain = 'http://211.159.248.123:7001'
|
imgDomain = ''
|
||||||
// 静态服务资源
|
// 静态服务资源
|
||||||
assetsUrl = 'http://47.96.143.111:8000/app/'
|
assetsUrl = ''
|
||||||
mainUrl = ''
|
mainUrl = ''
|
||||||
payUrl = 'http://10.10.100.84:7003/s3-modules-gateway/embed/gateway.action'
|
payUrl = ''
|
||||||
break
|
break
|
||||||
case 'production':
|
case 'prd':
|
||||||
apiDomain = 'https://iagentsales.e-guofu.com/api/v1'
|
apiDomain = 'https://iagentsales.e-guofu.com/api/v1'
|
||||||
imgDomain = 'https://iagentsales-ud.e-guofu.com:8553/updown'
|
imgDomain = 'https://iagentsales-ud.e-guofu.com:8553/updown'
|
||||||
// imgDomain = 'http://10.10.100.98:7012/updown' // 上生产前
|
// imgDomain = 'http://10.10.100.98:7012/updown' // 上生产前
|
||||||
@@ -39,6 +39,14 @@ switch (process.env.VUE_APP_FLAG) {
|
|||||||
mainUrl = 'https://iagentsales.e-guofu.com'
|
mainUrl = 'https://iagentsales.e-guofu.com'
|
||||||
payUrl = 'https://uns3.e-guofu.com/s3-modules-gateway/embed/gateway.action'
|
payUrl = 'https://uns3.e-guofu.com/s3-modules-gateway/embed/gateway.action'
|
||||||
break
|
break
|
||||||
|
case 'dat':
|
||||||
|
apiDomain = ''
|
||||||
|
imgDomain = ''
|
||||||
|
// 静态服务资源
|
||||||
|
assetsUrl = ''
|
||||||
|
mainUrl = ''
|
||||||
|
payUrl = ''
|
||||||
|
break
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* 配置文件
|
* 配置文件
|
||||||
|
|||||||
22
src/main.js
22
src/main.js
@@ -51,15 +51,21 @@ Vue.prototype.$jump = Jump
|
|||||||
Vue.prototype.$utils = utils
|
Vue.prototype.$utils = utils
|
||||||
|
|
||||||
//混合开发调试工具
|
//混合开发调试工具
|
||||||
if (process.env.NODE_ENV == 'development') {
|
// if (process.env.NODE_ENV == 'development') {
|
||||||
// let Eruda = require('eruda')
|
// // let Eruda = require('eruda')
|
||||||
// Eruda.init()
|
// // Eruda.init()
|
||||||
Vue.prototype.$rootUrl = location.origin
|
// Vue.prototype.$rootUrl = location.origin
|
||||||
} else if (process.env.NODE_ENV == 'production') {
|
// } else if (process.env.NODE_ENV == 'production') {
|
||||||
Vue.prototype.$rootUrl = location.origin + '/ebiz-h5'
|
// Vue.prototype.$rootUrl = location.origin + '/ebiz-h5'
|
||||||
|
// }
|
||||||
|
if (process.env.VUE_APP_FLAG != 'prd') {
|
||||||
|
let Eruda = require('eruda')
|
||||||
|
Eruda.init()
|
||||||
|
} else {
|
||||||
|
// Vue.prototype.$rootUrl = location.origin + '/ebiz-h5'
|
||||||
|
Vue.config.devtools = true
|
||||||
}
|
}
|
||||||
let Eruda = require('eruda')
|
|
||||||
Eruda.init()
|
|
||||||
// 注册过滤器
|
// 注册过滤器
|
||||||
Object.keys(Filters).forEach(function(k) {
|
Object.keys(Filters).forEach(function(k) {
|
||||||
Vue.filter(k, Filters[k])
|
Vue.filter(k, Filters[k])
|
||||||
|
|||||||
Reference in New Issue
Block a user