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
0cb684fa
Commit
0cb684fa
authored
May 13, 2024
by
zhangzhen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
细节优化
parent
9cb0fd27
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
18 deletions
+5
-18
orderResult.vue
pages/orderResult/orderResult.vue
+5
-18
No files found.
pages/orderResult/orderResult.vue
View file @
0cb684fa
...
@@ -168,9 +168,7 @@
...
@@ -168,9 +168,7 @@
};
};
},
},
onLoad
(
option
)
{
onLoad
(
option
)
{
this
.
userInfo
=
uni
.
getStorageSync
(
'userInfo'
)
this
.
userInfo
=
uni
.
getStorageSync
(
'userInfo'
)
console
.
log
(
this
.
userInfo
,
"用户信息"
)
this
.
orderNo
=
option
.
orderNo
;
this
.
orderNo
=
option
.
orderNo
;
if
(
option
.
share
&&
option
.
share
==
"share"
){
if
(
option
.
share
&&
option
.
share
==
"share"
){
...
@@ -267,6 +265,7 @@
...
@@ -267,6 +265,7 @@
if
(
nowTime
-
endTime
<
15
*
60
*
1000
){
if
(
nowTime
-
endTime
<
15
*
60
*
1000
){
this
.
continStatus
=
true
;
this
.
continStatus
=
true
;
}
}
console
.
log
(
this
.
continStatus
,
888
)
this
.
orderInfo
=
{
this
.
orderInfo
=
{
...
res
.
data
.
data
,
...
res
.
data
.
data
,
roomImages
:
res
.
data
.
data
.
roomImages
.
split
(
','
),
roomImages
:
res
.
data
.
data
.
roomImages
.
split
(
','
),
...
@@ -371,45 +370,33 @@
...
@@ -371,45 +370,33 @@
//订单结束时间
//订单结束时间
let
orderEndDate
=
`
${
this
.
orderInfo
.
endDate
}
${
this
.
orderInfo
.
endTime
}
:00`
;
let
orderEndDate
=
`
${
this
.
orderInfo
.
endDate
}
${
this
.
orderInfo
.
endTime
}
:00`
;
// 续单开始时间戳,订单未结束使用订单实际结束时间,订单结束使用当前时间
// 续单开始时间戳,订单未结束使用订单实际结束时间,订单结束使用当前时间
let
startDateStemp
=
this
.
orderInfo
.
status
==
2
?
moment
(
moment
().
format
(
"YYYY-MM-DD HH:mm:00"
)).
valueOf
():
moment
(
orderEndDate
).
valueOf
();
let
startDateStemp
=
this
.
orderInfo
.
status
==
2
?
moment
(
moment
().
format
(
"YYYY-MM-DD HH:mm:00"
)).
valueOf
():
moment
(
orderEndDate
).
valueOf
()
//可续单的结束时间戳
//可续单的结束时间戳
let
endDateStemp
=
startDateStemp
+
60
*
60
*
1000
;
let
endDateStemp
=
startDateStemp
+
60
*
60
*
1000
;
let
continueStatus
=
true
;
let
continueStatus
=
true
;
if
(
res
.
data
.
code
==
200
&&
res
.
data
.
data
&&
res
.
data
.
data
.
length
){
if
(
res
.
data
.
code
==
200
&&
res
.
data
.
data
&&
res
.
data
.
data
.
length
){
new
Promise
((
resolve
,
reject
)
=>
{
new
Promise
((
resolve
,
reject
)
=>
{
res
.
data
.
data
.
forEach
((
item
,
i
)
=>
{
res
.
data
.
data
.
forEach
((
item
,
i
)
=>
{
console
.
log
(
i
)
let
start
=
moment
(
item
.
timeHour
+
':00:00'
).
valueOf
();
let
start
=
moment
(
item
.
timeHour
+
':00:00'
).
valueOf
();
let
end
=
moment
(
item
.
timeHour
+
':59:59'
).
valueOf
();
let
end
=
moment
(
item
.
timeHour
+
':59:59'
).
valueOf
();
if
(
start
<
endDateStemp
&&
start
>=
startDateStemp
&&
item
.
status
==
1
){
if
(
end
>=
startDateStemp
&&
start
<=
end
){
if
(
item
.
stauts
==
1
){
if
(
this
.
onCheckHourUse
(
item
.
startHoldTime
,
item
.
endHoldTime
)){
if
(
this
.
onCheckHourUse
(
item
.
startHoldTime
,
item
.
endHoldTime
)){
continueStatus
=
false
;
continueStatus
=
false
;
console
.
log
(
"节点1"
)
}
else
{
}
else
{
if
(
startDateStemp
>=
moment
(
item
.
startHoldTime
).
valueOf
()
&&
startDateStemp
<
moment
(
item
.
endHoldTime
).
valueOf
()){
if
(
startDateStemp
>=
moment
(
item
.
startHoldTime
).
valueOf
()
&&
startDateStemp
<
moment
(
item
.
endHoldTime
).
valueOf
()){
continueStatus
=
false
;
continueStatus
=
false
;
console
.
log
(
"节点2"
)
}
else
if
(
endDateStemp
>=
moment
(
item
.
startHoldTime
).
valueOf
()){
}
else
if
(
endDateStemp
>=
moment
(
item
.
startHoldTime
).
valueOf
()){
continueStatus
=
false
;
continueStatus
=
false
;
console
.
log
(
"节点3"
)
}
}
}
}
}
}
}
if
(
i
>=
res
.
data
.
data
.
length
-
1
){
if
(
i
>=
res
.
data
.
data
.
length
-
1
){
resolve
(
continueStatus
)
resolve
(
continueStatus
)
}
}
})
})
}).
then
(
continueStatus
=>
{
}).
then
(
continueStatus
=>
{
console
.
log
(
continueStatus
,
"节点3"
)
if
(
continueStatus
){
if
(
continueStatus
){
uni
.
navigateTo
({
uni
.
navigateTo
({
url
:
`/pages/order/order?roomId=
${
this
.
orderInfo
.
roomId
}
&orderNo=
${
this
.
orderInfo
.
orderNo
}
`
url
:
`/pages/order/order?roomId=
${
this
.
orderInfo
.
roomId
}
&orderNo=
${
this
.
orderInfo
.
orderNo
}
`
...
...
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