You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

393 lines
8.4 KiB

10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
  1. <template>
  2. <view class="technician-commodity">
  3. <view v-if="technicianList.length > 0" class="collect-list">
  4. <view @click="gototechnicianDetail(item)" v-for="item in technicianList" :key="item.id" class="collect-item">
  5. <view class="collect-main">
  6. <view class="technician-head b-relative">
  7. <view class="img-box">
  8. <image :src="item.image" mode="aspectFill" class="bg"></image>
  9. <image v-if="item.icon" :src="item.icon" mode="aspectFit" class="hot"></image>
  10. <view v-if="item.bookable == 'Y'" class="available-for-service">
  11. <image src="@/static/technician/lightning-icon.png" mode="aspectFit"></image>
  12. <text class="desc">可服务</text>
  13. </view>
  14. </view>
  15. </view>
  16. <view class="detail-info">
  17. <view class="technician-base-info">
  18. <view class="name-and-level">
  19. <view class="technician-name">{{ item.title }}</view>
  20. <van-icon name="star" color="#E8615E" size="25rpx" />
  21. <text class="score">{{ item.level }}</text>
  22. </view>
  23. <view class="alert-collect">
  24. <image src="@/static/technician/address.png" mode="aspectFit"></image>
  25. <text class="alert-add-collect">
  26. {{ item.setKmOpen == 'Y' ? item.setKm : item.km || 0 }}km
  27. </text>
  28. </view>
  29. </view>
  30. <view class="appointed-time">
  31. <view class="capsule">
  32. <view class="earliest-reducible">最早可约</view>
  33. <view class="today">今天{{ item.useTime}}</view>
  34. </view>
  35. </view>
  36. <view class="technician-desc">
  37. {{ item.notes }}
  38. </view>
  39. </view>
  40. </view>
  41. <view class="public-praise">
  42. <view class="server-num">已服务{{ item.isFw }}+</view>
  43. <!-- <view class="server-num">已服务666666+</view> -->
  44. <view class="evaluate-collect-subscribe">
  45. <view class="evaluate-collect">
  46. <image src="@/static/collect/review-icon.png" mode="aspectFit"></image>
  47. <view class="evaluate-num">{{item.pinNum}}评价</view>
  48. <image src="@/static/technician/collect.png" mode="aspectFit"></image>
  49. <view class="collect-num">{{ item.collectNum }}收藏</view>
  50. </view>
  51. <view @click="gototechnicianDetail(item)" class="subscribe" :class="{ notAvailable : item.bookable != 'Y'}">{{ item.bookable == 'Y' ? '立即预约' : '不可预约' }}</view>
  52. <!-- <view @click="gototechnicianDetail(item)" class="subscribe">
  53. {{ item.bookable == 'Y' ? '立即预约' : '不可预约' }}</view> -->
  54. </view>
  55. </view>
  56. </view>
  57. </view>
  58. <van-empty v-else image="/static/empty/data.png" image-size="400rpx" description="暂无技师"/>
  59. </view>
  60. </template>
  61. <script>
  62. export default {
  63. props: ['technicianList'],
  64. data() {
  65. return {}
  66. },
  67. methods: {
  68. //跳转技师详情页面 setKmOpen 是否开启假距离 distance 距离信息
  69. gototechnicianDetail(item) {
  70. uni.navigateTo({
  71. url: `/pages/technician/technicianDetail?id=${item.id}&setKmOpen=${item.setKmOpen}&distance=${item.setKmOpen == 'Y' ? item.setKm : item.km}`
  72. })
  73. }
  74. }
  75. }
  76. </script>
  77. <style lang="scss" scoped>
  78. .technician-commodity {
  79. width: 750rpx;
  80. margin: 0 auto;
  81. background: #F5F5F5;
  82. min-height: 100vh;
  83. box-sizing: border-box;
  84. .collect-list {
  85. padding: 20rpx;
  86. .collect-item {
  87. background: white;
  88. border-radius: 20rpx;
  89. padding: 20rpx;
  90. margin-bottom: 20rpx;
  91. .collect-main {
  92. display: flex;
  93. .technician-head {
  94. width: 150rpx;
  95. height: 150rpx;
  96. border-radius: 10rpx;
  97. border: 1px solid #F6BEC3;
  98. .img-box{
  99. position: relative;
  100. .bg {
  101. width: 150rpx;
  102. height: 150rpx;
  103. border-radius: 10rpx;
  104. overflow: hidden;
  105. &::v-deep div{
  106. background-position: center top !important;
  107. background-size: 100% !important;
  108. }
  109. image {
  110. height: 100%;
  111. }
  112. }
  113. .hot {
  114. position: absolute;
  115. left: -28rpx;
  116. top: -34rpx;
  117. width: 80rpx;
  118. height: 80rpx;
  119. }
  120. .available-for-service {
  121. display: flex;
  122. justify-content: center;
  123. align-items: center;
  124. position: absolute;
  125. top: 0rpx;
  126. right: 0rpx;
  127. width: 70%;
  128. height: 40rpx;
  129. background: #F6BEC3;
  130. border-top-left-radius: 20rpx;
  131. border-bottom-left-radius: 20rpx;
  132. color: white;
  133. .desc {
  134. font-size: 18rpx;
  135. }
  136. image {
  137. width: 23rpx;
  138. height: 23rpx;
  139. vertical-align: middle;
  140. }
  141. }
  142. }
  143. }
  144. .detail-info {
  145. display: flex;
  146. flex-direction: column;
  147. justify-content: space-between;
  148. width: calc(100% - 150rpx);
  149. padding-left: 15rpx;
  150. .technician-base-info {
  151. display: flex;
  152. justify-content: space-between;
  153. height: 45rpx;
  154. .name-and-level {
  155. display: flex;
  156. align-items: center;
  157. .technician-name {
  158. color: #333;
  159. font-size: 28rpx;
  160. font-weight: 500;
  161. margin-right: 10rpx;
  162. }
  163. .score {
  164. color: #E8615E;
  165. margin-left: 5rpx;
  166. font-size: 20rpx;
  167. }
  168. }
  169. .alert-collect {
  170. display: flex;
  171. align-items: center;
  172. color: #6E6E6E;
  173. font-size: 20rpx;
  174. .alert-add-collect {
  175. margin-left: 5rpx;
  176. }
  177. }
  178. text {
  179. display: block;
  180. }
  181. }
  182. .appointed-time {
  183. width: 48%;
  184. background: #FFE3E6;
  185. height: 40rpx;
  186. border-radius: 22.5rpx;
  187. font-size: 20rpx;
  188. color: #EF8C94;
  189. .capsule {
  190. display: flex;
  191. height: 100%;
  192. align-items: center;
  193. .earliest-reducible {
  194. display: flex;
  195. align-items: center;
  196. justify-content: center;
  197. width: 50%;
  198. height: 100%;
  199. color: white;
  200. border-radius: 20rpx;
  201. background: #EF8C94;
  202. }
  203. .today {
  204. width: 50%;
  205. text-align: center;
  206. }
  207. }
  208. }
  209. .technician-desc {
  210. color: #666666;
  211. overflow: hidden;
  212. min-height: 2em;
  213. font-size: 22rpx;
  214. display: -webkit-box;
  215. -webkit-box-orient: vertical;
  216. -webkit-line-clamp: 2;
  217. text-overflow: ellipsis;
  218. }
  219. image {
  220. width: 25rpx;
  221. height: 25rpx;
  222. }
  223. }
  224. }
  225. .public-praise {
  226. display: flex;
  227. align-items: center;
  228. margin-top: 20rpx;
  229. font-size: 26rpx;
  230. .server-num {
  231. width: 170rpx;
  232. font-size: 22rpx;
  233. color: #666666;
  234. white-space: nowrap;
  235. overflow: hidden;
  236. text-overflow: ellipsis;
  237. }
  238. .evaluate-collect-subscribe {
  239. width: calc(100% - 170rpx);
  240. display: flex;
  241. justify-content: space-between;
  242. padding-left: 15rpx;
  243. .evaluate-collect {
  244. display: flex;
  245. align-items: center;
  246. .evaluate-num {
  247. color: #B6B6B6;
  248. margin-right: 20rpx;
  249. }
  250. .collect-num {
  251. color: #B6B6B6;
  252. }
  253. image {
  254. margin-right: 5rpx;
  255. }
  256. }
  257. .subscribe {
  258. display: flex;
  259. align-items: center;
  260. justify-content: center;
  261. height: 60rpx;
  262. width: 180rpx;
  263. border-radius: 40rpx;
  264. color: white;
  265. background: #EF8C94;
  266. }
  267. .notAvailable {
  268. background: #ccc;
  269. }
  270. }
  271. image {
  272. width: 25rpx;
  273. height: 25rpx;
  274. }
  275. }
  276. }
  277. }
  278. }
  279. .cell {
  280. display: flex;
  281. width: calc(100% + 16px);
  282. height: 20px;
  283. line-height: 20px;
  284. font-size: 12px;
  285. background-color: #E7FDF7;
  286. border-radius: 20px;
  287. color: #98D6C7;
  288. }
  289. .button {
  290. height: 30px;
  291. font-size: 14px;
  292. color: #fff;
  293. background-color: #55CCA7;
  294. line-height: 32px;
  295. width: 100px;
  296. text-align: center;
  297. border-radius: 20px;
  298. }
  299. .evaluate {
  300. display: flex;
  301. justify-content: space-between;
  302. width: 130px;
  303. color: #C3C3C3;
  304. }
  305. .img {
  306. position: absolute;
  307. top: -12px;
  308. left: -13px;
  309. height: 30px;
  310. width: 50px;
  311. z-index: 50;
  312. }
  313. .thumb-img {
  314. height: 83px;
  315. border-radius: 10px;
  316. border: 2px solid #00ff7f;
  317. overflow: hidden;
  318. }
  319. .thumb-text {
  320. font-size: 14px;
  321. background-color: #60C285;
  322. text-align: center;
  323. height: 22px;
  324. color: #fff;
  325. position: absolute;
  326. width: 70px;
  327. border-radius: 5px;
  328. top: 73px;
  329. left: 8px;
  330. }
  331. .thumb-text image {
  332. width: 10px;
  333. height: 12px;
  334. }
  335. </style>