说明
encodeURIComponent
Encodes all non-alphanumeric characters, including : / ? & =
Used to encode parts of a URL (such as query-parameter values) so the overall structure is not broken.
encodeURI
Keeps URL-significant characters unencoded, such as : / ? & =
Used to encode an entire URL while keeping it syntactically valid.