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
19ea526a
Commit
19ea526a
authored
Apr 24, 2024
by
zhangzhen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug优化
parent
705bdff0
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
6 deletions
+12
-6
orderResult.vue
pages/orderResult/orderResult.vue
+12
-6
No files found.
pages/orderResult/orderResult.vue
View file @
19ea526a
...
...
@@ -339,18 +339,23 @@
day
:
this
.
orderInfo
.
endDate
,
orderType
:
2
}).
then
(
res
=>
{
if
(
res
.
data
.
code
!=
200
){
uni
.
showToast
({
icon
:
"none"
,
title
:
"服务出错,稍后再试"
})
return
}
//订单结束时间
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
startDateStemp
=
this
.
orderInfo
.
status
==
2
?
moment
(
moment
().
format
(
"YYYY-MM-DD HH:mm:00"
)).
valueOf
():
moment
(
orderEndDate
).
valueOf
();
//订单开始时间
let
orderStartTime
=
0
;
let
continueStatus
=
false
;
console
.
log
(
moment
(
startDateStemp
).
format
(
"YYYY-MM-DD HH:mm:ss"
),
"ding单结束的时间"
)
if
(
res
.
data
.
code
==
200
&&
res
.
data
.
data
&&
res
.
data
.
data
.
length
){
res
.
data
.
data
.
forEach
(
item
=>
{
if
(
continueStatus
)
return
;
...
...
@@ -359,17 +364,19 @@
uni
.
navigateTo
({
url
:
`/pages/order/order?roomId=
${
this
.
orderInfo
.
roomId
}
&orderNo=
${
this
.
orderInfo
.
orderNo
}
`
})
continueStatus
=
true
;
}
else
{
let
d
=
moment
(
item
.
startHoldTime
).
valueOf
()
if
(
d
-
orderStartTime
>=
3600
*
1000
){
uni
.
navigateTo
({
url
:
`/pages/order/order?roomId=
${
this
.
orderInfo
.
roomId
}
&orderNo=
${
this
.
orderInfo
.
orderNo
}
`
})
continueStatus
=
true
;
return
}
else
{
uni
.
showToast
({
icon
:
"none"
,
title
:
"此订单已无可续单时段
2
"
title
:
"此订单已无可续单时段"
})
continueStatus
=
true
;
return
...
...
@@ -388,7 +395,6 @@
})
}
return
;
let
h
=
this
.
orderInfo
.
endTime
.
split
(
":"
).
map
(
item
=>
Number
(
item
))
if
(
res
.
data
.
code
==
200
){
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