index.vue 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188
  1. <template>
  2. <div class="page">
  3. <div class="page-top flex flex-col justify-center items-center">
  4. <img class="logo" src="https://picsum.photos/200/200" />
  5. <span class="name mt-2">上海品辉医疗科技有限公司</span>
  6. </div>
  7. <div class="page-content">
  8. <!-- 搜索区域 -->
  9. <div class="search">
  10. <simple-search />
  11. </div>
  12. <!-- 标题 -->
  13. <div class="title px-4 pt-12 pb-6">共<span>30</span>家机构</div>
  14. <!-- 列表 -->
  15. <div class="list">
  16. <div class="section flex items-center mb-4">
  17. <img class="cover" src="https://picsum.photos/400/400" />
  18. <div class="name">日本水素水细胞仪</div>
  19. </div>
  20. <div class="section flex items-center mb-4">
  21. <img class="cover" src="https://picsum.photos/400/400" />
  22. <div class="name">日本水素水细胞仪</div>
  23. </div>
  24. <div class="section flex items-center mb-4">
  25. <img class="cover" src="https://picsum.photos/400/400" />
  26. <div class="name">日本水素水细胞仪</div>
  27. </div>
  28. <div class="section flex items-center mb-4">
  29. <img class="cover" src="https://picsum.photos/400/400" />
  30. <div class="name">日本水素水细胞仪</div>
  31. </div>
  32. <div class="section flex items-center mb-4">
  33. <img class="cover" src="https://picsum.photos/400/400" />
  34. <div class="name">日本水素水细胞仪</div>
  35. </div>
  36. </div>
  37. </div>
  38. </div>
  39. </template>
  40. <script>
  41. export default {
  42. layout: 'app',
  43. }
  44. </script>
  45. <style scoped lang="scss">
  46. // pc 端
  47. @media screen and (min-width: 768px) {
  48. .page {
  49. min-height: calc(100vh - 80px - 80px);
  50. background-color: #fff;
  51. }
  52. .page-top {
  53. height: 420px;
  54. background: url(https://static.caimei365.com/www/authentic/pc/bg-device.png);
  55. background-size: auto 420px;
  56. .logo {
  57. display: block;
  58. width: 120px;
  59. height: 120px;
  60. border-radius: 50%;
  61. }
  62. .name {
  63. font-size: 30px;
  64. color: #fff;
  65. }
  66. }
  67. .page-content {
  68. width: 1200px;
  69. margin: 0 auto;
  70. position: relative;
  71. .search {
  72. display: none;
  73. }
  74. .title {
  75. font-size: 16px;
  76. color: #404040;
  77. span {
  78. color: #bc1724;
  79. }
  80. }
  81. .list {
  82. display: flex;
  83. align-items: center;
  84. flex-wrap: wrap;
  85. justify-content: space-between;
  86. .section {
  87. width: 390px;
  88. height: 108px;
  89. background-color: #f3f5f6;
  90. border-radius: 4px;
  91. box-sizing: border-box;
  92. padding: 16px;
  93. cursor: pointer;
  94. transition: all 0.4s;
  95. &:hover {
  96. box-shadow: 0 0 24px rgba(0, 0, 0, 0.2);
  97. }
  98. .cover {
  99. display: block;
  100. width: 84px;
  101. height: 84px;
  102. }
  103. .name {
  104. width: 260px;
  105. font-size: 16px;
  106. color: #101010;
  107. text-overflow: ellipsis;
  108. white-space: nowrap;
  109. overflow: hidden;
  110. margin-left: 16px;
  111. }
  112. }
  113. }
  114. }
  115. }
  116. // 移动 端
  117. @media screen and (max-width: 768px) {
  118. .page-top {
  119. height: 46vw;
  120. background: url(https://static.caimei365.com/www/authentic/h5/bg-device.png);
  121. background-size: auto 46vw;
  122. .logo {
  123. display: block;
  124. width: 14.8vw;
  125. height: 14.8vw;
  126. border-radius: 50%;
  127. }
  128. .name {
  129. font-size: 4vw;
  130. color: #fff;
  131. }
  132. }
  133. .page-content {
  134. position: relative;
  135. .search {
  136. position: absolute;
  137. left: 50%;
  138. top: 0;
  139. transform: translate(-50%, -50%);
  140. }
  141. .title {
  142. font-size: 3.4vw;
  143. color: #404040;
  144. span {
  145. color: #bc1724;
  146. }
  147. }
  148. .list {
  149. display: flex;
  150. align-items: center;
  151. flex-direction: column;
  152. .section {
  153. width: 93.6vw;
  154. height: 26vw;
  155. background-color: #f3f5f6;
  156. border-radius: 4px;
  157. box-sizing: border-box;
  158. padding: 3.2vw;
  159. .cover {
  160. display: block;
  161. width: 19.6vw;
  162. height: 19.6vw;
  163. }
  164. .name {
  165. width: 66vw;
  166. font-size: 4vw;
  167. color: #101010;
  168. text-overflow: ellipsis;
  169. white-space: nowrap;
  170. overflow: hidden;
  171. margin-left: 3.2vw;
  172. }
  173. }
  174. }
  175. }
  176. }
  177. </style>