index.vue 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224
  1. <template>
  2. <view class="seckill-section m-t" v-if="list.length>0">
  3. <view class="s-header">
  4. <view class="f-left-icon">
  5. <image src="https://hy.liuniu946.com/app/index/huo.png" mode=""></image>
  6. </view>
  7. <view class="tit-box"><text class="tit">今日上新</text></view>
  8. <view class="textNav iconfont iconenter" @click="navTo('/pages/index/sx')">更多</view>
  9. </view>
  10. <scroll-view class="floor-list" scroll-x>
  11. <view class="scoll-wrapper position-relative" >
  12. <view v-for="(item, index) in list" :key="index" class="floor-item" @click="navTo('/pages/product/product?id=' + item.id + '&isVip=' + 0)">
  13. <image class="list-image" :src="item.image" mode="aspectFill"></image>
  14. <text class="title clamp">{{ item.store_name }}</text>
  15. <view class="price-box">
  16. <text class="price">¥{{ item.price }}</text>
  17. <!-- <text class="price1">原价{{ item.ot_price }}</text> -->
  18. </view>
  19. </view>
  20. </view>
  21. </scroll-view>
  22. </view>
  23. </template>
  24. <script>
  25. import {
  26. getSeckillList,
  27. getSeckillClass
  28. } from '@/api/product.js';
  29. import {
  30. timeComputed
  31. } from '@/utils/rocessor.js';
  32. export default {
  33. props: {
  34. list: {
  35. type: Array,
  36. default () {
  37. return []
  38. }
  39. },
  40. },
  41. data() {
  42. return {
  43. };
  44. },
  45. created: function(e) {
  46. },
  47. methods: {
  48. navTo(url) {
  49. uni.navigateTo({
  50. url
  51. });
  52. },
  53. }
  54. };
  55. </script>
  56. <style lang="scss">
  57. /* 秒杀专区 */
  58. .yuezhuan{
  59. text-align: center;
  60. z-index: 999;
  61. position: absolute;
  62. text-align: center;
  63. width:30%;
  64. }
  65. .yuezhuan image{
  66. margin-top: -12rpx;
  67. float: right;
  68. width: 80rpx;
  69. height: 80rpx;
  70. }
  71. .yuezhuan text{
  72. margin-top: 8rpx;
  73. text-align: center;
  74. font-size: 22rpx;
  75. color: #AD0B04;
  76. margin-left: 80rpx;
  77. position: absolute;
  78. }
  79. .seckill-section {
  80. padding: 4rpx 30rpx 24rpx;
  81. .s-header {
  82. display: flex;
  83. align-items: center;
  84. height: 92rpx;
  85. line-height: 1;
  86. .tit-box {
  87. flex-shrink: 0;
  88. }
  89. .tit {
  90. @extend %font-title;
  91. }
  92. .f-left-icon {
  93. // @extend %f-left-icon;
  94. margin-right: 5rpx;
  95. width: 37rpx;
  96. height: 36rpx;
  97. image {
  98. width: 100%;
  99. height: 100%;
  100. }
  101. }
  102. .textNav {
  103. line-height: 1;
  104. padding: 15rpx 0;
  105. flex-shrink: 0;
  106. flex-grow: 1;
  107. min-width: 100rpx;
  108. }
  109. .tip-box {
  110. flex-grow: 1;
  111. display: flex;
  112. justify-content: flex-start;
  113. align-items: center;
  114. }
  115. .tip {
  116. font-size: $font-sm;
  117. color: #FF4C4C;
  118. font-weight: bold;
  119. padding-left: 10rpx;
  120. padding-right: 10rpx;
  121. }
  122. .timer {
  123. display: inline-block;
  124. width: 40rpx;
  125. height: 36rpx;
  126. text-align: center;
  127. line-height: 36rpx;
  128. margin-right: 14rpx;
  129. font-size: $font-sm + 2rpx;
  130. color: #fff;
  131. border-radius: 2px;
  132. background: rgba(0, 0, 0, 0.8);
  133. }
  134. .iconenter {
  135. font-size: $font-sm;
  136. color: $font-color-light;
  137. flex: 1;
  138. text-align: right;
  139. }
  140. }
  141. .floor-list {
  142. white-space: nowrap;
  143. background-color: white;
  144. padding: 20rpx;
  145. border-radius: 5rpx;
  146. box-shadow: $box-shadow;
  147. }
  148. .scoll-wrapper {
  149. display: flex;
  150. justify-content: left;
  151. align-items: center;
  152. .noGoodsBg {
  153. display: flex;
  154. align-items: center;
  155. justify-content: center;
  156. height: 100%;
  157. position: absolute;
  158. top: 0;
  159. left: 0;
  160. width: 100%;
  161. color: $font-color-light;
  162. }
  163. .floor-item {
  164. display: flex;
  165. justify-content: center;
  166. flex-direction: column;
  167. width: 200rpx;
  168. height: 300rpx;
  169. margin: 0 10rpx;
  170. background: #FFFFFF;
  171. border: 3rpx solid #F0E6CF;
  172. border-radius: 10rpx;
  173. .list-image {
  174. margin: 10rpx auto;
  175. width: 180rpx;
  176. height: 180rpx;
  177. border-radius: 6rpx;
  178. }
  179. .clamp{
  180. margin-left: 10rpx;
  181. }
  182. .price-box{
  183. display: flex;
  184. }
  185. .price {
  186. color: $color-red;
  187. }
  188. .price1{
  189. font-size: 22rpx;
  190. font-weight: 500;
  191. text-decoration: line-through;
  192. color: #969696;
  193. line-height: 26px;
  194. }
  195. }
  196. .item{
  197. display: flex;
  198. justify-content: center;
  199. margin: 0 auto;
  200. }
  201. }
  202. }
  203. </style>