Commit d907f077 by 修福龙

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

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