Intercept parameters on address URL

Time:2022-5-6
getval(url, name) {
      var reg = new RegExp("(^|\\?|&)" + name + "=([^&|#]*)(\\s|&|#|$)", "i"); //  Because Vue has the feature of adding "#", the regular expression here will match & --&/#
      if (reg.test(url)) return unescape(RegExp.$2.replace(/\+/g, " "));
      return "";
    },