package.vue 3.9 KB

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