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
cfe0c41a
Commit
cfe0c41a
authored
Apr 25, 2025
by
youjie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化代码
parent
d1934f32
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
53 additions
and
78 deletions
+53
-78
index.vue
pages/hotel/components/time/index.vue
+4
-70
order.vue
pages/hotel/order.vue
+5
-6
visa_Reserve.vue
pages/visa/visa_Reserve.vue
+44
-2
No files found.
pages/hotel/components/time/index.vue
View file @
cfe0c41a
...
...
@@ -657,78 +657,12 @@ export default {
/*此处应把需要的数据进行保存,如入住离开日期...添加到vuex然后再进行跳转到上一页
*不推荐使用本地缓存,下面是缓存的示例
*/
uni
.
setStorage
({
key
:
"Time"
,
data
:
JSON
.
stringify
(
obj
),
});
//
uni.setStorage({
//
key: "Time",
//
data: JSON.stringify(obj),
//
});
this
.
$emit
(
"finish"
,
obj
);
//价格清单,应该存入vuex获取缓存中
// if (this.priceStauts.length > 0) {
// var price = []
// if (this.end[0] - this.start[0] == 0) {
// for (var i = this.start[1]; i
<
this
.
end
[
1
];
i
++
)
{
// var day = this.date[this.start[0]].year + this.type + this.setPull(this.date[this.start[0]]
// .month) + this.type + this.isFestival(
// this.start[0], i)
// price.push({
// day_str: day,
// price: this.priceStauts[this.start[0]][i]
// })
// }
// } else {
// for (var i = this.start[0]; i
<=
this
.
end
[
0
];
i
++
)
{
// console.log(i)
// if (i == this.start[0]) {
// for (var j = this.start[1]; j
<
this
.
date
[
i
].
day
.
length
;
j
++
)
{
// var day = this.date[i].year + this.type + this.setPull(this.date[i].month) + this
// .type + this.isFestival(
// i, j)
// price.push({
// day_str: day,
// price: this.priceStauts[i][j]
// })
// }
// } else if (i == this.end[0]) {
// for (var j = 0; j
<
this
.
end
[
1
];
j
++
)
{
// var day = this.date[i].year + this.type + this.setPull(this.date[i].month) + this
// .type + this.isFestival(
// i, j)
// price.push({
// day_str: day,
// price: this.priceStauts[i][j]
// })
// }
// } else {
// for (var j = 0; j
<
this
.
date
[
i
].
day
.
length
;
j
++
)
{
// var day = this.date[i].year + this.type + this.setPull(this.date[i].month) + this
// .type + this.isFestival(
// i, j)
// price.push({
// day_str: day,
// price: this.priceStauts[i][j]
// })
// }
// }
// }
// }
// //加入缓存
// uni.setStorage({
// key: 'Price',
// data: JSON.stringify(price)
// })
// }
//跳转到上一页
// uni.navigateBack({
// delta: 1
// })
},
},
};
...
...
pages/hotel/order.vue
View file @
cfe0c41a
...
...
@@ -162,12 +162,11 @@
商品总价
<
/view
>
<
view
class
=
"val f14 regular"
style
=
"text-align: right;"
>
<
text
style
=
"margin-right: 30rpx;"
>
{{
searchObj
.
peoples
}}
人
<
/text
>
<
text
style
=
"margin-right: 30rpx;"
>
{{
orderMsg
.
RoomCount
}}
间房
<
/text
>
<
text
style
=
"margin-right: 30rpx;"
>
{{
dayObj
.
day
}}
晚
<
/text
>
<
text
class
=
"red"
>
{{
RoomInfo
.
Currency
}}
<!--
{{
getPrice
(
orderMsg
.
TotalPrice
)
*
orderMsg
.
RoomCount
}}
-->
{{
orderMsg
.
TotalPrice
*
orderMsg
.
RoomCount
*
dayObj
.
day
}}
<
text
style
=
"margin-right: 5rpx;"
>
{{
searchObj
.
peoples
}}
人
<
/text
>
<
text
style
=
"margin-right: 5rpx;"
>
{{
orderMsg
.
RoomCount
}}
间房
<
/text
>
<
text
style
=
"margin-right: 5rpx;"
>
{{
dayObj
.
day
}}
晚
<
/text
>
<
text
class
=
"red"
>
{{
RoomInfo
.
Currency
}}
{{(
orderMsg
.
TotalPrice
*
orderMsg
.
RoomCount
*
dayObj
.
day
).
toFixed
(
2
)
}}
<
/text
>
<
/view
>
<
/view
>
...
...
pages/visa/visa_Reserve.vue
View file @
cfe0c41a
...
...
@@ -659,8 +659,50 @@
</view>
</view>
<view
class=
"empty-block"
></view>
<view
style=
"padding: 50rpx 40rpx;background: #fff;"
>
<view
class=
"big-title"
>
<text>
费用明细
</text>
</view>
<view
class=
"jz_form"
style=
"margin: 40rpx 0; padding: 0"
>
<view
class=
"form-items"
>
<view
class=
"label"
>
商品总价
</view>
<view
class=
"val f14 regular"
style=
"text-align: right"
>
<text
style=
"margin-right: 30rpx"
>
{{
orderMsg
.
AdultPeopleNum
}}
人
</text>
<text
class=
"red"
>
¥
{{
price
}}
</text>
</view>
</view>
<view
class=
"form-items"
style=
"border-bottom: none"
>
<view
class=
"label"
style=
"text-align: left;"
>
明细
</view>
</view>
<view
class=
"flex f12 grey"
style=
"margin-bottom: 40rpx"
:key=
"index"
>
<view
style=
"flex: 1"
>
<text
style=
"margin-right: 30rpx"
>
人数
</text>
</view>
<view
style=
"text-align: right"
>
{{
orderMsg
.
AdultPeopleNum
}}
人 × ¥
<!-- #ifdef MP-DI -->
{{
dataList
.
VisaB2CPrice
}}
<!-- #endif -->
<!-- #ifdef MP-AG -->
{{
dataList
.
VisaPrice
}}
<!-- #endif -->
</view>
</view>
</view>
<view
class=
"flex f12 grey"
style=
"margin-bottom: 40rpx"
:style=
"
{'color':mainColor+' !important'}" v-if="useCouponIds.length>0">
<view
style=
"flex: 1"
>
<text
style=
"margin-right: 30rpx"
>
优惠券
</text>
</view>
<view
style=
"text-align: right"
>
-¥
{{
currentCoupon
.
discountMoney
}}
</view>
</view>
<view
class=
"flex f12 grey"
style=
"margin-bottom: 40rpx"
>
<view
style=
"flex: 1"
>
<text
style=
"margin-right: 30rpx"
>
小计
</text>
</view>
<view
style=
"text-align: right"
>
¥
{{
parseFloat
((
price
-
currentCoupon
.
discountMoney
)).
toFixed
(
2
)
}}
</view>
</view>
</view>
<view
class=
"empty-block"
></view>
</
template
>
<coupon
v-if=
"couponList.length > 0 && showCoupon"
:price=
"price"
...
...
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