city.js 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. import request from '@/utils/request'
  2. // 查询城市列表
  3. export function listCity(query) {
  4. return request({
  5. url: '/store/city/list',
  6. method: 'get',
  7. params: query
  8. })
  9. }
  10. export function getAllList(query) {
  11. return request({
  12. url: '/store/city/getAllList',
  13. method: 'get',
  14. params: query
  15. })
  16. }
  17. export function getCitys() {
  18. return request({
  19. url: '/store/city/getCitys',
  20. method: 'get'
  21. })
  22. }
  23. // 查询城市详细
  24. export function getCity(id) {
  25. return request({
  26. url: '/store/city/' + id,
  27. method: 'get'
  28. })
  29. }
  30. // 新增城市
  31. export function addCity(data) {
  32. return request({
  33. url: '/store/city',
  34. method: 'post',
  35. data: data
  36. })
  37. }
  38. // 修改城市
  39. export function updateCity(data) {
  40. return request({
  41. url: '/store/city',
  42. method: 'put',
  43. data: data
  44. })
  45. }
  46. // 删除城市
  47. export function delCity(id) {
  48. return request({
  49. url: '/store/city/' + id,
  50. method: 'delete'
  51. })
  52. }
  53. // 导出城市
  54. export function exportCity(query) {
  55. return request({
  56. url: '/store/city/export',
  57. method: 'get',
  58. params: query
  59. })
  60. }