- 当前 Bug 的表现(可附上截图)
- 预期表现
- 复现路径
- 提供一个最简复现 Demo
< view class = 'whole-bg' > < text class = 'title-text' >人脸识别</ text > < text class = 'tip-text' >请确保是本人操作</ text > < camera device-position = "{{switch}}" flash = "off" binderror = "error" style = "width: 250px; height: 250px;margin-top:80rpx;position: relative;z-index: 99;" id = "myCamera" > <!-- <cover-image class='camera-bg' src='../../image/camera_bg.png' mode='scaleToFill'></cover-image> --> < cover-view hidden = '{{hiddenModal}}' class = 'pop-up' > < cover-view class = 'pop-up-container' > < cover-view class = 'tip-view' > < cover-view class = 'modal-title-text' >未能识别人脸</ cover-view > < cover-view class = 'tip-text-modal' >正对手机更容易成功</ cover-view > </ cover-view > < cover-view class = 'line-row' ></ cover-view > < cover-view class = 'button-line' > < cover-view class = 'sure-btn' > < cover-view class = 'btn-text' bindtap = 'cancel' >退出</ cover-view > </ cover-view > < cover-view class = 'line-cloumn' ></ cover-view > < cover-view class = 'cancel-btn' > < cover-view class = 'btn-text' bindtap = 'confirm' >再试一次</ cover-view > </ cover-view > </ cover-view > </ cover-view > </ cover-view > </ camera > < text class = 'title-text' >将人脸对准扫描处</ text > < template is = "oneBtnModalTemplate" data = "{{title,content,sureText,ishiddenOneBtnModal}}" /> <!-- <view class='weui-cell_ft switch'> <switch checked bindchange='switch1Change'></switch> </view> --> </ view > |
page { height : 100% ; } .project-list { display : flex; flex- direction : column; } .project-item { margin : 10 rpx 0 0 5 rpx; } .project-git { font-size : 28 rpx; color : blue ; } .whole-bg { width : 100% ; height : 100% ; background-color : #000 ; display : flex; flex- direction : column; align-items: center ; flex: 1 ; } .title-text { margin-top : 50 rpx; font-size : 52 rpx; color : #fff ; font-weight : 500 ; } .tip-text { font-size : 36 rpx; color : #fff ; font-weight : 200 ; margin-top : 20 rpx; } .camera-bg { width : 100% ; height : 100% ; z-index : 99 ; /* border-color: #fff; border-width: 1rpx; border-radius: 50%; margin-top: 150rpx; */ } .modal-view { width : 100% ; display : flex; flex- direction : column; align-items: center ; justify- content : center ; } .modal-image { width : 100 rpx; height : 100 rpx; margin-bottom : 30 rpx; } .modal-title-text { font-weight : 700 rpx; color : #000 ; background : #fff ; font-size : 38 rpx; } .tip-text-modal { width : 100% ; text-align : center ; font-size : 38 rpx; color : #555 ; background : #fff ; } .line-row { background : #eee ; width : 100% ; height : 2 rpx; } .line-cloumn { background : #eee ; width : 2 rpx; height : 100% ; } .content-view { background : #fff ; display : flex; flex- direction : column; align-items: center ; justify- content : center ; } .button-line { display : flex; height : 100 rpx; width : 100% ; background : #fff ; } .sure-btn { flex: 1 ; display : flex; justify- content : center ; align-items: center ; background : #fff ; } .cancel-btn { flex: 1 ; display : flex; justify- content : center ; align-items: center ; background : #fff ; } .tip-view { padding-bottom : 50 rpx; padding-top : 50 rpx; display : flex; justify- content : center ; align-items: center ; flex- direction : column; height : 150 rpx; } .pop-up { position : fixed ; /* top: 0; left: 0; */ width : 100% ; height : 100% ; /* background-color: rgba(f, f, f, 0.7); */ z-index : 999 ; display : flex; flex- direction : column; align-items: center ; justify- content : center ; } .pop-up-container { width : 580 rpx; height : 350 rpx; background-color : #fff ; border-radius: 8 rpx; color : #fff ; font-size : 28 rpx; z-index : 9999 ; } .btn-text{ color : #000 ; font-size : 28 rpx; } |
楼主,人脸识别实现了吗,使用的是其他API吗,是用的图片还是摄像?能否给个DEMO?
实现了 用的是face++ 传的是图片
提供一下出现问题的机型和微信版本,以及能复现问题的简单代码片段(https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html)。
代码片段:https://developers.weixin.qq.com/s/PJyikTmV7c3T
机型:华为荣耀9与oppo a7x
抽出来放这里试试
放在下面 弹窗会被摄像头盖住
,提到最外面,使用if试试,这边测试了小米note3,可以显示
如果设置一个固定高度则全面屏的手机可以正常显示 但非全面屏的手机则会变得特别长