abList.vue 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144
  1. <template>
  2. <view>
  3. <view class="qu" v-for="qu in data">
  4. <view class="tip">
  5. <text>{{qu.title}}</text>
  6. </view>
  7. <view class="row uni-flex uni-row" v-for="friend in qu.children" @click="toVisitingCard(friend)">
  8. <view class="row_logo">
  9. <image :src="BaseUrl+friend.imgSrc"></image>
  10. </view>
  11. <view class="flex-item" style="padding: 10rpx 0;">
  12. <u-text :text="friend.name" size="20" color="#787878"></u-text>
  13. <!-- <u-text mode="phone" :text="friend.phone" size="15" call="true"></u-text> -->
  14. </view>
  15. </view>
  16. </view>
  17. </view>
  18. </template>
  19. <script>
  20. export default {
  21. data() {
  22. return {
  23. data: [],
  24. BaseUrl: this.$BASE_URL
  25. }
  26. },
  27. onLoad() {
  28. this.getabData()
  29. },
  30. onShow() {
  31. this.getabData()
  32. },
  33. methods: {
  34. toVisitingCard(friend) {
  35. uni.setStorageSync('data', friend)
  36. uni.navigateTo({
  37. url: '/pageA/msg/visitingCard'
  38. })
  39. },
  40. async getabData() {
  41. const {
  42. data: res
  43. } = await this.$httpRequest({
  44. url: '/api/ci/ab?un=' + uni.getStorageSync("deptId"),
  45. method: 'get',
  46. })
  47. if (res.code == 200) {
  48. this.data = res.data
  49. } else {
  50. this.data = []
  51. uni.showToast({
  52. icon: 'none',
  53. title: res.msg
  54. })
  55. }
  56. },
  57. }
  58. }
  59. </script>
  60. <style lang="scss">
  61. page {
  62. background: #f8f8f8;
  63. }
  64. .row {
  65. background: white;
  66. display: flex;
  67. width: 100%;
  68. height: 100rpx;
  69. border-bottom: 1px solid #eeeeee;
  70. .row_logo {
  71. width: 20%;
  72. display: flex;
  73. align-items: center;
  74. image {
  75. width: 50px;
  76. height: 50px;
  77. margin: auto;
  78. border-radius: 5px;
  79. }
  80. }
  81. .row_left {
  82. height: 100%;
  83. width: 40%;
  84. display: flex;
  85. align-items: center;
  86. border: {
  87. bottom: 1px solid #DDDDDD;
  88. }
  89. text {
  90. font-size: 16px;
  91. font-family: 'syht';
  92. display: block;
  93. }
  94. }
  95. .row_right {
  96. height: 100%;
  97. width: 40%;
  98. display: flex;
  99. align-items: center;
  100. border: {
  101. bottom: 1px solid #DDDDDD;
  102. }
  103. text {
  104. font-size: 16px;
  105. font-family: 'syht';
  106. display: block;
  107. }
  108. }
  109. }
  110. .row:last-child {
  111. .row_right {
  112. border: 0;
  113. }
  114. }
  115. .qu {
  116. .tip {
  117. margin: 3px 0;
  118. font-size: 14px;
  119. font-family: 'syht';
  120. text {
  121. margin-left: 13px;
  122. }
  123. }
  124. }
  125. </style>