article.vue 4.8 KB

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