Commit 40d50d43 by 黄日华

修复刷脸支付和扫码支付后开门离店提示时间

parent 079755f7
......@@ -382,6 +382,7 @@ const CounterMixins = ComposeComponent => {
orderId, // 订单号,
});
if (order.code === 1 && order.data === 1) {
this.setState({voiceModal: false});
this.successPay();
clearInterval(this.payInter); // 清除定时查询订单
this.isPaid = true; // 支付成功,暂停检测秤的重量
......@@ -462,7 +463,7 @@ const CounterMixins = ComposeComponent => {
return '门店设置已解锁';
};
successPay = async balance => {
successPay = async facepay => {
Toast.hide();
const {goodsArr} = this.state;
// let total = 0;
......@@ -482,7 +483,9 @@ const CounterMixins = ComposeComponent => {
step: 3,
});
// this.setState({voiceModal: true, voiceTitle: msg});
if (!facepay) {
Speech.speak('付款成功');
}
if (this.state.stype === 'guard') {
this.showLeaveModal();
} else {
......@@ -904,7 +907,13 @@ const CounterMixins = ComposeComponent => {
Speech.speak(voiceTitle);
this.setState({voiceTitle});
} else {
if (facepay) {
setTimeout(() => {
this.successPay(facepay);
}, 2000);
} else {
this.successPay();
}
successPay = true;
await wait(3000);
// await wait(res.data.timeout);
......@@ -921,6 +930,7 @@ const CounterMixins = ComposeComponent => {
orderId: res.data.orderId, // 订单号,
});
if (status.code === 1 && status.data === 1) {
console.warn('刷脸支付');
this.successPay();
successPay = true;
await wait(3000);
......@@ -957,7 +967,11 @@ const CounterMixins = ComposeComponent => {
if (data.code === 1) {
// 付款成功
this.orderId = data.data.orderId;
if (openid) {
this.successPay(true);
} else {
this.successPay();
}
await AutoClick.clickBackKey();
await wait(3000);
await this.setState({voiceModal: false});
......
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