index.vue 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160
  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: null,
  38. time: null,
  39. storeId: null, // 所属门店
  40. },
  41. workPersonList: []
  42. }
  43. },
  44. onLoad(option) {
  45. this.reqParm.date = option.schedulingDate;
  46. this.reqParm.time = option.time;
  47. this.reqParm.storeId = option.organization;
  48. // 查询服务工作人员列表
  49. // this.serviceWorkPersonList();
  50. this.getServicePerson();
  51. },
  52. methods: {
  53. // 查询服务工作人员列表
  54. serviceWorkPersonList() {
  55. this.$api.serviceWorkPersonList(this.reqParm).then((res) => {
  56. console.log(res)
  57. this.workPersonList = res.data.rows;
  58. this.getImgUrlByOssId(res.data.rows)
  59. })
  60. },
  61. // 查询服务工作人员列表
  62. getServicePerson() {
  63. this.$api.getServicePerson(this.reqParm).then((res) => {
  64. console.log(res)
  65. this.workPersonList = res.data.data;
  66. this.getImgUrlByOssId(res.data.data)
  67. })
  68. },
  69. // 获取图片
  70. getImgUrlByOssId(data){
  71. for (let i = 0; i < data.length; i++) {
  72. if (data[i].facePhoto){
  73. this.$api.getImage(data[i].facePhoto).then(res=>{
  74. data[i].imgUrl = res.data.data[0].url.replace(/^http:/, "https:")
  75. });
  76. }
  77. }
  78. },
  79. // 选择服务老师
  80. chooseServiceTeacher(item) {
  81. console.log('+++++++++++++chooseServiceTeacher++++++++++++++',item)
  82. // 选择完成后返回上一页
  83. uni.navigateBack({
  84. delta: 1,
  85. });
  86. uni.$emit('selectedServiceTeacher', item);
  87. }
  88. },
  89. };
  90. </script>
  91. <style scoped lang="scss">
  92. .h-item-row {
  93. display: flex;
  94. font-family: PingFangSC-Medium, PingFang SC;
  95. margin: 12px;
  96. background: #fff;
  97. padding: 12px;
  98. .h-img {
  99. margin-right: 8px;
  100. image {
  101. height: 80px;
  102. width: 80px;
  103. }
  104. }
  105. .h-item-content {
  106. .h-title {
  107. font-size: 16px;
  108. font-weight: 500;
  109. line-height: 30px;
  110. display: flex;
  111. .name {
  112. padding-right: 6px;
  113. color: #111111;
  114. }
  115. .btn text {
  116. background: #fff5d0;
  117. color: #333333;
  118. font-size: 12px;
  119. border: 1px solid #FFE05C;
  120. padding-left: 10px;
  121. padding-right: 10px;
  122. }
  123. }
  124. .h-desc {
  125. font-size: 12px;
  126. font-weight: 400;
  127. color: #999999;
  128. line-height: 25px;
  129. }
  130. .h-content {
  131. display: flex;
  132. align-items: center;
  133. font-size: 12px;
  134. font-weight: 400;
  135. line-height: 25px;
  136. .h-text {
  137. color: #999999;
  138. }
  139. .h-text1 {
  140. color: #ED569F;
  141. }
  142. }
  143. }
  144. }
  145. </style>