/*
 * @Date: 2025-11-12
 * @Description: 职业推荐相关接口
 */
import request from '@/utilsRc/request'

function createFormData(payload = {}) {
  if (typeof FormData !== 'undefined') {
    const formData = new FormData()
    Object.keys(payload).forEach(key => {
      const value = payload[key]
      if (value !== undefined && value !== null && value !== '') {
        formData.append(key, value)
      }
    })
    return formData
  }
  return payload
}

export function recommendJob(data) {
  const params = {};
  if (data?.jobName !== undefined && data?.jobName !== null && data?.jobName !== '') {
    params.jobName = String(data.jobName);
  }

  return request({
    url: '/job/recommendJobByJobName',
    method: 'get',
    params: params,
    baseUrlType: 'zytp'
  })
}
