2 lines
1.2 KiB
JavaScript
2 lines
1.2 KiB
JavaScript
|
"use strict";const o=require("../../request/index.js"),t={getCouponTemplateListByIds:t=>o.request({url:"/promotion/coupon-template/list-by-ids",method:"GET",params:{ids:t},custom:{showLoading:!1,showError:!1}}),getCouponTemplateList:(t,e,u)=>o.request({url:"/promotion/coupon-template/list",method:"GET",params:{spuId:t,productScope:e,count:u}}),getCouponTemplatePage:t=>o.request({url:"/promotion/coupon-template/page",method:"GET",params:t}),getCouponTemplate:t=>o.request({url:"/promotion/coupon-template/get",method:"GET",params:{id:t}}),getCouponPage:t=>o.request({url:"/promotion/coupon/page",method:"GET",params:t}),takeCoupon:t=>o.request({url:"/promotion/coupon/take",method:"POST",data:{templateId:t},custom:{auth:!0,showLoading:!0,loadingMsg:"领取中",showSuccess:!0,successMsg:"领取成功"}}),getCoupon:t=>o.request({url:"/promotion/coupon/get",method:"GET",params:{id:t}}),getUnusedCouponCount:()=>o.request({url:"/promotion/coupon/get-unused-count",method:"GET",custom:{showLoading:!1,auth:!0}}),getMatchCouponList:(t,e,u,s)=>o.request({url:"/promotion/coupon/match-list",method:"GET",params:{price:t,spuIds:e.join(","),skuIds:u.join(","),categoryIds:s.join(",")},custom:{showError:!1,showLoading:!1}})};exports.CouponApi=t;
|