Commit 454d4ee2 by zeven

优化刷脸速度

parent 7b065fd0
{ {
"name": "zm-face-counter", "name": "zm-face-counter",
"version": "1.3.17", "version": "1.3.18",
"private": true, "private": true,
"scripts": { "scripts": {
"android": "react-native run-android", "android": "react-native run-android",
...@@ -8,8 +8,8 @@ ...@@ -8,8 +8,8 @@
"test": "jest", "test": "jest",
"lint": "eslint --ext .js index.js src", "lint": "eslint --ext .js index.js src",
"apk": "cd android && ./gradlew app:assembleRelease && cp ./app/build/outputs/apk/release/app-release.apk ../fcounter.apk", "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.17'", "android-staging": "code-push release-react ZmFaceCounter-android android -t '1.0.0' --des '1.3.18'",
"android-product": "code-push promote ZmFaceCounter-android Staging Production --des '1.3.17'", "android-product": "code-push promote ZmFaceCounter-android Staging Production --des '1.3.18'",
"android-history": "code-push deployment history ZmFaceCounter-android Production", "android-history": "code-push deployment history ZmFaceCounter-android Production",
"android-rollback": "code-push rollback ZmFaceCounter-android Production" "android-rollback": "code-push rollback ZmFaceCounter-android Production"
}, },
......
...@@ -472,7 +472,7 @@ class FacePage extends Component { ...@@ -472,7 +472,7 @@ class FacePage extends Component {
// 出现订单弹窗,不做人脸识别 // 出现订单弹窗,不做人脸识别
return; return;
} }
const tipText = '正在人脸识别,请看向屏幕,靠中间站稳'; const tipText = '正在人脸识别';
Speech.speak(tipText); Speech.speak(tipText);
// this.setState({tip: tipText, tipsModal: true}); // this.setState({tip: tipText, tipsModal: true});
let auth = this.rawinfo; let auth = this.rawinfo;
...@@ -521,9 +521,7 @@ class FacePage extends Component { ...@@ -521,9 +521,7 @@ class FacePage extends Component {
// 出现订单弹窗,不做人脸识别 // 出现订单弹窗,不做人脸识别
return; return;
} }
let tipText = !this.payscoreEnable let tipText = '正在人脸识别';
? '正在人脸识别,请看向屏幕,靠中间站稳'
: '正在开通支付分,请看向屏幕';
if (!WxFacepay.getUserPayScoreStatus) { if (!WxFacepay.getUserPayScoreStatus) {
tipText = '请扫码确认'; tipText = '请扫码确认';
if (this.sense) tipText = '请扫码开通支付分进店'; if (this.sense) tipText = '请扫码开通支付分进店';
...@@ -630,7 +628,7 @@ class FacePage extends Component { ...@@ -630,7 +628,7 @@ class FacePage extends Component {
if (orderDetailsModal || tipsModal) { if (orderDetailsModal || tipsModal) {
return; return;
} // 出现订单弹窗,不做人脸识别 } // 出现订单弹窗,不做人脸识别
const tipText = '正在人脸识别,请看向屏幕,靠中间站稳'; const tipText = '正在人脸识别';
Speech.speak(tipText); Speech.speak(tipText);
await this.alipayinfo(); await this.alipayinfo();
if (!this.alipayInfo || !this.alipayInfo.metaInfo) return; if (!this.alipayInfo || !this.alipayInfo.metaInfo) return;
......
import {NativeModules} from 'react-native'; import {NativeModules} from 'react-native';
export default NativeModules.Speech; const speak = async text => {
return await NativeModules.Speech.speak(text);
};
export default {speak};
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