<script setup lang='ts'>
const router = useRouter()
import { Status } from '~/store/info'

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">
    <van-nav-bar title="错题详情" left-text="返回" left-arrow @click-left="onClickLeft" />
    <div class="px-2">
      <cuoti-detail v-if="detail" :d="detail" />

      <van-divider />
      <div>
        <span>审核结果：</span><span class="text-gray-600">{{ Status[detail.dc_check] }}</span>
      </div>
      <div v-show="detail.dc_check === '2'">
        <span>处理意见：</span><span class="text-gray-600">{{ detail.dc_check_desc }}</span>
      </div>
    </div>

  </div>
</template>
