index.vue 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135
  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. import { ref, reactive, onMounted } from 'vue';
  23. const datas = [
  24. {
  25. id: 1,
  26. img: '/static/serverImg/home/ranking.png',
  27. name: '专业深度保洁',
  28. tag: '家庭清洁',
  29. text: '专业设备,深度除螨,全面消毒',
  30. dese: '本月已服务2890',
  31. count: '4.9'
  32. },
  33. {
  34. id: 2,
  35. img: '/static/serverImg/home/ranking.png',
  36. name: '专业深度保洁',
  37. tag: '家庭清洁',
  38. text: '专业设备,深度除螨,全面消毒',
  39. dese: '本月已服务2890',
  40. count: '4.9'
  41. },
  42. {
  43. id: 3,
  44. img: '/static/serverImg/home/ranking.png',
  45. name: '专业深度保洁',
  46. tag: '家庭清洁',
  47. text: '专业设备,深度除螨,全面消毒',
  48. dese: '本月已服务2890',
  49. count: '4.9'
  50. }
  51. ]
  52. </script>
  53. <style scoped lang="scss">
  54. .ranking-title {
  55. margin-bottom: 16px;
  56. }
  57. .ranking-list {
  58. .ranking-item {
  59. display: flex;
  60. align-items: flex-start;
  61. justify-content: space-between;
  62. padding: 12px;
  63. border-radius: 8px;
  64. background: rgba(255, 255, 255, 1);
  65. border: 0px solid rgba(243, 244, 246, 1);
  66. 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);
  67. .ranking-item-info {
  68. flex: 1;
  69. .ranking-item-name {
  70. font-size: 32rpx;
  71. font-weight: 400;
  72. line-height: 48rpx;
  73. color: rgba(51, 51, 51, 1);
  74. margin-bottom: 16rpx;
  75. }
  76. .ranking-item-tag {
  77. width: 128.03rpx;
  78. height: 46rpx;
  79. opacity: 1;
  80. border-radius: 19998rpx;
  81. background: rgba(0, 122, 255, 0.1);
  82. margin-bottom: 16rpx;
  83. font-size: 24rpx;
  84. font-weight: 400;
  85. line-height: 32rpx;
  86. color: rgba(0, 122, 255, 1);
  87. }
  88. .ranking-item-text {
  89. font-size: 28rpx;
  90. font-weight: 400;
  91. line-height: 40rpx;
  92. color: rgba(102, 102, 102, 1);
  93. margin-bottom: 16rpx;
  94. }
  95. .ranking-item-dese {
  96. font-size: 24rpx;
  97. font-weight: 400;
  98. line-height: 32rpx;
  99. color: rgba(153, 153, 153, 1);
  100. }
  101. }
  102. .ranking-item-start-box {
  103. display: flex;
  104. .ranking-item-count {
  105. font-size: 28rpx;
  106. font-weight: 400;
  107. line-height: 40rpx;
  108. color: rgba(51, 51, 51, 1);
  109. margin-left: 9rpx;
  110. }
  111. }
  112. }
  113. }
  114. </style>