//index 0开发环境 1测试环境 2正式环境 const index = 2, api = { login: 'auth/login_by_weixin', //登录 getMyPrivateMsgCount: 'message/getMyPrivateMsgCount', //加载是否有未读消息 home: 'home/index', //首页数据 club: 'organize/selectOrganizeByUserId', // 委办局 clubDetails: 'organize/detail', // 委办局详情 guidanceDocList: 'items/guidanceDocList', // 服务大厅 办事指南 newsDetail: 'news/read', //新闻详情 newsList: 'news/list', //新闻列表 allDept:'getAllVillagesDept.if', // level: 'getAllDeptByLevel.if', //服务大厅部门类别 // levelDetail: 'getPreServiceByParam.if', //服务大厅事项列表 // consultancyBm: 'getAllDeptByLevel.if', //互动页查询咨询部门 matters: 'getServiceListBydeptId.if', //互动页查询部门可办事项 interactionSave: 'consulting/save', //互动页保存咨询信息 reservationDetail: 'reservation/getInfo.if', //预约详情 reservationCancel: 'reservation/cancel.if', //取消预约 reservationSave: 'reservation/save.if',//在线预约 reservationServiceList: 'getReservationServiceList.if', //可预约部门列表 reservationDateStatus: 'reservation/getReservationCount.if',//查询事项某个日期的预约情况 myCase: 'getPreApasinfoListByUserId.if', //我的办件 // param: 'getPreServiceByParam.if', //事项办理 caseDetail: 'getPreApasinfoDetails.if', //办件详情 setImg: 'material/getList', //选择我的材料,材料列表 saveDataName: 'material/save', //保存我的材料,设置材料名称 apasinfo: 'savePreApasinfo.if', //提交在线办理表单 // Server: 'getClassificationByCode.if', //服务大厅列表 Level: 'getAllDeptByLevel.if', //服务大厅部门类别 // LevelDetail: 'getPreServiceByParam.if', //服务大厅事项列表 // Guide: 'getPreServiceByUnid.if',//查询办事详情 // MyReservation: 'reservation/getPageList.if',//我的预约 ReservationDetail: 'reservation/getInfo.if',//预约详情 ReservationCancel: 'reservation/cancel.if',//取消预约 sendVerifCode: '/sms//sendVerifCode.if',//发送短信验证码 // Param: 'getPreServiceByParam.if',//事项办理 // Code: 'getClassificationByCode.if',//证件类型 // GetUser: 'user/getUserInfo',//获取用户信息 // UpdateUser: 'user/updateUserInfo',//更新用户信息 // UploadImg: 'uploadFile.if',//上传 // SetImg: 'material/getList',//选择我的材料,材料列表 // SaveDataName: 'material/save',//保存我的材料,设置材料名称 Apasinfo: 'savePreApasinfo.if',//提交在线办理表单 UploadAudio: 'getPreServiceByServiceName.if',//语音文件上传 HotService: 'getHotServiceList.if',//搜索咨询对象 // myData: 'material/getList',//我的材料 // addData: 'material/save',//上传资料 // deleteData: 'material/delete',//删除材料 advisoryList: 'consulting/getListPage',//我的咨询 advisoryDetail: 'consulting/getInfo',//咨询详情 // new apis departments: 'getAllDeptByLevel.if',//部门列表 server: 'getClassificationByCode.if', //根据code得到相应类型 handles: 'getPreServiceByParam.if', //服务大厅事项列表 guide: 'getPreServiceByUnid.if', getUser: 'user/getUserInfo', //获取用户信息 updateUser: 'user/updateUserInfo', //更新用户信息 uploadImg: 'uploadFile.if', //上传图片 myMaterial: 'material/getList',//我的材料 addMaterial: 'material/save',//上传资料 delMaterial: 'material/delete',//删除材料 myReservation: 'reservation/getPageList.if', //我的预约 addCollect: 'collect/save',//添加收藏 delCollect: 'collect/cancel',//删除收藏 myCollection: 'collect/getListByUserId', //我的收藏 verifSmsCode:'sms/verifSmsCode.if',//验证手机验证码是否正确 evaluate:'evaluate/save.if',//增加评价 evaluateList:'evaluate/list.if',//评价列表 evaluateInfo:'evaluate/info.if',//评价详情 // 宿管系统--学生端 getAccessInfo: 'access/getAccessInfo.if',//发送短信验证码 sendPhoneCode:'visitor/sendPhoneCode.if',//访客申请 userLogin:'appletLogin/userLogin.if',//登录 selfInfo:'access/selfInfo.if',//访客统计 editorAlumniVisitor:'visitor/editorAlumniVisitor.if',//访客申请 getUserInfo:'userinfo/getUserInfo.if',//查询用户信息 //宿管系统--教师端 getDeptInfo: 'deptInfo/getDeptInfolevel.if', //获取学院信息 getRegisterInfo: 'dormManage/registerInfo.if', //获取注册和未注册的用户信息 getVisitorCheckInfo: 'visitor/visitorInfo.if', //获取审批中和已审批的访客信息 getDeviceInfo: 'access/selectDevices.if', //获取所有设备信息 getPassInfo: '/access/getAccess.if', //通行记录 getStatisticsInfo: '/access/statistics.if', //考勤统计 getOutAndInInfo: '/access/outAndIn.if', //已出已归记录 getVisitorInfo: '/visitor/searchInviteVisitor.if', //查询访客详情 getVisitorCheck: '/visitor/approvalAlumniVisitor.if', //访客信息审批 getUnInfo: '/access/unIn.if' //未归记录 }, [oneportal, root] = [["http://192.168.100.234:8080/oneportal/", "https://zhll.dgtis.com/wx/"], ["http://192.168.100.254:9082/wx/", "https://zhll.dgtis.com/wx/"], ["https://dorm.dgtis.com/oneportal/", "http://192.168.100.248:9082/wx/"]][index] Object.keys(api).forEach(x => { let v = api[x] api[x] = `${/\.if$/.test(v) ? oneportal : root}${v}` // api[x] = `${root}${v}` }) module.exports = api