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
4c649a43
Commit
4c649a43
authored
Nov 17, 2023
by
李维
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改最后一课跳转关系,先弹出提示,再提示全部完成
parent
cb1d4966
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
5 deletions
+10
-5
middleLayer.ts
assets/middleLayer_for_kyxq/script/middleLayer.ts
+10
-5
No files found.
assets/middleLayer_for_kyxq/script/middleLayer.ts
View file @
4c649a43
...
@@ -270,16 +270,14 @@ export default class MiddleLayerClass extends middleLayerBase {
...
@@ -270,16 +270,14 @@ export default class MiddleLayerClass extends middleLayerBase {
});
});
}
else
{
}
else
{
const
lastCurse
=
this
.
crossArray
[
this
.
crossArray
.
length
-
1
];
const
lastCurse
=
this
.
crossArray
[
this
.
crossArray
.
length
-
1
];
// 课件完成的庆祝画面
this
.
showFinish
();
if
(
this
.
courseItem
.
course_id
!=
lastCurse
.
id
)
{
if
(
this
.
courseItem
.
course_id
!=
lastCurse
.
id
)
{
// 课件完成的庆祝画面
this
.
showFinish
();
// 上报解锁下一关
// 上报解锁下一关
const
currentIndex
=
this
.
crossArray
.
findIndex
(
item
=>
item
.
id
==
this
.
courseItem
.
course_id
);
const
currentIndex
=
this
.
crossArray
.
findIndex
(
item
=>
item
.
id
==
this
.
courseItem
.
course_id
);
const
nextCourse
=
this
.
crossArray
[
currentIndex
+
1
];
const
nextCourse
=
this
.
crossArray
[
currentIndex
+
1
];
this
.
unlockNext
(
nextCourse
.
id
);
this
.
unlockNext
(
nextCourse
.
id
);
}
else
{
}
else
{
// 所有课件都完成的庆祝动画
this
.
showAllFinish
();
// 上报一个本节课完成
// 上报一个本节课完成
this
.
callNetworkApiPost
(
`/api/kyxq/v1/user/saveend`
,
{
this
.
callNetworkApiPost
(
`/api/kyxq/v1/user/saveend`
,
{
syllabus_id
:
lastCurse
.
pid
,
syllabus_id
:
lastCurse
.
pid
,
...
@@ -352,7 +350,14 @@ export default class MiddleLayerClass extends middleLayerBase {
...
@@ -352,7 +350,14 @@ export default class MiddleLayerClass extends middleLayerBase {
nextBtn
.
on
(
"
touchstart
"
,
()
=>
{
nextBtn
.
on
(
"
touchstart
"
,
()
=>
{
hideFinish
();
hideFinish
();
this
.
goNextCross
();
const
lastCurse
=
this
.
crossArray
[
this
.
crossArray
.
length
-
1
];
if
(
this
.
courseItem
.
course_id
!=
lastCurse
.
id
)
{
// 如果当前课件不是最后一关 - 自动跳转到最后一关
this
.
goNextCross
();
}
else
{
// 如果当前课件是最后一关 - 播放全部完成动画
this
.
showAllFinish
();
}
})
})
}
}
...
...
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