hotComponent.vue 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193
  1. <template>
  2. <view class="hot-wrap">
  3. <view class="hot-content">
  4. <view class="hot-title">
  5. <view class="title-l">
  6. 好味<text class="title-color">热卖</text>
  7. </view>
  8. <view class="title-btn">
  9. 限时抢购中<up-icon size="10" name="arrow-right"></up-icon>
  10. </view>
  11. </view>
  12. <view class="hot-list">
  13. <up-scroll-list indicatorColor="#fae6a4" indicatorActiveColor="#F3C11D" :indicatorWidth="30"
  14. :indicatorBarWidth="13">
  15. <view class="hot-panel">
  16. <view class="hot-item">
  17. <image class="hot-img" :src="`${config.BASIC_IMG}home/hot-1.png`" mode=""></image>
  18. <view class="item-info">
  19. <view class="info-text">
  20. <!-- <up-text :lines="2" color="#000000" size="12" text="海南妃子笑新鲜顺丰发货海南妃子笑海南妃子笑"></up-text> -->
  21. <view class="ellipsis-l2">
  22. 海南妃子笑新鲜顺丰发货海南妃子笑海南妃子笑
  23. </view>
  24. </view>
  25. <view class="info-price">
  26. <view class="price-text">
  27. <text class="price-unit">¥</text>108
  28. </view>
  29. <view class="info-sold">
  30. 已售1251
  31. </view>
  32. </view>
  33. </view>
  34. </view>
  35. <view class="hot-item">
  36. <image class="hot-img" :src="`${config.BASIC_IMG}home/hot-2.png`" mode=""></image>
  37. <view class="item-info">
  38. <view class="info-text">
  39. <view class="ellipsis-l2">
  40. 海南妃子笑新鲜顺丰发货海南妃子笑海南妃子笑
  41. </view>
  42. </view>
  43. <view class="info-price">
  44. <view class="price-text">
  45. <text class="price-unit">¥</text>108
  46. </view>
  47. <view class="info-sold">
  48. 已售1251
  49. </view>
  50. </view>
  51. </view>
  52. </view>
  53. <view class="hot-item">
  54. <image class="hot-img" :src="`${config.BASIC_IMG}home/hot-1.png`" mode=""></image>
  55. <view class="item-info">
  56. <view class="info-text">
  57. <view class="ellipsis-l2">
  58. 海南妃子笑新鲜顺丰发货海南妃子笑海南妃子笑新鲜顺丰发货
  59. </view>
  60. </view>
  61. <view class="info-price">
  62. <view class="price-text">
  63. <text class="price-unit">¥</text>108
  64. </view>
  65. <view class="info-sold">
  66. 已售1251
  67. </view>
  68. </view>
  69. </view>
  70. </view>
  71. <view class="hot-item">
  72. <image class="hot-img" :src="`${config.BASIC_IMG}home/hot-2.png`" mode=""></image>
  73. <view class="item-info">
  74. <view class="info-text">
  75. <view class="ellipsis-l2">
  76. 海南妃子笑新鲜顺丰发货海南妃子笑海南妃子笑新鲜顺丰发货
  77. </view>
  78. </view>
  79. <view class="info-price">
  80. <view class="price-text">
  81. <text class="price-unit">¥</text>108
  82. </view>
  83. <view class="info-sold">
  84. 已售1251
  85. </view>
  86. </view>
  87. </view>
  88. </view>
  89. </view>
  90. </up-scroll-list>
  91. </view>
  92. </view>
  93. </view>
  94. </template>
  95. <script setup>
  96. import config from "@/api/config.js"
  97. </script>
  98. <style lang="scss" scoped>
  99. .hot-title {
  100. display: flex;
  101. align-items: center;
  102. justify-content: space-between;
  103. padding-bottom: 20rpx;
  104. .title-l {
  105. font-family: 'PangMenZhengDao';
  106. font-size: 32rpx;
  107. .title-color {
  108. color: #F3C11D;
  109. }
  110. }
  111. .title-btn {
  112. color: rgba(0, 0, 0, 0.6);
  113. font-size: 24rpx;
  114. display: inline-flex;
  115. align-items: center;
  116. }
  117. }
  118. .hot-wrap {
  119. margin: 0 20rpx 20rpx;
  120. background: linear-gradient(#FFFFFF, rgba(255, 255, 255, 0));
  121. padding: 2rpx;
  122. border-radius: 16rpx;
  123. .hot-content {
  124. background: linear-gradient(#fff1c3 4%, #FFFFFF 28%);
  125. border-radius: 16rpx;
  126. padding: 20rpx;
  127. height: 240rpx;
  128. box-sizing: border-box;
  129. .hot-list {
  130. .hot-panel {
  131. width: 100%;
  132. display: flex;
  133. .hot-item {
  134. width: calc(50% - 10rpx);
  135. display: flex;
  136. white-space: nowrap;
  137. .hot-img {
  138. flex: none;
  139. width: 116rpx;
  140. height: 116rpx;
  141. object-fit: cover;
  142. border-radius: 10rpx;
  143. }
  144. .item-info {
  145. padding-left: 10rpx;
  146. width: 200rpx;
  147. .info-text {
  148. color: #000000;
  149. font-size: 24rpx;
  150. }
  151. .info-price {
  152. display: flex;
  153. align-items: baseline;
  154. justify-content: space-between;
  155. .price-text {
  156. color: #FF7700;
  157. font-size: 36rpx;
  158. .price-unit {
  159. font-size: 23rpx;
  160. }
  161. }
  162. .info-sold {
  163. font-size: 20rpx;
  164. color: #C4C4C4;
  165. }
  166. }
  167. }
  168. }
  169. .hot-item+.hot-item {
  170. margin-left: 20rpx;
  171. }
  172. }
  173. }
  174. }
  175. }
  176. </style>