dcc
2024-06-13 24e2c4a6983d3ed1c67080b460f7e28f5e2e55f9
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
<template>
    <div id="cryptos">
        <div class="announceDetail">
            <assets-head :title="$t('公告详情')" />
            <div class="content">
                <div class="text-50 font-bold textColor">{{ title }}</div>
                <p class="mt-5 text-grey text-30">{{ createTimeStr }}</p>
                <div class="flex justify-center mt-8" v-if="imgUrl"><img :src="`${imgUrl}`" class="w-52 h-52" alt="">
                </div>
                <div class="mt-8 text-cont textColor text-28" v-html="content"></div>
            </div>
        </div>
    </div>
</template>
 
<script>
import assetsHead from "@/components/Transform/assets-head/index.vue";
import { dataTimeEx } from '@/utils/utis'
import { _getNews } from '@/service/user.api'
export default {
    props: {
 
    },
    components: {
        assetsHead
    },
    data() {
        return {
            title: '',
            createTimeStr: '',
            content: '',
            imgUrl: ''
        }
    },
    mounted() {
        this.getNews();
    },
    methods: {
        getNews() {
            _getNews({
                id: this.$route.query.id,
                language: this.$i18n.locale,
            }).then(res => {
                const { title, startTime, content, imgUrl } = res
                this.title = title;
                this.createTimeStr = startTime.substring(0, 10)
                this.content = content
                this.imgUrl = imgUrl
            })
        }
    }
}
</script>
 
<style lang="scss" scoped>
#cryptos {
    .announceDetail {
        width: 100%;
        box-sizing: border-box;
    }
 
    .content {
        padding: 40px 32px;
    }
 
    .title {
        text-decoration: underline;
    }
 
    .text-cont {
        word-wrap: break-word;
    }
}
</style>