service.vue 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147
  1. <script setup lang="ts">
  2. import { ref } from 'vue'
  3. import { useGlobal } from '@/composables/index'
  4. const { minioUrl } = useGlobal()
  5. </script>
  6. <template>
  7. <view class="service-container">
  8. <HyCard v-for="item in 5" :key="item" class="service-content-wrapper" marginBottom="36">
  9. <view class="service-item">
  10. <view class="item-header-wrap">
  11. <view class="header-img-box">
  12. <image src="" mode="scaleToFill" />
  13. <view class="header-status-tag open-tag">开放中</view>
  14. </view>
  15. <view class="header-right-box">
  16. <view class="u-line-1 title">黄岛服务区(沈海高速沈阳方向)</view>
  17. <view class="rate-content">
  18. <uni-rate :value="5" activeColor="#ff5702"></uni-rate>
  19. <text class="rate-text">五星级服务区</text>
  20. </view>
  21. <view class="distance">55.6KM</view>
  22. <view class="address-wrap">
  23. <view class="block">
  24. <view class="t">海口</view>
  25. <image class="icon-arrive" :src="minioUrl + '/icon_arrive.png'" mode="scaleToFill" />
  26. <view class="t">沈阳</view>
  27. </view>
  28. <view class="icon-go">
  29. <image :src="minioUrl + '/icon_blue_go.png'" mode="scaleToFill" />
  30. </view>
  31. </view>
  32. </view>
  33. </view>
  34. <view class="item-bottom-wrap">
  35. <HyTag needBorder v-for="index in 8" :key="index" />
  36. </view>
  37. </view>
  38. </HyCard>
  39. </view>
  40. </template>
  41. <style lang="scss" scoped>
  42. .service-container {
  43. width: 100%;
  44. min-height: 10dvh;
  45. padding: 24rpx 24rpx 0 24rpx;
  46. background-color: #edf1f5;
  47. .service-item {
  48. .item-header-wrap {
  49. display: flex;
  50. align-items: center;
  51. .header-img-box {
  52. width: 174rpx;
  53. height: 174rpx;
  54. position: relative;
  55. background-color: aliceblue;
  56. image {
  57. width: 174rpx;
  58. height: 174rpx;
  59. }
  60. .header-status-tag {
  61. position: absolute;
  62. top: 0;
  63. right: 0;
  64. width: 80rpx;
  65. height: 30rpx;
  66. background-color: #666666;
  67. display: flex;
  68. align-items: center;
  69. justify-content: center;
  70. border-radius: 0 14rpx 0 10rpx;
  71. font-size: 21rpx;
  72. color: #fff;
  73. &.open-tag {
  74. background-color: #ff5702;
  75. }
  76. }
  77. }
  78. .header-right-box {
  79. flex: 1;
  80. margin-left: 20rpx;
  81. .title {
  82. width: 464rpx;
  83. font-size: 31rpx;
  84. color: #333;
  85. font-weight: 600;
  86. line-height: 50rpx;
  87. }
  88. .rate-content {
  89. display: flex;
  90. align-items: center;
  91. .rate-text {
  92. font-size: 22rpx;
  93. color: #ff5702;
  94. margin-left: 14rpx;
  95. }
  96. }
  97. .distance {
  98. font-size: 22rpx;
  99. color: #999;
  100. line-height: 42rpx;
  101. }
  102. .address-wrap {
  103. display: flex;
  104. align-items: center;
  105. justify-content: space-between;
  106. .block {
  107. min-width: 174rpx;
  108. box-sizing: border-box;
  109. padding: 10rpx 24rpx;
  110. background-color: #edf1f5;
  111. border-radius: 21rpx;
  112. display: flex;
  113. align-items: center;
  114. .icon-arrive {
  115. width: 31rpx;
  116. height: 13rpx;
  117. margin: 0 8rpx;
  118. }
  119. .t {
  120. font-size: 22rpx;
  121. color: #333;
  122. }
  123. }
  124. .icon-go {
  125. width: 60rpx;
  126. height: 60rpx;
  127. image {
  128. width: 60rpx;
  129. height: 60rpx;
  130. }
  131. }
  132. }
  133. }
  134. }
  135. .item-bottom-wrap {
  136. width: 550rpx;
  137. display: flex;
  138. flex-wrap: wrap;
  139. margin-top: 40rpx;
  140. }
  141. }
  142. }
  143. </style>