PageSourceSearch

https://takungpao.com.hk/static/tkwwtemplate/js/utils/route.js

js takungpao.com.hk collected 2026-10-01 11:39:53 UTC 837 bytes, 23 lines download raw bytes

1class Route{
2  //获取路由传参,根据传入参数作为key值,返回value值
3  /*static getQueryString(name){
4    const reg = new RegExp('(^|&)' + name + '=([^&]*)(&|$)', 'i');
5    const search = window.location.search.split('?')[1] || '';
6    const r = search.match(reg) || [];
7    return r[2];
8  }*/
9  //获取路由传参,将参数转化为对象,返回该对象
10  static getQueryObject(){
11    var url = location.search //获取url中"?"符后的字串  <a href="tel:400-888-6633">拨打电话<a>
12    var routeQuery = {}
13    if (url.indexOf("?") != -1) {
14      var str = decodeURIComponent(url.substr(1))
15      var strs = str.split("&")
16      for (var i = 0; i < strs.length; i++) {
17        routeQuery[strs[i].split("=")[0]] = unescape(strs[i].split("=")[1])
18      }
19    }
20    return routeQuery
21  }
22}
23export default Route

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.