import request from '../utils/request';

export function getCompanyMsg() {
  return request({
    url: '/baseCompany/query/companyInfo', // 获取企业详情
    method: 'get',
    params: {}
  });
}
export function setCompany(data) {
  return request({
    url: '/baseCompany/api/changeInfo', // 修改企业详情
    method: 'post',
    data
  });
}
// 获取系统常量，目前只用到了获取组织本币
export function getSystemConsts(params) {
  return request({
    url: '/parameterCompany/query/parameterTenant',
    params
  })
}
export function getLoginInfo() {
  return request({
    url: '/manager/query/currentManagerInfo', // 获取当前登录人信息
    method: 'get'
  });
}
export function sendMsg(data) {
  return request({
    url: '/veriCode/api/send', // 发送验证码
    method: 'post',
    data
  });
}
export function checkMsg(data) {
  return request({
    url: '/veriCode/api/check', // 检测验证码
    method: 'post',
    data
  });
}
export function findUsers(data) {
  return request({
    url: '/baseStaff/query/staffsByDept', // 获取部门下所有职员
    method: 'get',
    params: data,
  });
}
export function changeManager(data) {
  return request({
    url: '/manager/api/change', // 修改企业管理员
    method: 'post',
    data
  });
}
export function changePasswordByPwd(data) {
  return request({
    url: '/auth/api/changePassword', // 修改管理员密码
    method: 'post',
    data
  });
}
export function findCompanyVessels(data) {
  return request({
    url: '/baseVessel/query/companyVessels', // 获取船舶列表
    method: 'get',
    params: data
  });
}
export function removeShip(data) {
  return request({
    url: '/baseVessel/api/remove', // 删除船舶
    method: 'post',
    data
  });
}
export function addAndChangeShip(url, data) {
  return request({
    url, // 添加或修改船舶
    method: 'post',
    data
  });
}
