detail.vue 875 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. <script setup lang='ts'>
  2. const router = useRouter()
  3. const props = defineProps<{
  4. id: string
  5. }>()
  6. const detail = ref(null)
  7. await request({
  8. url: '/dyaw/ctfx/detail',
  9. data: {
  10. dc_id: props.id
  11. }
  12. }).then(
  13. res => {
  14. if (res.code === "1") {
  15. detail.value = res.data.one_info
  16. }
  17. }
  18. )
  19. </script>
  20. <template>
  21. <div class="w-full h-full flex flex-col">
  22. <div class="flex justify-between">
  23. <div class="space-x-2 text-blue-700 flex items-center">
  24. <i:cil:home />
  25. <span>首页</span>
  26. <span>/</span>
  27. <span>错题分析</span>
  28. <span>/</span>
  29. <span>错题列表</span>
  30. <span>/</span>
  31. <span class="text-gray-600">详情</span>
  32. </div>
  33. <el-button type="primary" @click="router.back()">返回</el-button>
  34. </div>
  35. <cuoti-detail v-if="detail" :d="detail" />
  36. </div>
  37. </template>