index.ts 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. import request from '@/config/axios'
  2. export interface ArticleCategoryVO {
  3. id: number
  4. name: string
  5. picUrl: string
  6. status: number
  7. sort: number
  8. }
  9. // 查询分类列表
  10. export const getArticleCategoryPage = async (params) => {
  11. return await request.get({ url: `/promotion/article-category/page`, params })
  12. }
  13. // 查询分类详情
  14. export const getArticleCategory = async (id: number) => {
  15. return await request.get({ url: `/promotion/article-category/get?id=` + id })
  16. }
  17. // 新增分类
  18. export const createArticleCategory = async (data: ArticleCategoryVO) => {
  19. return await request.post({ url: `/promotion/article-category/create`, data })
  20. }
  21. // 修改分类
  22. export const updateArticleCategory = async (data: ArticleCategoryVO) => {
  23. return await request.put({ url: `/promotion/article-category/update`, data })
  24. }
  25. // 删除分类
  26. export const deleteArticleCategory = async (id: number) => {
  27. return await request.delete({ url: `/promotion/article-category/delete?id=` + id })
  28. }
  29. // 导出分类 Excel
  30. export const exportArticleCategory = async (params) => {
  31. return await request.download({ url: `/promotion/article-category/export-excel`, params })
  32. }