Home.vue 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273
  1. <template>
  2. <div class="home">
  3. <div class="home-header">
  4. <div class="home-top">
  5. <p>
  6. <span>搜品牌</span> |
  7. <span>搜现货</span> |
  8. <span>搜好店</span> |
  9. <span>搜规格书</span>
  10. </p>
  11. </div>
  12. <div class="home-search">
  13. <ul>
  14. <li class="active"><a href="#">型号</a></li>
  15. <li><a href="#">品牌</a></li>
  16. <li><a href="#">商家</a></li>
  17. </ul>
  18. <div class="home-input">
  19. <input type="text" placeholder="请输入您要查找的型号或品牌">
  20. <a href="#"><i class="fa fa-camera-retro"></i></a>
  21. </div>
  22. </div>
  23. </div>
  24. <div class="home-main">
  25. <a herf="#" class="home-main-content">
  26. <div>
  27. <img src="/images/qrcode/uas.png" alt="1">
  28. </div>
  29. <h2>4036万</h2>
  30. <p>品牌</p>
  31. </a>
  32. <a herf="#" class="home-main-content">
  33. <div>
  34. <img src="/images/qrcode/uas.png" alt="1">
  35. </div>
  36. <h2>3250万</h2>
  37. <p>型号</p>
  38. </a>
  39. <a herf="#" class="home-main-content">
  40. <div>
  41. <img src="/images/qrcode/uas.png" alt="1">
  42. </div>
  43. <h2>926万</h2>
  44. <p>规格书</p>
  45. </a>
  46. <a herf="#" class="home-main-content">
  47. <div>
  48. <img src="/images/qrcode/uas.png" alt="1">
  49. </div>
  50. <p>店铺列表</p>
  51. </a>
  52. <a herf="#" class="home-main-content">
  53. <div>
  54. <img src="/images/qrcode/uas.png" alt="1">
  55. </div>
  56. <p>我的收藏</p>
  57. </a>
  58. <a herf="#" class="home-main-content">
  59. <div>
  60. <img src="/images/qrcode/uas.png" alt="1">
  61. </div>
  62. <p>联系我们</p>
  63. </a>
  64. </div>
  65. <div class="home-search-list">
  66. <div class="search-list-top">
  67. <h5>历史搜索:<i class="fa fa-camera-retro"></i></h5>
  68. <a href="#">smk212121288</a>
  69. <a href="#">CPU</a>
  70. <a href="#">CPU</a>
  71. <a href="#">CPU</a>
  72. <a href="#">CPU</a>
  73. <a href="#">CPU</a>
  74. </div>
  75. <div class="search-list-bottom">
  76. <h5><i class="fa fa-camera-retro"></i>热搜器件</h5>
  77. <a href="#">smk212121288</a>
  78. <a href="#">CPU</a>
  79. <a href="#">CPU</a>
  80. <a href="#">CPU</a>
  81. <a href="#">CPU</a>
  82. <a href="#">CPU</a>
  83. </div>
  84. </div>
  85. </div>
  86. </template>
  87. <script>
  88. </script>
  89. <style lang="scss" scoped>
  90. .home{
  91. font-size:.28rem;
  92. margin-bottom:1rem;
  93. margin-top:.88rem;
  94. .home-header{
  95. width:100%;
  96. padding-top:1.3rem;
  97. background:#ecede2;
  98. padding-bottom:1rem;
  99. .home-top{
  100. text-align: center;
  101. margin-bottom:.4rem;
  102. p{
  103. font-size:.32rem;
  104. color:rgb(23,21,26);
  105. }
  106. }
  107. .home-search{
  108. width:6rem;
  109. line-height: .3rem;
  110. margin:0 auto;
  111. ul{
  112. display:inline-flex;
  113. li{
  114. flex:1;
  115. text-align:center;
  116. a{
  117. display:inline-block;
  118. width:.72rem;
  119. line-height:.32rem;
  120. background: #fff;
  121. color:#000;
  122. border-radius: .05rem .05rem 0 0 ;
  123. }
  124. }
  125. li.active{
  126. a{
  127. background: #3c7cf5;
  128. color:#fff;
  129. cursor:pointer;
  130. }
  131. }
  132. }
  133. input{
  134. width:6rem;
  135. padding: 0 1.2rem 0 .2rem;
  136. margin-right:-1rem;
  137. font-size:.23rem;
  138. line-height: .61rem;
  139. border:.02rem solid #3c7cf5;
  140. border-radius:.05rem;
  141. }
  142. a{
  143. display:inline-block;
  144. text-align: center;
  145. width:1rem;
  146. line-height: .61rem;
  147. font-size:.23rem;
  148. border-left:none;
  149. border-radius: 0 .05rem .05rem 0;
  150. background: #3c7cf5;
  151. color:#fff;
  152. }
  153. }
  154. }
  155. }
  156. .home-main{
  157. width:100%;
  158. display:flex;
  159. justify-content:space-between;
  160. flex-wrap:wrap;
  161. text-align: center;
  162. padding-top:1rem;
  163. background: #f7fbff;
  164. }
  165. .home-main a.home-main-content {
  166. width:33%;
  167. margin-bottom:.55rem;
  168. }
  169. .home-main .home-main-content div{
  170. border-radius: .2rem;
  171. width:1.14rem;
  172. height:1.14rem;
  173. margin:0 auto;
  174. position:relative;
  175. }
  176. .home-main .home-main-content div:first-child{
  177. background:rgb(255,48,100);
  178. }
  179. .home-main .home-main-content:nth-child(2) div{
  180. background:rgb(250,103,67);
  181. }
  182. .home-main .home-main-content:nth-child(3) div {
  183. background: rgb(252, 184, 54);
  184. }
  185. .home-main .home-main-content:nth-child(4) div{
  186. background:rgb(99,147,255);
  187. }
  188. .home-main .home-main-content:nth-child(5) div{
  189. background:rgb(67,201,173);
  190. }
  191. .home-main .home-main-content:last-child div{
  192. background:rgb(135,201,79);
  193. }
  194. .home-main .home-main-content div>img{
  195. width: .8rem;
  196. height:.8rem;
  197. position:absolute;
  198. left:50%;
  199. top:50%;
  200. margin-left:-36%;
  201. margin-top:-36%;
  202. }
  203. .home-main .home-main-content p{
  204. font-size:.28rem;
  205. color:rgb(51,51,51);
  206. line-height: .52rem;
  207. }
  208. .home-main .home-main-content h2{
  209. font-size:.3rem;
  210. color:#ff7800;
  211. line-height: .32rem;
  212. margin:0;
  213. margin-top:.1rem;
  214. }
  215. .home-search-list{
  216. /*display:none;*/
  217. width:80%;
  218. margin:0 auto;
  219. margin-top:.1rem;
  220. .search-list-top{
  221. h5{
  222. font-size:.3rem;
  223. position:relative;
  224. line-height: .4rem;
  225. color:rgb(102,102,102);
  226. i{
  227. position:absolute;
  228. right:0;
  229. }
  230. }
  231. a{
  232. display:inline-block;
  233. font-size:.28rem;
  234. line-height: .45rem;
  235. color:rgb(102,102,102);
  236. background: #fff;
  237. width:2.18rem;
  238. padding:0 .1rem;
  239. overflow:hidden;
  240. text-overflow : ellipsis;
  241. margin-left:.12rem;
  242. }
  243. }
  244. .search-list-bottom{
  245. margin-top:-.07rem;
  246. h5{
  247. color:rgb(255,120,0);
  248. font-size:.3rem;
  249. text-align: center;
  250. i{
  251. margin-right:.15rem;
  252. }
  253. }
  254. a{
  255. display:inline-block;
  256. font-size:.24rem;
  257. color:rgb(255,120,0);
  258. background: #fff;
  259. max-width:1.62rem;
  260. line-height: .35rem;
  261. padding:0 .1rem;
  262. border:1px solid rgb(255,120,0);
  263. overflow:hidden;
  264. text-overflow : ellipsis;
  265. margin-left:.12rem;
  266. }
  267. }
  268. }
  269. </style>