Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
self-support
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
李俊赕
self-support
Commits
ef8c1142
Commit
ef8c1142
authored
Apr 30, 2021
by
刘用法
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
超时控件
parent
1acc779b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
13 deletions
+6
-13
index.vue
src/components/order/index.vue
+2
-2
detail.vue
src/pages/order/detail.vue
+4
-11
No files found.
src/components/order/index.vue
View file @
ef8c1142
...
@@ -34,7 +34,7 @@
...
@@ -34,7 +34,7 @@
<view
v-if=
"showCountTime"
class=
"bottom-left-view"
>
<view
v-if=
"showCountTime"
class=
"bottom-left-view"
>
<view
:class=
"['bottom-tag-view',
{'timeout': timeout}]">
<text>
{{
tagText
}}
</text></view>
<view
:class=
"['bottom-tag-view',
{'timeout': timeout}]">
<text>
{{
tagText
}}
</text></view>
<u-count-down
:timestamp=
"timestamp"
font-size=
"40"
show-days
separator=
"zh"
<u-count-down
:timestamp=
"timestamp"
font-size=
"40"
show-days
separator=
"zh"
:color=
"timeout ? '#FA5A49' : '#FF930D'"
@
change=
"handleChange"
ref=
"order-count-down"
></u-count-down>
:color=
"timeout ? '#FA5A49' : '#FF930D'"
@
change=
"handleChange"
separator-color=
"#333333"
ref=
"order-count-down"
></u-count-down>
</view>
</view>
<view
v-else-if=
"showTime"
>
<view
v-else-if=
"showTime"
>
<text>
{{
timeTitle
}}
</text>
<text>
{{
timeTitle
}}
</text>
...
@@ -408,7 +408,7 @@
...
@@ -408,7 +408,7 @@
color
:
#FFFFFF
;
color
:
#FFFFFF
;
font-size
:
26rpx
;
font-size
:
26rpx
;
background-color
:
#FF930D
;
background-color
:
#FF930D
;
margin-right
:
20
rpx
;
margin-right
:
16
rpx
;
display
:
flex
;
display
:
flex
;
justify-content
:
center
;
justify-content
:
center
;
align-items
:
center
;
align-items
:
center
;
...
...
src/pages/order/detail.vue
View file @
ef8c1142
...
@@ -118,8 +118,8 @@
...
@@ -118,8 +118,8 @@
</view>
</view>
<view
v-if=
"showCenterBtn"
@
click=
"handleBtn"
class=
"button"
:class=
"['center-button-view', btnClass]"
>
<view
v-if=
"showCenterBtn"
@
click=
"handleBtn"
class=
"button"
:class=
"['center-button-view', btnClass]"
>
<text>
{{
centerButtonText
}}
</text>
<text>
{{
centerButtonText
}}
</text>
<view
v-if=
"order.currentOverTime
> 0
"
class=
"time-view"
>
<view
v-if=
"order.currentOverTime"
class=
"time-view"
>
<text
style=
"margin-right: 8rpx;"
>
{{
order
.
currentOverTime
*
1000
>
new
Date
().
getTime
()?
'剩'
:
'超'
}}
</text>
<text
>
{{
order
.
currentOverTime
>
new
Date
().
getTime
()?
'剩'
:
'超'
}}
</text>
<u-count-down
<u-count-down
:timestamp=
"timestampDiff(order.currentOverTime)"
:timestamp=
"timestampDiff(order.currentOverTime)"
font-size=
"20"
font-size=
"20"
...
@@ -128,7 +128,6 @@
...
@@ -128,7 +128,6 @@
separator-color=
"#FFFFFF"
separator-color=
"#FFFFFF"
separator-size=
"20"
separator-size=
"20"
:ref=
"'uCountDown'"
:ref=
"'uCountDown'"
height=
"20"
:show-days=
"threeDays()"
:show-days=
"threeDays()"
:show-minutes=
"!threeDays()"
:show-minutes=
"!threeDays()"
:show-seconds=
"!threeDays()"
:show-seconds=
"!threeDays()"
...
@@ -614,13 +613,7 @@
...
@@ -614,13 +613,7 @@
if
(
!
currentOverTime
){
if
(
!
currentOverTime
){
return
0
return
0
}
}
var
nowTime
=
new
Date
();
// 当前时间
return
Math
.
round
(
Math
.
abs
(
currentOverTime
-
new
Date
().
getTime
())
/
1000
)
if
(
nowTime
.
getTime
()
>
currentOverTime
*
1000
){
var
diff
=
nowTime
.
getTime
()
-
(
currentOverTime
*
1000
);
}
else
{
var
diff
=
(
currentOverTime
*
1000
)
-
nowTime
.
getTime
();
}
return
diff
;
},
},
timeOutChange
(
currentOverTime
){
timeOutChange
(
currentOverTime
){
let
self
=
this
let
self
=
this
...
@@ -638,7 +631,7 @@
...
@@ -638,7 +631,7 @@
})
})
},
},
threeDays
()
{
threeDays
()
{
return
this
.
timestampDiff
(
order
.
currentOverTime
)
>
3600
*
24
*
3
return
this
.
timestampDiff
(
this
.
order
.
currentOverTime
)
>
3600
*
24
*
3
}
}
}
}
};
};
...
...
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