You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 line
60 KiB
1 line
60 KiB
5 years ago
|
webpackJsonp([152],{2336:function(n,t,e){"use strict";var a=e(30),i=(e.n(a),e(31)),c=e.n(i),o=e(70),r=(e.n(o),e(71)),A=e.n(r),p=e(66),s=(e.n(p),e(67)),u=e.n(s),l=e(0),g=e.n(l),m=e(12),d=e.n(m),f=e(5),h=function(n,t,e){return t&&C(n.prototype,t),e&&C(n,e),n};function C(n,t){for(var e=0;e<t.length;e++){var a=t[e];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(n,a.key,a)}}var b=(function(n,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(n,t):n.__proto__=t)}(B,l.Component),h(B,[{key:"componentDidMount",value:function(){this.Recentcontacts()}},{key:"render",value:function(){var e=this,n=this.state,t=n.Pleaseselectthesender,a=n.inputvulue,i=n.inputvulues,o=n.floatingboxdisplay,r=n.users,p=n.floatingboxdisplays,s=n.Recentcontacts,l=n.isSpin;return g.a.createElement(c.a,{keyboard:!1,closable:!1,footer:null,destroyOnClose:!0,title:"写私信",centered:!0,visible:this.props.modalsType,width:"550px"},g.a.createElement("div",null,g.a.createElement("div",{className:"mb20 pr"},g.a.createElement("div",{className:"myw100baifenbi"},g.a.createElement(u.a,{className:"",placeholder:"发送给...",value:a,onKeyPress:this.handleEnterKey,onBlur:this.myonBlur,onFocus:this.myonFocus,onChange:this.setdatafunsval,suffix:g.a.createElement("img",{src:Object(f.M)("images/educoder/icon/search.svg"),onClick:function(){return e.search_message_person()}})})),g.a.createElement("div",{className:"recently_person",style:!1===o?{display:"none"}:{display:"block"}},g.a.createElement(A.a,{size:"large",className:"myw100baifenbi",spinning:l},g.a.createElement("p",{className:"padding10-20 color-grey-9 cdefault"},!1===s?"最近联系人":"搜索结果"),r.map(function(n,t){return g.a.createElement("p",{className:"clearfix recently_item",key:t,onMouseDown:function(){return e.Getuserinformation(n)}},g.a.createElement("img",{alt:"头像",className:"radius fl mr10 myimgw48 myimgh48",src:Object(f.M)("images/"+n.image_url)}),g.a.createElement("span",{className:"recently_name"},n.name))})))),g.a.createElement("div",{className:"writeLetter_Info"},g.a.createElement("textarea",{className:"writeLetter_text greyInput",value:i,onChange:this.setdatafunsvals,name:"content",id:"writeLetter_text",maxLength:"200"}),g.a.createElement("span",{className:"longchar"},"200"))),!0===t?g.a.createElement("p",{className:"color-orange-tip ",style:{height:"25px"}},g.a.createElement("span",{id:"notice_send_person"},"请选择发送对象")):!1===p?g.a.createElement("p",{style:{height:"25px"}}):"",!0===p?g.a.createElement("p",{className:"color-orange-tip ",style:{height:"25px"}},g.a.createElement("span",{id:"notice_send_person"},"请输入发送内容")):"",g.a.createElement("p",{className:"clearfix edu-txt-center"},g.a.createElement("a",{onClick:function(){return e.HideModal()},className:"pop_close task-btn mr30"},"取消"),g.a.createElement("a",{className:"task-btn task-btn-orange",onClick:function(){return e.OKModal()},id:"submit_send_letter"},"确定")))}}]),B);function B(n){!function(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function")}(this,B);var i=function(n,t){if(!n)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?n:t}(this,(B.__proto__||Object.getPrototypeOf(B)).call(this,n));return i.Recentcontacts=function(){i.setState({isSpin:!0});var n="/users/"+i.props.current_user.user_id+"/recent_contacts.json";d.a.get(n).then(function(n){void 0!==n&&i.setState({users:n.data.users,Recentcontacts:!1,floatingboxdisplay:!1,isSpin:!1})}).catch(function(n){i.setState({isSpin:!1})})},i.SendprivatemessageAPI=function(n,t){var e="/users/"+i.props.current_user.user_id+"/private_messages.json",a={target_id:n,content:t=Object(f.T)(t)};d.a.post(e,a).then(function(n){void 0!==n&&(i.setState({floatingboxdisplays
|