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

159 lines
3.2 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="(c_item, c_index) in 3" :key="c_index">
  10. <view class="title" @click="$url('/pages/index/list/monthlyList')">灯具榜 ></view>
  11. <scroll-view class="scroll-view" :scroll-x="true">
  12. <view class="scroll-content">
  13. <view class="goods-item" v-for="(item, index) in 5" :key="index" @click="$url('/pages/shop/goodsdetail?type=mail')">
  14. <view class="goods-img">
  15. <image class="img"></image>
  16. <view class="ranking">{{ item+1 }}</view>
  17. </view>
  18. <view class="goods-info">
  19. <view class="lf-line-1">猪大肠卖咯 5毛钱一斤咯</view>
  20. <view>0.5</view>
  21. </view>
  22. </view>
  23. </view>
  24. </scroll-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: #497C64;
  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: max-content;
  75. padding-bottom: 40rpx;
  76. background: #FFFFFF;
  77. border-radius: 10rpx;
  78. margin-bottom: 30rpx;
  79. .title{
  80. width: 181rpx;
  81. height: 60rpx;
  82. background: #15716E;
  83. border-radius: 0rpx 0rpx 15rpx 15rpx;
  84. font-size: 28rpx;
  85. color: #FFFFFF;
  86. display: flex;
  87. justify-content: center;
  88. align-items: center;
  89. margin: 0 auto;
  90. }
  91. .scroll-view{
  92. height: 280rpx;
  93. width: 100%;
  94. margin-top: 30rpx;
  95. padding: 0 25rpx;
  96. .scroll-content{
  97. display: flex;
  98. width: 100%;
  99. .goods-item{
  100. margin-right: 15rpx;
  101. width: 180rpx;
  102. }
  103. .goods-img{
  104. width: 180rpx;
  105. height: 180rpx;
  106. position: relative;
  107. .img{
  108. width: 100%;
  109. height: 100%;
  110. background-color: #EEEEEE;
  111. border-radius: 10rpx;
  112. }
  113. .ranking{
  114. position: absolute;
  115. top: 0;
  116. left: 0;
  117. width: 36rpx;
  118. height: 38rpx;
  119. background-color: #15716E;
  120. color: #FFFFFF;
  121. line-height: 38rpx;
  122. text-align: center;
  123. z-index: 9;
  124. &::after{
  125. content: '';
  126. position: absolute;
  127. bottom: -16rpx;
  128. left: 2rpx;
  129. width: 0rpx;
  130. height: 0rpx;
  131. border-left: 17rpx solid transparent;
  132. border-right: 17rpx solid transparent;
  133. border-top: 17rpx solid #15716E;
  134. z-index: -1;
  135. }
  136. }
  137. }
  138. .goods-info{
  139. text-align: center;
  140. color: #222222;
  141. &>view:nth-child(1n){
  142. font-size: 24rpx;
  143. }
  144. &>view:nth-child(2n){
  145. font-size: 28rpx;
  146. font-weight: bold;
  147. }
  148. }
  149. }
  150. }
  151. }
  152. }
  153. </style>