Loading... ```js Vue.prototype.$url = function () { var url = decodeURIComponent(location.search) // 获取url中"?"符后的字串 var theRequest = {} if (url.indexOf('?') !== -1) { var str = url.substr(1) var strs = str.split('&') for (var i = 0; i < strs.length; i++) { theRequest[strs[i].split('=')[0]] = unescape(strs[i].split('=')[1]) } } return theRequest } ``` 最后修改:2021 年 09 月 03 日 © 允许规范转载 打赏 赞赏作者 微信 赞 1 如果觉得我的文章对你有用,请随意赞赏