酒店桌布为微信小程序
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.

112 lines
2.0 KiB

7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 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.pic || 'https://img95.699pic.com/photo/50058/1378.jpg_wh860.jpg'" mode="aspectFill"></image>
  10. <view class="info">
  11. <view class="title">
  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="num">
  26. 已售卖{{ item.soldNum }}+
  27. </view>
  28. </view>
  29. <view class="btn">
  30. <uv-icon name="shopping-cart"
  31. color="#fff"></uv-icon>
  32. </view>
  33. </view>
  34. </view>
  35. </template>
  36. <script>
  37. export default {
  38. name:"productList",
  39. props : ['productList'],
  40. data() {
  41. return {
  42. };
  43. },
  44. methods : {
  45. },
  46. }
  47. </script>
  48. <style scoped lang="scss">
  49. .list{
  50. display: flex;
  51. flex-wrap: wrap;
  52. .item{
  53. position: relative;
  54. width: 300rpx;
  55. padding: 20rpx;
  56. background-color: #fff;
  57. border-radius: 20rpx;
  58. margin-top: 20rpx;
  59. &:nth-child(odd){
  60. margin-right: 20rpx;
  61. }
  62. .image{
  63. width: 300rpx;
  64. height: 250rpx;
  65. border-radius: 20rpx;
  66. }
  67. .info{
  68. font-size: 26rpx;
  69. .title{
  70. font-size: 30rpx;
  71. }
  72. .price{
  73. color: #D03F25;
  74. margin-top: 6rpx;
  75. text{
  76. font-size: 34rpx;
  77. font-weight: 900;
  78. }
  79. }
  80. .favorable{
  81. display: flex;
  82. background-image: url(/static/image/product/favorable.png);
  83. background-size: 100% 100%;
  84. width: fit-content;
  85. padding: 5rpx 10rpx;
  86. font-size: 18rpx;
  87. margin-top: 6rpx;
  88. .p{
  89. color: #fff;
  90. margin-left: 10rpx;
  91. }
  92. }
  93. .num{
  94. margin-top: 6rpx;
  95. font-size: 22rpx;
  96. color: #888;
  97. }
  98. }
  99. .btn{
  100. position: absolute;
  101. right: 20rpx;
  102. bottom: 20rpx;
  103. padding: 10rpx;
  104. border-radius: 50%;
  105. background-color: $uni-color;
  106. }
  107. }
  108. }
  109. </style>