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

158 lines
3.2 KiB

  1. <template>
  2. <view>
  3. <u-waterfall v-model="dataList" ref="uWaterfall">
  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. computed: {
  54. dataList() {
  55. return this.list
  56. }
  57. },
  58. onShow(){
  59. },
  60. destroyed() {
  61. },
  62. methods: {
  63. onClick(id){
  64. this.$url('/pages/goodsDetail/index?goods_id='+id);
  65. this.$emit('click');
  66. },
  67. clear() {
  68. this.$refs.uWaterfall.clear();
  69. }
  70. }
  71. }
  72. </script>
  73. <style lang="scss" scoped="scoped">
  74. // ====
  75. .list-warter {
  76. border-radius: 8px;
  77. margin: 10px 5px;
  78. margin-top: 0px;
  79. background-color: #ffffff;
  80. // padding: 8px;
  81. position: relative;
  82. overflow: hidden;
  83. }
  84. .u-close {
  85. position: absolute;
  86. top: 32rpx;
  87. right: 32rpx;
  88. }
  89. .list-image {
  90. width: 100%;
  91. border-radius: 4px;
  92. }
  93. .list-title {
  94. font-size: 28rpx;
  95. font-weight: bold;
  96. color: $u-main-color;
  97. }
  98. .list-label{
  99. position: absolute;
  100. bottom: 0;
  101. right: 0;
  102. background-color: rgba(0,0,0,0.5);
  103. width: 140rpx;
  104. height: 48rpx;
  105. border-radius: 20rpx 0rpx 0rpx 0rpx;
  106. font-size: 22rpx;
  107. color: #FFFFFF;
  108. line-height: 48rpx;
  109. text-align: center;
  110. }
  111. .list-tag {
  112. display: flex;
  113. margin-top: 5px;
  114. }
  115. .list-tag-owner {
  116. background-color: $u-type-error;
  117. color: #FFFFFF;
  118. display: flex;
  119. align-items: center;
  120. padding: 4rpx 14rpx;
  121. border-radius: 50rpx;
  122. font-size: 20rpx;
  123. line-height: 1;
  124. }
  125. .list-tag-text {
  126. border: 1px solid $u-type-primary;
  127. color: $u-type-primary;
  128. margin-left: 10px;
  129. border-radius: 50rpx;
  130. line-height: 1;
  131. padding: 4rpx 14rpx;
  132. display: flex;
  133. align-items: center;
  134. border-radius: 50rpx;
  135. font-size: 20rpx;
  136. }
  137. .list-price {
  138. font-size: 30rpx;
  139. color: $u-type-error;
  140. margin-top: 5px;
  141. display: flex;
  142. align-items: center;
  143. }
  144. // ====
  145. </style>