Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cc_mz_write_02
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
cc_mz_write_02
Commits
49d24721
Commit
49d24721
authored
Oct 24, 2022
by
limingzhe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: debug
parent
5105f7e6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
56 additions
and
9 deletions
+56
-9
cc_mz_write_02.js
assets/cc_mz_write_02/scene/cc_mz_write_02.js
+56
-9
No files found.
assets/cc_mz_write_02/scene/cc_mz_write_02.js
View file @
49d24721
...
...
@@ -156,14 +156,15 @@ cc.Class({
if
(
window
.
air
)
{
window
.
air
.
osmoHandwritingMlkitCallback
=
(
data
)
=>
{
window
.
air
.
osmoHandwritingCallback
=
(
data
)
=>
{
if
(
!
data
)
{
console
.
log
(
'
data is not exist!!!
'
);
return
;
}
console
.
log
(
'
osmoHandwriting
Mlkit
Callback data:
'
,
data
);
console
.
log
(
'
osmoHandwritingCallback data:
'
,
data
);
if
(
typeof
(
data
)
==
'
string
'
)
{
console
.
log
(
'
data is string
'
);
...
...
@@ -177,6 +178,28 @@ cc.Class({
this
.
photoEnd
(
data
);
}
// window.air.osmoHandwritingMlkitCallback = (data) => {
// if (!data) {
// console.log('data is not exist!!!');
// return;
// }
// console.log('osmoHandwritingMlkitCallback data: ', data);
// if (typeof (data) == 'string') {
// console.log('data is string ');
// const dataObj = JSON.parse(data);
// this.photoEnd(dataObj);
// return;
// }
// // 哲学逻辑
// this.photoEnd(data);
// }
}
},
...
...
@@ -495,12 +518,29 @@ cc.Class({
const
cw
=
window
.
courseware
;
if
(
!
cw
||
!
cw
.
openOsmoHandwriting
Mlkit
)
{
if
(
!
cw
||
!
cw
.
openOsmoHandwriting
)
{
console
.
log
(
'
cw.openOsmoHandwriting
Mlkit
not exist
'
);
console
.
log
(
'
cw.openOsmoHandwriting not exist
'
);
return
;
}
cw
.
openOsmoHandwritingMlkit
(
0.3
);
const
para
=
{
"
library_id
"
:
"
iplayabc
"
,
'
page_id
'
:
5
,
'
book_id
'
:
'
opw1
'
,
'
part_name
'
:
'
c
'
,
'
is_hand_writing
'
:
true
,
'
is_line_link
'
:
false
,
'
ques_region
'
:
[
0
,
0.077
,
1
,
0.077
,
1
,
0.331
,
0
,
0.331
,
]
}
cw
.
openOsmoHandwriting
(
para
);
// setInterval(() => {
...
...
@@ -514,14 +554,21 @@ cc.Class({
//结束检测
endTesting
()
{
const
cw
=
window
.
courseware
;
if
(
!
cw
||
!
cw
.
closeOsmoHandwriting
Mlkit
)
{
if
(
!
cw
||
!
cw
.
closeOsmoHandwriting
)
{
return
;
}
cw
.
closeOsmoHandwritingMlkit
();
// this.isTesting = false;
cw
.
closeOsmoHandwriting
();
// const cw = window.courseware;
// if (!cw || !cw.closeOsmoHandwritingMlkit) {
// return;
// }
// cw.closeOsmoHandwritingMlkit();
// // this.isTesting = false;
},
photoEnd
(
data
)
{
...
...
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