//获取url中的参数集合 getUrlParams(){ //获取到Url并且解析Url编码 var url = decodeURI(window.location.href); var theRequest = new Object(); 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; },