index.ts 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. import request from '@/config/axios'
  2. export interface ConfigVO {
  3. id: number
  4. tradeDeductEnable: number
  5. tradeDeductUnitPrice: number
  6. tradeDeductMaxPrice: number
  7. tradeGivePoint: number
  8. }
  9. // 查询积分设置列表
  10. export const getConfigPage = async (params) => {
  11. return await request.get({ url: `/point/config/page`, params })
  12. }
  13. // 查询积分设置详情
  14. export const getConfig = async (id: number) => {
  15. return await request.get({ url: `/point/config/get?id=` + id })
  16. }
  17. // 新增积分设置
  18. export const createConfig = async (data: ConfigVO) => {
  19. return await request.post({ url: `/point/config/create`, data })
  20. }
  21. // 修改积分设置
  22. export const updateConfig = async (data: ConfigVO) => {
  23. return await request.put({ url: `/point/config/update`, data })
  24. }
  25. // 删除积分设置
  26. export const deleteConfig = async (id: number) => {
  27. return await request.delete({ url: `/point/config/delete?id=` + id })
  28. }
  29. // 导出积分设置 Excel
  30. export const exportConfig = async (params) => {
  31. return await request.download({ url: `/point/config/export-excel`, params })
  32. }