Commit e00f1c23 authored by zhengke's avatar zhengke

修改

parent 3ed0e1b5
......@@ -24,7 +24,7 @@
<view class="rm-opera" v-if="item.Inventory>0&&item.Inventory<5">
<!-- 如果库存少于5显示 -->
<view class="warm-count">{{item.Inventory}}</view>
<view class="buy" @click="previewOrder">
<view class="buy" @click="previewOrder(item)">
<view class="buy-content"></view>
<view class="buy-tips">在线订</view>
</view>
......@@ -45,12 +45,21 @@
RoomList: {
type: Array,
default: null
},
dayObj: {
type: Object,
default: null
},
hotelData: {
type: Object,
default: null
}
},
methods: {
previewOrder() {
previewOrder(item) {
console.log(item,'数据');
uni.navigateTo({
url: "/pages/hotel/order"
url: "/pages/hotel/order?RoomInfo="+ JSON.stringify(item) + '&dayObj=' + JSON.stringify(this.dayObj) + '&HotelInfo=' + JSON.stringify(this.hotelData)
})
},
},
......
......@@ -116,7 +116,7 @@
<view v-for="(x,i) in threeLevelList" class="item" @click="changeRoomType(x)" :class="{'active':x.isCheck==1}">{{x.name}}</view>
</view>
<view class="room-list">
<room-good :RoomList="RoomList"></room-good>
<room-good :RoomList="RoomList" :dayObj="dayObj" :hotelData="hotelData"></room-good>
<!-- <room-good-test></room-good-test> -->
</view>
</view>
......@@ -259,7 +259,8 @@
isShowAll: false, //显示全部
HotelArr:[] ,//推荐酒店
searchObj:{},
dayObj:{}
dayObj:{},
hotelData:{} //传递到房间预订组件
}
},
components: {
......@@ -290,13 +291,14 @@
this.getHotelDetail(this.id);
}
if (options.dayObj) {
console.log(options.dayObj,'options.dayObj');
var tempDay = JSON.parse(options.dayObj);
this.dayObj = tempDay;
this.roomMsg.StartDate = tempDay.StartDate;
this.roomMsg.EndDate = tempDay.EndDate;
this.day = tempDay.day;
this.startWeek = tempDay.startWeek;
this.endWeek = tempDay.endWeek;
this.dayObj = tempDay;
}
if(options.searchObj){
this.searchObj = JSON.parse(options.searchObj);
......@@ -359,6 +361,9 @@
this.endWeek = obj.endWeek;
this.day = obj.day;
this.getRoomType();
this.dayObj.StartDate = obj.start;
this.dayObj.EndDate = obj.end;
this.dayObj.day = obj.day;
this.showTimePopup = false
},
//切换日期获取房型
......@@ -525,6 +530,9 @@
console.log(res, '详情数据');
this.dataList = res.data;
this.RoomList = this.dataList.RoomList;
this.hotelData.HotelId = this.dataList.HotelId;
this.hotelData.HotelName = this.dataList.HotelName;
this.hotelData.Booking = this.dataList.Booking;
}
}
);
......
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