myConnections.vue 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183
  1. <template>
  2. <view class="box">
  3. <view class="tabBob">
  4. <view class="tabline" @click="tabcl(1)">
  5. <view class="tabTxt" :class="{tabActive:tabindex==1}">一级人脉</view> <view class="tabkk" v-if="tabindex==1"></view>
  6. </view>
  7. <view class="tabline" @click="tabcl(2)">
  8. <view class="tabTxt" :class="{tabActive:tabindex==2}">二级人脉</view> <view class="tabkk" v-if="tabindex==2"></view>
  9. </view>
  10. <view class="tabline" @click="tabcl(3)">
  11. <view class="tabTxt" :class="{tabActive:tabindex==3}">三级人脉</view> <view class="tabkk" v-if="tabindex==3"></view>
  12. </view>
  13. </view>
  14. <view style="height: 100rpx;"></view>
  15. <view class="line" v-for="(item,index) in list">
  16. <view class="linetop">
  17. <view class="name">{{item.wxNickName?item.wxNickName:''}}</view>
  18. <view class="nickNameBox">
  19. <view class="nickName" v-if="tabindex==1">一级人脉</view>
  20. <view class="nickName" v-if="tabindex==2">二级人脉</view>
  21. <view class="nickName" v-if="tabindex==3">三级人脉</view>
  22. </view>
  23. </view>
  24. <view class="lineCOnt">
  25. <view class="lineline">
  26. <view class="lineContLeft">
  27. <image src="../../static/timg/icon_dianhua.png" mode="" class="lineContLeftImg"></image>
  28. <view class="lineContLeftMs">{{item.mobilePhone}}</view>
  29. </view>
  30. <view class="lineTIme">{{item.createTime}}</view>
  31. </view>
  32. </view>
  33. </view>
  34. <nodata v-if="list.length==0"></nodata>
  35. </view>
  36. </template>
  37. <script>
  38. import nodata from '../../components/nodata/nodata.vue'
  39. export default {
  40. components: {
  41. nodata
  42. },
  43. data() {
  44. return {
  45. tabindex:1,
  46. themeColor:'',
  47. userInfo:'',
  48. list:'',
  49. }
  50. },
  51. onLoad(opt) {
  52. this.themeColor = uni.getStorageSync("themeColor");
  53. this.userInfo = uni.getStorageSync("userInfo");
  54. this.getList()
  55. },
  56. onShow() {
  57. },
  58. methods: {
  59. tabcl(num){
  60. this.tabindex=num;
  61. this.getList()
  62. },
  63. getList(){
  64. uni.showLoading({
  65. title: '加载中'
  66. })
  67. this.$http('openMCustomer/getContactsList', {
  68. type:this.tabindex
  69. }, 'GET').then(res => {
  70. uni.hideLoading();
  71. this.list = res.data;
  72. //var data=res.data.Items;
  73. //this.list=this.list.concat(data);
  74. //console.log('list+=', this.queryShopList);
  75. })
  76. }
  77. },
  78. onPullDownRefresh(){
  79. this.getList();
  80. setTimeout(() => {
  81. uni.stopPullDownRefresh(); // 关闭下拉刷新
  82. }, 2000);
  83. }
  84. }
  85. </script>
  86. <style scoped lang="less">
  87. .box {
  88. width: 100vw;
  89. min-height: 100vh;
  90. background: #F4F5F7;
  91. }
  92. .tabBob{
  93. display: flex;
  94. justify-content: space-around;
  95. background: #FFFFFF;
  96. padding-bottom: 10rpx;
  97. width: 100%;
  98. position: fixed;
  99. left: 0;
  100. top: 0;
  101. }
  102. .nickNameBox{
  103. display: flex;
  104. font-size: 30rpx;
  105. font-family: PingFangSC-Medium, PingFang SC;
  106. font-weight: 500;
  107. color: #FF0000;
  108. line-height: 42rpx;
  109. }
  110. .tabTxt{
  111. padding-top: 23rpx;padding-bottom: 8rpx;
  112. }
  113. .tabActive{
  114. color: #FF0000 !important;
  115. }
  116. .tabkk{
  117. width: 40rpx;
  118. height: 4rpx;
  119. background: #FF0000;
  120. margin: 0 auto;
  121. }
  122. .nickName{
  123. font-weight: 400;
  124. color: #999999;
  125. font-size: 24rpx;
  126. line-height: 30rpx;
  127. padding-left: 10rpx;
  128. }
  129. .lineContLeftImg{
  130. width: 30rpx;
  131. height: 30rpx;
  132. margin-right: 10rpx;
  133. }
  134. .line{
  135. width: 702rpx;
  136. background: #FFFFFF;
  137. border-radius: 10rpx;
  138. margin-bottom: 20rpx;
  139. margin-left: 24rpx;
  140. }
  141. .linetop{
  142. display: flex;
  143. justify-content: space-between;
  144. font-size: 30rpx;
  145. padding: 20rpx;
  146. padding-bottom: 0;
  147. }
  148. .lineline{
  149. display: flex;
  150. justify-content: space-between;
  151. padding: 20rpx;
  152. font-weight: 400;
  153. color: #999999;
  154. font-size: 24rpx;
  155. line-height: 30rpx;
  156. }
  157. .lineContLeft{
  158. display: flex;
  159. }
  160. .name{
  161. font-weight: 500;
  162. color: #3C3C3C;
  163. }
  164. .amount{
  165. color: #FF0000;
  166. }
  167. .nickNameImg{
  168. width: 30rpx;
  169. height: 30rpx;
  170. }
  171. </style>