friendCoupon.ts 891 B

123456789101112131415161718192021222324252627282930
  1. import http from "@/api";
  2. /**
  3. * @name 好友优惠券管理模块
  4. */
  5. // 获取好友优惠券列表
  6. export const getFriendCouponList = (params: any) => {
  7. return http.post(`/life-discount-coupon-store-friend/getReceivedSendFriendCouponList`, params);
  8. };
  9. // 赠送优惠券给好友
  10. export const sendCouponToFriend = (params: { friendId: string | number; couponId: string | number; quantity: number }) => {
  11. return http.post(`/api/friendCoupon/send`, params);
  12. };
  13. // 删除好友优惠券记录
  14. export const deleteFriendCoupon = (params: { id: string | number }) => {
  15. return http.post(`/api/friendCoupon/delete`, params);
  16. };
  17. // 获取好友列表
  18. export const getFriendList = () => {
  19. return http.get(`/api/friendCoupon/friendList`);
  20. };
  21. // 获取可赠送的优惠券列表
  22. export const getAvailableCouponList = () => {
  23. return http.get(`/api/friendCoupon/availableCoupons`);
  24. };