Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
zhengyuan-danger-chemistry-manage
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
耿迪迪
zhengyuan-danger-chemistry-manage
Commits
4d27df41
Commit
4d27df41
authored
Jan 05, 2023
by
zhangjianqian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
过期判断
parent
460f791c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
4 deletions
+12
-4
TTrainCourseServiceImpl.java
...m/zehong/system/service/impl/TTrainCourseServiceImpl.java
+6
-1
index.vue
...c/views/educationPlanExam/myLessons/CheckLesson/index.vue
+6
-3
No files found.
danger-manage-system/src/main/java/com/zehong/system/service/impl/TTrainCourseServiceImpl.java
View file @
4d27df41
...
...
@@ -254,7 +254,12 @@ public class TTrainCourseServiceImpl implements ITTrainCourseService
@Override
public
TTrainUserCourse
getUserCourse
(
Long
userCourseId
){
return
tTrainUserCourseMapper
.
selectTTrainUserCourseById
(
userCourseId
);
TTrainUserCourse
userCourse
=
tTrainUserCourseMapper
.
selectTTrainUserCourseById
(
userCourseId
);
TTrainCourse
v
=
tTrainCourseMapper
.
selectTTrainCourseById
(
userCourse
.
getCourseId
());
if
(
v
.
getTestEndTime
()!=
null
&&
v
.
getTestEndTime
().
getTime
()<
new
Date
().
getTime
()){
userCourse
.
setState
(
3
);
}
return
userCourse
;
}
...
...
danger-manage-web/src/views/educationPlanExam/myLessons/CheckLesson/index.vue
View file @
4d27df41
...
...
@@ -11,7 +11,8 @@
<div
class=
"top-title"
>
<div
class=
"item allone"
>
<div
class=
"text"
>
{{
state
!=
2
?
"学习课程"
:
"查看课程"
}}
</div>
<div
class=
"gotime"
>
{{
minute
}}
:
{{
calculation
(
second
)
}}
/
{{
parseInt
(
lessonData
.
duration
/
60
)
}}
:
{{
calculation
(
lessonData
.
duration
%
60
)
}}
</div>
<div
v-if=
"userlessonData.state!=3"
class=
"gotime"
>
{{
minute
}}
:
{{
calculation
(
second
)
}}
/
{{
parseInt
(
lessonData
.
duration
/
60
)
}}
:
{{
calculation
(
lessonData
.
duration
%
60
)
}}
</div>
<div
v-if=
"userlessonData.state==3"
style=
"background: red"
class=
"gotime"
>
已过期
</div>
</div>
<div
class=
"bt flex fz14 border-bottom"
>
...
...
@@ -190,10 +191,12 @@ export default {
getUserLessonById
({
"userCourseId"
:
userCourseId
}).
then
((
res
)
=>
{
if
(
res
.
code
==
200
)
{
this
.
userlessonData
=
res
.
data
;
console
.
log
(
this
.
userlessonData
);
this
.
second
=
this
.
userlessonData
.
finishDuration
%
60
;
this
.
minute
=
parseInt
(
this
.
userlessonData
.
finishDuration
/
60
);
this
.
dingshi
=
setInterval
(
this
.
goTime
,
1000
);
if
(
this
.
userlessonData
.
state
!=
3
){
this
.
dingshi
=
setInterval
(
this
.
goTime
,
1000
);
}
}
});
...
...
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