expertServices.vue 4.5 KB

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