index.ts 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. import request from '@/config/axios'
  2. export interface Demo02CategoryVO {
  3. id: number
  4. name: string
  5. parentId: number
  6. }
  7. // 查询示例分类列表
  8. export const getDemo02CategoryList = async (params) => {
  9. return await request.get({ url: `/infra/demo02-category/list`, params })
  10. }
  11. // 查询示例分类详情
  12. export const getDemo02Category = async (id: number) => {
  13. return await request.get({ url: `/infra/demo02-category/get?id=` + id })
  14. }
  15. // 新增示例分类
  16. export const createDemo02Category = async (data: Demo02CategoryVO) => {
  17. return await request.post({ url: `/infra/demo02-category/create`, data })
  18. }
  19. // 修改示例分类
  20. export const updateDemo02Category = async (data: Demo02CategoryVO) => {
  21. return await request.put({ url: `/infra/demo02-category/update`, data })
  22. }
  23. // 删除示例分类
  24. export const deleteDemo02Category = async (id: number) => {
  25. return await request.delete({ url: `/infra/demo02-category/delete?id=` + id })
  26. }
  27. // 导出示例分类 Excel
  28. export const exportDemo02Category = async (params) => {
  29. return await request.download({ url: `/infra/demo02-category/export-excel`, params })
  30. }