一、写一个获取函数 getUrlKey: function (name) { return decodeURIComponent((new RegExp('[?|&]' + name + '=' + '([^&;]+?)(&|#|;|$)').exec(location.href) || [, ""])[1].replace(/\+/g, '%20')) || null }, 二、调用 console.log("获取uuid:" + this.getUrlKey('uuid'));