这是没有进行身份证照片验证的 如果要判断上传的图片是否为身份证 可以参考阿里云的
阿里云身份证验证超链接
最后放上了上传身份证图片的人像框和国徽框
引入的js文件在图片后面
wxml
<template>
<view class="ID-mian">
<h3>身份证正面(上传)</h3>
<view class="card-zheng">
<view class="zheng_left" v-show="isShow">
<image src="../../static/zheng.png" mode="" @tap='touchphoto1'></image>
</view>
<view class="zheng_right" v-show="!isShow">
<image :src="V_TPID"></image>
</view>
</view>
<h3>身份证反面(上传)</h3>
<view class="card-fan">
<view class="fan_left" v-show="isShow1">
<image src="../../static/fan.png" mode="" @tap='touchphoto2'></image>
</view>
<view class="fan_right" v-show="!isShow1">
<image :src="V_TPID1"></image>
</view>
</view>
<view style="display: flex;align-items: center;margin-top: 10px;">
<button style="width: 100%;height:40px;
line-height: 40px; color:white;
background-color: #39B54A;
font-size: 14px;"
@click="back">
确认上传
</button>
</view>
</view