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.

138 lines
3.7 KiB

2 years ago
  1. <template>
  2. <div class="recruit_container">
  3. <Header :active="true" />
  4. <div
  5. class="card"
  6. @click="showModal(item.id)"
  7. v-for="item in postList"
  8. :key="item.id"
  9. >
  10. <div class="title">{{ item.postName }}</div>
  11. <div class="desc_box">
  12. <p class="desc">
  13. {{ item.postIntroduce }}
  14. </p>
  15. <div class="btn">
  16. <p class="text">查看详情</p>
  17. <svg
  18. xmlns="http://www.w3.org/2000/svg"
  19. xmlns:xlink="http://www.w3.org/1999/xlink"
  20. fill="none"
  21. version="1.1"
  22. width="20"
  23. height="4"
  24. viewBox="0 0 20 4"
  25. >
  26. <g>
  27. <path
  28. d="M19.9922,3.41357C20.0475,3.71869,19.8013,3.998,19.4754,4L0.524717,4C0.234187,4.00028,-0.00116205,3.77604,0.00000432898,3.50006C0.00000432898,3.2236,0.238414,2.99963,0.524717,2.99963L18.3818,2.99963L16.1219,0.851393C15.9164,0.656325,15.9171,0.339718,16.1235,0.145482C16.3287,-0.0494938,16.6655,-0.0469936,16.8661,0.143982L19.8464,2.97713C19.9717,3.09611,20.0201,3.25959,19.9922,3.41357Z"
  29. fill="#FFFFFF"
  30. fill-opacity="1"
  31. />
  32. </g>
  33. </svg>
  34. </div>
  35. </div>
  36. </div>
  37. <PostModal
  38. :postInfo="postInfo"
  39. v-if="modalVisible"
  40. :hiddenDetailModal="hiddenDetailModal"
  41. />
  42. </div>
  43. <Bottom />
  44. </template>
  45. <script setup>
  46. import Header from 'cpns/design/Header'
  47. import Bottom from 'cpns/NewBottomWhite.vue'
  48. import { postList, postDetail } from '@/mock/post'
  49. import { ref } from 'vue'
  50. import PostModal from 'cpns/post/PostModal'
  51. const modalVisible = ref(false)
  52. const postInfo = ref({})
  53. const hiddenDetailModal = () => {
  54. const rootTag = document.getElementById('iflytop')
  55. rootTag.style['overflow-y'] = 'scroll'
  56. rootTag.style['overflow-x'] = 'hidden'
  57. rootTag.style.height = 'auto'
  58. postInfo.value = {}
  59. modalVisible.value = false
  60. }
  61. const showModal = id => {
  62. const rootTag = document.getElementById('iflytop')
  63. rootTag.style.overflow = 'hidden'
  64. rootTag.style.height = '100%'
  65. postInfo.value = postDetail[id]
  66. modalVisible.value = true
  67. }
  68. </script>
  69. <style lang="scss" scoped>
  70. .recruit_container {
  71. background: #f6f6f6;
  72. min-height: 100vh;
  73. display: flex;
  74. flex-direction: column;
  75. align-items: center;
  76. padding: 100px;
  77. .card {
  78. width: 80vw;
  79. cursor: pointer;
  80. margin-bottom: 40px;
  81. background: #fff;
  82. padding: 32px 42px 52px 32px;
  83. border-radius: 10px;
  84. .title {
  85. font-family: Source Han Sans;
  86. font-size: 36px;
  87. font-weight: bold;
  88. line-height: normal;
  89. letter-spacing: 0.02em;
  90. font-feature-settings: 'kern' on;
  91. color: #000000;
  92. padding-bottom: 32px;
  93. border-bottom: 1px solid #d3d3d3;
  94. }
  95. .desc_box {
  96. padding-top: 32px;
  97. display: flex;
  98. align-items: center;
  99. justify-content: space-between;
  100. .desc {
  101. font-family: Source Han Sans;
  102. font-size: 18px;
  103. font-weight: normal;
  104. line-height: normal;
  105. letter-spacing: 0.04em;
  106. width: 70%;
  107. font-feature-settings: 'kern' on;
  108. color: #d3d3d3;
  109. }
  110. .btn {
  111. padding: 10px 21px;
  112. display: flex;
  113. align-items: center;
  114. border-radius: 383px;
  115. background: linear-gradient(90deg, #16ddfa 0%, #305efc 100%);
  116. .text {
  117. margin-right: 11px;
  118. font-family: Source Han Sans;
  119. font-size: 16px;
  120. font-weight: normal;
  121. line-height: normal;
  122. letter-spacing: 0.04em;
  123. font-feature-settings: 'kern' on;
  124. color: #ffffff;
  125. }
  126. }
  127. }
  128. &:hover {
  129. box-shadow: 0px 4px 16px 0px rgba(0, 0, 0, 0.06);
  130. }
  131. }
  132. }
  133. </style>