listItem.vue 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177
  1. <template>
  2. <view class="item">
  3. <view class="item-img">
  4. <img :src="baseUrl + data.avatar" alt="" style="width: 112rpx; height: 112rpx;">
  5. </view>
  6. <view class="item-info">
  7. <view class="item-title-box">
  8. <view class="item-title">
  9. <view class="item-name">
  10. {{ data.name }}
  11. </view>
  12. <dict-tag :options="lrr_service_status" :value="data.orderStatus" v-if="data.score" />
  13. <text v-else>
  14. 待评价
  15. </text>
  16. </view>
  17. <view class="item-de">
  18. <img src="/static/serverImg/list/ad2.png" alt="" style="width: 28rpx;height: 28rpx;">
  19. {{ data.address }}
  20. </view>
  21. <view class="item-time">
  22. {{ data.createTime }}
  23. </view>
  24. </view>
  25. <view class="item-box">
  26. <view class="item-price"><span class="item-price-yuan">¥</span> {{ data.serviceOnePrice || 0 }}</view>
  27. <view class="item-btns">
  28. <view class="btn-s" @click="onClick(1)">查看</view>
  29. <view class="btn-m" @click="onClick(2)"><img src="/static/serverImg/list/mess.png" alt=""
  30. style="width: 23rpx;height: 23rpx;margin-right: 8rpx;">沟通</view>
  31. </view>
  32. </view>
  33. </view>
  34. </view>
  35. </template>
  36. <script setup>
  37. import { inject } from 'vue';
  38. import DictTag from '@/components/DictTag/index.vue'
  39. import config from '@/config'
  40. const baseUrl = config.baseUrl
  41. const props = defineProps({
  42. data: {
  43. type: Object,
  44. default: () => {
  45. return {}
  46. }
  47. },
  48. });
  49. const inject_click = inject('onClick');
  50. const lrr_service_status = inject('lrr_service_status');
  51. const btn_style = ` width: 120rpx; height: 50rpx; font-size: 24rpx;border-radius: 25rpx;margin-left: 12rpx;`;
  52. /**
  53. * 1: 查看
  54. * 2:沟通
  55. */
  56. function onClick(type) {
  57. inject_click(props.data, type);
  58. }
  59. </script>
  60. <style lang="scss" scoped>
  61. .item {
  62. height: 294rpx;
  63. opacity: 1;
  64. border-radius: 24rpx;
  65. background: rgba(255, 255, 255, 1);
  66. margin-bottom: 24rpx;
  67. padding: 32rpx;
  68. display: flex;
  69. align-items: flex-start;
  70. .item-img {
  71. margin-right: 32rpx;
  72. }
  73. .item-info {
  74. display: flex;
  75. flex-direction: column;
  76. flex: 1;
  77. justify-content: space-between;
  78. height: 100%;
  79. .item-title-box {
  80. .item-title {
  81. font-size: 30rpx;
  82. font-weight: 400;
  83. line-height: 45rpx;
  84. color: rgba(26, 26, 26, 1);
  85. display: flex;
  86. align-items: center;
  87. justify-content: space-between;
  88. margin-bottom: 15rpx;
  89. }
  90. }
  91. .item-de {
  92. display: flex;
  93. font-size: 26rpx;
  94. font-weight: 400;
  95. line-height: 39rpx;
  96. color: rgba(153, 153, 153, 1);
  97. display: flex;
  98. align-items: center;
  99. justify-content: flex-start;
  100. }
  101. .item-time {
  102. font-size: 26rpx;
  103. font-weight: 400;
  104. letter-spacing: 0rpx;
  105. line-height: 39rpx;
  106. color: rgba(153, 153, 153, 1);
  107. margin-bottom: 40rpx;
  108. }
  109. .item-box {
  110. display: flex;
  111. align-items: center;
  112. justify-content: space-between;
  113. .item-price {
  114. font-size: 30rpx;
  115. font-weight: 400;
  116. letter-spacing: 0rpx;
  117. line-height: 45rpx;
  118. color: rgba(255, 59, 48, 1);
  119. }
  120. .item-btns {
  121. display: flex;
  122. align-items: center;
  123. justify-content: center;
  124. .btn-s {
  125. font-size: 26rpx;
  126. font-weight: 400;
  127. letter-spacing: 0rpx;
  128. line-height: 39rpx;
  129. color: rgba(51, 102, 255, 1);
  130. text-align: center;
  131. width: 156.03rpx;
  132. height: 67rpx;
  133. border-radius: 8rpx;
  134. background: rgba(0, 0, 0, 0);
  135. display: flex;
  136. align-items: center;
  137. justify-content: center;
  138. border: 0rpx solid rgba(51, 102, 255, 1);
  139. }
  140. .btn-m {
  141. width: 188.03rpx;
  142. height: 67rpx;
  143. opacity: 1;
  144. border-radius: 8rpx;
  145. background: rgba(51, 102, 255, 1);
  146. text-align: left;
  147. margin-left: 24rpx;
  148. display: flex;
  149. align-items: center;
  150. justify-content: center;
  151. color: rgba(255, 255, 255, 1);
  152. }
  153. }
  154. }
  155. }
  156. }
  157. </style>