import axios from './axios'
export function uploadImg(file, params = {}) {
  const from = new FormData()
  from.append('file', file)
  const { url, ...otherParams } = params
  for (const key in otherParams) {
    from.append(key, otherParams[key])
  }
  return axios.post(url || 'platform/upload/fileUpload/images', from)
}