getCurrentPages 获取当前网页完整的URL

// 获取当前网页的完整 URL 地址:
        let pages = getCurrentPages()
        let targetURL = pages[pages.length - 1]
        let urlParams = ''
        for (let item in targetURL.options) {
          let itemStr = item + '=' + targetURL.options[item] + '&'
          urlParams += itemStr
        }
        let tempURL = targetURL.route + '?' + urlParams
        let finalURL = tempURL.slice(0, tempURL.length - 1)

  

原文地址:https://www.cnblogs.com/edwardwzw/p/13864112.html