123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146 |
- <template>
- <view class="picture-wrapper" @click="takePhotoMode">
- <view class="bg">
- <view class="">
- <view class="name"> {{ props.text && props.text.title ? props.text.title : text.title }} </view>
- <view class="value"> {{ props.text && props.text.tag1 ? props.text.tag1 : text.tag1 }} </view>
- <view class="tip">
- <view class="tip-value"> {{ props.text && props.text.tag2 ? props.text.tag2 : text.tag2 }} </view>
- </view>
- </view>
- <image v-if="props.img" class="icon" :src="getFullImageUrl(props.img)"></image>
- <image v-else class="icon" :src="`${$imgUrl}${ props.text && props.text.img ? props.text.img : text.img}`"></image>
- </view>
- </view>
- </template>
-
- <script setup lang="ts">
- import { computed } from 'vue'
- import { getFullImageUrl } from "@/utils/utils";
- const emits = defineEmits(['click']);
- const props = defineProps({
- img: {
- type: String,
- default: "",
- },
- type: {
- type: Number,
- default: 1,
- },
- text: {
- type: Object,
- default: () => {}
- }
- })
-
- const takePhotoMode = () => {
- emits('click', props.type)
- }
-
- const text = computed(() => {
- if (props.type === 1) {
- return {
- title: '人像面',
- tag1: '上传身份证的人像面',
- tag2: '拍摄规范',
- img: 'issuance/sff.png'
- }
- } else if (props.type === 2) {
- return {
- title: '国徽面',
- tag1: '上传身份证的国徽面',
- tag2: '拍摄规范',
- img: 'issuance/sff.png'
- }
- } else if (props.type === 3) {
- return {
- title: '行驶证主页',
- tag1: '上传行驶证的主页',
- tag2: '拍摄规范',
- img: 'applyCard/car-zhu.png'
- }
- } else if (props.type === 4) {
- return {
- title: '行驶证副页',
- tag1: '上传行驶证的副页',
- tag2: '拍摄规范',
- img: 'applyCard/car-fu.png'
- }
- } else if (props.type === 5) {
- return {
- title: '营业执照',
- tag1: '上传企业的营业执照',
- tag2: '拍摄规范',
- img: 'applyCard/zhizhao.png'
- }
- } else {
- return {
- title: '人像面',
- tag1: '上传身份证的人像面',
- tag2: '拍摄规范',
- img: 'issuance/sff.png'
- }
- }
- })
- </script>
-
- <style lang="scss" scoped>
- .picture-wrapper {
- margin-top: 30rpx;
-
- .bg {
- background: #F5F9FB;
- border-radius: 10rpx;
- padding: 40rpx 30rpx;
- display: flex;
- // align-items: center;
- justify-content: space-between;
- .title{
- color: #01243A;
- }
- .name {
- padding-top: 30rpx;
- font-size: 32rpx;
- font-family: SourceHanSansSC, SourceHanSansSC;
- font-weight: 500;
- color: #111;
- line-height: 34rpx;
- }
-
- .value {
- margin-top: 20rpx;
- font-size: 22rpx;
- font-family: SourceHanSansSC, SourceHanSansSC;
- font-weight: 400;
- color: #999999;
- line-height: 24rpx;
- }
-
- .tip {
- margin-top: 20rpx;
- text-align: center;
- width: 100rpx;
- height: 30rpx;
- border-radius: 6rpx;
- border: 1rpx solid #CCB375;
-
- .tip-value {
- font-size: 20rpx;
- font-family: Microsoft YaHei;
- font-weight: 400;
- color: #CCB375;
- line-height: 30rpx;
- opacity: 1;
- }
- }
- }
-
- .icon {
- width: 304rpx;
- height: 190rpx;
- background-image: var(--bgimg);
- background-size: 100% 100%;
- background-repeat: no-repeat;
- }
- }
- </style>
|