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
75ba8fc2
Commit
75ba8fc2
authored
Jan 04, 2024
by
zhangzhen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
细节优化
parent
f9621a9a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
15 deletions
+31
-15
order.vue
pages/order/order.vue
+24
-14
orderResult.vue
pages/orderResult/orderResult.vue
+7
-1
No files found.
pages/order/order.vue
View file @
75ba8fc2
...
...
@@ -178,7 +178,7 @@
<text
class=
"text-black text-left"
>
预约时长
</text>
<text
class=
"text-black"
>
{{
duration
}}
小时
</text>
</view>
<view
class=
"flex-between price"
>
<view
v-show=
"orderTypeList[index].type==1"
class=
"flex-between price"
>
<text
class=
"text-black text-left"
>
房间单价
</text>
<view
class=
"flex-row"
>
<text
class=
"text-black text-sm text-bold"
style=
"margin-bottom: 3upx;"
>
¥
</text>
...
...
@@ -197,9 +197,9 @@
<view
class=
"flex-between price"
>
<text
class=
"text-black text-left"
>
预约优惠
</text>
<view
class=
"flex-row"
>
<text
class=
"text-pink text-sm text-bold"
style=
"margin-bottom: 3upx;"
>
{{
computePriceInfo
.
couponFee
>
0
?
'-'
:
''
}}
¥
</text>
<!--
<text
class=
"text-pink text-sm text-bold"
style=
"margin-bottom: 3upx;"
>
{{
computePriceInfo
.
couponFee
>
0
?
'-'
:
''
}}
¥
</text>
-->
<text
class=
"text-pink text-lg text-bold"
>
{{
computePriceInfo
.
couponFee
}}
</text>
<text>
元
</text>
</view>
</view>
</view>
...
...
@@ -463,7 +463,7 @@
title
:
"加载中"
})
this
.
onGetDicts
();
this
.
id
=
option
.
roomId
||
106
;
this
.
id
=
option
.
roomId
;
if
(
option
.
orderNo
)
{
this
.
orderType
=
2
;
this
.
preOrderNo
=
option
.
orderNo
;
...
...
@@ -510,10 +510,8 @@
.
split
(
","
).
map
(
val
=>
this
.
hostUrl
+
val
)
:
[]
}
// 判断房间有没有绑定套餐
if
(
this
.
roomInfo
.
packList
&&
this
.
roomInfo
.
packList
.
length
)
{
let
packageMode
=
this
.
roomInfo
.
packList
packageMode
.
sort
((
a
,
b
)
=>
Number
(
a
.
duration
)
-
Number
(
b
.
duration
))
this
.
packageMode
=
packageMode
if
(
this
.
orderType
==
1
&&
this
.
roomInfo
.
packList
&&
this
.
roomInfo
.
packList
.
length
)
{
this
.
packageMode
=
this
.
roomInfo
.
packList
this
.
index
=
1
;
this
.
modeIndex
=
0
;
}
else
{
...
...
@@ -544,16 +542,11 @@
orderType
:
this
.
orderType
}).
then
(
res
=>
{
uni
.
hideLoading
()
// orderType 订单类型
if
(
this
.
orderType
===
1
)
{
if
(
this
.
index
==
1
){
if
(
this
.
orderTypeList
[
this
.
index
].
type
==
2
){
this
.
duration
=
Number
(
this
.
packageMode
[
this
.
modeIndex
].
duration
);
}
else
{
this
.
duration
=
Number
(
this
.
distanceMode
[
this
.
distanceIndex
].
duration
);
}
}
this
.
dateIntervalList
=
res
.
data
.
data
.
map
((
item
,
index
)
=>
{
return
{
...
item
,
...
...
@@ -604,6 +597,22 @@
this
.
setStartTime
.
duration
+=
1
;
}
if
(
index
>=
this
.
dateIntervalList
.
length
-
1
){
if
(
this
.
orderType
==
1
){
// 开始时间加一分钟
let
arr
=
this
.
startTime
.
split
(
":"
);
let
m
=
Number
(
arr
[
1
])
+
1
let
h
=
Number
(
arr
[
0
])
if
(
m
>=
60
){
h
+=
1
m
-=
60
}
if
(
h
>=
24
){
h
-=
24
this
.
setStartTime
.
days
=
2
this
.
days
=
2
;
}
this
.
startTime
=
`
${
h
>=
10
?
h
:
'0'
+
h
}
:
${
m
>=
10
?
m
:
'0'
+
m
}
`
}
this
.
onSetEndTime
()
}
})
...
...
@@ -827,6 +836,7 @@
onChangeMode
(
i
)
{
if
(
this
.
modeIndex
===
i
)
return
;
this
.
modeIndex
=
i
;
this
.
duration
=
Number
(
this
.
packageMode
[
this
.
modeIndex
].
duration
);
let
val
=
this
.
intervalList
.
findIndex
(
item
=>
item
.
status
===
2
)
let
len
=
this
.
intervalList
.
filter
(
item
=>
item
.
status
===
2
).
length
;
let
duration
=
Number
(
this
.
packageMode
[
this
.
modeIndex
].
duration
);
...
...
pages/orderResult/orderResult.vue
View file @
75ba8fc2
...
...
@@ -260,18 +260,24 @@
this
.
$refs
.
popup
.
close
();
},
confirm
(){
uni
.
showLoading
({
title
:
'提交中'
})
orderRefund
({
orderNo
:
this
.
orderInfo
.
orderNo
,
amount
:
this
.
orderInfo
.
payPrice
,
approvalStatus
:
1
}).
then
(
res
=>
{
uni
.
hideLoading
()
if
(
res
.
data
.
code
==
200
){
this
.
close
()
uni
.
showToast
({
icon
:
'none'
,
title
:
'退单已提交'
})
this
.
onLoading
()
setTimeout
(()
=>
{
this
.
onLoading
()
},
1500
)
}
else
{
uni
.
showToast
({
icon
:
'none'
,
...
...
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