mine-card.vue 3.5 KB

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