index.vue 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  1. <template>
  2. <view clang="ranking-main">
  3. <view class="serve-title ranking-title">本月热门服务</view>
  4. <view class="ranking-list">
  5. <view v-for="item in datas" :key="item.id" class="ranking-item">
  6. <img :src="item.img" alt="" srcset="" style="width: 160rpx;height: 160rpx;margin-right: 32rpx;">
  7. <view class="ranking-item-info">
  8. <view class="ranking-item-name">{{ item.name }}</view>
  9. <view class="ranking-item-tag flex-center">{{ item.tag }}</view>
  10. <view class="ranking-item-text">{{ item.text }}</view>
  11. <view class="ranking-item-dese">{{ item.dese }}</view>
  12. </view>
  13. <view class="ranking-item-start-box flex-center">
  14. <img src="/static/serverImg/home/start.png" alt="" style="width: 32rpx;height: 32rpx;">
  15. <view class="ranking-item-count">{{ item.count }}</view>
  16. </view>
  17. </view>
  18. </view>
  19. </view>
  20. </template>
  21. <script setup>
  22. const datas = [
  23. {
  24. id: 1,
  25. img: '/static/serverImg/home/ranking2.png',
  26. name: '一对一解答',
  27. tag: '孩子陪伴',
  28. text: '个性化解答,有效提升',
  29. dese: '本月已服务360',
  30. count: '4.9'
  31. },
  32. {
  33. id: 2,
  34. img: '/static/serverImg/home/ranking.png',
  35. name: '专业深度保洁',
  36. tag: '家庭保洁',
  37. text: '专业设备,深度除螨,全面消毒',
  38. dese: '本月已服务289',
  39. count: '4.8'
  40. },
  41. ]
  42. </script>
  43. <style scoped lang="scss">
  44. .ranking-title {
  45. margin-bottom: 18rpx ;
  46. }
  47. .ranking-list {
  48. .ranking-item {
  49. display: flex;
  50. align-items: flex-start;
  51. justify-content: space-between;
  52. padding: 12px ;
  53. margin-bottom: 32rpx;
  54. border-radius: 8px;
  55. background: rgba(255, 255, 255, 1);
  56. border: 1px solid rgba(243, 244, 246, 1);
  57. box-shadow: 0px 0px 0px rgba(0, 0, 0, 0), 0px 0px 0px rgba(0, 0, 0, 0), 0px 1px 2px rgba(0, 0, 0, 0.05);
  58. .ranking-item-info {
  59. flex: 1;
  60. .ranking-item-name {
  61. font-size: 32rpx;
  62. font-weight: 400;
  63. line-height: 48rpx;
  64. color: rgba(51, 51, 51, 1);
  65. margin-bottom: 16rpx;
  66. }
  67. .ranking-item-tag {
  68. width: 128.03rpx;
  69. height: 46rpx;
  70. opacity: 1;
  71. border-radius: 19998rpx;
  72. background: rgba(251, 229, 225, 1);;
  73. margin-bottom: 16rpx;
  74. font-size: 24rpx;
  75. font-weight: 400;
  76. line-height: 32rpx;
  77. color: rgba(221, 94, 69, 1);
  78. }
  79. .ranking-item-text {
  80. font-size: 28rpx;
  81. font-weight: 400;
  82. line-height: 40rpx;
  83. color: rgba(102, 102, 102, 1);
  84. margin-bottom: 16rpx;
  85. }
  86. .ranking-item-dese {
  87. font-size: 24rpx;
  88. font-weight: 400;
  89. line-height: 32rpx;
  90. color: rgba(153, 153, 153, 1);
  91. }
  92. }
  93. .ranking-item-start-box {
  94. display: flex;
  95. .ranking-item-count {
  96. font-size: 28rpx;
  97. font-weight: 400;
  98. line-height: 40rpx;
  99. color: rgba(51, 51, 51, 1);
  100. margin-left: 9rpx;
  101. }
  102. }
  103. }
  104. }
  105. </style>