Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(compiler-web): 解决路由跳转的时候 search 参数丢失问题 #221

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

williamyuanjw
Copy link

当我url里面的某个传参的值带有问号的时候 使用split('?') 会导致url被截断 丢失参数
如: www.123456.com?id=1&path=pages/index/index?a=1&expand=1
此处会导致跳转url变成 www.123456.com?id=1&path=pages/index/index
所以优化一下这里的逻辑

@aboyforwind
Copy link
Collaborator

url 里的 query 值应该被encode,出现?是不合法的

@williamyuanjw
Copy link
Author

url 里的 query 值应该被encode,出现?是不合法的

但是确实是直接拿原生支付宝小程序项目的代码直接过来做编译的 既然小程序能支持 这里为什么不做此优化呢?既然是一个面向大众的框架 怎么看都是兼容这种情况比不兼容要好吧 总不能每个用户都去改一遍自己的业务代码

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants