<template>
|
<div class="message-detail-page">
|
<x-header :left-options="{backText: ''}">消息详情</x-header>
|
<div style="margin: auto 12px;" v-html="messageContent"></div>
|
</div>
|
</template>
|
|
<script>
|
/**
|
* Created by z.x.q on 2018/3/22.
|
* 我的--消息详情
|
*/
|
import {XHeader} from 'vux';
|
import system from '../../api/api';
|
import statusCodeManage from '../../api/statusCodeManage';
|
|
export default {
|
name: 'f-message-detail',
|
components: {
|
XHeader
|
},
|
data(){
|
return {
|
messageContent: ''
|
}
|
},
|
methods: {
|
init (noticeId) {
|
let _this = this;
|
system.fetchNoticeDetail ({noticeId: noticeId}).then((res) =>{
|
_this.messageContent = res.body.detailContent;
|
system.homeNotice().then(
|
res=>{
|
if(res.body.length){
|
window.sessionStorage.setItem('unRead',JSON.stringify(res.body));
|
}else{
|
window.sessionStorage.setItem('unRead','[]');
|
}
|
},
|
err=>{
|
statusCodeManage.showTipOfStatusCode(err,_this);
|
}
|
)
|
}, (error)=>{
|
|
});
|
}
|
},
|
activated: function () {
|
this.messageContent = '';
|
this.$store.commit('UPDATE_DIRECTION', {direction: 'in'});
|
// 获取资讯的内容
|
let noticeId = this.$route.params.id;
|
this.init(noticeId);
|
},
|
deactivated () {
|
this.$store.commit('UPDATE_DIRECTION', {direction: 'none'});
|
}
|
}
|
</script>
|
|
<style lang="less">
|
@import "../../style/mixin.less";
|
|
.message-detail-page {
|
.vux-header {
|
.color-linear-gradient(@color-primary-light, @color-primary, 90deg);
|
.vux-header-title {
|
font-size: 18px;
|
}
|
.vux-header-left {
|
.left-arrow:before {
|
border: solid 1px @color-white;
|
border-width: 2px 0 0 2px;
|
}
|
|
}
|
}
|
}
|
|
|
</style>
|