listItem.vue 5.1 KB

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