Commit cd18f75f by zeven

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

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