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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
如果我现在有一个地址
这个时候会不会造成意外loop呢?
个人建议交给路由守卫处理而不是选择带参数重定向
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
我试了下应该是不会有意外loop的,这里都是query下内的参数,除非原有在落地页做了特殊处理。
你们处理后的redirect本身也还是有参数的,只不过似乎router的机制,如果带参数的path和query不匹配,似乎会自动截断掉,例如/sale/custom/info?id=996他会重定向至/sale/custom/info,但是如果query带了,他似乎又是正常工作的....
这里还有一个考虑回调的情况,回调通常尾巴带有参数,这里如果参数不带过去的话,回调页处理起来似乎也比较麻烦一些?还要去判断一下redirectedFrom。