32 lines
794 B
JavaScript
32 lines
794 B
JavaScript
import http from "@/service";
|
|
import utils from "@/utils";
|
|
|
|
export default {
|
|
devBaseUrl: 'http://127.0.0.1:3000/api/json', // 开发阶段
|
|
testBaseUrl: '', // 测试阶段
|
|
prodBaseUrl: '', // 正式阶段
|
|
apiList: {
|
|
home: '/index'
|
|
},
|
|
VueComponents: [],
|
|
NotVuePlugins: [
|
|
{ n: '$http', v: http },
|
|
{ n: '$utils', v: 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;
|
|
|
|
default:
|
|
break;
|
|
}
|
|
}
|
|
} |