index.vue 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
  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>商家介绍: <nuxt-link :to="'/mobile/merchantDescription/'+item.uuid">点击查看</nuxt-link></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: .88rem;
  49. margin-bottom: .98rem;
  50. min-height: 10rem;
  51. background: #e2e4e6;
  52. .shop-top{
  53. display:inline-flex;
  54. justify-content: space-between;
  55. align-items: center;
  56. width:100%;
  57. height:1.14rem;
  58. padding:0 .3rem;
  59. background:#fff;
  60. p{
  61. font-size:.24rem;
  62. color:#000;
  63. i{
  64. font-size: .53rem;
  65. color:#418ef7;
  66. }
  67. span{
  68. font-size:.3rem;
  69. color:#f94f28;
  70. margin:0 .1rem;
  71. }
  72. }
  73. >span{
  74. font-size:.28rem;
  75. color:#53a0f7;
  76. }
  77. }
  78. .shop-list {
  79. background:#fff;
  80. margin-top:.12rem;
  81. padding-bottom:.28rem;
  82. h3{
  83. font-size:.32rem;
  84. line-height: .8rem;
  85. margin:0;
  86. margin-left:.27rem;
  87. margin-bottom:.14rem;
  88. }
  89. .list-item{
  90. width:6.77rem;
  91. margin-left:.39rem;
  92. justify-content: space-around;
  93. display:inline-flex;
  94. .item-img{
  95. position:relative;
  96. width:2.42rem;
  97. height:1.69rem;
  98. i{
  99. display:block;
  100. position:absolute;
  101. width:.65rem;
  102. height:.33rem;
  103. background: url(/imgs/shop/daili@2x.png)no-repeat;
  104. background-size: .65rem .33rem;
  105. }
  106. img{
  107. display:inline-block;
  108. width:100%;
  109. height:100%;
  110. }
  111. }
  112. .list-item-phone{
  113. width:3.95rem;
  114. padding-top:.18rem;
  115. position:relative;
  116. p{
  117. font-size:.28rem;
  118. line-height: .45rem;
  119. margin:0;
  120. }
  121. i{
  122. display:block;
  123. position:absolute;
  124. top:.1rem;
  125. right:.1rem;
  126. font-size:.4rem;
  127. color:#ff7800;
  128. }
  129. }
  130. }
  131. }
  132. }
  133. </style>