import request from '@/utils/request';

// 装修模块标题配置接口
const baseUrl = '/system/decorationSection';

// 列表查询
export function listDecorationSection(params: any) {
  return request.get(baseUrl + '/list', { params });
}

// 详情
export function getDecorationSection(id: number) {
  return request.get(`${baseUrl}/${id}`);
}

// 根据模块类型查询
export function getDecorationSectionByType(sectionType: string) {
  return request.get(baseUrl + '/list', { params: { sectionType } });
}

// 新增
export function addDecorationSection(data: any) {
  return request.post(baseUrl, data);
}

// 修改
export function updateDecorationSection(data: any) {
  return request.put(baseUrl, data);
}

// 删除
export function delDecorationSection(id: number | string) {
  return request.delete(`${baseUrl}/${id}`);
}
