goods.vue 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160
  1. <template>
  2. <view >
  3. <view class="recommend-info" style="background-image: -webkit-gradient(linear, 0 0, 0 bottom, from(#ffffff), to(#f1f1f1))">
  4. <view class="goods-list">
  5. <navigator :url="'/pagesM/pages/goods_des?id='+item.id" class="list" v-for="(item,index) in goodsList" :key="index">
  6. <view class="pictrue">
  7. <image :src="item.productImages[0].medium" mode="heightFix"></image>
  8. </view>
  9. <view class="title-tag">
  10. <view class="tag">
  11. <!-- <text v-if="item.is_goods === 1">特价</text> -->
  12. {{item.name}}
  13. </view>
  14. </view>
  15. <!-- <view class="padding-top-10 padding-left-20">
  16. <view class="cu-tag sm text-gray radius" style="background-color: #ebebeb;">
  17. 销量{{item.salfNum}}
  18. </view>
  19. </view> -->
  20. <view class="price-info">
  21. <view class="user-price">
  22. <text class="min">¥</text>
  23. <text class="max">{{item.price}}</text>
  24. </view>
  25. <view class="vip-price">
  26. <text>¥{{item.marketPrice}}</text>
  27. </view>
  28. </view>
  29. </navigator>
  30. </view>
  31. </view>
  32. </view>
  33. </template>
  34. <script>
  35. export default {
  36. props:{
  37. goodsList: {
  38. type: Array,
  39. default: () => {
  40. return []
  41. }
  42. }
  43. },
  44. data() {
  45. return {
  46. }
  47. },
  48. methods: {
  49. }
  50. }
  51. </script>
  52. <style lang="scss" scoped>
  53. /* 为你推荐 */
  54. .recommend-info{
  55. width: 100%;
  56. .recommend-title{
  57. display: flex;
  58. align-items: center;
  59. justify-content: center;
  60. width: 100%;
  61. height: 100rpx;
  62. .title{
  63. display: flex;
  64. align-items: center;
  65. image{
  66. width: 416rpx;
  67. height: 40rpx;
  68. }
  69. }
  70. }
  71. .goods-list{
  72. display: flex;
  73. flex-wrap: wrap;
  74. justify-content: space-between;
  75. padding: 0 30rpx;
  76. .list{
  77. width: 49%;
  78. height: 490rpx;
  79. margin-bottom: 20rpx;
  80. background-color: #FFFFFF;
  81. border-radius: 10rpx;
  82. overflow: hidden;
  83. .pictrue{
  84. display: flex;
  85. justify-content: center;
  86. width: 100%;
  87. image{
  88. height: 320rpx;
  89. }
  90. }
  91. .title-tag{
  92. // display: flex;
  93. height: 70rpx;
  94. padding: 20rpx;
  95. .tag{
  96. float: left;
  97. margin-right: 10rpx;
  98. overflow: hidden;
  99. text-overflow: ellipsis;
  100. display: -webkit-box;
  101. -webkit-line-clamp: 2;
  102. -webkit-box-orient: vertical;
  103. white-space: normal;
  104. font-size: 26rpx;
  105. line-height: 40rpx;
  106. text{
  107. font-size: 24rpx;
  108. color: #FFFFFF;
  109. padding: 4rpx 16rpx;
  110. background: #fe3f11;
  111. border-radius: 6rpx;
  112. margin-right: 10rpx;
  113. }
  114. }
  115. }
  116. .price-info{
  117. display: flex;
  118. flex-wrap: wrap;
  119. align-items: center;
  120. justify-content: start;
  121. padding: 0 20rpx;
  122. height: 50rpx;
  123. .user-price{
  124. display: flex;
  125. align-items: center;
  126. text{
  127. color: #ff587f;
  128. }
  129. .min{
  130. font-size: 24rpx;
  131. }
  132. .max{
  133. font-size: 32rpx;
  134. }
  135. }
  136. .vip-price{
  137. padding-left: 20rpx;
  138. display: flex;
  139. align-items: center;
  140. image{
  141. width: 26rpx;
  142. height: 26rpx;
  143. margin-right: 10rpx;
  144. }
  145. text{
  146. text-decoration: line-through;
  147. color: #8c8c8c;
  148. font-size: 24rpx;
  149. }
  150. }
  151. }
  152. }
  153. }
  154. }
  155. </style>