<template>
  <div class="terms container">
    <!-- 标题 -->
    <BigTitleComVue :big-title="'Privacy Policy'" :sub-title="`Last updated:  ${article.updateTimeA}`" />
    <LineComVue />

    <!-- 内容 -->
    <ArticleComVue :context="article.content" />
  </div>
</template>

<script setup>
import BigTitleComVue from '../components/BigTitleCom.vue';
import LineComVue from '../components/LineCom.vue';
import ArticleComVue from '../components/ArticleCom.vue';
import {onMounted, ref} from "vue";
import {getPageApi} from "../api/manage.js";
const article = ref({})
const getData = ()=>{
  getPageApi({title: 'Privacy Policy'}).then(({data})=>{
    if (data) {
      article.value = data;
      const date = new Date(data.updatetime * 1000).toDateString().split(' ');
      article.value.updateTimeA = date[2] + ' ' + date[1] + ' ' + date[3]
    }
  })
}

onMounted(()=>{
  getData()
})
</script>

<style lang="scss" scoped>

</style>
