Commit 1ae86a1c by zeven

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

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