coupon.js 442 B

12345678910111213141516171819
  1. import request from '@/api'
  2. const openid = uni.getStorageSync('openid')
  3. const couponService = {
  4. // 获取优惠券列表
  5. getCouponList: () => request.postForm('/coupon/list'),
  6. getUserCouponList: status => request.postForm('/coupon/list', {
  7. status, //全部 ; 已使用; 已过期; 未使用
  8. openid
  9. }),
  10. // 领取优惠券
  11. claimCoupon: id => request.postForm('/coupon/get', {
  12. id,
  13. openid
  14. })
  15. }
  16. export default couponService