api.js 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169
  1. import {http} from './http'
  2. //是否为测试环境
  3. const test = false;
  4. // 需要先调用远程权限的接口
  5. function getopenId(code){
  6. return http.get('/duoduo-service/wechat-service/wechat/app/getOpenId',{code:code})
  7. }
  8. function getuserPhone(data){
  9. return http.get('/duoduo-service/wechat-service/wechat/app/getUserInfo',data)
  10. }
  11. function userCheck(data){
  12. return http.get('/server/user/check',data)
  13. }
  14. function userSave(data){
  15. return http.post('/server/user/save',data)
  16. }
  17. function userQuery(data){
  18. return http.post('/server/user/query',data)
  19. }
  20. function userUpdate(data){
  21. return http.post('/server/user/update',data)
  22. }
  23. function spaceProperty(data){
  24. return http.get('/server/custom/spaceProperty',data,test)
  25. }
  26. function queryChart(data){
  27. return http.get('/server/space/queryPeriodData',data)
  28. }
  29. function queryAllspace(data){
  30. return http.post('/server/space/queryAll',data,test)
  31. }
  32. function queryFollowspace(data){
  33. return http.post('/server/space/querySubscribe',data)
  34. }
  35. function powerCheck(data){
  36. return http.post('/server/custom/check',data,test)
  37. }
  38. function workLeave(data){
  39. return http.post('/server/custom/leave',data,test)
  40. }
  41. function nextOpen(data){
  42. return http.post('/server/custom/nextOpenTime',data,test)
  43. }
  44. function getfeedBack(data){
  45. return http.post('/server/custom/feedbackCreate',data,test)
  46. }
  47. function getSpacedetail(data){
  48. return http.post('/server/space/property',data,test)
  49. }
  50. function openSpace(data){
  51. return http.post('/server/custom/recover',data,test)
  52. }
  53. function getEquipmentAction(data){
  54. return http.post('/server/custom/getEquipmentAction',data,test)
  55. }
  56. function getSpaceAdjustList(data){
  57. return http.post('/server/spaceAdjust/getSpaceAdjustList',data,test)
  58. }
  59. function getPropertyData(data){
  60. return http.get('/server/spaceAdjust/queryPropertyData',data,test)
  61. }
  62. function getFeedbackList(data){
  63. return http.post('/server/custom/adjustSpaceList',data,test)
  64. }
  65. function getfeedbackSeason(data){
  66. return http.post('/server/feedbackSeason/query',data,test)
  67. }
  68. function getSpaceNum(data){
  69. return http.post('/server/spaceAdjust/getSpaceNum',data,test)
  70. }
  71. function spaceTop(data){
  72. return http.post('/server/spaceAdjust/pcSaveAndUpdate',data,test)
  73. }
  74. function deleteSpaceAdjust(data){
  75. return http.get('/server/spaceAdjust/delete',data,test)
  76. }
  77. function gethouseKeeper(data){
  78. return http.get('/server/duoduoenv/customerservice/queryCustomer',data,test)
  79. }
  80. function getSeasonType(data){
  81. return http.get('/duoduo-service/custom-service/custom/getSeasonType',data,test)
  82. }
  83. function getWeather(data){
  84. return http.get('/duoduo-service/fm-service/weather/getCurrent',data,test)
  85. }
  86. function submitFeedback(data){
  87. return http.post('/server/feedbackSuggest/save',data,test)
  88. }
  89. function submitAdjust(data){
  90. return http.post('/server/custom/custormPlan',data,test)
  91. }
  92. function getCurrentSeason(data){
  93. return http.get('/duoduo-service/custom-service/custom/getSeasonType',data,test)
  94. }
  95. function contactTenant(data){
  96. return http.post('/server/spaceAdjust/adjustSpace',data,test)
  97. }
  98. function getTransfrom(data){
  99. return http.get('/duoduo-service/custom-service/custom/getSeasonBySeasonDate',data,test)
  100. }
  101. function queryQuestion(data){
  102. return http.post('/server/question/queryQuestion',data,test)
  103. }
  104. function queryUseranswer(data){
  105. return http.post('/server/question/queryShowQuestion',data,test)
  106. }
  107. function submitAnswer(data){
  108. return http.post('/server/question/saveUserQuestion',data,test)
  109. }
  110. function notShowQuestion(data){
  111. return http.post('/server/question/notShowQuestion',data,test)
  112. }
  113. module.exports = {
  114. getopenId, // 获取到openId
  115. getuserPhone, // 获取用户电话
  116. userCheck, // 检查用户是否注册
  117. userSave, // 创建用户
  118. userQuery, // 查询用户
  119. userUpdate, // 更新用户
  120. spaceProperty,// 空间当前状态
  121. queryChart, // 查询空间温度曲线
  122. queryAllspace, //查询所有空间列表
  123. queryFollowspace, //查询所有关注列表
  124. powerCheck, // 查询是否有调节权限
  125. workLeave, // 下班节能
  126. nextOpen, // 下次开启时间
  127. getfeedBack, // 反馈
  128. getSpacedetail, // 查询空间信息
  129. openSpace, // 下班后开启调节
  130. getEquipmentAction, // 查询反馈后设备动作
  131. getSpaceAdjustList, //获取用户调节空间
  132. getPropertyData ,//获取各参数数据
  133. getFeedbackList, // 获取调节记录
  134. getfeedbackSeason, // 获取季节调节记录
  135. getSpaceNum, //调节空间次数和数量
  136. spaceTop, //置顶
  137. deleteSpaceAdjust, //删除
  138. gethouseKeeper, //获取环境管家信息
  139. getSeasonType, //获取季节
  140. getWeather, //获取天气
  141. submitFeedback, //提交反馈内容
  142. submitAdjust, //提交温度计划
  143. getCurrentSeason, //获取当前季节类型
  144. contactTenant, //建立租户关系
  145. getTransfrom, // 查询冬转夏 夏转东
  146. queryQuestion, //查询调查问卷问题和答案
  147. queryUseranswer, //查询用户是否要填写问卷
  148. submitAnswer, //提交问卷答案
  149. notShowQuestion, //不再展示问卷
  150. }