contact.js 992 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. import request from '@/utils/request'
  2. // 创建crm联系人
  3. export function createContact(data) {
  4. return request({
  5. url: '/crm/contact/create',
  6. method: 'post',
  7. data: data
  8. })
  9. }
  10. // 更新crm联系人
  11. export function updateContact(data) {
  12. return request({
  13. url: '/crm/contact/update',
  14. method: 'put',
  15. data: data
  16. })
  17. }
  18. // 删除crm联系人
  19. export function deleteContact(id) {
  20. return request({
  21. url: '/crm/contact/delete?id=' + id,
  22. method: 'delete'
  23. })
  24. }
  25. // 获得crm联系人
  26. export function getContact(id) {
  27. return request({
  28. url: '/crm/contact/get?id=' + id,
  29. method: 'get'
  30. })
  31. }
  32. // 获得crm联系人分页
  33. export function getContactPage(query) {
  34. return request({
  35. url: '/crm/contact/page',
  36. method: 'get',
  37. params: query
  38. })
  39. }
  40. // 导出crm联系人 Excel
  41. export function exportContactExcel(query) {
  42. return request({
  43. url: '/crm/contact/export-excel',
  44. method: 'get',
  45. params: query,
  46. responseType: 'blob'
  47. })
  48. }