{"action":"created","issue":{"url":"https://api.github.com/repos/sdc-alibaba/SUI-Mobile/issues/547","repository_url":"https://api.github.com/repos/sdc-alibaba/SUI-Mobile","labels_url":"https://api.github.com/repos/sdc-alibaba/SUI-Mobile/issues/547/labels{/name}","comments_url":"https://api.github.com/repos/sdc-alibaba/SUI-Mobile/issues/547/comments","events_url":"https://api.github.com/repos/sdc-alibaba/SUI-Mobile/issues/547/events","html_url":"https://github.com/sdc-alibaba/SUI-Mobile/pull/547","id":144490133,"number":547,"title":"让路由支持传参","user":{"login":"maicong","id":6924891,"avatar_url":"https://avatars.githubusercontent.com/u/6924891?v=3","gravatar_id":"","url":"https://api.github.com/users/maicong","html_url":"https://github.com/maicong","followers_url":"https://api.github.com/users/maicong/followers","following_url":"https://api.github.com/users/maicong/following{/other_user}","gists_url":"https://api.github.com/users/maicong/gists{/gist_id}","starred_url":"https://api.github.com/users/maicong/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maicong/subscriptions","organizations_url":"https://api.github.com/users/maicong/orgs","repos_url":"https://api.github.com/users/maicong/repos","events_url":"https://api.github.com/users/maicong/events{/privacy}","received_events_url":"https://api.github.com/users/maicong/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"liunian","id":646129,"avatar_url":"https://avatars.githubusercontent.com/u/646129?v=3","gravatar_id":"","url":"https://api.github.com/users/liunian","html_url":"https://github.com/liunian","followers_url":"https://api.github.com/users/liunian/followers","following_url":"https://api.github.com/users/liunian/following{/other_user}","gists_url":"https://api.github.com/users/liunian/gists{/gist_id}","starred_url":"https://api.github.com/users/liunian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/liunian/subscriptions","organizations_url":"https://api.github.com/users/liunian/orgs","repos_url":"https://api.github.com/users/liunian/repos","events_url":"https://api.github.com/users/liunian/events{/privacy}","received_events_url":"https://api.github.com/users/liunian/received_events","type":"User","site_admin":false},"milestone":null,"comments":1,"created_at":"2016-03-30T07:41:25Z","updated_at":"2016-04-12T07:47:48Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/sdc-alibaba/SUI-Mobile/pulls/547","html_url":"https://github.com/sdc-alibaba/SUI-Mobile/pull/547","diff_url":"https://github.com/sdc-alibaba/SUI-Mobile/pull/547.diff","patch_url":"https://github.com/sdc-alibaba/SUI-Mobile/pull/547.patch"},"body":"`Util.getUrlFragment` 取到的是 `#` 后面的部分，如果使用 `?` 传递参数的话会报错。\r\n\r\n修改如下：\r\n1、优化 `getUrlFragment` 判断，如果存在 `?` 就截取掉\r\n2、新增 `getUrlSearch` 函数，以对象形式返回传递的所有参数，可通过 `$.router.$args.search` 调用\r\n3、给 `$.router` 对象加上 `$args` 属性，返回的是 `Util.toUrlObject(currentUrl)` 的结果"},"comment":{"url":"https://api.github.com/repos/sdc-alibaba/SUI-Mobile/issues/comments/208761997","html_url":"https://github.com/sdc-alibaba/SUI-Mobile/pull/547#issuecomment-208761997","issue_url":"https://api.github.com/repos/sdc-alibaba/SUI-Mobile/issues/547","id":208761997,"user":{"login":"liunian","id":646129,"avatar_url":"https://avatars.githubusercontent.com/u/646129?v=3","gravatar_id":"","url":"https://api.github.com/users/liunian","html_url":"https://github.com/liunian","followers_url":"https://api.github.com/users/liunian/followers","following_url":"https://api.github.com/users/liunian/following{/other_user}","gists_url":"https://api.github.com/users/liunian/gists{/gist_id}","starred_url":"https://api.github.com/users/liunian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/liunian/subscriptions","organizations_url":"https://api.github.com/users/liunian/orgs","repos_url":"https://api.github.com/users/liunian/repos","events_url":"https://api.github.com/users/liunian/events{/privacy}","received_events_url":"https://api.github.com/users/liunian/received_events","type":"User","site_admin":false},"created_at":"2016-04-12T07:47:48Z","updated_at":"2016-04-12T07:47:48Z","body":"`3` 直接保存在 `$.router` 中会又问题，这样只是初始化时候的值，但切换到别的页面时不会变更。\r\n\r\n更想了解下的是，路由参数是具体是需要配合怎样的使用场景呢？使用的时候是希望如何使用呢？不知道使用常规 url 的查询参数（`path?a=b&c=d#hash`）是否可以满足需求呢？"}}