index.vue 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134
  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/ranking.png',
  26. name: '专业深度保洁',
  27. tag: '家庭清洁',
  28. text: '专业设备,深度除螨,全面消毒',
  29. dese: '本月已服务2890',
  30. count: '4.9'
  31. },
  32. {
  33. id: 2,
  34. img: '/static/serverImg/home/ranking.png',
  35. name: '高级月嫂服务',
  36. tag: '家务帮手',
  37. text: '专业母婴护理、科学坐月子',
  38. dese: '本月已服务2456',
  39. count: '4.8'
  40. },
  41. {
  42. id: 3,
  43. img: '/static/serverImg/home/ranking.png',
  44. name: '一对一解答',
  45. tag: '陪伴陪聊',
  46. text: '个性化解答,有效提升',
  47. dese: '本月已服务2100',
  48. count: '4.7'
  49. }
  50. ]
  51. </script>
  52. <style scoped lang="scss">
  53. .ranking-title {
  54. margin-bottom: 16px;
  55. }
  56. .ranking-list {
  57. .ranking-item {
  58. display: flex;
  59. align-items: flex-start;
  60. justify-content: space-between;
  61. padding: 12px;
  62. border-radius: 8px;
  63. background: rgba(255, 255, 255, 1);
  64. border: 0px solid rgba(243, 244, 246, 1);
  65. 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);
  66. .ranking-item-info {
  67. flex: 1;
  68. .ranking-item-name {
  69. font-size: 32rpx;
  70. font-weight: 400;
  71. line-height: 48rpx;
  72. color: rgba(51, 51, 51, 1);
  73. margin-bottom: 16rpx;
  74. }
  75. .ranking-item-tag {
  76. width: 128.03rpx;
  77. height: 46rpx;
  78. opacity: 1;
  79. border-radius: 19998rpx;
  80. background: rgba(251, 229, 225, 1);;
  81. margin-bottom: 16rpx;
  82. font-size: 24rpx;
  83. font-weight: 400;
  84. line-height: 32rpx;
  85. color: rgba(221, 94, 69, 1);
  86. }
  87. .ranking-item-text {
  88. font-size: 28rpx;
  89. font-weight: 400;
  90. line-height: 40rpx;
  91. color: rgba(102, 102, 102, 1);
  92. margin-bottom: 16rpx;
  93. }
  94. .ranking-item-dese {
  95. font-size: 24rpx;
  96. font-weight: 400;
  97. line-height: 32rpx;
  98. color: rgba(153, 153, 153, 1);
  99. }
  100. }
  101. .ranking-item-start-box {
  102. display: flex;
  103. .ranking-item-count {
  104. font-size: 28rpx;
  105. font-weight: 400;
  106. line-height: 40rpx;
  107. color: rgba(51, 51, 51, 1);
  108. margin-left: 9rpx;
  109. }
  110. }
  111. }
  112. }
  113. </style>