import VueCookies from 'vue-cookies'
function getHost() {
  var hostname = ''
  if (window.location.hostname.indexOf('m.') !== -1) {
    hostname = window.location.hostname.replace('m.', '.')
  }
  return hostname
}
const COOKIE_URL = process.env.NODE_ENV == 'development' ? '' : getHost();
export function getCookie(key) {
  return VueCookies.get(key)
}

export function setCookie(key, val) {
  VueCookies.set(key, val, '365d', '/', COOKIE_URL)
}

export function removeCookie(key) {
  VueCookies.remove(key, '/', COOKIE_URL)
}