Commit dcd0b7bb authored by liujiangnan's avatar liujiangnan

feat: 360算法,去掉检测超时逻辑

parent 56ade00c
......@@ -170,34 +170,16 @@ export default class SceneComponent extends MyCocosSceneComponent {
const h = p.y > rect.y && p.y < (rect.y + rect.height);
return w && h;
};
// const pageId = this.data.pageArr[this.currentPageIdx].pageIdx;
return new Promise<void>((resolve, reject) => {
let testCount = 0;
window["air"].osmoFingerReadCallback = (result) => {
const p = JSON.parse(result);
console.log("===liu39400====", result);
if (p.x == -1 || p.y == -1) {
testCount ++;
if (testCount >= 5) {
// 检测一直没成功,直接放行
this.showTips(`检测超时2`);
window["courseware"].closeOsmoFingerRead();
resolve();
}
return;
}
if (checkInRegion(p)) {
// 检测成功
window["courseware"].closeOsmoFingerRead();
resolve();
} else {
testCount ++;
if (testCount >= 5) {
// 检测一直没成功,直接放行
this.showTips(`检测超时3`);
window["courseware"].closeOsmoFingerRead();
resolve();
}
}
};
window["courseware"].openOsmoFingerRead({
......
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