import { http } from "@/utils/http";

/** 轮播图列表 */
export const getBannerList = (data?: object) => {
  return http.request<any>("post", "/banner/list", { data });
};

/** 新增轮播图 */
export const addBanner = (data: object) => {
  return http.request<any>("post", "/banner/add", { data });
};

/** 修改轮播图 */
export const modifyBanner = (data: object) => {
  return http.request<any>("post", "/banner/modify", { data });
};

/** 轮播图详情 */
export const getBannerDetail = (id: number) => {
  return http.request<any>("get", `/banner/${id}`);
};

/** 删除轮播图 */
export const removeBanner = (id: number) => {
  return http.request<any>("get", `/banner/delete/${id}`);
};
