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.
Util.getUrlFragment
取到的是#
后面的部分,如果使用?
传递参数的话会报错。修改如下:
1、优化
getUrlFragment
判断,如果存在?
就截取掉2、新增
getUrlSearch
函数,以对象形式返回传递的所有参数,可通过$.router.$args.search
调用3、给
$.router
对象加上$args
属性,返回的是Util.toUrlObject(currentUrl)
的结果