supplierList.vue 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134
  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=""></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. NavToDetailPage(item) {//跳转
  45. this.$api.navigateTo(`/supplier/pages/user/my-shop?shopId=${item.linkParam.id}`)
  46. }
  47. }
  48. }
  49. </script>
  50. <style lang="scss">
  51. .supplier-content{
  52. background-color: #F7F7F7;
  53. width: 100%;
  54. height: auto;
  55. box-sizing: border-box;
  56. padding: 0 24rpx;
  57. }
  58. .tui-group-name {
  59. width: 100%;
  60. height: 92rpx;
  61. padding: 20rpx 0;
  62. }
  63. .tui-group-title{
  64. width: 100%;
  65. float: left;
  66. font-size: 34rpx;
  67. font-weight: bold;
  68. text-align: left;
  69. line-height: 49rpx;
  70. color: #333;
  71. }
  72. .tui-sub__desc {
  73. width: 100%;
  74. float: left;
  75. color: rgba(153,153,153,0.9);
  76. font-size: $font-size-26;
  77. }
  78. .supplier-banner{
  79. width: 100%;
  80. height: 240rpx;
  81. float: left;
  82. margin-top: 24rpx;
  83. image{
  84. width: 100%;
  85. height: 240rpx;
  86. display: block;
  87. }
  88. }
  89. .swiper-goods-box{
  90. width: 100%;
  91. height: auto;
  92. float: left;
  93. margin-top: 24rpx;
  94. .goods-box-item{
  95. width: 160rpx;
  96. height: 200rpx;
  97. float: left;
  98. margin-right: 20rpx;
  99. margin-bottom: 20rpx;
  100. background-color: #FFFFFF;
  101. &:nth-child(4n){
  102. margin-right: 0;
  103. }
  104. .box-item-image{
  105. width: 160rpx;
  106. height: 160rpx;
  107. display: block;
  108. float: left;
  109. }
  110. .box-item-mask{
  111. width: 100%;
  112. height: 40rpx;
  113. line-height: 40rpx;
  114. font-size: $font-size-20;
  115. text-align: center;
  116. color: #666666;
  117. background-color: #f9f9f9;
  118. float: left;
  119. box-sizing: border-box;
  120. padding:0 20rpx;
  121. white-space: normal;
  122. word-break: break-all;
  123. overflow: hidden;
  124. text-overflow: ellipsis;
  125. display: -webkit-box;
  126. -webkit-box-orient: vertical;
  127. -webkit-line-clamp: 1;
  128. }
  129. }
  130. }
  131. </style>