(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-5a46fe68"],{3759:function(e,t,s){"use strict";s.r(t);var a=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("Card",{attrs:{shadow:""}},[s("div",[s("div",{staticClass:"message-page-con message-category-con"},[s("Menu",{attrs:{width:"auto","active-name":"unread"},on:{"on-select":e.handleSelect}},[s("MenuItem",{attrs:{name:"unread"}},[s("span",{staticClass:"category-title"},[e._v("未读消息")]),s("Badge",{staticStyle:{"margin-left":"10px"},attrs:{count:e.messageUnreadCount}})],1),s("MenuItem",{attrs:{name:"readed"}},[s("span",{staticClass:"category-title"},[e._v("已读消息")]),s("Badge",{staticStyle:{"margin-left":"10px"},attrs:{"class-name":"gray-dadge",count:e.messageReadedCount}})],1),s("MenuItem",{attrs:{name:"trash"}},[s("span",{staticClass:"category-title"},[e._v("回收站")]),s("Badge",{staticStyle:{"margin-left":"10px"},attrs:{"class-name":"gray-dadge",count:e.messageTrashCount}})],1)],1)],1),s("div",{staticClass:"message-page-con message-list-con"},[e.listLoading?s("Spin",{attrs:{fix:"",size:"large"}}):e._e(),s("Menu",{class:e.titleClass,attrs:{width:"auto","active-name":""},on:{"on-select":e.handleView}},e._l(e.messageList,(function(t){return s("MenuItem",{key:"msg_"+t.msg_id,attrs:{name:t.msg_id}},[s("div",[s("p",{staticClass:"msg-title"},[e._v(e._s(t.title))]),s("Badge",{attrs:{status:"default",text:t.create_time}}),s("Button",{directives:[{name:"show",rawName:"v-show",value:"unread"!==e.currentMessageType,expression:"currentMessageType !== 'unread'"}],staticStyle:{float:"right","margin-right":"20px"},style:{display:t.loading?"inline-block !important":""},attrs:{loading:t.loading,size:"small",icon:"readed"===e.currentMessageType?"md-trash":"md-redo",title:"readed"===e.currentMessageType?"删除":"还原",type:"text"},nativeOn:{click:function(s){return s.stopPropagation(),e.removeMsg(t)}}})],1)])})),1)],1),s("div",{staticClass:"message-page-con message-view-con"},[e.contentLoading?s("Spin",{attrs:{fix:"",size:"large"}}):e._e(),s("div",{staticClass:"message-view-header"},[s("h2",{staticClass:"message-view-title"},[e._v(e._s(e.showingMsgItem.title))]),s("time",{staticClass:"message-view-time"},[e._v(e._s(e.showingMsgItem.create_time))])]),s("div",{domProps:{innerHTML:e._s(e.messageContent)}})],1)])])},n=[],i=(s("5ab2"),s("6d57"),s("e10e"),s("e697"),s("70ea")),r=s("ae8c");function o(e,t){var s=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),s.push.apply(s,a)}return s}function c(e){for(var t=1;t<arguments.length;t++){var s=null!=arguments[t]?arguments[t]:{};t%2?o(Object(s),!0).forEach((function(t){Object(i["a"])(e,t,s[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(s)):o(Object(s)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(s,t))}))}return e}var g={unread:"messageUnreadList",readed:"messageReadedList",trash:"messageTrashList"},d={name:"message_page",data:function(){return{listLoading:!0,contentLoading:!1,currentMessageType:"unread",messageContent:"",showingMsgItem:{}}},computed:c(c({},Object(r["e"])({messageUnreadList:function(e){return e.user.messageUnreadList},messageReadedList:function(e){return e.user.messageReadedList},messageTrashList:function(e){return e.user.messageTrashList},messageList:function(){return this[g[this.currentMessageType]]},titleClass:function(){return{"not-unread-list":"unread"!==this.currentMessageType}}})),Object(r["c"])(["messageUnreadCount","messageReadedCount","messageTrashCount"])),methods:c(c(c({},Object(r["d"])([])),Object(r["b"])(["getContentByMsgId","getMessageList","hasRead","removeReaded","restoreTrash"])),{},{stopLoading:function(e){this[e]=!1},handleSelect:function(e){this.currentMessageType=e},handleView:function(e){var t=this;this.contentLoading=!0,this.getContentByMsgId({msg_id:e}).then((function(s){t.messageContent=s;var a=t.messageList.find((function(t){return t.msg_id===e}));a&&(t.showingMsgItem=a),"unread"===t.currentMessageType&&t.hasRead({msg_id:e}),t.stopLoading("contentLoading")})).catch((function(){t.stopLoading("contentLoading")}))},removeMsg:function(e){e.loading=!0;var t=e.msg_id;"readed"===this.currentMessageType?this.removeReaded({msg_id:t}):this.restoreTrash({msg_id:t})}}),mounted:function(){var e=this;this.listLoading=!0,this.getMessageList().then((function(){return e.stopLoading("listLoading")})).catch((function(){return e.stopLoading("listLoading")}))}},u=d,m=(s("ac69"),s("4023")),l=Object(m["a"])(u,a,n,!1,null,null,null);t["default"]=l.exports},"677d":function(e,t,s){},ac69:function(e,t,s){"use strict";var a=s("677d"),n=s.n(a);n.a}}]);