data.js 768 B

12345678910111213141516171819202122232425262728293031323334353637
  1. import axios from '@/libs/axios.js';
  2. // 根据字典code查询选项
  3. export const getLookUpDatas = (params) => {
  4. return axios.request({
  5. url: `lookup/findByLookup/${params.type}`,
  6. method: 'get'
  7. })
  8. }
  9. // 开箱操作
  10. export const openDevice = (params) => {
  11. return axios.request({
  12. url: `device/ctl/open`,
  13. method: 'post',
  14. data: params
  15. })
  16. }
  17. //查询省
  18. export const getProvince = () => {
  19. return axios.request({
  20. url: `area/PROVINCE`,
  21. method: 'get'
  22. })
  23. }
  24. //查询市
  25. export const getCityByPro = params => {
  26. return axios.request({
  27. url: `area/CITY/${params.id}`,
  28. method: 'get'
  29. })
  30. }
  31. //查询区
  32. export const getDistrictByCity = params => {
  33. return axios.request({
  34. url: `area/DISTRICT/${params.id}`,
  35. method: 'get'
  36. })
  37. }