liangjin
2021-04-04 6ab8cacad8580c7d297609d6583b46b89310ff6f
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
 
<template>
    <div class="getQRCode">
        <!-- <x-header class="message-head" title="消息详情" :left-options="{backText:''}"></x-header> -->
        <van-nav-bar title="消息详情" left-text="返回" left-arrow @click-left="onClickLeft" style="line-height: 43px;">
            <i class="iconfont iconzuojiantou" slot="left" style="font-size: 25px;"></i>
        </van-nav-bar>
        <div class="message-body">
            <div class="notice">
                <p class="notice-title">{{ message.msgTitle }}</p>
                <p>{{ message.msgTime }}</p>
            </div>
            <span class="line"></span>
            <div class="notice-continue" v-html=" message.msgCon">
            </div>
        </div>
    </div>
</template>
<script>
import { XHeader } from 'vux';
import {
        dateFormat
    } from 'vux'
import { mapActions } from 'vuex';
    export default {
        name: 'message',
        components: {
             XHeader,
        },
        data() {
            return {
                messageId: this.$route.query.messageId,
                message:{
                    msgCon: '',
                    msgTitle: '',
                    msgTime: '',
                }
            }
        },
        computed:{
 
        },
        created() {
            this.msgInt()
            this.getCount()
        },
        methods: {
            ...mapActions(['getCount']),
            onClickLeft() {
                this.$router.go(-1);
            },
            msgInt() {
                this.$api.noticeDetail({id: this.messageId}).then(res => {
                    console.log(res.body)
                    this.message.msgCon = res.body.noticeContent;
                    this.message.msgTitle = res.body.title;
                    this.message.msgTime = dateFormat(res.body.pubTime);
                })
                
            }
        }
    }
</script>
<style lang="less" scoped>
.getQRCode{
    background: #F5F5F7;
    width: 100%;
    height: 100%;
}
.message-head{
    position: relative;
}
.message-body{
    width: 96%;
    margin: 12px 2%;
    margin-top: 10px;
    background: #fff;
    .notice{
        padding: 15px 12px;
        border-bottom: 1px solid #EEEEEE;
        p{
            color: #999999;
        }
        &-title{
            font-size: 16px;
            font-weight: bold;
            color: #333333 !important;
            margin-bottom: 10px;
        }
    }
    .notice-continue{
        width: 94%;
        margin: 0px 2%;
        padding: 15px 0;
        white-space: wrap;
        font-size: 14px;
        word-wrap: break-word;
        height: auto;
        padding-left: 2%;
        background: #fff;
        color: #666666;
        line-height: 22px;
    }
}
</style>