瑶都万能墙
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

153 lines
2.9 KiB

8 months ago
7 months ago
8 months ago
7 months ago
8 months ago
7 months ago
8 months ago
7 months ago
8 months ago
7 months ago
8 months ago
7 months ago
8 months ago
7 months ago
8 months ago
7 months ago
8 months ago
7 months ago
8 months ago
7 months ago
8 months ago
7 months ago
8 months ago
7 months ago
8 months ago
7 months ago
8 months ago
7 months ago
8 months ago
7 months ago
8 months ago
7 months ago
8 months ago
7 months ago
8 months ago
7 months ago
8 months ago
7 months ago
8 months ago
7 months ago
8 months ago
  1. <template>
  2. <view class="list">
  3. <view class="item"
  4. v-for="(item, index) in productList"
  5. @click="$utils.navigateTo('/pages_order/product/productDetail?id=' + item.id)"
  6. :key="index">
  7. <image
  8. class="image"
  9. :src="item.image ? item.image.split(',')[0] : 'https://img95.699pic.com/photo/50058/1378.jpg_wh860.jpg'" mode="aspectFill"></image>
  10. <view class="info">
  11. <view class="title text-ellipsis">
  12. {{ item.name }}
  13. </view>
  14. <!-- <view class="price">
  15. <text>{{ item.originalPrice }}</text>/
  16. </view>
  17. <view class="favorable" v-if="item.goodsSku">
  18. <view class="t">
  19. 限时优惠
  20. </view>
  21. <view class="p">
  22. {{ item.goodsSku.price }}
  23. </view>
  24. </view> -->
  25. <view class="price">
  26. 现价<text>{{ item.price }}</text>
  27. </view>
  28. <view class="del">
  29. 原价{{ item.oldPrice }}
  30. </view>
  31. <!-- <view class="favorable" v-if="item.oldPrice">
  32. <view class="t">
  33. 原价
  34. </view>
  35. <view class="p">
  36. {{ item.oldPrice }}
  37. </view>
  38. </view> -->
  39. <view class="favorable" v-if="item.points">
  40. <view class="t">
  41. 积分兑换
  42. </view>
  43. <view class="p">
  44. {{ item.points }}
  45. </view>
  46. </view>
  47. <view class="num">
  48. {{ item.shopId }}
  49. </view>
  50. <!-- <view class="num">
  51. 已售卖{{ item.soldNum || 0 }}+
  52. </view> -->
  53. </view>
  54. <view class="btn">
  55. <uv-icon name="shopping-cart"
  56. color="#fff"></uv-icon>
  57. </view>
  58. </view>
  59. </view>
  60. </template>
  61. <script>
  62. export default {
  63. name:"productList",
  64. props : ['productList'],
  65. data() {
  66. return {
  67. };
  68. },
  69. methods : {
  70. },
  71. }
  72. </script>
  73. <style scoped lang="scss">
  74. .list{
  75. display: flex;
  76. flex-wrap: wrap;
  77. .item{
  78. position: relative;
  79. width: 300rpx;
  80. padding: 20rpx;
  81. background-color: #fff;
  82. border-radius: 20rpx;
  83. margin-top: 20rpx;
  84. &:nth-child(odd){
  85. margin-right: 20rpx;
  86. }
  87. .image{
  88. width: 300rpx;
  89. height: 250rpx;
  90. border-radius: 20rpx;
  91. }
  92. .info{
  93. font-size: 26rpx;
  94. .title{
  95. font-size: 28rpx;
  96. }
  97. .price{
  98. color: $uni-price-color;
  99. margin-top: 6rpx;
  100. text{
  101. font-size: 30rpx;
  102. font-weight: 900;
  103. }
  104. }
  105. .del{
  106. font-size: 22rpx;
  107. color: #888;
  108. font-weight: 500;
  109. text-decoration : line-through;
  110. }
  111. .favorable{
  112. display: flex;
  113. // background-image: url(/static/image/product/favorable.png);
  114. background-size: 100% 100%;
  115. width: fit-content;
  116. font-size: 20rpx;
  117. margin-top: 6rpx;
  118. border-radius: 10rpx;
  119. overflow: hidden;
  120. background-color: #ff000011;
  121. .t{
  122. padding: 5rpx 10rpx;
  123. }
  124. .p{
  125. padding: 5rpx 10rpx;
  126. color: #fff;
  127. background-color: #F03F25;
  128. height: 100%;
  129. }
  130. }
  131. .num{
  132. margin-top: 6rpx;
  133. font-size: 22rpx;
  134. color: #888;
  135. }
  136. }
  137. .btn{
  138. position: absolute;
  139. right: 20rpx;
  140. bottom: 20rpx;
  141. padding: 10rpx;
  142. border-radius: 50%;
  143. background-color: $uni-color;
  144. }
  145. }
  146. }
  147. </style>