device.js 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383
  1. import request from '@/utils/request'
  2. // 设备列表
  3. export function mercHomeList(data) {
  4. return request({
  5. url: '/merc/mini/device/mercHomeList',
  6. method: 'post',
  7. data:data
  8. })
  9. }
  10. // 商户设备首页统计
  11. export function mercHomeStatistical(data) {
  12. return request({
  13. url: '/device/merc-mini/device/mercHomeStatistical',
  14. method: 'post',
  15. data:data
  16. })
  17. }
  18. // 增加商品到设备
  19. export function bindDevice(data) {
  20. return request({
  21. url: '/goods/merc-mini/goodsDevice/bindDevice',
  22. method: 'post',
  23. data:data
  24. })
  25. }
  26. // 设备商品列表
  27. export function goodsList(data) {
  28. return request({
  29. url: '/goods/merc-mini/goodsDevice/page',
  30. method: 'post',
  31. data:data
  32. })
  33. }
  34. // 商户设备列表
  35. export function searchPage(data) {
  36. return request({
  37. url: '/device/merc-mini/device/searchPage',
  38. method: 'post',
  39. data:data
  40. })
  41. }
  42. // 商户设备详情
  43. export function detail(data) {
  44. return request({
  45. url: '/device/merc-mini/device/detail',
  46. method: 'post',
  47. data:data
  48. })
  49. }
  50. // 数据统计
  51. export function dataCount(data) {
  52. return request({
  53. url: '/device/merc-mini/device/dataCount',
  54. method: 'post',
  55. data:data
  56. })
  57. }
  58. // 设备操作记录
  59. export function indexDeviceRecords(data) {
  60. return request({
  61. url: '/device/merc-mini/deviceRecords/indexDeviceRecords',
  62. method: 'post',
  63. data:data
  64. })
  65. }
  66. // 设备联网记录
  67. export function indexDeviceNetRecords(data) {
  68. return request({
  69. url: '/device/merc-mini/deviceRecords/indexDeviceNetRecords',
  70. method: 'post',
  71. data:data
  72. })
  73. }
  74. // 设备故障情况
  75. export function indexDeviceError(data) {
  76. return request({
  77. url: '/device/merc-mini/deviceRecords/indexDeviceError',
  78. method: 'post',
  79. data:data
  80. })
  81. }
  82. // 设备温度记录
  83. export function indexDeviceTempRecords(data) {
  84. return request({
  85. url: '/device/merc-mini/deviceRecords/indexDeviceTempRecords ',
  86. method: 'post',
  87. data:data
  88. })
  89. }
  90. // 设备激活
  91. export function deviceActive(data) {
  92. return request({
  93. url: '/device/merc-mini/device/active',
  94. method: 'post',
  95. data:data
  96. })
  97. }
  98. // 设备详情
  99. export function deviceDetail(data) {
  100. return request({
  101. url: '/device/device-info/obj',
  102. method: 'post',
  103. data:data
  104. })
  105. }
  106. // 运营状态修改
  107. export function modifyBusyStage(data) {
  108. return request({
  109. url: '/device/merc-mini/device/modifyBusyStage',
  110. method: 'post',
  111. data:data
  112. })
  113. }
  114. // 首页统计数据
  115. export function allCount(data) {
  116. return request({
  117. url: '/order/order-merc-sales-count-more/count',
  118. method: 'post',
  119. data:data
  120. })
  121. }
  122. // 设备商品分类
  123. export function categoryList(data) {
  124. return request({
  125. url: '/goods/merc-mini/goodsDevice/categoryList',
  126. method: 'post',
  127. data:data
  128. })
  129. }
  130. // 修改设备信息
  131. export function updateInfo(data) {
  132. return request({
  133. url: '/device/merc-mini/device/updateInfo',
  134. method: 'post',
  135. data:data
  136. })
  137. }
  138. export function sendCommand(data) {
  139. return request({
  140. url: '/device/mqtt/senCommand',
  141. method: 'post',
  142. data:data
  143. })
  144. }
  145. //查询指令操作结果
  146. export function queryCommandResult(data) {
  147. return request({
  148. url: '/device/mqtt/snByCmdAndResult',
  149. method: 'post',
  150. data:data
  151. })
  152. }
  153. //销售统计汇总
  154. export function sumCount(data) {
  155. return request({
  156. url: '/device/merc-mini/deviceData/sumCount',
  157. method: 'post',
  158. data:data
  159. })
  160. }
  161. //销售统计列表
  162. export function sumPage(data) {
  163. return request({
  164. url: '/device/merc-mini/deviceData/sumPage',
  165. method: 'post',
  166. data:data
  167. })
  168. }
  169. //设备激活情况
  170. export function getActiveInfo(data) {
  171. return request({
  172. url: '/device/merc-mini/device/getActiveInfo',
  173. method: 'post',
  174. data:data
  175. })
  176. }
  177. //设备是否属于商户
  178. export function isMerc(data) {
  179. return request({
  180. url: '/device/merc-mini/device/isMerc',
  181. method: 'post',
  182. data:data
  183. })
  184. }
  185. //设备二维码
  186. export function getQrCode(data) {
  187. return request({
  188. url: '/device/device-quality/getQrCode',
  189. method: 'post',
  190. data:data
  191. })
  192. }
  193. //导出设备二维码
  194. export function exportQrCode(data) {
  195. return request({
  196. url: '/device/device-create-ids/exportQrCode',
  197. method: 'post',
  198. data:data
  199. })
  200. }
  201. //清除故障
  202. export function abort(data) {
  203. return request({
  204. url: '/order/activity-info/abort',
  205. method: 'post',
  206. data:data
  207. })
  208. }
  209. //统计数据图表
  210. export function salesData(data) {
  211. return request({
  212. url: '/merc/mini/data/salesData',
  213. method: 'post',
  214. data:data
  215. })
  216. }
  217. //支付宝设备激活分页
  218. export function aliDeviceActivePage(data) {
  219. return request({
  220. url: '/merc/mini/device/aliDeviceActivePage',
  221. method: 'post',
  222. data:data
  223. })
  224. }
  225. //获取商家信息
  226. export function userInfoBySelf(data) {
  227. return request({
  228. url: '/merc/mini/mercUser/userInfoBySelf',
  229. method: 'post',
  230. data:data
  231. })
  232. }
  233. //绑定支付宝
  234. export function updateByAli(data) {
  235. return request({
  236. url: '/merc/mini/mercUser/updateByAli',
  237. method: 'post',
  238. data:data
  239. })
  240. }
  241. //支付宝设备详情查询
  242. export function aliDeviceObj(data) {
  243. return request({
  244. url: '/merc//mini/device/aliDeviceObj',
  245. method: 'post',
  246. data:data
  247. })
  248. }
  249. //商品销售统计汇总
  250. export function goodSumCount(data) {
  251. return request({
  252. url: '/goods/goodsDeviceData/sumCount',
  253. method: 'post',
  254. data:data
  255. })
  256. }
  257. //商品销售统计列表
  258. export function goodSumPage(data) {
  259. return request({
  260. url: '/goods/goodsDeviceData/sumPage',
  261. method: 'post',
  262. data:data
  263. })
  264. }
  265. export function mercDeviceList(data) {
  266. return request({
  267. url: '/merc/mini/mercUserDevice/mercDeviceList',
  268. method: 'post',
  269. data:data
  270. })
  271. }
  272. export function addDevice(data) {
  273. return request({
  274. url: '/merc/mini/mercUserDevice/add',
  275. method: 'post',
  276. data:data
  277. })
  278. }
  279. export function userDeviceList(data) {
  280. return request({
  281. url: '/merc/mini/mercUserDevice/userDeviceList',
  282. method: 'post',
  283. data:data
  284. })
  285. }
  286. export function delDevice(data) {
  287. return request({
  288. url: '/merc/mini/mercUserDevice/del',
  289. method: 'post',
  290. data:data
  291. })
  292. }
  293. export function listOfIdName(data) {
  294. return request({
  295. url: '/device/merc-mini/device/listOfIdName',
  296. method: 'post',
  297. data:data
  298. })
  299. }