Commit 70a06bdb authored by zhengke's avatar zhengke

修改

parent 4ed981d2
...@@ -42,6 +42,10 @@ ...@@ -42,6 +42,10 @@
HotelList: { HotelList: {
type: Array, type: Array,
default: null default: null
},
dayObj:{
type: Object,
default: null
} }
}, },
data() { data() {
...@@ -54,8 +58,9 @@ ...@@ -54,8 +58,9 @@
}, },
methods:{ methods:{
goHotelDetail(id){ goHotelDetail(id){
let myDayObj = JSON.stringify(this.dayObj);
uni.navigateTo({ uni.navigateTo({
url: "/pages/hotel/detail?id=" + id url: "/pages/hotel/detail?id=" + id + '&dayObj=' + myDayObj
}); });
} }
} }
......
<template> <template>
<view class="room-good"> <view>
<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"> <image src="https://ak-d.tripcdn.com/images/0206l120008hti7x86A59_R_1080_808_R5_D.jpg" mode="aspectFill">
</image> </image>
<view class="mark">12</view> <view class="mark">12</view>
</view> </view>
<view class="rm-right"> <view class="rm-right">
<view class="room-name">藏韵高级双床房</view> <view class="room-name">{{item.RoomName}}</view>
<view class="f11"> <view class="f11">
<text class="king" style="margin-right: 14rpx;">含早餐</text> <text class="king" style="margin-right: 14rpx;">{{item.BreakfastTypeStr}}</text>
<text>1.5m大床 2人入住 24㎡ 有窗</text> <text>{{item.BedTypeStr}} {{item.ServiceNumber}}人入住 {{item.RoomSize}}{{item.HasWindowStr}}</text>
</view> </view>
<viwe class="give f11"> <viwe class="give f11" v-if="item.Description">
免费专辑接机 + 送沟口 + 1张情景演出票 {{item.Description}}
</viwe> </viwe>
<view class="f11 king" style="margin-top:15rpx;">入住当天18:00前可免费取消</view> <view class="f11 king" style="margin-top:15rpx;">{{item.IsCancelStr}}</view>
<view class="price"> <view class="price">
<text class="f11" style="margin-right: 10rpx;"></text> <text class="f11" style="margin-right: 10rpx;"></text>
<text>889</text> <text>{{item.B2BPrice}}</text>
</view> </view>
</view> </view>
<view class="rm-opera"> <view class="rm-opera" v-if="item.Inventory>0&&item.Inventory<5">
<!-- 如果库存少于5显示 --> <!-- 如果库存少于5显示 -->
<view class="warm-count">剩2</view> <view class="warm-count">{{item.Inventory}}</view>
<view class="buy" @click="previewOrder"> <view class="buy" @click="previewOrder">
<view class="buy-content"></view> <view class="buy-content"></view>
<view class="buy-tips">在线订</view> <view class="buy-tips">在线订</view>
</view> </view>
</view> </view>
<view class="rm-opera" v-if="item.Inventory==0">
<view class="buy disabled">
<view class="buy-content"></view>
<view class="buy-tips">已抢完</view>
</view>
</view>
</view>
</view> </view>
</template> </template>
<script> <script>
export default { export default {
props: {
RoomList: {
type: Array,
default: null
}
},
methods: { methods: {
previewOrder(){ previewOrder() {
uni.navigateTo({ uni.navigateTo({
url:"/pages/hotel/order" url: "/pages/hotel/order"
}) })
}, },
}, },
...@@ -63,7 +77,8 @@ ...@@ -63,7 +77,8 @@
width: 1px; width: 1px;
flex: 1; flex: 1;
} }
.room-good .rm-opera{
.room-good .rm-opera {
margin-left: 10rpx; margin-left: 10rpx;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
...@@ -71,14 +86,16 @@ ...@@ -71,14 +86,16 @@
justify-items: center; justify-items: center;
align-items: center; align-items: center;
} }
.room-good .rm-opera .warm-count{
.room-good .rm-opera .warm-count {
text-align: center; text-align: center;
font-size: 18rpx; font-size: 18rpx;
font-weight: 500; font-weight: 500;
color: #111111; color: #111111;
margin-bottom: 10rpx; margin-bottom: 10rpx;
} }
.room-good .rm-opera .buy{
.room-good .rm-opera .buy {
width: 70rpx; width: 70rpx;
height: 81rpx; height: 81rpx;
background: #FFFFFF; background: #FFFFFF;
...@@ -87,26 +104,31 @@ ...@@ -87,26 +104,31 @@
display: flex; display: flex;
flex-direction: column; flex-direction: column;
} }
.room-good .rm-opera .buy.disabled{
.room-good .rm-opera .buy.disabled {
background: #EBEBEB; background: #EBEBEB;
border: 2rpx solid #DCDCDC; border: 2rpx solid #DCDCDC;
} }
.room-good .rm-opera .buy.disabled .buy-tips{
.room-good .rm-opera .buy.disabled .buy-tips {
background: #A09E9E; background: #A09E9E;
color: #fff; color: #fff;
} }
.room-good .rm-opera .buy.disabled .buy-content{
.room-good .rm-opera .buy.disabled .buy-content {
color: #A09E9E; color: #A09E9E;
} }
.room-good .rm-opera .buy .buy-tips{
.room-good .rm-opera .buy .buy-tips {
height: 27rpx; height: 27rpx;
background: #000000; background: #000000;
text-align: center; text-align: center;
color:#DFBE6E; color: #DFBE6E;
font-size: 18rpx; font-size: 18rpx;
line-height: 27rpx; line-height: 27rpx;
} }
.room-good .rm-opera .buy .buy-content{
.room-good .rm-opera .buy .buy-content {
height: 1px; height: 1px;
flex: 1; flex: 1;
text-align: center; text-align: center;
...@@ -117,6 +139,7 @@ ...@@ -117,6 +139,7 @@
font-weight: 800; font-weight: 800;
color: #111111; color: #111111;
} }
.room-good .rm-right .room-name { .room-good .rm-right .room-name {
font-size: 30rpx; font-size: 30rpx;
font-weight: 800; font-weight: 800;
...@@ -139,13 +162,13 @@ ...@@ -139,13 +162,13 @@
-webkit-line-clamp: 2; -webkit-line-clamp: 2;
line-clamp: 2; line-clamp: 2;
-webkit-box-orient: vertical; -webkit-box-orient: vertical;
margin-top:15rpx; margin-top: 15rpx;
} }
.room-good .rm-right .price{ .room-good .rm-right .price {
font-weight: 800; font-weight: 800;
font-size: 40rpx; font-size: 40rpx;
color:#111; color: #111;
} }
.room-good .rm-left { .room-good .rm-left {
......
...@@ -2,17 +2,15 @@ ...@@ -2,17 +2,15 @@
<view class="hotel-detail"> <view class="hotel-detail">
<scroll-view scroll-y="true" style="width: 100%;height: 100%;" @scroll="scroll"> <scroll-view scroll-y="true" style="width: 100%;height: 100%;" @scroll="scroll">
<view class="media" :style="{'opacity':(100-boxOption)+'%'}"> <view class="media" :style="{'opacity':(100-boxOption)+'%'}">
<u-swiper :list="imgsList" :effect3d="false" :height="545" :interval="5000" :border-radius="0" <u-swiper :list="dataList.HotelImg" :effect3d="false" :height="545" :interval="5000" :border-radius="0" @click="previewImage"
@click="previewImage" name="picUrl" v-if="active==1"></u-swiper> name="Path" v-if="active==1"></u-swiper>
<view class="video-box" v-if="active==0"> <view class="video-box" v-if="active==0">
<video id="myVideo" :src="detailData.VideoUrl" style="width: 100%;height: 100%;" <video id="myVideo" :src="detailData.VideoUrl" style="width: 100%;height: 100%;" :controls='controls'
:controls='controls' :show-center-play-btn='false' :show-fullscreen-btn='false' :show-center-play-btn='false' :show-fullscreen-btn='false' @fullscreenchange='videoControl' object-fit='fill'></video>
@fullscreenchange='videoControl' object-fit='fill'></video>
<view @click="enlarge" class="play-btn"> <view @click="enlarge" class="play-btn">
<!-- 播放按钮 --> <!-- 播放按钮 -->
<image <image src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1616471847000_345.png" style="width: 37rpx;height: 44rpx;"
src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1616471847000_345.png" mode=""></image>
style="width: 37rpx;height: 44rpx;" mode=""></image>
</view> </view>
</view> </view>
<!-- <view class="type-box" v-if="videoUrl!=''"> <!-- <view class="type-box" v-if="videoUrl!=''">
...@@ -24,16 +22,16 @@ ...@@ -24,16 +22,16 @@
<view class="media-info"> <view class="media-info">
<view class="flex"> <view class="flex">
<view class="mi-left"> <view class="mi-left">
<view v-if="imgsList.length>0" class="type-img-box" @click="openPicture"> <view v-if="dataList.HotelImg.length>0" class="type-img-box" @click="openPicture">
<image :src="imgsList[0].picUrl" mode="aspectFill"></image> <image :src="dataList.HotelImg[0].Path" mode="aspectFill"></image>
<view class="content"> <view class="content">
<!-- <u-icon name="photo" size="26" color="#FFF"></u-icon> --> <!-- <u-icon name="photo" size="26" color="#FFF"></u-icon> -->
<text>{{imgsList.length}}</text> <text>{{dataList.HotelImg.length}}</text>
</view> </view>
</view> </view>
</view> </view>
<view class="mi-right"> <view class="mi-right">
<view style="font-size: 40rpx;font-weight: 600;text-align: right;margin-bottom: 6rpx;" class="king">5星</view> <view style="font-size: 40rpx;font-weight: 600;text-align: right;margin-bottom: 6rpx;" class="king">{{dataList.StarName}}</view>
<view style="font-weight: 500;color:#dfbe6e99;text-align: right;" class="f12">658人下单入住</view> <view style="font-weight: 500;color:#dfbe6e99;text-align: right;" class="f12">658人下单入住</view>
<!-- <view class="flex"> <!-- <view class="flex">
<text style="color:white;margin-right: 14rpx;" class="f12">星级</text> <text style="color:white;margin-right: 14rpx;" class="f12">星级</text>
...@@ -43,8 +41,7 @@ ...@@ -43,8 +41,7 @@
</view> </view>
</view> </view>
<view @click="goback" :style="[titleStyle,{opacity:'100% !important'}]" <view @click="goback" :style="[titleStyle,{opacity:'100% !important'}]" style="position: fixed;top: 0;left: 0;padding-left: 6rpx;">
style="position: fixed;top: 0;left: 0;padding-left: 6rpx;">
<u-icon name="arrow-left" size="44" color="#FFF" style="margin-top: 22rpx;"></u-icon> <u-icon name="arrow-left" size="44" color="#FFF" style="margin-top: 22rpx;"></u-icon>
</view> </view>
</view> </view>
...@@ -52,33 +49,31 @@ ...@@ -52,33 +49,31 @@
<view @click="goback"> <view @click="goback">
<u-icon name="arrow-left" size="44"></u-icon> <u-icon name="arrow-left" size="44"></u-icon>
</view> </view>
<view style="flex: 1;margin-left: 30rpx; text-align: left;">眉山黑龙滩长岛天堂洲际酒店</view> <view style="flex: 1;margin-left: 30rpx; text-align: left;">{{dataList.HotelName}}</view>
</view> </view>
<view class="hotel-content"> <view class="hotel-content">
<view class="hotel-base"> <view class="hotel-base">
<view class="head"> <view class="head">
<view style="flex:1;"> <view style="flex:1;">
<view class="hotel-name">九寨沟星宇国际大酒店</view> <view class="hotel-name">{{dataList.HotelName}}</view>
<view class="hotel-tag">亲子设施 | 江河景房 | 环境安静 | 全家出游</view> <view class="hotel-tag">
<text v-for="(subItem,subIndex) in dataList.TagList" :key="subIndex">{{subItem}}
<text style="margin:0 10rpx;" v-if="subIndex!=dataList.TagList.length-1">|</text>
</text>
</view>
</view> </view>
<!-- 关注 --> <!-- 关注 -->
<view class="op-box"> <view class="op-box">
<image <image src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1621940804000_709.png" style="margin-right: 17rpx;"></image>
src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1621940804000_709.png" <image v-if="!islike" src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1621940804000_61.png"
style="margin-right: 17rpx;"></image>
<image v-if="!islike"
src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1621940804000_61.png"
@click="changeLike"></image> @click="changeLike"></image>
<image v-if="islike" <image v-if="islike" src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1621940804000_953.png"
src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1621940804000_953.png"
@click="changeLike"></image> @click="changeLike"></image>
</view> </view>
</view> </view>
<view class="shebei"> <view class="shebei">
<view class="sb-left"> <view class="sb-left">
<view class="sb-item">2014年开业</view> <view class="sb-item" v-for="(subItem,sIndex) in dataList.PublicFacilities">{{subItem}}</view>
<view class="sb-item">2017年装修</view>
<view class="sb-item">免费停车场</view>
</view> </view>
<view class="sb-right"> <view class="sb-right">
<text style="margin-right: 20rpx;">设施/详情</text> <text style="margin-right: 20rpx;">设施/详情</text>
...@@ -89,11 +84,10 @@ ...@@ -89,11 +84,10 @@
<view class="loc-left"> <view class="loc-left">
<view class="loc-name"> <view class="loc-name">
<u-icon name="location" size="28" /> <u-icon name="location" size="28" />
<text style="margin-left: 14rpx;">沟口 | 九寨沟风景区沟口</text> <text style="margin-left: 14rpx;">{{dataList.Address}}</text>
</view> </view>
<view class="loc-remark"> <view class="loc-remark">
<view>距浦东国际机场14.5km,驾车约19min</view> <view>{{dataList.AddressDes}}</view>
<view>距车站约1km,驾车约5min</view>
</view> </view>
</view> </view>
<view class="loc-right"> <view class="loc-right">
...@@ -103,27 +97,27 @@ ...@@ -103,27 +97,27 @@
</view> </view>
<view class="date-box flex" @click="showTimePopup=true"> <view class="date-box flex" @click="showTimePopup=true">
<view class="date"> <view class="date">
<text>{{searchObj.date.startDay}}</text> <text>{{roomMsg.StartDate}}</text>
<text class="date-week">{{searchObj.date.startWeek}}</text> <text class="date-week">{{searchObj.date.startWeek}}</text>
</view> </view>
<view class="hr-line"></view> <view class="hr-line"></view>
<view class="date"> <view class="date">
<text>{{searchObj.date.endDay}}</text> <text>{{roomMsg.EndDate}}</text>
<text class="date-week">{{searchObj.date.endWeek}}</text> <text class="date-week">{{searchObj.date.endWeek}}</text>
</view> </view>
<view class="ver-line"></view> <view class="ver-line"></view>
<view class="date"> <view class="date">
共 · {{searchObj.date.day}} 共 · {{day}}
</view> </view>
</view> </view>
<view class="hotel-room"> <view class="hotel-room">
<view class="room-type"> <view class="room-type">
<view v-for="(x,i) in threeLevelList" class="item" @click="changeRoomType(i)" <view class="item" :class="{'active':isShowAll}" @click="getAllRoom()">全部</view>
:class="{'active':currentRoomType==i}">{{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></room-good> <room-good :RoomList="RoomList"></room-good>
<room-good-test></room-good-test> <!-- <room-good-test></room-good-test> -->
</view> </view>
</view> </view>
</view> </view>
...@@ -133,44 +127,19 @@ ...@@ -133,44 +127,19 @@
<text>订房须知</text> <text>订房须知</text>
</view> </view>
<ul class="title-style-one"> <ul class="title-style-one">
<li> <li v-for="(sItem,sIndex) in dataList.Booking" :key="sIndex">
<view class="item-title">酒店提示</view> <view class="item-title">{{sItem.Name}}</view>
<view class="item-content">疫情期间,酒店不提供早餐,请佩戴好口罩。</view> <view class="item-content">
</li> {{sItem.Content}}
<li>
<view class="item-title">儿童政策</view>
<view class="item-content">不接受18岁以下客人单独入住。不含儿童早餐。
加床政策、儿童人数请参见您所选定的客房政策,若超过房型限定人数,可能需收取额外费用。提出的任何要求均需获得酒店的确认,所有服务详情以酒店告知为准。</view>
</li>
<li>
<view class="item-title">宠物政策</view>
<view class="item-content">不可携带宠物。</view>
</li>
</ul>
<view class="big-title">
<text>入离规则</text>
</view> </view>
<ul class="title-style-one">
<li>
<view class="item-title king regular">入住时间:14:00以后</view>
<view class="item-title king regular">退房时间:13:00以前</view>
</li> </li>
</ul> </ul>
<view class="big-title"> <view class="big-title">
<text>设施服务</text> <text>设施服务</text>
</view> </view>
<ul class="title-style-one hr"> <ul class="title-style-one hr">
<li> <li v-for="(vItem,vIndex) in dataList.ServiceItems" :key="vIndex">
<view class="item-title regular">接机服务</view> <view class="item-title regular">{{vItem}}</view>
</li>
<li>
<view class="item-title regular">叫醒服务</view>
</li>
<li>
<view class="item-title regular">洗衣服务</view>
</li>
<li>
<view class="item-title regular">健身房</view>
</li> </li>
</ul> </ul>
<view class="hotel-more-info" @click="openDescription">酒店详情</view> <view class="hotel-more-info" @click="openDescription">酒店详情</view>
...@@ -226,19 +195,7 @@ ...@@ -226,19 +195,7 @@
export default { export default {
data() { data() {
return { return {
imgsList: [{ imgsList: [],
picUrl: "https://ak-d.tripcdn.com/images/200j13000000v60wjE77D_R_1080_808_R5_D.jpg"
},
{
picUrl: "https://ak-d.tripcdn.com/images/t1/hotel/533000/532930/3fcc6398b3c44c08bb1b57aef579793e_R_1080_808_R5_D.jpg"
},
{
picUrl: "https://ak-d.tripcdn.com/images/20010r000000hmqk32EF2_R_1080_808_R5_D.jpg"
},
{
picUrl: "https://ak-d.tripcdn.com/images/200v0f0000007d6wgBCD6_R_1080_808_R5_D.jpg"
}
],
id: 0, id: 0,
typeList: [{ typeList: [{
Id: 0, Id: 0,
...@@ -255,36 +212,45 @@ ...@@ -255,36 +212,45 @@
videoUrl: "https://video.c-ctrip.com/videos/230i1r000001hxb2mEEE4.mp4", videoUrl: "https://video.c-ctrip.com/videos/230i1r000001hxb2mEEE4.mp4",
active: 1, active: 1,
islike: false, islike: false,
currentRoomType: 0,
nearbyType: 0, nearbyType: 0,
searchObj: { searchObj: {
date: {} date: {}
}, },
roomMsg:{
HotelId:0,
StartDate:'',
EndDate:''
},
day:0,
threeLevelList: [{ threeLevelList: [{
name: "全部", name: "单人床",
id: 0 id: 1,
isCheck: 0
}, },
{ {
name: "大床房", name: "大床房",
id: 1 id: 2,
isCheck: 0
}, },
{ {
name: "双床房", name: "双床房",
id: 2 id: 3,
isCheck: 0
}, },
{ {
name: "含早餐", name: "含早餐",
id: 3 id: 4,
isCheck: 0
}, },
{ {
name: "可取消", name: "可取消",
id: 4 id: 5,
}, isCheck: 0
{
name: "优惠活动",
id: 5
} }
] ],
RoomList: [], //可过滤房间
dataList: {}, //数据
isShowAll: false, //显示全部
} }
}, },
components: { components: {
...@@ -295,26 +261,10 @@ ...@@ -295,26 +261,10 @@
canlendar canlendar
}, },
created() { created() {
let d1 = new Date();
let d = new Date();
let d2 = new Date(d.setDate(d.getDate() + 1))
var obj = {
start: `${d1.getFullYear()}-${d1.getMonth()+1}-${d1.getDate()}`,
end: `${d2.getFullYear()}-${d2.getMonth()+1}-${d2.getDate()}`,
startDay: `${this.getMonth(d1)}${d1.getDate()}日`,
endDay: `${this.getMonth(d1)}${d1.getDate()}日`,
startWeek: this.getWeek(d1),
endWeek: this.getWeek(d2),
day: 1
}
uni.setStorage({
key: 'Time',
data: JSON.stringify(obj)
})
this.searchObj.date = obj
}, },
onLoad(options) { onLoad(options) {
// this.id=options.id this.id = options.id
// this.ProjectType=options.type // this.ProjectType=options.type
let that = this let that = this
uni.getSystemInfo({ uni.getSystemInfo({
...@@ -327,16 +277,26 @@ ...@@ -327,16 +277,26 @@
}, },
}); });
this.mainColor = this.$uiConfig.mainColor; this.mainColor = this.$uiConfig.mainColor;
if (this.id > 0) {
this.getHotelDetail(this.id);
}
if(options.dayObj){
var tempDay = JSON.parse(options.dayObj);
this.roomMsg.StartDate = tempDay.StartDate;
this.roomMsg.EndDate = tempDay.EndDate;
this.day = tempDay.day;
console.log(options.dayObj);
}
}, },
methods: { methods: {
goMap(name, lon, lat) { goMap(name, lon, lat) {
wx.openLocation({ wx.openLocation({
latitude:lat, latitude: lat,
longitude:lon, longitude: lon,
scale: 18, scale: 18,
name, name,
address:"武侯区科华中路 2 号", address: "武侯区科华中路 2 号",
success:(res)=>{ success: (res) => {
// console.log(res) // console.log(res)
}, },
fail: (err) => { fail: (err) => {
...@@ -344,14 +304,15 @@ ...@@ -344,14 +304,15 @@
} }
}) })
}, },
openPicture(){ openPicture() {
let imgObj = JSON.stringify(this.dataList.HotelImg);
uni.navigateTo({ uni.navigateTo({
url:"/pages/hotel/picture" url: "/pages/hotel/picture?imgObj=" + imgObj
}) })
}, },
openDescription(){ openDescription() {
uni.navigateTo({ uni.navigateTo({
url:"/pages/hotel/description" url: "/pages/hotel/description"
}) })
}, },
...@@ -397,8 +358,56 @@ ...@@ -397,8 +358,56 @@
changeNearbyType(t) { changeNearbyType(t) {
this.nearbyType = t this.nearbyType = t
}, },
changeRoomType(i) { //显示全部
this.currentRoomType = i getAllRoom() {
this.isShowAll = !this.isShowAll;
if (this.isShowAll) {
this.threeLevelList.forEach(x => {
x.isCheck = 1;
})
this.RoomList = this.dataList.RoomList;
} else {
this.threeLevelList.forEach(x => {
x.isCheck = 0;
})
}
},
//点击过滤房间
changeRoomType(obj) {
if (obj.isCheck == 0) {
obj.isCheck = 1
} else {
obj.isCheck = 0;
}
this.RoomList = [];
let num = 0;
this.threeLevelList.forEach(x => {
if (x.isCheck == 1) {
num++;
this.dataList.RoomList.forEach(y => {
if (x.id == 1 && y.BedType == 1) {
this.RoomList.push(y)
}
if (x.id == 2 && y.BedType == 2) {
this.RoomList.push(y)
}
if (x.id == 3 && y.BedType == 3) {
this.RoomList.push(y)
}
if (x.id == 3 && y.BedType == 4) {
this.RoomList.push(y)
}
if (x.id == 4 && y.IsCancel == 5) {
this.RoomList.push(y)
}
})
}
})
if (num == this.threeLevelList.length) {
this.isShowAll = true;
} else {
this.isShowAll = false;
}
}, },
changeLike() { changeLike() {
this.islike = !this.islike this.islike = !this.islike
...@@ -445,6 +454,25 @@ ...@@ -445,6 +454,25 @@
changeHandler(i) { changeHandler(i) {
this.active = i; this.active = i;
}, },
//获取酒店详情
getHotelDetail(id) {
let msg = {
HotelId: id
}
this.request2({
url: '/api/Hotel/GetHotelInfo',
data: msg
},
res => {
if (res.resultCode == 1) {
console.log(res, '详情数据');
this.dataList = res.data;
this.RoomList = this.dataList.RoomList;
}
}
);
}
}, },
} }
</script> </script>
...@@ -873,7 +901,7 @@ ...@@ -873,7 +901,7 @@
bottom: 0; bottom: 0;
left: 0; left: 0;
right: 0; right: 0;
padding:30rpx 50rpx; padding: 30rpx 50rpx;
} }
.hotel-detail .media .media-info .mi-left { .hotel-detail .media .media-info .mi-left {
......
...@@ -56,7 +56,7 @@ ...@@ -56,7 +56,7 @@
</view> </view>
<scroll-view :scroll-y="true" @scrolltolower="lower" :enable-back-to-top="true" :enable-flex="true" :scroll-top="scrollTop" <scroll-view :scroll-y="true" @scrolltolower="lower" :enable-back-to-top="true" :enable-flex="true" :scroll-top="scrollTop"
@scroll="scroll" style="height: calc(100% - 224rpx); padding-bottom: 0px;"> @scroll="scroll" style="height: calc(100% - 224rpx); padding-bottom: 0px;">
<hotel-good :HotelList="HotelList"></hotel-good> <hotel-good :HotelList="HotelList" :dayObj="dayObj"></hotel-good>
<u-loadmore v-if="showLoading" :status="status" :load-text="loadText" :font-size="24" :margin-top="20" <u-loadmore v-if="showLoading" :status="status" :load-text="loadText" :font-size="24" :margin-top="20"
:margin-bottom="20" bg-color="#F5F5F5" color="#111" /> :margin-bottom="20" bg-color="#F5F5F5" color="#111" />
</scroll-view> </scroll-view>
...@@ -167,7 +167,8 @@ ...@@ -167,7 +167,8 @@
}, },
showLoading:false, showLoading:false,
status: "loadmore", status: "loadmore",
page_count:0 page_count:0,
dayObj:{}
} }
}, },
components: { components: {
...@@ -348,7 +349,6 @@ ...@@ -348,7 +349,6 @@
}, },
//获取查询条件 //获取查询条件
getSearchCondition(){ getSearchCondition(){
console.log('进入了111');
this.request2({ this.request2({
url: '/api/Hotel/GetHotelQuery', url: '/api/Hotel/GetHotelQuery',
data: {} data: {}
...@@ -372,9 +372,7 @@ ...@@ -372,9 +372,7 @@
} }
if(tempObj&&tempObj.StarList){ if(tempObj&&tempObj.StarList){
this.rates = tempObj.StarList; this.rates = tempObj.StarList;
console.log(this.rates,'this.rates');
} }
console.log(res,'查询条件');
} }
}, },
err => { err => {
...@@ -385,7 +383,9 @@ ...@@ -385,7 +383,9 @@
//获取列表数据 //获取列表数据
getList(type){ getList(type){
this.searchObj.QStars = this.tempRateAndPrice.rate.toString(); this.searchObj.QStars = this.tempRateAndPrice.rate.toString();
console.log(this.searchObj); this.dayObj.StartDate = this.searchObj.QStartDate;
this.dayObj.EndDate = this.searchObj.QEndDate;
this.dayObj.day = this.day;
if(type==1){ if(type==1){
this.HotelList=[]; this.HotelList=[];
} }
...@@ -395,7 +395,6 @@ ...@@ -395,7 +395,6 @@
}, },
res => { res => {
if (res.resultCode == 1) { if (res.resultCode == 1) {
console.log(res,'查询列表数据');
this.HotelList = this.HotelList.concat(res.data.pageData); this.HotelList = this.HotelList.concat(res.data.pageData);
this.page_count = res.data.pageCount; this.page_count = res.data.pageCount;
} }
......
...@@ -3,13 +3,13 @@ ...@@ -3,13 +3,13 @@
<scroll-view scroll-y="true" class="hotel-pic"> <scroll-view scroll-y="true" class="hotel-pic">
<view class="content"> <view class="content">
<view class="left"> <view class="left">
<view v-for="(x,i) in jiList" :key="i" class="image-box" @click="previewImage(x.picUrl)"> <view v-for="(x,i) in jiList" :key="i" class="image-box" @click="previewImage(x.Path)">
<image :src="x.picUrl" mode="widthFix"></image> <image :src="x.Path" mode="widthFix"></image>
</view> </view>
</view> </view>
<view class="right"> <view class="right">
<view v-for="(x,i) in ouList" :key="i" class="image-box" @click="previewImage(x.picUrl)"> <view v-for="(x,i) in ouList" :key="i" class="image-box" @click="previewImage(x.Path)">
<image :src="x.picUrl" mode="widthFix"></image> <image :src="x.Path" mode="widthFix"></image>
</view> </view>
</view> </view>
</view> </view>
...@@ -21,126 +21,37 @@ ...@@ -21,126 +21,37 @@
export default { export default {
data() { data() {
return { return {
imageList:[ imageList:[],
{
picUrl:"https://ak-d.tripcdn.com/images/200j13000000v60wjE77D_R_1080_808_R5_D.jpg",
type:"酒店"
},
{
picUrl:"https://ak-d.tripcdn.com/images/t1/hotel/533000/532930/3fcc6398b3c44c08bb1b57aef579793e_R_1080_808_R5_D.jpg",
type:"酒店"
},
{
picUrl:"https://ak-d.tripcdn.com/images/20010r000000hmqk32EF2_R_1080_808_R5_D.jpg",
type:"酒店"
},
{
picUrl:"https://ak-d.tripcdn.com/images/200v0f0000007d6wgBCD6_R_1080_808_R5_D.jpg",
type:"酒店"
},
{
picUrl:"http://imgfile.oytour.com/Upload/DMC/202105251114114560000000058.png",
type:"酒店"
},
{
picUrl:"https://dimg07.c-ctrip.com/images/01066120008jk5bcc94AC_C_1600_1200.jpg",
type:"酒店"
},
{
picUrl:"https://ak-d.tripcdn.com/images/200j13000000v60wjE77D_R_1080_808_R5_D.jpg",
type:"酒店"
},
{
picUrl:"https://ak-d.tripcdn.com/images/t1/hotel/533000/532930/3fcc6398b3c44c08bb1b57aef579793e_R_1080_808_R5_D.jpg",
type:"酒店"
},
{
picUrl:"https://ak-d.tripcdn.com/images/20010r000000hmqk32EF2_R_1080_808_R5_D.jpg",
type:"酒店"
},
{
picUrl:"https://ak-d.tripcdn.com/images/200v0f0000007d6wgBCD6_R_1080_808_R5_D.jpg",
type:"酒店"
},
{
picUrl:"http://imgfile.oytour.com/Upload/DMC/202105251114114560000000058.png",
type:"酒店"
},
{
picUrl:"https://dimg07.c-ctrip.com/images/01066120008jk5bcc94AC_C_1600_1200.jpg",
type:"酒店"
},
{
picUrl:"https://ak-d.tripcdn.com/images/200j13000000v60wjE77D_R_1080_808_R5_D.jpg",
type:"酒店"
},
{
picUrl:"https://ak-d.tripcdn.com/images/t1/hotel/533000/532930/3fcc6398b3c44c08bb1b57aef579793e_R_1080_808_R5_D.jpg",
type:"酒店"
},
{
picUrl:"https://ak-d.tripcdn.com/images/20010r000000hmqk32EF2_R_1080_808_R5_D.jpg",
type:"酒店"
},
{
picUrl:"https://ak-d.tripcdn.com/images/200v0f0000007d6wgBCD6_R_1080_808_R5_D.jpg",
type:"酒店"
},
{
picUrl:"http://imgfile.oytour.com/Upload/DMC/202105251114114560000000058.png",
type:"酒店"
},
{
picUrl:"https://dimg07.c-ctrip.com/images/01066120008jk5bcc94AC_C_1600_1200.jpg",
type:"酒店"
},{
picUrl:"https://ak-d.tripcdn.com/images/200j13000000v60wjE77D_R_1080_808_R5_D.jpg",
type:"酒店"
},
{
picUrl:"https://ak-d.tripcdn.com/images/t1/hotel/533000/532930/3fcc6398b3c44c08bb1b57aef579793e_R_1080_808_R5_D.jpg",
type:"酒店"
},
{
picUrl:"https://ak-d.tripcdn.com/images/20010r000000hmqk32EF2_R_1080_808_R5_D.jpg",
type:"酒店"
},
{
picUrl:"https://ak-d.tripcdn.com/images/200v0f0000007d6wgBCD6_R_1080_808_R5_D.jpg",
type:"酒店"
},
{
picUrl:"http://imgfile.oytour.com/Upload/DMC/202105251114114560000000058.png",
type:"酒店"
},
{
picUrl:"https://dimg07.c-ctrip.com/images/01066120008jk5bcc94AC_C_1600_1200.jpg",
type:"酒店"
}
],
jiList:[], jiList:[],
ouList:[], ouList:[],
allImageSrc:[] allImageSrc:[]
} }
}, },
onLoad(options) {
if(options.imgObj){
this.imageList=JSON.parse(options.imgObj);
this.getSeperate();
}
},
created() { created() {
uni.setNavigationBarTitle({ uni.setNavigationBarTitle({
title: "酒店图片", title: "酒店图片",
}); });
},
mounted () {
},
methods: {
getSeperate(){
this.imageList.forEach((x,i)=>{ this.imageList.forEach((x,i)=>{
this.allImageSrc.push(x.picUrl) this.allImageSrc.push(x.Path)
if(i%2==0){ if(i%2==0){
this.jiList.push(x) this.jiList.push(x)
}else{ }else{
this.ouList.push(x) this.ouList.push(x)
} }
}) })
console.log(this.jiList,this.ouList)
}, },
mounted () {
},
methods: {
previewImage(src) { previewImage(src) {
uni.previewImage({ uni.previewImage({
urls: this.allImageSrc, urls: this.allImageSrc,
......
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