Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
middleLayer_for_debug
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
template admin
middleLayer_for_debug
Commits
19e7ac6e
Commit
19e7ac6e
authored
Dec 03, 2021
by
liujiangnan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 添加其他原生方法
parent
1ef49150
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
40 additions
and
3 deletions
+40
-3
air.js
assets/middleLayer_for_debug/script/air.js
+40
-3
No files found.
assets/middleLayer_for_debug/script/air.js
View file @
19e7ac6e
...
@@ -19,6 +19,9 @@ export function initAir(_this) {
...
@@ -19,6 +19,9 @@ export function initAir(_this) {
_this
.
log
(
`***成功调用osmoFingerReadCallback***参数==
${
res
}
`
);
_this
.
log
(
`***成功调用osmoFingerReadCallback***参数==
${
res
}
`
);
},
},
getEngineInfoCallback
:
null
,
getEngineInfoCallback
:
null
,
recognitionCameraCallBack
:
null
,
testCallBack
:
null
,
recordCallBack
:
null
,
onCourseInScreen
:
null
,
onCourseInScreen
:
null
,
}
}
window
.
courseware
=
{
window
.
courseware
=
{
...
@@ -64,21 +67,55 @@ export function initAir(_this) {
...
@@ -64,21 +67,55 @@ export function initAir(_this) {
},
},
startRecord
(
testText
)
{
startRecord
(
testText
)
{
_this
.
log
(
`===成功调用startRecord=== testText ==
${
testText
}
`
);
_this
.
log
(
`===成功调用startRecord=== testText ==
${
testText
}
`
);
this
.
callOcMethod
(
"
startRecord
"
,
{
"
params
"
:
testText
});
},
},
stopRecord
(
_isgradepapers
,
_callback
)
{
stopRecord
(
_isgradepapers
,
_callback
)
{
_this
.
log
(
`===成功调用stopRecord=== _isgradepapers ==
${
_isgradepapers
}
`
);
_this
.
log
(
`===成功调用stopRecord=== _isgradepapers ==
${
_isgradepapers
}
`
);
_callback
&&
_callback
(
null
);
let
callback
=
_callback
;
let
isgradepapers
;
if
(
_isgradepapers
&&
typeof
_isgradepapers
===
"
function
"
)
{
callback
=
_isgradepapers
;
isgradepapers
=
1
;
}
else
{
isgradepapers
=
_isgradepapers
;
}
if
(
!
callback
){
// 不传回调函数就表示取消评测
this
.
callOcMethod
(
"
stopRecord
"
,
{
isBreak
:
1
});
return
;
}
// 结束录音
window
.
air
.
recordCallBack
=
(
res
)
=>
{
callback
&&
callback
(
res
);
window
.
air
.
recordCallBack
=
null
;
};
this
.
callOcMethod
(
"
stopRecord
"
,
{
isBreak
:
0
,
isGradePapers
:
isgradepapers
});
},
},
startTest
(
testText
)
{
startTest
(
testText
)
{
_this
.
log
(
`===成功调用startTest=== testText ==
${
testText
}
`
);
_this
.
log
(
`===成功调用startTest=== testText ==
${
testText
}
`
);
this
.
callOcMethod
(
"
startTest
"
,
{
"
params
"
:
testText
});
},
},
stopTest
(
callback
)
{
stopTest
(
callback
)
{
_this
.
log
(
`===成功调用stopTest===`
);
_this
.
log
(
`===成功调用stopTest===`
);
callback
&&
callback
(
null
);
if
(
!
callback
){
// 不传回调函数就表示取消评测
this
.
callOcMethod
(
"
stopTest
"
,
{
isBreak
:
1
});
return
;
}
// 结束录音
window
.
air
.
testCallBack
=
(
res
)
=>
{
callback
&&
callback
(
res
);
window
.
air
.
testCallBack
=
null
;
};
this
.
callOcMethod
(
"
stopTest
"
,
{});
},
},
openRecognitionCamera
(
callback
)
{
openRecognitionCamera
(
callback
)
{
_this
.
log
(
`===成功调用openRecognitionCamera===`
);
_this
.
log
(
`===成功调用openRecognitionCamera===`
);
callback
&&
callback
(
null
);
window
.
air
.
recognitionCameraCallBack
=
(
res
)
=>
{
callback
&&
callback
(
res
);
window
.
air
.
recognitionCameraCallBack
=
null
;
};
this
.
callOcMethod
(
"
openRecognitionCamera
"
,
{});
},
},
getEngineInfo
(
callback
)
{
getEngineInfo
(
callback
)
{
_this
.
log
(
`===成功调用getEngineInfo===`
);
_this
.
log
(
`===成功调用getEngineInfo===`
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment