index.vue 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164
  1. <template>
  2. <view class="" >
  3. <view v-for="(item,index) in serviceObjectList" @click="chooseServiceObject(item)" class="h-item-row">
  4. <view class="h-img">
  5. <image :src="item.imgUrl || '/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.nickName || '未填写'}}</text>
  11. </view>
  12. </view>
  13. <view class="h-desc">
  14. <text>关系:{{item.blood}}</text>
  15. </view>
  16. <view class="h-content">
  17. <view class="h-text">
  18. 备注:<text v-if="item.remark">{{item.remark}}</text>
  19. <text v-else>无</text>
  20. </view>
  21. </view>
  22. </view>
  23. <view v-if="item.haveEquityCard" class="flex-col justify-center">
  24. <text class="b">权益券</text>
  25. </view>
  26. </view>
  27. </view>
  28. </template>
  29. <script>
  30. export default {
  31. data() {
  32. return {
  33. serviceObjectList: [],
  34. reqParm: {
  35. auth: true
  36. },
  37. }
  38. },
  39. onLoad(query){
  40. // 查询服务对象列表
  41. this.listServiceObject();
  42. },
  43. methods: {
  44. // 查询服务对接信息列表
  45. listServiceObject(){
  46. this.$api.listServiceObject(this.reqParm).then((res)=>{
  47. console.log('++++++++++listServiceObject+++++++++++',res)
  48. this.getImgUrlByOssId(res.data.data);
  49. }).catch(() =>{
  50. uni.showToast({
  51. title: "操作失败"
  52. })
  53. });
  54. },
  55. // 获取图片
  56. getImgUrlByOssId(data){
  57. for (let i = 0; i < data.length; i++) {
  58. const item = data[i];
  59. if (item.facePhoto){
  60. this.$api.getImgUrlByOssId({ossId:item.facePhoto}).then(res=>{
  61. console.log('+++++++++++++getImgUrlByOssId+++++++++++++++',res)
  62. })
  63. }
  64. }
  65. this.serviceObjectList = data
  66. },
  67. // 选择服务老师
  68. chooseServiceObject(item){
  69. uni.navigateBack({
  70. delta: 1,
  71. success: function(res) {
  72. uni.$emit('selectedServiceObject', item);
  73. }
  74. });
  75. }
  76. },
  77. };
  78. </script>
  79. <style scoped lang="scss">
  80. @import '/common/css/common.css';
  81. .h-item-row{
  82. display: flex;
  83. font-family: PingFangSC-Medium, PingFang SC;
  84. margin: 12px;
  85. background: #fff;
  86. padding: 12px;
  87. .h-img{
  88. margin-right: 8px;
  89. display: flex;
  90. align-items: center;
  91. image{
  92. height: 80px;
  93. width: 80px;
  94. }
  95. }
  96. .h-item-content{
  97. width: 350rpx;
  98. .h-title{
  99. font-size: 16px;
  100. font-weight: 500;
  101. line-height: 30px;
  102. display: flex;
  103. .name{
  104. padding-right: 6px;
  105. color: #111111;
  106. }
  107. .btn text{
  108. background: #fff5d0;
  109. color: #333333;
  110. font-size: 12px;
  111. border: 1px solid #FFE05C;
  112. padding-left: 10px;
  113. padding-right: 10px;
  114. }
  115. }
  116. .h-desc{
  117. font-size: 12px;
  118. font-weight: 400;
  119. color: #999999;
  120. line-height: 25px;
  121. }
  122. .h-content{
  123. display: flex;
  124. align-items: center;
  125. font-size: 12px;
  126. font-weight: 400;
  127. line-height: 25px;
  128. .h-text{
  129. width: 350rpx;
  130. color: #999999;
  131. white-space: nowrap;
  132. overflow: hidden;
  133. text-overflow: ellipsis;
  134. }
  135. .h-text1{
  136. color: #ED569F;
  137. }
  138. }
  139. }
  140. }
  141. .a{
  142. font-size: 28rpx;
  143. line-height: 60rpx;
  144. padding: 0 20rpx;
  145. background: green;
  146. }
  147. .b{
  148. font-size: 24rpx;
  149. font-family: PingFangSC-Regular, PingFang SC;
  150. color: #9ed733;
  151. background: #e9f6d1;
  152. padding: 6rpx 16rpx;
  153. margin-left: 16rpx;
  154. border-radius: 12rpx;
  155. }
  156. .bord{
  157. border: 1px solid red;
  158. }
  159. </style>