详情小程序
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
3.0 KiB

  1. <template>
  2. <view class="content">
  3. <view class="card" v-for="item in 4" :key="item">
  4. <view class="cover">
  5. <lf-image src="https://picsum.photos/200"></lf-image>
  6. <view class="tips">有效3天</view>
  7. </view>
  8. <view class="info">
  9. <view>
  10. <text class="title" v-if="item == 0">套餐一实用</text>
  11. <!-- <text class="title">套餐一实用</text> -->
  12. <text class="title" v-else>套餐一实实用实用实用实用实用实用用</text>
  13. <text class="label">6.5</text>
  14. </view>
  15. <view class="lf-m-t-12 lf-font-24">
  16. <text class="lf-color-777">红线数</text>
  17. <text>1</text>
  18. </view>
  19. <view class="lf-m-t-16">
  20. <lf-price :price="30.12" color="#E21196"></lf-price>
  21. <text class="original-price">¥30.00</text>
  22. </view>
  23. <view class="float-btn" hover-class="lf-opacity">
  24. <button></button>
  25. </view>
  26. </view>
  27. </view>
  28. </view>
  29. </template>
  30. <script>
  31. import lfPrice from '@/components/lf-price/lf-price.vue'
  32. export default {
  33. components: { lfPrice },
  34. data(){
  35. return {
  36. }
  37. },
  38. onLoad(){
  39. // 点击买字按钮直接调取支付
  40. },
  41. methods: {
  42. }
  43. }
  44. </script>
  45. <style lang="scss" scoped="scoped">
  46. .content{
  47. width: 750rpx;
  48. height: max-content;
  49. padding: 30rpx 32rpx;
  50. box-sizing: border-box;
  51. display: flex;
  52. flex-wrap: wrap;
  53. .card{
  54. width: 333rpx;
  55. height: max-content;
  56. background-color: #FFFFFF;
  57. box-shadow: 0rpx -2rpx 20rpx 2rpx rgba(0, 0, 0, 0.07);
  58. border-radius: 10rpx;
  59. overflow: hidden;
  60. margin-right: 20rpx;
  61. &:nth-child(2n){
  62. margin-right: 0;
  63. }
  64. &:nth-child(n+3){
  65. margin-top: 20rpx;
  66. }
  67. .cover{
  68. width: 100%;
  69. height: 260rpx;
  70. position: relative;
  71. .tips{
  72. position: absolute;
  73. left: 0;
  74. top: 0;
  75. width: 111rpx;
  76. height: 33rpx;
  77. background: linear-gradient(180deg, #FE3EA5 0%, #FE7350 100%);
  78. border-radius: 10rpx 0rpx 5rpx 0rpx;
  79. color: #FFFFFF;
  80. font-size: 24rpx;
  81. display: flex;
  82. justify-content: center;
  83. align-items: center;
  84. }
  85. }
  86. .info{
  87. padding: 15rpx;
  88. box-sizing: border-box;
  89. position: relative;
  90. .title{
  91. font-size: 28rpx;
  92. font-weight: bold;
  93. color: #222222;
  94. margin-right: 15rpx;
  95. }
  96. .label{
  97. display: inline-block;
  98. width: 84rpx;
  99. height: 33rpx;
  100. border-radius: 3rpx;
  101. border: 2rpx solid #E21196;
  102. font-size: 24rpx;
  103. color: #E21196;
  104. text-align: center;
  105. line-height: 29rpx;
  106. }
  107. .original-price{
  108. margin-left: 15rpx;
  109. color: #777777;
  110. font-size: 24rpx;
  111. text-decoration: line-through;
  112. }
  113. .float-btn{
  114. position: absolute;
  115. width: 45rpx;
  116. height: 45rpx;
  117. padding: 15rpx;
  118. right: 0;
  119. bottom: 10rpx;
  120. box-sizing: content-box;
  121. button{
  122. width: 100%;
  123. height: 100%;
  124. border-radius: 50%;
  125. background: #E21196;
  126. margin: 0;
  127. padding: 0;
  128. font-size: 24rpx;
  129. color: #FFFFFF;
  130. display: flex;
  131. justify-content: center;
  132. align-items: center;
  133. }
  134. }
  135. }
  136. }
  137. }
  138. </style>