Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
study
Project
Project
Details
Activity
Releases
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
Damon
study
Commits
fe863da3
Commit
fe863da3
authored
Aug 20, 2021
by
Damon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
refactor: 【ID1001496】【前台】模拟考时,点击右上角关闭小程序后,倒计时需要锁定。
parent
801f198c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
answer.vue
src/pages/learn/answer.vue
+6
-6
No files found.
src/pages/learn/answer.vue
View file @
fe863da3
...
@@ -225,15 +225,15 @@ export default {
...
@@ -225,15 +225,15 @@ export default {
},
},
onShow
()
{
onShow
()
{
// 从后台进入重新计算倒计时
// 从后台进入重新计算倒计时
if
(
this
.
source
===
3
&&
this
.
beginTime
)
{
//
if (this.source === 3 && this.beginTime) {
const
timestamp
=
Utils
.
diffTime
(
this
.
beginTime
,
new
Date
())
//
const timestamp = Utils.diffTime(this.beginTime, new Date())
this
.
timestamp
=
this
.
currentTime
-
timestamp
//
this.timestamp = this.currentTime - timestamp
this
.
$u
.
vuex
(
'beginTime'
,
''
)
//
this.$u.vuex('beginTime', '')
}
//
}
},
},
onHide
()
{
onHide
()
{
// 记录进入后台时间
// 记录进入后台时间
if
(
this
.
source
===
3
)
this
.
$u
.
vuex
(
'beginTime'
,
new
Date
())
//
if (this.source === 3) this.$u.vuex('beginTime', new Date())
},
},
onLoad
(
e
)
{
onLoad
(
e
)
{
if
(
e
?.
experience
)
this
.
experience
=
JSON
.
parse
(
e
.
experience
)
// 体验资格
if
(
e
?.
experience
)
this
.
experience
=
JSON
.
parse
(
e
.
experience
)
// 体验资格
...
...
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