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/
本文版权归作者和博客园共有,欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文连接,否则保留追究法律责任的权利,谢谢您的配合。
Freedom is not let you do whatever you wanna but teach you not to do the things that you donnot wanna do.

浙公网安备 33010602011771号