比如要获取code的值:http://xzsy.ldacc.com/?code=IYF4lQPEPrRy2Bqqgk&state=STATE#/
let me = this;
me.code = decodeURIComponent((new RegExp('[?|&]' + "code" + '=' + '([^&;]+?)(&|#|;|$)').exec(location
.href) || [, ""])[1].replace(/\+/g, '%20')) || null;
console.log(me.code);