help.js 251 B

12345678
  1. export function getQueryString(name) {
  2. let reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i")
  3. let r = window.location.search.substr(1).match(reg)
  4. if (r != null) {
  5. return window.decodeURIComponent(r[2])
  6. }
  7. return null
  8. }