index.vue 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162
  1. <template>
  2. <view class="">
  3. <view v-for="(item,index) in workPersonList" @click="chooseServiceTeacher(item)" class="h-item-row">
  4. <view class="h-img">
  5. <image src="../../static/logo.png" mode=""></image>
  6. </view>
  7. <view class="h-item-content">
  8. <view class="h-title">
  9. <view class="name">
  10. <text>{{item.personName}}</text>
  11. </view>
  12. <!-- <view class="btn">
  13. <text>包房</text>
  14. </view> -->
  15. </view>
  16. <view class="h-desc">
  17. <text>优质服务,从我做起</text>
  18. </view>
  19. <view class="h-content">
  20. <u-icon name="thumb-up" color="#333" size="16"></u-icon>
  21. <view class="h-text">
  22. <text>好评率:</text>
  23. </view>
  24. <view class="h-text1">
  25. <text>{{item.goodRate}}%</text>
  26. </view>
  27. </view>
  28. </view>
  29. </view>
  30. </view>
  31. </template>
  32. <script>
  33. export default {
  34. data() {
  35. return {
  36. reqParm: {
  37. date: '',
  38. time: '',
  39. storeId: '',
  40. serviceTypeId:''
  41. },
  42. workPersonList: []
  43. }
  44. },
  45. onLoad(option) {
  46. this.reqParm.date = option.schedulingDate;
  47. this.reqParm.time = option.time;
  48. this.reqParm.storeId = option.organization;
  49. this.reqParm.serviceTypeId = option.serviceTypeId;
  50. // 查询服务工作人员列表
  51. // this.serviceWorkPersonList();
  52. this.getServicePerson();
  53. },
  54. methods: {
  55. // 查询服务工作人员列表
  56. serviceWorkPersonList() {
  57. this.$api.serviceWorkPersonList(this.reqParm).then((res) => {
  58. console.log(res)
  59. this.workPersonList = res.data.rows;
  60. this.getImgUrlByOssId(res.data.rows)
  61. })
  62. },
  63. // 查询服务工作人员列表
  64. getServicePerson() {
  65. this.$api.getServicePerson(this.reqParm).then((res) => {
  66. console.log(res)
  67. this.workPersonList = res.data.data;
  68. this.getImgUrlByOssId(res.data.data)
  69. })
  70. },
  71. // 获取图片
  72. getImgUrlByOssId(data){
  73. for (let i = 0; i < data.length; i++) {
  74. if (data[i].facePhoto){
  75. this.$api.getImage(data[i].facePhoto).then(res=>{
  76. data[i].imgUrl = res.data.data[0].url.replace(/^http:/, "https:")
  77. });
  78. }
  79. }
  80. },
  81. // 选择服务老师
  82. chooseServiceTeacher(item) {
  83. console.log('+++++++++++++chooseServiceTeacher++++++++++++++',item)
  84. // 选择完成后返回上一页
  85. uni.navigateBack({
  86. delta: 1,
  87. });
  88. uni.$emit('selectedServiceTeacher', item);
  89. }
  90. },
  91. };
  92. </script>
  93. <style scoped lang="scss">
  94. .h-item-row {
  95. display: flex;
  96. font-family: PingFangSC-Medium, PingFang SC;
  97. margin: 12px;
  98. background: #fff;
  99. padding: 12px;
  100. .h-img {
  101. margin-right: 8px;
  102. image {
  103. height: 80px;
  104. width: 80px;
  105. }
  106. }
  107. .h-item-content {
  108. .h-title {
  109. font-size: 16px;
  110. font-weight: 500;
  111. line-height: 30px;
  112. display: flex;
  113. .name {
  114. padding-right: 6px;
  115. color: #111111;
  116. }
  117. .btn text {
  118. background: #fff5d0;
  119. color: #333333;
  120. font-size: 12px;
  121. border: 1px solid #FFE05C;
  122. padding-left: 10px;
  123. padding-right: 10px;
  124. }
  125. }
  126. .h-desc {
  127. font-size: 12px;
  128. font-weight: 400;
  129. color: #999999;
  130. line-height: 25px;
  131. }
  132. .h-content {
  133. display: flex;
  134. align-items: center;
  135. font-size: 12px;
  136. font-weight: 400;
  137. line-height: 25px;
  138. .h-text {
  139. color: #999999;
  140. }
  141. .h-text1 {
  142. color: #ED569F;
  143. }
  144. }
  145. }
  146. }
  147. </style>