code: function setCookie (key, value, expires) {
    var domain = document.domain
    let date = new Date()
    date.setTime(Date.now() + expires)
    document.cookie = `${key}=${escape(value)};path=/;expires=${date.toGMTString()};domain=${domain};`
  }
docs: 设置 cookie
  
  @param {string} key cookie 的 key
  @param {string} value cookie 的 value
  @param {Date} expires cookie 的失效时间