Commit d907f077 by 修福龙

修复刷脸窗口循环弹出的问题

parent fa3e195f
......@@ -173,7 +173,7 @@ class FacePage extends Component {
handleScaleChange = async ({count}) => {
if (count === -1) {
// 重力感应开始识别
this.wechatFace();
this.wechatFace(true);
} else if (count === 0) {
// 重力感应归零
this.leaveC();
......@@ -183,6 +183,7 @@ class FacePage extends Component {
verifyCodeModal: false,
current: 1,
tipsModal: false,
tip: '',
});
}
};
......@@ -234,13 +235,14 @@ class FacePage extends Component {
};
// 微信人脸身份识别
wechatFace = async () => {
if (this.state.orderDetailsModal) {
wechatFace = async face => {
const {orderDetailsModal, tipsModal} = this.state;
if ((orderDetailsModal || tipsModal) && !face) {
return;
} // 出现订单弹窗,不做人脸识别
const tipText = '正在人脸识别,请看向屏幕,靠中间站稳';
Speech.speak(tipText);
this.setState({tip: tipText, tipsModal: true});
// this.setState({tip: tipText, tipsModal: true});
let auth = (await this.authinfo()) || {};
if (
auth.return_code === 'SUCCESS' ||
......@@ -392,7 +394,7 @@ class FacePage extends Component {
<View style={styles.faceRecogn}>
<Touch
style={styles.faceGif}
onPress={this.wechatFace}
onPress={() => this.wechatFace(true)}
feedback={false}>
<Image
source={require('../assets/Vertical/face.gif')}
......@@ -420,7 +422,7 @@ class FacePage extends Component {
)}
</View>
<Touch
onPress={this.wechatFace}
onPress={() => this.wechatFace(true)}
style={styles.btnCome}
feedback={false}>
<View style={styles.click}>
......@@ -605,6 +607,7 @@ const styles = {
// flex: 0.2,
marginTop: '30%',
width: '100%',
height: 200,
flexDirection: 'row',
alignItems: 'center',
justifyContent: 'center',
......@@ -616,7 +619,7 @@ const styles = {
backgroundColor: '#FC4000',
width: '70%',
// height: '18%',
height: 200,
// height: 200,
justifyContent: 'center',
alignItems: 'center',
marginRight: 5,
......@@ -633,7 +636,7 @@ const styles = {
callTouch: {
width: '30%',
// height: '18%',
height: 200,
// height: 200,
marginLeft: 5,
backgroundColor: '#FC4000',
},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment