goods_1.vue 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199
  1. <template>
  2. <scroll-view scroll-y="true" class="scroll-view" @scrolltolower="toPage">
  3. <view class="list-scroll-view">
  4. <view class="goods">
  5. <view class="goods_1">
  6. <view class="list" v-for="(item,index) in marketList" :key="index">
  7. <image class="image" :src="item.file&&item.file.length>0?item.file[0].url:''" mode="">
  8. </image>
  9. <view class="name textOver">
  10. {{item.name}}
  11. </view>
  12. <view class="other">
  13. <view class="money">
  14. <view class="money_1">
  15. <text>¥</text><text>{{item.sell_money||0}}</text>
  16. </view>
  17. <view class="money_2">
  18. <text>¥</text><text>{{item.flow_money||0}}</text>
  19. </view>
  20. </view>
  21. </view>
  22. <view class="other" v-if="item.leader_price">
  23. <view class="leader">
  24. <text>会员价</text><text>¥</text><text>{{item.leader_price||0}}</text>
  25. </view>
  26. </view>
  27. <view class="other" v-if="item.p_act">
  28. <text class="label" v-for="(tag,index) in item.p_act" :key="index">{{tag}}</text>
  29. </view>
  30. <view class="button" @tap="toSend(item)">
  31. <text>发送</text>
  32. </view>
  33. <view class="acttags">
  34. <text v-for="(i,indexx) in item.actTagsShow" :key="indexx">{{i.label}}</text>
  35. </view>
  36. </view>
  37. </view>
  38. </view>
  39. </view>
  40. </scroll-view>
  41. </template>
  42. <script>
  43. export default {
  44. props: {
  45. marketList: {
  46. type: Array
  47. },
  48. },
  49. data() {
  50. return {};
  51. },
  52. methods: {
  53. // 分页
  54. toPage(e) {
  55. const that = this;
  56. that.$emit('toPage')
  57. },
  58. // 发送
  59. toSend(e) {
  60. const that = this;
  61. that.$emit('toSend', e)
  62. }
  63. }
  64. }
  65. </script>
  66. <style lang="scss">
  67. .goods {
  68. display: flex;
  69. flex-direction: column;
  70. background-color: var(--f2Color);
  71. padding: 2vw 0;
  72. .goods_1 {
  73. display: flex;
  74. justify-content: space-between;
  75. flex-wrap: wrap;
  76. padding: 0 2vw;
  77. .list {
  78. // break-inside: avoid;
  79. position: relative;
  80. width: 41vw;
  81. background-color: var(--fffColor);
  82. padding: 2vw;
  83. margin: 0 0 2vw 0;
  84. border-radius: 10px;
  85. .image {
  86. width: 100%;
  87. height: 40vw;
  88. }
  89. .name {
  90. font-size: var(--font14Size);
  91. }
  92. .other {
  93. display: flex;
  94. flex-direction: row;
  95. padding: 1vw 0 0 0;
  96. .money {
  97. display: flex;
  98. .money_1 {
  99. color: var(--fFB1Color);
  100. font-size: 12px;
  101. text:last-child {
  102. font-size: 16px;
  103. padding: 0 0 0 1vw;
  104. }
  105. }
  106. .money_2 {
  107. font-size: 12px;
  108. margin: 0 0 0 2vw;
  109. color: var(--f99Color);
  110. text {
  111. text-decoration: line-through;
  112. }
  113. text:last-child {
  114. font-size: 16px;
  115. padding: 0 0 0 1vw;
  116. }
  117. }
  118. }
  119. .label {
  120. font-size: 12px;
  121. color: #FFA500;
  122. border: 1px solid #FFA500;
  123. border-radius: 5px;
  124. padding: 0 1vw;
  125. margin: 0 1vw 0 0;
  126. }
  127. .leader {
  128. font-size: 12px;
  129. text-align: center;
  130. color: #23B67A;
  131. text:last-child {
  132. font-size: 16px;
  133. padding: 0 0 0 1vw;
  134. }
  135. }
  136. }
  137. .button {
  138. text-align: right;
  139. margin: 1vw 0;
  140. text {
  141. font-size: 12px;
  142. padding: 10rpx 20rpx;
  143. border-radius: 20rpx;
  144. color: #ffffff;
  145. background-color: var(--fFB1Color);
  146. }
  147. }
  148. .acttags {
  149. position: absolute;
  150. top: 2vw;
  151. width: 93%;
  152. text {
  153. display: inline-block;
  154. background-color: var(--fFB1Color);
  155. color: #fff;
  156. border-radius: 1vw;
  157. padding: 0.5vw;
  158. font-size: 12px;
  159. margin: 0 1vw 0 0;
  160. }
  161. }
  162. }
  163. }
  164. }
  165. .scroll-view {
  166. position: absolute;
  167. top: 0;
  168. left: 0;
  169. right: 0;
  170. bottom: 0;
  171. .list-scroll-view {
  172. display: flex;
  173. flex-direction: column;
  174. }
  175. }
  176. </style>