Commit f70ead0e authored by 黄奎's avatar 黄奎

页面修改

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