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

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