{"action":"created","comment":{"url":"https://api.github.com/repos/mipengine/mip-extensions/pulls/comments/91001964","pull_request_review_id":11513652,"id":91001964,"diff_hunk":"@@ -0,0 +1,365 @@\n+/**\n+ * @author: Qi\n+ * @date: 2016-12-01\n+ * @file: mip-html-ajax.js\n+ */\n+\n+define(function (require) {\n+    var customElem = require('customElement').create();\n+    var qi = require('zepto');\n+    var port = require('viewport');\n+    var theid = 'Qping';\n+    var errmsg = {\n+        r100: '获取配置json失败',\n+        r101: '配置json格式错误',\n+        d100: '{name}格式不正确',\n+        g100: '提交请求出错',\n+        g101: '获取请求出错',\n+        g102: 'dig请求出错',\n+        g103: 'bad请求出错'\n+    };\n+\n+    function sethtmlajax(data, the, obj) {\n+        if (typeof (data.set) === 'undefined') {\n+            return false;\n+        }\n+\t\t// 替换标签\n+        obj.find('val-input, val-textarea, val-select,val-option').each(function () {\n+            var thishtml = qi(this).prop('outerHTML');\n+            qi(this).prop('outerHTML', thishtml.replace(/<(\\/?)val-/ig, '<$1'));\n+        });\n+\t\t// 按钮事件\n+        obj.find(data.set.btn).click(function () {\n+            gethtmlval(data, obj);\n+            return false;\n+        });\n+        // 回车事件\n+        the.addEventListener('keydown', function (event) {\n+            if (event.keyCode === 13) {\n+                gethtmlval(data, obj);\n+                return false;\n+            }\n+        }, false);\n+    }\n+\n+\t// 获取检测提交数据\n+    function gethtmlval(data, obj) {\n+        var valarr = {};\n+        for (var mycars in data.val) {\n+            if (data.val.hasOwnProperty(mycars)) {","path":"mip-html-ajax/mip-html-ajax.js","position":49,"original_position":49,"commit_id":"273f19f538e59c79c851b8d090849c19b6e8dfc2","original_commit_id":"273f19f538e59c79c851b8d090849c19b6e8dfc2","user":{"login":"pearlwang1106","id":22272732,"avatar_url":"https://avatars.githubusercontent.com/u/22272732?v=3","gravatar_id":"","url":"https://api.github.com/users/pearlwang1106","html_url":"https://github.com/pearlwang1106","followers_url":"https://api.github.com/users/pearlwang1106/followers","following_url":"https://api.github.com/users/pearlwang1106/following{/other_user}","gists_url":"https://api.github.com/users/pearlwang1106/gists{/gist_id}","starred_url":"https://api.github.com/users/pearlwang1106/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pearlwang1106/subscriptions","organizations_url":"https://api.github.com/users/pearlwang1106/orgs","repos_url":"https://api.github.com/users/pearlwang1106/repos","events_url":"https://api.github.com/users/pearlwang1106/events{/privacy}","received_events_url":"https://api.github.com/users/pearlwang1106/received_events","type":"User","site_admin":false},"body":"是不是先要确保 data 有  val","created_at":"2016-12-06T02:38:23Z","updated_at":"2016-12-06T02:38:23Z","html_url":"https://github.com/mipengine/mip-extensions/pull/153#discussion_r91001964","pull_request_url":"https://api.github.com/repos/mipengine/mip-extensions/pulls/153","_links":{"self":{"href":"https://api.github.com/repos/mipengine/mip-extensions/pulls/comments/91001964"},"html":{"href":"https://github.com/mipengine/mip-extensions/pull/153#discussion_r91001964"},"pull_request":{"href":"https://api.github.com/repos/mipengine/mip-extensions/pulls/153"}}},"pull_request":{"url":"https://api.github.com/repos/mipengine/mip-extensions/pulls/153","id":96385035,"html_url":"https://github.com/mipengine/mip-extensions/pull/153","diff_url":"https://github.com/mipengine/mip-extensions/pull/153.diff","patch_url":"https://github.com/mipengine/mip-extensions/pull/153.patch","issue_url":"https://api.github.com/repos/mipengine/mip-extensions/issues/153","number":153,"state":"open","locked":false,"title":"AJAX评论提交加载","user":{"login":"byqiqi","id":23182363,"avatar_url":"https://avatars.githubusercontent.com/u/23182363?v=3","gravatar_id":"","url":"https://api.github.com/users/byqiqi","html_url":"https://github.com/byqiqi","followers_url":"https://api.github.com/users/byqiqi/followers","following_url":"https://api.github.com/users/byqiqi/following{/other_user}","gists_url":"https://api.github.com/users/byqiqi/gists{/gist_id}","starred_url":"https://api.github.com/users/byqiqi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/byqiqi/subscriptions","organizations_url":"https://api.github.com/users/byqiqi/orgs","repos_url":"https://api.github.com/users/byqiqi/repos","events_url":"https://api.github.com/users/byqiqi/events{/privacy}","received_events_url":"https://api.github.com/users/byqiqi/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-12-03T03:39:31Z","updated_at":"2016-12-06T02:38:23Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2056b05c21c1f74a9d19edc6883e028160e5e984","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/mipengine/mip-extensions/pulls/153/commits","review_comments_url":"https://api.github.com/repos/mipengine/mip-extensions/pulls/153/comments","review_comment_url":"https://api.github.com/repos/mipengine/mip-extensions/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mipengine/mip-extensions/issues/153/comments","statuses_url":"https://api.github.com/repos/mipengine/mip-extensions/statuses/273f19f538e59c79c851b8d090849c19b6e8dfc2","head":{"label":"byqiqi:patch-2","ref":"patch-2","sha":"273f19f538e59c79c851b8d090849c19b6e8dfc2","user":{"login":"byqiqi","id":23182363,"avatar_url":"https://avatars.githubusercontent.com/u/23182363?v=3","gravatar_id":"","url":"https://api.github.com/users/byqiqi","html_url":"https://github.com/byqiqi","followers_url":"https://api.github.com/users/byqiqi/followers","following_url":"https://api.github.com/users/byqiqi/following{/other_user}","gists_url":"https://api.github.com/users/byqiqi/gists{/gist_id}","starred_url":"https://api.github.com/users/byqiqi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/byqiqi/subscriptions","organizations_url":"https://api.github.com/users/byqiqi/orgs","repos_url":"https://api.github.com/users/byqiqi/repos","events_url":"https://api.github.com/users/byqiqi/events{/privacy}","received_events_url":"https://api.github.com/users/byqiqi/received_events","type":"User","site_admin":false},"repo":{"id":73050271,"name":"mip-extensions","full_name":"byqiqi/mip-extensions","owner":{"login":"byqiqi","id":23182363,"avatar_url":"https://avatars.githubusercontent.com/u/23182363?v=3","gravatar_id":"","url":"https://api.github.com/users/byqiqi","html_url":"https://github.com/byqiqi","followers_url":"https://api.github.com/users/byqiqi/followers","following_url":"https://api.github.com/users/byqiqi/following{/other_user}","gists_url":"https://api.github.com/users/byqiqi/gists{/gist_id}","starred_url":"https://api.github.com/users/byqiqi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/byqiqi/subscriptions","organizations_url":"https://api.github.com/users/byqiqi/orgs","repos_url":"https://api.github.com/users/byqiqi/repos","events_url":"https://api.github.com/users/byqiqi/events{/privacy}","received_events_url":"https://api.github.com/users/byqiqi/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/byqiqi/mip-extensions","description":null,"fork":true,"url":"https://api.github.com/repos/byqiqi/mip-extensions","forks_url":"https://api.github.com/repos/byqiqi/mip-extensions/forks","keys_url":"https://api.github.com/repos/byqiqi/mip-extensions/keys{/key_id}","collaborators_url":"https://api.github.com/repos/byqiqi/mip-extensions/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/byqiqi/mip-extensions/teams","hooks_url":"https://api.github.com/repos/byqiqi/mip-extensions/hooks","issue_events_url":"https://api.github.com/repos/byqiqi/mip-extensions/issues/events{/number}","events_url":"https://api.github.com/repos/byqiqi/mip-extensions/events","assignees_url":"https://api.github.com/repos/byqiqi/mip-extensions/assignees{/user}","branches_url":"https://api.github.com/repos/byqiqi/mip-extensions/branches{/branch}","tags_url":"https://api.github.com/repos/byqiqi/mip-extensions/tags","blobs_url":"https://api.github.com/repos/byqiqi/mip-extensions/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/byqiqi/mip-extensions/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/byqiqi/mip-extensions/git/refs{/sha}","trees_url":"https://api.github.com/repos/byqiqi/mip-extensions/git/trees{/sha}","statuses_url":"https://api.github.com/repos/byqiqi/mip-extensions/statuses/{sha}","languages_url":"https://api.github.com/repos/byqiqi/mip-extensions/languages","stargazers_url":"https://api.github.com/repos/byqiqi/mip-extensions/stargazers","contributors_url":"https://api.github.com/repos/byqiqi/mip-extensions/contributors","subscribers_url":"https://api.github.com/repos/byqiqi/mip-extensions/subscribers","subscription_url":"https://api.github.com/repos/byqiqi/mip-extensions/subscription","commits_url":"https://api.github.com/repos/byqiqi/mip-extensions/commits{/sha}","git_commits_url":"https://api.github.com/repos/byqiqi/mip-extensions/git/commits{/sha}","comments_url":"https://api.github.com/repos/byqiqi/mip-extensions/comments{/number}","issue_comment_url":"https://api.github.com/repos/byqiqi/mip-extensions/issues/comments{/number}","contents_url":"https://api.github.com/repos/byqiqi/mip-extensions/contents/{+path}","compare_url":"https://api.github.com/repos/byqiqi/mip-extensions/compare/{base}...{head}","merges_url":"https://api.github.com/repos/byqiqi/mip-extensions/merges","archive_url":"https://api.github.com/repos/byqiqi/mip-extensions/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/byqiqi/mip-extensions/downloads","issues_url":"https://api.github.com/repos/byqiqi/mip-extensions/issues{/number}","pulls_url":"https://api.github.com/repos/byqiqi/mip-extensions/pulls{/number}","milestones_url":"https://api.github.com/repos/byqiqi/mip-extensions/milestones{/number}","notifications_url":"https://api.github.com/repos/byqiqi/mip-extensions/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/byqiqi/mip-extensions/labels{/name}","releases_url":"https://api.github.com/repos/byqiqi/mip-extensions/releases{/id}","deployments_url":"https://api.github.com/repos/byqiqi/mip-extensions/deployments","created_at":"2016-11-07T06:52:00Z","updated_at":"2016-11-07T06:52:01Z","pushed_at":"2016-12-05T06:27:35Z","git_url":"git://github.com/byqiqi/mip-extensions.git","ssh_url":"git@github.com:byqiqi/mip-extensions.git","clone_url":"https://github.com/byqiqi/mip-extensions.git","svn_url":"https://github.com/byqiqi/mip-extensions","homepage":null,"size":1110,"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":"mipengine:master","ref":"master","sha":"7fbccdb3038f57b216639e02eabddf92faf44eba","user":{"login":"mipengine","id":19966931,"avatar_url":"https://avatars.githubusercontent.com/u/19966931?v=3","gravatar_id":"","url":"https://api.github.com/users/mipengine","html_url":"https://github.com/mipengine","followers_url":"https://api.github.com/users/mipengine/followers","following_url":"https://api.github.com/users/mipengine/following{/other_user}","gists_url":"https://api.github.com/users/mipengine/gists{/gist_id}","starred_url":"https://api.github.com/users/mipengine/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mipengine/subscriptions","organizations_url":"https://api.github.com/users/mipengine/orgs","repos_url":"https://api.github.com/users/mipengine/repos","events_url":"https://api.github.com/users/mipengine/events{/privacy}","received_events_url":"https://api.github.com/users/mipengine/received_events","type":"Organization","site_admin":false},"repo":{"id":69536252,"name":"mip-extensions","full_name":"mipengine/mip-extensions","owner":{"login":"mipengine","id":19966931,"avatar_url":"https://avatars.githubusercontent.com/u/19966931?v=3","gravatar_id":"","url":"https://api.github.com/users/mipengine","html_url":"https://github.com/mipengine","followers_url":"https://api.github.com/users/mipengine/followers","following_url":"https://api.github.com/users/mipengine/following{/other_user}","gists_url":"https://api.github.com/users/mipengine/gists{/gist_id}","starred_url":"https://api.github.com/users/mipengine/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mipengine/subscriptions","organizations_url":"https://api.github.com/users/mipengine/orgs","repos_url":"https://api.github.com/users/mipengine/repos","events_url":"https://api.github.com/users/mipengine/events{/privacy}","received_events_url":"https://api.github.com/users/mipengine/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mipengine/mip-extensions","description":null,"fork":false,"url":"https://api.github.com/repos/mipengine/mip-extensions","forks_url":"https://api.github.com/repos/mipengine/mip-extensions/forks","keys_url":"https://api.github.com/repos/mipengine/mip-extensions/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mipengine/mip-extensions/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mipengine/mip-extensions/teams","hooks_url":"https://api.github.com/repos/mipengine/mip-extensions/hooks","issue_events_url":"https://api.github.com/repos/mipengine/mip-extensions/issues/events{/number}","events_url":"https://api.github.com/repos/mipengine/mip-extensions/events","assignees_url":"https://api.github.com/repos/mipengine/mip-extensions/assignees{/user}","branches_url":"https://api.github.com/repos/mipengine/mip-extensions/branches{/branch}","tags_url":"https://api.github.com/repos/mipengine/mip-extensions/tags","blobs_url":"https://api.github.com/repos/mipengine/mip-extensions/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mipengine/mip-extensions/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mipengine/mip-extensions/git/refs{/sha}","trees_url":"https://api.github.com/repos/mipengine/mip-extensions/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mipengine/mip-extensions/statuses/{sha}","languages_url":"https://api.github.com/repos/mipengine/mip-extensions/languages","stargazers_url":"https://api.github.com/repos/mipengine/mip-extensions/stargazers","contributors_url":"https://api.github.com/repos/mipengine/mip-extensions/contributors","subscribers_url":"https://api.github.com/repos/mipengine/mip-extensions/subscribers","subscription_url":"https://api.github.com/repos/mipengine/mip-extensions/subscription","commits_url":"https://api.github.com/repos/mipengine/mip-extensions/commits{/sha}","git_commits_url":"https://api.github.com/repos/mipengine/mip-extensions/git/commits{/sha}","comments_url":"https://api.github.com/repos/mipengine/mip-extensions/comments{/number}","issue_comment_url":"https://api.github.com/repos/mipengine/mip-extensions/issues/comments{/number}","contents_url":"https://api.github.com/repos/mipengine/mip-extensions/contents/{+path}","compare_url":"https://api.github.com/repos/mipengine/mip-extensions/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mipengine/mip-extensions/merges","archive_url":"https://api.github.com/repos/mipengine/mip-extensions/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mipengine/mip-extensions/downloads","issues_url":"https://api.github.com/repos/mipengine/mip-extensions/issues{/number}","pulls_url":"https://api.github.com/repos/mipengine/mip-extensions/pulls{/number}","milestones_url":"https://api.github.com/repos/mipengine/mip-extensions/milestones{/number}","notifications_url":"https://api.github.com/repos/mipengine/mip-extensions/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mipengine/mip-extensions/labels{/name}","releases_url":"https://api.github.com/repos/mipengine/mip-extensions/releases{/id}","deployments_url":"https://api.github.com/repos/mipengine/mip-extensions/deployments","created_at":"2016-09-29T06:07:53Z","updated_at":"2016-12-02T12:49:26Z","pushed_at":"2016-12-06T02:25:52Z","git_url":"git://github.com/mipengine/mip-extensions.git","ssh_url":"git@github.com:mipengine/mip-extensions.git","clone_url":"https://github.com/mipengine/mip-extensions.git","svn_url":"https://github.com/mipengine/mip-extensions","homepage":null,"size":1819,"stargazers_count":6,"watchers_count":6,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":71,"mirror_url":null,"open_issues_count":16,"forks":71,"open_issues":16,"watchers":6,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mipengine/mip-extensions/pulls/153"},"html":{"href":"https://github.com/mipengine/mip-extensions/pull/153"},"issue":{"href":"https://api.github.com/repos/mipengine/mip-extensions/issues/153"},"comments":{"href":"https://api.github.com/repos/mipengine/mip-extensions/issues/153/comments"},"review_comments":{"href":"https://api.github.com/repos/mipengine/mip-extensions/pulls/153/comments"},"review_comment":{"href":"https://api.github.com/repos/mipengine/mip-extensions/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mipengine/mip-extensions/pulls/153/commits"},"statuses":{"href":"https://api.github.com/repos/mipengine/mip-extensions/statuses/273f19f538e59c79c851b8d090849c19b6e8dfc2"}}}}
{"actor":{"display_login":"pearlwang1106"}}