import { jsonp } from '@/utils/vue-jsonp'

const BASE_RUI = 'https://restapi.amap.com/v3'
const KEY = 'c6d2b16b34bcc45482a8790dc90fe8a9'

const request = options => {
  return jsonp(`${BASE_RUI}${options.url}`, {
    key: KEY,
    output: 'JSON',
    ...options.params
  })
}

export default request
