Commit d530c1da authored by 黄奎's avatar 黄奎

页面修改

parents f70ead0e 47dd0b29
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
<view class="rm-opera" v-if="item.Inventory>0&&item.Inventory<5"> <view class="rm-opera" v-if="item.Inventory>0&&item.Inventory<5">
<!-- 如果库存少于5显示 --> <!-- 如果库存少于5显示 -->
<view class="warm-count">剩{{item.Inventory}}间</view> <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-content"></view>
<view class="buy-tips">在线订</view> <view class="buy-tips">在线订</view>
</view> </view>
...@@ -52,12 +52,21 @@ ...@@ -52,12 +52,21 @@
RoomList: { RoomList: {
type: Array, type: Array,
default: null default: null
},
dayObj: {
type: Object,
default: null
},
hotelData: {
type: Object,
default: null
} }
}, },
methods: { methods: {
previewOrder() { previewOrder(item) {
console.log(item,'数据');
uni.navigateTo({ 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 @@ ...@@ -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 v-for="(x,i) in threeLevelList" class="item" @click="changeRoomType(x)" :class="{'active':x.isCheck==1}">{{x.name}}</view>
</view> </view>
<view class="room-list"> <view class="room-list">
<room-good :RoomList="RoomList"></room-good> <room-good :RoomList="RoomList" :dayObj="dayObj" :hotelData="hotelData"></room-good>
</view> </view>
</view> </view>
</view> </view>
...@@ -266,9 +266,10 @@ ...@@ -266,9 +266,10 @@
RoomList: [], //可过滤房间 RoomList: [], //可过滤房间
dataList: {}, //数据 dataList: {}, //数据
isShowAll: false, //显示全部 isShowAll: false, //显示全部
HotelArr: [], //推荐酒店 HotelArr:[] ,//推荐酒店
searchObj: {}, searchObj:{},
dayObj: {} dayObj:{},
hotelData:{} //传递到房间预订组件
} }
}, },
components: { components: {
...@@ -298,15 +299,15 @@ ...@@ -298,15 +299,15 @@
this.getHotelDetail(this.id); this.getHotelDetail(this.id);
} }
if (options.dayObj) { if (options.dayObj) {
console.log(options.dayObj,'options.dayObj');
var tempDay = JSON.parse(options.dayObj); var tempDay = JSON.parse(options.dayObj);
this.dayObj = tempDay;
this.roomMsg.StartDate = tempDay.StartDate; this.roomMsg.StartDate = tempDay.StartDate;
this.roomMsg.EndDate = tempDay.EndDate; this.roomMsg.EndDate = tempDay.EndDate;
this.day = tempDay.day; this.day = tempDay.day;
this.startWeek = tempDay.startWeek; this.startWeek = tempDay.startWeek;
this.endWeek = tempDay.endWeek; this.endWeek = tempDay.endWeek;
} }
if (options.searchObj) { if(options.searchObj){
this.searchObj = JSON.parse(options.searchObj); this.searchObj = JSON.parse(options.searchObj);
} }
this.getRecomHotel(); this.getRecomHotel();
...@@ -367,6 +368,9 @@ ...@@ -367,6 +368,9 @@
this.endWeek = obj.endWeek; this.endWeek = obj.endWeek;
this.day = obj.day; this.day = obj.day;
this.getRoomType(); this.getRoomType();
this.dayObj.StartDate = obj.start;
this.dayObj.EndDate = obj.end;
this.dayObj.day = obj.day;
this.showTimePopup = false this.showTimePopup = false
}, },
//切换日期获取房型 //切换日期获取房型
...@@ -533,6 +537,9 @@ ...@@ -533,6 +537,9 @@
console.log(res, '详情数据'); console.log(res, '详情数据');
this.dataList = res.data; this.dataList = res.data;
this.RoomList = this.dataList.RoomList; 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