2023-06-10 01:57:20 +00:00
|
|
|
import request from "@/utils/request.js";
|
|
|
|
|
2023-09-30 14:05:02 +00:00
|
|
|
// 领取优惠券
|
2023-06-10 01:57:20 +00:00
|
|
|
export function takeCoupon(templateId) {
|
|
|
|
return request.post("app-api/promotion/coupon/take", {
|
|
|
|
templateId
|
|
|
|
});
|
|
|
|
}
|
2023-06-25 09:43:59 +00:00
|
|
|
|
2023-06-29 12:19:40 +00:00
|
|
|
// 获得匹配指定商品的优惠劵列表
|
|
|
|
export function getMatchCouponList(data) {
|
|
|
|
return request.get("app-api/promotion/coupon/match-list", data);
|
|
|
|
}
|
|
|
|
|
2023-09-30 14:05:02 +00:00
|
|
|
// 获得用户优惠劵列表
|
2023-06-25 12:28:37 +00:00
|
|
|
export function getCouponPage(data) {
|
|
|
|
return request.get("app-api/promotion/coupon/page", data);
|
|
|
|
}
|
|
|
|
|
2023-09-30 14:05:02 +00:00
|
|
|
// 获得优惠劵模板分页
|
2023-06-25 09:43:59 +00:00
|
|
|
export function getCouponTemplatePage(data) {
|
2023-10-07 14:54:08 +00:00
|
|
|
return request.get("app-api/promotion/coupon-template/page", data, {
|
|
|
|
noAuth: true // TODO 芋艿:后续要做调整
|
|
|
|
});
|
2023-06-25 09:43:59 +00:00
|
|
|
}
|
2023-08-19 09:00:08 +00:00
|
|
|
|
2023-09-30 14:05:02 +00:00
|
|
|
// 获得优惠劵模板列表
|
|
|
|
export function getCouponTemplateList(data) {
|
2023-10-07 14:54:08 +00:00
|
|
|
return request.get("app-api/promotion/coupon-template/list", data, {
|
|
|
|
noAuth: true // TODO 芋艿:后续要做调整
|
|
|
|
});
|
2023-09-30 14:05:02 +00:00
|
|
|
}
|
|
|
|
|
2023-08-19 09:00:08 +00:00
|
|
|
// 获得未使用的优惠劵数量
|
|
|
|
export function getUnusedCouponCount() {
|
|
|
|
return request.get("app-api/promotion/coupon/get-unused-count");
|
|
|
|
}
|