certificateDetail.vue 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153
  1. <template>
  2. <view class="container">
  3. <view class="photo-box">
  4. <cover-image class="photo" src="https://ok.166.net/reunionpub/1_20210628_17a5105e667995566.jpeg"></cover-image>
  5. </view>
  6. <view class="info-box">
  7. <view class="info-item-box">
  8. <view class="label">
  9. <span>证书编号:</span>
  10. </view>
  11. <view class="text">
  12. {{ info.zsbh }}
  13. </view>
  14. </view>
  15. <view class="info-item-box">
  16. <view class="label">
  17. <span>发证部门:</span>
  18. </view>
  19. <view class="text">
  20. {{ info.fzbm }}
  21. </view>
  22. </view>
  23. <view class="info-item-box">
  24. <view class="label">
  25. <span>发证日期:</span>
  26. </view>
  27. <view class="text">
  28. {{ info.fzrq }}
  29. </view>
  30. </view>
  31. <view class="info-item-box">
  32. <view class="label">
  33. <span style="letter-spacing: 2em;">姓</span>
  34. <span>名:</span>
  35. </view>
  36. <view class="text">
  37. {{ info.xm }}
  38. </view>
  39. </view>
  40. <view class="info-item-box">
  41. <view class="label">
  42. <span style="letter-spacing: 2em;">性</span>
  43. <span>别:</span>
  44. </view>
  45. <view class="text">
  46. {{ info.xb }}
  47. </view>
  48. </view>
  49. <view class="info-item-box">
  50. <view class="label">
  51. <span>身份证号:</span>
  52. </view>
  53. <view class="text">
  54. {{ info.sfzh }}
  55. </view>
  56. </view>
  57. <view class="info-item-box">
  58. <view class="label">
  59. <span>文化程度:</span>
  60. </view>
  61. <view class="text">
  62. {{ info.whcd }}
  63. </view>
  64. </view>
  65. </view>
  66. </view>
  67. </template>
  68. <script setup>
  69. import { ref } from 'vue'
  70. import { onLoad } from '@dcloudio/uni-app'
  71. import { getZhongjie, getAnjie } from '@/api/user.js'
  72. const certificateType = ref()
  73. const certificateTitle = ref()
  74. const info = ref({
  75. zsbh: null,
  76. fzbm: null,
  77. fzrq: null,
  78. xm: null,
  79. xb: null,
  80. sfzh: null,
  81. whcd: null
  82. })
  83. onLoad((load) => {
  84. certificateType.value = load.type
  85. certificateTitle.value = load.title
  86. uni.setNavigationBarTitle({
  87. title: certificateTitle.value
  88. })
  89. if (certificateType.value === 'zhongjie') {
  90. getZhongjie().then(res => {
  91. if (res && res.message === 'success') {
  92. info.value = res.data
  93. }
  94. })
  95. } else if (certificateType.value === 'anjie') {
  96. getAnjie().then(res => {
  97. if (res && res.message === 'success') {
  98. info.value = res.data
  99. }
  100. })
  101. }
  102. })
  103. </script>
  104. <style lang="scss" scoped>
  105. .container {
  106. height: 100vh;
  107. width: 100vw;
  108. background-color: $uni-bg-color-grey;
  109. padding: 20rpx;
  110. .photo-box {
  111. width: 100%;
  112. display: flex;
  113. justify-content: center;
  114. margin: 20rpx 0;
  115. .photo {
  116. width: 200rpx;
  117. height: 280rpx;
  118. object-fit: cover;
  119. border-radius: $uni-card-border-radius;
  120. }
  121. }
  122. .info-box {
  123. padding: 20rpx 0;
  124. .info-item-box {
  125. display: flex;
  126. background-color: $uni-bg-color;
  127. border: 1rpx solid #81B4F8;
  128. border-radius: $uni-card-border-radius;
  129. padding: 20rpx 30rpx;
  130. font-size: $uni-title-font-size-2;
  131. // font-weight: bold;
  132. letter-spacing: 2rpx;
  133. margin-bottom: 40rpx;
  134. .label {
  135. width: 21%;
  136. }
  137. .text {
  138. width: 79%;
  139. }
  140. }
  141. }
  142. }
  143. </style>