<template>
  <div v-loading="loading" class="skill-container flx-center">
    <div class="container">
      <img :src="baseURL + '/' + commonData?.HbData?.[0].FPOSTERPICTURE" height="560" />
      <div style="margin: 24px 0 360px">
        <contentBlock :list="commonData?.GaQnData" @change="handleChange" />
      </div>
    </div>
  </div>
</template>

<script setup lang="ts">
import { baseURL } from '@/services'
import { getCommon } from '@/services/api/common'
import contentBlock from '@/components/contentBlock.vue'

const router = useRouter()

const loading = ref(true)
const queryList = ref({ pageIndex: 1, pageSize: 99, FormType: 'N' })
const commonData: any = ref()

const handleChange = (row: any) => {
  router.push({ path: '/commonDetail', query: { FID: row.FID, FormType: 'N', FTITLE: row.FTITLE } })
}

const init = async () => {
  const res: any = await getCommon(queryList.value)
  if (res.code === 200) {
    commonData.value = res.data
    loading.value = false
  }
}

init()
</script>

<style lang="scss" scoped>
@import './index.scss';
</style>
