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.

391 lines
8.3 KiB

8 months ago
8 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/address/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 || 0 : 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 #5EBAA2;
  98. .img-box{
  99. .bg {
  100. width: 150rpx;
  101. height: 150rpx;
  102. border-radius: 10rpx;
  103. overflow: hidden;
  104. &::v-deep div{
  105. background-position: center top !important;
  106. background-size: 100% !important;
  107. }
  108. image {
  109. height: 100%;
  110. }
  111. }
  112. .hot {
  113. position: absolute;
  114. left: -28rpx;
  115. top: -34rpx;
  116. width: 80rpx;
  117. height: 80rpx;
  118. }
  119. .available-for-service {
  120. display: flex;
  121. justify-content: center;
  122. align-items: center;
  123. position: absolute;
  124. left: 50%;
  125. bottom: -13rpx;
  126. width: 70%;
  127. height: 40rpx;
  128. background: #60C285;
  129. border-radius: 10rpx;
  130. color: white;
  131. transform: translate(-50%);
  132. .desc {
  133. font-size: 18rpx;
  134. }
  135. image {
  136. width: 23rpx;
  137. height: 23rpx;
  138. vertical-align: middle;
  139. }
  140. }
  141. }
  142. }
  143. .detail-info {
  144. display: flex;
  145. flex-direction: column;
  146. justify-content: space-between;
  147. width: calc(100% - 150rpx);
  148. padding-left: 15rpx;
  149. .technician-base-info {
  150. display: flex;
  151. justify-content: space-between;
  152. height: 45rpx;
  153. .name-and-level {
  154. display: flex;
  155. align-items: center;
  156. .technician-name {
  157. color: #333;
  158. font-size: 28rpx;
  159. font-weight: 500;
  160. margin-right: 10rpx;
  161. }
  162. .score {
  163. color: #E8615E;
  164. margin-left: 5rpx;
  165. font-size: 20rpx;
  166. }
  167. }
  168. .alert-collect {
  169. display: flex;
  170. align-items: center;
  171. color: #6E6E6E;
  172. font-size: 20rpx;
  173. .alert-add-collect {
  174. margin-left: 5rpx;
  175. }
  176. }
  177. text {
  178. display: block;
  179. }
  180. }
  181. .appointed-time {
  182. width: 48%;
  183. background: #E7FDF7;
  184. height: 40rpx;
  185. border-radius: 22.5rpx;
  186. font-size: 20rpx;
  187. color: #5DB9A3;
  188. .capsule {
  189. display: flex;
  190. height: 100%;
  191. align-items: center;
  192. .earliest-reducible {
  193. display: flex;
  194. align-items: center;
  195. justify-content: center;
  196. width: 50%;
  197. height: 100%;
  198. color: white;
  199. border-radius: 20rpx;
  200. background: #52CFB0;
  201. }
  202. .today {
  203. width: 50%;
  204. text-align: center;
  205. }
  206. }
  207. }
  208. .technician-desc {
  209. color: #666666;
  210. overflow: hidden;
  211. min-height: 2em;
  212. font-size: 22rpx;
  213. display: -webkit-box;
  214. -webkit-box-orient: vertical;
  215. -webkit-line-clamp: 2;
  216. text-overflow: ellipsis;
  217. }
  218. image {
  219. width: 25rpx;
  220. height: 25rpx;
  221. }
  222. }
  223. }
  224. .public-praise {
  225. display: flex;
  226. align-items: center;
  227. margin-top: 20rpx;
  228. font-size: 26rpx;
  229. .server-num {
  230. width: 170rpx;
  231. font-size: 22rpx;
  232. color: #666666;
  233. white-space: nowrap;
  234. overflow: hidden;
  235. text-overflow: ellipsis;
  236. }
  237. .evaluate-collect-subscribe {
  238. width: calc(100% - 170rpx);
  239. display: flex;
  240. justify-content: space-between;
  241. padding-left: 15rpx;
  242. .evaluate-collect {
  243. display: flex;
  244. align-items: center;
  245. .evaluate-num {
  246. color: #B6B6B6;
  247. margin-right: 20rpx;
  248. }
  249. .collect-num {
  250. color: #B6B6B6;
  251. }
  252. image {
  253. margin-right: 5rpx;
  254. }
  255. }
  256. .subscribe {
  257. display: flex;
  258. align-items: center;
  259. justify-content: center;
  260. height: 60rpx;
  261. width: 180rpx;
  262. border-radius: 40rpx;
  263. color: white;
  264. background: linear-gradient(170deg, #53CEAC, #5AC796);
  265. }
  266. .notAvailable {
  267. background: #ccc;
  268. }
  269. }
  270. image {
  271. width: 25rpx;
  272. height: 25rpx;
  273. }
  274. }
  275. }
  276. }
  277. }
  278. .cell {
  279. display: flex;
  280. width: calc(100% + 16px);
  281. height: 20px;
  282. line-height: 20px;
  283. font-size: 12px;
  284. background-color: #E7FDF7;
  285. border-radius: 20px;
  286. color: #98D6C7;
  287. }
  288. .button {
  289. height: 30px;
  290. font-size: 14px;
  291. color: #fff;
  292. background-color: #55CCA7;
  293. line-height: 32px;
  294. width: 100px;
  295. text-align: center;
  296. border-radius: 20px;
  297. }
  298. .evaluate {
  299. display: flex;
  300. justify-content: space-between;
  301. width: 130px;
  302. color: #C3C3C3;
  303. }
  304. .img {
  305. position: absolute;
  306. top: -12px;
  307. left: -13px;
  308. height: 30px;
  309. width: 50px;
  310. z-index: 50;
  311. }
  312. .thumb-img {
  313. height: 83px;
  314. border-radius: 10px;
  315. border: 2px solid #00ff7f;
  316. overflow: hidden;
  317. }
  318. .thumb-text {
  319. font-size: 14px;
  320. background-color: #60C285;
  321. text-align: center;
  322. height: 22px;
  323. color: #fff;
  324. position: absolute;
  325. width: 70px;
  326. border-radius: 5px;
  327. top: 73px;
  328. left: 8px;
  329. }
  330. .thumb-text image {
  331. width: 10px;
  332. height: 12px;
  333. }
  334. </style>