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

162 lines
3.3 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')">
  11. <text class="lf-m-r-10">灯具榜</text>
  12. <text class="lf-iconfont icon-xiangyou lf-font-20"></text>
  13. </view>
  14. <scroll-view class="scroll-view" :scroll-x="true">
  15. <view class="scroll-content">
  16. <view class="goods-item" v-for="(item, index) in 5" :key="index" @click="$url('/pages/shop/goodsdetail?type=mail')">
  17. <view class="goods-img">
  18. <image class="img"></image>
  19. <view class="ranking">{{ item+1 }}</view>
  20. </view>
  21. <view class="goods-info">
  22. <view class="lf-line-1">猪大肠卖咯 5毛钱一斤咯</view>
  23. <view>0.5</view>
  24. </view>
  25. </view>
  26. </view>
  27. </scroll-view>
  28. </view>
  29. </view>
  30. </view>
  31. </template>
  32. <script>
  33. export default {
  34. data(){
  35. return {
  36. }
  37. },
  38. onLoad(){
  39. },
  40. methods: {
  41. }
  42. }
  43. </script>
  44. <style>
  45. page{
  46. background-color: #497C64;
  47. }
  48. </style>
  49. <style lang="scss" scoped="scoped">
  50. .head{
  51. width: 750rpx;
  52. height: 430rpx;
  53. position: relative;
  54. .img{
  55. width: 100%;
  56. height: 100%;
  57. }
  58. .title{
  59. position: absolute;
  60. left: 0;
  61. top: 0;
  62. width: 100%;
  63. height: 100%;
  64. display: flex;
  65. justify-content: center;
  66. align-items: center;
  67. font-size: 100rpx;
  68. color: #FFFFFF;
  69. font-weight: bold;
  70. font-family: '楷体';
  71. }
  72. }
  73. .content{
  74. padding: 30rpx 32rpx;
  75. .card{
  76. width: 686rpx;
  77. height: max-content;
  78. padding-bottom: 40rpx;
  79. background: #FFFFFF;
  80. border-radius: 10rpx;
  81. margin-bottom: 30rpx;
  82. .title{
  83. width: 181rpx;
  84. height: 60rpx;
  85. background: #15716E;
  86. border-radius: 0rpx 0rpx 15rpx 15rpx;
  87. font-size: 28rpx;
  88. color: #FFFFFF;
  89. display: flex;
  90. justify-content: center;
  91. align-items: center;
  92. margin: 0 auto;
  93. }
  94. .scroll-view{
  95. height: 280rpx;
  96. width: 100%;
  97. margin-top: 30rpx;
  98. padding: 0 25rpx;
  99. .scroll-content{
  100. display: flex;
  101. width: 100%;
  102. .goods-item{
  103. margin-right: 15rpx;
  104. width: 180rpx;
  105. }
  106. .goods-img{
  107. width: 180rpx;
  108. height: 180rpx;
  109. position: relative;
  110. .img{
  111. width: 100%;
  112. height: 100%;
  113. background-color: #EEEEEE;
  114. border-radius: 10rpx;
  115. }
  116. .ranking{
  117. position: absolute;
  118. top: 0;
  119. left: 0;
  120. width: 36rpx;
  121. height: 38rpx;
  122. background-color: #15716E;
  123. color: #FFFFFF;
  124. line-height: 38rpx;
  125. text-align: center;
  126. z-index: 9;
  127. &::after{
  128. content: '';
  129. position: absolute;
  130. bottom: -16rpx;
  131. left: 2rpx;
  132. width: 0rpx;
  133. height: 0rpx;
  134. border-left: 17rpx solid transparent;
  135. border-right: 17rpx solid transparent;
  136. border-top: 17rpx solid #15716E;
  137. z-index: -1;
  138. }
  139. }
  140. }
  141. .goods-info{
  142. text-align: center;
  143. color: #222222;
  144. &>view:nth-child(1n){
  145. font-size: 24rpx;
  146. }
  147. &>view:nth-child(2n){
  148. font-size: 28rpx;
  149. font-weight: bold;
  150. }
  151. }
  152. }
  153. }
  154. }
  155. }
  156. </style>