<script setup>
import { ref } from 'vue'
import { contractInterface } from "@/api/api.js";
import { useRoute } from 'vue-router';

const route = useRoute()

const content = ref('')

function getContent() {
  const id = route.query.contractid || ''
  if (!id) {
    content.value = sessionStorage.getItem('contractdtl')
    return
  }
  contractInterface.previewContractById({ ContractId: id }).then(res => {
    if (res.Ret === 200) {
      content.value = res.Data.Html
    }
  })
}

getContent()

</script>


<template>
  <div v-html="content"></div>
</template>

<style scoped lang="scss">
</style>