Commit 1ae86a1c by zeven

付款成功离店弹窗显示10秒

parent 4be1d473
{
"name": "zm-face-counter",
"version": "1.3.20",
"version": "1.3.21",
"private": true,
"scripts": {
"android": "react-native run-android",
......@@ -8,8 +8,8 @@
"test": "jest",
"lint": "eslint --ext .js index.js src",
"apk": "cd android && ./gradlew app:assembleRelease && cp ./app/build/outputs/apk/release/app-release.apk ../fcounter.apk",
"android-staging": "code-push release-react ZmFaceCounter-android android -t '1.0.0' --des '1.3.19'",
"android-product": "code-push promote ZmFaceCounter-android Staging Production --des '1.3.19'",
"android-staging": "code-push release-react ZmFaceCounter-android android -t '1.0.0' --des '1.3.20'",
"android-product": "code-push promote ZmFaceCounter-android Staging Production --des '1.3.20'",
"android-history": "code-push deployment history ZmFaceCounter-android Production",
"android-rollback": "code-push rollback ZmFaceCounter-android Production"
},
......
......@@ -482,6 +482,16 @@ const CounterMixins = ComposeComponent => {
this.setState({printer: []});
};
showLeaveModal = () => {
if (this.state.stype === 'guard') {
this.setState({cloudFinishModal: true});
clearTimeout(this.leaveModalTimeout);
this.leaveModalTimeout = setTimeout(() => {
this.setState({cloudFinishModal: false});
}, 10000);
}
};
// 付款成功,若达到领取红包的金额则弹出领取红包的弹窗
onLucky = async () => {
// 支付成功,用户完成付款
......@@ -490,7 +500,6 @@ const CounterMixins = ComposeComponent => {
type: 'lucky/getLucky',
orderId: this.orderId,
});
const {stype} = this.state;
if (codeLucky === 1) {
this.setState({
luckyVisible: true,
......@@ -500,18 +509,10 @@ const CounterMixins = ComposeComponent => {
this.setState({
luckyVisible: false,
});
if (stype === 'guard') {
this.setState({
cloudFinishModal: true,
});
}
this.showLeaveModal();
}, 10000);
} else {
if (stype === 'guard') {
this.setState({
cloudFinishModal: true,
});
}
this.showLeaveModal();
}
};
......
......@@ -580,7 +580,7 @@ class VerticalPage extends Component {
clearTimeout(this.nobuyTimeout);
this.nobuyTimeout = setTimeout(() => {
this.setState({nobuyModal: false});
}, 30000);
}, 10000);
};
render() {
......
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