Commit 88506646 by 修福龙

把轮询支付分状态改至后端查询

parent 284eddc7
......@@ -427,29 +427,25 @@ class FacePage extends Component {
// 刷脸开通支付分
openPayScore = async action => {
let openPayScore = false;
const {orderId, code} = await this.getPayScoreStatus();
if (orderId && code) {
for (let i = 0; i < 10; i++) {
// 查询用户支付分状态与服务授权状态
await delay(1000);
const {data} = await this.props.dispatch({
type: 'goods/payscoreCheck',
userId: this.userId,
orderId,
code,
});
if (data.code === 1 && data.data.payscoreState) {
openPayScore = true;
if (data.code === 1) {
await this.wxdoor();
break;
}
}
} else {
const tipText = '请扫码开通支付分';
Speech.speak(tipText);
this.setQrcode({action, tip: tipText, qrcode: true}); // 扫码开通支付分
}
if (!openPayScore) {
} else {
const tipText = '请扫码开通支付分';
Speech.speak(tipText);
this.setQrcode({action: action, tip: tipText, qrcode: true}); // 扫码开通支付分
this.setQrcode({action, tip: tipText, qrcode: true}); // 扫码开通支付分
}
};
......
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