userInfo.vue 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  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. import { defineProps } from 'vue';
  21. const props = defineProps({
  22. currentUser: {
  23. type: Object,
  24. default: () => ({})
  25. }
  26. });
  27. </script>
  28. <style scoped>
  29. .patient-panel {
  30. position: relative;
  31. height: 170upx;
  32. overflow: hidden;
  33. }
  34. .patient-panel .bg {
  35. position: absolute;
  36. top: 0;
  37. left: 0;
  38. width: 100%;
  39. }
  40. .patient-panel .avatar {
  41. height: 100%;
  42. z-index: 9;
  43. }
  44. .patient-panel .panel-inner {
  45. width: 100%;
  46. height: 100%;
  47. padding: 30upx 50upx;
  48. display: flex;
  49. align-items: stretch;
  50. }
  51. .patient-panel .panel-inner .patient-info {
  52. color: #ffffff;
  53. flex: 1 0 0;
  54. z-index: 9;
  55. padding: 10upx 30upx;
  56. display: flex;
  57. flex-direction: column;
  58. }
  59. .info-main {
  60. flex: 1 0 0;
  61. }
  62. .info-sub {
  63. font-size: 30upx;
  64. }
  65. .name {
  66. font-size: 36upx;
  67. font-weight: bold;
  68. }
  69. .phone {
  70. font-size: 28upx;
  71. margin-left: 20upx;
  72. }
  73. .other {
  74. font-size: 28upx;
  75. }
  76. </style>