Files
ClassContent/历届学生/font-end-nine/项目练习/学生项目/杨锐/枸杞社/js/config/index.js
2024-09-27 02:06:13 +08:00

34 lines
1.2 KiB
JavaScript

var config = {
devBaseUrl: 'http://127.0.0.1:3000/api/json', // 开发阶段
testBaseUrl: 'http://127.0.0.1:3000/api/test', // 测试阶段
prodBaseUrl: 'http://192.168.31.100:3000/api/json', // 上线阶段
stage: 'dev', // dev test prod 存放基地址
apiList: { //存放短地址
index: '/index',
info: '/info',
classList: '/class',
classListArr: '/classList'
},
footerList: [ //定义底部导航栏 方便后期直接更改
{ title: '首页', icon: 'icon-home', url: 'index.html' },
{ title: '机构', icon: 'icon-jigou', url: 'mechanism.html' },
{ title: '模特', icon: 'icon-me', url: 'model.html' },
{ title: '我的', icon: 'icon-wo', url: 'my.html' },
],
checkUrl: function () {
switch (this.stage) { //选择对应的基地址
case "dev":
return this.devBaseUrl
break;
case "test":
return this.testBaseUrl
break;
case "prod":
return this.prodBaseUrl
break;
default:
break;
}
}
}