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

119 lines
2.3 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 4" :key="index">
  10. <image class="goods-img"></image>
  11. <view class="lf-line-1 goods-title">日本sk-ll小灯跑</view>
  12. <view class="goods-price">
  13. <text>¥888</text>
  14. <text>¥888</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. onLoad(){
  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. font-weight: #F63434;
  105. }
  106. .goods-price>text:nth-child(2n){
  107. font-size: 24rpx;
  108. font-weight: #777777;
  109. margin-left: 15rpx;
  110. }
  111. }
  112. }
  113. }
  114. </style>