SOURCE

let url = 'https://uatqw-vfc.veredholdings.com:9443/uatxcd/report/report.json?UUSER20201215153820000138%7CLurSwixUpoK1ziWy%7C1635993086606%7Chome%7Cpages%2Fmine%2Fmine%7Cclick%7Cdf001%7C%E8%BF%98%E6%AC%BE%E8%AE%B0%E5%BD%95'
let domain = (url || '').split('/')[2]
console.log(domain)
  function getDomain (domain = '') {
    if (!domain) return []

    // 获取 cookie 作用域范围列表
    domain = domain.replace(/^\.+/ig, '')
    let scopes = domain.split('.').map(k => ['.', domain.slice(domain.indexOf(k))].join(''))

    return [domain].concat(scopes)
  }
  console.log(getDomain(domain))
console 命令行工具 X clear

                    
>
console