绿满眶商城微信小程序-uniapp
peng
1 天以前 2a0d988b1439a9e2d3604350fa14034191f50140
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
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,
  });
}