detail.vue 1.1 KB

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