Commit 7f0ae948 by zeven

无感出店弹出加载页面

parent 9b353616
...@@ -30,7 +30,7 @@ class LoadingModal extends Component { ...@@ -30,7 +30,7 @@ class LoadingModal extends Component {
/> />
</View> </View>
<View style={styles.bottom}> <View style={styles.bottom}>
<Text style={styles.tips}>正在进行安全检查,请靠中间站稳</Text> <Text style={styles.tips}>正在进行安全检查</Text>
</View> </View>
</View> </View>
</View> </View>
......
...@@ -186,7 +186,15 @@ class FacePage extends Component { ...@@ -186,7 +186,15 @@ class FacePage extends Component {
this.loading(false); this.loading(false);
// 即拿迷你店,唤醒屏幕时间为1分钟 // 即拿迷你店,唤醒屏幕时间为1分钟
this.sense ? this.wakeUp(60000) : this.wakeUp(); this.sense ? this.wakeUp(60000) : this.wakeUp();
if (this.sense && this.action === 'enter') this.face(); if (this.sense) {
// 进门自动调起刷脸
if (this.action === 'enter') this.face();
else if (this.action === 'leave') {
// 出门身份识别提示
Speech.speak('正在进行安全检查');
this.loading(true, 30000);
}
}
}; };
handleTalkCall = async () => { handleTalkCall = async () => {
...@@ -439,10 +447,19 @@ class FacePage extends Component { ...@@ -439,10 +447,19 @@ class FacePage extends Component {
} }
}; };
loading = flag => { loading = (flag, timeout) => {
this.setState({ this.setState({
loadingModal: flag, loadingModal: flag,
}); });
if (flag && timeout) {
// 自动关闭加载界面
clearTimeout(this.loadingTimeout);
this.loadingTimeout = setTimeout(() => {
this.setState({
loadingModal: false,
});
}, timeout);
}
}; };
// 语音通话请求 // 语音通话请求
......
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