supplierList.vue 2.9 KB

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