<template>
  <div class="main-wrap index-page mb-xxl">
  <div v-html="article">
  </div>
  </div>
</template>

<script setup>
import { ref, onMounted } from 'vue';
import { useRoute } from 'vue-router'
import { getArticle } from '@/services/article'

const route = useRoute()

const article = ref(null)

onMounted(async () => {
  let res = await getArticle(route.query.id)
  if(res.code !== 200){
    return
  }
  article.value = res.data.content
})

</script>

<style lang="less" scoped>
.container{
  font-size: 14px;
  .banner {
    img{
      width: 100%;
    }
  }
  .content{
    padding: 0 20px;
  }
}
</style>
