supplierList.vue 2.5 KB

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