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

118 lines
2.4 KiB

  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.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.goods.market_price }}</text>
  14. <text>¥{{ item.associate.goods.max_price }}</text>
  15. </view>
  16. </view>
  17. </view>
  18. </scroll-view>
  19. </view>
  20. </view>
  21. </template>
  22. <script>
  23. export default {
  24. props: {
  25. list: {
  26. type: Array,
  27. default: []
  28. },
  29. title: {
  30. type: String,
  31. default: ''
  32. }
  33. },
  34. data(){
  35. return {
  36. }
  37. },
  38. methods: {
  39. }
  40. }
  41. </script>
  42. <style lang="scss" scoped="scoped">
  43. .content{
  44. padding: 60rpx 32rpx 0;
  45. width: 750rpx;
  46. height: max-content;
  47. box-sizing: border-box;
  48. .title{
  49. font-size: 36rpx;
  50. font-weight: bold;
  51. text-align: center;
  52. color: #222222;
  53. margin-bottom: 30rpx;
  54. }
  55. .card{
  56. width: 686rpx;
  57. height: 471rpx;
  58. background: #F3F8F8;
  59. border-radius: 20rpx;
  60. padding: 40rpx;
  61. box-sizing: border-box;
  62. display: flex;
  63. justify-content: center;
  64. flex-direction: column;
  65. align-items: center;
  66. .title{
  67. font-size: 32rpx;
  68. font-weight: bold;
  69. color: #15716E;
  70. }
  71. .desc{
  72. width: 317rpx;
  73. height: 33rpx;
  74. background: #15716E;
  75. border-radius: 17rpx;
  76. font-size: 24rpx;
  77. color: #FFFFFF;
  78. text-align: center;
  79. line-height: 33rpx;
  80. margin-top: 10rpx;
  81. margin-bottom: 40rpx;
  82. }
  83. .scroll-view, .scroll-view>view{
  84. width: 100%;
  85. }
  86. .goods-item{
  87. margin-right: 33rpx;
  88. width: 180rpx;
  89. .goods-img{
  90. width: 180rpx;
  91. height: 180rpx;
  92. border-radius: 10rpx;
  93. background-color: #EEEEEE;
  94. }
  95. .goods-title{
  96. font-size: 24rpx;
  97. color: #222222;
  98. margin-top: 10rpx;
  99. }
  100. .goods-price>text:nth-child(1n){
  101. font-size: 28rpx;
  102. color: #F63434;
  103. font-weight: bold;
  104. }
  105. .goods-price>text:nth-child(2n){
  106. font-size: 24rpx;
  107. color: #777777;
  108. margin-left: 15rpx;
  109. text-decoration: line-through;
  110. }
  111. }
  112. }
  113. }
  114. </style>