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

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