金诚优选前端代码
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.

142 lines
2.9 KiB

  1. <template>
  2. <view>
  3. <lf-nav title="秒杀专场" :showIcon="true" bgColor="#fff"></lf-nav>
  4. <view class="content">
  5. <view class="card" v-for="(item, index) in 7" :key="index" @click="$url('/pages/shop/goodsdetail')">
  6. <view class="goods-img">
  7. <image class="img" src="https://picsum.photos/200/300"></image>
  8. <view class="tips">已有0人购买</view>
  9. </view>
  10. <view class="goods-info">
  11. <view>
  12. <view class="lf-line-2 title">SK-II秋日宠粉体验套装</view>
  13. <view class="desc">距离开始还剩余 20:34:18</view>
  14. </view>
  15. <view class="lf-row-between">
  16. <view class="price">
  17. <text>¥888</text>
  18. <text>¥10000</text>
  19. </view>
  20. <view class="btn" hover-class="lf-opacity">立即秒杀</view>
  21. </view>
  22. </view>
  23. </view>
  24. </view>
  25. <u-back-top :scrollTop="pageScrollTop"></u-back-top>
  26. </view>
  27. </template>
  28. <script>
  29. export default {
  30. data(){
  31. return {
  32. }
  33. },
  34. onLoad(){
  35. },
  36. methods: {
  37. }
  38. }
  39. </script>
  40. <style>
  41. page{
  42. background-color: #F8F8F8;
  43. }
  44. </style>
  45. <style lang="scss" scoped="scoped">
  46. .content{
  47. padding: 30rpx 32rpx;
  48. width: 750rpx;
  49. height: max-content;
  50. box-sizing: border-box;
  51. .card{
  52. width: 686rpx;
  53. height: 260rpx;
  54. background: #FFFFFF;
  55. border-radius: 20rpx;
  56. box-sizing: border-box;
  57. padding: 30rpx;
  58. display: flex;
  59. &:nth-child(n+2){
  60. margin-top: 30rpx;
  61. }
  62. .goods-img{
  63. width: 200rpx;
  64. height: 200rpx;
  65. border-radius: 10rpx;
  66. overflow: hidden;
  67. position: relative;
  68. margin-right: 15rpx;
  69. .img{
  70. width: 100%;
  71. height: 100%;
  72. background-color: #EEEEEE;
  73. }
  74. .tips{
  75. position: absolute;
  76. bottom: 0;
  77. left: 0;
  78. width: 100%;
  79. height: 37rpx;
  80. background-color: rgba(0,0,0,0.5);
  81. color: #FFFFFF;
  82. font-size: 22rpx;
  83. display: flex;
  84. justify-content: center;
  85. align-items: center;
  86. }
  87. }
  88. .goods-info{
  89. width: 410rpx;
  90. height: 200rpx;
  91. display: flex;
  92. flex-direction: column;
  93. justify-content: space-between;
  94. .title{
  95. font-size: 28rpx;
  96. color: #222222;
  97. font-weight: bold;
  98. }
  99. .desc{
  100. width: 281rpx;
  101. height: 35rpx;
  102. border-radius: 3rpx;
  103. background-color: #E9F2F2;
  104. font-size: 24rpx;
  105. color: #15716E;
  106. display: flex;
  107. justify-content: center;
  108. align-items: center;
  109. margin-top: 10rpx;
  110. }
  111. .price>text:nth-child(1){
  112. font-size: 36rpx;
  113. color: #F63434;
  114. font-weight: bold;
  115. }
  116. .price>text:nth-child(2){
  117. font-size: 24rpx;
  118. color: #777777;
  119. margin-left: 20rpx;
  120. text-decoration: line-through;
  121. }
  122. .btn{
  123. width: 142rpx;
  124. height: 60rpx;
  125. background: rgba(21, 113, 110, 0.05);
  126. border-radius: 36rpx;
  127. border: 2rpx solid #15716E;
  128. font-size: 26rpx;
  129. color: #15716E;
  130. display: flex;
  131. justify-content: center;
  132. align-items: center;
  133. }
  134. }
  135. }
  136. }
  137. </style>