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

157 lines
3.0 KiB

  1. <template>
  2. <view>
  3. <lf-nav :showIcon="true" bgColor="transparent" :spreadOut="false"></lf-nav>
  4. <view class="head">
  5. <image class="img" mode="aspectFill" src="https://picsum.photos/200/300?grayscale"></image>
  6. <view class="title">热销榜单</view>
  7. </view>
  8. <view class="content">
  9. <view class="card" v-for="(item, index) in 7" :key="index" @click="$url('/pages/shop/goodsdetail?type=mail')">
  10. <view class="goods-img">
  11. <image class="img" src="https://picsum.photos/200/300"></image>
  12. <view class="ranking">{{ item+1 }}</view>
  13. </view>
  14. <view class="goods-info">
  15. <view>
  16. <view class="lf-line-2 title">SK-II秋日宠粉体验套装</view>
  17. <view class="desc">月销量324</view>
  18. </view>
  19. <view class="lf-row-between">
  20. <view class="price">
  21. <text>¥888</text>
  22. </view>
  23. </view>
  24. </view>
  25. </view>
  26. </view>
  27. </view>
  28. </template>
  29. <script>
  30. export default {
  31. data(){
  32. return {
  33. }
  34. },
  35. onLoad(){
  36. },
  37. methods: {
  38. }
  39. }
  40. </script>
  41. <style>
  42. page{
  43. background-color: #F8F8F8;
  44. }
  45. </style>
  46. <style lang="scss" scoped="scoped">
  47. .head{
  48. width: 750rpx;
  49. height: 430rpx;
  50. position: relative;
  51. .img{
  52. width: 100%;
  53. height: 100%;
  54. }
  55. .title{
  56. position: absolute;
  57. left: 0;
  58. top: 0;
  59. width: 100%;
  60. height: 100%;
  61. display: flex;
  62. justify-content: center;
  63. align-items: center;
  64. font-size: 100rpx;
  65. color: #FFFFFF;
  66. font-weight: bold;
  67. font-family: '楷体';
  68. }
  69. }
  70. .content{
  71. padding: 30rpx 32rpx;
  72. .card{
  73. width: 686rpx;
  74. height: 260rpx;
  75. background: #FFFFFF;
  76. border-radius: 20rpx;
  77. box-sizing: border-box;
  78. padding: 30rpx;
  79. display: flex;
  80. &:nth-child(n+2){
  81. margin-top: 30rpx;
  82. }
  83. .goods-img{
  84. width: 200rpx;
  85. height: 200rpx;
  86. border-radius: 10rpx;
  87. overflow: hidden;
  88. position: relative;
  89. margin-right: 15rpx;
  90. .img{
  91. width: 100%;
  92. height: 100%;
  93. background-color: #EEEEEE;
  94. }
  95. .ranking{
  96. position: absolute;
  97. top: 0;
  98. left: 0;
  99. width: 36rpx;
  100. height: 38rpx;
  101. background-color: #15716E;
  102. color: #FFFFFF;
  103. line-height: 38rpx;
  104. text-align: center;
  105. z-index: 9;
  106. &::after{
  107. content: '';
  108. position: absolute;
  109. bottom: -16rpx;
  110. left: 2rpx;
  111. width: 0rpx;
  112. height: 0rpx;
  113. border-left: 17rpx solid transparent;
  114. border-right: 17rpx solid transparent;
  115. border-top: 17rpx solid #15716E;
  116. z-index: -1;
  117. }
  118. }
  119. }
  120. .goods-info{
  121. width: 410rpx;
  122. height: 200rpx;
  123. display: flex;
  124. flex-direction: column;
  125. justify-content: space-between;
  126. .title{
  127. font-size: 28rpx;
  128. color: #222222;
  129. }
  130. .desc{
  131. width: max-content;
  132. height: 35rpx;
  133. border-radius: 18rpx;
  134. background-color: #E9F2F2;
  135. font-size: 24rpx;
  136. color: #15716E;
  137. display: flex;
  138. justify-content: center;
  139. align-items: center;
  140. margin-top: 10rpx;
  141. padding: 0 10rpx;
  142. }
  143. .price>text:nth-child(1){
  144. font-size: 32rpx;
  145. color: #222222;
  146. font-weight: bold;
  147. }
  148. }
  149. }
  150. }
  151. </style>