32 lines
842 B
JavaScript
32 lines
842 B
JavaScript
import service from '../service/_'
|
|
import utils from '../utils/index'
|
|
|
|
|
|
export default {
|
|
devBaseUrl: 'http://192.168.31.100:3000/api/json', // 开发阶段地址
|
|
testBaseUrl: 'http://192.168.31.100:3000/api/json/test', // 测试阶段地址
|
|
prodBaseUrl: 'http://192.168.31.100:3000/api/json/prod', // 上线后的地址
|
|
urlList: {
|
|
index: "/index"
|
|
},
|
|
noVuePlugins: [
|
|
{ name: '$http', value: service },
|
|
{ name: '$utils', value: utils }
|
|
],
|
|
checkBaseUrl: function () {
|
|
switch (process.env.NODE_ENV) {
|
|
case "development":
|
|
return this.devBaseUrl;
|
|
break;
|
|
|
|
case "test":
|
|
return this.testBaseUrl;
|
|
break;
|
|
|
|
case "production":
|
|
return this.prodBaseUrl;
|
|
break;
|
|
}
|
|
}
|
|
}
|