import request from '@/config/axios'

// 获取推荐职位
export const getPromotedPosition = async (params) => {
  return await request.get({
    url: '/app-api/menduner/system/job/advertised/get/recommended',
    params
  })
}

// 获取最新发布的职位
export const getLatestPosition = async (params) => {
  return await request.get({
    url: '/app-api/menduner/system/job/advertised/get/latest',
    params
  })
}

// 获取急聘的职位
export const getUrgentPosition = async (params) => {
  return await request.get({
    url: '/app-api/menduner/system/job/advertised/get/urgent',
    params
  })
}

// 获取职位详情
export const getPositionDetails = async (params) => {
  return await request.get({
    url: '/app-api/menduner/system/job/advertised/get/detail',
    params
  })
}

// 职位详情-相似职位
export const getSimilarPosition = async (params) => {
  return await request.get({
    url: '/app-api/menduner/system/job/advertised/get/acquainted',
    params
  })
}

// 根据条件搜索招聘职位
export const getJobAdvertisedSearch = async (params) => {
  return await request.get({
    url: '/app-api/menduner/system/job/advertised/get/search',
    params
  })
}

// 效验求职者是否收藏该职位
export const getJobFavoriteCheck = async (params) => {
  return await request.get({
    url: '/app-api/menduner/system/person/job/favorite/check',
    params
  })
}

// 根据企业id统计职位类型的数量
export const getJobAdvertisedPositionCount = async (params) => {
  return await request.get({
    url: '/app-api/menduner/system/job/advertised/get/position/count',
    params
  })
}


// 根据企业id获取企业职位区域
export const getJobAreaByEnterpriseId = async (params) => {
  return await request.get({
    url: '/app-api/menduner/system/job/advertised/get/area/count',
    params
  })
}
