mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-mobile.git
synced 2025-12-07 01:46:44 +08:00
57 lines
1.5 KiB
JavaScript
57 lines
1.5 KiB
JavaScript
/**系统的一些全局配置变量*/
|
|
let apiBaseUrl = '';
|
|
let oldApiBaseUrl ='/uboeApi';
|
|
let statApiBaseUrl='/statApi';
|
|
let socialApiBaseUrl='/socialApi';
|
|
let loginPath='/pages/login/login';
|
|
let context='/mbile';
|
|
let tokenName='';
|
|
let appId=''
|
|
let fileUrl='';
|
|
let version=1;
|
|
|
|
if(process.env.NODE_ENV === 'development'){
|
|
//本地开发环境
|
|
apiBaseUrl = '/systemapi';
|
|
oldApiBaseUrl = '/uboeApi';
|
|
statApiBaseUrl='/statApi';
|
|
socialApiBaseUrl='/socialApi';
|
|
fileUrl = 'http://192.168.0.11:9090/cdn/upload';
|
|
loginPath='/pages/login/login';
|
|
}else if(process.env.NODE_ENV === 'preview'){
|
|
// 预发布环境,当前配置未使用上
|
|
apiBaseUrl = '/systemapi';
|
|
oldApiBaseUrl = '/uboeApi';
|
|
statApiBaseUrl='/statApi';
|
|
socialApiBaseUrl='/socialApi';
|
|
fileUrl = 'https://u-pre.boe.com/upload';
|
|
loginPath='https://u-pre.boe.com/m/preview';
|
|
}else if(process.env.NODE_ENV === 'testing'){
|
|
// 测试环境
|
|
apiBaseUrl = '/systemapi';
|
|
oldApiBaseUrl = '/uboeApi';
|
|
statApiBaseUrl='/statApi';
|
|
socialApiBaseUrl='/socialApi';
|
|
fileUrl = 'https://u-pre.boe.com/upload';
|
|
loginPath='https://u-pre.boe.com/m/testing';
|
|
}else{
|
|
// 生产环境
|
|
apiBaseUrl = '/systemapi';
|
|
oldApiBaseUrl = '/uboeApi';
|
|
statApiBaseUrl='/statApi';
|
|
socialApiBaseUrl='/socialApi';
|
|
fileUrl = 'https://u-pre.boe.com/upload';
|
|
loginPath='https://u-pre.boe.com/m/loginuser';
|
|
}
|
|
|
|
export default {
|
|
apiBaseUrl:apiBaseUrl,
|
|
oldApiBaseUrl:oldApiBaseUrl,
|
|
statApiBaseUrl:statApiBaseUrl,
|
|
socialApiBaseUrl:socialApiBaseUrl,
|
|
context:context,
|
|
appId:appId,
|
|
loginPath:loginPath,
|
|
fileUrl:fileUrl,
|
|
version:version,
|
|
} |