Commit da722d12 by zeven

优化即拿迷你店屏幕唤醒时间

parent f7b12965
......@@ -180,11 +180,12 @@ class FacePage extends Component {
doorOpen = ({action, sense}) => {
this.action = action;
this.sense = sense;
if (!this.sense && sense) this.sense = sense;
if (action === '进店') this.action = 'leave';
else if (action === '出店') this.action = 'enter';
this.loading(false);
this.wakeUp();
// 即拿迷你店,唤醒屏幕时间为1分钟
this.sense ? this.wakeUp(60000) : this.wakeUp();
if (this.sense && this.action === 'enter') this.face();
};
......@@ -494,12 +495,12 @@ class FacePage extends Component {
}
};
wakeUp = () => {
wakeUp = (timeout = 18888) => {
this.setState({sleep: false, tipsModal: false, goTipsModal: false});
clearTimeout(this.wakeUpTimeout);
this.wakeUpTimeout = setTimeout(() => {
this.setState({sleep: true, tipsModal: false, goTipsModal: false});
}, 18888);
}, timeout);
};
goTips = async () => {
......
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