Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
middleLayer_for_kyxq
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_kyxq
Commits
8fed7b7c
Commit
8fed7b7c
authored
Sep 26, 2023
by
liujiangnan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat
parent
ac2287ff
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
0 deletions
+30
-0
air.js
assets/middleLayer_for_kyxq/script/air.js
+30
-0
No files found.
assets/middleLayer_for_kyxq/script/air.js
View file @
8fed7b7c
...
@@ -46,6 +46,7 @@ export function initAir(_this) {
...
@@ -46,6 +46,7 @@ export function initAir(_this) {
fileSaveCallback
:
null
,
fileSaveCallback
:
null
,
recognitionCameraCallBack
:
null
,
recognitionCameraCallBack
:
null
,
testCallBack
:
null
,
testCallBack
:
null
,
recordScreenCallBack
:
null
,
testConvertCallBack
:
null
,
testConvertCallBack
:
null
,
recordCallBack
:
null
,
recordCallBack
:
null
,
onCourseInScreen
:
null
,
onCourseInScreen
:
null
,
...
@@ -224,6 +225,30 @@ export function initAir(_this) {
...
@@ -224,6 +225,30 @@ export function initAir(_this) {
window
.
courseware
.
callOcMethod
(
"
stopTestConvert
"
,
{});
window
.
courseware
.
callOcMethod
(
"
stopTestConvert
"
,
{});
},
},
startRecordScreen
(
option
)
{
window
.
courseware
.
hasCalledStartRecordScreen
=
true
;
_this
.
log
(
`===成功调用startRecordScreen===`
);
window
.
courseware
.
callOcMethod
(
"
startRecordScreen
"
,
option
);
},
stopRecordScreen
(
callback
)
{
window
.
courseware
.
hasCalledStartRecordScreen
=
false
;
_this
.
log
(
`===成功调用stopRecordScreen===`
);
if
(
!
callback
)
{
// 不传回调函数就表示取消评测
_this
.
log
(
`===成功取消录屏评测===`
);
window
.
courseware
.
callOcMethod
(
"
stopRecordScreen
"
,
{
isBreak
:
1
});
return
;
}
// 结束录屏
window
.
air
.
recordScreenCallBack
=
(
res
)
=>
{
res
=
typeof
(
res
)
==
'
string
'
?
res
:
JSON
.
stringify
(
res
);
_this
.
log
(
`===成功调用recordScreenCallBack=== res ==
${
res
}
`
);
callback
&&
callback
(
res
);
window
.
air
.
recordScreenCallBack
=
null
;
};
window
.
courseware
.
callOcMethod
(
"
stopRecordScreen
"
,
{});
},
startRealtimeRecord
(
params
=
{})
{
startRealtimeRecord
(
params
=
{})
{
window
.
courseware
.
hasCalledRealtimeRecord
=
true
;
window
.
courseware
.
hasCalledRealtimeRecord
=
true
;
_this
.
log
(
`===成功调用startRealtimeRecord===
${
JSON
.
stringify
(
params
)}
`
);
_this
.
log
(
`===成功调用startRealtimeRecord===
${
JSON
.
stringify
(
params
)}
`
);
...
@@ -444,6 +469,8 @@ export function initAir(_this) {
...
@@ -444,6 +469,8 @@ export function initAir(_this) {
window
.
air
.
recordCallBack
(
recordMockData
);
window
.
air
.
recordCallBack
(
recordMockData
);
}
else
if
(
method
==
'
startBuyToAppStore
'
)
{
}
else
if
(
method
==
'
startBuyToAppStore
'
)
{
window
.
air
.
startBuyToAppStoreCallBack
({
productid
:
1
,
puid
:
22
,
receiptData
:
"
HelloWorld
"
,
error
:
""
});
window
.
air
.
startBuyToAppStoreCallBack
({
productid
:
1
,
puid
:
22
,
receiptData
:
"
HelloWorld
"
,
error
:
""
});
}
else
if
(
method
==
'
stopRecordScreen
'
)
{
window
.
air
.
recordScreenCallBack
({
"
url
"
:
"
abcedfgh
"
,
"
error
"
:
""
});
}
else
{
}
else
{
console
.
error
(
`
${
method
}
方法还没有Mock数据,请联系技术支持人员添加`
);
console
.
error
(
`
${
method
}
方法还没有Mock数据,请联系技术支持人员添加`
);
}
}
...
@@ -459,6 +486,9 @@ export function initAir(_this) {
...
@@ -459,6 +486,9 @@ export function initAir(_this) {
if
(
window
.
courseware
.
hasCalledStartTestConvert
)
{
if
(
window
.
courseware
.
hasCalledStartTestConvert
)
{
window
.
courseware
.
stopTestConvert
();
window
.
courseware
.
stopTestConvert
();
}
}
if
(
window
.
courseware
.
hasCalledStartRecordScreen
)
{
window
.
courseware
.
stopRecordScreen
();
}
if
(
window
.
courseware
.
hasCalledRealtimeRecord
)
{
if
(
window
.
courseware
.
hasCalledRealtimeRecord
)
{
window
.
courseware
.
stopRealtimeRecord
();
window
.
courseware
.
stopRealtimeRecord
();
}
}
...
...
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