没有合适的资源?快使用搜索试试~ 我知道了~
微信小程序实现身份证取景框拍摄

温馨提示


试读
3页
主要介绍了微信小程序实现身份证取景框拍摄,文中示例代码介绍的非常详细,具有一定的参考价值,感兴趣的小伙伴们可以参考一下
资源推荐
资源详情
资源评论






















微信小程序实现身份证取景框拍摄微信小程序实现身份证取景框拍摄
主要介绍了微信小程序实现身份证取景框拍摄,文中示例代码介绍的非常详细,具有一定的参考价值,感兴趣
的小伙伴们可以参考一下
本文实例为大家分享了微信小程序实现身份证取景框拍摄的具体代码,供大家参考,具体内容如下
wxml
<view class="camera_box">
<camera class="camera" wx:if="{{!show}}" device-position="back" flash="off" binderror="error">
<cover-view class="id_m">
<cover-image class="img" src="https://cdn.ctoku.com/201910234221235312.png"></cover-image>
</cover-view>
</camera>
<image class="camera_img" src="{{src}}" wx:if="{{show}}"></image>
<view class="action">
<button class="takeBtn" type="primary" bindtap="takePhoto" wx:if="{{!show}}"></button>
<button class="saveImg" type="primary" bindtap="saveImg" wx:if="{{show}}"></button>
<button class="cancelBtn" wx:if="{{show}}" type="primary" bindtap="cancelBtn"></button>
</view>
</view>
wxss
.camera_box {
height: 100vh; width: 100vw;
position: relative;
}
.camera {
height: 85vh; width: 100vw;
z-index: 1;
}
.id_m {
height: 85vh; width: 100vw;
z-index: 999;
background: rgba(0, 0, 0, 0.1);
display: flex;
position: absolute;
}
.id_m .img {
width: 550rpx;
height: 900rpx;
display: block;
position: absolute;
left: 0; right: 0; margin: auto auto;
top: 0; bottom: 0;
}
.id_m .tips_txt {
transform:rotate(90deg);
}
.camera_box .action {
height: 15vh;
position: relative;
display: flex;
justify-content: space-around;
align-items: center;
}
.camera_box .takeBtn {
height: 120rpx; width: 120rpx; border-radius: 50%;
font-size: 24rpx;
background: url('https://cdn.ctoku.com/1123123123123e3241.png') no-repeat center;
background-size: contain;
border: none;
}
.camera_box .cancelBtn {
font-size: 24rpx;
height: 120rpx; width: 120rpx; border-radius: 50%;
background: url('https://cdn.ctoku.com/12311123342312231.png') no-repeat center;
background-size: contain;
border: none;
}
.camera_box .saveImg {
background: url('https://cdn.ctoku.com/1232123434231231231.png') no-repeat center;
font-size: 24rpx;
height: 120rpx; width: 120rpx; border-radius: 50%;
background-size: contain;
border: none;
资源评论

- 潮汐先生2021-07-26想要uniapp的,没想到是微信原生的,不清楚作用大不大,给个中立的评分吧
- 飞奔的喀纳斯蜗牛2020-12-09牛翻了=。=||谢谢

weixin_38702945
- 粉丝: 9
- 资源: 964
上传资源 快速赚钱
我的内容管理 展开
我的资源 快来上传第一个资源
我的收益
登录查看自己的收益我的积分 登录查看自己的积分
我的C币 登录后查看C币余额
我的收藏
我的下载
下载帮助


安全验证
文档复制为VIP权益,开通VIP直接复制
