Commit e991a11f authored by liujiangnan's avatar liujiangnan

feat:

parent 1d54eaed
......@@ -137,11 +137,12 @@ export default class SceneComponent extends MyCocosSceneComponent {
checkSuccess = true;
window["courseware"].closeOsmoFingerRead();
resolve();
} else if (resultObj.error) {
this.showTips(resultObj.error);
}
};
window["courseware"].openOsmoFingerRead({
"page_id": pageId,
"book_id": "opw1"
"page": true,
})
});
return Promise.race([check, timeout]);
......@@ -169,12 +170,11 @@ 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;
// const pageId = this.data.pageArr[this.currentPageIdx].pageIdx;
return new Promise<void>((resolve, reject) => {
let testCount = 0;
window["air"].osmoFingerReadCallback = (result) => {
const resultObj = JSON.parse(result);
const p = resultObj.finger_pos_in_page;
const p = JSON.parse(result);
if (p.x == -1 || p.y == -1) {
testCount ++;
if (testCount >= 5) {
......@@ -200,8 +200,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
}
};
window["courseware"].openOsmoFingerRead({
"page_id": pageId,
"book_id": "opw1"
"page": false,
})
});
}
......
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