env.js 653 Bytes
Newer Older
sin's avatar
sin committed
1 2
/**
 * 配置编译环境和线上环境之间的切换
3
 *
sin's avatar
sin committed
4 5 6 7 8
 * baseUrl: 域名地址
 * routerMode: 路由模式
 * dataSources:数据源
 */

9
let baseUrl = '';
sin's avatar
sin committed
10 11 12 13
let routerMode = 'hash';
let dataSources='local';//local=本地,其他值代表非本地


14
if (!process.env.NODE_ENV || process.env.NODE_ENV == 'development') {
15
	baseUrl='http://127.0.0.1';
sin's avatar
sin committed
16
}else if(process.env.NODE_ENV == 'production'){
17
	baseUrl = 'http://180.167.213.26:18099';
18
    dataSources='production';
sin's avatar
sin committed
19 20
}

21
// baseUrl = 'http://127.0.0.1';
22
// baseUrl = 'http://180.167.213.26:18099';
YunaiV's avatar
YunaiV committed
23 24
dataSources = 'remote';
// dataSources = 'local';
25

sin's avatar
sin committed
26 27 28 29
export {
	baseUrl,
	routerMode,
	dataSources,
30
}