import { request } from 'umi';

export function GetactivityInfo(data) {
  return request(`/kitchen/api/activity-info/activity-info`, {
    method: 'post',
    data: data,
  });
}

export function AddActivityInfo(data) {
  return request(`/kitchen/api/activity-info`, {
    method: 'post',
    data: data,
  });
}
export async function GetCosRequestURL(data) {
  return request(`/kitchen/api/systemconfig/GetCosRequestSignURL`, {
   method: 'POST',
   data: data,
 });
}


export function UpdateActivityInfo(data) {
  return request(`/kitchen/api/activity-info`, {
    method: 'put',
    data: data,
  });
}

export function DelActivityInfo(data) {
  return request(`/kitchen/api/activity-info/batch-del-activity-info`, {
    method: 'post',
    data: data,
  });
}

export function GetActivityConfiguration(data) {
  return request(`/kitchen/api/activity-info/activity-configuration/${data}`, {
    method: 'get',
  });
}

//添加活动配置
export function AddactivityConfiguration(data) {
  return request(`/kitchen/api/activity-info/addactivity-configuration`, {
    method: 'Post',
    data: data,
  });
}

//修改活动状态
export function UpdateActivityAllState(data) {
  return request(`/kitchen/api/activity-info/activity-all-state`, {
    method: 'put',
    data: data,
  });
}

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

//获取活动优惠券的配置
export function GetCanUseCoupon(data) {
  return request(`/kitchen/api/activity-info/activity-reward-list/${data}`, {
    method: 'get',
  });
}

//获取商品信息
export function GetGoodsInfo() {
  return request(`/kitchen/api/activity-info/goods-info`, {
    method: 'get',
  });
}


/** 获取商品类型   GET /kitchen/api/rule */
export async function goodsType(data) {
  return request(`/kitchen/api/goods-type/goods-types`, {
    method: 'POST',
    data: data,
    // params: { ...params },
    // ...(options || {}),
  });
}

//获取店铺信息
export async function GetStoreInfos(data) {
  return request(`/kitchen/api/printer/store-infos`, {
    method: 'Post',
    data: data,
  });
}
