代码提交
This commit is contained in:
29
api/coupon.js
Normal file
29
api/coupon.js
Normal file
@ -0,0 +1,29 @@
|
||||
import api from './api'
|
||||
|
||||
/**
|
||||
* 获取优惠券列表
|
||||
* @param data
|
||||
* @returns {*}
|
||||
*/
|
||||
export const getCouponList = (type) => api.get(`/product/coupon/relation/searchUserCoupon/${type}`, {}, {login: false})
|
||||
|
||||
/**
|
||||
* 领取优惠券
|
||||
* @param data
|
||||
* @returns {*}
|
||||
*/
|
||||
export const receiveACoupon = (id) => api.get(`/product/coupon/relation/receive/${id}`, {}, {login: false})
|
||||
|
||||
/**
|
||||
* 查询当前商品优惠券
|
||||
* @param data
|
||||
* @returns {*}
|
||||
*/
|
||||
export const getProductCoupon = (productId) => api.get(`/product/coupon/receive-list/${productId}`, {}, {login: false})
|
||||
|
||||
/**
|
||||
* 查询当前提交订单商品优惠券
|
||||
* @param data
|
||||
* @returns {*}
|
||||
*/
|
||||
export const getCartCoupon = (productId) => api.get(`/cart/coupon/?cartIds=${productId}`, {}, {login: false})
|
Reference in New Issue
Block a user