Commit 88506646 by 修福龙

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

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