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

130 lines
2.8 KiB

4 years ago
4 years ago
  1. <template>
  2. <view class="content">
  3. <view class="title">剁手不心疼</view>
  4. <view class="card" @click="$url('/pages/shop/seckillList')">
  5. <view class="title">{{ title || '秒杀购' }}</view>
  6. <view class="desc">低价不等人快来秒杀啦</view>
  7. <scroll-view class="scroll-view" :scroll-x="true">
  8. <view class="lf-flex">
  9. <view class="goods-item" v-for="(item, index) in list" :key="index">
  10. <image class="goods-img" :src="item.image || item.associate.goods.img"></image>
  11. <view class="lf-line-1 goods-title">{{ item.associate.goods.name }}</view>
  12. <!-- <view class="goods-price">
  13. <text>¥{{ item.associate.seckill_price }}</text>
  14. <text>¥{{ item.associate.goods.sell_price }}</text>
  15. </view> -->
  16. <view class="goods-price1">¥{{ item.associate.seckill_price }}</view>
  17. <view class="goods-price2">¥{{ item.associate.goods.sell_price }}</view>
  18. </view>
  19. </view>
  20. </scroll-view>
  21. </view>
  22. </view>
  23. </template>
  24. <script>
  25. export default {
  26. props: {
  27. list: {
  28. type: Array,
  29. default: []
  30. },
  31. title: {
  32. type: String,
  33. default: ''
  34. }
  35. },
  36. data(){
  37. return {
  38. }
  39. },
  40. methods: {
  41. }
  42. }
  43. </script>
  44. <style lang="scss" scoped="scoped">
  45. .content{
  46. padding: 60rpx 32rpx 0;
  47. width: 750rpx;
  48. height: max-content;
  49. box-sizing: border-box;
  50. .title{
  51. font-size: 36rpx;
  52. font-weight: bold;
  53. text-align: center;
  54. color: #222222;
  55. margin-bottom: 30rpx;
  56. }
  57. .card{
  58. width: 686rpx;
  59. height: 471rpx;
  60. background: #F3F8F8;
  61. border-radius: 20rpx;
  62. padding: 40rpx;
  63. box-sizing: border-box;
  64. display: flex;
  65. justify-content: center;
  66. flex-direction: column;
  67. align-items: center;
  68. .title{
  69. font-size: 32rpx;
  70. font-weight: bold;
  71. color: #15716E;
  72. }
  73. .desc{
  74. width: 317rpx;
  75. height: 33rpx;
  76. background: #15716E;
  77. border-radius: 17rpx;
  78. font-size: 24rpx;
  79. color: #FFFFFF;
  80. text-align: center;
  81. line-height: 33rpx;
  82. margin-top: 10rpx;
  83. margin-bottom: 40rpx;
  84. }
  85. .scroll-view, .scroll-view>view{
  86. width: 100%;
  87. }
  88. .goods-item{
  89. margin-right: 33rpx;
  90. width: 180rpx;
  91. .goods-img{
  92. width: 180rpx;
  93. height: 180rpx;
  94. border-radius: 10rpx;
  95. background-color: #EEEEEE;
  96. }
  97. .goods-title{
  98. font-size: 24rpx;
  99. color: #222222;
  100. margin-top: 10rpx;
  101. }
  102. // .goods-price>text:nth-child(1n){
  103. // font-size: 28rpx;
  104. // color: #F63434;
  105. // font-weight: bold;
  106. // }
  107. // .goods-price>text:nth-child(2n){
  108. // font-size: 24rpx;
  109. // color: #777777;
  110. // margin-left: 15rpx;
  111. // text-decoration: line-through;
  112. // }
  113. .goods-price1{
  114. font-size: 28rpx;
  115. color: #F63434;
  116. font-weight: bold;
  117. }
  118. .goods-price2{
  119. font-size: 24rpx;
  120. color: #777777;
  121. text-decoration: line-through;
  122. }
  123. }
  124. }
  125. }
  126. </style>