{"action":"created","comment":{"url":"https://api.github.com/repos/ant-design/ant-design-pro/pulls/comments/166160730","pull_request_review_id":94196973,"id":166160730,"diff_hunk":"@@ -0,0 +1,73 @@\n+import React, { PureComponent } from 'react';\n+import { connect } from 'dva';\n+import { Route, routerRedux } from 'dva/router';\n+import styles from './index.less';\n+import Userinfo from './Userinfo';\n+import SafeView from './SafeView';\n+import AccountView from './AccountView';\n+import MessageView from './MessageView';\n+\n+const meunArray = [\n+  { title: '基本设置', key: 'info' },\n+  { title: '安全设置', key: 'safe' },\n+  { title: '账号绑定', key: 'account' },\n+  { title: '新消息通知', key: 'message' },\n+];\n+\n+@connect(({ user }) => ({\n+  currentUser: user.currentUser,\n+}))\n+export default class BaseInfo extends PureComponent {\n+  state = {\n+    selectKey: this.props.match.params.page || 'info',\n+  };\n+  getMeun = () => {\n+    return meunArray.map((item) => {\n+      const { selectKey } = this.state;\n+      return (\n+        <div\n+          key={item.key}\n+          onClick={() => this.selectKey(item)}\n+          className={\n+            item.key === selectKey\n+              ? `${styles.meunItem} ${styles.select}`\n+              : styles.meunItem\n+          }\n+        >\n+          {item.title}\n+        </div>\n+      );\n+    });\n+  };\n+  getRightTitle = () => {\n+    const meunItem = meunArray.find(item => item.key === this.state.selectKey);\n+    return meunItem.title;\n+  };\n+  selectKey = ({ key }) => {\n+    this.props.dispatch(routerRedux.push(`/userinfo/base/${key}`));\n+    this.setState({\n+      selectKey: key,\n+    });\n+  };\n+  render() {\n+    const { currentUser } = this.props;\n+    if (!currentUser.userid) {\n+      return '';","path":"src/routes/Userinfo/index.js","position":55,"original_position":55,"commit_id":"ae5639ef593d062559e77ef7683c57358d0a48ac","original_commit_id":"ae5639ef593d062559e77ef7683c57358d0a48ac","user":{"login":"chenshuai2144","id":8186664,"avatar_url":"https://avatars0.githubusercontent.com/u/8186664?v=4","gravatar_id":"","url":"https://api.github.com/users/chenshuai2144","html_url":"https://github.com/chenshuai2144","followers_url":"https://api.github.com/users/chenshuai2144/followers","following_url":"https://api.github.com/users/chenshuai2144/following{/other_user}","gists_url":"https://api.github.com/users/chenshuai2144/gists{/gist_id}","starred_url":"https://api.github.com/users/chenshuai2144/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chenshuai2144/subscriptions","organizations_url":"https://api.github.com/users/chenshuai2144/orgs","repos_url":"https://api.github.com/users/chenshuai2144/repos","events_url":"https://api.github.com/users/chenshuai2144/events{/privacy}","received_events_url":"https://api.github.com/users/chenshuai2144/received_events","type":"User","site_admin":false},"body":"这个判断是判断一下进入界面的时候user加载成功了没有。\r\n加载也有个过程","created_at":"2018-02-06T01:00:17Z","updated_at":"2018-02-06T01:00:17Z","html_url":"https://github.com/ant-design/ant-design-pro/pull/880#discussion_r166160730","pull_request_url":"https://api.github.com/repos/ant-design/ant-design-pro/pulls/880","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/ant-design/ant-design-pro/pulls/comments/166160730"},"html":{"href":"https://github.com/ant-design/ant-design-pro/pull/880#discussion_r166160730"},"pull_request":{"href":"https://api.github.com/repos/ant-design/ant-design-pro/pulls/880"}},"in_reply_to_id":165994260},"pull_request":{"url":"https://api.github.com/repos/ant-design/ant-design-pro/pulls/880","id":166945645,"html_url":"https://github.com/ant-design/ant-design-pro/pull/880","diff_url":"https://github.com/ant-design/ant-design-pro/pull/880.diff","patch_url":"https://github.com/ant-design/ant-design-pro/pull/880.patch","issue_url":"https://api.github.com/repos/ant-design/ant-design-pro/issues/880","number":880,"state":"open","locked":false,"title":"features  add userinfo page","user":{"login":"chenshuai2144","id":8186664,"avatar_url":"https://avatars0.githubusercontent.com/u/8186664?v=4","gravatar_id":"","url":"https://api.github.com/users/chenshuai2144","html_url":"https://github.com/chenshuai2144","followers_url":"https://api.github.com/users/chenshuai2144/followers","following_url":"https://api.github.com/users/chenshuai2144/following{/other_user}","gists_url":"https://api.github.com/users/chenshuai2144/gists{/gist_id}","starred_url":"https://api.github.com/users/chenshuai2144/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chenshuai2144/subscriptions","organizations_url":"https://api.github.com/users/chenshuai2144/orgs","repos_url":"https://api.github.com/users/chenshuai2144/repos","events_url":"https://api.github.com/users/chenshuai2144/events{/privacy}","received_events_url":"https://api.github.com/users/chenshuai2144/received_events","type":"User","site_admin":false},"body":"#717 \r\n增加了个人中心界面\r\n实现了简单的功能。","created_at":"2018-02-03T04:18:21Z","updated_at":"2018-02-06T01:00:17Z","closed_at":null,"merged_at":null,"merge_commit_sha":"07b6fd83ed1ba5bf8567ba7d0d153fc72bdf0116","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"milestone":null,"commits_url":"https://api.github.com/repos/ant-design/ant-design-pro/pulls/880/commits","review_comments_url":"https://api.github.com/repos/ant-design/ant-design-pro/pulls/880/comments","review_comment_url":"https://api.github.com/repos/ant-design/ant-design-pro/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ant-design/ant-design-pro/issues/880/comments","statuses_url":"https://api.github.com/repos/ant-design/ant-design-pro/statuses/ae5639ef593d062559e77ef7683c57358d0a48ac","head":{"label":"ant-design:userinfo","ref":"userinfo","sha":"ae5639ef593d062559e77ef7683c57358d0a48ac","user":{"login":"ant-design","id":12101536,"avatar_url":"https://avatars3.githubusercontent.com/u/12101536?v=4","gravatar_id":"","url":"https://api.github.com/users/ant-design","html_url":"https://github.com/ant-design","followers_url":"https://api.github.com/users/ant-design/followers","following_url":"https://api.github.com/users/ant-design/following{/other_user}","gists_url":"https://api.github.com/users/ant-design/gists{/gist_id}","starred_url":"https://api.github.com/users/ant-design/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ant-design/subscriptions","organizations_url":"https://api.github.com/users/ant-design/orgs","repos_url":"https://api.github.com/users/ant-design/repos","events_url":"https://api.github.com/users/ant-design/events{/privacy}","received_events_url":"https://api.github.com/users/ant-design/received_events","type":"Organization","site_admin":false},"repo":{"id":101394335,"name":"ant-design-pro","full_name":"ant-design/ant-design-pro","owner":{"login":"ant-design","id":12101536,"avatar_url":"https://avatars3.githubusercontent.com/u/12101536?v=4","gravatar_id":"","url":"https://api.github.com/users/ant-design","html_url":"https://github.com/ant-design","followers_url":"https://api.github.com/users/ant-design/followers","following_url":"https://api.github.com/users/ant-design/following{/other_user}","gists_url":"https://api.github.com/users/ant-design/gists{/gist_id}","starred_url":"https://api.github.com/users/ant-design/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ant-design/subscriptions","organizations_url":"https://api.github.com/users/ant-design/orgs","repos_url":"https://api.github.com/users/ant-design/repos","events_url":"https://api.github.com/users/ant-design/events{/privacy}","received_events_url":"https://api.github.com/users/ant-design/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ant-design/ant-design-pro","description":"👨🏻‍💻👩🏻‍💻 An out-of-box UI solution for enterprise applications","fork":false,"url":"https://api.github.com/repos/ant-design/ant-design-pro","forks_url":"https://api.github.com/repos/ant-design/ant-design-pro/forks","keys_url":"https://api.github.com/repos/ant-design/ant-design-pro/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ant-design/ant-design-pro/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ant-design/ant-design-pro/teams","hooks_url":"https://api.github.com/repos/ant-design/ant-design-pro/hooks","issue_events_url":"https://api.github.com/repos/ant-design/ant-design-pro/issues/events{/number}","events_url":"https://api.github.com/repos/ant-design/ant-design-pro/events","assignees_url":"https://api.github.com/repos/ant-design/ant-design-pro/assignees{/user}","branches_url":"https://api.github.com/repos/ant-design/ant-design-pro/branches{/branch}","tags_url":"https://api.github.com/repos/ant-design/ant-design-pro/tags","blobs_url":"https://api.github.com/repos/ant-design/ant-design-pro/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ant-design/ant-design-pro/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ant-design/ant-design-pro/git/refs{/sha}","trees_url":"https://api.github.com/repos/ant-design/ant-design-pro/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ant-design/ant-design-pro/statuses/{sha}","languages_url":"https://api.github.com/repos/ant-design/ant-design-pro/languages","stargazers_url":"https://api.github.com/repos/ant-design/ant-design-pro/stargazers","contributors_url":"https://api.github.com/repos/ant-design/ant-design-pro/contributors","subscribers_url":"https://api.github.com/repos/ant-design/ant-design-pro/subscribers","subscription_url":"https://api.github.com/repos/ant-design/ant-design-pro/subscription","commits_url":"https://api.github.com/repos/ant-design/ant-design-pro/commits{/sha}","git_commits_url":"https://api.github.com/repos/ant-design/ant-design-pro/git/commits{/sha}","comments_url":"https://api.github.com/repos/ant-design/ant-design-pro/comments{/number}","issue_comment_url":"https://api.github.com/repos/ant-design/ant-design-pro/issues/comments{/number}","contents_url":"https://api.github.com/repos/ant-design/ant-design-pro/contents/{+path}","compare_url":"https://api.github.com/repos/ant-design/ant-design-pro/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ant-design/ant-design-pro/merges","archive_url":"https://api.github.com/repos/ant-design/ant-design-pro/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ant-design/ant-design-pro/downloads","issues_url":"https://api.github.com/repos/ant-design/ant-design-pro/issues{/number}","pulls_url":"https://api.github.com/repos/ant-design/ant-design-pro/pulls{/number}","milestones_url":"https://api.github.com/repos/ant-design/ant-design-pro/milestones{/number}","notifications_url":"https://api.github.com/repos/ant-design/ant-design-pro/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ant-design/ant-design-pro/labels{/name}","releases_url":"https://api.github.com/repos/ant-design/ant-design-pro/releases{/id}","deployments_url":"https://api.github.com/repos/ant-design/ant-design-pro/deployments","created_at":"2017-08-25T10:40:44Z","updated_at":"2018-02-06T00:31:30Z","pushed_at":"2018-02-06T00:58:16Z","git_url":"git://github.com/ant-design/ant-design-pro.git","ssh_url":"git@github.com:ant-design/ant-design-pro.git","clone_url":"https://github.com/ant-design/ant-design-pro.git","svn_url":"https://github.com/ant-design/ant-design-pro","homepage":"http://pro.ant.design/","size":19472,"stargazers_count":7210,"watchers_count":7210,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":1097,"mirror_url":null,"archived":false,"open_issues_count":47,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":1097,"open_issues":47,"watchers":7210,"default_branch":"master"}},"base":{"label":"ant-design:v2","ref":"v2","sha":"34f49bfdaf979fca54c478f116998dc895432938","user":{"login":"ant-design","id":12101536,"avatar_url":"https://avatars3.githubusercontent.com/u/12101536?v=4","gravatar_id":"","url":"https://api.github.com/users/ant-design","html_url":"https://github.com/ant-design","followers_url":"https://api.github.com/users/ant-design/followers","following_url":"https://api.github.com/users/ant-design/following{/other_user}","gists_url":"https://api.github.com/users/ant-design/gists{/gist_id}","starred_url":"https://api.github.com/users/ant-design/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ant-design/subscriptions","organizations_url":"https://api.github.com/users/ant-design/orgs","repos_url":"https://api.github.com/users/ant-design/repos","events_url":"https://api.github.com/users/ant-design/events{/privacy}","received_events_url":"https://api.github.com/users/ant-design/received_events","type":"Organization","site_admin":false},"repo":{"id":101394335,"name":"ant-design-pro","full_name":"ant-design/ant-design-pro","owner":{"login":"ant-design","id":12101536,"avatar_url":"https://avatars3.githubusercontent.com/u/12101536?v=4","gravatar_id":"","url":"https://api.github.com/users/ant-design","html_url":"https://github.com/ant-design","followers_url":"https://api.github.com/users/ant-design/followers","following_url":"https://api.github.com/users/ant-design/following{/other_user}","gists_url":"https://api.github.com/users/ant-design/gists{/gist_id}","starred_url":"https://api.github.com/users/ant-design/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ant-design/subscriptions","organizations_url":"https://api.github.com/users/ant-design/orgs","repos_url":"https://api.github.com/users/ant-design/repos","events_url":"https://api.github.com/users/ant-design/events{/privacy}","received_events_url":"https://api.github.com/users/ant-design/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ant-design/ant-design-pro","description":"👨🏻‍💻👩🏻‍💻 An out-of-box UI solution for enterprise applications","fork":false,"url":"https://api.github.com/repos/ant-design/ant-design-pro","forks_url":"https://api.github.com/repos/ant-design/ant-design-pro/forks","keys_url":"https://api.github.com/repos/ant-design/ant-design-pro/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ant-design/ant-design-pro/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ant-design/ant-design-pro/teams","hooks_url":"https://api.github.com/repos/ant-design/ant-design-pro/hooks","issue_events_url":"https://api.github.com/repos/ant-design/ant-design-pro/issues/events{/number}","events_url":"https://api.github.com/repos/ant-design/ant-design-pro/events","assignees_url":"https://api.github.com/repos/ant-design/ant-design-pro/assignees{/user}","branches_url":"https://api.github.com/repos/ant-design/ant-design-pro/branches{/branch}","tags_url":"https://api.github.com/repos/ant-design/ant-design-pro/tags","blobs_url":"https://api.github.com/repos/ant-design/ant-design-pro/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ant-design/ant-design-pro/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ant-design/ant-design-pro/git/refs{/sha}","trees_url":"https://api.github.com/repos/ant-design/ant-design-pro/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ant-design/ant-design-pro/statuses/{sha}","languages_url":"https://api.github.com/repos/ant-design/ant-design-pro/languages","stargazers_url":"https://api.github.com/repos/ant-design/ant-design-pro/stargazers","contributors_url":"https://api.github.com/repos/ant-design/ant-design-pro/contributors","subscribers_url":"https://api.github.com/repos/ant-design/ant-design-pro/subscribers","subscription_url":"https://api.github.com/repos/ant-design/ant-design-pro/subscription","commits_url":"https://api.github.com/repos/ant-design/ant-design-pro/commits{/sha}","git_commits_url":"https://api.github.com/repos/ant-design/ant-design-pro/git/commits{/sha}","comments_url":"https://api.github.com/repos/ant-design/ant-design-pro/comments{/number}","issue_comment_url":"https://api.github.com/repos/ant-design/ant-design-pro/issues/comments{/number}","contents_url":"https://api.github.com/repos/ant-design/ant-design-pro/contents/{+path}","compare_url":"https://api.github.com/repos/ant-design/ant-design-pro/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ant-design/ant-design-pro/merges","archive_url":"https://api.github.com/repos/ant-design/ant-design-pro/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ant-design/ant-design-pro/downloads","issues_url":"https://api.github.com/repos/ant-design/ant-design-pro/issues{/number}","pulls_url":"https://api.github.com/repos/ant-design/ant-design-pro/pulls{/number}","milestones_url":"https://api.github.com/repos/ant-design/ant-design-pro/milestones{/number}","notifications_url":"https://api.github.com/repos/ant-design/ant-design-pro/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ant-design/ant-design-pro/labels{/name}","releases_url":"https://api.github.com/repos/ant-design/ant-design-pro/releases{/id}","deployments_url":"https://api.github.com/repos/ant-design/ant-design-pro/deployments","created_at":"2017-08-25T10:40:44Z","updated_at":"2018-02-06T00:31:30Z","pushed_at":"2018-02-06T00:58:16Z","git_url":"git://github.com/ant-design/ant-design-pro.git","ssh_url":"git@github.com:ant-design/ant-design-pro.git","clone_url":"https://github.com/ant-design/ant-design-pro.git","svn_url":"https://github.com/ant-design/ant-design-pro","homepage":"http://pro.ant.design/","size":19472,"stargazers_count":7210,"watchers_count":7210,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":1097,"mirror_url":null,"archived":false,"open_issues_count":47,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":1097,"open_issues":47,"watchers":7210,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ant-design/ant-design-pro/pulls/880"},"html":{"href":"https://github.com/ant-design/ant-design-pro/pull/880"},"issue":{"href":"https://api.github.com/repos/ant-design/ant-design-pro/issues/880"},"comments":{"href":"https://api.github.com/repos/ant-design/ant-design-pro/issues/880/comments"},"review_comments":{"href":"https://api.github.com/repos/ant-design/ant-design-pro/pulls/880/comments"},"review_comment":{"href":"https://api.github.com/repos/ant-design/ant-design-pro/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ant-design/ant-design-pro/pulls/880/commits"},"statuses":{"href":"https://api.github.com/repos/ant-design/ant-design-pro/statuses/ae5639ef593d062559e77ef7683c57358d0a48ac"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"chenshuai2144"}}