<script setup lang='ts'>
const router = useRouter()

const props = defineProps<{
  id: string
}>()

const detail = ref(null)
await request({
  url: '/dyaw/ctfx/detail',
  data: {
    dc_id: props.id
  }
}).then(
  res => {
    if (res.code === "1") {
      detail.value = res.data.one_info
    }
  }
)

function onClickLeft() {
  router.back()
}
</script>

<template>
  <div class="w-full h-full flex flex-col">
    <!-- <div class="flex justify-between">
        <div class="space-x-2 text-blue-700 flex items-center">
          <i:cil:home />
          <span>首页</span>
          <span>/</span>
          <span>错题分析</span>
          <span>/</span>
          <span>错题列表</span>
          <span>/</span>
          <span class="text-gray-600">详情</span>
        </div>
        <el-button type="primary" @click="router.back()">返回</el-button>
      </div> -->
    <van-nav-bar title="错题详情" left-text="返回" left-arrow @click-left="onClickLeft" />
    <cuoti-detail v-if="detail" :d="detail" class="px-2" />
  </div>
</template>
