import { http } from '@/utils/http/axios';

/**
 * @description: 配置列表
 */
export function getConfigList(params?) {
  return http.request({
    url: '/config/page',
    method: 'GET',
    params,
  });
}
export function getConfigAllList(params?) {
  return http.request({
    url: '/config/list',
    method: 'GET',
    params,
  });
}
/**
 * @description: 根据ID获取详情
 */
export function getConfigDetail(id) {
  return http.request({
    url: '/config/detail/'+id,
    method: 'get',
  });
}
/**
 * @description: 添加配置
 */
export function configAdd(data:any) {
  return http.request({
    url: '/config/add',
    method: 'POST',
    data,
  });
}
/**
 * @description: 更新配置
 */
export function configUpdate(data:any) {
  return http.request({
    url: '/config/update',
    method: 'PUT',
    data
  });
}
/**
 * @description: 删除配置
 */
export function configDelete(id) {
  return http.request({
    url: '/config/delete/'+id,
    method: 'DELETE',
  });
}
/**
 * @description: 批量删除配置
 */
export function configBatchDelete(data:any) {
  return http.request({
    url: '/config/batchDelete',
    method: 'DELETE',
    data
  });
}