Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

ocr-cert-block.vue 3.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150
  1. <template>
  2. <view class="picture-wrapper" @click="takePhotoMode">
  3. <view class="bg">
  4. <view class="">
  5. <view class="name"> {{ props.text && props.text.title ? props.text.title : text.title }} </view>
  6. <view class="value"> {{ props.text && props.text.tag1 ? props.text.tag1 : text.tag1 }} </view>
  7. <view class="tip">
  8. <view class="tip-value"> {{ props.text && props.text.tag2 ? props.text.tag2 : text.tag2 }} </view>
  9. </view>
  10. </view>
  11. <view class="image-out" :style="{'backgroundImage': `url(${$imgUrl}issuance/bg-border.png`}">
  12. <image v-if="props.img" class="icon" :src="getFullImageUrl(props.img)" mode="aspectFill"></image>
  13. <image v-else class="icon" :src="`${$imgUrl}${ props.text && props.text.img ? props.text.img : text.img}`" mode="aspectFill"></image>
  14. </view>
  15. </view>
  16. </view>
  17. </template>
  18. <script setup lang="ts">
  19. import { computed } from 'vue'
  20. import { getFullImageUrl } from "@/utils/utils";
  21. const emits = defineEmits(['click']);
  22. const props = defineProps({
  23. img: {
  24. type: String,
  25. default: "",
  26. },
  27. type: {
  28. type: Number,
  29. default: 1,
  30. },
  31. text: {
  32. type: Object,
  33. default: () => {}
  34. }
  35. })
  36. const takePhotoMode = () => {
  37. emits('click', props.type)
  38. }
  39. const text = computed(() => {
  40. if (props.type === 1) {
  41. return {
  42. title: '人像面',
  43. tag1: '上传身份证的人像面',
  44. tag2: '拍摄规范',
  45. img: 'issuance/sfz.png'
  46. }
  47. } else if (props.type === 2) {
  48. return {
  49. title: '国徽面',
  50. tag1: '上传身份证的国徽面',
  51. tag2: '拍摄规范',
  52. img: 'issuance/sff.png'
  53. }
  54. } else if (props.type === 3) {
  55. return {
  56. title: '行驶证主页',
  57. tag1: '上传行驶证的主页',
  58. tag2: '拍摄规范',
  59. img: 'applyCard/car-zhu.png'
  60. }
  61. } else if (props.type === 4) {
  62. return {
  63. title: '行驶证副页',
  64. tag1: '上传行驶证的副页',
  65. tag2: '拍摄规范',
  66. img: 'applyCard/car-fu.png'
  67. }
  68. } else if (props.type === 5) {
  69. return {
  70. title: '营业执照',
  71. tag1: '上传企业的营业执照',
  72. tag2: '拍摄规范',
  73. img: 'applyCard/zhizhao.png'
  74. }
  75. } else {
  76. return {
  77. title: '人像面',
  78. tag1: '上传身份证的人像面',
  79. tag2: '拍摄规范',
  80. img: 'issuance/sff.png'
  81. }
  82. }
  83. })
  84. </script>
  85. <style lang="scss" scoped>
  86. .picture-wrapper {
  87. margin-top: 30rpx;
  88. .bg {
  89. background: #F5F9FB;
  90. border-radius: 10rpx;
  91. padding: 40rpx 30rpx;
  92. display: flex;
  93. // align-items: center;
  94. justify-content: space-between;
  95. .title{
  96. color: #01243A;
  97. }
  98. .name {
  99. padding-top: 30rpx;
  100. font-size: 32rpx;
  101. font-family: SourceHanSansSC, SourceHanSansSC;
  102. font-weight: 500;
  103. color: #111;
  104. line-height: 34rpx;
  105. }
  106. .value {
  107. margin-top: 20rpx;
  108. font-size: 22rpx;
  109. font-family: SourceHanSansSC, SourceHanSansSC;
  110. font-weight: 400;
  111. color: #999999;
  112. line-height: 24rpx;
  113. }
  114. .tip {
  115. margin-top: 20rpx;
  116. text-align: center;
  117. width: 100rpx;
  118. height: 30rpx;
  119. border-radius: 6rpx;
  120. border: 1rpx solid #CCB375;
  121. .tip-value {
  122. font-size: 20rpx;
  123. font-family: Microsoft YaHei;
  124. font-weight: 400;
  125. color: #CCB375;
  126. line-height: 30rpx;
  127. opacity: 1;
  128. }
  129. }
  130. }
  131. .image-out{
  132. width: 304rpx;
  133. height: 190rpx;
  134. background-size: 100% 100%;
  135. background-repeat: no-repeat;
  136. }
  137. .icon {
  138. width: 304rpx;
  139. height: 190rpx;
  140. }
  141. }
  142. </style>