Commit f8c4bdaf authored by 黄奎's avatar 黄奎

页面修改

parent c0b4fe08
...@@ -52,26 +52,21 @@ ...@@ -52,26 +52,21 @@
<view class="column"> <view class="column">
<view class="hotelDetailRPrice"> <view class="hotelDetailRPrice">
{{subItem.Currency }} {{subItem.Currency }}
<text> <text v-if="subItem&&subItem.PriceList&&subItem.PriceList.length>0">
{{subItem.TotalPrice}} {{subItem.PriceList[0].Price}}
</text>起/晚 </text>起/晚/间
</view> </view>
<view class="hotelDetailRPriceT">{{dayObj.day}}晚总价 <view class="hotelDetailRPriceT">{{dayObj.day}}晚总价
<text> <text>
{{subItem.Currency}}{{ (subItem.TotalPrice*dayObj.day).toFixed(2) }} {{subItem.Currency}}{{ (subItem.TotalPrice).toFixed(2) }}起
</text> </text>
</view> </view>
</view> </view>
<!--:class="[!index?'active':'']"-->
<view class="column hotelDetailRPriceBook"> <view class="column hotelDetailRPriceBook">
<!--<text v-if="!index" class="hotelDetailMinXiRS">剩2间</text>-->
<view class="hotelDetailMinXiRB" @click="setOrder(subItem)"> <view class="hotelDetailMinXiRB" @click="setOrder(subItem)">
</view> </view>
</view> </view>
<!-- <view class="hotelDetailRPriceBook" @click="setOrder(subItem)">
</view> -->
</view> </view>
</view> </view>
</view> </view>
...@@ -111,13 +106,13 @@ ...@@ -111,13 +106,13 @@
<view class="hotelDetailMinXiRF"> </view> <view class="hotelDetailMinXiRF"> </view>
<view class="hotelDetailMinXiRP"> <view class="hotelDetailMinXiRP">
{{subItem.Currency }} {{subItem.Currency }}
<text> <text v-if="subItem&&subItem.PriceList&&subItem.PriceList.length>0">
{{subItem.TotalPrice}} {{subItem.PriceList[0].Price}}
</text> </text>起/晚/间
</view> </view>
<view class="hotelDetailMinXiRT">{{dayObj.day}}晚总价 <view class="hotelDetailMinXiRT">{{dayObj.day}}晚总价
<text> <text>
{{subItem.Currency}}{{ (subItem.TotalPrice*dayObj.day).toFixed(2) }} {{subItem.Currency}}{{ (subItem.TotalPrice).toFixed(2) }}起
</text> </text>
</view> </view>
</view> </view>
...@@ -405,6 +400,9 @@ ...@@ -405,6 +400,9 @@
hotelid: this.HotelInfo.hotelid, hotelid: this.HotelInfo.hotelid,
name: this.HotelInfo.name, name: this.HotelInfo.name,
images: [], images: [],
address: "",
destination: "",
country: "",
} }
if (this.HotelInfo) { if (this.HotelInfo) {
if (this.HotelInfo.images && this.HotelInfo.images.length > 0) { if (this.HotelInfo.images && this.HotelInfo.images.length > 0) {
...@@ -412,6 +410,17 @@ ...@@ -412,6 +410,17 @@
Path: this.HotelInfo.images[0].url Path: this.HotelInfo.images[0].url
}); });
} }
if (this.HotelInfo.location) {
if (this.HotelInfo.location.address) {
pHotel.address = encodeURIComponent(this.HotelInfo.location.address);
}
if (this.HotelInfo.location.country && this.HotelInfo.location.country.name) {
pHotel.country = this.HotelInfo.location.country.name;
}
if (this.HotelInfo.location.destination && this.HotelInfo.location.destination.name) {
pHotel.destination = this.HotelInfo.location.destination.name;
}
}
} }
uni.navigateTo({ uni.navigateTo({
url: `/pages/hotel/order?searchObj=${JSON.stringify(this.searchObj)}&HotelInfo=${JSON.stringify(pHotel)}&RoomInfo=${JSON.stringify(subItem)}&CreateBy=${createBy}`, url: `/pages/hotel/order?searchObj=${JSON.stringify(this.searchObj)}&HotelInfo=${JSON.stringify(pHotel)}&RoomInfo=${JSON.stringify(subItem)}&CreateBy=${createBy}`,
......
...@@ -100,8 +100,8 @@ ...@@ -100,8 +100,8 @@
联系姓名 联系姓名
</view> </view>
<view class="val row"> <view class="val row">
<input type="text" v-model="orderMsg.SurName" placeholder="请输入姓" /> <input type="text" v-model="orderMsg.guestLastName" placeholder="请输入姓" />
<input type="text" v-model="orderMsg.Name" placeholder="请输入名" /> <input type="text" v-model="orderMsg.guestFirstName" placeholder="请输入名" />
</view> </view>
</view> </view>
<view class="form-items"> <view class="form-items">
...@@ -146,7 +146,6 @@ ...@@ -146,7 +146,6 @@
<text class="content" style="color:grey" v-else-if="couponList.length==0">暂无优惠券</text> <text class="content" style="color:grey" v-else-if="couponList.length==0">暂无优惠券</text>
<text class="content" v-else <text class="content" v-else
:style="{ color: mainColor }">已优惠{{currentCoupon.discountMoney}} </text> :style="{ color: mainColor }">已优惠{{currentCoupon.discountMoney}} </text>
<!-- <u-icon name="ellipsis" size="36" v-if="couponList.length > 0"></u-icon> -->
</text> </text>
<u-icon name="arrow" :size="32" color="#111" v-if="couponList.length>0"></u-icon> <u-icon name="arrow" :size="32" color="#111" v-if="couponList.length>0"></u-icon>
</view> </view>
...@@ -166,7 +165,7 @@ ...@@ -166,7 +165,7 @@
<text style="margin-right: 5rpx;">{{orderMsg.RoomCount}}间房</text> <text style="margin-right: 5rpx;">{{orderMsg.RoomCount}}间房</text>
<text style="margin-right: 5rpx;">{{dayObj.day}}</text> <text style="margin-right: 5rpx;">{{dayObj.day}}</text>
<text class="red"> <text class="red">
{{RoomInfo.Currency}}{{(orderMsg.TotalPrice*orderMsg.RoomCount*dayObj.day).toFixed(2)}} {{RoomInfo.Currency}}{{(orderMsg.TotalPrice).toFixed(2)}}
</text> </text>
</view> </view>
</view> </view>
...@@ -176,16 +175,19 @@ ...@@ -176,16 +175,19 @@
</view> </view>
</view> </view>
<template
v-if="roomRateDetails&&roomRateDetails.RatePlanList&&roomRateDetails.RatePlanList.length>0">
<template v-for="subItem in roomRateDetails.RatePlanList">
<view class="flex f12 grey" style="margin-bottom: 40rpx"> <view class="flex f12 grey" style="margin-bottom: 40rpx">
<view style="flex: 1"> <view style="flex: 1">
<text style="margin-right: 30rpx">房间</text> <text style="margin-right: 30rpx">房间{{subItem.RoomOccupancy.RoomNum}}</text>
</view> </view>
<view style="text-align: right"> <view style="text-align: right">
{{orderMsg.RoomCount}}间×{{dayObj.day}}晚×{{RoomInfo.Currency}} {{(subItem.PriceList.length*subItem.PriceList[0].Price).toFixed(2)}}
<!--{{ getPrice(orderMsg.TotalPrice) }}-->
{{ orderMsg.TotalPrice }}
</view> </view>
</view> </view>
</template>
</template>
<view class="flex f12 grey" style="margin-bottom: 40rpx" <view class="flex f12 grey" style="margin-bottom: 40rpx"
:style="{'color':mainColor+' !important'}" v-if="useCouponIds.length>0"> :style="{'color':mainColor+' !important'}" v-if="useCouponIds.length>0">
<view style="flex: 1"> <view style="flex: 1">
...@@ -198,8 +200,7 @@ ...@@ -198,8 +200,7 @@
<view style="flex: 1">小计</view> <view style="flex: 1">小计</view>
<view> <view>
{{RoomInfo.Currency}} {{RoomInfo.Currency}}
<!--{{ (getPrice(orderMsg.TotalPrice)*orderMsg.RoomCount)-currentCoupon.discountMoney }}--> {{ (orderMsg.TotalPrice-currentCoupon.discountMoney).toFixed(2) }}
{{ ((orderMsg.TotalPrice*orderMsg.RoomCount*dayObj.day)-currentCoupon.discountMoney).toFixed(2) }}
</view> </view>
</view> </view>
</view> </view>
...@@ -242,9 +243,7 @@ ...@@ -242,9 +243,7 @@
<view class="price"> <view class="price">
<text class="f11">{{RoomInfo.Currency}}</text> <text class="f11">{{RoomInfo.Currency}}</text>
<text> <text>
<!--{{ (getPrice(orderMsg.TotalPrice)*orderMsg.RoomCount)-currentCoupon.discountMoney }}--> {{ (orderMsg.TotalPrice-currentCoupon.discountMoney).toFixed(2) }}
<!-- {{ (orderMsg.TotalPrice*orderMsg.RoomCount)-currentCoupon.discountMoney }} -->
{{ ((orderMsg.TotalPrice*orderMsg.RoomCount*dayObj.day)-currentCoupon.discountMoney).toFixed(2) }}
</text> </text>
</view> </view>
<view class="sum-detail">共计 {{orderMsg.RoomCount}}间房</view> <view class="sum-detail">共计 {{orderMsg.RoomCount}}间房</view>
...@@ -259,9 +258,7 @@ ...@@ -259,9 +258,7 @@
<u-toast ref="uToast" /> <u-toast ref="uToast" />
<u-picker mode="selector" v-model="showCountry" :default-selector="[0]" :range="countrys" <u-picker mode="selector" v-model="showCountry" :default-selector="[0]" :range="countrys"
@confirm='(e)=>{changeDown(e,CountryType)}' range-key="label" @input="showCountry=false"></u-picker> @confirm='(e)=>{changeDown(e,CountryType)}' range-key="label" @input="showCountry=false"></u-picker>
<!-- <coupon v-if="couponList.length > 0 && showCoupon" :price="getPrice(orderMsg.TotalPrice)" :list="couponList"
:current="useCouponIds" @close="closeCouponHandler" :order="orderMsg" :numberPeople="searchObj.peoples">
</coupon>-->
<coupon v-if="couponList.length > 0 && showCoupon" :price="orderMsg.TotalPrice" :list="couponList" <coupon v-if="couponList.length > 0 && showCoupon" :price="orderMsg.TotalPrice" :list="couponList"
:current="useCouponIds" @close="closeCouponHandler" :order="orderMsg" :numberPeople="searchObj.peoples"> :current="useCouponIds" @close="closeCouponHandler" :order="orderMsg" :numberPeople="searchObj.peoples">
</coupon> </coupon>
...@@ -306,18 +303,18 @@ ...@@ -306,18 +303,18 @@
RatePlanID: "", RatePlanID: "",
CheckOutDate: "", //离店时间 CheckOutDate: "", //离店时间
RoomCount: "", //房间数量 RoomCount: "", //房间数量
guestLastName: "", //英文姓 guestLastName: "", //英文姓
guestFirstName: "无误", //英文名 guestFirstName: "", //英文名
guestAddress: "", guestAddress: "",
guestPhoneNumber: "13344445555", guestPhoneNumber: "",
guestEmail: "123@qq.com", //Email guestEmail: "", //Email
BookingID: "", BookingID: "",
HotelName: "", //酒店名称 HotelName: "", //酒店名称
HotelPic: "", //酒店封面 HotelPic: "", //酒店封面
GuestList: [], GuestList: [],
TotalPrice: 0, //总价 TotalPrice: 0, //总价
CustomerPayMoney: 0, CustomerPayMoney: 0,
DiscountMoney: 0, //优惠 DiscountMoney: 0, //优惠金额
CouponAllotIds: '', //优惠券Id CouponAllotIds: '', //优惠券Id
// #ifdef MP-DI // #ifdef MP-DI
OrderSource: 7, OrderSource: 7,
...@@ -395,7 +392,7 @@ ...@@ -395,7 +392,7 @@
this.searchObj = JSON.parse(options.searchObj) this.searchObj = JSON.parse(options.searchObj)
} }
if (options.HotelInfo) { if (options.HotelInfo) {
this.HotelInfo = JSON.parse(options.HotelInfo) this.HotelInfo = JSON.parse(options.HotelInfo);
this.orderMsg.hotelId = this.HotelInfo.hotelid; this.orderMsg.hotelId = this.HotelInfo.hotelid;
this.orderMsg.HotelName = this.HotelInfo.name; this.orderMsg.HotelName = this.HotelInfo.name;
if (this.HotelInfo.images && this.HotelInfo.images.length > 0) { if (this.HotelInfo.images && this.HotelInfo.images.length > 0) {
...@@ -504,8 +501,8 @@ ...@@ -504,8 +501,8 @@
guestInfo += `儿童${this.searchObj.childrenNumberZC}; `; guestInfo += `儿童${this.searchObj.childrenNumberZC}; `;
} }
let msg = { let msg = {
SurName: this.orderMsg.SurName, SurName: this.orderMsg.guestLastName,
Name: this.orderMsg.Name, Name: this.orderMsg.guestFirstName,
ContactNumber: this.orderMsg.guestPhoneNumber, ContactNumber: this.orderMsg.guestPhoneNumber,
Mailbox: this.orderMsg.guestEmail, Mailbox: this.orderMsg.guestEmail,
GoodsId: this.HotelInfo.hotelid, GoodsId: this.HotelInfo.hotelid,
...@@ -543,7 +540,7 @@ ...@@ -543,7 +540,7 @@
} }
//道旅酒店参数 //道旅酒店参数
let that = this; let that = this;
var CreateBy = 0
//直客 //直客
// #ifdef MP-DI // #ifdef MP-DI
if (this.customer.salesBaseInfo && this.customer.salesBaseInfo.employeeId) { if (this.customer.salesBaseInfo && this.customer.salesBaseInfo.employeeId) {
...@@ -863,7 +860,6 @@ ...@@ -863,7 +860,6 @@
} }
return msg return msg
}, },
} }
} }
</script> </script>
......
<template> <template>
<view class="hotel-detail" v-if="roomRateDetails.RatePlanList&&roomRateDetails.RatePlanList.length>0"> <view class="hotel-detail" v-if="roomRateDetails.RatePlanList&&roomRateDetails.RatePlanList.length>0">
<scroll-view <scroll-view ref="scrollView" scroll-y="true" style="width: 100%; height: 100%" @scroll="scroll"
ref="scrollView" :scroll-top="scrollTop">
scroll-y="true" <view class="media" :style="{ opacity: 100 - boxOption + '%' }" @click="openPicture">
style="width: 100%; height: 100%" <u-swiper :list="HotelInfo.images" mode="number" :effect3d="false" :height="545" :interval="5000"
@scroll="scroll" :border-radius="0" name="Path"></u-swiper>
:scroll-top="scrollTop"
>
<view
class="media"
:style="{ opacity: 100 - boxOption + '%' }"
@click="openPicture"
>
<u-swiper
:list="HotelInfo.images"
mode="number"
:effect3d="false"
:height="545"
:interval="5000"
:border-radius="0"
name="Path"
></u-swiper>
<!--
<view class="video-box" v-if="active == 0">
<video
id="myVideo"
:src="detailData.VideoUrl"
style="width: 100%; height: 100%"
:controls="controls"
:show-center-play-btn="false"
:show-fullscreen-btn="false"
@fullscreenchange="videoControl"
object-fit="fill"
></video>
<view @click="enlarge" class="play-btn">
播放按钮
<image
src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1616471847000_345.png"
style="width: 37rpx; height: 44rpx"
mode=""
></image>
</view>
</view>-->
<!-- #ifdef MP-WEIXIN --> <!-- #ifdef MP-WEIXIN -->
<view <view @click="goback" :style="[titleStyle, { opacity: '100% !important' }]"
@click="goback" style="position: fixed; top: 0; left: 0; padding-left: 6rpx">
:style="[titleStyle, { opacity: '100% !important' }]" <u-icon name="arrow-left" size="44" color="#FFF" style="margin-top: 22rpx"></u-icon>
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>
</view> </view>
<!-- #endif --> <!-- #endif -->
<view class="orderIforDiZhi"> <view class="orderIforDiZhi">
<view class="orderIforDiZhiL">{{ HotelInfo.name }}</view> <view class="orderIforDiZhiL">{{ HotelInfo.name }}</view>
<view class="orderIforDiZhiR row"> <view class="orderIforDiZhiR row">
<view class="orderIforDiZhiRImg"> <view class="orderIforDiZhiRImg">
<img <img style="width: 23rpx;height:28rpx;"
style="width: 23rpx;height:28rpx;" src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Upload/Goods/638766148323678002.png" />
src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Upload/Goods/638766148323678002.png"/>
</view> </view>
<view class="orderIforDiZhiRText"> <view class="orderIforDiZhiRText">
{{ HotelInfo.address }}, {{ HotelInfo.address }},
...@@ -78,13 +32,9 @@ ...@@ -78,13 +32,9 @@
<u-icon name="arrow-left" size="44"></u-icon> <u-icon name="arrow-left" size="44"></u-icon>
<!-- #endif --> <!-- #endif -->
</view> </view>
<view <view style="flex: 1; margin-left: 30rpx; text-align: left" class="name-ali">
style="flex: 1; margin-left: 30rpx; text-align: left"
class="name-ali"
>
{{ HotelInfo.name }} {{ HotelInfo.name }}
</view </view>
>
</view> </view>
<view class="ReservationInforBox"> <view class="ReservationInforBox">
<view class="ReservationInforTitle">预定信息</view> <view class="ReservationInforTitle">预定信息</view>
...@@ -102,12 +52,14 @@ ...@@ -102,12 +52,14 @@
</view> </view>
<view class="ResInforText row-sb-n"> <view class="ResInforText row-sb-n">
<view class="ResInforL">房型</view> <view class="ResInforL">房型</view>
<view class="ResInforR">{{roomRateDetails.RatePlanList[0].RatePlanName}}({{searchObj.rooms}}间)</view> <view class="ResInforR">{{roomRateDetails.RatePlanList[0].RatePlanName}}({{searchObj.rooms}}间)
</view>
</view> </view>
<view class="ResInforText row-sb-n"> <view class="ResInforText row-sb-n">
<view class="ResInforL">餐型</view> <view class="ResInforL">餐型</view>
<view class="ResInforR" v-if="roomRateDetails.RatePlanList && roomRateDetails.RatePlanList.length > 0"> <view class="ResInforR"
<template v-for="( itemp, indexp ) in roomRateDetails.RatePlanList[0].PriceList" > v-if="roomRateDetails.RatePlanList && roomRateDetails.RatePlanList.length > 0">
<template v-for="( itemp, indexp ) in roomRateDetails.RatePlanList[0].PriceList">
<template v-if="!indexp"> <template v-if="!indexp">
{{getMealtype(itemp.MealType)}} {{getMealtype(itemp.MealType)}}
<template v-if="itemp.MealAmount>0"> <template v-if="itemp.MealAmount>0">
...@@ -128,14 +80,16 @@ ...@@ -128,14 +80,16 @@
roomRateDetails.CancellationPolicyList && roomRateDetails.CancellationPolicyList &&
roomRateDetails.CancellationPolicyList.length > 0"> roomRateDetails.CancellationPolicyList.length > 0">
<template v-for="(itemCancella, index1) in roomRateDetails.CancellationPolicyList"> <template v-for="(itemCancella, index1) in roomRateDetails.CancellationPolicyList">
<template v-if="index1==0">{{ getformatDateStr(itemCancella.FromDate) }}之前免费取消</template> <template
v-if="index1==0">{{ getformatDateStr(itemCancella.FromDate) }}之前免费取消</template>
<template v-if="itemCancella.Amount==roomRateDetails.TotalPrice"> <template v-if="itemCancella.Amount==roomRateDetails.TotalPrice">
<template>{{ getformatDateStr(itemCancella.FromDate) }}起不可取消,取消将收取订单全额费用;</template> <template>{{ getformatDateStr(itemCancella.FromDate) }}起不可取消,取消将收取订单全额费用;</template>
</template> </template>
<template v-else> <template v-else>
<template>{{ getformatDateStr(itemCancella.FromDate) }} <template>{{ getformatDateStr(itemCancella.FromDate) }}
<template v-if="index1!=(roomRateDetails.CancellationPolicyList.length-1)"> <template v-if="index1!=(roomRateDetails.CancellationPolicyList.length-1)">
-{{ getformatDateStr(roomRateDetails.CancellationPolicyList[index1+1].FromDate) }} 之间</template> -{{ getformatDateStr(roomRateDetails.CancellationPolicyList[index1+1].FromDate) }}
之间</template>
取消,收费 {{DanWei}}{{getPrice(itemCancella.Amount)}};</template> 取消,收费 {{DanWei}}{{getPrice(itemCancella.Amount)}};</template>
</template> </template>
</template> </template>
...@@ -146,15 +100,15 @@ ...@@ -146,15 +100,15 @@
<view class="ReservationInforBox"> <view class="ReservationInforBox">
<view class="ReservationInforTitle" @click="goback">立即确认</view> <view class="ReservationInforTitle" @click="goback">立即确认</view>
<view class="ResInforText ResInforTtisp row-sb-n"> <view class="ResInforText ResInforTtisp row-sb-n">
<view class="ResInforTisp">订单提交后,酒店将立即确认您的订单,保障您的住房需求。</view> <view class="ResInforTisp">订单支付后,酒店将立即确认您的订单,保障您的住房需求。</view>
</view> </view>
</view> </view>
<view style="height: 36rpx;"></view> <view style="height: 36rpx;"></view>
</scroll-view> </scroll-view>
</view> </view>
</template> </template>
<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";
...@@ -178,8 +132,7 @@ ...@@ -178,8 +132,7 @@
return { return {
imgsList: [], imgsList: [],
id: 0, id: 0,
typeList: [ typeList: [{
{
Id: 0, Id: 0,
Name: "视频", Name: "视频",
}, },
...@@ -204,8 +157,7 @@ ...@@ -204,8 +157,7 @@
EndDate: "", EndDate: "",
}, },
day: 0, day: 0,
threeLevelList: [ threeLevelList: [{
{
name: "单人床", name: "单人床",
id: 1, id: 1,
isCheck: 0, isCheck: 0,
...@@ -247,40 +199,55 @@ ...@@ -247,40 +199,55 @@
'https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/hotel5stars.png', 'https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/hotel5stars.png',
'https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Upload/Goods/638809441661552596.png', 'https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Upload/Goods/638809441661552596.png',
], ],
openImg:[ openImg: [
'https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Upload/Goods/638762717498946531.png', 'https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Upload/Goods/638762717498946531.png',
'https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Upload/Goods/638762717498917358.png' 'https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Upload/Goods/638762717498917358.png'
], ],
optionsTitle: ["房型", "床型", "餐食"], optionsTitle: ["房型", "床型", "餐食"],
hotelFacilities: [ hotelFacilities: [{
{Name: '酒店信息',ID:1,val:'hotelInfor',top:0,}, Name: '酒店信息',
{Name: '酒店政策',ID:2,val:'hotelPolicy',top:0,}, ID: 1,
{Name: '设施服务',ID:3,val:'hotelFacilities',top:0,}, val: 'hotelInfor',
top: 0,
},
{
Name: '酒店政策',
ID: 2,
val: 'hotelPolicy',
top: 0,
},
{
Name: '设施服务',
ID: 3,
val: 'hotelFacilities',
top: 0,
},
], ],
current: 1, current: 1,
scrollTop: 100, scrollTop: 100,
old:{ old: {
scrollTop: 0 scrollTop: 0
}, },
HotelInfo:{}, HotelInfo: {},
roomRateDetails:{}, roomRateDetails: {},
params:{}, params: {},
HotelMealTypes: [], HotelMealTypes: [],
}; };
}, },
created() { created() {
this.Up = uni.getStorageSync("mall_UserInfo") this.Up = uni.getStorageSync("mall_UserInfo") ?
? uni.getStorageSync("mall_UserInfo").UserPageType uni.getStorageSync("mall_UserInfo").UserPageType :
: 0; 0;
}, },
onLoad(options) { onLoad(options) {
if(options.msg){ if (options.msg) {
this.params = JSON.parse(decodeURIComponent(options.msg)) this.params = JSON.parse(decodeURIComponent(options.msg))
console.log(JSON.parse(decodeURIComponent(options.msg)))
} }
if(options.HotelInfo){ if (options.HotelInfo) {
this.HotelInfo = JSON.parse(options.HotelInfo) this.HotelInfo = JSON.parse(options.HotelInfo);
console.log(this.HotelInfo,'酒店详情') if (this.HotelInfo && this.HotelInfo.address) {
this.HotelInfo.address = decodeURIComponent(this.HotelInfo.address);
}
} }
this.id = options.id; this.id = options.id;
this.roomMsg.HotelId = options.id; this.roomMsg.HotelId = options.id;
...@@ -345,12 +312,11 @@ ...@@ -345,12 +312,11 @@
mask: true mask: true
}); });
this.apipost( this.apipost(
"dmc_post_GetDiDaPriceConfirm",this.params, "dmc_post_GetDiDaPriceConfirm", this.params,
res => { res => {
if (res.resultCode == 1) { if (res.resultCode == 1) {
uni.hideLoading(); uni.hideLoading();
this.roomRateDetails = res.data.PriceDetails.HotelList[0]; this.roomRateDetails = res.data.PriceDetails.HotelList[0];
console.log(this.roomRateDetails,'酒店详情')
this.dataList = res.data.PriceDetails; this.dataList = res.data.PriceDetails;
} }
}); });
...@@ -380,9 +346,9 @@ ...@@ -380,9 +346,9 @@
current: i, current: i,
longPressActions: { longPressActions: {
itemList: ["发送给朋友", "保存图片", "收藏"], itemList: ["发送给朋友", "保存图片", "收藏"],
success: function (data) {}, success: function(data) {},
fail: function (err) { fail: function(err) {
// console.log(err.errMsg);
}, },
}, },
}); });
...@@ -391,11 +357,11 @@ ...@@ -391,11 +357,11 @@
this.old.scrollTop = e.detail.scrollTop this.old.scrollTop = e.detail.scrollTop
this.boxOption = Math.floor((e.detail.scrollTop - 50) / 1.5); this.boxOption = Math.floor((e.detail.scrollTop - 50) / 1.5);
this.titleStyle.opacity = this.titleStyle.opacity =
e.detail.scrollTop - 100 < 0 e.detail.scrollTop - 100 < 0 ?
? 0 0 :
: Math.floor(e.detail.scrollTop - 100) / 100 > 1 Math.floor(e.detail.scrollTop - 100) / 100 > 1 ?
? 1 1 :
: Math.floor(e.detail.scrollTop - 100) / 100; Math.floor(e.detail.scrollTop - 100) / 100;
this.$forceUpdate(); this.$forceUpdate();
}, },
enlarge(file) { enlarge(file) {
...@@ -422,31 +388,30 @@ ...@@ -422,31 +388,30 @@
// #ifdef MP-WEIXIN // #ifdef MP-WEIXIN
//分享朋友圈 //分享朋友圈
onShareTimeline() { onShareTimeline() {
let uid = uni.getStorageSync("mall_UserInfo") let uid = uni.getStorageSync("mall_UserInfo") ?
? uni.getStorageSync("mall_UserInfo").UserId uni.getStorageSync("mall_UserInfo").UserId :
: 0; 0;
if (uid == 0) { if (uid == 0) {
uid = uni.getStorageSync("pid") ? uni.getStorageSync("pid").pid : 0; uid = uni.getStorageSync("pid") ? uni.getStorageSync("pid").pid : 0;
} }
let SmallShopId = uni.getStorageSync("mall_UserInfo") let SmallShopId = uni.getStorageSync("mall_UserInfo") ?
? uni.getStorageSync("mall_UserInfo").SmallShopId uni.getStorageSync("mall_UserInfo").SmallShopId :
: 0; 0;
if (SmallShopId == 0) { if (SmallShopId == 0) {
//如果微店id为0 去找所属微店id //如果微店id为0 去找所属微店id
SmallShopId = uni.getStorageSync("mall_UserInfo") SmallShopId = uni.getStorageSync("mall_UserInfo") ?
? uni.getStorageSync("mall_UserInfo").UserSmallShopId uni.getStorageSync("mall_UserInfo").UserSmallShopId :
: 0; 0;
} }
let title = this.dataList.HotelName ? this.dataList.HotelName : "帖子"; let title = this.dataList.HotelName ? this.dataList.HotelName : "帖子";
let imageUrl = let imageUrl =
this.dataList.HotelImg && this.dataList.HotelImg.length > 0 this.dataList.HotelImg && this.dataList.HotelImg.length > 0 ?
? this.dataList.HotelImg[0] this.dataList.HotelImg[0] :
: ""; "";
let id = this.id; let id = this.id;
return { return {
title: title, title: title,
query: query: "id=" +
"id=" +
this.id + this.id +
"&user_id=" + "&user_id=" +
uid + uid +
...@@ -477,8 +442,7 @@ ...@@ -477,8 +442,7 @@
} }
return { return {
title: this.dataList.HotelName ? this.dataList.HotelName : "帖子", title: this.dataList.HotelName ? this.dataList.HotelName : "帖子",
path: path: "/pages/index/index?id=" +
"/pages/index/index?id=" +
this.id + this.id +
"&user_id=" + "&user_id=" +
uid + uid +
...@@ -491,20 +455,18 @@ ...@@ -491,20 +455,18 @@
JSON.stringify(this.dayObj) + JSON.stringify(this.dayObj) +
"&searchObj=" + "&searchObj=" +
JSON.stringify(this.searchObj), JSON.stringify(this.searchObj),
imageUrl: imageUrl: this.dataList.HotelImg && this.dataList.HotelImg.length > 0 ?
this.dataList.HotelImg && this.dataList.HotelImg.length > 0 this.dataList.HotelImg[0] : "",
? this.dataList.HotelImg[0]
: "",
}; };
}, },
// #endif // #endif
}, },
}; };
</script> </script>
<style scoped> <style scoped>
@import url("@/asset/css/flex.css"); @import url("@/asset/css/flex.css");
.hotel-detail { .hotel-detail {
height: 100vh; height: 100vh;
overflow: hidden; overflow: hidden;
...@@ -629,17 +591,21 @@ ...@@ -629,17 +591,21 @@
line-height: 43rpx; line-height: 43rpx;
text-indent: 21rpx; text-indent: 21rpx;
} }
.hotel-detail .hotel-content .title-style-one item-title{
.hotel-detail .hotel-content .title-style-one item-title {
line-height: 36rpx; line-height: 36rpx;
} }
.hotel-detail .hotel-content .title-style-one .item-content{
.hotel-detail .hotel-content .title-style-one .item-content {
color: #B99846; color: #B99846;
margin-left: 5rpx; margin-left: 5rpx;
line-height: 36rpx; line-height: 36rpx;
} }
.title-style-one li{
.title-style-one li {
margin-bottom: 5rpx; margin-bottom: 5rpx;
} }
.hotel-detail .hotel-content .big-title { .hotel-detail .hotel-content .big-title {
position: relative; position: relative;
font-size: 32rpx; font-size: 32rpx;
...@@ -696,12 +662,7 @@ ...@@ -696,12 +662,7 @@
color: #ffffff; color: #ffffff;
} }
.hotel-detail .hotel-detail .hotel-content .hotel-base .hotel-room .room-type .item:last-child {
.hotel-content
.hotel-base
.hotel-room
.room-type
.item:last-child {
margin-right: 0; margin-right: 0;
} }
...@@ -766,7 +727,8 @@ ...@@ -766,7 +727,8 @@
font-weight: 500; font-weight: 500;
color: #6e6e6e; color: #6e6e6e;
} }
.hotel-Opening{
.hotel-Opening {
font-weight: 500; font-weight: 500;
font-size: 24rpx; font-size: 24rpx;
color: #B99846; color: #B99846;
...@@ -774,7 +736,8 @@ ...@@ -774,7 +736,8 @@
margin-bottom: 20rpx; margin-bottom: 20rpx;
display: inline-block; display: inline-block;
} }
.hotel-tagText{
.hotel-tagText {
background: #FFFFFF; background: #FFFFFF;
border-radius: 4rpx; border-radius: 4rpx;
border: 1rpx solid #B99846; border: 1rpx solid #B99846;
...@@ -787,6 +750,7 @@ ...@@ -787,6 +750,7 @@
padding: 0 12rpx; padding: 0 12rpx;
display: inline-block; display: inline-block;
} }
.hotel-detail .hotel-content .hotel-base .head .op-box image { .hotel-detail .hotel-content .hotel-base .head .op-box image {
width: 58rpx; width: 58rpx;
height: 58rpx; height: 58rpx;
...@@ -849,7 +813,7 @@ ...@@ -849,7 +813,7 @@
position: relative; position: relative;
z-index: 1; z-index: 1;
background: #fff; background: #fff;
box-shadow: 0rpx 14rpx 40rpx 0rpx rgba(76,76,76,0.06); box-shadow: 0rpx 14rpx 40rpx 0rpx rgba(76, 76, 76, 0.06);
border-radius: 0rpx 0rpx 40rpx 40rpx; border-radius: 0rpx 0rpx 40rpx 40rpx;
overflow: hidden; overflow: hidden;
} }
...@@ -940,6 +904,7 @@ ...@@ -940,6 +904,7 @@
.hotel-detail .media .media-info .mi-left { .hotel-detail .media .media-info .mi-left {
flex: 1; flex: 1;
} }
.detail_ShareBtn { .detail_ShareBtn {
width: 100%; width: 100%;
height: 100%; height: 100%;
...@@ -948,6 +913,7 @@ ...@@ -948,6 +913,7 @@
top: 0; top: 0;
opacity: 0; opacity: 0;
} }
.name-ali { .name-ali {
/* #ifdef MP-ALIPAY */ /* #ifdef MP-ALIPAY */
box-sizing: border-box; box-sizing: border-box;
...@@ -955,20 +921,23 @@ ...@@ -955,20 +921,23 @@
/* #endif */ /* #endif */
} }
.orderIforDiZhi{ .orderIforDiZhi {
padding: 27rpx 32rpx 41rpx 32rpx; padding: 27rpx 32rpx 41rpx 32rpx;
} }
.orderIforDiZhiL{
.orderIforDiZhiL {
font-weight: 800; font-weight: 800;
font-size: 32rpx; font-size: 32rpx;
color: #080A09; color: #080A09;
padding-bottom: 18rpx; padding-bottom: 18rpx;
} }
.orderIforDiZhiRImg{
.orderIforDiZhiRImg {
width: 23rpx; width: 23rpx;
margin-right: 13rpx; margin-right: 13rpx;
} }
.orderIforDiZhiRText{
.orderIforDiZhiRText {
width: 1px; width: 1px;
flex: 1; flex: 1;
font-weight: 500; font-weight: 500;
...@@ -976,22 +945,26 @@ ...@@ -976,22 +945,26 @@
color: #1D1D20; color: #1D1D20;
line-height: 38rpx; line-height: 38rpx;
} }
.ReservationInforBox{
.ReservationInforBox {
border-radius: 18rpx; border-radius: 18rpx;
background: #fff; background: #fff;
margin: 28rpx 31rpx 28rpx 31rpx; margin: 28rpx 31rpx 28rpx 31rpx;
padding: 37rpx 18rpx 49rpx 18rpx; padding: 37rpx 18rpx 49rpx 18rpx;
} }
.ReservationInforTitle{
.ReservationInforTitle {
font-weight: 800; font-weight: 800;
font-size: 32rpx; font-size: 32rpx;
color: #080A09; color: #080A09;
padding-bottom: 24rpx; padding-bottom: 24rpx;
} }
.ResInforText{
.ResInforText {
padding: 21rpx 19rpx; padding: 21rpx 19rpx;
} }
.ResInforL{
.ResInforL {
width: 120rpx; width: 120rpx;
text-align: right; text-align: right;
margin-right: 57rpx; margin-right: 57rpx;
...@@ -999,25 +972,27 @@ ...@@ -999,25 +972,27 @@
font-size: 28rpx; font-size: 28rpx;
color: #303133; color: #303133;
} }
.ResInforR{
.ResInforR {
width: 1px; width: 1px;
flex: 1; flex: 1;
font-weight: bold; font-weight: bold;
font-size: 28rpx; font-size: 28rpx;
color: #080A09; color: #080A09;
} }
.ResInforR.active{
.ResInforR.active {
color: #B99846; color: #B99846;
} }
.ResInforTisp{
.ResInforTisp {
font-weight: 500; font-weight: 500;
font-size: 24rpx; font-size: 24rpx;
color: #1D1D20; color: #1D1D20;
line-height: 42rpx; line-height: 42rpx;
} }
.ResInforText.ResInforTtisp{
.ResInforText.ResInforTtisp {
padding: 14rpx 19rpx 21rpx 19rpx; padding: 14rpx 19rpx 21rpx 19rpx;
} }
</style>
</style> \ No newline at end of file
\ No newline at end of file
...@@ -130,7 +130,7 @@ ...@@ -130,7 +130,7 @@
<view class="ResInforText row-sb-n"> <view class="ResInforText row-sb-n">
<view class="ResInforL Lwidth">联系姓名</view> <view class="ResInforL Lwidth">联系姓名</view>
<view class="ResInforR"> <view class="ResInforR">
{{ orderData.parmResultRoomInfo.SurName }}{{ orderData.parmResultRoomInfo.Name }} {{ orderData.parmResultRoomInfo.guestFirstName }}{{ orderData.parmResultRoomInfo.guestLastName }}
</view> </view>
</view> </view>
<view class="ResInforText row-sb-n"> <view class="ResInforText row-sb-n">
...@@ -169,13 +169,13 @@ ...@@ -169,13 +169,13 @@
<view class="form-items" style="border-bottom: none;padding: 20rpx 0;"> <view class="form-items" style="border-bottom: none;padding: 20rpx 0;">
<view class="label"> 明细 </view> <view class="label"> 明细 </view>
</view> </view>
<view class="flex f12 grey" style="margin-bottom: 40rpx" <view v-if="RatePlanList&&RatePlanList.length>0" class="flex f12 grey" style="margin-bottom: 40rpx"
v-for="(item,index) in orderData.parmResultRoomInfo.GuestList" :key="index"> v-for="(item,index) in RatePlanList" :key="index">
<view style="flex: 1"> <view style="flex: 1">
<text style="margin-right: 30rpx">房间数</text> <text style="margin-right: 30rpx">房间数 {{index+1}}</text>
</view> </view>
<view style="text-align: right"> <view style="text-align: right">
1间({{ item.GuestInfo.length }}人) × {{ DanWei }}{{ orderData.model.RoomPrice }} {{ DanWei }}{{ item.TotalPrice }}
</view> </view>
</view> </view>
...@@ -476,6 +476,8 @@ ...@@ -476,6 +476,8 @@
this.RatePlanList = res.data.parmResult.Success.BookingDetails.Hotel.RatePlanList this.RatePlanList = res.data.parmResult.Success.BookingDetails.Hotel.RatePlanList
this.DanWei = res.data.parmResult.Success.BookingDetails.Hotel.RatePlanList[0].Currency this.DanWei = res.data.parmResult.Success.BookingDetails.Hotel.RatePlanList[0].Currency
this.roomRateDetails = res.data.parmResult.Success.BookingDetails.Hotel this.roomRateDetails = res.data.parmResult.Success.BookingDetails.Hotel
} else {
this.initBookHotel()
} }
res.data.parmResultRoomInfo.GuestList.forEach((item, index) => { res.data.parmResultRoomInfo.GuestList.forEach((item, index) => {
this.roomNum++ this.roomNum++
...@@ -490,6 +492,63 @@ ...@@ -490,6 +492,63 @@
} }
); );
}, },
//未付款是初始化预定房型,餐型等,
initBookHotel() {
var cMsg = {
"sort": 1,
"displayFrom": 1,
"CheckInDate": this.orderData.parmResultRoomInfo.CheckInDate,
"CheckOutDate": this.orderData.parmResultRoomInfo.CheckOutDate,
"searchroomGroup": [],
"ratePlanID": this.orderData.parmResultRoomInfo.RatePlanID,
"imgUrl": "",
"RoomCount": this.orderData.parmResultRoomInfo.RoomCount,
"ChildCount": 0,
"AdultCount": 0,
"OccupancyDetails": [],
"hotelId": this.orderData.parmResultRoomInfo.hotelId
};
if (this.orderData.parmResultRoomInfo.GuestList && this.orderData.parmResultRoomInfo.GuestList.length >
0) {
this.orderData.parmResultRoomInfo.GuestList.forEach(item => {
var rObj = {
"roomNum": item.RoomNum,
"numberOfAdults": item.numberOfAdults,
"numberOfChildren": item.numberOfChildren,
"ChildAgeDetails": item.ChildAgeDetails,
"ChildAgeTexts": []
};
if (item.GuestInfo && item.GuestInfo.length > 0) {
item.GuestInfo.forEach(subItem => {
if (subItem.IsAdult == 0) {
rObj.ChildAgeTexts.push(subItem.Age);
}
})
}
cMsg.searchroomGroup.push(rObj)
})
}
uni.showLoading({
title: '加载中...',
mask: true
});
this.apipost(
"dmc_post_GetDiDaPriceConfirm", cMsg,
res => {
uni.hideLoading();
if (res.resultCode == 1) {
var tempData = res.data;
if (tempData && tempData.PriceDetails && tempData.PriceDetails.HotelList && tempData
.PriceDetails.HotelList.length > 0) {
this.RatePlanList = tempData.PriceDetails.HotelList[0].RatePlanList;
}
}
}, failed => {
uni.hideLoading();
console.log("failed", failed);
});
},
//日期格式化 //日期格式化
getformatDateStr(value) { getformatDateStr(value) {
var dt = new Date(value); var dt = new Date(value);
......
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