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

enum Api {
  getcomponentlist = '/api/goview/project/getcomponentlist',
  getComponentData = '/api/goview/project/getComponentData',
  saveComponentData = '/api/goview/project/saveComponentData',
  deleteComponentData = '/api/goview/project/deleteComponentData',
}
export const getcomponentlist = (params) =>
  defHttp.get({ url: Api.getcomponentlist, params });

export const saveComponentData = (params) =>
  defHttp.post({ url: Api.saveComponentData, data:params });

export const deleteComponentData = (id:string) =>
  defHttp.post({ 
    url: `${Api.deleteComponentData}?ids=${id}`
});
