index.vue 3.2 KB

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