var config = { devBaseUrl: 'http://127.0.0.1:3000/api/json', testBaseUrl: 'http://127.0.0.1:3000/api/json/test', prodBaseUrl: 'http://127.0.0.1:3000/api/json/prod', stage: 'dev', // dev test prod checkBaseUrl: function () { switch (this.stage) { case "dev": return this.devBaseUrl; break; case "test": return this.testBaseUrl; break; case "prod": return this.prodBaseUrl; break; } }, // 项目中的所有接口短地址 apiList: { mechanismList: "/mechanismList", mechanism: '/mechanism', classApi: "/class", index: '/index', classList: '/classList', info: '/info' } }