welfareMall.js 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. import request from '../utils/request.js'
  2. class WelfareMall extends request {
  3. /**
  4. * 获取订单
  5. */
  6. static getOrder(params) {
  7. return this.postRequest(`${this.BASE_URL}open/welfare-mall/order/get`, params);
  8. }
  9. /**
  10. * 取消订单
  11. */
  12. static cancelOrder(params) {
  13. return this.postRequest(`${this.BASE_URL}open/welfare-mall/order/cancel`, params);
  14. }
  15. /**
  16. * 订单列表
  17. */
  18. static getOrderList(params) {
  19. return this.postRequest(`${this.BASE_URL}open/welfare-mall/order/list`, params);
  20. }
  21. /**
  22. * 订单退款
  23. */
  24. static orderRefund(params) {
  25. return this.postRequest(`${this.BASE_URL}open/welfare-mall/order/refund`, params);
  26. }
  27. /**
  28. * 获得订单支付参数
  29. */
  30. static getPayParams(params) {
  31. return this.postRequest(`${this.BASE_URL}open/welfare-mall/activity/get-pay-params`, params);
  32. }
  33. /**
  34. * 获取订单的退款单信息
  35. */
  36. static getRefundOrderList(params) {
  37. return this.postRequest(`${this.BASE_URL}open/welfare-mall/order/get-refund-order-list`, params);
  38. }
  39. /**
  40. * 获取订单的退款单状态
  41. */
  42. static getRefundOrderStatus(params) {
  43. return this.postRequest(`${this.BASE_URL}open/welfare-mall/order/get-refund-order-status`, params);
  44. }
  45. /**
  46. * 添加反馈
  47. */
  48. static feedBackAdd(params) {
  49. return this.postRequest(`${this.BASE_URL}open/welfare-mall/add-feedback`, params);
  50. }
  51. /**
  52. * 福利社
  53. * 获取购买优惠券个数
  54. */
  55. static async getUserBuyCouponNum(params) {
  56. return this.postRequest(`${this.BASE_URL}open/welfare-mall/user-buy-coupon-num`, params);
  57. }
  58. /**
  59. * 签到
  60. * 获取购买优惠券个数
  61. */
  62. static async getUserAwardCouponNum(params) {
  63. return this.postRequest(`${this.BASE_URL}open/sign-in/user-award-coupon-num`, params);
  64. }
  65. /**
  66. * 抽奖
  67. * 获取购买优惠券个数
  68. */
  69. static async getUserDrawCouponNum(params) {
  70. return this.postRequest(`${this.BASE_URL}open/luck-draw/user-draw-coupon-num`, params);
  71. }
  72. }
  73. export default WelfareMall