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