import request from '@/utils/request'

// 管理员查询企业信息列表
export function listEntApi(query) {
  return request({
    url: '/admin/enterprise/list',
    method: 'get',
    params: query
  })
}
//删除企业信息
export function deleteEntApi(ids) {
  return request({
    url: `/admin/enterprise/${ids}`,
    method: 'delete'
  })
}
//获取企业详细信息
export function getEntInfoByIdApi(id,query) {
  return request({
    url: `/admin/enterprise/${id}`,
    method: 'get',
    params: query
  })
}
//审批
export function auditEntApi(data) {
  return request({
    url: `/admin/enterprise/auth`,
    method: 'post',
    data: data
  })
}
//重置密码
export function resetPwdApi(id,data) {
  return request({
    url: `/admin/enterprise/resetPwd/${id}`,
    method: 'put',
    data: data
  })
}
//提醒
export function remindUserApi(id, data) {
  return request({
    url: `/admin/enterprise/remind/${id}`,
    method: 'put',
    data: data
  })
}
//停用
export function stopEntUserApi(id, data) {
  return request({
    url: `/admin/enterprise/stop/${id}`,
    method: 'put',
    data: data
  })
}
//启用
export function enableEntUserApi(id, data) {
  return request({
    url: `/admin/enterprise/enable/${id}`,
    method: 'put',
    data: data
  })
}

//修改企业名称
export function updateEntInfoApi(data) {
  return request({
    url: `/admin/enterprise/update`,
    method: 'put',
    data: data
  })
}
//注册企业用户
export function registerEnterUserApi(data) {
  return request({
    url: `/admin/enterprise/save`,
    method: 'post',
    data: data
  })
}
export function updateServiceTimeApi(data) {
  return request({
    url: '/admin/enterprise/modifyServiceTime',
    method: 'put',
    data: data
  })
}