MCPcopy Index your code
hub / github.com/smallfawn/QLScriptPublic / getURLParams

Method getURLParams

ruilanCar.js:314–325  ·  view source on GitHub ↗
(url)

Source from the content-addressed store, hash-verified

312 }
313 //从url获取参数组成json
314 getURLParams(url) {
315 const params = {};
316 const queryString = url.split('?')[1];
317 if (queryString) {
318 const paramPairs = queryString.split('&');
319 paramPairs.forEach(pair => {
320 const [key, value] = pair.split('=');
321 params[key] = decodeURIComponent(value);
322 });
323 }
324 return params;
325 }
326 isJSONString(str) {
327 try {
328 var obj = JSON.parse(str);

Callers

nothing calls this directly

Calls 1

forEachMethod · 0.80

Tested by

no test coverage detected