forgeplus/public/react/build/static/js/34.2741f759.chunk.js

98 lines
17 KiB
JavaScript

webpackJsonp([34],{
/***/ 2500:
/***/ (function(module, exports, __webpack_require__) {
// style-loader: Adds some css to the DOM by adding a <style> tag
// load the styles
var content = __webpack_require__(4903);
if(typeof content === 'string') content = [[module.i, content, '']];
// Prepare cssTransformation
var transform;
var options = {"hmr":false}
options.transform = transform
// add the styles to the DOM
var update = __webpack_require__(300)(content, options);
if(content.locals) module.exports = content.locals;
/***/ }),
/***/ 4903:
/***/ (function(module, exports, __webpack_require__) {
exports = module.exports = __webpack_require__(299)(true);
// imports
// module
exports.push([module.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/jasder/work/trustie3.0/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":""}]);
// exports
/***/ }),
/***/ 845:
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__modules_tpm_TPMIndexHOC__ = __webpack_require__(323);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_educoder__ = __webpack_require__(5);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_axios__ = __webpack_require__(8);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_axios___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_axios__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__css_messagemy_css__ = __webpack_require__(2500);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__css_messagemy_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4__css_messagemy_css__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_react_router__ = __webpack_require__(78);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react_router_dom__ = __webpack_require__(48);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__Loading__ = __webpack_require__(324);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_react_loadable__ = __webpack_require__(325);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_react_loadable___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_8_react_loadable__);
var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor);}}return function(Constructor,protoProps,staticProps){if(protoProps)defineProperties(Constructor.prototype,protoProps);if(staticProps)defineProperties(Constructor,staticProps);return Constructor;};}();function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function");}}function _possibleConstructorReturn(self,call){if(!self){throw new ReferenceError("this hasn't been initialised - super() hasn't been called");}return call&&(typeof call==="object"||typeof call==="function")?call:self;}function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function, not "+typeof superClass);}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:false,writable:true,configurable:true}});if(superClass)Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass;}// MessagSub 消息自路由
// MessagePrivate 私信
var MessagSub=__WEBPACK_IMPORTED_MODULE_8_react_loadable___default()({loader:function loader(){return __webpack_require__.e/* import() */(195).then(__webpack_require__.bind(null, 4904));},loading:__WEBPACK_IMPORTED_MODULE_7__Loading__["a" /* default */]});var MessagePrivate=__WEBPACK_IMPORTED_MODULE_8_react_loadable___default()({loader:function loader(){return __webpack_require__.e/* import() */(193).then(__webpack_require__.bind(null, 4905));},loading:__WEBPACK_IMPORTED_MODULE_7__Loading__["a" /* default */]});var MessagChat=__WEBPACK_IMPORTED_MODULE_8_react_loadable___default()({loader:function loader(){return __webpack_require__.e/* import() */(218).then(__webpack_require__.bind(null, 4906));},loading:__WEBPACK_IMPORTED_MODULE_7__Loading__["a" /* default */]});var Messagerouting=function(_Component){_inherits(Messagerouting,_Component);function Messagerouting(props){_classCallCheck(this,Messagerouting);var _this=_possibleConstructorReturn(this,(Messagerouting.__proto__||Object.getPrototypeOf(Messagerouting)).call(this,props));_this.Messageprivatemessageunreadmessage=function(user_id){var url='/users/'+user_id+'/unread_message_info.json';__WEBPACK_IMPORTED_MODULE_3_axios___default.a.get(url).then(function(result){if(result===undefined){return;}// console.log("消息未读1");
// console.log(result);
_this.setState({unread_message_count:result.data.unread_message_count,unread_tiding_count:result.data.unread_tiding_count});}).catch(function(error){console.log(error);});};_this.SwitchonClick=function(value,child){_this.setState({routing:value});_this.Messageprivatemessageunreadmessage(_this.props.current_user.login);if(value===1){_this.props.history.replace('/messages/'+_this.props.current_user.login+'/user_tidings');_this.homeworkendss1(child);}if(value===2){_this.props.history.replace('/messages/'+_this.props.current_user.login+'/private_messages');_this.homeworkendss2(child);}};_this.Message2=function(data){// console.log("64");
// console.log(data);
_this.setState({unread_message_count:parseInt(data.unread_message_count),unread_tiding_count:parseInt(data.unread_tiding_count)});};_this.Modifyur=function(i,id){// console.log("跳转到链接1");
// console.log(i);
// console.log(item);
// console.log("跳转到链接2");
if(i<3){_this.setState({routing:i});if(i===1){_this.props.history.replace('/messages/'+_this.props.current_user.login+'/user_tidings');}if(i===2){_this.props.history.replace('/messages/'+_this.props.current_user.login+'/private_messages');}}else{_this.setState({routing:i});console.log("22222222222");_this.props.history.replace('/messages/'+_this.props.current_user.login+'/message_detail?target_ids='+id);}};_this.myCome=function(e){window.location.href="/users/"+e.target.login;};_this.myxiaoxisixintab=function(i){if(i===1){_this.setState({routing:1});}if(i===2){_this.setState({routing:2});}if(i===3){_this.setState({routing:3});}};_this.bindRef=function(ref){_this.child=ref;};_this.state={routing:1,unread_message_count:0,unread_tiding_count:0};return _this;}_createClass(Messagerouting,[{key:'componentDidMount',value:function componentDidMount(){// console.log("Messagerouting");
// console.log(this.props);
// let courstype=this.props.location.search;
// // courstype=courstype.splice('/');
// // courstype=courstype[3];
// // console.log("45");
// console.log(courstype);
// console.log("Messagerouting46");
// console.log(this.props.current_user);
}},{key:'componentDidUpdate',value:function componentDidUpdate(prevProps){// console.log("11111111111");
// console.log(prevProps);
// console.log("22222222222");
// console.log(this.props);
// console.log("33333333333");
if(prevProps.current_user!==this.props.current_user){this.Messageprivatemessageunreadmessage(this.props.current_user.login);// console.log("Messagerouting59");
// console.log(this.props.current_user);
}}//消息未读
//跳转到链接
},{key:'homeworkendss1',value:function homeworkendss1(child){// console.log(child);
// // console.log(this.refs.childModel);
// console.log(child);
try{child.getdatas();}catch(e){}//
}},{key:'homeworkendss2',value:function homeworkendss2(child){// console.log(child);
// // console.log(this.refs.childModel);
// console.log(child);
try{child.getdatas2();}catch(e){}//
}},{key:'render',value:function render(){var _this2=this;var _state=this.state,routing=_state.routing,unread_message_count=_state.unread_message_count,unread_tiding_count=_state.unread_tiding_count;// console.log(this.props);
// console.log(routing);
return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('div',{className:'newMain clearfix'},__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('div',{className:'educontent mt20 mb80 clearfix'},__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('div',{className:'leftPanel'},__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('div',{className:'mb20 edu-back-white pt40 pb40 edu-txt-center'},__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('a',null,this.props.current_user!==undefined?__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('img',{className:'person radius myw120 myh120',src:Object(__WEBPACK_IMPORTED_MODULE_2_educoder__["M" /* getImageUrl */])("images/"+this.props.current_user.image_url)}):""),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('p',{className:'font-24 lineh-25 mt10'},this.props.current_user&&this.props.current_user.username),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('p',{className:'color-grey-6 mt5'},this.props.current_user&&this.props.current_user.user_identity)),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('ul',{className:'edu-back-white'},__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('li',{className:routing===1?"nav pr active":"nav pr"},__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('a',{onClick:function onClick(value,child){return _this2.SwitchonClick(1,_this2.child);}},'\u6D88\u606F'),unread_tiding_count===0?"":unread_tiding_count>0?__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('span',{className:'new-info'},unread_tiding_count):""),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('li',{className:routing===2?"nav pr active":routing===3?"nav pr active":"nav pr"},__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('a',{onClick:function onClick(value,child){return _this2.SwitchonClick(2,_this2.child);}},'\u79C1\u4FE1'),unread_message_count===0?"":unread_message_count>0?__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('span',{className:'new-info'},unread_message_count):""))),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('div',{className:'rightPanel'},__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('div',{className:'clearfix'},__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_6_react_router_dom__["f" /* Switch */],null,__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_6_react_router_dom__["e" /* Route */],{path:'/messages/:userid/user_tidings',render:function render(props){return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(MessagSub,Object.assign({triggerRef:_this2.bindRef},_this2.state,_this2.props,props,{Message2:function Message2(){return _this2.Message2();},Mtab:function Mtab(i){return _this2.myxiaoxisixintab(i);}}));}}),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_6_react_router_dom__["e" /* Route */],{path:'/messages/:userid/private_messages',render:function render(props){return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(MessagePrivate,Object.assign({triggerRef:_this2.bindRef},_this2.state,_this2.props,props,{Message2:function Message2(){return _this2.Message2();},Modifyur:function Modifyur(i,item){return _this2.Modifyur(i,item);},Mtab:function Mtab(i){return _this2.myxiaoxisixintab(i);}}));}}),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_6_react_router_dom__["e" /* Route */],{path:'/messages/:userid/message_detail',render:function render(props){return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(MessagChat,Object.assign({triggerRef:_this2.bindRef},_this2.state,_this2.props,props,{Message2:function Message2(){return _this2.Message2();},Modifyur:function Modifyur(i){return _this2.Modifyur(i);},Mtab:function Mtab(i){return _this2.myxiaoxisixintab(i);}}));}}))))));}}]);return Messagerouting;}(__WEBPACK_IMPORTED_MODULE_0_react__["Component"]);/* harmony default export */ __webpack_exports__["default"] = (Object(__WEBPACK_IMPORTED_MODULE_2_educoder__["w" /* SnackbarHOC */])()(Object(__WEBPACK_IMPORTED_MODULE_1__modules_tpm_TPMIndexHOC__["a" /* TPMIndexHOC */])(Messagerouting)));
/***/ })
});