38 lines
982 B
JavaScript
38 lines
982 B
JavaScript
import http from "@/service";
|
|
import utils from "@/utils";
|
|
// import ImgList from "@/components/Img-list/Img-list.vue"
|
|
|
|
export default {
|
|
devBaseUrl: 'http://192.168.31.100:3000/api/json', // 开发阶段
|
|
testBaseUrl: '', // 测试阶段
|
|
prodBaseUrl: '', // 正式阶段
|
|
apiList: {
|
|
home: '/index',
|
|
type: '/class',
|
|
classList: '/classList',
|
|
info: '/info',
|
|
getInfo:'/agent/info',
|
|
|
|
},
|
|
// VueComponents: [ ImgList ],
|
|
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;
|
|
}
|
|
}
|
|
} |