获取 url的参数
http://127.0.0.1:5500/style.html?code=20180711%23abc
decodeURIComponent(URIstring) //URIstring 需要解析的地址,含有编码 URI 组件或其他要解码的文本。
var url = decodeURIComponent(location.search).substr(1).split('&')
var theRequest = new Object();
url.forEach(function (item) {
theRequest[item.split('=')[0]] = item.split('=')[1];
})