<template>
  <el-scrollbar :height="height" v-loading="datas.loading" style="background-color:white">
    <div v-html="datas.info.helpContent" style="padding-left:20px;padding-right:20px">
    </div>
  </el-scrollbar>
</template>

<script setup lang="ts">
import { onMounted, reactive } from 'vue'
import { getInfoDetail } from '/@/api/frontend/helpcenter'
import { useRouter } from 'vue-router'
let router = useRouter()
let query = reactive(router.currentRoute.value.query)
const height = window.innerHeight

const datas = reactive({
    loading: false,
    info: {},
})

const initalDatas = () => {
    let params = {
        id: query.id,
    }
    datas.loading = true
    getInfoDetail(params)
        .then((res) => {
            datas.info = res.data
            console.log(datas.info)
            datas.loading = false
        })
        .catch(() => {
            datas.loading = false
        })
}

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

<style lang="scss">
img {
    border: none;
    margin: 0px;
    padding: 0px;
    border: 0px;
    width: auto;
    vertical-align: middle;
    max-width: 100%;
    height: auto !important;
}
</style>
