import { request } from 'umi';

export default {
    GetCosRequestURL(data) {
        return request(`/kitchen/api/systemconfig/GetCosRequestSignURL`, {
            method: 'POST',
            data: data,
        });
    },

    //获取优惠券
    GetCouponCanUseCountAndLimit(data) {
        return request(`/kitchen/api/coupon-helper/coupon-can-use-count-and-limit`, {
            method: 'get',
        });
    },

    /** 获取优惠卷状态或类型 */
    GetCouponStatusOrType(data) {
        return request(`/kitchen/api/coupon/getCouponStatusOrType`, {
            method: 'POST',
            data: data
        });
    },

    /** 新增优惠卷 POST  */
    Addcoupon(data) {
        return request('/kitchen/api/activity-info/fast-coupon', {
            method: 'POST',
            data: data
        });
    },

    //获取店铺
    GetStores(data) {
        return request('/kitchen/api/sysOrg/listbytype', {
            method: 'get',
            data: data,
        });
    },

    //获取商品类型
    GetGoodsType(data) {
        return request(`/kitchen/api/select/goodstype`, {
            method: 'get'
        });
    },

    //获取商品类型
    GetGoodsById(data) {
        return request(`/kitchen/api/select/goods/${data}`, {
            method: 'get'
        });
    },

    GetSelectedConfig(data) {
        return request(`/kitchen/api/select/selectedconfig/${data}`, {
            method: 'get'
        });
    },

    FastAddActivity(data) {
        return request('/kitchen/api/activity-info/fast-activity', {
            method: 'POST',
            data
        });
    }
}