import { config, networkUtils } from '../../utils';

const {request} = networkUtils;
const {api} = config;
const {bid} = api;
const {groupDetail} = bid;

export async function getSingle(id: number) {
  return request({
    url: `${groupDetail}/${id}`,
    method: 'get',
  });
}

export async function create(params: object) {
  return request({
    url: `${groupDetail}/saveOrUpdate`,
    method: 'post',
    data: params,
  });
}

export async function getEmp(id: number) {
  return request({
    url: `${groupDetail}/emp/${id}`,
    method: 'get',
  })
}
