对整段 URL 或查询参数做编码与解码,正确处理中文和 &、? 等特殊符号。
基于标准的 encodeURIComponent / decodeURIComponent,结果和浏览器一致。纯本地运行,无需联网。