Commit cd18f75f by zeven

微信刷脸验证身份返回错误自动重新识别

parent 66cdfdbf
{
"name": "zm-face-counter",
"version": "1.0.8",
"version": "1.0.9",
"private": true,
"scripts": {
"android": "react-native run-android",
......
......@@ -285,12 +285,18 @@ class FacePage extends Component {
ask_unionid: 1,
};
let res = (await WxFacepay.faceinfo(params)) || {};
if (!res.openid) {
// 返回错误自动重新识别
res = (await WxFacepay.faceinfo(params)) || {};
}
if (window.socket) {
// 返回结果,立即重新连接socket
window.socket.connect();
} // 返回结果,立即重新连接socket
}
if (!res.openid) {
// 没识别到人脸不开门
return;
} // 没识别到人脸不开门
}
if (res.sub_openid) {
res.openid = res.sub_openid;
}
......
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