mine-card.vue 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  1. <template>
  2. <div
  3. class="card"
  4. :style="{ backgroundImage: `url(${imgUrl})`, backgroundSize: '100% 100%' }"
  5. >
  6. <div class="logo">
  7. <van-image
  8. src="https://static.caimei365.com/app/img/icon/logo-fanbai.png"
  9. mode=""
  10. class="titleImgUrl"
  11. ></van-image>
  12. </div>
  13. <div class="card-contain">
  14. <div style="display: flex">
  15. <div class="card-head">
  16. <van-image
  17. :src="
  18. (userInfo.image && userInfo.image?.length > 12)
  19. ? userInfo.image
  20. : 'https://static.caimei365.com/app/img/icon/default-head-new.png'
  21. "
  22. mode=""
  23. class="head"
  24. ></van-image>
  25. </div>
  26. <div class="card-info">
  27. <div class="card-info-head">
  28. <div class="card-name">
  29. {{ userInfo.linkMan }}
  30. </div>
  31. <div class="card-info-tab">客户经理</div>
  32. </div>
  33. <div class="card-info-iphone">
  34. {{
  35. userInfo.mobile
  36. ? userInfo.mobile.replace(/(?=(\d{4})+$)/g, "-")
  37. : ""
  38. }}
  39. </div>
  40. </div>
  41. </div>
  42. <div class="card-qrcode">
  43. <div class="qrcode-message">
  44. <van-image :src="userInfo.qrCode || ''" class="qrcode" mode=""></van-image>
  45. </div>
  46. <div class="tips">长按或扫二维码—-联系我-—</div>
  47. </div>
  48. </div>
  49. </div>
  50. </template>
  51. <script>
  52. export default {
  53. data () {
  54. return {
  55. userInfo: null,
  56. imgUrl: 'https://static.caimei365.com/app/img/icon/bg-card.png'
  57. }
  58. },
  59. mounted () {
  60. this.userInfo = this.$store.getters.userInfo
  61. },
  62. methods: {}
  63. }
  64. </script>
  65. <style lang="scss" scoped>
  66. .card {
  67. width: 93.6vw;
  68. height: 45.3vw;
  69. background: #ff5b00;
  70. border-radius: 2.1vw;
  71. opacity: 1;
  72. margin: 0 auto;
  73. box-sizing: border-box;
  74. padding: 6.5vw 3.2vw;
  75. .titleImgUrl {
  76. width: 32.8vw;
  77. height: 8.8vw;
  78. }
  79. .card-contain {
  80. display: flex;
  81. align-items: center;
  82. justify-content: space-between;
  83. .head {
  84. width: 17.1vw;
  85. height: 17.1vw;
  86. border-radius: 50%;
  87. object-fit: contain;
  88. }
  89. .card-info {
  90. margin-left: 4vw;
  91. }
  92. .card-info-head {
  93. display: flex;
  94. align-items: center;
  95. margin-bottom: 1.7vw;
  96. .card-name {
  97. color: #ffffff;
  98. font-size: 5.3vw;
  99. font-weight: bold;
  100. }
  101. .card-info-tab {
  102. width: 13.9vw;
  103. height: 4.3vw;
  104. background-color: #ffbb00;
  105. color: #fff;
  106. font-size: 2.9vw;
  107. padding: 0 1vw;
  108. margin-left: 1.3vw;
  109. }
  110. }
  111. .card-info-iphone {
  112. color: #ffffff;
  113. font-size: 3.7vw;
  114. }
  115. .card-qrcode {
  116. display: flex;
  117. flex-direction: column;
  118. align-items: center;
  119. .qrcode {
  120. width: 16vw;
  121. height: 16vw;
  122. object-fit: contain;
  123. margin-bottom: 0.8vw;
  124. }
  125. .tips {
  126. font-size: 1vw;
  127. color: #fff;
  128. text-align: center;
  129. width: 22.8vw;
  130. line-height: 3.2vw;
  131. }
  132. }
  133. }
  134. }
  135. </style>