index.ts 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. import request from '@/config/axios'
  2. export interface Demo01ContactVO {
  3. id: number
  4. name: string
  5. sex: number
  6. birthday: Date
  7. description: string
  8. avatar: string
  9. }
  10. // 查询示例联系人分页
  11. export const getDemo01ContactPage = async (params) => {
  12. return await request.get({ url: `/infra/demo01-contact/page`, params })
  13. }
  14. // 查询示例联系人详情
  15. export const getDemo01Contact = async (id: number) => {
  16. return await request.get({ url: `/infra/demo01-contact/get?id=` + id })
  17. }
  18. // 新增示例联系人
  19. export const createDemo01Contact = async (data: Demo01ContactVO) => {
  20. return await request.post({ url: `/infra/demo01-contact/create`, data })
  21. }
  22. // 修改示例联系人
  23. export const updateDemo01Contact = async (data: Demo01ContactVO) => {
  24. return await request.put({ url: `/infra/demo01-contact/update`, data })
  25. }
  26. // 删除示例联系人
  27. export const deleteDemo01Contact = async (id: number) => {
  28. return await request.delete({ url: `/infra/demo01-contact/delete?id=` + id })
  29. }
  30. // 导出示例联系人 Excel
  31. export const exportDemo01Contact = async (params) => {
  32. return await request.download({ url: `/infra/demo01-contact/export-excel`, params })
  33. }