2019-03-04 15:28:16 +08:00
|
|
|
|
/**
|
|
|
|
|
* 配置编译环境和线上环境之间的切换
|
2019-04-07 22:40:28 +08:00
|
|
|
|
*
|
2019-03-04 15:28:16 +08:00
|
|
|
|
* baseUrl: 域名地址
|
|
|
|
|
* routerMode: 路由模式
|
|
|
|
|
* dataSources:数据源
|
|
|
|
|
*/
|
|
|
|
|
|
2019-04-07 22:40:28 +08:00
|
|
|
|
let baseUrl = '';
|
2019-03-04 15:28:16 +08:00
|
|
|
|
let routerMode = 'hash';
|
|
|
|
|
let dataSources='local';//local=本地,其他值代表非本地
|
|
|
|
|
|
|
|
|
|
|
2019-04-02 11:26:56 +08:00
|
|
|
|
if (!process.env.NODE_ENV || process.env.NODE_ENV == 'development') {
|
2019-03-28 19:19:04 +08:00
|
|
|
|
baseUrl='http://127.0.0.1';
|
2019-03-04 15:28:16 +08:00
|
|
|
|
}else if(process.env.NODE_ENV == 'production'){
|
2019-03-28 19:56:52 +08:00
|
|
|
|
baseUrl = 'http://180.167.213.26:18099';
|
2019-04-02 11:26:56 +08:00
|
|
|
|
dataSources='production';
|
2019-03-04 15:28:16 +08:00
|
|
|
|
}
|
|
|
|
|
|
2019-03-28 19:19:04 +08:00
|
|
|
|
// baseUrl = 'http://127.0.0.1';
|
2019-03-28 20:05:00 +08:00
|
|
|
|
// baseUrl = 'http://180.167.213.26:18099';
|
2019-04-08 21:47:23 +08:00
|
|
|
|
dataSources = 'remote';
|
|
|
|
|
// dataSources = 'local';
|
2019-03-27 19:12:12 +08:00
|
|
|
|
|
2019-03-04 15:28:16 +08:00
|
|
|
|
export {
|
|
|
|
|
baseUrl,
|
|
|
|
|
routerMode,
|
|
|
|
|
dataSources,
|
2019-04-07 22:40:28 +08:00
|
|
|
|
}
|