源文件
This commit is contained in:
27
jeepay-ui-uapp-cashier/env/config.js
vendored
Normal file
27
jeepay-ui-uapp-cashier/env/config.js
vendored
Normal file
@@ -0,0 +1,27 @@
|
||||
/**
|
||||
* ENV 的封装
|
||||
* 由于uniapp 无法设置.env等打包属性,实现线上,线下多版本配置属性的无缝切换。
|
||||
* process.env.NODE_ENV 将在打包环境通过编译器进行替换, 线上打包后无法获取到 process对象。 所以将配置属性统一封装到appConfig中。
|
||||
*
|
||||
* @author terrfly
|
||||
* @site https://www.jeequan.com
|
||||
* @date 2021/12/16 17:57
|
||||
*/
|
||||
|
||||
|
||||
import appConfig from '@/config/appConfig.js';
|
||||
import development from '@/env/env.development.js';
|
||||
import production from '@/env/env.production.js';
|
||||
|
||||
// 引入变量
|
||||
const envConfig = {development: development, production : production}
|
||||
|
||||
// 获取当前环境变量
|
||||
const currentEnv = envConfig[process.env.NODE_ENV]
|
||||
|
||||
// 设置全局env配置项目
|
||||
appConfig.env = currentEnv
|
||||
|
||||
export default this
|
||||
|
||||
|
||||
6
jeepay-ui-uapp-cashier/env/env.development.js
vendored
Normal file
6
jeepay-ui-uapp-cashier/env/env.development.js
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
export default {
|
||||
'JEEPAY_PAY_BASE_URL': 'https://pay.rscygroup.com' //支付网关URL
|
||||
// 'JEEPAY_PAY_BASE_URL': 'http://192.168.1.45:9216' //支付网关URL
|
||||
// 'JEEPAY_PAY_BASE_URL': 'https://pay.rscygroup.com' //支付网关URL
|
||||
// 'JEEPAY_PAY_BASE_URL': 'https://pay.qilinshuzi.com' //支付网关URL
|
||||
}
|
||||
6
jeepay-ui-uapp-cashier/env/env.production.js
vendored
Normal file
6
jeepay-ui-uapp-cashier/env/env.production.js
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
export default {
|
||||
'JEEPAY_PAY_BASE_URL': 'https://pay.rscygroup.com' //支付网关URL
|
||||
// 'JEEPAY_PAY_BASE_URL': 'http://192.168.1.8:9216' //支付网关URL
|
||||
// 'JEEPAY_PAY_BASE_URL': 'https://pay.rscygroup.com' //支付网关URL
|
||||
// 'JEEPAY_PAY_BASE_URL': 'https://pay.qilinshuzi.com' //支付网关URL
|
||||
}
|
||||
Reference in New Issue
Block a user