import { request } from '@umijs/max';

export async function getCmsCardList(params?: API.ApplicationProducts.Params) {
  return request<API.ApplicationProducts.result>(`/api/cms/card/list`, {
    method: 'GET',
    params: params,
  });
}

export async function addCmsCardList(params?: API.ApplicationProducts.Params) {
  return request<API.ApplicationProducts.result>(`/api/cms/card`, {
    method: 'POST',
    data: params,
  });
}

export async function putCmsCardList(params?: API.ApplicationProducts.Params) {
  return request<API.ApplicationProducts.result>(`/api/cms/card`, {
    method: 'PUT',
    data: params,
  });
}

export async function delCmsCardList(ids?: string) {
  return request<API.ApplicationProducts.result>(`/api/cms/card/${ids}`, {
    method: 'DELETE',
  });
}
