api.js 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. //index 0开发环境 1测试环境 2正式环境
  2. const index = 2,
  3. api = {
  4. login: 'auth/login_by_weixin', //登录
  5. getMyPrivateMsgCount: 'message/getMyPrivateMsgCount', //加载是否有未读消息
  6. home: 'home/index', //首页数据
  7. club: 'organize/selectOrganizeByUserId', // 委办局
  8. clubDetails: 'organize/detail', // 委办局详情
  9. guidanceDocList: 'items/guidanceDocList', // 服务大厅 办事指南
  10. newsDetail: 'news/read', //新闻详情
  11. newsList: 'news/list', //新闻列表
  12. allDept:'getAllVillagesDept.if',
  13. // level: 'getAllDeptByLevel.if', //服务大厅部门类别
  14. // levelDetail: 'getPreServiceByParam.if', //服务大厅事项列表
  15. // consultancyBm: 'getAllDeptByLevel.if', //互动页查询咨询部门
  16. matters: 'getServiceListBydeptId.if', //互动页查询部门可办事项
  17. interactionSave: 'consulting/save', //互动页保存咨询信息
  18. reservationDetail: 'reservation/getInfo.if', //预约详情
  19. reservationCancel: 'reservation/cancel.if', //取消预约
  20. reservationSave: 'reservation/save.if',//在线预约
  21. reservationServiceList: 'getReservationServiceList.if', //可预约部门列表
  22. reservationDateStatus: 'reservation/getReservationCount.if',//查询事项某个日期的预约情况
  23. myCase: 'getPreApasinfoListByUserId.if', //我的办件
  24. // param: 'getPreServiceByParam.if', //事项办理
  25. caseDetail: 'getPreApasinfoDetails.if', //办件详情
  26. setImg: 'material/getList', //选择我的材料,材料列表
  27. saveDataName: 'material/save', //保存我的材料,设置材料名称
  28. apasinfo: 'savePreApasinfo.if', //提交在线办理表单
  29. // Server: 'getClassificationByCode.if', //服务大厅列表
  30. Level: 'getAllDeptByLevel.if', //服务大厅部门类别
  31. // LevelDetail: 'getPreServiceByParam.if', //服务大厅事项列表
  32. // Guide: 'getPreServiceByUnid.if',//查询办事详情
  33. // MyReservation: 'reservation/getPageList.if',//我的预约
  34. ReservationDetail: 'reservation/getInfo.if',//预约详情
  35. ReservationCancel: 'reservation/cancel.if',//取消预约
  36. sendVerifCode: '/sms//sendVerifCode.if',//发送短信验证码
  37. // Param: 'getPreServiceByParam.if',//事项办理
  38. // Code: 'getClassificationByCode.if',//证件类型
  39. // GetUser: 'user/getUserInfo',//获取用户信息
  40. // UpdateUser: 'user/updateUserInfo',//更新用户信息
  41. // UploadImg: 'uploadFile.if',//上传
  42. // SetImg: 'material/getList',//选择我的材料,材料列表
  43. // SaveDataName: 'material/save',//保存我的材料,设置材料名称
  44. Apasinfo: 'savePreApasinfo.if',//提交在线办理表单
  45. UploadAudio: 'getPreServiceByServiceName.if',//语音文件上传
  46. HotService: 'getHotServiceList.if',//搜索咨询对象
  47. // myData: 'material/getList',//我的材料
  48. // addData: 'material/save',//上传资料
  49. // deleteData: 'material/delete',//删除材料
  50. advisoryList: 'consulting/getListPage',//我的咨询
  51. advisoryDetail: 'consulting/getInfo',//咨询详情
  52. // new apis
  53. departments: 'getAllDeptByLevel.if',//部门列表
  54. server: 'getClassificationByCode.if', //根据code得到相应类型
  55. handles: 'getPreServiceByParam.if', //服务大厅事项列表
  56. guide: 'getPreServiceByUnid.if',
  57. getUser: 'user/getUserInfo', //获取用户信息
  58. updateUser: 'user/updateUserInfo', //更新用户信息
  59. uploadImg: 'uploadFile.if', //上传图片
  60. myMaterial: 'material/getList',//我的材料
  61. addMaterial: 'material/save',//上传资料
  62. delMaterial: 'material/delete',//删除材料
  63. myReservation: 'reservation/getPageList.if', //我的预约
  64. addCollect: 'collect/save',//添加收藏
  65. delCollect: 'collect/cancel',//删除收藏
  66. myCollection: 'collect/getListByUserId', //我的收藏
  67. verifSmsCode:'sms/verifSmsCode.if',//验证手机验证码是否正确
  68. evaluate:'evaluate/save.if',//增加评价
  69. evaluateList:'evaluate/list.if',//评价列表
  70. evaluateInfo:'evaluate/info.if',//评价详情
  71. // 宿管系统--学生端
  72. getAccessInfo: 'access/getAccessInfo.if',//发送短信验证码
  73. sendPhoneCode:'visitor/sendPhoneCode.if',//访客申请
  74. userLogin:'appletLogin/userLogin.if',//登录
  75. selfInfo:'access/selfInfo.if',//访客统计
  76. editorAlumniVisitor:'visitor/editorAlumniVisitor.if',//访客申请
  77. getUserInfo:'userinfo/getUserInfo.if'//查询用户信息
  78. },
  79. [oneportal, root] =
  80. [["http://192.168.100.234:8080/oneportal/", "https://zhll.dgtis.com/wx/"],
  81. ["http://192.168.100.254:9082/wx/", "https://zhll.dgtis.com/wx/"],
  82. ["https://dorm.dgtis.com/oneportal/", "https://zhll.dgtis.com/wx/"]][index]
  83. Object.keys(api).forEach(x => {
  84. let v = api[x]
  85. api[x] = `${/\.if$/.test(v) ? oneportal : root}${v}`
  86. // api[x] = `${root}${v}`
  87. })
  88. module.exports = api