visitingCard.vue 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172
  1. <template>
  2. <view>
  3. <view style="padding:5rpx 20rpx 45rpx 20rpx;">
  4. <view class="desc item_border">
  5. <uni-row>
  6. <uni-col :span="20">
  7. <view class="desc">
  8. 头像
  9. </view>
  10. </uni-col>
  11. <uni-col :span="4">
  12. <view>
  13. <view class="desc">
  14. <image v-if="data.imgSrc" class="desc_img" :src="BaseUrl+data.imgSrc"></image>
  15. <view v-else class="desc_img img_alt_text">无</view>
  16. </view>
  17. </view>
  18. </uni-col>
  19. </uni-row>
  20. </view>
  21. <view class="desc item_border">
  22. <uni-row>
  23. <uni-col :span="5">
  24. <view class="desc">
  25. 姓名
  26. </view>
  27. </uni-col>
  28. <uni-col :span="19">
  29. <view class="desc descContent">
  30. <u-text :text="data.userName" size="18" color="#a3a3a3"></u-text>
  31. </view>
  32. </uni-col>
  33. </uni-row>
  34. </view>
  35. <view class="desc item_border">
  36. <uni-row>
  37. <uni-col :span="5">
  38. <view class="desc">
  39. 部门
  40. </view>
  41. </uni-col>
  42. <uni-col :span="19">
  43. <view class="desc descContent">
  44. <u-text :text="data.department" size="18" color="#a3a3a3"></u-text>
  45. </view>
  46. </uni-col>
  47. </uni-row>
  48. </view>
  49. <view class="desc item_border">
  50. <uni-row>
  51. <uni-col :span="5">
  52. <view class="desc">
  53. 岗位
  54. </view>
  55. </uni-col>
  56. <uni-col :span="19">
  57. <view class="desc descContent">
  58. <u-text :text="data.post" size="18" color="#a3a3a3"></u-text>
  59. </view>
  60. </uni-col>
  61. </uni-row>
  62. </view>
  63. <view class="desc item_border">
  64. <uni-row>
  65. <uni-col :span="5">
  66. <view class="desc">
  67. 手机号
  68. </view>
  69. </uni-col>
  70. <uni-col :span="19">
  71. <view class="desc">
  72. <u-text mode="phone" :text="data.phone" size="18" call="true" color="#45a5ff"></u-text>
  73. </view>
  74. </uni-col>
  75. </uni-row>
  76. </view>
  77. <view class="desc item_border">
  78. <uni-row>
  79. <uni-col :span="5">
  80. <view class="desc">
  81. 座机号
  82. </view>
  83. </uni-col>
  84. <uni-col :span="19">
  85. <view class="desc descContent">
  86. <u-text :text="data.seatNo" size="18" color="#a3a3a3"></u-text>
  87. </view>
  88. </uni-col>
  89. </uni-row>
  90. </view>
  91. <view class="desc item_border">
  92. <uni-row>
  93. <uni-col :span="5">
  94. <view class="desc">
  95. 邮箱
  96. </view>
  97. </uni-col>
  98. <uni-col :span="19">
  99. <view class="desc descContent">
  100. <u-text mode="text" :text="data.email" size="18" color="#a3a3a3" align="right"></u-text>
  101. </view>
  102. </uni-col>
  103. </uni-row>
  104. </view>
  105. </view>
  106. </view>
  107. </template>
  108. <script>
  109. export default {
  110. data() {
  111. return {
  112. data: {},
  113. BaseUrl: this.$BASE_URL
  114. }
  115. },
  116. onLoad() {},
  117. onShow() {
  118. this.getVisitingCard()
  119. },
  120. methods: {
  121. async getVisitingCard() {
  122. console.log(uni.getStorageSync('data'))
  123. const {
  124. data: res
  125. } = await this.$httpRequest({
  126. url: '/app/getOpfInfo?opfUserPhone=' + uni.getStorageSync('data').phone,
  127. method: 'get'
  128. })
  129. if (res.code == 200) {
  130. this.data = res.data
  131. } else {
  132. uni.showToast({
  133. icon: 'none',
  134. title: res.msg
  135. })
  136. }
  137. }
  138. }
  139. }
  140. </script>
  141. <style>
  142. .desc {
  143. padding: 15rpx 5rpx;
  144. font-size: 35rpx;
  145. color: #838383;
  146. }
  147. .descContent {
  148. color: #a3a3a3;
  149. text-align: right;
  150. }
  151. .item_border {
  152. border-bottom: 1px solid #eeeeee;
  153. }
  154. .desc_img {
  155. width: 100rpx;
  156. height: 100rpx;
  157. border: 2rpx solid #dadada;
  158. border-radius: 20rpx;
  159. }
  160. .img_alt_text {
  161. color: #dadada;
  162. line-height: 95rpx;
  163. font-size: 35rpx;
  164. align-items: center;
  165. }
  166. </style>