_keycode.vue 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221
  1. <template>
  2. <div class="search-list">
  3. <div class="search-item">
  4. <span :class="activeType=='store'?'active':''" @click="activeType='store'">仅看有货</span>
  5. <span :class="activeType=='support'?'active':''" @click="activeType='support'">店铺自营</span>
  6. </div>
  7. <div class="brand-list-content">
  8. <div class="brand-list-top">
  9. <span>品牌墙</span>
  10. <span @click="onclick()">展开<i class="iconfont icon-arrow-down"></i></span>
  11. </div>
  12. <div class="brand-list-item" :style="isShow?'max-height:2.1rem;':'min-height:2.1rem;'" >
  13. <div v-for="item in brandList">
  14. <nuxt-link to="/">
  15. <img :src="item.logoUrl ||'/images/component/default.png'"/>
  16. </nuxt-link>
  17. </div>
  18. </div>
  19. </div>
  20. <div class="detail-brand-content" >
  21. <h4>主营产品</h4>
  22. <div class="brand-list">
  23. <div class="list-left">
  24. <img :src="brandDetail.logoUrl || '/images/component/default.png'" :alt="brandDetail.nameEn"/>
  25. <span>{{brandDetail.nameCn}}</span>
  26. </div>
  27. <p>{{brandDetail.series}}</p>
  28. </div>
  29. </div>
  30. <div class="detail-brand" v-for="(item, index) in productList.components" v-if="productList.components">
  31. <nuxt-link :to="'/mobile/brand/componentDetail/'+ item.uuid">
  32. <div class="brand-item">
  33. <p>型号:<span>{{item.code}}</span></p>
  34. <p>品牌:<span>{{item.brand.nameCn}}</span></p>
  35. <p>产品描述:<span>{{item.kind.nameCn}}</span></p>
  36. <i class="iconfont icon-shoucang"></i>
  37. </div>
  38. </nuxt-link>
  39. </div>
  40. </div>
  41. </template>
  42. <script>
  43. export default {
  44. layout: 'main',
  45. data () {
  46. return {
  47. activeType: 'store',
  48. count: '',
  49. filter: {},
  50. page: '',
  51. sorting: {},
  52. isShow: true,
  53. isMove: ''
  54. }
  55. },
  56. fetch ({store, route}) {
  57. return Promise.all([
  58. store.dispatch('searchData/searchForList', {count: 15, filter: {}, keyword: route.query.w, page: 1, sorting: {'GO_RESERVE': 'DESC', 'GO_SEARCH': 'DESC'}}),
  59. store.dispatch('searchData/searchForBrands', {collectList: 'goods_brand', keyword: route.query.w, paramJSON: {}})
  60. ])
  61. },
  62. computed: {
  63. productList () {
  64. return this.$store.state.searchData.searchList.lists.data
  65. },
  66. brandList () {
  67. return this.$store.state.searchData.searchBrands.brands.data
  68. },
  69. brandDetail () {
  70. return this.$store.state.searchData.searchDetail.detail.data
  71. }
  72. },
  73. methods: {
  74. onclick () {
  75. this.isShow = !this.isShow
  76. }
  77. }
  78. }
  79. </script>
  80. <style scoped lang="scss">
  81. .search-list{
  82. width:100%;
  83. margin-bottom: .98rem;
  84. margin-top: .88rem;
  85. .search-item{
  86. justify-content: space-around;
  87. text-align: center;
  88. display:flex;
  89. span{
  90. display:inline-block;
  91. width:1.41rem;
  92. line-height: .76rem;
  93. font-size:.32rem;
  94. color:#666;
  95. }
  96. span.active{
  97. color:#3976f4;
  98. border-bottom:2px solid #3976f4;
  99. }
  100. }
  101. .brand-list-content{
  102. margin:0 auto;
  103. border-top:.02rem solid #dedfdf;
  104. border-bottom:.02rem solid #dedfdf;
  105. width:7.1rem;
  106. min-height:3.02rem;
  107. overflow: hidden;
  108. text-align: center;
  109. padding-top:.33rem;
  110. padding-bottom:.33rem;
  111. .brand-list-top{
  112. span:first-child{
  113. font-size:.32rem;
  114. margin-right:4.78rem;
  115. }
  116. span:last-child{
  117. font-size:.28rem;
  118. color:#53a0f7;
  119. }
  120. }
  121. .brand-list-item{
  122. justify-content: space-between;
  123. flex-wrap: wrap;
  124. display:inline-flex;
  125. overflow: hidden;
  126. margin:0 .2rem;
  127. img{
  128. width:1.57rem;
  129. height:.77rem;
  130. margin-top:.2rem;
  131. border-radius: .1rem;
  132. border:.02rem solid #53a0f7;
  133. }
  134. }
  135. }
  136. .detail-brand-content{
  137. margin:0 auto;
  138. border-top:.02rem solid #dedfdf;
  139. border-bottom:.02rem solid #dedfdf;
  140. width:7.1rem;
  141. height:3.02rem;
  142. padding-top:.18rem;
  143. h4{
  144. font-size:.32rem;
  145. line-height: .6rem;
  146. margin:0;
  147. margin-left:3.97rem;
  148. }
  149. .brand-list{
  150. display:flex;
  151. justify-content: space-between;
  152. align-items: center;
  153. margin:0 .15rem;
  154. .list-left{
  155. border:.02rem solid #418ef7;
  156. border-radius: .05rem;
  157. width:2.03rem;
  158. height:1.73rem;
  159. img{
  160. display:block;
  161. width:100%;
  162. height:1.25rem;
  163. }
  164. span{
  165. display: block;
  166. font-size: .24rem;
  167. color:#fff;
  168. text-align: center;
  169. width:100%;
  170. background: #418ef7;
  171. line-height: .45rem;
  172. }
  173. }
  174. p{
  175. width:4.3rem;
  176. font-size:.28rem;
  177. line-height: .4rem;
  178. padding:.12rem .46rem 0 .05rem;
  179. }
  180. }
  181. }
  182. .detail-brand{
  183. background: #f8fcff;
  184. width:100%;
  185. min-height:1.5rem;
  186. padding-top:.2rem;
  187. .brand-item{
  188. width:7rem;
  189. margin:0 auto;
  190. border-radius:.1rem;
  191. background: #fff;
  192. padding:.2rem;
  193. position:relative;
  194. p{
  195. font-size:.28rem;
  196. line-height:.4rem;
  197. color:#333;
  198. margin:0;
  199. span{}
  200. }
  201. i{
  202. display:block;
  203. position:absolute;
  204. top:.2rem;
  205. right:.1rem;
  206. font-size:.4rem;
  207. color:#ff7800;
  208. }
  209. }
  210. div.active{
  211. background: #d4d;
  212. }
  213. }
  214. }
  215. </style>