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.
p6tsc84h5/static/js/22.17545929.chunk.js

1 line
11 KiB

webpackJsonp([22],{1921:function(e,n,t){var r=t(4318);"string"==typeof r&&(r=[[e.i,r,""]]);var a={hmr:!1,transform:void 0};t(289)(r,a);r.locals&&(e.exports=r.locals)},4318:function(e,n,t){(e.exports=t(288)(!0)).push([e.i,".myw120{width:120px}.myh120{height:120px}.myimgw48{width:48px}.myimgh48{height:48px}.mycenter{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center}.myw100baifenbi{width:100%}.ant-modal-header{border-radius:0!important}.ridinglist-subs{border-bottom:1px solid #f5f5f5;padding:25px 0}.search-new{width:100%!important;margin-bottom:0!important;height:32px;position:relative}.search-span{display:block;position:absolute;width:100%;height:100%;left:0;top:0;background-color:#f4f4f4;border:1px solid #eaeaea;border-radius:4px;z-index:1}.search-new-input{width:100%!important;height:32px;padding-left:5px;border:none;-webkit-box-sizing:border-box;box-sizing:border-box;background:none;outline:none;position:absolute;left:0;top:1px;z-index:2}.search-new .searchicon,.search-new a,.search-new img{cursor:pointer;position:absolute;right:2px;top:2px;z-index:2}.search-new a{top:0}.search-new-input:focus+.search-span{background-color:#fff}.task-hide-2{height:40px;overflow:hidden;-o-text-overflow:ellipsis;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2}.msheight30{height:30px}.private-list::-webkit-scrollbar{width:8px;height:8px}.private-list::-webkit-scrollbar-thumb{background-color:#e3ebf4;-webkit-box-shadow:0 0 #000;box-shadow:0 0 #000}.private-list::-webkit-scrollbar-track{border-radius:3px;-webkit-box-shadow:inset 0 0 6px transparent;background-color:#fff}.dialogPanel::-webkit-scrollbar{width:8px;height:8px}.dialogPanel::-webkit-scrollbar-thumb{background-color:#e3ebf4;-webkit-box-shadow:0 0 #000;box-shadow:0 0 #000}.dialogPanel::-webkit-scrollbar-track{border-radius:3px;-webkit-box-shadow:inset 0 0 6px transparent;background-color:#fff}","",{version:3,sources:["/Users/yangshuming/Desktop/new__educode/educoder/public/react/src/modules/message/css/messagemy.css"],names:[],mappings:"AAAA,QACI,WAAa,CAChB,AACD,QACI,YAAc,CACjB,AACD,UACI,UAAY,CACf,AACD,UACI,WAAa,CAChB,AACD,UACI,oBAAqB,AACrB,aAAc,AACd,qBAAsB,AAClB,sBAAuB,CAC9B,AACD,gBACI,UAAY,CACf,AACD,kBACI,yBAA8B,CACjC,AACD,iBACI,gCAAiC,AACjC,cAAkB,CACrB,AACD,YACI,qBAAuB,AAC1B,0BAA8B,AAC/B,YAAa,AACb,iBAAmB,CAAC,AACpB,aACA,cAAe,AACf,kBAAmB,AACnB,WAAY,AACZ,YAAa,AACb,OAAU,AACV,MAAS,AACT,yBAA0B,AAC1B,yBAA0B,AAC1B,kBAAmB,AACnB,SAAW,CACV,AACD,kBACA,qBAAuB,AACvB,YAAa,AACb,iBAAkB,AAClB,YAAa,AACb,8BAA+B,AACvB,sBAAuB,AAC/B,gBAAiB,AACjB,aAAc,AACd,kBAAmB,AACnB,OAAU,AACV,QAAS,AACT,SAAW,CAAC,AACZ,sDACA,eAAgB,AAChB,kBAAmB,AACnB,UAAW,AACX,QAAS,AACT,SAAW,CACV,AACD,cAAc,KAAQ,CAAC,AACvB,qCAAuC,qBAAuB,CAAC,AAC/D,aACK,YAAa,AACd,gBAAiB,AACjB,0BAA2B,AACxB,uBAAwB,AAC3B,oBAAqB,AACrB,oBAAsB,CACzB,AAED,YACI,WAAa,CAChB,AAGD,iCACI,UAAW,AACX,UAAY,CACf,AAGD,uCACI,yBAA0B,AAC1B,4BAAkC,AAC1B,mBAA0B,CACrC,AAGD,uCACI,kBAAkB,AAClB,6CAAmD,AACnD,qBAAwB,CAC3B,AAED,gCACI,UAAW,AACX,UAAY,CACf,AAGD,sCACI,yBAA0B,AAC1B,4BAAkC,AAC1B,mBAA0B,CACrC,AAGD,sCACI,kBAAkB,AAClB,6CAAmD,AACnD,qBAAwB,CAC3B",file:"messagemy.css",sourcesContent:[".myw120{\n width: 120px;\n}\n.myh120{\n height: 120px;\n}\n.myimgw48{\n width: 48px;\n}\n.myimgh48{\n height: 48px;\n}\n.mycenter{\n display: -ms-flexbox;\n display: flex;\n -ms-flex-pack: center;\n justify-content: center\n}\n.myw100baifenbi{\n width: 100%;\n}\n.ant-modal-header{\n border-radius: 0px !important;\n}\n.ridinglist-subs{\n border-bottom: 1px solid #F5F5F5;\n padding: 25px 0px;\n}\n.search-new{\n width: 100% !important;\n margin-bottom: 0px !important;\nheight: 32px;\nposition: relative;}\n.search-span{\ndisplay: block;\nposition: absolute;\nwidth: 100%;\nheight: 100%;\nleft: 0px;\ntop: 0px;\nbackground-color: #F4F4F4;\nborder: 1px solid #EAEAEA;\nborder-radius: 4px;\nz-index: 1;\n}\n.search-new-input{\nwidth: 100% !important;\nheight: 32px;\npadding-left: 5px;\nborder: none;\n-webkit-box-sizing: border-box;\n box-sizing: border-box;\nbackground: none;\noutline: none;\nposition: absolute;\nleft: 0px;\ntop: 1px;\nz-index: 2;}\n.search-new img,.search-new a,.search-new .searchicon{\ncursor: pointer;\nposition: absolute;\nright: 2px;\ntop: 2px;\nz-index: 2;\n}\n.search-new a{top: 0px}\n.search-new-input:focus + .search-span{background-color: #fff;}\n.task-hide-2\n {height: 40px;\n overflow: hidden;\n -o-text-overflow: ellipsis;\n text-overflow: ellipsis;\n display: -webkit-box;\n -webkit-line-clamp: 2;\n}\n\n.msheight30{\n height: 30px;\n}\n\n/*滚动条*/\n.private-list::-webkit-scrollbar {\n width: 8px;\n height: 8px;\n}\n\n\n.private-list::-webkit-scrollbar-thumb {\n background-color: #E3EBF4;\n -webkit-box-shadow: 0px 0px black;\n box-shadow: 0px 0px black;\n}\n\n\n.private-list::-webkit-scrollbar-track {\n border-radius:3px;\n -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0);\n background-color: white;\n}\n/*滚动条*/\n.dialogPanel::-webkit-scrollbar {\n width: 8px;\n height: 8px;\n}\n\n\n.dialogPanel::-webkit-scrollbar-thumb {\n background-color: #E3EBF4;\n -webkit-box-shadow: 0px 0px black;\n box-shadow: 0px 0px black;\n}\n\n\n.dialogPanel::-webkit-scrollbar-track {\n border-radius:3px;\n -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0);\n background-color: white;\n}\n"],sourceRoot:""}])},790:function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=t(0),i=t.n(r),a=t(314),o=t(5),s=t(12),A=t.n(s),c=t(1921),l=(t.n(c),t(56),t(45)),u=t(316),p=t(317),d=t.n(p),b=function(e,n,t){return n&&h(e.prototype,n),t&&h(e,t),e};function h(e,n){for(var t=0;t<n.length;t++){var r=n[t];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var g=d()({loader:function(){return t.e(154).then(t.bind(null,4319))},loading:u.a}),m=d()({loader:function(){return t.e(152).then(t.bind(null,4320))},loading:u.a}),C=d()({loader:function(){return t.e(174).then(t.bind(null,4321))},loading:u.a}),f=(function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function, not "+typeof n);e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),n&&(Object.setPrototypeOf?Object.setPrototypeOf(e,n):e.__proto__=n)}(x,r.Component),b(x,[{key:"componentDidMount",value:function(){}},{key:"componentDidUpdate",value:function(e){e.current_user!==this.props.current_user&&this.Messageprivatemessageunreadmessage(this.props.current_user.login)}},{key:"homeworkendss1",value:function(e){try{e.getdatas()}catch(e){}}},{key:"homeworkendss2",value:function(e){try{e.getdatas2()}catch(e){}}},{key:"render",value:function(){var t=this,e=this.state,n=e.routing,r=e.unread_message_count,a=e.unread_tiding_count;return i.a.createElement("div",{className:"newMain clearfix"},i.a.createElement("div",{className:"educontent mt20 mb80 clearfix"},i.a.createElement("div",{className:"leftPanel"},i.a.createElement("div",{className:"mb20 edu-back-white pt40 pb40 edu-txt-center"},i.a.createElement("a",null,void 0!==this.props.current_user?i.a.createElement("img",{className:"person radius myw120 myh120",src:Object(o.M)("images/"+this.props.current_user.image_url)}):""),i.a.createElement("p",{className:"font-24 lineh-25 mt10"},this.props.current_user&&this.props.current_user.username),i.a.createElement("p",{className:"color-grey-6 mt5"},this.props.current_user&&this.props.current_user.user_identity)),i.a.createElement("ul",{className:"edu-back-white"},i.a.createElement("li",{className:1===n?"nav pr active":"nav pr"},i.a.createElement("a",{onClick:function(){return t.SwitchonClick(1,t.child)}},"消息"),0===a?"":0<a?i.a.createElement("span",{className:"new-info"},a):""),i.a.createElement("li",{className:2===n?"nav pr active":3===n?"nav pr active":"nav pr"},i.a.createElement("a",{onClick:function(){return t.SwitchonClick(2,t.child)}},"私信"),0===r?"":0<r?i.a.createElement("span",{className:"new-info"},r):""))),i.a.createElement("div",{className:"rightPanel"},i.a.createElement("div",{className:"clearfix"},i.a.createElement(l.e,null,i.a.createElement(l.d,{path:"/messages/:userid/user_tidings",render:function(e){return i.a.createElement(g,Object.assign({triggerRef:t.bindRef},t.state,t.props,e,{Message2:function(){return t.Message2()},Mtab:function(e){return t.myxiaoxisixintab(e)}}))}}),i.a.createElement(l.d,{path:"/messages/:userid/private_messages",render:function(e){return i.a.createElement(m,Object.assign({triggerRef:t.bindRef},t.state,t.props,e,{Message2:function(){return t.Message2()},Modifyur:function(e,n){return t.Modifyur(e,n)},Mtab:function(e){return t.myxiaoxisixintab(e)}}))}}),i.a.createElement(l.d,{path:"/messages/:userid/message_detail",render:function(e){return i.a.createElement(C,Object.assign({triggerRef:t.bindRef},t.state,t.props,e,{Message2:function(){return t.Message2()},Modifyur:function(e){return t.Modifyur(e)},Mtab:function(e){return t.myxiaoxisixintab(e)}}))}}))))))}}]),x);function x(e){!function(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}(this,x);var t=function(e,n){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!n||"object"!=typeof n&&"function"!=typeof n?e:n}(this,(x.__proto__||Object.getPrototypeOf(x)).call(this,e));return t.Messageprivatemessageunreadmessage=function(e){var n="/users/"+e+"/unread_message_info.json";A.a.get(n).then(function(e){void 0!==e&&t.setState({unread_message_count:e.data.unread_message_count,unread_tiding_count:e.data.unread_tiding_count})}).catch(function(e){console.log(e)})},t.SwitchonClick=function(e,n){t.setState({routing:e}),t.Messageprivatemessageunreadmessage(t.props.current_user.login),1===e&&(t.props.history.replace("/messages/"+t.props.current_user.login+"/user_tidings"),t.homeworkendss1(n)),2===e&&(t.props.history.replace("/messages/"+t.props.current_user.login+"/private_messages"),t.homeworkendss2(n))},t.Message2=function(e){t.setState({unread_message_count:parseInt(e.unread_message_count),unread_tiding_count:parseInt(e.unread_tiding_count)})},t.Modifyur=function(e,n){e<3?(t.setState({routing:e}),1===e&&t.props.history.replace("/messages/"+t.props.current_user.login+"/user_tidings"),2===e&&t.props.history.replace("/messages/"+t.props.current_user.login+"/private_messages")):(t.setState({routing:e}),console.log("22222222222"),t.props.history.replace("/messages/"+t.props.current_user.login+"/message_detail?target_ids="+n))},t.myCome=function(e){window.location.href="/users/"+e.target.login},t.myxiaoxisixintab=function(e){1===e&&t.setState({routing:1}),2===e&&t.setState({routing:2}),3===e&&t.setState({routing:3})},t.bindRef=function(e){t.child=e},t.state={routing:1,unread_message_count:0,unread_tiding_count:0},t}n.default=Object(o.w)()(Object(a.a)(f))}});