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

99 lines
1.8 KiB

  1. <template>
  2. <view class="centent">
  3. <view class="title" @click="$url('/pages/discover/discover')">精选发现好物</view>
  4. <scroll-view class="find-scroll" :scroll-x="true">
  5. <view class="find-content">
  6. <!-- :class="{'max-item': index == 0}" -->
  7. <view class="find-item"
  8. @click="$url('/pages/discover/discoverdetails')"
  9. v-for="(item, index) in list" :key="index">
  10. <image class="img" :src="item.image"></image>
  11. <view class="lf-line-2 info">{{ item.associate.title }}</view>
  12. </view>
  13. </view>
  14. <view style="height: 10rpx;"></view>
  15. </scroll-view>
  16. </view>
  17. </template>
  18. <script>
  19. export default {
  20. props: {
  21. list: {
  22. type: Array,
  23. default: []
  24. }
  25. },
  26. data(){
  27. return {
  28. current: 0
  29. }
  30. },
  31. created(){
  32. },
  33. methods: {
  34. }
  35. }
  36. </script>
  37. <style lang="scss" scoped="scoped">
  38. .centent{
  39. padding-top: 60rpx;
  40. }
  41. .title{
  42. font-size: 36rpx;
  43. font-weight: bold;
  44. text-align: center;
  45. color: #222222;
  46. margin-bottom: 30rpx;
  47. }
  48. .find-scroll{
  49. padding: 0rpx 32rpx;
  50. width: 750rpx;
  51. height: max-content;
  52. box-sizing: border-box;
  53. .find-content{
  54. display: flex;
  55. width: max-content;
  56. align-items: center;
  57. padding: 10rpx 0 0 10rpx;
  58. }
  59. .find-item{
  60. width: 380rpx;
  61. height: 480rpx;
  62. background: #FFFFFF;
  63. box-shadow: 0rpx 2rpx 8rpx 1rpx rgba(0, 0, 0, 0.1);
  64. margin-right: 20rpx;
  65. .img{
  66. width: 380rpx;
  67. height: 380rpx;
  68. background-color: #D8D8D8;
  69. }
  70. .info{
  71. padding: 10rpx;
  72. width: 380rpx;
  73. height: 100rpx;
  74. box-sizing: border-box;
  75. font-size: 24rpx;
  76. line-height: 1.8;
  77. }
  78. }
  79. .max-item{
  80. height: 563rpx;
  81. width: 425rpx;
  82. .img{
  83. width: 425rpx;
  84. height: 425rpx;
  85. }
  86. .info{
  87. width: 425rpx;
  88. height: 138rpx;
  89. padding: 20rpx;
  90. font-size: 26rpx;
  91. line-height: 2.1;
  92. }
  93. }
  94. }
  95. </style>