// @ts-ignore

/* eslint-disable */
import { request } from 'umi';

/** 获取广告列表  post /kitchen/api/rule */
export async function getAdvertisementList(data) {
  return request(`/kitchen/api/store-advertisement/advertisement-page`, {
    method: 'Post',
    data: data,
  });
}

/** 新建广告 POST /kitchen/api/rule */

export async function addAdvertisement(data) {
  // http://localhost:5000
  return request('/kitchen/api/store-advertisement/advertisement', {
    method: 'POST',
    // type:'json',
    data: data,
    // ...(options || {}),
  });
}
/** 修改广告 PUT /kitchen/api/rule */

export async function updateAdvertisement(data) {
  return request('/kitchen/api/store-advertisement/advertisement', {
    method: 'PUT',
    data: data,
  });
}

/** 批量删除广告 DELETE /kitchen/api/rule */

export async function removeAdvertisement(data) {
  return request(`/kitchen/api/store-advertisement/advertisement`, {
    method: 'DELETE',
    data: data,
    // ...(options || {}),
  });
}

/** 获取店铺  */
export async function GetStoreInfoPageAsync(data) {
  return request(`​/kitchen/api​/store-info​/store-info-page`, {
    method: 'POST',
    data: data,
    // params: { ...params },
    // ...(options || {}),
  });
}

/** 停用/启用  */
export async function updateAdvertisementStatus(data) {
  return request(`/kitchen/api/store-advertisement/advertisement-status`, {
    method: 'PUT',
    data: data,
    // params: { ...params },
    // ...(options || {}),
  });
}

/** 预览  */
export async function openHtml(data) {
  return request(`/kitchen/api/store-advertisement/open-html/`, {
    method: 'POST',
    data: data,
    // params: { ...params },
    // ...(options || {}),
  });
}

