<template>
    <view>
        <u-navbar back-icon-color="#000000" :background="background" title-color="#000000" :border-bottom="false">
        </u-navbar>
        <view class="title">
            {{ title }}
        </view>
        <view class="creat_at">
            {{create_at}}
        </view>
        <view class="u-content">
            <u-parse :html="body" :tag-style="style"></u-parse>
        </view>
    </view>
</template>

<script>
export default {
    data() {
        return {
            title: "",
            body: "",
            create_at: "",
        };
    },
    onLoad() {
        getApp().trackPage("消息通知详情页");
        var that = this;
        const eventChannel = this.getOpenerEventChannel();
        eventChannel.on("acceptDataFromLearn", function (data) {
            that.title = data.title;
            that.body = data.body;
            that.create_at = data.create_at;
            console.log(data);
        });
        this.$u.mpShare.path = "";
    },
};
</script>

<style>
.title {
    font-size: 32rpx;
    font-weight: bold;
    margin-left: 30rpx;
    margin-top: 30rpx;
}
.u-content {
    font-size: 24rpx;
    line-height: 36rpx;
    color: #666666;
    margin-left: 30rpx;
    margin-right: 30rpx;
}
.creat_at {
    font-size: 24rpx;
    color: #999999;
    margin-left: 30rpx;
    margin-top: 20rpx;
}
rich-text {
    margin-top: 40rpx;
    display: block;
}
</style>
