appword.html 37 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
  5. <title>appword.html</title>
  6. <meta name="generator" content="Haroopad 0.13.1" />
  7. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  8. <style>div.oembedall-githubrepos{border:1px solid #DDD;border-radius:4px;list-style-type:none;margin:0 0 10px;padding:8px 10px 0;font:13.34px/1.4 helvetica,arial,freesans,clean,sans-serif;width:452px;background-color:#fff}div.oembedall-githubrepos .oembedall-body{background:-moz-linear-gradient(center top,#FAFAFA,#EFEFEF);background:-webkit-gradient(linear,left top,left bottom,from(#FAFAFA),to(#EFEFEF));border-bottom-left-radius:4px;border-bottom-right-radius:4px;border-top:1px solid #EEE;margin-left:-10px;margin-top:8px;padding:5px 10px;width:100%}div.oembedall-githubrepos h3{font-size:14px;margin:0;padding-left:18px;white-space:nowrap}div.oembedall-githubrepos p.oembedall-description{color:#444;font-size:12px;margin:0 0 3px}div.oembedall-githubrepos p.oembedall-updated-at{color:#888;font-size:11px;margin:0}div.oembedall-githubrepos ul.oembedall-repo-stats{border:none;float:right;font-size:11px;font-weight:700;padding-left:15px;position:relative;z-index:5;margin:0}div.oembedall-githubrepos ul.oembedall-repo-stats li{border:none;color:#666;display:inline-block;list-style-type:none;margin:0!important}div.oembedall-githubrepos ul.oembedall-repo-stats li a{background-color:transparent;border:none;color:#666!important;background-position:5px -2px;background-repeat:no-repeat;border-left:1px solid #DDD;display:inline-block;height:21px;line-height:21px;padding:0 5px 0 23px}div.oembedall-githubrepos ul.oembedall-repo-stats li:first-child a{border-left:medium none;margin-right:-3px}div.oembedall-githubrepos ul.oembedall-repo-stats li a:hover{background:5px -27px no-repeat #4183C4;color:#FFF!important;text-decoration:none}div.oembedall-githubrepos ul.oembedall-repo-stats li:first-child a:hover{border-bottom-left-radius:3px;border-top-left-radius:3px}ul.oembedall-repo-stats li:last-child a:hover{border-bottom-right-radius:3px;border-top-right-radius:3px}span.oembedall-closehide{background-color:#aaa;border-radius:2px;cursor:pointer;margin-right:3px}div.oembedall-container{margin-top:5px;text-align:left}.oembedall-ljuser{font-weight:700}.oembedall-ljuser img{vertical-align:bottom;border:0;padding-right:1px}.oembedall-stoqembed{border-bottom:1px dotted #999;float:left;overflow:hidden;width:730px;line-height:1;background:#FFF;color:#000;font-family:Arial,Liberation Sans,DejaVu Sans,sans-serif;font-size:80%;text-align:left;margin:0;padding:0}.oembedall-stoqembed a{color:#07C;text-decoration:none;margin:0;padding:0}.oembedall-stoqembed a:hover{text-decoration:underline}.oembedall-stoqembed a:visited{color:#4A6B82}.oembedall-stoqembed h3{font-family:Trebuchet MS,Liberation Sans,DejaVu Sans,sans-serif;font-size:130%;font-weight:700;margin:0;padding:0}.oembedall-stoqembed .oembedall-reputation-score{color:#444;font-size:120%;font-weight:700;margin-right:2px}.oembedall-stoqembed .oembedall-user-info{height:35px;width:185px}.oembedall-stoqembed .oembedall-user-info .oembedall-user-gravatar32{float:left;height:32px;width:32px}.oembedall-stoqembed .oembedall-user-info .oembedall-user-details{float:left;margin-left:5px;overflow:hidden;white-space:nowrap;width:145px}.oembedall-stoqembed .oembedall-question-hyperlink{font-weight:700}.oembedall-stoqembed .oembedall-stats{background:#EEE;margin:0 0 0 7px;padding:4px 7px 6px;width:58px}.oembedall-stoqembed .oembedall-statscontainer{float:left;margin-right:8px;width:86px}.oembedall-stoqembed .oembedall-votes{color:#555;padding:0 0 7px;text-align:center}.oembedall-stoqembed .oembedall-vote-count-post{font-size:240%;color:#808185;display:block;font-weight:700}.oembedall-stoqembed .oembedall-views{color:#999;padding-top:4px;text-align:center}.oembedall-stoqembed .oembedall-status{margin-top:-3px;padding:4px 0;text-align:center;background:#75845C;color:#FFF}.oembedall-stoqembed .oembedall-status strong{color:#FFF;display:block;font-size:140%}.oembedall-stoqembed .oembedall-summary{float:left;width:635px}.oembedall-stoqembed .oembedall-excerpt{line-height:1.2;margin:0;padding:0 0 5px}.oembedall-stoqembed .oembedall-tags{float:left;line-height:18px}.oembedall-stoqembed .oembedall-tags a:hover{text-decoration:none}.oembedall-stoqembed .oembedall-post-tag{background-color:#E0EAF1;border-bottom:1px solid #3E6D8E;border-right:1px solid #7F9FB6;color:#3E6D8E;font-size:90%;line-height:2.4;margin:2px 2px 2px 0;padding:3px 4px;text-decoration:none;white-space:nowrap}.oembedall-stoqembed .oembedall-post-tag:hover{background-color:#3E6D8E;border-bottom:1px solid #37607D;border-right:1px solid #37607D;color:#E0EAF1}.oembedall-stoqembed .oembedall-fr{float:right}.oembedall-stoqembed .oembedall-statsarrow{background-image:url(http://cdn.sstatic.net/stackoverflow/img/sprites.png?v=3);background-repeat:no-repeat;overflow:hidden;background-position:0 -435px;float:right;height:13px;margin-top:12px;width:7px}.oembedall-facebook1{border:1px solid #1A3C6C;padding:0;font:13.34px/1.4 verdana;width:500px}.oembedall-facebook2{background-color:#627add}.oembedall-facebook2 a{color:#e8e8e8;text-decoration:none}.oembedall-facebookBody{background-color:#fff;vertical-align:top;padding:5px}.oembedall-facebookBody .contents{display:inline-block;width:100%}.oembedall-facebookBody div img{float:left;margin-right:5px}div.oembedall-lanyard{-webkit-box-shadow:none;-webkit-transition-delay:0s;-webkit-transition-duration:.4000000059604645s;-webkit-transition-property:width;-webkit-transition-timing-function:cubic-bezier(0.42,0,.58,1);background-attachment:scroll;background-clip:border-box;background-color:transparent;background-image:none;background-origin:padding-box;border-width:0;box-shadow:none;color:#112644;display:block;float:left;font-family:'Trebuchet MS',Trebuchet,sans-serif;font-size:16px;height:253px;line-height:19px;margin:0;max-width:none;min-height:0;outline:#112644 0;overflow-x:visible;overflow-y:visible;padding:0;position:relative;text-align:left;vertical-align:baseline;width:804px}div.oembedall-lanyard .tagline{font-size:1.5em}div.oembedall-lanyard .wrapper{overflow:hidden;clear:both}div.oembedall-lanyard .split{float:left;display:inline}div.oembedall-lanyard .prominent-place .flag:active,div.oembedall-lanyard .prominent-place .flag:focus,div.oembedall-lanyard .prominent-place .flag:hover,div.oembedall-lanyard .prominent-place .flag:link,div.oembedall-lanyard .prominent-place .flag:visited{float:left;display:block;width:48px;height:48px;position:relative;top:-5px;margin-right:10px}div.oembedall-lanyard .place-context{font-size:.889em}div.oembedall-lanyard .prominent-place .sub-place{display:block}div.oembedall-lanyard .prominent-place{font-size:1.125em;line-height:1.1em;font-weight:400}div.oembedall-lanyard .main-date{color:#8CB4E0;font-weight:700;line-height:1.1}div.oembedall-lanyard .first{width:48.57%;margin:0 0 0 2.857%}.mermaid .label{color:#333}.node circle,.node polygon,.node rect{fill:#cde498;stroke:#13540c;stroke-width:1px}.edgePath .path{stroke:green;stroke-width:1.5px}.cluster rect{fill:#cdffb2;rx:40;stroke:#6eaa49;stroke-width:1px}.cluster text{fill:#333}.actor{stroke:#13540c;fill:#cde498}text.actor{fill:#000;stroke:none}.actor-line{stroke:grey}.messageLine0{stroke-width:1.5;stroke-dasharray:"2 2";marker-end:"url(#arrowhead)";stroke:#333}.messageLine1{stroke-width:1.5;stroke-dasharray:"2 2";stroke:#333}#arrowhead{fill:#333}#crosshead path{fill:#333!important;stroke:#333!important}.messageText{fill:#333;stroke:none}.labelBox{stroke:#326932;fill:#cde498}.labelText,.loopText{fill:#000;stroke:none}.loopLine{stroke-width:2;stroke-dasharray:"2 2";marker-end:"url(#arrowhead)";stroke:#326932}.note{stroke:#6eaa49;fill:#fff5ad}.noteText{fill:#000;stroke:none;font-family:'trebuchet ms',verdana,arial;font-size:14px}.section{stroke:none;opacity:.2}.section0,.section2{fill:#6eaa49}.section1,.section3{fill:#fff;opacity:.2}.sectionTitle0,.sectionTitle1,.sectionTitle2,.sectionTitle3{fill:#333}.sectionTitle{text-anchor:start;font-size:11px;text-height:14px}.grid .tick{stroke:lightgrey;opacity:.3;shape-rendering:crispEdges}.grid path{stroke-width:0}.today{fill:none;stroke:red;stroke-width:2px}.task{stroke-width:2}.taskText{text-anchor:middle;font-size:11px}.taskTextOutsideRight{fill:#000;text-anchor:start;font-size:11px}.taskTextOutsideLeft{fill:#000;text-anchor:end;font-size:11px}.taskText0,.taskText1,.taskText2,.taskText3{fill:#fff}.task0,.task1,.task2,.task3{fill:#487e3a;stroke:#13540c}.taskTextOutside0,.taskTextOutside1,.taskTextOutside2,.taskTextOutside3{fill:#000}.active0,.active1,.active2,.active3{fill:#cde498;stroke:#13540c}.activeText0,.activeText1,.activeText2,.activeText3{fill:#000!important}.done0,.done1,.done2,.done3{stroke:grey;fill:lightgrey;stroke-width:2}.doneText0,.doneText1,.doneText2,.doneText3{fill:#000!important}.crit0,.crit1,.crit2,.crit3{stroke:#f88;fill:red;stroke-width:2}.activeCrit0,.activeCrit1,.activeCrit2,.activeCrit3{stroke:#f88;fill:#cde498;stroke-width:2}.doneCrit0,.doneCrit1,.doneCrit2,.doneCrit3{stroke:#f88;fill:lightgrey;stroke-width:2;cursor:pointer;shape-rendering:crispEdges}.activeCritText0,.activeCritText1,.activeCritText2,.activeCritText3,.doneCritText0,.doneCritText1,.doneCritText2,.doneCritText3{fill:#000!important}.titleText{text-anchor:middle;font-size:18px;fill:#000}text{font-family:'trebuchet ms',verdana,arial;font-size:14px}html{height:100%}body{margin:0!important;padding:5px 20px 26px!important;background-color:#fff;font-family:"Lucida Grande","Segoe UI","Apple SD Gothic Neo","Malgun Gothic","Lucida Sans Unicode",Helvetica,Arial,sans-serif;font-size:.9em;overflow-x:hidden;overflow-y:auto}br,h1,h2,h3,h4,h5,h6{clear:both}hr.page{background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAYAAAAECAYAAACtBE5DAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6OENDRjNBN0E2NTZBMTFFMEI3QjRBODM4NzJDMjlGNDgiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6OENDRjNBN0I2NTZBMTFFMEI3QjRBODM4NzJDMjlGNDgiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo4Q0NGM0E3ODY1NkExMUUwQjdCNEE4Mzg3MkMyOUY0OCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo4Q0NGM0E3OTY1NkExMUUwQjdCNEE4Mzg3MkMyOUY0OCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PqqezsUAAAAfSURBVHjaYmRABcYwBiM2QSA4y4hNEKYDQxAEAAIMAHNGAzhkPOlYAAAAAElFTkSuQmCC) repeat-x;border:0;height:3px;padding:0}hr.underscore{border-top-style:dashed!important}body >:first-child{margin-top:0!important}img.plugin{box-shadow:0 1px 3px rgba(0,0,0,.1);border-radius:3px}iframe{border:0}figure{-webkit-margin-before:0;-webkit-margin-after:0;-webkit-margin-start:0;-webkit-margin-end:0}kbd{border:1px solid #aaa;-moz-border-radius:2px;-webkit-border-radius:2px;border-radius:2px;-moz-box-shadow:1px 2px 2px #ddd;-webkit-box-shadow:1px 2px 2px #ddd;box-shadow:1px 2px 2px #ddd;background-color:#f9f9f9;background-image:-moz-linear-gradient(top,#eee,#f9f9f9,#eee);background-image:-o-linear-gradient(top,#eee,#f9f9f9,#eee);background-image:-webkit-linear-gradient(top,#eee,#f9f9f9,#eee);background-image:linear-gradient(top,#eee,#f9f9f9,#eee);padding:1px 3px;font-family:inherit;font-size:.85em}.oembeded .oembed_photo{display:inline-block}img[data-echo]{margin:25px 0;width:100px;height:100px;background:url(../img/ajax.gif) center center no-repeat #fff}.spinner{display:inline-block;width:10px;height:10px;margin-bottom:-.1em;border:2px solid rgba(0,0,0,.5);border-top-color:transparent;border-radius:100%;-webkit-animation:spin 1s infinite linear;animation:spin 1s infinite linear}.spinner:after{content:'';display:block;width:0;height:0;position:absolute;top:-6px;left:0;border:4px solid transparent;border-bottom-color:rgba(0,0,0,.5);-webkit-transform:rotate(45deg);transform:rotate(45deg)}@-webkit-keyframes spin{to{-webkit-transform:rotate(360deg)}}@keyframes spin{to{transform:rotate(360deg)}}p.toc{margin:0!important}p.toc ul{padding-left:10px}p.toc>ul{padding:10px;margin:0 10px;display:inline-block;border:1px solid #ededed;border-radius:5px}p.toc li,p.toc ul{list-style-type:none}p.toc li{width:100%;padding:0;overflow:hidden}p.toc li a::after{content:"."}p.toc li a:before{content:"• "}p.toc h5{text-transform:uppercase}p.toc .title{float:left;padding-right:3px}p.toc .number{margin:0;float:right;padding-left:3px;background:#fff;display:none}input.task-list-item{margin-left:-1.62em}.markdown{font-family:"Hiragino Sans GB","Microsoft YaHei",STHeiti,SimSun,"Lucida Grande","Lucida Sans Unicode","Lucida Sans",'Segoe UI',AppleSDGothicNeo-Medium,'Malgun Gothic',Verdana,Tahoma,sans-serif;padding:20px}.markdown a{text-decoration:none;vertical-align:baseline}.markdown a:hover{text-decoration:underline}.markdown h1{font-size:2.2em;font-weight:700;margin:1.5em 0 1em}.markdown h2{font-size:1.8em;font-weight:700;margin:1.275em 0 .85em}.markdown h3{font-size:1.6em;font-weight:700;margin:1.125em 0 .75em}.markdown h4{font-size:1.4em;font-weight:700;margin:.99em 0 .66em}.markdown h5{font-size:1.2em;font-weight:700;margin:.855em 0 .57em}.markdown h6{font-size:1em;font-weight:700;margin:.75em 0 .5em}.markdown h1+p,.markdown h1:first-child,.markdown h2+p,.markdown h2:first-child,.markdown h3+p,.markdown h3:first-child,.markdown h4+p,.markdown h4:first-child,.markdown h5+p,.markdown h5:first-child,.markdown h6+p,.markdown h6:first-child{margin-top:0}.markdown hr{border:1px solid #ccc}.markdown p{margin:1em 0;word-wrap:break-word}.markdown ol{list-style-type:decimal}.markdown li{display:list-item;line-height:1.4em}.markdown blockquote{margin:1em 20px}.markdown blockquote>:first-child{margin-top:0}.markdown blockquote>:last-child{margin-bottom:0}.markdown blockquote cite:before{content:'\2014 \00A0'}.markdown .code{border-radius:3px;word-wrap:break-word}.markdown pre{border-radius:3px;word-wrap:break-word;border:1px solid #ccc;overflow:auto;padding:.5em}.markdown pre code{border:0;display:block}.markdown pre>code{font-family:Consolas,Inconsolata,Courier,monospace;font-weight:700;white-space:pre;margin:0}.markdown code{border-radius:3px;word-wrap:break-word;border:1px solid #ccc;padding:0 5px;margin:0 2px}.markdown img{max-width:100%}.markdown mark{color:#000;background-color:#fcf8e3}.markdown table{padding:0;border-collapse:collapse;border-spacing:0;margin-bottom:16px}.markdown table tr td,.markdown table tr th{border:1px solid #ccc;margin:0;padding:6px 13px}.markdown table tr th{font-weight:700}.markdown table tr th>:first-child{margin-top:0}.markdown table tr th>:last-child{margin-bottom:0}.markdown table tr td>:first-child{margin-top:0}.markdown table tr td>:last-child{margin-bottom:0}@import url(http://fonts.googleapis.com/css?family=Roboto+Condensed:300italic,400italic,700italic,400,300,700);.haroopad{padding:20px;color:#222;font-size:15px;font-family:"Roboto Condensed",Tauri,"Hiragino Sans GB","Microsoft YaHei",STHeiti,SimSun,"Lucida Grande","Lucida Sans Unicode","Lucida Sans",'Segoe UI',AppleSDGothicNeo-Medium,'Malgun Gothic',Verdana,Tahoma,sans-serif;background:#fff;line-height:1.6;-webkit-font-smoothing:antialiased}.haroopad a{color:#3269a0}.haroopad a:hover{color:#4183c4}.haroopad h2{border-bottom:1px solid #e6e6e6}.haroopad h6{color:#777}.haroopad hr{border:1px solid #e6e6e6}.haroopad blockquote>code,.haroopad h1>code,.haroopad h2>code,.haroopad h3>code,.haroopad h4>code,.haroopad h5>code,.haroopad h6>code,.haroopad li>code,.haroopad p>code,.haroopad td>code{font-family:Consolas,"Liberation Mono",Menlo,Courier,monospace;font-size:85%;background-color:rgba(0,0,0,.02);padding:.2em .5em;border:1px solid #efefef}.haroopad pre>code{font-size:1em;letter-spacing:-1px;font-weight:700}.haroopad blockquote{border-left:4px solid #e6e6e6;padding:0 15px;color:#777}.haroopad table{background-color:#fafafa}.haroopad table tr td,.haroopad table tr th{border:1px solid #e6e6e6}.haroopad table tr:nth-child(2n){background-color:#f2f2f2}.hljs{display:block;overflow-x:auto;padding:.5em;background:#fdf6e3;color:#657b83;-webkit-text-size-adjust:none}.diff .hljs-header,.hljs-comment,.hljs-doctype,.hljs-javadoc,.hljs-pi,.lisp .hljs-string{color:#93a1a1}.css .hljs-tag,.hljs-addition,.hljs-keyword,.hljs-request,.hljs-status,.hljs-winutils,.method,.nginx .hljs-title{color:#859900}.hljs-command,.hljs-dartdoc,.hljs-hexcolor,.hljs-link_url,.hljs-number,.hljs-phpdoc,.hljs-regexp,.hljs-rules .hljs-value,.hljs-string,.hljs-tag .hljs-value,.tex .hljs-formula{color:#2aa198}.css .hljs-function,.hljs-built_in,.hljs-chunk,.hljs-decorator,.hljs-id,.hljs-identifier,.hljs-localvars,.hljs-title,.vhdl .hljs-literal{color:#268bd2}.hljs-attribute,.hljs-class .hljs-title,.hljs-constant,.hljs-link_reference,.hljs-parent,.hljs-type,.hljs-variable,.lisp .hljs-body,.smalltalk .hljs-number{color:#b58900}.css .hljs-pseudo,.diff .hljs-change,.hljs-attr_selector,.hljs-cdata,.hljs-header,.hljs-pragma,.hljs-preprocessor,.hljs-preprocessor .hljs-keyword,.hljs-shebang,.hljs-special,.hljs-subst,.hljs-symbol,.hljs-symbol .hljs-string{color:#cb4b16}.hljs-deletion,.hljs-important{color:#dc322f}.hljs-link_label{color:#6c71c4}.tex .hljs-formula{background:#eee8d5}.MathJax_Hover_Frame{border-radius:.25em;-webkit-border-radius:.25em;-moz-border-radius:.25em;-khtml-border-radius:.25em;box-shadow:0 0 15px #83A;-webkit-box-shadow:0 0 15px #83A;-moz-box-shadow:0 0 15px #83A;-khtml-box-shadow:0 0 15px #83A;border:1px solid #A6D!important;display:inline-block;position:absolute}.MathJax_Hover_Arrow{position:absolute;width:15px;height:11px;cursor:pointer}#MathJax_About{position:fixed;left:50%;width:auto;text-align:center;border:3px outset;padding:1em 2em;background-color:#DDD;color:#000;cursor:default;font-family:message-box;font-size:120%;font-style:normal;text-indent:0;text-transform:none;line-height:normal;letter-spacing:normal;word-spacing:normal;word-wrap:normal;white-space:nowrap;float:none;z-index:201;border-radius:15px;-webkit-border-radius:15px;-moz-border-radius:15px;-khtml-border-radius:15px;box-shadow:0 10px 20px gray;-webkit-box-shadow:0 10px 20px gray;-moz-box-shadow:0 10px 20px gray;-khtml-box-shadow:0 10px 20px gray;filter:progid:DXImageTransform.Microsoft.dropshadow(OffX=2, OffY=2, Color='gray', Positive='true')}.MathJax_Menu{position:absolute;background-color:#fff;color:#000;width:auto;padding:2px;border:1px solid #CCC;margin:0;cursor:default;font:menu;text-align:left;text-indent:0;text-transform:none;line-height:normal;letter-spacing:normal;word-spacing:normal;word-wrap:normal;white-space:nowrap;float:none;z-index:201;box-shadow:0 10px 20px gray;-webkit-box-shadow:0 10px 20px gray;-moz-box-shadow:0 10px 20px gray;-khtml-box-shadow:0 10px 20px gray;filter:progid:DXImageTransform.Microsoft.dropshadow(OffX=2, OffY=2, Color='gray', Positive='true')}.MathJax_MenuItem{padding:2px 2em;background:0 0}.MathJax_MenuArrow{position:absolute;right:.5em;color:#666}.MathJax_MenuActive .MathJax_MenuArrow{color:#fff}.MathJax_MenuArrow.RTL{left:.5em;right:auto}.MathJax_MenuCheck{position:absolute;left:.7em}.MathJax_MenuCheck.RTL{right:.7em;left:auto}.MathJax_MenuRadioCheck{position:absolute;left:1em}.MathJax_MenuRadioCheck.RTL{right:1em;left:auto}.MathJax_MenuLabel{padding:2px 2em 4px 1.33em;font-style:italic}.MathJax_MenuRule{border-top:1px solid #CCC;margin:4px 1px 0}.MathJax_MenuDisabled{color:GrayText}.MathJax_MenuActive{background-color:Highlight;color:HighlightText}.MathJax_Menu_Close{position:absolute;width:31px;height:31px;top:-15px;left:-15px}#MathJax_Zoom{position:absolute;background-color:#F0F0F0;overflow:auto;display:block;z-index:301;padding:.5em;border:1px solid #000;margin:0;font-weight:400;font-style:normal;text-align:left;text-indent:0;text-transform:none;line-height:normal;letter-spacing:normal;word-spacing:normal;word-wrap:normal;white-space:nowrap;float:none;box-shadow:5px 5px 15px #AAA;-webkit-box-shadow:5px 5px 15px #AAA;-moz-box-shadow:5px 5px 15px #AAA;-khtml-box-shadow:5px 5px 15px #AAA;filter:progid:DXImageTransform.Microsoft.dropshadow(OffX=2, OffY=2, Color='gray', Positive='true')}#MathJax_ZoomOverlay{position:absolute;left:0;top:0;z-index:300;display:inline-block;width:100%;height:100%;border:0;padding:0;margin:0;background-color:#fff;opacity:0;filter:alpha(opacity=0)}#MathJax_ZoomFrame{position:relative;display:inline-block;height:0;width:0}#MathJax_ZoomEventTrap{position:absolute;left:0;top:0;z-index:302;display:inline-block;border:0;padding:0;margin:0;background-color:#fff;opacity:0;filter:alpha(opacity=0)}.MathJax_Preview{color:#888}#MathJax_Message{position:fixed;left:1px;bottom:2px;background-color:#E6E6E6;border:1px solid #959595;margin:0;padding:2px 8px;z-index:102;color:#000;font-size:80%;width:auto;white-space:nowrap}#MathJax_MSIE_Frame{position:absolute;top:0;left:0;width:0;z-index:101;border:0;margin:0;padding:0}.MathJax_Error{color:#C00;font-style:italic}footer{position:fixed;font-size:.8em;text-align:right;bottom:0;margin-left:-25px;height:20px;width:100%}</style>
  9. </head>
  10. <body class="markdown haroopad">
  11. <h1 id="appword"><a name="appword" href="#appword"></a>appword</h1><p class="toc" style="undefined"></p><ul>
  12. <li><ul>
  13. <li><span class="title">
  14. <a href="#1.约定" title="1.约定">1.约定</a>
  15. </span>
  16. <!--span class="number">
  17. 0
  18. </span-->
  19. </li>
  20. <li><span class="title">
  21. <a href="#2.接口" title="2.接口">2.接口</a>
  22. </span>
  23. <!--span class="number">
  24. 1
  25. </span-->
  26. <ul>
  27. <li><span class="title">
  28. <a href="#订阅客服" title="订阅客服">订阅客服</a>
  29. </span>
  30. <!--span class="number">
  31. 2
  32. </span-->
  33. </li>
  34. <li><span class="title">
  35. <a href="#发送消息" title="发送消息">发送消息</a>
  36. </span>
  37. <!--span class="number">
  38. 3
  39. </span-->
  40. </li>
  41. <li><span class="title">
  42. <a href="#客服绑定操作" title="客服绑定操作">客服绑定操作</a>
  43. </span>
  44. <!--span class="number">
  45. 4
  46. </span-->
  47. </li>
  48. <li><span class="title">
  49. <a href="#客服发送消息" title="客服发送消息">客服发送消息</a>
  50. </span>
  51. <!--span class="number">
  52. 5
  53. </span-->
  54. </li>
  55. <li><span class="title">
  56. <a href="#客服获取消息记录" title="客服获取消息记录">客服获取消息记录</a>
  57. </span>
  58. <!--span class="number">
  59. 6
  60. </span-->
  61. </li>
  62. <li><span class="title">
  63. <a href="#客服删除访客列表" title="客服删除访客列表">客服删除访客列表</a>
  64. </span>
  65. <!--span class="number">
  66. 7
  67. </span-->
  68. </li>
  69. <li><span class="title">
  70. <a href="#访客聊天记录" title="访客聊天记录">访客聊天记录</a>
  71. </span>
  72. <!--span class="number">
  73. 8
  74. </span-->
  75. </li>
  76. <li><span class="title">
  77. <a href="#访客上传文件" title="访客上传文件">访客上传文件</a>
  78. </span>
  79. <!--span class="number">
  80. 9
  81. </span-->
  82. </li>
  83. <li><span class="title">
  84. <a href="#客服上传文件" title="客服上传文件">客服上传文件</a>
  85. </span>
  86. <!--span class="number">
  87. 10
  88. </span-->
  89. </li>
  90. <li><span class="title">
  91. <a href="#客户留言" title="客户留言">客户留言</a>
  92. </span>
  93. <!--span class="number">
  94. 11
  95. </span-->
  96. </li>
  97. <li><span class="title">
  98. <a href="#客户评论" title="客户评论">客户评论</a>
  99. </span>
  100. <!--span class="number">
  101. 12
  102. </span-->
  103. </li>
  104. <li><span class="title">
  105. <a href="#客户常见问题" title="客户常见问题">客户常见问题</a>
  106. </span>
  107. <!--span class="number">
  108. 13
  109. </span-->
  110. </li>
  111. </ul>
  112. </li>
  113. </ul>
  114. </li>
  115. </ul>
  116. <p></p><h2 id="1.约定"><a name="1.约定" href="#1.约定"></a>1.约定</h2><p><em>a.数据格式</em></p><blockquote>
  117. <p>socket和http数据接口格式都采用json格式</p>
  118. </blockquote><p><em>b.结构</em></p><pre><code data-origin="<pre><code>
  119. //1.socket
  120. {
  121. &quot;method&quot;:&quot;subscribe&quot;,//操作
  122. &quot;data&quot;:{//数据
  123. &quot;client_id&quot;:&quot;c0a801ba08fc00000007&quot;,
  124. &quot;client_name&quot;:&quot;游客YzH1ai&quot;,
  125. &quot;time&quot;:&quot;2019-01-08 09:55:37&quot;
  126. }
  127. }
  128. //2.http
  129. {
  130. &quot;status&quot;:200,//状态码 一般200为成功 其余除特殊外均为失败
  131. &quot;msg&quot;:&quot;success&quot;,//描述
  132. &quot;data&quot;:{//返回信息
  133. &quot;name&quot;:&quot;随机客服&quot;,
  134. &quot;avatar&quot;:&quot;xxx&quot;
  135. }
  136. }
  137. </code></pre>">
  138. //1.socket
  139. {
  140. "method":"subscribe",//操作
  141. "data":{//数据
  142. "client_id":"c0a801ba08fc00000007",
  143. "client_name":"游客YzH1ai",
  144. "time":"2019-01-08 09:55:37"
  145. }
  146. }
  147. //2.http
  148. {
  149. "status":200,//状态码 一般200为成功 其余除特殊外均为失败
  150. "msg":"success",//描述
  151. "data":{//返回信息
  152. "name":"随机客服",
  153. "avatar":"xxx"
  154. }
  155. }
  156. </code></pre><h2 id="2.接口"><a name="2.接口" href="#2.接口"></a>2.接口</h2><h3 id="订阅客服"><a name="订阅客服" href="#订阅客服"></a>订阅客服</h3><blockquote>
  157. <p>登录ws服务器成功后,进行订阅客服操作</p>
  158. </blockquote><p><strong>url</strong></p><p><code>/chat/subscribe</code></p><p><strong>参数</strong></p><pre><code data-origin="<pre><code>
  159. code = 'xxxx' //会话code
  160. client_id = 'xxxx' //ws服务器推送的client_id
  161. </code></pre>">
  162. code = 'xxxx' //会话code
  163. client_id = 'xxxx' //ws服务器推送的client_id
  164. </code></pre><p><strong>返回</strong></p><pre><code data-origin="<pre><code>
  165. {
  166. &quot;status&quot;:200,
  167. &quot;msg&quot;:&quot;success&quot;,
  168. &quot;data&quot;:{
  169. &quot;name&quot;:&quot;随机客服&quot;,//客服名称
  170. &quot;avatar&quot;:&quot;xxx&quot;//客服头像
  171. }
  172. }
  173. </code></pre>">
  174. {
  175. "status":200,
  176. "msg":"success",
  177. "data":{
  178. "name":"随机客服",//客服名称
  179. "avatar":"xxx"//客服头像
  180. }
  181. }
  182. </code></pre><h3 id="发送消息"><a name="发送消息" href="#发送消息"></a>发送消息</h3><blockquote>
  183. <p>发送消息给当前客服</p>
  184. </blockquote><p><strong>url</strong></p><p><code>/chat/chat</code></p><p><strong>参数</strong></p><pre><code data-origin="<pre><code>
  185. code = 'xxx' //会话code
  186. content = '你好' //发送的内容
  187. </code></pre>">
  188. code = 'xxx' //会话code
  189. content = '你好' //发送的内容
  190. </code></pre><p><strong>返回</strong></p><pre><code data-origin="<pre><code>
  191. {
  192. &quot;status&quot;:200,
  193. &quot;msg&quot;:&quot;success&quot;
  194. }
  195. </code></pre>">
  196. {
  197. "status":200,
  198. "msg":"success"
  199. }
  200. </code></pre><h3 id="客服绑定操作"><a name="客服绑定操作" href="#客服绑定操作"></a>客服绑定操作</h3><blockquote>
  201. <p>当ws服务器向客服客户端推送bind操作的时候进行</p>
  202. </blockquote><p><strong>url</strong></p><p><code>/admin/service/bind</code></p><p><strong>参数</strong></p><pre><code data-origin="<pre><code>
  203. client_id = 'xxx' //客户端id
  204. </code></pre>">
  205. client_id = 'xxx' //客户端id
  206. </code></pre><p><strong>返回</strong></p><pre><code data-origin="<pre><code>
  207. {
  208. &quot;status&quot;:200,
  209. &quot;msg&quot;:&quot;success&quot;
  210. }
  211. </code></pre>">
  212. {
  213. "status":200,
  214. "msg":"success"
  215. }
  216. </code></pre><h3 id="客服发送消息"><a name="客服发送消息" href="#客服发送消息"></a>客服发送消息</h3><blockquote>
  217. <p>当客服给对应的用户发送消息行</p>
  218. </blockquote><p><strong>url</strong></p><p><code>/admin/service/chat</code></p><p><strong>参数</strong></p><pre><code data-origin="<pre><code>
  219. to_id = 'xxx'//用户的from_id
  220. type = 1 //消息类型 1:文字 2:图片 3:声音 4:视频
  221. content = '消息内容',//消息内容
  222. </code></pre>">
  223. to_id = 'xxx'//用户的from_id
  224. type = 1 //消息类型 1:文字 2:图片 3:声音 4:视频
  225. content = '消息内容',//消息内容
  226. </code></pre><p><strong>返回</strong></p><pre><code data-origin="<pre><code>
  227. {
  228. &quot;status&quot;:200,
  229. &quot;msg&quot;:&quot;success&quot;
  230. }
  231. </code></pre>">
  232. {
  233. "status":200,
  234. "msg":"success"
  235. }
  236. </code></pre><h3 id="客服获取消息记录"><a name="客服获取消息记录" href="#客服获取消息记录"></a>客服获取消息记录</h3><blockquote>
  237. <p>客服获取与当前用户的消息记录</p>
  238. </blockquote><p><strong>url</strong></p><p><code>/admin/service/messageLog</code></p><p><strong>参数</strong></p><pre><code data-origin="<pre><code>
  239. to_id = 'xxx'//用户的from_id
  240. page = 1//页数 不传默认为1
  241. </code></pre>">
  242. to_id = 'xxx'//用户的from_id
  243. page = 1//页数 不传默认为1
  244. </code></pre><p><strong>返回</strong></p><pre><code data-origin="<pre><code>
  245. {
  246. &quot;status&quot;:200,
  247. &quot;msg&quot;:&quot;success&quot;,
  248. &quot;data&quot;:[
  249. {
  250. &quot;from&quot;:&quot;4_201901171724091i0P&quot;,//哪个客户端发送的
  251. &quot;type&quot;:1,//消息类型 1文字 2图片 3视频 4声音...
  252. &quot;create_time&quot;:&quot;2019-01-17 17:25:55&quot;,//发送时间
  253. &quot;content&quot;:&quot;是不是哦&quot;,//发送内容
  254. &quot;who_is&quot;:2//谁发送的 1客服 2用户
  255. },
  256. {
  257. &quot;from&quot;:&quot;4_201901171724091i0P&quot;,
  258. &quot;type&quot;:1,
  259. &quot;create_time&quot;:&quot;2019-01-17 17:25:55&quot;,
  260. &quot;content&quot;:&quot;是不是哦&quot;,
  261. &quot;who_is&quot;:2
  262. }
  263. ]
  264. }
  265. </code></pre>">
  266. {
  267. "status":200,
  268. "msg":"success",
  269. "data":[
  270. {
  271. "from":"4_201901171724091i0P",//哪个客户端发送的
  272. "type":1,//消息类型 1文字 2图片 3视频 4声音...
  273. "create_time":"2019-01-17 17:25:55",//发送时间
  274. "content":"是不是哦",//发送内容
  275. "who_is":2//谁发送的 1客服 2用户
  276. },
  277. {
  278. "from":"4_201901171724091i0P",
  279. "type":1,
  280. "create_time":"2019-01-17 17:25:55",
  281. "content":"是不是哦",
  282. "who_is":2
  283. }
  284. ]
  285. }
  286. </code></pre><h3 id="客服删除访客列表"><a name="客服删除访客列表" href="#客服删除访客列表"></a>客服删除访客列表</h3><blockquote>
  287. <p>客服删除当前访客列表</p>
  288. </blockquote><p><strong>url</strong></p><p><code>/admin/service/delChatList</code></p><p><strong>参数</strong></p><pre><code data-origin="<pre><code>
  289. to_id = 'xxx'//用户的from_id
  290. </code></pre>">
  291. to_id = 'xxx'//用户的from_id
  292. </code></pre><p><strong>返回</strong></p><pre><code data-origin="<pre><code>
  293. {
  294. &quot;status&quot;:200,
  295. &quot;msg&quot;:&quot;success&quot;,
  296. }
  297. </code></pre>">
  298. {
  299. "status":200,
  300. "msg":"success",
  301. }
  302. </code></pre><h3 id="访客聊天记录"><a name="访客聊天记录" href="#访客聊天记录"></a>访客聊天记录</h3><blockquote>
  303. <p>访客获取聊天记录</p>
  304. </blockquote><p><strong>url</strong></p><p><code>/chat/messageLog</code></p><p><strong>参数</strong></p><pre><code data-origin="<pre><code>
  305. code = 'xxx'//会话唯一的code
  306. </code></pre>">
  307. code = 'xxx'//会话唯一的code
  308. </code></pre><p><strong>返回</strong></p><pre><code data-origin="<pre><code>
  309. {
  310. &quot;status&quot;: 200,
  311. &quot;msg&quot;: &quot;success&quot;,
  312. &quot;data&quot;: [
  313. {
  314. &quot;from&quot;: &quot;4_20190122155448Cq9r&quot;,
  315. &quot;type&quot;: 1,
  316. &quot;create_time&quot;: &quot;2019-01-22 15:54:57&quot;,
  317. &quot;content&quot;: &quot;1232131&quot;,
  318. &quot;who_is&quot;: 2
  319. },
  320. {
  321. &quot;from&quot;: &quot;19&quot;,
  322. &quot;type&quot;: 1,
  323. &quot;create_time&quot;: &quot;2019-01-22 15:55:05&quot;,
  324. &quot;content&quot;: &quot;321312&quot;,
  325. &quot;who_is&quot;: 1
  326. }
  327. ]
  328. }
  329. </code></pre>">
  330. {
  331. "status": 200,
  332. "msg": "success",
  333. "data": [
  334. {
  335. "from": "4_20190122155448Cq9r",
  336. "type": 1,
  337. "create_time": "2019-01-22 15:54:57",
  338. "content": "1232131",
  339. "who_is": 2
  340. },
  341. {
  342. "from": "19",
  343. "type": 1,
  344. "create_time": "2019-01-22 15:55:05",
  345. "content": "321312",
  346. "who_is": 1
  347. }
  348. ]
  349. }
  350. </code></pre><h3 id="访客上传文件"><a name="访客上传文件" href="#访客上传文件"></a>访客上传文件</h3><blockquote>
  351. <p>访客发送图片视频声音等需要的上传文件接口</p>
  352. </blockquote><p><strong>url</strong><br><code>/upload/upFile</code></p><p><strong>参数</strong></p><pre><code data-origin="<pre><code>type = 'xxx'//文件类型 image:图片 vedio:视频 voice:声音 file:文件
  353. </code></pre>">type = 'xxx'//文件类型 image:图片 vedio:视频 voice:声音 file:文件
  354. </code></pre><p><strong>返回</strong></p><pre><code data-origin="<pre><code>{
  355. &quot;status&quot;:200,
  356. &quot;msg&quot;:&quot;success&quot;,
  357. &quot;data&quot;:{
  358. &quot;ext&quot;:&quot;png&quot;,
  359. &quot;name&quot;:&quot;db424020d3764c93fd540c81d226478d.png&quot;,
  360. &quot;path&quot;:&quot;http://www.chat.com/uploads/image/20190123/db424020d3764c93fd540c81d226478d.png&quot;
  361. }
  362. }
  363. </code></pre>">{
  364. "status":200,
  365. "msg":"success",
  366. "data":{
  367. "ext":"png",
  368. "name":"db424020d3764c93fd540c81d226478d.png",
  369. "path":"http://www.chat.com/uploads/image/20190123/db424020d3764c93fd540c81d226478d.png"
  370. }
  371. }
  372. </code></pre><h3 id="客服上传文件"><a name="客服上传文件" href="#客服上传文件"></a>客服上传文件</h3><blockquote>
  373. <p>客服发送图片视频声音等需要的上传文件接口</p>
  374. </blockquote><p><strong>url</strong><br><code>/admin/upload/upFile</code></p><p><strong>参数</strong></p><pre><code data-origin="<pre><code>type = 'xxx'//文件类型 image:图片 video:视频 voice:声音 file:文件
  375. </code></pre>">type = 'xxx'//文件类型 image:图片 video:视频 voice:声音 file:文件
  376. </code></pre><p><strong>返回</strong></p><pre><code data-origin="<pre><code>{
  377. &quot;status&quot;:200,
  378. &quot;msg&quot;:&quot;success&quot;,
  379. &quot;data&quot;:{
  380. &quot;ext&quot;:&quot;png&quot;,
  381. &quot;name&quot;:&quot;db424020d3764c93fd540c81d226478d.png&quot;,
  382. &quot;path&quot;:&quot;http://www.chat.com/uploads/image/20190123/db424020d3764c93fd540c81d226478d.png&quot;
  383. }
  384. }
  385. </code></pre>">{
  386. "status":200,
  387. "msg":"success",
  388. "data":{
  389. "ext":"png",
  390. "name":"db424020d3764c93fd540c81d226478d.png",
  391. "path":"http://www.chat.com/uploads/image/20190123/db424020d3764c93fd540c81d226478d.png"
  392. }
  393. }
  394. </code></pre><h3 id="客户留言"><a name="客户留言" href="#客户留言"></a>客户留言</h3><blockquote>
  395. <p>当没有客服在线的时候调用留言接口</p>
  396. </blockquote><p><strong>url</strong><br><code>/chat/note</code></p><p><strong>参数</strong></p><pre><code data-origin="<pre><code>code = 'xxx'//会话唯一的code
  397. name='xxx'//姓名
  398. guest_phone = 'xxx'//电话
  399. message_content = 'xxx'//留言内容
  400. fiel = 'xxx'//上传的附件地址 非必填
  401. </code></pre>">code = 'xxx'//会话唯一的code
  402. name='xxx'//姓名
  403. guest_phone = 'xxx'//电话
  404. message_content = 'xxx'//留言内容
  405. fiel = 'xxx'//上传的附件地址 非必填
  406. </code></pre><p><strong>返回</strong></p><pre><code data-origin="<pre><code>{
  407. &quot;status&quot;: 200,
  408. &quot;msg&quot;: &quot;success&quot;
  409. }
  410. </code></pre>">{
  411. "status": 200,
  412. "msg": "success"
  413. }
  414. </code></pre><h3 id="客户评论"><a name="客户评论" href="#客户评论"></a>客户评论</h3><blockquote>
  415. <p>客服结束会话后客户进行评论</p>
  416. </blockquote><p><strong>url</strong><br><code>/chat/comment</code></p><p><strong>参数</strong></p><pre><code data-origin="<pre><code>code = 'xxx'//会话唯一的code
  417. comment = 1//评论星级 1-5
  418. </code></pre>">code = 'xxx'//会话唯一的code
  419. comment = 1//评论星级 1-5
  420. </code></pre><p><strong>返回</strong></p><pre><code data-origin="<pre><code>{
  421. &quot;status&quot;: 200,
  422. &quot;msg&quot;: &quot;success&quot;
  423. }
  424. </code></pre>">{
  425. "status": 200,
  426. "msg": "success"
  427. }
  428. </code></pre><h3 id="客户常见问题"><a name="客户常见问题" href="#客户常见问题"></a>客户常见问题</h3><blockquote>
  429. <p>客服获取常见问题回答</p>
  430. </blockquote><p><strong>url</strong><br><code>/chat/question</code></p><p><strong>参数</strong></p><pre><code data-origin="<pre><code>code = 'xxx'//会话唯一的code
  431. reply_id = 1//常见问题的id
  432. </code></pre>">code = 'xxx'//会话唯一的code
  433. reply_id = 1//常见问题的id
  434. </code></pre><p><strong>返回</strong></p><pre><code data-origin="<pre><code>{
  435. &quot;status&quot;: 200,
  436. &quot;msg&quot;: &quot;success&quot;
  437. }
  438. </code></pre>">{
  439. "status": 200,
  440. "msg": "success"
  441. }
  442. </code></pre>
  443. <footer style="position:fixed; font-size:.8em; text-align:right; bottom:0px; margin-left:-25px; height:20px; width:100%;">generated by <a href="http://pad.haroopress.com" target="_blank">haroopad</a></footer>
  444. </body>
  445. </html>