| 551 | } |
| 552 | // 参数 与其他脚本逻辑一致 |
| 553 | function parseQueryString(url) { |
| 554 | const queryString = url.split('?')[1] // 获取查询字符串部分 |
| 555 | const regex = /([^=&]+)=([^&]*)/g // 匹配键值对的正则表达式 |
| 556 | const params = {} |
| 557 | let match |
| 558 | |
| 559 | while ((match = regex.exec(queryString))) { |
| 560 | const key = decodeURIComponent(match[1]) // 解码键 |
| 561 | const value = decodeURIComponent(match[2]) // 解码值 |
| 562 | params[key] = value // 将键值对添加到对象中 |
| 563 | } |
| 564 | |
| 565 | return params |
| 566 | } |
| 567 | // 是否为真 与其他脚本逻辑一致 |
| 568 | function istrue(str) { |
| 569 | if (str == true || str == 1 || str == 'true' || str == '1') { |