Commit 6783530d authored by liujiangnan's avatar liujiangnan

fix: 加一个释放照相功能

parent 2b2c92e5
...@@ -139,6 +139,7 @@ export function initAir(_this) { ...@@ -139,6 +139,7 @@ export function initAir(_this) {
window.courseware.callOcMethod("stopTest", {}); window.courseware.callOcMethod("stopTest", {});
}, },
openRecognitionCamera(callback) { openRecognitionCamera(callback) {
window.courseware.hasCalledOpenRecognitionCamera = true;
_this.log(`===成功调用openRecognitionCamera===`); _this.log(`===成功调用openRecognitionCamera===`);
window.air.recognitionCameraCallBack = (res) => { window.air.recognitionCameraCallBack = (res) => {
callback && callback(JSON.stringify(res)); callback && callback(JSON.stringify(res));
...@@ -146,6 +147,11 @@ export function initAir(_this) { ...@@ -146,6 +147,11 @@ export function initAir(_this) {
}; };
window.courseware.callOcMethod("openRecognitionCamera", {}); window.courseware.callOcMethod("openRecognitionCamera", {});
}, },
closeRecognitionCamera() {
window.courseware.hasCalledOpenRecognitionCamera = false;
_this.log(`===成功调用closeRecognitionCamera===`);
window.courseware.callOcMethod("closeRecognitionCamera", {});
},
getEngineInfo(callback) { getEngineInfo(callback) {
_this.log(`===成功调用getEngineInfo===`); _this.log(`===成功调用getEngineInfo===`);
// 调用原生获取机器信息 // 调用原生获取机器信息
...@@ -205,6 +211,9 @@ export function initAir(_this) { ...@@ -205,6 +211,9 @@ export function initAir(_this) {
if (window.courseware.hasCalledStartTest) { if (window.courseware.hasCalledStartTest) {
window.courseware.stopTest(); window.courseware.stopTest();
} }
if (window.courseware.hasCalledOpenRecognitionCamera) {
window.courseware.closeRecognitionCamera();
}
if (window.courseware.hasCalledOpenOsmo) { if (window.courseware.hasCalledOpenOsmo) {
window.courseware.closeOsmo(); window.courseware.closeOsmo();
} }
......
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