import request from '@/utils/request'

// 获取字典
export const getTypeCode = ({ typeCode }) => (
  request({
    url: '/dictionary/do_findByParentCode',
    method: 'get',
    params: {
      parentCode: typeCode
    }
  })
)

// 获取文件预览
export const getFilePerview = (params) => (
  request({
    url: 'system/fileStorage/downloadPdfFile',
    method: 'get',
    params,
    responseType: 'arraybuffer'
  })
)

// 获取省市区
export const getRegion = (params) => (
  request({
    url: '/department/findAll',
    method: 'get',
    params
  })
)

// 统一社会信用代码获取人员信息
export const getCompanyInfoFormSocialCreditCode = (params) => (
  request({
    url: '/bocom/register/getBusinessByKeyWord',
    method: 'get',
    params
  })
)

// 根据关键字模糊查询企业企查查886
export function getEnterpriseInspectionInfo(params) {
  return request({
    url: '/supplierInfo/getBusinessByKeyWord',
    method: 'get',
    params
  })
}

// ocr识别身份证
export const getOcrCard = (params) => (
  request({
    url: '/zjxl/do_idCardOCR',
    method: 'get',
    params
  })
)
