memberVoucher.js 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. import { requestApi } from '../util/network'
  2. // 获取用户平台代金券列表
  3. export const getMallVoucherList =
  4. (params,stateType) =>
  5. requestApi(
  6. '/Membermallvoucher/mallvoucher_list',
  7. 'POST',
  8. {
  9. page:params.page,
  10. per_page:params.per_page,
  11. mallvoucher_state:stateType
  12. },
  13. 'member'
  14. )
  15. // 获取用户店铺代金券列表
  16. export const getVoucherList =
  17. (params,stateType) =>
  18. requestApi(
  19. '/Membervoucher/voucher_list',
  20. 'POST',
  21. {
  22. page:params.page,
  23. per_page:params.per_page,
  24. voucher_state:stateType
  25. },
  26. 'member'
  27. )
  28. // 兑换代金券
  29. export const receiveVoucher =
  30. (vouchertemplate_id) =>
  31. requestApi(
  32. '/Membervoucher/voucher_point',
  33. 'POST',
  34. {
  35. 'tid': vouchertemplate_id
  36. },
  37. 'member'
  38. )
  39. // 私密代金券
  40. export const getVoucherPrivate =
  41. (vouchertemplate_id) =>
  42. requestApi(
  43. '/Membervoucher/voucher_private',
  44. 'POST',
  45. {
  46. 'vouchertemplate_id': vouchertemplate_id
  47. },
  48. 'member'
  49. )