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
909c5815
Commit
909c5815
authored
May 28, 2024
by
zhangzhen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
细节优化
parent
c55a5b4c
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
47 additions
and
10 deletions
+47
-10
index.vue
pages/index/index.vue
+3
-3
order.vue
pages/order/order.vue
+5
-1
orderResult.vue
pages/orderResult/orderResult.vue
+39
-6
No files found.
pages/index/index.vue
View file @
909c5815
...
...
@@ -4,7 +4,7 @@
:fontSize=
"38"
bgColor=
"#E40583"
:scrollTop=
"scrollTop"
navbarType=
'5'
></f-navbar>
<view
class=
"header-content"
:style=
"
{paddingTop:statusBarHeight+'px' }">
<image
class=
"logo-bg"
:src=
"assetsPath +'/logo.png'"
mode=
"widthFix"
></image>
<image
class=
"logo-bg"
:src=
"assetsPath +'/logo
_v1
.png'"
mode=
"widthFix"
></image>
</view>
<scroll-view
:enable-flex=
"true"
class=
"scroll-view"
scroll-y=
"true"
@
scroll=
"onScroll"
>
...
...
@@ -37,9 +37,9 @@
</view>
</view>
<view
class=
"flex-row part-right"
>
<image
:src=
"assetsPath +'/map_icon.png'"
mode=
"scaleToFill"
@
tap=
"onNavToMap"
>
<image
:src=
"assetsPath +'/map_icon
_v1
.png'"
mode=
"scaleToFill"
@
tap=
"onNavToMap"
>
</image>
<image
:src=
"assetsPath +'/phone_icon.png'"
mode=
"scaleToFill"
<image
:src=
"assetsPath +'/phone_icon
_v1
.png'"
mode=
"scaleToFill"
@
tap=
"onOpenTelphone"
>
</image>
</view>
...
...
pages/order/order.vue
View file @
909c5815
...
...
@@ -550,6 +550,7 @@
}
},
onLoad
(
option
)
{
console
.
log
(
option
,
"option"
)
uni
.
showLoading
({
title
:
"加载中"
})
...
...
@@ -558,6 +559,9 @@
this
.
onGetDicts
();
this
.
id
=
option
.
roomId
;
if
(
option
.
orderNo
)
{
if
(
option
.
modeIndex
){
this
.
modeIndex
=
Number
(
option
.
modeIndex
);
}
this
.
orderType
=
2
;
this
.
distanceIndex
=
1
this
.
preOrderNo
=
option
.
orderNo
;
...
...
@@ -1059,7 +1063,7 @@
this
.
packageMode
=
[];
this
.
packList
=
this
.
roomInfo
.
packList
;
// console.log(this.packageMode,"通宵和闲时套餐")
this
.
modeIndex
=
0
;
//
this.modeIndex = 0;
}
if
(
this
.
roomInfo
.
roomLabelList
&&
this
.
roomInfo
.
roomLabelList
.
length
)
{
this
.
roomLabelList
=
this
.
roomInfo
.
roomLabelList
...
...
pages/orderResult/orderResult.vue
View file @
909c5815
...
...
@@ -372,7 +372,7 @@
// 续单开始时间戳,订单未结束使用订单实际结束时间,订单结束使用当前时间
let
startDateStemp
=
this
.
orderInfo
.
status
==
2
?
moment
(
moment
().
format
(
"YYYY-MM-DD HH:mm:00"
)).
valueOf
():
moment
(
orderEndDate
).
valueOf
()
//可续单的结束时间戳
let
endDateStemp
=
startDateStemp
+
6
0
*
60
*
1000
;
let
endDateStemp
=
startDateStemp
+
9
0
*
60
*
1000
;
let
continueStatus
=
true
;
if
(
res
.
data
.
code
==
200
&&
res
.
data
.
data
&&
res
.
data
.
data
.
length
){
new
Promise
((
resolve
,
reject
)
=>
{
...
...
@@ -397,16 +397,49 @@
}
})
}).
then
(
continueStatus
=>
{
console
.
log
(
continueStatus
,
"continueStatus"
)
if
(
continueStatus
){
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
}
&modeIndex=1
`
})
}
else
{
uni
.
showToast
({
icon
:
"none"
,
title
:
"此订单已无可续单时段"
})
endDateStemp
=
startDateStemp
+
60
*
60
*
1000
;
continueStatus
=
true
;
new
Promise
((
resolve
,
reject
)
=>
{
res
.
data
.
data
.
forEach
((
item
,
i
)
=>
{
let
start
=
moment
(
item
.
timeHour
+
':00:00'
).
valueOf
();
let
end
=
moment
(
item
.
timeHour
+
':59:59'
).
valueOf
();
if
(
start
<
endDateStemp
&&
start
>=
startDateStemp
&&
item
.
status
==
1
){
if
(
this
.
onCheckHourUse
(
item
.
startHoldTime
,
item
.
endHoldTime
)){
continueStatus
=
false
;
}
else
{
if
(
startDateStemp
>=
moment
(
item
.
startHoldTime
).
valueOf
()
&&
startDateStemp
<
moment
(
item
.
endHoldTime
).
valueOf
()){
continueStatus
=
false
;
}
else
if
(
endDateStemp
>=
moment
(
item
.
startHoldTime
).
valueOf
()){
continueStatus
=
false
;
}
}
}
if
(
i
>=
res
.
data
.
data
.
length
-
1
){
resolve
(
continueStatus
)
}
})
}).
then
(
continueStatus2
=>
{
console
.
log
(
continueStatus2
,
"continueStatus2"
)
if
(
continueStatus2
){
uni
.
navigateTo
({
url
:
`/pages/order/order?roomId=
${
this
.
orderInfo
.
roomId
}
&orderNo=
${
this
.
orderInfo
.
orderNo
}
`
})
}
else
{
uni
.
showToast
({
icon
:
"none"
,
title
:
"此订单已无可续单时段"
})
}
})
}
})
}
...
...
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