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

const { request } = networkUtils;
const { api } = config;
const { basic, app, bpm } = api;

export async function logout(data) {
  return request({
    url: basic.userLogout,
    method: 'post',
    data,
  });
}

export async function getCaptcha() {
  return request({
    url: basic.captcha,
    method: 'get',
  });
}

export async function getPrincipal() {
  return request({
    url: basic.principal,
    method: 'get',
  });
}

export async function getTodoCnt() {
  return request({
    url: bpm.cnt,
    method: 'get',
  });
}

export async function getMenu() {
  return request({
    url: app.menu,
    method: 'get',
  });
}

// export async function getCodeMap() {
//   return request({
//     url: app.codeMap,
//     method: 'get',
//   });
// }
//
// export async function getSingleEmp(id) {
//   return request({
//     url: `${app.emp}/${id}`,
//     method: 'get',
//   });
// }

