supplierList.vue 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168
  1. <template>
  2. <view class="supplier-content clearfix">
  3. <view class="tui-group-name">
  4. <view class="tui-group-title">
  5. <view class="tui-group-l">优质供应商</view>
  6. <view class="tui-group-r" @click="handleMoreShop">
  7. <text>更多</text> <text class="iconfont icon-xiayibu"></text>
  8. </view>
  9. </view>
  10. <view class="tui-sub__desc">采美正品联盟 质量保证</view>
  11. </view>
  12. <view class="supplier-banner">
  13. <image :src="banner" mode=""
  14. @click="BannerNavigateTo(supplierObj.linkType,supplierObj.linkParam.id,supplierObj.wwwLink,supplierObj.linkParam.keyword)">
  15. </image>
  16. </view>
  17. <view class="swiper-goods-box">
  18. <view class="goods-box-item" v-for="(item,index) in supplierList" :key="index"
  19. @click="NavToDetailPage(item)">
  20. <image :src="item.image" mode="" class="box-item-image"></image>
  21. <view class="box-item-mask">{{ item.supplierName }}</view>
  22. </view>
  23. </view>
  24. </view>
  25. </template>
  26. <script>
  27. export default {
  28. name: "supplierList",
  29. props: {
  30. supplierObj: {
  31. type: Object
  32. }
  33. },
  34. data() {
  35. return {
  36. banner: '',
  37. supplierList: []
  38. }
  39. },
  40. created() {
  41. this.initData(this.supplierObj)
  42. },
  43. methods: {
  44. initData(data) {
  45. this.banner = data.crmImage
  46. this.supplierList = data.qualitySupplierList.slice(0, 12)
  47. },
  48. BannerNavigateTo(linkType, linkId, linkHref, keyword) { //跳转
  49. this.$api.BannerNavigateTo(linkType, linkId, linkHref, keyword)
  50. },
  51. NavToDetailPage(item) { //跳转
  52. this.$api.navigateTo(`/pages/supplier/user/my-shop?shopId=${item.linkParam.id}`)
  53. },
  54. handleMoreShop() {
  55. this.$api.navigateTo('/pages/goods/goods-shop-list')
  56. },
  57. }
  58. }
  59. </script>
  60. <style lang="scss">
  61. .supplier-content {
  62. background-color: #F7F7F7;
  63. width: 100%;
  64. height: auto;
  65. box-sizing: border-box;
  66. padding: 0 24rpx;
  67. }
  68. .tui-group-name {
  69. width: 100%;
  70. height: 92rpx;
  71. padding: 20rpx 0;
  72. }
  73. .tui-group-title {
  74. width: 100%;
  75. float: left;
  76. .tui-group-l {
  77. float: left;
  78. font-size: 34rpx;
  79. font-weight: bold;
  80. text-align: left;
  81. line-height: 49rpx;
  82. color: #333;
  83. }
  84. .tui-group-r {
  85. float: right;
  86. font-size: $font-size-24;
  87. text-align: right;
  88. line-height: 49rpx;
  89. color: #999999;
  90. .icon-xiayibu {
  91. font-size: $font-size-30;
  92. color: #999999;
  93. }
  94. }
  95. }
  96. .tui-sub__desc {
  97. width: 100%;
  98. float: left;
  99. color: rgba(153, 153, 153, 0.9);
  100. font-size: $font-size-26;
  101. }
  102. .supplier-banner {
  103. width: 100%;
  104. height: 240rpx;
  105. float: left;
  106. margin-top: 24rpx;
  107. border-radius: 16rpx;
  108. overflow: hidden;
  109. image {
  110. width: 100%;
  111. height: 240rpx;
  112. display: block;
  113. }
  114. }
  115. .swiper-goods-box {
  116. width: 100%;
  117. height: auto;
  118. float: left;
  119. margin-top: 24rpx;
  120. .goods-box-item {
  121. width: 160rpx;
  122. height: 200rpx;
  123. float: left;
  124. margin-right: 20rpx;
  125. margin-bottom: 20rpx;
  126. background-color: #FFFFFF;
  127. &:nth-child(4n) {
  128. margin-right: 0;
  129. }
  130. .box-item-image {
  131. width: 160rpx;
  132. height: 160rpx;
  133. display: block;
  134. float: left;
  135. }
  136. .box-item-mask {
  137. width: 100%;
  138. height: 40rpx;
  139. line-height: 40rpx;
  140. font-size: $font-size-20;
  141. text-align: center;
  142. color: #666666;
  143. background-color: #f9f9f9;
  144. float: left;
  145. box-sizing: border-box;
  146. padding: 0 20rpx;
  147. white-space: normal;
  148. word-break: break-all;
  149. overflow: hidden;
  150. text-overflow: ellipsis;
  151. display: -webkit-box;
  152. -webkit-box-orient: vertical;
  153. -webkit-line-clamp: 1;
  154. }
  155. }
  156. }
  157. </style>