api.js 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174
  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 comfirmCodeLogin(data) {
  54. return http.post('/duoduo-service/setup-service/padLogin/confirmPadLogin', data)
  55. }
  56. function getEquipmentAction(data) {
  57. return http.post('/server/custom/getEquipmentAction', data, test)
  58. }
  59. function getSpaceAdjustList(data) {
  60. return http.post('/server/spaceAdjust/getSpaceAdjustList', data, test)
  61. }
  62. function getPropertyData(data) {
  63. return http.get('/server/spaceAdjust/queryPropertyData', data, test)
  64. }
  65. function getFeedbackList(data) {
  66. return http.post('/server/custom/adjustSpaceList', data, test)
  67. }
  68. function getfeedbackSeason(data) {
  69. return http.post('/server/feedbackSeason/query', data, test)
  70. }
  71. function getSpaceNum(data) {
  72. return http.post('/server/spaceAdjust/getSpaceNum', data, test)
  73. }
  74. function spaceTop(data) {
  75. return http.post('/server/spaceAdjust/pcSaveAndUpdate', data, test)
  76. }
  77. function deleteSpaceAdjust(data) {
  78. return http.get('/server/spaceAdjust/delete', data, test)
  79. }
  80. function gethouseKeeper(data) {
  81. return http.get('/server/duoduoenv/customerservice/queryCustomer', data, test)
  82. }
  83. function getSeasonType(data) {
  84. return http.get('/duoduo-service/custom-service/custom/getSeasonType', data, test)
  85. }
  86. function getWeather(data) {
  87. return http.get('/duoduo-service/object-service/weather/getCurrentWeather', data, test)
  88. }
  89. function submitFeedback(data) {
  90. return http.post('/server/feedbackSuggest/save', data, test)
  91. }
  92. function submitAdjust(data) {
  93. return http.post('/server/custom/custormPlan', data, test)
  94. }
  95. function getCurrentSeason(data) {
  96. return http.get('/duoduo-service/custom-service/custom/getSeasonType', data, test)
  97. }
  98. function contactTenant(data) {
  99. return http.post('/server/spaceAdjust/adjustSpace', data, test)
  100. }
  101. function getTransfrom(data) {
  102. return http.get('/duoduo-service/custom-service/custom/getSeasonBySeasonDate', data, test)
  103. }
  104. function queryQuestion(data) {
  105. return http.post('/server/question/queryQuestion', data, test)
  106. }
  107. function queryUseranswer(data) {
  108. return http.post('/server/question/queryShowQuestion', data, test)
  109. }
  110. function submitAnswer(data) {
  111. return http.post('/server/question/saveUserQuestion', data, test)
  112. }
  113. function notShowQuestion(data) {
  114. return http.post('/server/question/notShowQuestion', data, test)
  115. }
  116. module.exports = {
  117. getopenId, // 获取到openId
  118. getuserPhone, // 获取用户电话
  119. userCheck, // 检查用户是否注册
  120. userSave, // 创建用户
  121. userQuery, // 查询用户
  122. userUpdate, // 更新用户
  123. spaceProperty,// 空间当前状态
  124. queryChart, // 查询空间温度曲线
  125. queryAllspace, //查询所有空间列表
  126. queryFollowspace, //查询所有关注列表
  127. powerCheck, // 查询是否有调节权限
  128. workLeave, // 下班节能
  129. nextOpen, // 下次开启时间
  130. getfeedBack, // 反馈
  131. getSpacedetail, // 查询空间信息
  132. openSpace, // 下班后开启调节
  133. getEquipmentAction, // 查询反馈后设备动作
  134. getSpaceAdjustList, //获取用户调节空间
  135. getPropertyData,//获取各参数数据
  136. getFeedbackList, // 获取调节记录
  137. getfeedbackSeason, // 获取季节调节记录
  138. getSpaceNum, //调节空间次数和数量
  139. spaceTop, //置顶
  140. deleteSpaceAdjust, //删除
  141. gethouseKeeper, //获取环境管家信息
  142. getSeasonType, //获取季节
  143. getWeather, //获取天气
  144. submitFeedback, //提交反馈内容
  145. submitAdjust, //提交温度计划
  146. getCurrentSeason, //获取当前季节类型
  147. contactTenant, //建立租户关系
  148. getTransfrom, // 查询冬转夏 夏转东
  149. queryQuestion, //查询调查问卷问题和答案
  150. queryUseranswer, //查询用户是否要填写问卷
  151. submitAnswer, //提交问卷答案
  152. notShowQuestion, //不再展示问卷
  153. comfirmCodeLogin // 二维码登录
  154. }