<template>
  <div class="main">
    <van-nav-bar title="资讯详情" @click-left="$router.back()" left-arrow fixed placeholder safe-area-inset-top />
    <div v-html="content"></div>
  </div>
</template>
<script>
import { getArticleMessage } from '../../api/index.js'
export default {
  data() {
    return {
      content: '',
    }
  },
  created() {
    this.id = this.$route.query.id
    this.getArticleMessage()
  },
  methods: {
    async getArticleMessage() {
      const res = await getArticleMessage({ id: this.id })
      this.content = res.data.content
    },
  },
}
</script>
<style lang="scss" scoped>
.main {
  padding: 0 30px;
  font-size: 24px;
}
</style>