import axios from '@/libs/axios.js';
// 确认领取优惠券
export const receivesCoupon = (params) => {
	return axios.request({
		url: `couponReceives/receivesCoupon`,
		method: 'post',
		data: params
	})
}

// 根据券码查询优惠券信息
export const couponData = (params) => {
	return axios.request({
		url: `coupon/findByCode/${params.couponCode}`,
		method: 'get'
	})
}

// 优惠券领取明细查询
export const couponListFind = (params) => {
	let url = `couponReceives/findPage/${params.pageNo}/${params.pageSize}`
	delete params.pageNo
	delete params.pageSize
	return axios.request({
		url: url,
		method: 'post',
		data: params
	})
}
// 订单可用优惠券查询
export const couponEnable = (params) => {
	return axios.request({
		url: 'couponReceives/findUsableCoupon',
		method: 'post',
		data: params
	})
}
