userInfo.vue 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. <template>
  2. <view class="patient-panel">
  3. <image class="bg" src="../../static/images/card_bg.png" mode="scaleToFill" />
  4. <view class="panel-inner">
  5. <image class="avatar" src="../../static/images/avatar.png" mode="heightFix" />
  6. <view class="patient-info">
  7. <view class="info-main">
  8. <text class="name">{{ currentUser.memberName }}</text>
  9. <text class="phone">{{ currentUser.mobile }}</text>
  10. </view>
  11. <view class="info-sub">
  12. <text class="other">{{ currentUser.certType == '01' ? '身份证:' : '证件号' }}</text>
  13. <text class="other">{{ currentUser.certNum }}</text>
  14. </view>
  15. </view>
  16. </view>
  17. </view>
  18. </template>
  19. <script setup lang="ts">
  20. const props = defineProps({
  21. currentUser: {
  22. type: Object,
  23. default: () => ({})
  24. }
  25. });
  26. </script>
  27. <style scoped>
  28. .patient-panel {
  29. position: relative;
  30. height: 170upx;
  31. overflow: hidden;
  32. }
  33. .patient-panel .bg {
  34. position: absolute;
  35. top: 0;
  36. left: 0;
  37. width: 100%;
  38. }
  39. .patient-panel .avatar {
  40. height: 100%;
  41. z-index: 9;
  42. }
  43. .patient-panel .panel-inner {
  44. width: 100%;
  45. height: 100%;
  46. padding: 30upx 50upx;
  47. display: flex;
  48. align-items: stretch;
  49. }
  50. .patient-panel .panel-inner .patient-info {
  51. color: #ffffff;
  52. flex: 1 0 0;
  53. z-index: 9;
  54. padding: 10upx 30upx;
  55. display: flex;
  56. flex-direction: column;
  57. }
  58. .info-main {
  59. flex: 1 0 0;
  60. }
  61. .info-sub {
  62. font-size: 30upx;
  63. }
  64. .name {
  65. font-size: 36upx;
  66. font-weight: bold;
  67. }
  68. .phone {
  69. font-size: 28upx;
  70. margin-left: 20upx;
  71. }
  72. .other {
  73. font-size: 28upx;
  74. }
  75. </style>