Skip to content

Commit

Permalink
merge conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
SEU-zxj committed May 18, 2023
2 parents c68f4cc + 2d0fbe4 commit e3e3a5c
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 22 deletions.
18 changes: 4 additions & 14 deletions src/components/CheckOrder.vue
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,7 @@
}}</el-text
><br />
<el-text size="large">{{ order.hotelLocation }}</el-text>
<!-- <el-text style="color: #000000; font-size: large" tag="b">{{
order.hotelId
}}</el-text> -->
<!-- <el-text style="color: #000000;font-size: large;" tag="b">{{ order.hotelId }}</el-text> -->
</el-col>
<el-col :span="3" :offset="21">
<el-tooltip
Expand Down Expand Up @@ -188,7 +186,7 @@
tag="b"
>
{{ order.totalPrice + "元" }}
<!-- {{ order.amount + "元" }} --> </el-text
<!-- {{ order.amount + "元" }} --> </el-text
><br />
</el-col>
</el-row>
Expand All @@ -210,11 +208,8 @@
style="width: 25px; height: 25px"
:src="require('@/assets/menu_icon/my_icon/order.svg')"
/>
<el-text
style="font-size: medium"
@click="WriteComment"
>
&nbsp;&nbsp;撰写评论</el-text
<el-text style="font-size: medium">
&nbsp;&nbsp;查看行程和订单详情</el-text
>
</el-button></el-col
>
Expand Down Expand Up @@ -379,10 +374,6 @@ export default {
return sumRoomNum;
};
function WriteComment() {
console.log("撰写评论");
}
return {
numOfOrder,
orders,
Expand All @@ -392,7 +383,6 @@ export default {
time2time,
dateDifference,
sumRoomNum,
WriteComment,
};
},
mounted() {
Expand Down
37 changes: 29 additions & 8 deletions src/components/HotelOrder.vue
Original file line number Diff line number Diff line change
Expand Up @@ -245,16 +245,25 @@ import router from "@/router"
export default ({
setup() {
const ruleForms = ref(null);
// const order = ref({
// hotelName: "Hotel Duminy-Vendome", hotelPostion: "3/5 rue du Mont-Thabor, 1区 - 卢浮宫, 75001 巴黎, 法国",
// checkinTime: "2023年6月22日周四",
// checkoutTime: "2023年6月25日周六",
// totalDays: "2",
// Rooms: [
// { roomName: "大床房", roomNumber: "1" },
// { roomName: "舒适单人房", roomNumber: "2" },
// ],
// totalPrice: "1,340",
// })
const order = ref({
hotelName: "Hotel Duminy-Vendome", hotelPostion: "3/5 rue du Mont-Thabor, 1区 - 卢浮宫, 75001 巴黎, 法国",
checkinTime: "2023年6月22日周四",
checkoutTime: "2023年6月25日周六",
hotelName: store.state.CurrentHotelName, hotelPostion: store.state.CurrentHotelLocation,
figURL: store.state.CurrentHotelFigURL,
checkinTime: store.state.CurrentSelectTime[0],
checkoutTime: store.state.CurrentSelectTime[1],
totalDays: "2",
Rooms: [
{ roomName: "大床房", roomNumber: "1" },
{ roomName: "舒适单人房", roomNumber: "2" },
],
totalPrice: "1,340",
Rooms: store.state.bookRoomInfo,
totalPrice: store.state.totalPrice,
})
const orderForm = reactive({
phoneNumber: store.userPhoneNumber,
Expand Down Expand Up @@ -362,6 +371,17 @@ export default ({
}
});
}
//计算两个日期之间的天数
const dateDifference = (sDate1, sDate2) => { //sDate1和sDate2是2006-12-18格式
let dateSpan, iDays
sDate1 = Date.parse(sDate1)
sDate2 = Date.parse(sDate2)
dateSpan = sDate2 - sDate1
dateSpan = Math.abs(dateSpan)
iDays = Math.floor(dateSpan / (24 * 3600 * 1000))
return (iDays - 1)
}
return{
ruleForms, rules,
order,
Expand All @@ -370,6 +390,7 @@ export default ({
options,
confirmOrder,
dateDifference,
}
},
})
Expand Down

0 comments on commit e3e3a5c

Please sign in to comment.