receiveCoupon.ts 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. import { http } from '@/http/alova'
  2. import { ContentTypeEnum } from '@/http/tools/enum'
  3. export function getReceiveCouponDetail(couponId: string) {
  4. return http.Get('/couponCenter/APP/shareRecord/queryTemplateBySendUserId', {
  5. params: {
  6. id: couponId,
  7. }
  8. })
  9. }
  10. // 新增:获取优惠券分享短链的接口
  11. export function getCouponShareLink(params) {
  12. return http.Get('/couponCenter/APP/shareRecord/createShareWechatUrl', {
  13. params: {
  14. templateId: params.templateId,
  15. pathUrl: params.pathUrl,
  16. }
  17. })
  18. }
  19. export function getWxQcCode(params) {
  20. return http.Post('/couponCenter/APP/shareRecord/createQRCode', params, {
  21. responseType: 'arraybuffer',
  22. cacheFor: null,
  23. meta: {
  24. returnResponse: true,
  25. }
  26. })
  27. }
  28. // 标记分享成功接口
  29. export function markSuccess(shareId: string) {
  30. return http.Get('/couponCenter/APP/shareRecord/markSuccess', {
  31. params: {
  32. shareId,
  33. }
  34. })
  35. }