mall-uniapp/api/promotion/coupon.js

30 lines
757 B
JavaScript
Raw Normal View History

import request from "@/utils/request.js";
export function takeCoupon(templateId) {
return request.post("app-api/promotion/coupon/take", {
templateId
});
}
2023-06-25 09:43:59 +00:00
// 获得匹配指定商品的优惠劵列表
export function getMatchCouponList(data) {
return request.get("app-api/promotion/coupon/match-list", data);
}
2023-06-25 12:28:37 +00:00
export function getCouponPage(data) {
return request.get("app-api/promotion/coupon/page", data);
}
2023-06-25 09:43:59 +00:00
export function getCouponTemplateList(spuId, useType) {
return request.get("app-api/promotion/coupon-template/list", {
spuId,
useType
}, {
noAuth: true // TODO 芋艿:后续要做调整
2023-06-25 09:43:59 +00:00
});
}
export function getCouponTemplatePage(data) {
return request.get("app-api/promotion/coupon-template/page", data);
}