index.vue 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308
  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="city bg-red-300">地区选择</div>
  14. <!-- 标题 -->
  15. <div class="title flex justify-between px-4 pt-8 pb-8 md:px-0">
  16. <div>距你最近...</div>
  17. <div>共<span>30</span>家机构</div>
  18. </div>
  19. <!-- 列表 -->
  20. <div class="list">
  21. <div class="section flex justify-between mb-4">
  22. <img class="cover" src="https://picsum.photos/400/400" />
  23. <div class="info">
  24. <div class="name">丽颜科美复兴广场店</div>
  25. <div class="mobile">0755-25777189</div>
  26. <div class="address">
  27. 上海市黄浦区马当路388号复兴广场夜丽秀夜丽秀
  28. </div>
  29. <div class="distance">9999km</div>
  30. </div>
  31. </div>
  32. <div class="section flex justify-between mb-4">
  33. <img class="cover" src="https://picsum.photos/400/400" />
  34. <div class="info">
  35. <div class="name">丽颜科美复兴广场店</div>
  36. <div class="mobile">0755-25777189</div>
  37. <div class="address">
  38. 上海市黄浦区马当路388号复兴广场夜丽秀夜丽秀
  39. </div>
  40. <div class="distance">9999km</div>
  41. </div>
  42. </div>
  43. <div class="section flex justify-between mb-4">
  44. <img class="cover" src="https://picsum.photos/400/400" />
  45. <div class="info">
  46. <div class="name">丽颜科美复兴广场店</div>
  47. <div class="mobile">0755-25777189</div>
  48. <div class="address">
  49. 上海市黄浦区马当路388号复兴广场夜丽秀夜丽秀
  50. </div>
  51. <div class="distance">9999km</div>
  52. </div>
  53. </div>
  54. </div>
  55. </div>
  56. </div>
  57. </template>
  58. <script>
  59. export default {
  60. layout: 'app',
  61. }
  62. </script>
  63. <style scoped lang="scss">
  64. // pc 端
  65. @media screen and (min-width: 768px) {
  66. .page {
  67. min-height: calc(100vh - 80px - 80px);
  68. background-color: #fff;
  69. }
  70. .page-top {
  71. height: 420px;
  72. background: url(https://static.caimei365.com/www/authentic/pc/bg-club.png);
  73. background-size: auto 420px;
  74. .logo {
  75. display: block;
  76. width: 120px;
  77. height: 120px;
  78. border-radius: 50%;
  79. }
  80. .name {
  81. font-size: 30px;
  82. color: #fff;
  83. }
  84. }
  85. .page-content {
  86. width: 1200px;
  87. margin: 0 auto;
  88. position: relative;
  89. .search {
  90. display: none;
  91. }
  92. .city {
  93. padding-top: 12vw;
  94. display: none;
  95. }
  96. .title {
  97. font-size: 16px;
  98. color: #404040;
  99. span {
  100. color: #bc1724;
  101. }
  102. }
  103. .list {
  104. display: flex;
  105. align-items: center;
  106. justify-content: space-between;
  107. .section {
  108. width: 390px;
  109. height: 108px;
  110. background-color: #f3f5f6;
  111. border-radius: 4px;
  112. box-sizing: border-box;
  113. padding: 12px;
  114. cursor: pointer;
  115. transition: all 0.4s;
  116. &:hover {
  117. box-shadow: 0 0 24px rgba(0, 0, 0, 0.2);
  118. }
  119. .cover {
  120. display: block;
  121. width: 84px;
  122. height: 84px;
  123. }
  124. .info {
  125. position: relative;
  126. margin-left: 12px;
  127. .name {
  128. font-size: 16px;
  129. color: #101010;
  130. font-weight: bold;
  131. margin-bottom: 16px;
  132. text-overflow: ellipsis;
  133. white-space: nowrap;
  134. overflow: hidden;
  135. }
  136. .mobile,
  137. .address {
  138. width: 268px;
  139. position: relative;
  140. font-size: 14px;
  141. color: #404040;
  142. padding-left: 24px;
  143. line-height: 24px;
  144. text-overflow: ellipsis;
  145. white-space: nowrap;
  146. overflow: hidden;
  147. &::after {
  148. content: '';
  149. display: block;
  150. width: 16px;
  151. height: 16px;
  152. position: absolute;
  153. left: 0;
  154. top: 50%;
  155. transform: translateY(-50%);
  156. background-size: 16px;
  157. background-repeat: no-repeat;
  158. }
  159. }
  160. .mobile {
  161. &::after {
  162. background-image: url(https://static.caimei365.com/www/authentic/pc/icon-phone.png);
  163. }
  164. }
  165. .address {
  166. &::after {
  167. background-image: url(https://static.caimei365.com/www/authentic/pc/icon-address.png);
  168. }
  169. }
  170. .distance {
  171. position: absolute;
  172. font-size: 12px;
  173. color: #404040;
  174. top: 2px;
  175. right: 0;
  176. }
  177. }
  178. }
  179. }
  180. }
  181. }
  182. // 移动 端
  183. @media screen and (max-width: 768px) {
  184. .page-top {
  185. height: 46vw;
  186. background: url(https://static.caimei365.com/www/authentic/h5/bg-club.png);
  187. background-size: auto 46vw;
  188. .logo {
  189. display: block;
  190. width: 14.8vw;
  191. height: 14.8vw;
  192. border-radius: 50%;
  193. }
  194. .name {
  195. font-size: 4vw;
  196. color: #fff;
  197. }
  198. }
  199. .page-content {
  200. position: relative;
  201. .search {
  202. position: absolute;
  203. left: 50%;
  204. top: 0;
  205. transform: translate(-50%, -50%);
  206. }
  207. .city {
  208. padding-top: 12vw;
  209. }
  210. .title {
  211. font-size: 3.4vw;
  212. color: #404040;
  213. span {
  214. color: #bc1724;
  215. }
  216. }
  217. .list {
  218. display: flex;
  219. align-items: center;
  220. flex-direction: column;
  221. .section {
  222. width: 93.6vw;
  223. height: 26vw;
  224. background-color: #f3f5f6;
  225. border-radius: 4px;
  226. box-sizing: border-box;
  227. padding: 3.2vw;
  228. .cover {
  229. display: block;
  230. width: 19.6vw;
  231. height: 19.6vw;
  232. }
  233. .info {
  234. position: relative;
  235. margin-left: 3.2vw;
  236. .name {
  237. font-size: 4vw;
  238. color: #101010;
  239. font-weight: bold;
  240. margin-bottom: 4vw;
  241. text-overflow: ellipsis;
  242. white-space: nowrap;
  243. overflow: hidden;
  244. }
  245. .mobile,
  246. .address {
  247. width: 66vw;
  248. position: relative;
  249. font-size: 3vw;
  250. color: #404040;
  251. padding-left: 5vw;
  252. line-height: 5vw;
  253. text-overflow: ellipsis;
  254. white-space: nowrap;
  255. overflow: hidden;
  256. &::after {
  257. content: '';
  258. display: block;
  259. width: 4vw;
  260. height: 4vw;
  261. position: absolute;
  262. left: 0;
  263. top: 50%;
  264. transform: translateY(-50%);
  265. background-size: 4vw 4vw;
  266. background-repeat: no-repeat;
  267. }
  268. }
  269. .mobile {
  270. &::after {
  271. background-image: url(https://static.caimei365.com/www/authentic/h5/icon-phone.png);
  272. }
  273. }
  274. .address {
  275. &::after {
  276. background-image: url(https://static.caimei365.com/www/authentic/h5/icon-address.png);
  277. }
  278. }
  279. .distance {
  280. position: absolute;
  281. font-size: 3vw;
  282. color: #404040;
  283. top: 0.8vw;
  284. right: 0;
  285. }
  286. }
  287. }
  288. }
  289. }
  290. }
  291. </style>