index.ts 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. import request from '@/config/axios'
  2. export interface VipCardVO {
  3. id: number
  4. name: string
  5. styleImg: string
  6. sort: number
  7. isDiscount: boolean
  8. discount: number
  9. igiveMethod: string
  10. integral: number
  11. coupon: string
  12. mony: number
  13. period: number
  14. price: number
  15. status: boolean
  16. rule: string
  17. }
  18. // 查询会员卡列表
  19. export const getVipCardPage = async (params: VipCardPageReqVO) => {
  20. return await request.get({ url: `/card/vip-card/page`, params })
  21. }
  22. // 查询会员卡详情
  23. export const getVipCard = async (id: number) => {
  24. return await request.get({ url: `/card/vip-card/get?id=` + id })
  25. }
  26. // 新增会员卡
  27. export const createVipCard = async (data: VipCardVO) => {
  28. return await request.post({ url: `/card/vip-card/create`, data })
  29. }
  30. // 修改会员卡
  31. export const updateVipCard = async (data: VipCardVO) => {
  32. return await request.put({ url: `/card/vip-card/update`, data })
  33. }
  34. // 删除会员卡
  35. export const deleteVipCard = async (id: number) => {
  36. return await request.delete({ url: `/card/vip-card/delete?id=` + id })
  37. }
  38. // 导出会员卡 Excel
  39. export const exportVipCard = async (params) => {
  40. return await request.download({ url: `/card/vip-card/export-excel`, params })
  41. }