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.

143 lines
2.8 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
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
2 years ago
  1. <template>
  2. <div class="case_show_container">
  3. <SubNavigation title="案例展示" />
  4. <CaseCard :activeTab="classify" />
  5. <HeadLine
  6. :title="getTitle()"
  7. line1="我们精通气动、液动、电动等各种传动机构"
  8. line2="完成机械所需的各种动作"
  9. />
  10. <Card :caseList="getCaseList()" :classify="classify" />
  11. </div>
  12. </template>
  13. <script setup>
  14. import CaseCard from 'cpns/CaseCard'
  15. import Card from 'cpns/Card'
  16. import SubNavigation from 'cpns/SubNavigation'
  17. import HeadLine from 'cpns/HeadLine'
  18. import { useRoute } from 'vue-router'
  19. import { ref, onMounted } from 'vue'
  20. import { caseList } from '@/mock/case_detail'
  21. const route = useRoute()
  22. const trackList = [
  23. {
  24. id: 1,
  25. title: '医疗健康',
  26. },
  27. {
  28. id: 2,
  29. title: '智能硬件',
  30. },
  31. {
  32. id: 3,
  33. title: '工业设备',
  34. },
  35. {
  36. id: 4,
  37. title: '高铁设备',
  38. },
  39. {
  40. id: 5,
  41. title: '户外设备',
  42. },
  43. {
  44. id: 6,
  45. title: '特种装备',
  46. },
  47. {
  48. id: 7,
  49. title: '智能家居',
  50. },
  51. {
  52. id: 8,
  53. title: '实验仪器',
  54. },
  55. {
  56. id: 9,
  57. title: '消费电子',
  58. },
  59. ]
  60. const getTitle = () => {
  61. const arr = trackList.filter(item => item.id == classify.value)
  62. if (arr?.length > 0) {
  63. return arr[0].title
  64. }
  65. return ''
  66. }
  67. const getCaseList = () => {
  68. return caseList[classify.value]
  69. }
  70. const classify = ref('1')
  71. onMounted(() => {
  72. if (route.query.t) {
  73. classify.value = route.query.t || '1'
  74. }
  75. })
  76. </script>
  77. <style lang="scss" scoped>
  78. .case_show_container {
  79. padding-top: $sub-header-height;
  80. background: #f5f5f5;
  81. padding-bottom: 7px;
  82. .line_cards {
  83. display: grid;
  84. grid-template-columns: repeat(2, 1fr);
  85. grid-template-rows: repeat(2, 1fr);
  86. column-gap: 7px;
  87. padding: 0 7px;
  88. box-sizing: border-box;
  89. row-gap: 7px;
  90. .card {
  91. height: 132px;
  92. background: #ffffff;
  93. border-radius: 3px;
  94. flex: 1;
  95. box-sizing: border-box;
  96. display: flex;
  97. flex-direction: column;
  98. padding: 11px 7px 7px 7px;
  99. .title {
  100. font-size: 8px;
  101. font-family: Source Han Sans CN;
  102. font-weight: 400;
  103. color: #2f2f2f;
  104. padding-left: 2px;
  105. margin-bottom: 11px;
  106. }
  107. .img_box {
  108. width: 100%;
  109. flex: 1;
  110. position: relative;
  111. .img {
  112. width: 100%;
  113. height: 100%;
  114. background: red;
  115. }
  116. .bottom_text {
  117. position: absolute;
  118. left: -50%;
  119. bottom: -10%;
  120. height: 34px;
  121. background: rgba(0, 0, 0, 0.2);
  122. display: flex;
  123. align-items: center;
  124. justify-content: space-evenly;
  125. font-size: 16px;
  126. font-family: Source Han Sans CN;
  127. font-weight: 400;
  128. color: #ffffff;
  129. width: 200%;
  130. transform: scale(0.5);
  131. }
  132. }
  133. }
  134. }
  135. }
  136. </style>