Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
middleLayer_for_DG
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_DG
Commits
5d82f3a5
Commit
5d82f3a5
authored
Dec 18, 2024
by
kai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 收集听音数据
parent
46eb1ba8
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
5 deletions
+8
-5
middleLayer.ts
assets/middleLayer_for_DG/script/middleLayer.ts
+8
-5
No files found.
assets/middleLayer_for_DG/script/middleLayer.ts
View file @
5d82f3a5
...
...
@@ -91,15 +91,16 @@ export default class NewClass extends middleLayerBase {
exitGame
(
data
=
null
)
{
console
.
log
(
'
=========exitGame=========
'
);
let
totalCount
=
0
;
const
tpl
=
cc
.
find
(
'
Canvas
'
)?.
getComponent
(
this
.
courseItem
.
template_name
);
console
.
log
(
JSON
.
stringify
(
tpl
[
'
data
'
]));
console
.
log
(
'
this.courseItem:
'
,
JSON
.
stringify
(
this
.
courseItem
));
if
(
!
data
)
{
if
(
tpl
)
{
if
(
!
data
&&
tpl
)
{
data
=
tpl
[
'
data
'
];
totalCount
=
tpl
[
'
totalCount
'
];
console
.
log
(
'
tpl-data:
'
,
JSON
.
stringify
(
data
));
}
console
.
log
(
'
tpl-totalCount:
'
,
totalCount
);
}
cc
.
game
.
removePersistRootNode
(
this
.
node
);
...
...
@@ -113,6 +114,7 @@ export default class NewClass extends middleLayerBase {
template_name
:
this
.
courseItem
.
template_name
,
study_duration
:
Date
.
now
()
-
this
.
courseOpenTimeStamp
,
result
:
JSON
.
stringify
(
data
),
totalCount
}));
this
.
callNetworkApiPost
(
`api/dige/v1/user/report`
,
{
token
:
this
.
token
,
...
...
@@ -121,6 +123,7 @@ export default class NewClass extends middleLayerBase {
template_name
:
this
.
courseItem
.
template_name
,
study_duration
:
Date
.
now
()
-
this
.
courseOpenTimeStamp
,
result
:
JSON
.
stringify
(
data
),
totalCount
},
(
res
)
=>
{
console
.
log
(
'
-----------------
'
);
console
.
log
(
JSON
.
stringify
(
res
));
...
...
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