50 lines
1.3 KiB
JavaScript
50 lines
1.3 KiB
JavaScript
// 全局js配置,一般用来配置接口的基地址,和 短地址 等一些...
|
||
var config = {
|
||
// 开发阶段
|
||
devBaseUrl: 'http://127.0.0.1:3000/api/json',
|
||
|
||
// 测试阶段
|
||
testBaseUrl: 'http://127.0.0.2:8080/api/json',
|
||
|
||
// 正式阶段
|
||
prodBaseUrl: 'http://www.anc.com/api/json',
|
||
|
||
stage: 'dev', // dev test prod
|
||
|
||
switchStage: function () {
|
||
switch (this.stage) {
|
||
case "dev":
|
||
return this.devBaseUrl
|
||
break;
|
||
case "test":
|
||
return this.testBaseUrl
|
||
break;
|
||
case "prod":
|
||
return this.prodBaseUrl
|
||
break;
|
||
default:
|
||
break;
|
||
}
|
||
},
|
||
|
||
apiList: {
|
||
index: '/index',
|
||
info: '/info',
|
||
mechanism: '/mechanism',
|
||
type: '/class',
|
||
classList: '/classList',
|
||
model: '/allModel',
|
||
search:'/search',
|
||
modelList:'/modelList'
|
||
},
|
||
|
||
footerArr: [
|
||
{ title: '首页', href: 'index.html', icon: 'icon-home' },
|
||
{ title: '机构', href: 'mechanism.html', icon: 'icon-jigou' },
|
||
{ title: '模特', href: 'model.html', icon: 'icon-me' },
|
||
{ title: '我的', href: 'me.html', icon: 'icon-wo' },
|
||
]
|
||
}
|
||
|
||
|