policy.js 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. import { httpApi } from '../../request/httpApi'
  2. export default {
  3. //获取分页
  4. async getPage(form, msg = true) {
  5. return httpApi({
  6. url: '/api/blade-land/policyInfo/page',
  7. method: 'get',
  8. params: form,
  9. }, msg)
  10. },
  11. //新增或修改
  12. async addOrUpdate(form, msg = true) {
  13. return httpApi({
  14. url: '/api/blade-land/policyInfo/addOrUpdate',
  15. method: 'post',
  16. data: form,
  17. }, msg)
  18. },
  19. //查询单个详情
  20. async getDetail(form, msg = true) {
  21. return httpApi({
  22. url: '/api/blade-land/policyInfo/detail',
  23. method: 'get',
  24. params: form,
  25. }, msg)
  26. },
  27. //查询删除
  28. async remove(form, msg = true) {
  29. return httpApi({
  30. url: '/api/blade-land/policyInfo/remove',
  31. method: 'post',
  32. data: form,
  33. }, msg)
  34. },
  35. //文件上传
  36. async addOrFile(form, msg = true) {
  37. return httpApi({
  38. url: '/api/blade-land/attachmentInfo/add-file',
  39. method: 'post',
  40. data: form,
  41. }, msg)
  42. },
  43. //文件删除
  44. async deleteFile(form, msg = true) {
  45. return httpApi({
  46. url: '/api/blade-land/attachmentInfo/delete',
  47. method: 'get',
  48. params: form,
  49. }, msg)
  50. },
  51. }