mine-card.vue 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  1. <template>
  2. <view class="card" :style="{backgroundImage: `url(${imgUrl})`, backgroundSize: '100% 100%'}">
  3. <view class="logo">
  4. <image src="https://static.caimei365.com/app/img/icon/logo-fanbai@2x.png" mode="" class="titleImgUrl">
  5. </image>
  6. </view>
  7. <view class="card-contain">
  8. <view style="display: flex;">
  9. <view class="card-head">
  10. <image
  11. :src="userInfo.image.length > 12 ? userInfo.image : 'https://static.caimei365.com/app/img/icon/default-head-new.png'"
  12. mode="" class="head"></image>
  13. </view>
  14. <view class="card-info">
  15. <view class="card-info-head">
  16. <view class="card-name">
  17. {{userInfo.linkMan}}
  18. </view>
  19. <view class="card-info-tab">
  20. 客户经理
  21. </view>
  22. </view>
  23. <view class="card-info-iphone">
  24. {{ userInfo.contractMobile.replace(/(?=(\d{4})+$)/g,"-") }}
  25. </view>
  26. </view>
  27. </view>
  28. <view class="card-qrcode">
  29. <view class="qrcode-message">
  30. <image :show-menu-by-longpress="true" :src="userInfo.qrCode || ''" class="qrcode" mode=""></image>
  31. </view>
  32. <view class="tips">
  33. 长按或扫二维码—-联系我-—
  34. </view>
  35. </view>
  36. </view>
  37. </view>
  38. </template>
  39. <script>
  40. export default {
  41. props: {
  42. userInfo: {
  43. type: Object,
  44. default: () => ({})
  45. }
  46. },
  47. data() {
  48. return {
  49. imgUrl: 'https://static.caimei365.com/app/img/bg/home_cumres_bg@2x.png',
  50. }
  51. },
  52. mounted() {},
  53. methods: {},
  54. }
  55. </script>
  56. <style lang="scss">
  57. .card {
  58. width: 702rpx;
  59. height: 340rpx;
  60. background-color: #E1E1E1;
  61. border-radius: 16rpx;
  62. opacity: 1;
  63. margin: 0 auto;
  64. box-sizing: border-box;
  65. padding: 16rpx 32rpx;
  66. .titleImgUrl {
  67. width: 241rpx;
  68. height: 80rpx;
  69. }
  70. .card-contain {
  71. display: flex;
  72. align-items: center;
  73. justify-content: space-between;
  74. .head {
  75. width: 128rpx;
  76. height: 128rpx;
  77. border-radius: 50%;
  78. object-fit: contain;
  79. }
  80. .card-info {
  81. height: 128rpx;
  82. margin-left: 30rpx;
  83. }
  84. .card-info-head {
  85. display: flex;
  86. align-items: center;
  87. margin-bottom: 13rpx;
  88. .card-name {
  89. color: #333333;
  90. font-size: 40rpx;
  91. font-weight: bold;
  92. }
  93. .card-info-tab {
  94. width: 88rpx;
  95. height: 31rpx;
  96. background-color: #FFF1EB;
  97. color: #666666;
  98. font-size: 22rpx;
  99. padding: 0 8rpx;
  100. margin-left: 10rpx;
  101. border-radius: 4rpx;
  102. }
  103. }
  104. .card-info-iphone {
  105. color: #333333;
  106. font-size: 28rpx;
  107. }
  108. .card-qrcode {
  109. .qrcode {
  110. width: 126rpx;
  111. height: 126rpx;
  112. object-fit: contain;
  113. margin-bottom: 6rpx;
  114. }
  115. .tips {
  116. font-size: 18rpx;
  117. color: #333333;
  118. text-align: center;
  119. width: 126rpx;
  120. line-height: 24rpx;
  121. }
  122. }
  123. }
  124. }
  125. </style>