import http from './http.js'
const request=http.request


/**
 * 获取优惠券列表
 * @returns
 */
export function getTbShopCoupon(data) {
    return request({
        url: `/api/tbShopCoupon`,
        method: 'get',
        params: {
			shopId: uni.getStorageSync('shopId'),
			...data
        }
    })
}

/**
 * 获取优惠券详情
 * @returns
 */
export function getTbShopCouponInfo(id) {
    return request({
        url: `/api/tbShopCoupon/${id}`,
        method: 'get',
        params: {
        }
    })
}

/**
 * 增加优惠券
 * @returns
 */
export function addTbShopCoupon(data) {
    return request({
        url: `/api/tbShopCoupon`,
        method: 'post',
        params: {
			shopId: uni.getStorageSync('shopId'),
			...data
        }
    })
}

/**
 * 删除优惠券
 * @returns
 */
export function delTbShopCoupon(data) {
    return request({
        url: `/api/tbShopCoupon`,
        method: 'delete',
        params: data
    })
}
