{"action":"created","comment":{"url":"https://api.github.com/repos/ecomfe/ub-ria/pulls/comments/22919145","id":22919145,"diff_hunk":"@@ -106,6 +89,28 @@ define(\n         };\n \n         /**\n+         * 判断静态搜索相关的字段是否变化\n+         * \n+         * @public\n+         * @method mvc.StaticListData#checkStaticKeyChanged\n+         * @param  {Object} query 搜索参数\n+         * @return {boolean}\n+         */\n+        exports.checkStaticKeyChanged = function (query) {\n+            return u.some(\n+                ['order', 'orderBy', 'pageNo', 'pageSize'],\n+                function (key) {\n+                    if (this[key] !== query[key]) {\n+                        this[key] = query[key];\n+                        return true;\n+                    }\n+                    return false;\n+                },\n+                this\n+            );\n+        };\n+\n+        /**","path":"src/mvc/StaticListData.js","position":78,"original_position":69,"commit_id":"11b40b95843534e5b9ff9a79e975f4140385a22d","original_commit_id":"de19d13178ca65af86abce2797b4462d72cae20b","user":{"login":"otakustay","id":639549,"avatar_url":"https://avatars.githubusercontent.com/u/639549?v=3","gravatar_id":"","url":"https://api.github.com/users/otakustay","html_url":"https://github.com/otakustay","followers_url":"https://api.github.com/users/otakustay/followers","following_url":"https://api.github.com/users/otakustay/following{/other_user}","gists_url":"https://api.github.com/users/otakustay/gists{/gist_id}","starred_url":"https://api.github.com/users/otakustay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/otakustay/subscriptions","organizations_url":"https://api.github.com/users/otakustay/orgs","repos_url":"https://api.github.com/users/otakustay/repos","events_url":"https://api.github.com/users/otakustay/events{/privacy}","received_events_url":"https://api.github.com/users/otakustay/received_events","type":"User","site_admin":false},"body":"`u.extend(this, u.pick(query, [...]))`就好了嘛……\r\n\r\n另外那个数组做成个常量更漂亮，这样就是`u.extend(this, u.pick(query, STATIC_KEYS))`了","created_at":"2015-01-14T06:47:31Z","updated_at":"2015-01-14T06:47:31Z","html_url":"https://github.com/ecomfe/ub-ria/pull/154#discussion_r22919145","pull_request_url":"https://api.github.com/repos/ecomfe/ub-ria/pulls/154","_links":{"self":{"href":"https://api.github.com/repos/ecomfe/ub-ria/pulls/comments/22919145"},"html":{"href":"https://github.com/ecomfe/ub-ria/pull/154#discussion_r22919145"},"pull_request":{"href":"https://api.github.com/repos/ecomfe/ub-ria/pulls/154"}}},"pull_request":{"url":"https://api.github.com/repos/ecomfe/ub-ria/pulls/154","id":27329458,"html_url":"https://github.com/ecomfe/ub-ria/pull/154","diff_url":"https://github.com/ecomfe/ub-ria/pull/154.diff","patch_url":"https://github.com/ecomfe/ub-ria/pull/154.patch","issue_url":"https://api.github.com/repos/ecomfe/ub-ria/issues/154","number":154,"state":"open","locked":false,"title":"StaticListData改为通过判断关键字段是否变化确定数据取向","user":{"login":"DDDBear","id":1559953,"avatar_url":"https://avatars.githubusercontent.com/u/1559953?v=3","gravatar_id":"","url":"https://api.github.com/users/DDDBear","html_url":"https://github.com/DDDBear","followers_url":"https://api.github.com/users/DDDBear/followers","following_url":"https://api.github.com/users/DDDBear/following{/other_user}","gists_url":"https://api.github.com/users/DDDBear/gists{/gist_id}","starred_url":"https://api.github.com/users/DDDBear/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DDDBear/subscriptions","organizations_url":"https://api.github.com/users/DDDBear/orgs","repos_url":"https://api.github.com/users/DDDBear/repos","events_url":"https://api.github.com/users/DDDBear/events{/privacy}","received_events_url":"https://api.github.com/users/DDDBear/received_events","type":"User","site_admin":false},"body":"StaticListData改为通过判断关键字段是否变化确定数据取向","created_at":"2015-01-14T06:27:49Z","updated_at":"2015-01-14T06:47:31Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f2291d5f26fa161113ebcd5f3173045367704269","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/ecomfe/ub-ria/pulls/154/commits","review_comments_url":"https://api.github.com/repos/ecomfe/ub-ria/pulls/154/comments","review_comment_url":"https://api.github.com/repos/ecomfe/ub-ria/pulls/comments/{number}","comments_url":"https://api.github.com/repos/ecomfe/ub-ria/issues/154/comments","statuses_url":"https://api.github.com/repos/ecomfe/ub-ria/statuses/11b40b95843534e5b9ff9a79e975f4140385a22d","head":{"label":"DDDBear:master","ref":"master","sha":"11b40b95843534e5b9ff9a79e975f4140385a22d","user":{"login":"DDDBear","id":1559953,"avatar_url":"https://avatars.githubusercontent.com/u/1559953?v=3","gravatar_id":"","url":"https://api.github.com/users/DDDBear","html_url":"https://github.com/DDDBear","followers_url":"https://api.github.com/users/DDDBear/followers","following_url":"https://api.github.com/users/DDDBear/following{/other_user}","gists_url":"https://api.github.com/users/DDDBear/gists{/gist_id}","starred_url":"https://api.github.com/users/DDDBear/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DDDBear/subscriptions","organizations_url":"https://api.github.com/users/DDDBear/orgs","repos_url":"https://api.github.com/users/DDDBear/repos","events_url":"https://api.github.com/users/DDDBear/events{/privacy}","received_events_url":"https://api.github.com/users/DDDBear/received_events","type":"User","site_admin":false},"repo":{"id":29183714,"name":"ub-ria","full_name":"DDDBear/ub-ria","owner":{"login":"DDDBear","id":1559953,"avatar_url":"https://avatars.githubusercontent.com/u/1559953?v=3","gravatar_id":"","url":"https://api.github.com/users/DDDBear","html_url":"https://github.com/DDDBear","followers_url":"https://api.github.com/users/DDDBear/followers","following_url":"https://api.github.com/users/DDDBear/following{/other_user}","gists_url":"https://api.github.com/users/DDDBear/gists{/gist_id}","starred_url":"https://api.github.com/users/DDDBear/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DDDBear/subscriptions","organizations_url":"https://api.github.com/users/DDDBear/orgs","repos_url":"https://api.github.com/users/DDDBear/repos","events_url":"https://api.github.com/users/DDDBear/events{/privacy}","received_events_url":"https://api.github.com/users/DDDBear/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/DDDBear/ub-ria","description":"RIA base for union business","fork":true,"url":"https://api.github.com/repos/DDDBear/ub-ria","forks_url":"https://api.github.com/repos/DDDBear/ub-ria/forks","keys_url":"https://api.github.com/repos/DDDBear/ub-ria/keys{/key_id}","collaborators_url":"https://api.github.com/repos/DDDBear/ub-ria/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/DDDBear/ub-ria/teams","hooks_url":"https://api.github.com/repos/DDDBear/ub-ria/hooks","issue_events_url":"https://api.github.com/repos/DDDBear/ub-ria/issues/events{/number}","events_url":"https://api.github.com/repos/DDDBear/ub-ria/events","assignees_url":"https://api.github.com/repos/DDDBear/ub-ria/assignees{/user}","branches_url":"https://api.github.com/repos/DDDBear/ub-ria/branches{/branch}","tags_url":"https://api.github.com/repos/DDDBear/ub-ria/tags","blobs_url":"https://api.github.com/repos/DDDBear/ub-ria/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/DDDBear/ub-ria/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/DDDBear/ub-ria/git/refs{/sha}","trees_url":"https://api.github.com/repos/DDDBear/ub-ria/git/trees{/sha}","statuses_url":"https://api.github.com/repos/DDDBear/ub-ria/statuses/{sha}","languages_url":"https://api.github.com/repos/DDDBear/ub-ria/languages","stargazers_url":"https://api.github.com/repos/DDDBear/ub-ria/stargazers","contributors_url":"https://api.github.com/repos/DDDBear/ub-ria/contributors","subscribers_url":"https://api.github.com/repos/DDDBear/ub-ria/subscribers","subscription_url":"https://api.github.com/repos/DDDBear/ub-ria/subscription","commits_url":"https://api.github.com/repos/DDDBear/ub-ria/commits{/sha}","git_commits_url":"https://api.github.com/repos/DDDBear/ub-ria/git/commits{/sha}","comments_url":"https://api.github.com/repos/DDDBear/ub-ria/comments{/number}","issue_comment_url":"https://api.github.com/repos/DDDBear/ub-ria/issues/comments/{number}","contents_url":"https://api.github.com/repos/DDDBear/ub-ria/contents/{+path}","compare_url":"https://api.github.com/repos/DDDBear/ub-ria/compare/{base}...{head}","merges_url":"https://api.github.com/repos/DDDBear/ub-ria/merges","archive_url":"https://api.github.com/repos/DDDBear/ub-ria/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/DDDBear/ub-ria/downloads","issues_url":"https://api.github.com/repos/DDDBear/ub-ria/issues{/number}","pulls_url":"https://api.github.com/repos/DDDBear/ub-ria/pulls{/number}","milestones_url":"https://api.github.com/repos/DDDBear/ub-ria/milestones{/number}","notifications_url":"https://api.github.com/repos/DDDBear/ub-ria/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/DDDBear/ub-ria/labels{/name}","releases_url":"https://api.github.com/repos/DDDBear/ub-ria/releases{/id}","created_at":"2015-01-13T09:57:18Z","updated_at":"2015-01-14T06:44:52Z","pushed_at":"2015-01-14T06:44:52Z","git_url":"git://github.com/DDDBear/ub-ria.git","ssh_url":"git@github.com:DDDBear/ub-ria.git","clone_url":"https://github.com/DDDBear/ub-ria.git","svn_url":"https://github.com/DDDBear/ub-ria","homepage":null,"size":2013,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"ecomfe:master","ref":"master","sha":"7003d075ee8aff7cb0ddfd79c51c92c7434984e1","user":{"login":"ecomfe","id":2268460,"avatar_url":"https://avatars.githubusercontent.com/u/2268460?v=3","gravatar_id":"","url":"https://api.github.com/users/ecomfe","html_url":"https://github.com/ecomfe","followers_url":"https://api.github.com/users/ecomfe/followers","following_url":"https://api.github.com/users/ecomfe/following{/other_user}","gists_url":"https://api.github.com/users/ecomfe/gists{/gist_id}","starred_url":"https://api.github.com/users/ecomfe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ecomfe/subscriptions","organizations_url":"https://api.github.com/users/ecomfe/orgs","repos_url":"https://api.github.com/users/ecomfe/repos","events_url":"https://api.github.com/users/ecomfe/events{/privacy}","received_events_url":"https://api.github.com/users/ecomfe/received_events","type":"Organization","site_admin":false},"repo":{"id":15821257,"name":"ub-ria","full_name":"ecomfe/ub-ria","owner":{"login":"ecomfe","id":2268460,"avatar_url":"https://avatars.githubusercontent.com/u/2268460?v=3","gravatar_id":"","url":"https://api.github.com/users/ecomfe","html_url":"https://github.com/ecomfe","followers_url":"https://api.github.com/users/ecomfe/followers","following_url":"https://api.github.com/users/ecomfe/following{/other_user}","gists_url":"https://api.github.com/users/ecomfe/gists{/gist_id}","starred_url":"https://api.github.com/users/ecomfe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ecomfe/subscriptions","organizations_url":"https://api.github.com/users/ecomfe/orgs","repos_url":"https://api.github.com/users/ecomfe/repos","events_url":"https://api.github.com/users/ecomfe/events{/privacy}","received_events_url":"https://api.github.com/users/ecomfe/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ecomfe/ub-ria","description":"RIA base for union business","fork":false,"url":"https://api.github.com/repos/ecomfe/ub-ria","forks_url":"https://api.github.com/repos/ecomfe/ub-ria/forks","keys_url":"https://api.github.com/repos/ecomfe/ub-ria/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ecomfe/ub-ria/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ecomfe/ub-ria/teams","hooks_url":"https://api.github.com/repos/ecomfe/ub-ria/hooks","issue_events_url":"https://api.github.com/repos/ecomfe/ub-ria/issues/events{/number}","events_url":"https://api.github.com/repos/ecomfe/ub-ria/events","assignees_url":"https://api.github.com/repos/ecomfe/ub-ria/assignees{/user}","branches_url":"https://api.github.com/repos/ecomfe/ub-ria/branches{/branch}","tags_url":"https://api.github.com/repos/ecomfe/ub-ria/tags","blobs_url":"https://api.github.com/repos/ecomfe/ub-ria/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ecomfe/ub-ria/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ecomfe/ub-ria/git/refs{/sha}","trees_url":"https://api.github.com/repos/ecomfe/ub-ria/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ecomfe/ub-ria/statuses/{sha}","languages_url":"https://api.github.com/repos/ecomfe/ub-ria/languages","stargazers_url":"https://api.github.com/repos/ecomfe/ub-ria/stargazers","contributors_url":"https://api.github.com/repos/ecomfe/ub-ria/contributors","subscribers_url":"https://api.github.com/repos/ecomfe/ub-ria/subscribers","subscription_url":"https://api.github.com/repos/ecomfe/ub-ria/subscription","commits_url":"https://api.github.com/repos/ecomfe/ub-ria/commits{/sha}","git_commits_url":"https://api.github.com/repos/ecomfe/ub-ria/git/commits{/sha}","comments_url":"https://api.github.com/repos/ecomfe/ub-ria/comments{/number}","issue_comment_url":"https://api.github.com/repos/ecomfe/ub-ria/issues/comments/{number}","contents_url":"https://api.github.com/repos/ecomfe/ub-ria/contents/{+path}","compare_url":"https://api.github.com/repos/ecomfe/ub-ria/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ecomfe/ub-ria/merges","archive_url":"https://api.github.com/repos/ecomfe/ub-ria/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ecomfe/ub-ria/downloads","issues_url":"https://api.github.com/repos/ecomfe/ub-ria/issues{/number}","pulls_url":"https://api.github.com/repos/ecomfe/ub-ria/pulls{/number}","milestones_url":"https://api.github.com/repos/ecomfe/ub-ria/milestones{/number}","notifications_url":"https://api.github.com/repos/ecomfe/ub-ria/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ecomfe/ub-ria/labels{/name}","releases_url":"https://api.github.com/repos/ecomfe/ub-ria/releases{/id}","created_at":"2014-01-11T11:15:10Z","updated_at":"2015-01-13T10:04:02Z","pushed_at":"2015-01-13T10:04:02Z","git_url":"git://github.com/ecomfe/ub-ria.git","ssh_url":"git@github.com:ecomfe/ub-ria.git","clone_url":"https://github.com/ecomfe/ub-ria.git","svn_url":"https://github.com/ecomfe/ub-ria","homepage":null,"size":2013,"stargazers_count":12,"watchers_count":12,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":13,"mirror_url":null,"open_issues_count":8,"forks":13,"open_issues":8,"watchers":12,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ecomfe/ub-ria/pulls/154"},"html":{"href":"https://github.com/ecomfe/ub-ria/pull/154"},"issue":{"href":"https://api.github.com/repos/ecomfe/ub-ria/issues/154"},"comments":{"href":"https://api.github.com/repos/ecomfe/ub-ria/issues/154/comments"},"review_comments":{"href":"https://api.github.com/repos/ecomfe/ub-ria/pulls/154/comments"},"review_comment":{"href":"https://api.github.com/repos/ecomfe/ub-ria/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/ecomfe/ub-ria/pulls/154/commits"},"statuses":{"href":"https://api.github.com/repos/ecomfe/ub-ria/statuses/11b40b95843534e5b9ff9a79e975f4140385a22d"}}}}