Commit 556e6e34 authored by youjie's avatar youjie

酒店

parent ecdaa904
...@@ -64,15 +64,26 @@ ...@@ -64,15 +64,26 @@
'https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/hotel4stars.png', 'https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/hotel4stars.png',
'https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/hotel5stars.png', 'https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/hotel5stars.png',
], ],
myDayObj:null,
} }
}, },
created() { created() {
// console.log(this.HotelList, 'hotel'); // console.log(this.HotelList, 'hotel');
}, },
watch:{
dayObj: {
handler (val, oldval) {
if(val){
this.myDayObj = val
}
},
deep: true,
immediate: true
}
},
methods:{ methods:{
goHotelDetail(id){ goHotelDetail(id){
console.log(this.dayObj,'id'); let myDayObj = JSON.stringify(this.myDayObj);
let myDayObj = JSON.stringify(this.dayObj);
uni.navigateTo({ uni.navigateTo({
url: "/pages/hotel/detail?id=" + id + '&dayObj=' + myDayObj+'&searchObj='+JSON.stringify(this.searchObj) url: "/pages/hotel/detail?id=" + id + '&dayObj=' + myDayObj+'&searchObj='+JSON.stringify(this.searchObj)
}); });
......
...@@ -107,7 +107,8 @@ ...@@ -107,7 +107,8 @@
</text> </text>
</li> </li>
</ul> --> </ul> -->
<view class="big-titleAssis2">客房信息 <view class="big-titleAssis2">
<!-- 客房信息 -->
<view class="hotelSheShitisp">酒店全部客房设施信息仅供参考,可能与您入住的房型略有差异,请知晓</view> <view class="hotelSheShitisp">酒店全部客房设施信息仅供参考,可能与您入住的房型略有差异,请知晓</view>
</view> </view>
</view> </view>
......
This diff is collapsed.
...@@ -291,6 +291,14 @@ ...@@ -291,6 +291,14 @@
childrenNumberBZC:0, childrenNumberBZC:0,
peoples: 2, peoples: 2,
interCurrent: 0, interCurrent: 0,
searchroomGroup: [
{
roomNum: 1,
numberOfAdults: 2,
numberOfChildren: 0,
ChildAgeDetails: ''
}
],
}, },
day: 0, day: 0,
startDay: "", startDay: "",
...@@ -375,6 +383,7 @@ ...@@ -375,6 +383,7 @@
this.startDay = obj.startDay; this.startDay = obj.startDay;
this.endDay = obj.endDay; this.endDay = obj.endDay;
this.day = obj.day; this.day = obj.day;
this.dayObj = obj
this.getCity() this.getCity()
this.getSearchCondition() this.getSearchCondition()
// this.getLocation() // this.getLocation()
...@@ -564,6 +573,7 @@ ...@@ -564,6 +573,7 @@
this.day = obj.day; this.day = obj.day;
this.dayObj = obj; this.dayObj = obj;
this.showTimePopup = false; this.showTimePopup = false;
this.$emit('getItem',this.parameters,this.dayObj)
}, },
closeDropdown() { closeDropdown() {
this.$refs.uDropdown.close(); this.$refs.uDropdown.close();
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
<view style="flex: 1; width: 100%; height: 1rpx"> <view style="flex: 1; width: 100%; height: 1rpx">
<canlendar @finish="chosenDateResult" title="日期和人数"></canlendar> <canlendar @finish="chosenDateResult" title="日期和人数"></canlendar>
</view> </view>
<view style="background: #ecf1f4; padding: 20rpx 0 50rpx 0;"> <view class="column" style="background: #ecf1f4; padding: 20rpx 0 50rpx 0;">
<view class="row line-flex" style="padding: 30rpx; background: #fff"> <view class="row line-flex" style="padding: 30rpx; background: #fff">
<text style="font-size: 28rpx; color: #111; font-weight: 500">房间</text> <text style="font-size: 28rpx; color: #111; font-weight: 500">房间</text>
<text style=" <text style="
...@@ -19,32 +19,59 @@ ...@@ -19,32 +19,59 @@
<u-number-box size="28" :min="1" :max="100000" v-model="parameters.rooms" <u-number-box size="28" :min="1" :max="100000" v-model="parameters.rooms"
@change="getRooms"></u-number-box> @change="getRooms"></u-number-box>
</view> </view>
<view class="row line-flex" style="padding: 30rpx; background: #fff"> <scroll-view :scroll-y="true" class="hotelScroll" style="max-height: 200rpx;">
<view style="padding: 0 10rpx;background: #fff">
<view class="row items-center" v-for="(item,index) in parameters.searchroomGroup"
style="padding-bottom: 20rpx;">
<view class="line-flex" style="height: 29px;margin-right: 10rpx;">房间{{ item.roomNum }}</view>
<view class="col">
<view class="row line-flex" style="margin-left: 20rpx;">
<view style="margin-right: 10rpx;">
<text style="font-size: 28rpx; color: #111; font-weight: 500">成人</text> <text style="font-size: 28rpx; color: #111; font-weight: 500">成人</text>
<!--
<text style=" <text style="
font-size: 22rpx; font-size: 22rpx;
color: #999; color: #999;
margin-left: 30rpx; margin-left: 30rpx;
flex: 1; flex: 1;
">18周岁以上</text> ">18周岁以上</text>-->
</view>
<u-number-box size="28" :min="1" <u-number-box size="28" :min="1"
:max="100000" :max="9"
v-model="parameters.adultsNumber" v-model="item.numberOfAdults"
@change="crChange"></u-number-box> @change="(e)=>{crChange(e,index)}"></u-number-box>
</view> </view>
<view class="row line-flex" style="padding: 30rpx; background: #fff"> <view class="row line-flex" style="margin-left: 20rpx;">
<text style="font-size: 28rpx; color: #111; font-weight: 500">儿童(占床)</text> <view style="margin-right: 10rpx;">
<text style="font-size: 28rpx; color: #111; font-weight: 500">儿童
<!--(占床)-->
</text>
<!--
<text style=" <text style="
font-size: 22rpx; font-size: 22rpx;
color: #999; color: #999;
margin-left: 30rpx; margin-left: 30rpx;
flex: 1; flex: 1;
">2-18周岁(不含)</text> ">2-18周岁(不含)</text>-->
<u-number-box size="28" :min="0" :max="100000" </view>
v-model="parameters.childrenNumberZC" <u-number-box size="28" :min="0" :max="5"
@change="etChange" v-model="item.numberOfChildren"
@change="(e)=>{etChange(e,index)}"
style="margin-right: 10rpx;"
></u-number-box> ></u-number-box>
<text style="font-size: 28rpx; color: #111; font-weight: 500;">年龄</text>
<u-number-box size="28" :min="1" :max="12"
v-model="item.ChildAgeDetails"
@change="(e)=>{ageChange(e,index)}"
style="margin-left: 10rpx;"
></u-number-box>
</view>
</view> </view>
</view>
</view>
</scroll-view>
<!-- <!--
<view class="row line-flex" style="padding: 30rpx; background: #fff"> <view class="row line-flex" style="padding: 30rpx; background: #fff">
<text style="font-size: 28rpx; color: #111; font-weight: 500">儿童(不占床)</text> <text style="font-size: 28rpx; color: #111; font-weight: 500">儿童(不占床)</text>
...@@ -89,18 +116,42 @@ export default { ...@@ -89,18 +116,42 @@ export default {
}, },
methods: { methods: {
getRooms(e){ getRooms(e){
if(e.value>this.parameters.rooms||e.value<this.parameters.rooms){
if(e.value>this.parameters.rooms){
this.parameters.searchroomGroup.push({
roomNum: e.value,
numberOfAdults: 1,
numberOfChildren: 0,
ChildAgeDetails: ''
})
}
if(e.value<this.parameters.rooms){
this.parameters.searchroomGroup.splice(e.value,1)
}
this.parameters.rooms = e.value; this.parameters.rooms = e.value;
this.peopleChange()
}
},
ageChange(e,index){
this.parameters.searchroomGroup[index].ChildAgeDetails = e.value;
}, },
etChange(e){ etChange(e,index){
this.parameters.childrenNumberZC = e.value; this.parameters.searchroomGroup[index].numberOfChildren = e.value;
this.peopleChange() this.peopleChange()
}, },
crChange(e){ crChange(e,index){
this.parameters.adultsNumber = e.value; this.parameters.searchroomGroup[index].numberOfAdults = e.value;
this.peopleChange() this.peopleChange()
}, },
peopleChange(){ peopleChange(){
this.parameters.peoples = Number(this.parameters.adultsNumber) + Number(this.parameters.childrenNumberZC) this.parameters.peoples = 0
this.parameters.adultsNumber = 0
this.parameters.childrenNumberZC = 0
this.parameters.searchroomGroup.forEach((item,index)=>{
this.parameters.peoples+= (Number(item.numberOfAdults) + Number(item.numberOfChildren))
this.parameters.adultsNumber+= Number(item.numberOfAdults)
this.parameters.childrenNumberZC+= Number(item.numberOfChildren)
})
}, },
chosenDateResult(obj) { chosenDateResult(obj) {
this.showTimePopup = false; this.showTimePopup = false;
......
...@@ -243,7 +243,6 @@ export default { ...@@ -243,7 +243,6 @@ export default {
uni.getStorage({ uni.getStorage({
key: "Time", key: "Time",
success: (res) => { success: (res) => {
console.log(res);
if (res && res.data) { if (res && res.data) {
var obj = JSON.parse(res.data); var obj = JSON.parse(res.data);
this.start = this.setDefaultDate(obj.start); this.start = this.setDefaultDate(obj.start);
...@@ -344,13 +343,11 @@ export default { ...@@ -344,13 +343,11 @@ export default {
} }
if (this.priceStauts.length > 0) { if (this.priceStauts.length > 0) {
console.log(this.lastNot);
for (var i = newVal[0]; i < this.priceStauts.length; i++) { for (var i = newVal[0]; i < this.priceStauts.length; i++) {
if (i == newVal[0]) { if (i == newVal[0]) {
for (var j = newVal[1]; j < this.priceStauts[i].length; j++) { for (var j = newVal[1]; j < this.priceStauts[i].length; j++) {
if (this.priceStauts[i][j] == -1) { if (this.priceStauts[i][j] == -1) {
this.lastNot = [i, j]; this.lastNot = [i, j];
console.log(this.lastNot);
return; return;
} }
} }
...@@ -358,7 +355,6 @@ export default { ...@@ -358,7 +355,6 @@ export default {
for (var j = 0; j < this.priceStauts[i].length; j++) { for (var j = 0; j < this.priceStauts[i].length; j++) {
if (this.priceStauts[i][j] == -1) { if (this.priceStauts[i][j] == -1) {
this.lastNot = [i, j]; this.lastNot = [i, j];
console.log(this.lastNot);
return; return;
} }
} }
...@@ -652,6 +648,7 @@ export default { ...@@ -652,6 +648,7 @@ export default {
"-" + "-" +
endDay, endDay,
day: this.day, day: this.day,
year: this.date[this.start[0]].year,
}; };
/*此处应把需要的数据进行保存,如入住离开日期...添加到vuex然后再进行跳转到上一页 /*此处应把需要的数据进行保存,如入住离开日期...添加到vuex然后再进行跳转到上一页
......
This diff is collapsed.
...@@ -2,7 +2,11 @@ ...@@ -2,7 +2,11 @@
<view class="hotel-list column" style="background: #F3F1EF;"> <view class="hotel-list column" style="background: #F3F1EF;">
<view class="hotel-listHeader"> <view class="hotel-listHeader">
<hotelHeaders :title="pageTitle"></hotelHeaders> <hotelHeaders :title="pageTitle"></hotelHeaders>
<hotelSearch :msg="searchObj" :isMap="1" @change="change"></hotelSearch> <hotelSearch
:msg="searchObj"
:isMap="1"
@change="change"
@getItem="getItem"></hotelSearch>
<!-- <view style="padding: 9rpx 30rpx 19rpx 30rpx;"> <!-- <view style="padding: 9rpx 30rpx 19rpx 30rpx;">
<scroll-view :scroll-x="true"> <scroll-view :scroll-x="true">
<view class="ComprehensiveSortings row"> <view class="ComprehensiveSortings row">
...@@ -65,9 +69,6 @@ ...@@ -65,9 +69,6 @@
// City: 262, //市 // City: 262, //市
// District: 0, //区 // District: 0, //区
}, },
day: 0,
startDay: "",
endDay: "",
HotelList: [], //酒店数据 HotelList: [], //酒店数据
tempRateAndPrice: { tempRateAndPrice: {
price: {}, price: {},
...@@ -124,27 +125,35 @@ ...@@ -124,27 +125,35 @@
let Day2 = day2>9?day2:'0'+day2; let Day2 = day2>9?day2:'0'+day2;
var obj = { var obj = {
start: `${d1.getFullYear()}-${Month1}-${Day1}`, start: `${d1.getFullYear()}-${Month1}-${Day1}`,
end: `${d2.getFullYear()}-${Month2}-${Day2}`, end: `${d1.getFullYear()}-${Month2}-${Day2}`,
startDay: `${Month1}-${Day1}`, startDay: `${Month1}-${Day1}`,
endDay: `${Month2}-${Day2}`, endDay: `${Month2}-${Day2}`,
day: 1, day: 1,
startWeek: startWeek, startWeek: startWeek,
endWeek: endWeek, endWeek: endWeek,
startTime: `${d1.getFullYear()}-${Month1}-${Day1}`,
endTime: `${d1.getFullYear()}-${Month2}-${Day2}`
}; };
this.dayObj = obj; this.dayObj = obj;
uni.setStorage({ uni.setStorage({
key: "Time", key: "Time",
data: JSON.stringify(obj), data: JSON.stringify(obj),
}); });
// this.searchObj.QStartDate = obj.start;
// this.searchObj.QEndDate = obj.end;
this.startDay = obj.startDay;
this.endDay = obj.endDay;
this.day = obj.day;
this.getSearchCondition(); this.getSearchCondition();
// this.getList(); // this.getList();
}, },
methods: { methods: {
getItem(parameters,obj) {
this.searchObj = {
...this.searchObj,
...parameters
}
this.dayObj = {
...obj,
startTime: `${obj.year}-${obj.startDay}`,
endTime: `${obj.year}-${obj.endDay}`
}
},
scroll(e) { scroll(e) {
this.old.scrollTop = e.detail.scrollTop; this.old.scrollTop = e.detail.scrollTop;
}, },
......
...@@ -2,7 +2,8 @@ ...@@ -2,7 +2,8 @@
<view class="hotel-list column" style="background: #F3F1EF;"> <view class="hotel-list column" style="background: #F3F1EF;">
<view class="hotel-listHeader"> <view class="hotel-listHeader">
<hotelHeaders :title="pageTitle"></hotelHeaders> <hotelHeaders :title="pageTitle"></hotelHeaders>
<hotelSearch @change="change"></hotelSearch> <hotelSearch @change="change"
@getItem="getItem"></hotelSearch>
</view> </view>
<view style="height: 1px;flex: 1;overflow: hidden;position: relative;"> <view style="height: 1px;flex: 1;overflow: hidden;position: relative;">
<!-- :latitude="latitude" :longitude="longitude" :markers="covers" --> <!-- :latitude="latitude" :longitude="longitude" :markers="covers" -->
...@@ -33,7 +34,7 @@ ...@@ -33,7 +34,7 @@
current==index?'active':'', current==index?'active':'',
nextCurrent==index?'activeNext':'',]"> nextCurrent==index?'activeNext':'',]">
<view class="hotelMapList"> <view class="hotelMapList">
<hotel-good :item="item" :isMap="1"></hotel-good> <hotel-good :item="item" :dayObj="dayObj" :searchObj="searchObj" :isMap="1"></hotel-good>
</view> </view>
</swiper-item> </swiper-item>
</swiper> </swiper>
...@@ -208,6 +209,13 @@ ...@@ -208,6 +209,13 @@
// this.getLocation() // this.getLocation()
}, },
methods: { methods: {
getItem(obj) {
this.dayObj = {
...obj,
startTime: `${obj.year}-${obj.startDay}`,
endTime: `${obj.year}-${obj.endDay}`
}
},
handleCalloutClick(marker) { handleCalloutClick(marker) {
console.log('点击了标记:', marker.detail); console.log('点击了标记:', marker.detail);
// 可自定义弹窗逻辑或跳转页面 // 可自定义弹窗逻辑或跳转页面
......
This diff is collapsed.
This diff is collapsed.
...@@ -73,6 +73,7 @@ export default { ...@@ -73,6 +73,7 @@ export default {
}); });
} else if (this.isLineOrder == 3) num = '6'//签证订单 } else if (this.isLineOrder == 3) num = '6'//签证订单
else if (this.isLineOrder == 4) num = '1'//机票订单 else if (this.isLineOrder == 4) num = '1'//机票订单
else if (this.isLineOrder == 5) num = '8,9,10,11'//酒店订单
if(num){ if(num){
uni.redirectTo({ uni.redirectTo({
url: `/pages/AggregateOrders/AggregateOrdersList?OrderTypeStr=${num}`, url: `/pages/AggregateOrders/AggregateOrdersList?OrderTypeStr=${num}`,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment