Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
middleLayer_for_JJ_F
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_JJ_F
Commits
9a505f25
Commit
9a505f25
authored
Sep 26, 2024
by
limingzhe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: debug
parent
d7dc4adc
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
9 deletions
+24
-9
middleLayer.ts
assets/middleLayer_for_JJ_F/script/middleLayer.ts
+24
-9
No files found.
assets/middleLayer_for_JJ_F/script/middleLayer.ts
View file @
9a505f25
...
...
@@ -58,6 +58,9 @@ export default class NewClass extends middleLayerBase {
this
.
token
=
bundleInfo
.
token
;
this
.
course_id
=
bundleInfo
.
course_id
;
this
.
courseware_id
=
bundleInfo
.
courseware_id
;
if
(
bundleInfo
.
homework_id
!=
null
&&
bundleInfo
.
syllabus_id
!=
null
)
{
this
.
setCurHomeworkData
(
bundleInfo
.
homework_id
,
bundleInfo
.
syllabus_id
);
}
cc
.
sys
.
localStorage
.
setItem
(
'
student_token
'
,
bundleInfo
.
token
);
console
.
log
(
"
student_token 1:
"
,
bundleInfo
.
token
);
...
...
@@ -344,6 +347,7 @@ export default class NewClass extends middleLayerBase {
onHomeworkFinish
(
d1
=
null
,
d2
=
null
)
{
console
.
log
(
'
onHomeworkFinish
'
);
let
data
=
d1
;
let
callback
=
null
;
if
(
typeof
(
d1
)
==
'
function
'
)
{
...
...
@@ -356,16 +360,27 @@ export default class NewClass extends middleLayerBase {
return
;
}
this
.
callNetworkApiPostNew
(
`api/app_source/v1/student/homework/finished`
,
{
syllabus_id
:
this
.
curSyllabusId
,
homework_id
:
this
.
curHomeworkId
,
result
:
JSON
.
stringify
(
data
||
{}),
},
res
=>
{
if
(
!
global
.
userInfo
)
{
return
;
}
this
.
curSyllabusId
=
null
;
this
.
curHomeworkId
=
null
;
callback
&&
callback
(
res
);
});
console
.
log
(
"
global.userInfo:
"
+
global
.
userInfo
);
console
.
log
(
"
this.curHomeworkId:
"
+
this
.
curHomeworkId
);
console
.
log
(
"
this.curSyllabusId:
"
+
this
.
curSyllabusId
);
callback
&&
callback
();
// 'learning-camp/finish/$userId/$homeworkId';
// this.callNetworkApiPostNew(`learning-camp/finish/${userId}/${this.curHomeworkId}`, {
// syllabus_id: this.curSyllabusId,
// homework_id: this.curHomeworkId,
// result: JSON.stringify(data || {}),
// }, res => {
// this.curSyllabusId = null;
// this.curHomeworkId = null;
// callback && callback(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