import { http, Method } from "@/utils/request.js";
|
|
/**
|
* 根据店铺优惠券关联ID获取优惠券详情
|
* @param {string|number} storeCoupRef - 店铺优惠券关联ID
|
* @returns {Promise} 返回优惠券详情
|
*/
|
export function getStoreCouponDetail(storeCoupRef) {
|
return http.request({
|
url: `/lmk/store/coupon/${storeCoupRef}`,
|
method: Method.GET,
|
needToken: true,
|
});
|
}
|
|
/**
|
* 领取店铺优惠券
|
* @param {string|number} storeCoupRef - 店铺优惠券关联ID
|
* @returns {Promise} 返回领取结果
|
*/
|
export function claimStoreCoupon(storeCoupRef) {
|
return http.request({
|
url: `/lmk/store/coupon/${storeCoupRef}`,
|
method: Method.POST,
|
needToken: true,
|
});
|
}
|
/**
|
* 根据店铺优惠券关联ID获取优惠券详情
|
* @param {string|number} storeCoupRef - 店铺优惠券关联ID
|
* @returns {Promise} 返回优惠券详情
|
*/
|
export function getStorePrize(storeCoupRef) {
|
return http.request({
|
url: `/lmk/store/prize/${storeCoupRef}`,
|
method: Method.GET,
|
needToken: true,
|
});
|
}
|
|
/**
|
* 领取店铺优惠券
|
* @param {string|number} storeCoupRef - 店铺优惠券关联ID
|
* @returns {Promise} 返回领取结果
|
*/
|
export function claimPrize(storeCoupRef) {
|
return http.request({
|
url: `/lmk/store/prize/${storeCoupRef}`,
|
method: Method.POST,
|
needToken: true,
|
});
|
}
|