Commit 3676e06a by zeven

优化刷脸速度

parent ad605e78
android @ 5f31a7fb
Subproject commit 6fc469027cd79cc658acbe06d1a70214859ea480
Subproject commit 5f31a7fbeaf021a75cb2a2bba458032c8ebc5f5d
{
"name": "zm-face-counter",
"version": "1.3.12",
"version": "1.3.15",
"private": true,
"scripts": {
"android": "react-native run-android",
......@@ -8,8 +8,8 @@
"test": "jest",
"lint": "eslint --ext .js index.js src",
"apk": "cd android && ./gradlew app:assembleRelease && cp ./app/build/outputs/apk/release/app-release.apk ../fcounter.apk",
"android-staging": "code-push release-react ZmFaceCounter-android android -t '1.0.0' --des '1.3.12'",
"android-product": "code-push promote ZmFaceCounter-android Staging Production --des '1.3.12'",
"android-staging": "code-push release-react ZmFaceCounter-android android -t '1.0.0' --des '1.3.15'",
"android-product": "code-push promote ZmFaceCounter-android Staging Production --des '1.3.15'",
"android-history": "code-push deployment history ZmFaceCounter-android Production",
"android-rollback": "code-push rollback ZmFaceCounter-android Production"
},
......
......@@ -70,6 +70,15 @@ class FacePage extends Component {
// 微信刷脸失败,启动支付宝刷脸
this.init = true;
this.setState({faceType: 'alipay'});
} else {
const getAuth = async () => {
const auth = await this.authinfo();
if (!this.rawinfo) this.rawinfo = {};
if (auth) this.rawinfo = auth;
};
getAuth();
clearInterval(this.rawinfoInterval);
this.rawinfoInterval = setInterval(getAuth, 30 * 60 * 60 * 1000);
}
}
const setting = await AutoClick.isSettingsOn();
......@@ -465,7 +474,7 @@ class FacePage extends Component {
const tipText = '正在人脸识别,请看向屏幕,靠中间站稳';
Speech.speak(tipText);
// this.setState({tip: tipText, tipsModal: true});
let auth = (await this.authinfo()) || {};
let auth = this.rawinfo;
if (
auth.return_code === 'SUCCESS' ||
(auth.code === 1 && auth.data.bizCode === '0000')
......@@ -740,7 +749,7 @@ class FacePage extends Component {
};
wxFacepay = async () => {
const {data} = (await this.authinfo()) || {};
const {data} = this.rawinfo;
const auth = data;
let params = null;
if (auth.bizCode === '0000') {
......
......@@ -67,6 +67,15 @@ class VerticalPage extends Component {
// 微信刷脸失败,启动支付宝刷脸
this.init = true;
this.setState({faceType: 'alipay'});
} else {
const getAuth = async () => {
const auth = await this.authinfo();
if (!this.rawinfo) this.rawinfo = {};
if (auth) this.rawinfo = auth;
};
getAuth();
clearInterval(this.rawinfoInterval);
this.rawinfoInterval = setInterval(getAuth, 30 * 60 * 60 * 1000);
}
}
this.initSetting();
......@@ -257,7 +266,7 @@ class VerticalPage extends Component {
this.props.speak('请先扫描商品条码,再刷脸支付', true);
return;
}
const auth = (await this.authinfo()) || {};
const auth = this.rawinfo;
let params = null;
if (auth.bizCode === '0000') {
// 随行付支付
......
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