Commit aaeb3d81 authored by limingzhe's avatar limingzhe
parents bcfbf337 53eaf884
...@@ -157,6 +157,7 @@ export function initAir(_this) { ...@@ -157,6 +157,7 @@ export function initAir(_this) {
}; };
window.courseware.callOcMethod("stopTest", {}); window.courseware.callOcMethod("stopTest", {});
}, },
// 拍照
takePicture(callback) { takePicture(callback) {
_this.log(`===成功调用takePicture===`); _this.log(`===成功调用takePicture===`);
window.air.takePictureCallBack = (res) => { window.air.takePictureCallBack = (res) => {
...@@ -165,6 +166,7 @@ export function initAir(_this) { ...@@ -165,6 +166,7 @@ export function initAir(_this) {
}; };
window.courseware.callOcMethod("takePicture", {}); window.courseware.callOcMethod("takePicture", {});
}, },
openRecognitionCamera(params = {}, callback) { openRecognitionCamera(params = {}, callback) {
window.courseware.hasCalledOpenRecognitionCamera = true; window.courseware.hasCalledOpenRecognitionCamera = true;
_this.log(`===成功调用openRecognitionCamera===${JSON.stringify(params)}`); _this.log(`===成功调用openRecognitionCamera===${JSON.stringify(params)}`);
...@@ -194,6 +196,10 @@ export function initAir(_this) { ...@@ -194,6 +196,10 @@ export function initAir(_this) {
}; };
window.courseware.callOcMethod("getEngineInfo", {}); window.courseware.callOcMethod("getEngineInfo", {});
}, },
exitApp() {
_this.log(`===成功调用exitApp===`);
window.courseware.callOcMethod("exitApp", {});
},
changeHost() { changeHost() {
_this.log(`===成功调用changeHost===`); _this.log(`===成功调用changeHost===`);
// 调用原生获取机器信息 // 调用原生获取机器信息
......
...@@ -579,6 +579,10 @@ export default class NewClass extends middleLayerBase { ...@@ -579,6 +579,10 @@ export default class NewClass extends middleLayerBase {
cc.find('middleLayer/ExitBtn').active = false; cc.find('middleLayer/ExitBtn').active = false;
if (this.type == "aixuebao") { if (this.type == "aixuebao") {
await this.asyncCallNetworkApiGet(`/api/aixuebao/v1/engine/active`, {
engineid: this.engine_uuid,
product: 'oxford'
});
// 机器码授权免登陆 (爱学宝) // 机器码授权免登陆 (爱学宝)
const {token} = await this.asyncCallNetworkApiPost(`/api/oxfordlite/v1/engine/login`, { const {token} = await this.asyncCallNetworkApiPost(`/api/oxfordlite/v1/engine/login`, {
engine_uuid: this.engine_uuid engine_uuid: this.engine_uuid
......
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