Commit f70ead0e authored by 黄奎's avatar 黄奎

页面修改

parent 7ee86425
......@@ -10,7 +10,7 @@
<!-- TODO:判定是否为星级酒店,如果是显示星级,不是,显示另外一种方式 -->
<view class="rate" v-if="item.Star>=1&&item.Star<=5">
<u-rate active-color="#FEB969" inactive-color="#FFF" :current="item.Star" active-icon="star" inactive-icon="star" disabled></u-rate>
<text style="margin-left: 20rpx;vertical-align: top;">{{item.StarName}}</text>
<text style="margin-left: 20rpx;vertical-align: top;">{{item.Star}}</text>
</view>
<view class="other-rate" v-if="item.Star==9">
<text>温泉酒店</text>
......
......@@ -2,9 +2,16 @@
<view>
<view class="room-good" v-for="(item,index) in RoomList">
<view class="rm-left">
<image src="https://ak-d.tripcdn.com/images/0206l120008hti7x86A59_R_1080_808_R5_D.jpg" mode="aspectFill">
</image>
<view class="mark">12</view>
<template v-if="item.RoomImage&&item.RoomImage.length>0">
<image :src="item.RoomImage[0].Path" mode="aspectFill">
</image>
<view class="mark">{{item.RoomImage.length}}</view>
</template>
<template v-else>
<image src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/default_room.jpg" mode="aspectFill">
</image>
<view class="mark"></view>
</template>
</view>
<view class="rm-right">
<view class="room-name">{{item.RoomName}}</view>
......
......@@ -117,7 +117,6 @@
</view>
<view class="room-list">
<room-good :RoomList="RoomList"></room-good>
<!-- <room-good-test></room-good-test> -->
</view>
</view>
</view>
......@@ -127,13 +126,24 @@
<text>订房须知</text>
</view>
<ul class="title-style-one">
<li v-for="(sItem,sIndex) in dataList.Booking" :key="sIndex">
<li v-for="(sItem,sIndex) in dataList.Booking" :key="sIndex" v-if="sItem.Name!='入离时间'">
<view class="item-title">{{sItem.Name}}</view>
<view class="item-content">
{{sItem.Content}}
</view>
</li>
</ul>
<template v-for="(sItem,sIndex) in dataList.Booking" v-if="sItem.Name=='入离时间'">
<view class="big-title" :key="sIndex">
<text>入离规则</text>
</view>
<ul class="title-style-one">
<li>
<view class="item-title king regular">{{sItem.Content[0]}}</view>
<view class="item-title king regular">{{sItem.Content[1]}}</view>
</li>
</ul>
</template>
<view class="big-title">
<text>设施服务</text>
</view>
......@@ -192,7 +202,6 @@
<script>
import roomGood from './components/room-good.vue';
import nearGood from './components/near-good.vue';
import recommedHotel from './components/recommed-hotel.vue';
import canlendar from "./components/time/index.vue"
......@@ -257,14 +266,13 @@
RoomList: [], //可过滤房间
dataList: {}, //数据
isShowAll: false, //显示全部
HotelArr:[] ,//推荐酒店
searchObj:{},
dayObj:{}
HotelArr: [], //推荐酒店
searchObj: {},
dayObj: {}
}
},
components: {
roomGood,
nearGood,
recommedHotel,
canlendar
......@@ -297,15 +305,15 @@
this.day = tempDay.day;
this.startWeek = tempDay.startWeek;
this.endWeek = tempDay.endWeek;
}
if(options.searchObj){
}
if (options.searchObj) {
this.searchObj = JSON.parse(options.searchObj);
}
this.getRecomHotel();
},
methods: {
//获取推荐酒店
getRecomHotel(){
getRecomHotel() {
this.searchObj.HotelId = this.id
this.request2({
url: '/api/Hotel/AppGetHotelPage',
......@@ -313,11 +321,11 @@
},
res => {
if (res.resultCode == 1) {
console.log(res,'推荐酒店');
this.HotelArr=[];
console.log(res, '推荐酒店');
this.HotelArr = [];
let tempHotel = res.data.pageData;
tempHotel.forEach(x=>{
if(this.HotelArr.length<2){
tempHotel.forEach(x => {
if (this.HotelArr.length < 2) {
this.HotelArr.push(x);
}
})
......@@ -349,7 +357,7 @@
openDescription() {
let hotelObj = JSON.stringify(this.dataList);
uni.navigateTo({
url: "/pages/hotel/description?hotelObj="+encodeURIComponent(hotelObj)
url: "/pages/hotel/description?hotelObj=" + encodeURIComponent(hotelObj)
})
},
chosenDateResult(obj) {
......@@ -362,7 +370,7 @@
this.showTimePopup = false
},
//切换日期获取房型
getRoomType(){
getRoomType() {
this.request2({
url: '/api/Hotel/GetHotelRoom',
data: this.roomMsg
......@@ -390,7 +398,7 @@
return d > 9 ? d : "0" + d
},
getWeek(date) {
console.log(date,'date');
console.log(date, 'date');
let day = date.getDay();
if (day === 1) {
var week = "一";
......@@ -448,10 +456,10 @@
if (x.id == 3 && y.BedType == 3) {
this.RoomList.push(y)
}
if (x.id == 3 && y.BedType == 4) {
if (x.id == 4 && y.BreakfastType != 4) {
this.RoomList.push(y)
}
if (x.id == 4 && y.IsCancel == 5) {
if (x.id == 5 && y.IsCancel == 2) {
this.RoomList.push(y)
}
})
......@@ -462,7 +470,7 @@
} else {
this.isShowAll = false;
}
if(num==0){
if (num == 0) {
this.RoomList = this.dataList.RoomList;
}
},
......
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