健康同学微信公众号h5项目
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

223 line
5.4KB

  1. import request from '@/config/request';
  2. export const APIHealthy = {
  3. getSpoList, //获取血氧列表
  4. getHeartRateList, //获取心率列表
  5. getTemperatureList, //获取体温列表
  6. setLocationConfig, //设置设备定位控制参数
  7. getLocationConfig, //获取设备定位控制参数
  8. getHealthConfig, //获取设备健康控制参数(心率、血氧、测温)
  9. setHealthConfig, //设置设备健康控制参数(心率、血氧、测温)
  10. setUploadConfig, //置设备上报周期参数
  11. getUploadConfig, //取设备上报周期参数
  12. setDrownConfig, //设置设备防溺水参数
  13. getDrownConfig, //获取设备防溺水参数
  14. setNowearConfig, //设置设备未佩戴检测参数
  15. getNowearConfig, //设置设备未佩戴检测参数
  16. setWatchConfig, //设置设备未佩戴检测参数
  17. getWatchConfig, //设置设备未佩戴检测参数
  18. setBloodPressConfig, //设置设备血压检测参数
  19. getBloodPressConfig, //获取设备血压检测参数
  20. getBloodPressList, //获取设备血压数据
  21. setPsychAbilityConfig, //心理监测能力开通(下发参数)
  22. getPsychAbilityConfig, //获取心理监测能力开通参数
  23. setLongSitReminder, //设置设备久坐提醒参数
  24. getLongSitReminder, //获取设备久坐提醒参数
  25. setRaiseToLightScreen, //设置设备抬腕亮屏参数
  26. getRaiseToLightScreen //获取设备抬腕亮屏参数
  27. };
  28. export default APIHealthy;
  29. function getSpoList(params) {
  30. return request({
  31. url: '/api/Healthy/SpoList',
  32. method: 'post',
  33. data: params
  34. });
  35. }
  36. function getHeartRateList(params) {
  37. return request({
  38. url: '/api/Healthy/HeartRateList',
  39. method: 'post',
  40. data: params
  41. });
  42. }
  43. function getTemperatureList(params) {
  44. return request({
  45. url: '/api/Healthy/TemperatureList',
  46. method: 'post',
  47. data: params
  48. });
  49. }
  50. function setLocationConfig(params) {
  51. return request({
  52. url: '/api/Command/SetLocationConfig',
  53. method: 'post',
  54. headers: { authKey: 'key1' },
  55. data: params
  56. });
  57. }
  58. function getLocationConfig({ imei }) {
  59. return request({
  60. url: '/api/Command/GetLocationConfig',
  61. method: 'get',
  62. headers: { authKey: 'key1' },
  63. params: { imei }
  64. });
  65. }
  66. function setHealthConfig(params) {
  67. return request({
  68. url: '/api/Command/SetHealthConfig',
  69. method: 'post',
  70. headers: { authKey: 'key1' },
  71. data: params
  72. });
  73. }
  74. function getHealthConfig({ imei }) {
  75. return request({
  76. url: '/api/Command/GetHealthConfig',
  77. method: 'get',
  78. headers: { authKey: 'key1' },
  79. params: { imei }
  80. });
  81. }
  82. function setUploadConfig(params) {
  83. return request({
  84. url: '/api/Command/SetUploadConfig',
  85. method: 'post',
  86. headers: { authKey: 'key1' },
  87. data: params
  88. });
  89. }
  90. function getUploadConfig({ imei }) {
  91. return request({
  92. url: '/api/Command/GetUploadConfig',
  93. method: 'get',
  94. headers: { authKey: 'key1' },
  95. params: { imei }
  96. });
  97. }
  98. function setDrownConfig(params) {
  99. return request({
  100. url: '/api/Command/SetDrownConfig',
  101. method: 'post',
  102. headers: { AuthKey: 'key1' },
  103. data: params
  104. });
  105. }
  106. function getDrownConfig(imei) {
  107. return request({
  108. url: '/api/Command/GetDrownConfig',
  109. method: 'get',
  110. headers: { AuthKey: 'key1' },
  111. params: { imei }
  112. });
  113. }
  114. function setNowearConfig(params) {
  115. return request({
  116. url: '/api/Command/SetNowearConfig',
  117. method: 'post',
  118. headers: { AuthKey: 'key1' },
  119. data: params
  120. });
  121. }
  122. function getNowearConfig(imei) {
  123. return request({
  124. url: '/api/Command/GetNowearConfig',
  125. method: 'get',
  126. headers: { AuthKey: 'key1' },
  127. params: { imei }
  128. });
  129. }
  130. function setWatchConfig(params) {
  131. return request({
  132. url: '/api/Device/SetWatchConfig',
  133. method: 'post',
  134. headers: { AuthKey: 'key1' },
  135. data: params
  136. });
  137. }
  138. function getWatchConfig(imei) {
  139. return request({
  140. url: '/api/Device/GetWatchConfig',
  141. method: 'get',
  142. headers: { AuthKey: 'key1' },
  143. params: { imei }
  144. });
  145. }
  146. function setBloodPressConfig(params) {
  147. return request({
  148. url: '/api/Command/SetBloodPressConfig',
  149. method: 'post',
  150. headers: { AuthKey: 'key1' },
  151. data: params
  152. });
  153. }
  154. function getBloodPressConfig(imei) {
  155. return request({
  156. url: '/api/Command/GetBloodPressConfig',
  157. method: 'get',
  158. headers: { AuthKey: 'key1' },
  159. params: { imei }
  160. });
  161. }
  162. function getBloodPressList(params) {
  163. return request({
  164. url: '/api/Healthy/BloodPressList',
  165. method: 'post',
  166. headers: { AuthKey: 'key1' },
  167. data: params
  168. });
  169. }
  170. function setPsychAbilityConfig(params) {
  171. return request({
  172. url: '/api/Command/SetPsychAbilityConfig',
  173. method: 'post',
  174. headers: { AuthKey: 'key1' },
  175. data: params
  176. });
  177. }
  178. function getPsychAbilityConfig(imei) {
  179. return request({
  180. url: '/api/Command/GetPsychAbilityConfig',
  181. method: 'get',
  182. headers: { AuthKey: 'key1' },
  183. params: { imei }
  184. });
  185. }
  186. function setLongSitReminder(params) {
  187. return request({
  188. url: '/api/Command/SetLongSitReminder',
  189. method: 'post',
  190. headers: { AuthKey: 'key1' },
  191. data: params
  192. });
  193. }
  194. function getLongSitReminder(imei) {
  195. return request({
  196. url: '/api/Command/GetLongSitReminder',
  197. method: 'get',
  198. headers: { AuthKey: 'key1' },
  199. params: { imei }
  200. });
  201. }
  202. function setRaiseToLightScreen(params) {
  203. return request({
  204. url: '/api/Command/SetRaiseToLightScreen',
  205. method: 'post',
  206. headers: { AuthKey: 'key1' },
  207. data: params
  208. });
  209. }
  210. function getRaiseToLightScreen(imei) {
  211. return request({
  212. url: '/api/Command/GetRaiseToLightScreen',
  213. method: 'get',
  214. headers: { AuthKey: 'key1' },
  215. params: { imei }
  216. });
  217. }