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
23a0f6ed
Commit
23a0f6ed
authored
Apr 23, 2024
by
zhangzhen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
细节优化
parent
487e1a9b
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
46 additions
and
1 deletions
+46
-1
orderResult.vue
pages/orderResult/orderResult.vue
+46
-1
No files found.
pages/orderResult/orderResult.vue
View file @
23a0f6ed
...
@@ -211,7 +211,7 @@
...
@@ -211,7 +211,7 @@
if
(
res
.
data
.
data
.
status
===
2
){
if
(
res
.
data
.
data
.
status
===
2
){
let
nowTime
=
moment
().
valueOf
();
let
nowTime
=
moment
().
valueOf
();
let
endTime
=
moment
(
res
.
data
.
data
.
endDate
).
valueOf
();
let
endTime
=
moment
(
res
.
data
.
data
.
endDate
).
valueOf
();
if
(
nowTime
-
endTime
<
15
*
60
*
1000
){
if
(
nowTime
-
endTime
<
15
0
*
60
*
1000
){
this
.
continStatus
=
true
;
this
.
continStatus
=
true
;
}
}
}
}
...
@@ -339,6 +339,51 @@
...
@@ -339,6 +339,51 @@
day
:
this
.
orderInfo
.
endDate
,
day
:
this
.
orderInfo
.
endDate
,
orderType
:
2
orderType
:
2
}).
then
(
res
=>
{
}).
then
(
res
=>
{
//订单结束时间
let
orderEndDate
=
`
${
this
.
orderInfo
.
endDate
}
${
this
.
orderInfo
.
endTime
}
:00`
;
// 续单开始时间戳,订单未结束使用订单实际结束时间,订单结束使用当前时间
let
startDateStemp
=
this
.
orderInfo
.
status
==
2
?
moment
().
valueOf
():
moment
(
orderEndDate
).
valueOf
();
// 获取当前小时和分钟
let
hm
=
moment
(
startDateStemp
).
format
(
"HH:mm"
).
split
(
":"
).
map
(
item
=>
Number
(
item
))
//订单开始时间
let
orderStartTime
=
0
;
if
(
res
.
data
.
code
==
200
&&
res
.
data
.
data
&&
res
.
data
.
data
.
length
){
res
.
data
.
data
.
forEach
(
item
=>
{
if
(
orderStartTime
){
if
(
item
.
status
==
0
){
uni
.
navigateTo
({
url
:
`/pages/order/order?roomId=
${
this
.
orderInfo
.
roomId
}
&orderNo=
${
this
.
orderInfo
.
orderNo
}
`
})
}
else
{
let
d
=
moment
(
item
.
startHoldTime
).
valueOf
()
if
(
d
-
startDateStemp
>=
3600
*
1000
){
uni
.
navigateTo
({
url
:
`/pages/order/order?roomId=
${
this
.
orderInfo
.
roomId
}
&orderNo=
${
this
.
orderInfo
.
orderNo
}
`
})
}
else
{
uni
.
showToast
({
icon
:
"none"
,
title
:
"此订单已无可续单时段"
})
}
}
}
else
{
let
d
=
0
;
if
(
item
.
status
==
0
){
d
=
moment
(
item
.
timeHour
).
valueOf
()
}
else
{
d
=
moment
(
item
.
endHoldTime
).
valueOf
()
}
if
(
d
>
startDateStemp
){
orderStartTime
=
d
;
console
.
log
(
moment
(
orderStartTime
).
format
(
"YYYY-MM-DD HH:mm:ss"
),
"续单可开始的时间"
)
}
}
})
}
return
;
let
h
=
this
.
orderInfo
.
endTime
.
split
(
":"
).
map
(
item
=>
Number
(
item
))
let
h
=
this
.
orderInfo
.
endTime
.
split
(
":"
).
map
(
item
=>
Number
(
item
))
if
(
res
.
data
.
code
==
200
){
if
(
res
.
data
.
code
==
200
){
let
val
=
res
.
data
.
data
[
h
[
0
]
+
1
];
let
val
=
res
.
data
.
data
[
h
[
0
]
+
1
];
...
...
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