Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Q
qk_admin
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
quanku
qk_admin
Commits
d3dfc84f
Commit
d3dfc84f
authored
Dec 27, 2023
by
yaya
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 倒计时优化
parent
20b42351
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
5 deletions
+10
-5
src/views/consign/components/NormalCountdown.vue
src/views/consign/components/NormalCountdown.vue
+9
-4
src/views/consign/consignDetail.vue
src/views/consign/consignDetail.vue
+1
-1
No files found.
src/views/consign/components/NormalCountdown.vue
View file @
d3dfc84f
...
...
@@ -53,7 +53,7 @@ export default {
if
(
!
this
.
timer
)
{
this
.
timer
=
setInterval
(()
=>
{
const
deltaTime
=
this
.
last
-
(
Date
.
now
())
if
(
deltaTime
>
60
*
60
*
100
0
)
{
if
(
deltaTime
>
0
)
{
this
.
formatTime
=
this
.
formatDuring
(
deltaTime
)
// const newTime = formatTime.split(':')
// if (newTime.length >= 3) {
...
...
@@ -63,9 +63,12 @@ export default {
// this.zzz = null
// // this.showMS = false;
// }
}
else
if
(
deltaTime
>
0
)
{
this
.
ticker
.
clearInterval
(
this
.
timer
)
this
.
timer
=
null
}
else
{
this
.
formatTime
=
'
已超时
'
this
.
$emit
(
'
finishCountDown
'
)
if
(
this
.
timer
)
{
clearTimeout
(
this
.
timer
)
}
}
},
1000
)
}
...
...
@@ -94,8 +97,10 @@ export default {
// 得到秒数
const
seconds
=
parseInt
((
mss
%
(
1000
*
60
))
/
1000
)
const
str2
=
seconds
<
10
?
(
'
0
'
+
seconds
)
:
seconds
console
.
log
(
'
======mss=
'
,
'
剩余
'
+
str
+
'
:
'
+
str1
+
'
:
'
+
str2
)
return
'
剩余
'
+
str
+
'
:
'
+
str1
+
'
:
'
+
str2
}
else
{
this
.
$emit
(
'
finishCountDown
'
)
return
'
已超时
'
}
}
...
...
src/views/consign/consignDetail.vue
View file @
d3dfc84f
...
...
@@ -8,7 +8,7 @@
style=
"margin-left: 10px;"
>
{{
systemStateName
}}
</el-button>
<div
v-if=
"isHasPrice && (systemState === 1 || systemState === 8) && timeStr"
style=
"margin-left: 10px"
>
<NormalCountdown
:last=
"timeStr"
/>
<NormalCountdown
:last=
"timeStr"
@
finishCountDown=
"handleGetDetail"
/>
</div>
<div
style=
"margin-right: auto"
/>
<div
v-if=
"systemState === 1"
style=
"margin-right: 12px"
>
...
...
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