Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gxpt_wechat
Overview
Overview
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
pseer
gxpt_wechat
Commits
607ebae9
Commit
607ebae9
authored
Feb 07, 2024
by
zhangzhen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
获取时间戳优化
parent
e0c4b5db
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
11 deletions
+10
-11
order.vue
pages/order/order.vue
+10
-11
No files found.
pages/order/order.vue
View file @
607ebae9
...
...
@@ -510,7 +510,6 @@
}
},
onLoad
(
option
)
{
// this.$refs.popupMessage.open();
uni
.
showLoading
({
title
:
"加载中"
})
...
...
@@ -547,7 +546,7 @@
},
onSetSelectTime
(){
if
(
this
.
dateIndex
===
0
){
let
h
=
new
Date
().
getHours
(
)
let
h
=
Number
(
moment
().
format
(
"HH"
)
)
this
.
hourList
=
this
.
hourList
.
filter
(
item
=>
Number
(
item
)
>=
h
).
map
(
item
=>
{
let
i
=
Number
(
item
)
return
i
>=
10
?
i
:
`0
${
i
}
`
...
...
@@ -561,7 +560,7 @@
},
onSetStartHours
(){
if
(
this
.
dateIndex
===
0
){
this
.
startHours
=
new
Date
().
getHours
(
);
this
.
startHours
=
Number
(
moment
().
format
(
"HH"
)
);
}
else
{
this
.
startHours
=
0
}
...
...
@@ -1010,8 +1009,8 @@
selectNum
+=
1
t
=
i
}
else
if
(
val
.
status
==
1
&&
selectNum
>
0
){
let
start
=
new
Date
(
startDate
).
getTime
()
let
end
=
new
Date
(
val
.
startHoldTime
).
getTime
()
let
start
=
moment
(
startDate
).
valueOf
()
let
end
=
moment
(
val
.
startHoldTime
).
valueOf
()
if
(
end
-
start
>
this
.
duration
*
60
*
60
*
1000
){
todaySelectStatus
=
true
;
}
else
{
...
...
@@ -1026,9 +1025,9 @@
t
=
i
}
else
if
(
selectNum
>
0
&&
!
val
.
status
){
// 计算时长
let
start
=
new
Date
(
startDate
).
getTime
()
let
start
=
moment
(
startDate
).
valueOf
()
endDate
=
endDate
?
moment
(
endDate
).
add
(
1
,
'h'
).
format
(
"YYYY-MM-DD HH:mm:ss"
)
:
moment
(
startDate
).
add
(
1
,
'h'
).
format
(
"YYYY-MM-DD HH:mm:ss"
)
let
end
=
new
Date
(
endDate
).
getTime
()
let
end
=
moment
(
endDate
).
valueOf
()
if
(
end
-
start
>
this
.
duration
*
60
*
60
*
1000
){
todaySelectStatus
=
true
;
...
...
@@ -1460,8 +1459,8 @@
selectNum
+=
1
t
=
i
}
else
if
(
val
.
status
==
1
&&
selectNum
>
0
){
let
start
=
new
Date
(
startDate
).
getTime
()
let
end
=
new
Date
(
val
.
startHoldTime
).
getTime
()
let
start
=
moment
(
startDate
).
valueOf
()
let
end
=
moment
(
val
.
startHoldTime
).
valueOf
()
if
(
end
-
start
>
this
.
duration
*
60
*
60
*
1000
){
todaySelectStatus
=
true
;
}
else
{
...
...
@@ -1476,9 +1475,9 @@
t
=
i
}
else
if
(
selectNum
>
0
&&
!
val
.
status
){
// 计算时长
let
start
=
new
Date
(
startDate
).
getTime
()
let
start
=
moment
(
startDate
).
valueOf
()
endDate
=
endDate
?
moment
(
endDate
).
add
(
1
,
'h'
).
format
(
"YYYY-MM-DD HH:mm:ss"
)
:
moment
(
startDate
).
add
(
1
,
'h'
).
format
(
"YYYY-MM-DD HH:mm:ss"
)
let
end
=
new
Date
(
endDate
).
getTime
()
let
end
=
moment
(
endDate
).
valueOf
()
if
(
end
-
start
>
this
.
duration
*
60
*
60
*
1000
){
todaySelectStatus
=
true
;
}
else
{
...
...
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