(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-b1cefaa8"],{"46e4":function(t,a,i){},6686:function(t,a,i){"use strict";i.r(a);var e=function(){var t=this,a=t.$createElement,i=t._self._c||a;return i("div",{staticClass:"app-container"},[i("div",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticClass:"detail-container"},[i("div",{staticClass:"detail-header"},[i("div",{staticClass:"back",on:{click:t.onBack}},[i("i",{staticClass:"el-icon-arrow-left"}),t._v(" 返回 ")])]),i("el-card",{staticClass:"margin-top message-card",attrs:{shadow:"never"}},[i("div",{staticClass:"message-title"},[i("i",{staticClass:"el-icon-message-solid"}),i("span",[t._v(t._s(t.detail.title||"--"))])]),i("div",{staticClass:"message-meta"},[i("el-tag",{attrs:{type:2==t.type?"danger":"primary",size:"small",effect:"plain"}},[i("i",{staticClass:"el-icon-bell"}),t._v(" "+t._s(2==t.type?"系统消息":"站内消息")+" ")]),i("span",{staticClass:"meta-time"},[i("i",{staticClass:"el-icon-time"}),t._v(" "+t._s(t.detail.createtime||"--")+" ")])],1),i("el-divider"),i("div",{staticClass:"detail-item full-width"},[i("label",[t._v("消息内容")]),i("div",{staticClass:"rich-text-content",domProps:{innerHTML:t._s(t.detail.content)}})])],1),i("div",{staticClass:"detail-actions margin-top"},[i("el-button",{on:{click:t.onBack}},[t._v("返回")])],1)],1),i("copyright")],1)},s=[],n=i("7f70"),l={name:"SiteMessageDetail",data:function(){return{loading:!1,id:"",detail:{},type:""}},watch:{$route:{handler:function(t,a){t.params.id==a.params.id&&t.query.type==a.query.type||this.init()}}},created:function(){},methods:{init:function(){this.id=this.$route.params.id,this.type=this.$route.query.type;var t=this.$route.params.preload;t&&2==t.type?(this.detail=Object(n["a"])({},t),1!=t.status&&this.markRead()):this.getDetail()},onBack:function(){this.$router.go(-1)},getDetail:function(){var t=this;this.id&&(this.loading=!0,this.api.get("message/site/detail",{id:this.id}).then((function(a){t.loading=!1,1==a.code?(t.detail=a.data,a.data&&1!=a.data.read&&t.markRead()):t.$util.error(a.message)})).catch((function(){t.loading=!1})))},markRead:function(){this.api.post("message/site/read",{id:this.id,type:this.type})}}},c=l,d=(i("f985"),i("3d7a")),o=Object(d["a"])(c,e,s,!1,null,"146f3cec",null);a["default"]=o.exports},f985:function(t,a,i){"use strict";i("46e4")}}]);