hjyd的手机端
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

61 lines
1.7 KiB

2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
  1. <template>
  2. <div class="detail_container">
  3. <SubNavigation :title="`${getTitle()} - 详情页`" />
  4. <Paragraph :text="getList()?.topText" :isHtml="getList()?.isHtml" />
  5. <div style="background: #f8f8f8">
  6. <div v-for="(item, index) in getList()?.card" :key="index">
  7. <CardTitle
  8. :title="item?.cardTitle"
  9. :blue_title="item?.cardBlueTitle"
  10. :en="item?.en"
  11. />
  12. <Img :double="item?.isDouble" :pic1="item?.pic1" :pic2="item?.pic2" />
  13. <Intro v-if="item?.cardIntro" :cardIntro="item?.cardIntro" />
  14. <Paragraph v-if="item?.cardText" :text="item?.cardText" />
  15. <video
  16. v-if="item?.video"
  17. controls
  18. style="width: 100%; height: auto; object-fit: fill"
  19. controlslist="nodownload"
  20. >
  21. <source :src="item?.video" />
  22. </video>
  23. </div>
  24. </div>
  25. </div>
  26. </template>
  27. <script setup>
  28. import SubNavigation from 'cpns/SubNavigation'
  29. import Paragraph from 'cpns/detail/Paragraph'
  30. import CardTitle from 'cpns/detail/CardTitle'
  31. import Img from 'cpns/detail/Img'
  32. import Intro from 'cpns/detail/Intro'
  33. import { detailList, caseList } from '@/mock/case_detail'
  34. import { useRoute } from 'vue-router'
  35. import { ref, onMounted } from 'vue'
  36. const route = useRoute()
  37. const getList = () => {
  38. return detailList[classify.value][pId.value]
  39. }
  40. const getTitle = () => {
  41. return caseList[classify.value][parseInt(pId.value) - 1]?.title
  42. }
  43. const classify = ref('1')
  44. const pId = ref('1')
  45. onMounted(() => {
  46. if (route.query.t && route.query.p) {
  47. classify.value = route.query.t || '1'
  48. pId.value = route.query.p || '1'
  49. }
  50. })
  51. </script>
  52. <style lang="scss" scoped>
  53. .detail_container {
  54. padding-top: $sub-header-height;
  55. }
  56. </style>