You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

ocr-cert-block.vue 3.2KB

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