expertServices.vue 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232
  1. <template>
  2. <view class="content">
  3. <!-- 我的服务顾问 -->
  4. <view class="ad-bg-box" v-if="users">
  5. <view class="ad-box">
  6. <view class="ad-sec-tit">
  7. 我的服务顾问
  8. </view>
  9. <view class="ad-con-box">
  10. <image :src="usersAvatarStr" mode="aspectFit" class="ad-icon-mine"></image>
  11. <view class="ad-con-box-r">
  12. <view class="ad-name">{{users.name}}</view>
  13. <view class="ad-years">{{userYears}}</view>
  14. </view>
  15. </view>
  16. </view>
  17. </view>
  18. <!-- 全部服务顾问横栏 -->
  19. <view class="mid-box">
  20. <view class="mid-v-line"></view>
  21. <view class="mid-sec-tit">全部服务顾问</view>
  22. </view>
  23. <!-- 服务顾问list -->
  24. <view class="ad-list" v-for="(item,index) in queryManagerList" :key="item.id" @click="goDetail(item)">
  25. <image :src="item.avatar ? item.avatar : '../../static/timg/pic_def_ava@2x.png'" class="ad-list-img"></image>
  26. <view class="ad-name ad-list-r">
  27. <text>{{item.name}}</text>
  28. </view>
  29. <view class="address-arrow">
  30. <image src="../../static/img/little_rightArrow.png" mode="aspectFit"></image>
  31. </view>
  32. </view>
  33. <!-- 上拉 加载更多 -->
  34. <view class="noMore" v-if="noMoreShow && (queryManagerList.length!=0)">没有更多数据</view>
  35. <!-- 无数据空白页 -->
  36. <nodata v-if="queryManagerList.length==0"></nodata>
  37. </view>
  38. </template>
  39. <script>
  40. export default {
  41. data() {
  42. return {
  43. queryManagerList: '',
  44. noMoreShow: false,
  45. users: ''
  46. }
  47. },
  48. onLoad() {
  49. this.getQueryManagerList()
  50. },
  51. computed: {
  52. usersAvatarStr() {
  53. return this.users.avatar ? this.users.avatar : '../../static/timg/pic_def_ava@2x.png'
  54. },
  55. userYears(){
  56. if (this.users.years) {
  57. return '从业年限:' + this.users.years + '年'
  58. }
  59. return '从业年限:未知'
  60. }
  61. },
  62. methods: {
  63. getQueryManagerList() {
  64. uni.showLoading({
  65. title: '加载中'
  66. })
  67. this.$http('openmy/queryManager', {}, 'GET').then(res => {
  68. uni.hideLoading();
  69. this.queryManagerList = res.data.userlist
  70. this.users = res.data.users
  71. console.log('服务顾问列表===', res);
  72. })
  73. },
  74. goDetail(item) {
  75. uni.navigateTo({
  76. url: '../index/personalCard?adInfo=' + JSON.stringify(item)
  77. })
  78. }
  79. },
  80. // 下拉刷新
  81. onPullDownRefresh() {
  82. this.getQueryManagerList()
  83. setTimeout(function() {
  84. uni.stopPullDownRefresh();
  85. }, 1000);
  86. }
  87. }
  88. </script>
  89. <style scoped>
  90. .content {
  91. min-height: 100vh;
  92. background-color: #F4F5F7;
  93. padding-bottom: 60rpx;
  94. }
  95. .ad-bg-box {
  96. background-color: #FF0000;
  97. padding: 20rpx 24rpx;
  98. }
  99. .ad-box {
  100. background-color: #FFFFFF;
  101. border-radius: 10rpx;
  102. }
  103. .ad-con-box {
  104. display: flex;
  105. padding-bottom: 20rpx;
  106. margin-top: 30rpx;
  107. margin-left: 30rpx;
  108. }
  109. .ad-sec-tit {
  110. font-size: 24rpx;
  111. color: #666;
  112. padding-top: 30rpx;
  113. margin-left: 30rpx;
  114. }
  115. .ad-icon-mine {
  116. width: 100rpx;
  117. height: 100rpx;
  118. border-radius: 50rpx;
  119. }
  120. .ad-con-box-r {
  121. display: flex;
  122. flex-direction: column;
  123. justify-content: center;
  124. margin-left: 30rpx;
  125. }
  126. .ad-name {
  127. font-size: 30rpx;
  128. font-weight: bold;
  129. color: #333333;
  130. }
  131. .ad-years {
  132. font-size: 24rpx;
  133. color: #666;
  134. margin-top: 10rpx;
  135. }
  136. /* 全部服务顾问横栏 */
  137. .mid-v-line {
  138. background-color: #FF0000;
  139. width: 8rpx;
  140. height: 30rpx;
  141. border-radius: 4rpx;
  142. margin-left: 30rpx;
  143. }
  144. .mid-box {
  145. display: flex;
  146. height: 94rpx;
  147. align-items: center;
  148. background-color: #FFFFFF;
  149. margin-bottom: 20rpx;
  150. }
  151. .mid-sec-tit {
  152. margin-left: 16rpx;
  153. font-size: 30rpx;
  154. font-weight: 500;
  155. color: #333333;
  156. }
  157. /* 顾问list */
  158. .ad-list {
  159. margin: 0rpx 24rpx 20rpx;
  160. padding: 20rpx;
  161. background-color: #FFFFFF;
  162. border-radius: 10rpx;
  163. display: flex;
  164. }
  165. .ad-list-img {
  166. width: 84rpx;
  167. height: 84rpx;
  168. border-radius: 42rpx;
  169. }
  170. .address-arrow {
  171. width: 30rpx;
  172. }
  173. .address-arrow image {
  174. width: 30rpx;
  175. height: 100%;
  176. }
  177. .ad-list-r {
  178. display: flex;
  179. flex: 1;
  180. }
  181. .ad-list-r text{
  182. margin: auto 20rpx;
  183. /* background-color: green; */
  184. }
  185. .noMore {
  186. text-align: center;
  187. line-height: 50rpx;
  188. color: #999999;
  189. font-size: 28rpx;
  190. }
  191. /* .nodataImg {
  192. width: 400rpx;
  193. padding-top: 100rpx;
  194. }
  195. .noTxt {
  196. font-size: 36rpx;
  197. color: #999999;
  198. padding-top: 50rpx;
  199. }
  200. .nodataBox {
  201. text-align: center;
  202. } */
  203. </style>