fix: revert path decoding in interfaces/redirectTo #12
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
问题
当前 cml.navigateTo API 会丢失参数,而使用 navigator 组件不会。
通常我们使用 webview 的时候会有自定义参数需要透传,像这样:
同时也可能会在需要回调中使用调用基础 API,像这样:
但如果在使用 cml 中则会丢失参数,因为它进行了一次多余的 decode:
框架问题非基础 API 问题
didi/chameleon#387 中反映的问题是框架的,不是基础 API,经测试:
onLoad(query)
不会 decode(官网还有特别备注使用说明)onLoad(query)
会自动 decode要解决它可以考虑在 cml 框架中解决,自动 decode 再注入参数(判断有必要的平台)。
额外想法