file.vue 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210
  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. <div class="divider"></div>
  13. <!-- tabbar -->
  14. <simple-tabs></simple-tabs>
  15. <div class="list">
  16. <div class="section md:flex md:justify-between md:items-center">
  17. <div class="info">
  18. <div class="name">
  19. 以色列无针水光JDV/优斐斯/瑞漾小白盒及
  20. 希腊YELLOWROSE,无针透皮注入技...
  21. </div>
  22. <div class="date">2021-07-08 17:42</div>
  23. <div class="download">下载</div>
  24. </div>
  25. </div>
  26. </div>
  27. </div>
  28. </div>
  29. </template>
  30. <script>
  31. export default {
  32. layout: 'app',
  33. }
  34. </script>
  35. <style scoped lang="scss">
  36. /* scss中可以用mixin来扩展 */
  37. @mixin ellipsis($line: 1) {
  38. overflow: hidden;
  39. text-overflow: ellipsis;
  40. display: -webkit-box;
  41. -webkit-line-clamp: $line;
  42. -webkit-box-orient: vertical;
  43. }
  44. // pc 端
  45. @media screen and (min-width: 768px) {
  46. .page-top {
  47. height: 360px;
  48. background: url(https://static.caimei365.com/www/authentic/pc/bg-doc.png);
  49. background-size: auto 360px;
  50. .logo {
  51. display: block;
  52. width: 120px;
  53. height: 120px;
  54. border-radius: 50%;
  55. }
  56. .name {
  57. font-size: 30px;
  58. color: #fff;
  59. }
  60. }
  61. .page-content {
  62. width: 1200px;
  63. margin: 0 auto;
  64. background-color: #fff;
  65. .divider {
  66. height: 16px;
  67. background: #f7f7f7;
  68. }
  69. .search {
  70. display: none;
  71. }
  72. }
  73. .list {
  74. border-top: 16px solid #f7f7f7;
  75. border-bottom: 16px solid #f7f7f7;
  76. .section {
  77. padding: 32px 0;
  78. margin: 0 24px;
  79. background: #fff;
  80. border-bottom: 1px solid #d8d8d8;
  81. transition: all 0.4s;
  82. &:last-child {
  83. border-bottom: 0;
  84. }
  85. .info {
  86. width: 100%;
  87. position: relative;
  88. .name {
  89. width: 1050px;
  90. height: 56px;
  91. font-size: 18px;
  92. color: #404040;
  93. line-height: 1.6;
  94. margin-bottom: 18px;
  95. text-align: justify;
  96. @include ellipsis(2);
  97. }
  98. .date {
  99. font-size: 18px;
  100. color: #b2b2b2;
  101. line-height: 1.4;
  102. }
  103. .download {
  104. position: absolute;
  105. text-align: center;
  106. right: 0;
  107. top: 50%;
  108. transform: translateY(-50%);
  109. font-size: 16px;
  110. color: #bc1724;
  111. cursor: pointer;
  112. &::before {
  113. content: '';
  114. display: block;
  115. width: 54px;
  116. height: 59px;
  117. background: url(https://static.caimei365.com/www/authentic/pc/icon-pdf-download.png)
  118. no-repeat center;
  119. background-size: 54px;
  120. }
  121. }
  122. }
  123. }
  124. }
  125. }
  126. // 移动 端
  127. @media screen and (max-width: 768px) {
  128. .page-top {
  129. height: 46vw;
  130. background: url(https://static.caimei365.com/www/authentic/h5/bg-club.png);
  131. background-size: auto 46vw;
  132. .logo {
  133. display: block;
  134. width: 14.8vw;
  135. height: 14.8vw;
  136. border-radius: 50%;
  137. }
  138. .name {
  139. font-size: 4vw;
  140. color: #fff;
  141. }
  142. }
  143. .page-content {
  144. position: relative;
  145. .divider {
  146. border-bottom: 3.2vw solid #f7f7f7;
  147. height: 12.4vw;
  148. }
  149. }
  150. .search {
  151. position: absolute;
  152. left: 50%;
  153. top: 0;
  154. transform: translate(-50%, -50%);
  155. }
  156. .list {
  157. .section {
  158. position: relative;
  159. padding: 2.4vw 0;
  160. margin: 0 4vw;
  161. padding-bottom: 6.8vw;
  162. background: #fff;
  163. border-bottom: 0.1vw solid #d8d8d8;
  164. &:first-child {
  165. border-top: 0.1vw solid #d8d8d8;
  166. }
  167. .info {
  168. .name {
  169. font-size: 3.6vw;
  170. color: #404040;
  171. line-height: 1.5;
  172. margin-bottom: 2.4vw;
  173. text-align: justify;
  174. @include ellipsis(2);
  175. }
  176. .date {
  177. position: absolute;
  178. left: 0;
  179. bottom: 2.4vw;
  180. font-size: 3.2vw;
  181. color: #b2b2b2;
  182. line-height: 1.4;
  183. }
  184. .download {
  185. position: absolute;
  186. right: 0;
  187. bottom: 2.4vw;
  188. font-size: 3.2vw;
  189. color: #bc1724;
  190. cursor: pointer;
  191. margin-top: 1.2vw;
  192. }
  193. }
  194. }
  195. }
  196. }
  197. </style>