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

148 lines
3.0 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?type=seckill')">
  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. this.getSeckillList();
  36. },
  37. methods: {
  38. getSeckillList(){
  39. this.$http.get({
  40. api: 'api/seckill/all'
  41. }).then(res => {
  42. console.log("----", res);
  43. })
  44. }
  45. }
  46. }
  47. </script>
  48. <style>
  49. page{
  50. background-color: #F8F8F8;
  51. }
  52. </style>
  53. <style lang="scss" scoped="scoped">
  54. .content{
  55. padding: 30rpx 32rpx;
  56. width: 750rpx;
  57. height: max-content;
  58. box-sizing: border-box;
  59. .card{
  60. width: 686rpx;
  61. height: 260rpx;
  62. background: #FFFFFF;
  63. border-radius: 20rpx;
  64. box-sizing: border-box;
  65. padding: 30rpx;
  66. display: flex;
  67. &:nth-child(n+2){
  68. margin-top: 30rpx;
  69. }
  70. .goods-img{
  71. width: 200rpx;
  72. height: 200rpx;
  73. border-radius: 10rpx;
  74. overflow: hidden;
  75. position: relative;
  76. margin-right: 15rpx;
  77. .img{
  78. width: 100%;
  79. height: 100%;
  80. background-color: #EEEEEE;
  81. }
  82. .tips{
  83. position: absolute;
  84. bottom: 0;
  85. left: 0;
  86. width: 100%;
  87. height: 37rpx;
  88. background-color: rgba(0,0,0,0.5);
  89. color: #FFFFFF;
  90. font-size: 22rpx;
  91. display: flex;
  92. justify-content: center;
  93. align-items: center;
  94. }
  95. }
  96. .goods-info{
  97. width: 410rpx;
  98. height: 200rpx;
  99. display: flex;
  100. flex-direction: column;
  101. justify-content: space-between;
  102. .title{
  103. font-size: 28rpx;
  104. color: #222222;
  105. font-weight: bold;
  106. }
  107. .desc{
  108. width: 281rpx;
  109. height: 35rpx;
  110. border-radius: 3rpx;
  111. background-color: #E9F2F2;
  112. font-size: 24rpx;
  113. color: #15716E;
  114. display: flex;
  115. justify-content: center;
  116. align-items: center;
  117. margin-top: 10rpx;
  118. }
  119. .price>text:nth-child(1){
  120. font-size: 36rpx;
  121. color: #F63434;
  122. font-weight: bold;
  123. }
  124. .price>text:nth-child(2){
  125. font-size: 24rpx;
  126. color: #777777;
  127. margin-left: 20rpx;
  128. text-decoration: line-through;
  129. }
  130. .btn{
  131. width: 142rpx;
  132. height: 60rpx;
  133. background: rgba(21, 113, 110, 0.05);
  134. border-radius: 36rpx;
  135. border: 2rpx solid #15716E;
  136. font-size: 26rpx;
  137. color: #15716E;
  138. display: flex;
  139. justify-content: center;
  140. align-items: center;
  141. }
  142. }
  143. }
  144. }
  145. </style>