// 获取当前网页的完整 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)