Home.vue 6.5 KB

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