Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
middleLayer_for_iplayabc
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_iplayabc
Commits
b074272e
Commit
b074272e
authored
Mar 31, 2022
by
liujiangnan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat
parent
7369cd9a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
4 deletions
+10
-4
middleLayer.js
assets/middleLayer_for_iplayabc/script/middleLayer.js
+10
-4
No files found.
assets/middleLayer_for_iplayabc/script/middleLayer.js
View file @
b074272e
...
@@ -187,6 +187,12 @@ cc.Class({
...
@@ -187,6 +187,12 @@ cc.Class({
middleLayer
.
log
(
"
middleLayer.log('像这样在这里打log')
"
);
middleLayer
.
log
(
"
middleLayer.log('像这样在这里打log')
"
);
},
},
getHistoryLastCourse
(
callback
)
{
this
.
callNetworkApiGet
(
this
.
baseApiUrl
,
`v1/terminal/user/answers/1`
,
{
user_code
:
this
.
userCode
},
res
=>
{
callback
(
res
.
data
.
rows
[
0
]);
});
},
loadGame
()
{
loadGame
()
{
this
.
callNetworkApiGet
(
this
.
baseApiUrl
,
`v1/preference/courseware`
,
{
user_code
:
this
.
userCode
},
res
=>
{
this
.
callNetworkApiGet
(
this
.
baseApiUrl
,
`v1/preference/courseware`
,
{
user_code
:
this
.
userCode
},
res
=>
{
if
(
res
.
code
!==
200
)
{
if
(
res
.
code
!==
200
)
{
...
@@ -196,8 +202,10 @@ cc.Class({
...
@@ -196,8 +202,10 @@ cc.Class({
return
;
return
;
}
}
this
.
courseIds
=
res
.
data
;
this
.
courseIds
=
res
.
data
;
this
.
currentIndex
=
0
;
this
.
getHistoryLastCourse
(
item
=>
{
this
.
loadOnlineCourseWare
(
this
.
courseIds
[
0
],
false
);
this
.
currentIndex
=
item
?
this
.
courseIds
.
indexOf
(
item
.
syllabus_id
):
0
;
this
.
loadOnlineCourseWare
(
this
.
courseIds
[
this
.
currentIndex
],
false
);
});
});
});
},
},
...
@@ -234,8 +242,6 @@ cc.Class({
...
@@ -234,8 +242,6 @@ cc.Class({
})
})
},
},
preloadAll
()
{
preloadAll
()
{
if
(
window
.
preloadBundleAndSourcesFlag
)
{
if
(
window
.
preloadBundleAndSourcesFlag
)
{
// 只加载一次就行了
// 只加载一次就行了
...
...
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