import request from '@/utils/request'

// 获取字典
export const getTypeCode = ({ typeCode }) => (
  request({
    url: '/system/dict/data/type/' + typeCode,
    method: 'get',
    params: {

    }
  })
)

// 获取文件预览
export const getFilePerview = (params) => (
  request({
    url: 'file_storage_oss/preview/' + params.fileId,
    method: 'get',
    responseType: 'arraybuffer'
  })
)

export const getImagePerview = (params) => (
  request({
    url: 'file_storage_oss/preview/' + params.fileId,
    method: 'get'
  })
)

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