import request from '@/utils/request'

export function getCompanyMsg() {
  return request({
    url: '/manageCompany/query/getCompanyInfo', // 获取企业详情
    method: 'get',
    params: {}
  })
}
export function setCompany(data) {
  return request({
    url: '/manageCompany/api/changeInfo', // 修改企业详情
    method: 'post',
    data: data
  })
}
export function getLoginInfo() {
  return request({
    url: '/auth/query/getLoginInfo', // 获取当前登录人信息
    method: 'get'
  })
}
export function sendMsg(data) {
  return request({
    url: '/veriCode/api/send', // 发送验证码
    method: 'post',
    data: data
  })
}
export function checkMsg(data) {
  return request({
    url: '/veriCode/api/check', // 检测验证码
    method: 'post',
    data: data
  })
}
export function findUsers() {
  return request({
    url: '/user/query/findUsers', // 获取部门下所有职员
    method: 'get',
  })
}
export function changeManager(data) {
  return request({
    url: '/auth/api/changeManager', // 修改企业管理员
    method: 'post',
    data: data
  })
}
export function changePasswordByPwd(data) {
  return request({
    url: '/auth/api/changePassword', // 修改管理员密码
    method: 'post',
    data: data
  })
}
export function findCompanyVessels(data) {
  return request({
    url: '/vessel/query/findCompanyVessels', // 获取船舶列表
    method: 'get',
    params: data
  })
}
export function removeShip(data) {
  return request({
    url: '/vessel/api/remove', // 删除船舶
    method: 'post',
    data: data
  })
}
export function addAndChangeShip(url, data) {
  return request({
    url: url, // 添加或修改船舶
    method: 'post',
    data: data
  })
}

