Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
J
jz_Travel
Project
Project
Details
Activity
Releases
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
zhengke
jz_Travel
Commits
baf7f746
Commit
baf7f746
authored
Jan 18, 2023
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
111
parent
efbd2c11
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
8 deletions
+4
-8
room-good.vue
pages/hotel/components/room-good.vue
+1
-1
order.vue
pages/hotel/order.vue
+3
-7
No files found.
pages/hotel/components/room-good.vue
View file @
baf7f746
...
@@ -27,7 +27,7 @@
...
@@ -27,7 +27,7 @@
<text>
{{$utils.getretailer()==true? item.B2BPrice:item.SalesPrice}}
</text>
<text>
{{$utils.getretailer()==true? item.B2BPrice:item.SalesPrice}}
</text>
</view>
</view>
</view>
</view>
<view
class=
"rm-opera"
v-if=
"item.Inventory>0
&&item.Inventory<5
"
>
<view
class=
"rm-opera"
v-if=
"item.Inventory>0"
>
<!-- 如果库存少于5显示 -->
<!-- 如果库存少于5显示 -->
<view
class=
"warm-count"
>
剩{{item.Inventory}}间
</view>
<view
class=
"warm-count"
>
剩{{item.Inventory}}间
</view>
<view
class=
"buy"
@
click=
"previewOrder(item)"
>
<view
class=
"buy"
@
click=
"previewOrder(item)"
>
...
...
pages/hotel/order.vue
View file @
baf7f746
...
@@ -201,13 +201,11 @@
...
@@ -201,13 +201,11 @@
},
},
//选择时间
//选择时间
confirm
(
val
){
confirm
(
val
){
console
.
log
(
val
,
'val'
);
this
.
orderMsg
.
ArrivalTime
=
val
.
hour
+
':'
+
val
.
minute
;
this
.
orderMsg
.
ArrivalTime
=
val
.
hour
+
':'
+
val
.
minute
;
},
},
//改变房间数量
//改变房间数量
getRoomNumber
(
val
){
getRoomNumber
(
val
){
this
.
orderMsg
.
RoomNumber
=
val
.
value
;
this
.
orderMsg
.
RoomNumber
=
val
.
value
;
console
.
log
(
val
,
'房间数'
);
this
.
CalTotalPrice
();
this
.
CalTotalPrice
();
},
},
//获取房型报价
//获取房型报价
...
@@ -218,7 +216,6 @@
...
@@ -218,7 +216,6 @@
},
},
res
=>
{
res
=>
{
if
(
res
.
resultCode
==
1
)
{
if
(
res
.
resultCode
==
1
)
{
console
.
log
(
res
,
'房型报价'
);
this
.
priceList
=
res
.
data
;
this
.
priceList
=
res
.
data
;
this
.
CalTotalPrice
();
this
.
CalTotalPrice
();
}
}
...
@@ -229,9 +226,12 @@
...
@@ -229,9 +226,12 @@
CalTotalPrice
(){
CalTotalPrice
(){
this
.
orderMsg
.
Final_Price
=
0
;
this
.
orderMsg
.
Final_Price
=
0
;
this
.
priceList
.
forEach
(
x
=>
{
this
.
priceList
.
forEach
(
x
=>
{
console
.
log
(
"xx"
,
x
);
if
(
this
.
$utils
.
getretailer
()){
if
(
this
.
$utils
.
getretailer
()){
console
.
log
(
"1"
,
x
.
B2BPrice
)
this
.
orderMsg
.
Final_Price
+=
parseInt
(
this
.
orderMsg
.
RoomNumber
)
*
x
.
B2BPrice
;
this
.
orderMsg
.
Final_Price
+=
parseInt
(
this
.
orderMsg
.
RoomNumber
)
*
x
.
B2BPrice
;
}
else
{
}
else
{
console
.
log
(
"2"
,
x
.
SalesPrice
)
this
.
orderMsg
.
Final_Price
+=
parseInt
(
this
.
orderMsg
.
RoomNumber
)
*
x
.
SalesPrice
;
this
.
orderMsg
.
Final_Price
+=
parseInt
(
this
.
orderMsg
.
RoomNumber
)
*
x
.
SalesPrice
;
}
}
})
})
...
@@ -272,7 +272,6 @@
...
@@ -272,7 +272,6 @@
},
},
res
=>
{
res
=>
{
if
(
res
.
resultCode
==
1
)
{
if
(
res
.
resultCode
==
1
)
{
console
.
log
(
res
,
'数据'
);
that
.
queren
(
res
.
data
)
that
.
queren
(
res
.
data
)
}
}
}
}
...
@@ -295,7 +294,6 @@
...
@@ -295,7 +294,6 @@
},
},
res
=>
{
res
=>
{
this
.
orderInfo
=
JSON
.
parse
(
res
.
data
);
this
.
orderInfo
=
JSON
.
parse
(
res
.
data
);
console
.
log
(
171
,
this
.
orderInfo
)
this
.
Pay
()
this
.
Pay
()
}
}
);
);
...
@@ -310,7 +308,6 @@
...
@@ -310,7 +308,6 @@
signType
:
this
.
orderInfo
.
signType
,
signType
:
this
.
orderInfo
.
signType
,
paySign
:
this
.
orderInfo
.
sign
,
paySign
:
this
.
orderInfo
.
sign
,
success
:
function
(
res
)
{
success
:
function
(
res
)
{
console
.
log
(
'success'
,
res
);
uni
.
showToast
({
uni
.
showToast
({
title
:
"支付成功"
title
:
"支付成功"
})
})
...
@@ -321,7 +318,6 @@
...
@@ -321,7 +318,6 @@
},
100
)
},
100
)
},
},
fail
:
function
(
err
)
{
fail
:
function
(
err
)
{
console
.
log
(
'fail:'
,
err
);
uni
.
showToast
({
uni
.
showToast
({
title
:
"支付失败"
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