export default function () {
    let coArr = []
    let cookie = document.cookie
    let current
    cookie = cookie.split('; ')
    cookie.forEach(function (item, index) {
      coArr[index] = item.split('=')
    })
    current = coArr.filter(function (item, index) {
      return item[0] === 'user'
    })
    if (current.length) {
      return decodeURIComponent(current[0][1])
    } else {
      return ''
    }
  }