海南旅游项目 前端仓库
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.

148 lines
3.1 KiB

  1. <template>
  2. <view>
  3. <u-waterfall v-model="list">
  4. <template v-slot:left="{leftList}">
  5. <view class="list-warter" v-for="(item, index) in leftList" :key="index" @click="onClick(item.id)">
  6. <u-lazy-load threshold="-450" border-radius="8px 8px 0 0" :image="item.product.picture" :index="index">
  7. <view class="list-label">已售{{item.sale}}</view>
  8. </u-lazy-load>
  9. <view class="lf-p-20">
  10. <view class="list-title">
  11. {{item.product.title}}
  12. </view>
  13. <view class="list-price">
  14. <!-- <text>{{item.price}}</text> -->
  15. <lf-price :price="item.price"></lf-price>
  16. <text class="lf-m-l-20 lf-font-24 lf-color-666 lf-line-through">{{item.original_price}}</text>
  17. </view>
  18. </view>
  19. </view>
  20. </template>
  21. <template v-slot:right="{rightList}">
  22. <view class="list-warter" v-for="(item, index) in rightList" :key="index" @click="onClick(item.id)">
  23. <u-lazy-load threshold="-450" border-radius="8px 8px 0 0" :image="item.product.picture" :index="index">
  24. <view class="list-label">已售{{item.sale}}</view>
  25. </u-lazy-load>
  26. <view class="lf-p-20">
  27. <view class="list-title">
  28. {{item.product.title}}
  29. </view>
  30. <view class="list-price">
  31. <!-- <text>{{item.price}}</text> -->
  32. <lf-price :price="item.price"></lf-price>
  33. <text class="lf-m-l-20 lf-font-24 lf-color-666 lf-line-through">{{item.original_price}}</text>
  34. </view>
  35. </view>
  36. </view>
  37. </template>
  38. </u-waterfall>
  39. </view>
  40. </template>
  41. <script>
  42. export default {
  43. props: {
  44. list: {
  45. type: Array,
  46. default: []
  47. }
  48. },
  49. data(){
  50. return {
  51. }
  52. },
  53. onLoad(){
  54. },
  55. methods: {
  56. onClick(id){
  57. console.log("aaaa");
  58. this.$url('/pages/goodsDetail/index?goods_id='+id);
  59. this.$emit('click');
  60. }
  61. }
  62. }
  63. </script>
  64. <style lang="scss" scoped="scoped">
  65. // ====
  66. .list-warter {
  67. border-radius: 8px;
  68. margin: 10px 5px;
  69. margin-top: 0px;
  70. background-color: #ffffff;
  71. // padding: 8px;
  72. position: relative;
  73. overflow: hidden;
  74. }
  75. .u-close {
  76. position: absolute;
  77. top: 32rpx;
  78. right: 32rpx;
  79. }
  80. .list-image {
  81. width: 100%;
  82. border-radius: 4px;
  83. }
  84. .list-title {
  85. font-size: 28rpx;
  86. font-weight: bold;
  87. color: $u-main-color;
  88. }
  89. .list-label{
  90. position: absolute;
  91. bottom: 0;
  92. right: 0;
  93. background-color: rgba(0,0,0,0.5);
  94. width: 140rpx;
  95. height: 48rpx;
  96. border-radius: 20rpx 0rpx 0rpx 0rpx;
  97. font-size: 22rpx;
  98. color: #FFFFFF;
  99. line-height: 48rpx;
  100. text-align: center;
  101. }
  102. .list-tag {
  103. display: flex;
  104. margin-top: 5px;
  105. }
  106. .list-tag-owner {
  107. background-color: $u-type-error;
  108. color: #FFFFFF;
  109. display: flex;
  110. align-items: center;
  111. padding: 4rpx 14rpx;
  112. border-radius: 50rpx;
  113. font-size: 20rpx;
  114. line-height: 1;
  115. }
  116. .list-tag-text {
  117. border: 1px solid $u-type-primary;
  118. color: $u-type-primary;
  119. margin-left: 10px;
  120. border-radius: 50rpx;
  121. line-height: 1;
  122. padding: 4rpx 14rpx;
  123. display: flex;
  124. align-items: center;
  125. border-radius: 50rpx;
  126. font-size: 20rpx;
  127. }
  128. .list-price {
  129. font-size: 30rpx;
  130. color: $u-type-error;
  131. margin-top: 5px;
  132. display: flex;
  133. align-items: center;
  134. }
  135. // ====
  136. </style>