index.vue 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135
  1. <template>
  2. <div class="shop">
  3. <div class="shop-top">
  4. <p><i class="iconfont icon-dianpu1"></i><span>{{list.numberOfElements}}</span>家店铺</p>
  5. <span>全部 <i class="iconfont icon-jiantoushang"></i></span>
  6. </div>
  7. <div class="shop-list" v-for="item in list.content">
  8. <h3>{{item.storeName}}</h3>
  9. <div class="list-item">
  10. <div class="item-img">
  11. <i></i>
  12. <img :src="item.bannerUrl || '/images/component/default.png'" alt="">
  13. </div>
  14. <div class="list-item-phone">
  15. <p>电话:<span>{{item.enterprise.enTel}}</span></p>
  16. <p>传真:<span>{{item.enterprise.enFax}}</span></p>
  17. <p>商家介绍: <a href="#">点击查看</a></p>
  18. <i class="iconfont icon-shoucang"></i>
  19. </div>
  20. </div>
  21. </div>
  22. </div>
  23. </template>
  24. <script>
  25. export default {
  26. layout: 'main',
  27. data () {
  28. return {
  29. page: '',
  30. count: '',
  31. types: ''
  32. }
  33. },
  34. fetch ({ store }) {
  35. return Promise.all([
  36. store.dispatch('provider/findStoreList', { page: 1, count: 10, types: 'ORIGINAL_FACTORY' })
  37. ])
  38. },
  39. computed: {
  40. list () {
  41. return this.$store.state.provider.stores.storeList.data
  42. }
  43. }
  44. }
  45. </script>
  46. <style scoped lang="scss">
  47. .shop{
  48. margin-top:1rem;
  49. min-height: 10rem;
  50. background: #e2e4e6;
  51. .shop-top{
  52. display:inline-flex;
  53. justify-content: space-between;
  54. align-items: center;
  55. width:100%;
  56. height:1.14rem;
  57. padding:0 .3rem;
  58. background:#fff;
  59. p{
  60. font-size:.24rem;
  61. color:#000;
  62. i{
  63. font-size: .53rem;
  64. color:#418ef7;
  65. }
  66. span{
  67. font-size:.3rem;
  68. color:#f94f28;
  69. margin:0 .1rem;
  70. }
  71. }
  72. >span{
  73. font-size:.28rem;
  74. color:#53a0f7;
  75. }
  76. }
  77. .shop-list {
  78. background:#fff;
  79. margin-top:.12rem;
  80. padding-bottom:.28rem;
  81. h3{
  82. font-size:.32rem;
  83. line-height: .8rem;
  84. margin:0;
  85. margin-left:.27rem;
  86. margin-bottom:.14rem;
  87. }
  88. .list-item{
  89. width:6.77rem;
  90. margin-left:.39rem;
  91. justify-content: space-around;
  92. display:inline-flex;
  93. .item-img{
  94. position:relative;
  95. width:2.42rem;
  96. height:1.69rem;
  97. i{
  98. display:block;
  99. position:absolute;
  100. width:.65rem;
  101. height:.33rem;
  102. background: url(/imgs/shop/daili@2x.png)no-repeat;
  103. background-size: .65rem .33rem;
  104. }
  105. img{
  106. display:inline-block;
  107. width:100%;
  108. height:100%;
  109. }
  110. }
  111. .list-item-phone{
  112. width:3.95rem;
  113. padding-top:.18rem;
  114. position:relative;
  115. p{
  116. font-size:.28rem;
  117. line-height: .45rem;
  118. margin:0;
  119. }
  120. i{
  121. display:block;
  122. position:absolute;
  123. top:.1rem;
  124. right:.1rem;
  125. font-size:.4rem;
  126. color:#ff7800;
  127. }
  128. }
  129. }
  130. }
  131. }
  132. </style>