Commit 202f43a3 authored by youjie's avatar youjie

酒店

parent 37e7e47f
...@@ -22,20 +22,23 @@ ...@@ -22,20 +22,23 @@
</view> </view>
<view class="autLoginGo" <view class="autLoginGo"
:class="[!showLogin?'':'active']" :class="[!showLogin?'':'active']"
@click="guestInfor.code==0&&guestInfor.IsEnd==0&&guest.length==0?'':goWebUrl()"> @click="!guestInfor.code&&!guestInfor.IsEnd&&!isGuest?'':goWebUrl()">
<template v-if="guestInfor.code==0&&guestInfor.IsEnd==0"> <template v-if="!guestInfor.code&&!guestInfor.IsEnd&&!isGuest">
去填写 去填写
</template> </template>
<template v-else> <template v-else>
查看 查看
</template> </template>
<button v-if="guestInfor.code==0&&guestInfor.IsEnd==0&&guest.length==0" <template v-if="!guestInfor.code&&!guestInfor.IsEnd&&!isGuest">
<button
class="getPhone" class="getPhone"
type="default" type="default"
open-type="getPhoneNumber" open-type="getPhoneNumber"
@getphonenumber="getPhoneNumber"> @getphonenumber="getPhoneNumber">
获取手机号 获取手机号
</button> </button>
</template>
</view> </view>
</view> </view>
...@@ -56,6 +59,7 @@ export default { ...@@ -56,6 +59,7 @@ export default {
guestInfor: null, guestInfor: null,
obj: null, obj: null,
showLogin: false, showLogin: false,
isGuest: false,
} }
}, },
onLoad(option) { onLoad(option) {
...@@ -153,7 +157,9 @@ export default { ...@@ -153,7 +157,9 @@ export default {
}, (res) => { }, (res) => {
if (res.resultCode == 1) { if (res.resultCode == 1) {
this.guestInfor = res.data; this.guestInfor = res.data;
this.guest = res.data.guest if(this.guestInfor.guest.length==1){
this.isGuest = true
}
if(this.guestInfor.guest&& if(this.guestInfor.guest&&
this.guestInfor.guest.length>0&& this.guestInfor.guest.length>0&&
this.guestInfor.guest.length==1){ this.guestInfor.guest.length==1){
...@@ -372,6 +378,7 @@ export default { ...@@ -372,6 +378,7 @@ export default {
}); });
}, },
goWebUrl() { goWebUrl() {
console.log(this.msg,"-----msg")
let url = `https://activity.oytour.com/html/ImpressionOpinionSurvey/opinionSurvey.html?TCID=${this.msg.TCID}&GuestId=${this.msg.Id}&OrderId=${this.msg.OrderId}&Phone=${this.msg.Phone}` let url = `https://activity.oytour.com/html/ImpressionOpinionSurvey/opinionSurvey.html?TCID=${this.msg.TCID}&GuestId=${this.msg.Id}&OrderId=${this.msg.OrderId}&Phone=${this.msg.Phone}`
if(process.env.NODE_ENV=="development") return console.log(url,"-----url") if(process.env.NODE_ENV=="development") return console.log(url,"-----url")
if (url && url.length > 0) { if (url && url.length > 0) {
......
...@@ -198,11 +198,17 @@ export default { ...@@ -198,11 +198,17 @@ export default {
}else{ }else{
this.$emit('searchKey',2,item.hotelid) this.$emit('searchKey',2,item.hotelid)
} }
this.HotelList = []
this.KeyCityList = []
this.parameters.KeyWords = ''
}, },
searchKey(){ searchKey(){
if(this.parameters.KeyWords==''||!this.parameters.KeyWords) return if(this.parameters.KeyWords==''||!this.parameters.KeyWords) return
this.$emit('searchKey',1,this.parameters.KeyWords) this.$emit('searchKey',1,this.parameters.KeyWords)
this.HotelList = []
this.KeyCityList = []
this.parameters.KeyWords = ''
}, },
searchCity(){ searchCity(){
if(this.showLoading)return if(this.showLoading)return
......
...@@ -2,9 +2,11 @@ ...@@ -2,9 +2,11 @@
<view class="hotelFacilitiesXinXi"> <view class="hotelFacilitiesXinXi">
<!--:style="{background: `url(${dataList.HotelImg[0].Path}) no-repeat`}"--> <!--:style="{background: `url(${dataList.HotelImg[0].Path}) no-repeat`}"-->
<view class="hotelInforBox"> <view class="hotelInforBox">
<image class="hotelInforBoxBj" mode="scaleToFill" :src="dataList.rooms[0].url" /> <image class="hotelInforBoxBj" mode="scaleToFill" :src="dataList.rooms[0].Path?dataList.rooms[0].Path:dataList.images[0].url" />
<view class="hotelInforCenterBox"> <view class="hotelInforCenterBox">
<view class="hotelInforTitle">{{ dataList.name }}</view> <view class="hotelInforTitle">
{{ dataList.name }}
</view>
<view class="hotelInforCenter column"> <view class="hotelInforCenter column">
<view class="hotelInforCB row-sb-n"> <view class="hotelInforCB row-sb-n">
<view class="hotelInforCBL">开业时间:<text>2015年</text></view> <view class="hotelInforCBL">开业时间:<text>2015年</text></view>
......
...@@ -71,8 +71,8 @@ ...@@ -71,8 +71,8 @@
热门房型 热门房型
</view> </view>
<view class="hotelDetail row"> <view class="hotelDetail row">
<view class="hotelDetailL"> <view class="hotelDetailL" @click="openPicture(item.images)">
<image mode="scaleToFill" :src="item.url"/> <image mode="heightFix" :src="item.Path"/>
<view class="hotelDetailLImgs" v-if="item.images.length>1"> <view class="hotelDetailLImgs" v-if="item.images.length>1">
{{ item.images.length }} {{ item.images.length }}
</view> </view>
...@@ -212,6 +212,12 @@ ...@@ -212,6 +212,12 @@
this.searchObj = this.search this.searchObj = this.search
}, },
methods: { methods: {
openPicture(item) {
let imgObj = JSON.stringify(item);
uni.navigateTo({
url: "/pages/hotel/picture?imgObj=" + imgObj,
});
},
//点击过滤房间 //点击过滤房间
changeRoomType(obj) { changeRoomType(obj) {
if (obj.isCheck == 0) { if (obj.isCheck == 0) {
...@@ -894,8 +900,8 @@ ...@@ -894,8 +900,8 @@
overflow: hidden; overflow: hidden;
box-shadow: 0rpx 10rpx 30rpx 0rpx rgba(36,36,36,0.2); box-shadow: 0rpx 10rpx 30rpx 0rpx rgba(36,36,36,0.2);
} }
.hotelDetailL img{ .hotelDetailL image{
width: auto; width: 100%;
height: 100%; height: 100%;
} }
.hotelDetailLImgs{ .hotelDetailLImgs{
......
...@@ -395,25 +395,35 @@ ...@@ -395,25 +395,35 @@
}, },
searchKey(type,key,City){ searchKey(type,key,City){
if(type==1){ if(type==1){
this.parameters.KeyWords = key
this.parameters.hotelId = null this.parameters.hotelId = null
this.parameters.GName = this.PopularCities[0].GName if(this.parameters.KeyWords!=key) {
this.parameters.CityCode = this.PopularCities[0].CityList[0].CityCode this.parameters.KeyWords = key
this.city = this.parameters.CityName = this.PopularCities[0].CityList[0].CityName }
// this.parameters.GName = this.PopularCities[0].GName
// this.parameters.CityCode = this.PopularCities[0].CityList[0].CityCode
// this.city = this.parameters.CityName = this.PopularCities[0].CityList[0].CityName
}else if(type==2){ }else if(type==2){
this.parameters.KeyWords = null this.parameters.KeyWords = null
if(this.parameters.hotelId!=key) {
this.parameters.hotelId = key this.parameters.hotelId = key
this.parameters.GName = this.PopularCities[0].GName }
this.parameters.CityCode = this.PopularCities[0].CityList[0].CityCode // this.parameters.GName = this.PopularCities[0].GName
this.city = this.parameters.CityName = this.PopularCities[0].CityList[0].CityName // this.parameters.CityCode = this.PopularCities[0].CityList[0].CityCode
// this.city = this.parameters.CityName = this.PopularCities[0].CityList[0].CityName
}else if(type==3){ }else if(type==3){
this.parameters.KeyWords = null this.parameters.KeyWords = null
this.parameters.hotelId = null this.parameters.hotelId = null
this.parameters.CityCode = key if(this.parameters.CityCode!=key) {
this.city = this.parameters.CityName = City this.city = this.parameters.CityName = City
this.parameters.CityCode2 = key
this.parameters.CityCode = key
}
} }
this.searchClose() this.searchClose()
this.getRegion()
this.research() this.research()
}, },
// 关键字搜索弹出层 // 关键字搜索弹出层
clickSearchCity(type){ clickSearchCity(type){
...@@ -462,9 +472,11 @@ ...@@ -462,9 +472,11 @@
this.research(); this.research();
}, },
resetRegion(){ resetRegion(){
this.cityList = this.cityListAll
this.optionsTitle[1] = '位置区域' this.optionsTitle[1] = '位置区域'
this.closeDropdown() this.closeDropdown()
this.parameters.regionCode = '' this.parameters.regionCode = ''
this.regionKeyWords = ''
if(this.parameters.CityCode!=this.parameters.CityCode2){ if(this.parameters.CityCode!=this.parameters.CityCode2){
this.parameters.CityCode = this.parameters.CityCode2 this.parameters.CityCode = this.parameters.CityCode2
this.research(); this.research();
......
...@@ -121,14 +121,19 @@ ...@@ -121,14 +121,19 @@
<text <text
v-for="(subItem, subIndex) in dataList.TagList" v-for="(subItem, subIndex) in dataList.TagList"
:key="subIndex" :key="subIndex"
class="hotel-tagText">{{ subItem }} class="hotel-tagText">{{ dataList.rooms[0].hasWifi }}
</text>
<text v-if="dataList.rooms[0].hasWifi"
class="hotel-tagText">WIFI
</text> </text>
</view> </view>
<view class="hotelDetaMapBox"> <view class="hotelDetaMapBox">
<view class="hotelDetaMap row items-center"> <view class="hotelDetaMap row items-center">
<view class="hotelDetaMapL" style="width: 1px;flex: 1;"> <view class="hotelDetaMapL" style="width: 1px;flex: 1;">
<view>{{dataList.Address}}</view> <view>{{dataList.location.address}}</view>
<view>{{dataList.AddressDes}}</view> <view>
{{ dataList.location.destination.name }}
</view>
</view> </view>
<view class="hotelMapIcon column" @click="goMap(dataList.location.address, dataList.location.coordinate.longitude, dataList.location.coordinate.latitude)"> <view class="hotelMapIcon column" @click="goMap(dataList.location.address, dataList.location.coordinate.longitude, dataList.location.coordinate.latitude)">
<img src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Upload/Goods/638759918587378741.png" <img src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Upload/Goods/638759918587378741.png"
...@@ -449,7 +454,7 @@ export default { ...@@ -449,7 +454,7 @@ export default {
}); });
}, },
openPicture() { openPicture() {
let imgObj = JSON.stringify(this.dataList.HotelImg); let imgObj = JSON.stringify(this.dataList.images);
uni.navigateTo({ uni.navigateTo({
url: "/pages/hotel/picture?imgObj=" + imgObj, url: "/pages/hotel/picture?imgObj=" + imgObj,
}); });
...@@ -626,17 +631,23 @@ export default { ...@@ -626,17 +631,23 @@ export default {
this.RoomList = [] this.RoomList = []
let arrList = function(list){ let arrList = function(list){
list.forEach(x=>{ list.forEach(x=>{
x.url = '' x.Path = ''
}) })
} }
arrList(res.data.rooms) arrList(res.data.rooms)
this.dataList = res.data; this.dataList = res.data;
for(let i=0;i<res.data.images.length;i++){
res.data.images[i].Path = res.data.images[i].url
}
for(let i=0;i<res.data.rooms.length;i++){ for(let i=0;i<res.data.rooms.length;i++){
let list = res.data.rooms[i].images.filter(x=>{ let list = res.data.rooms[i].images.filter(x=>{
return x.isDefault return x.isDefault
}) })
if(list.length>0) res.data.rooms[i].url = list[0].url res.data.rooms[i].images.forEach(x=>{
else res.data.rooms[i].url = res.data.rooms[i].images.length>0&&res.data.rooms[i].images[0].url?res.data.rooms[i].images[0].url:'' x.Path = x.url
})
if(list.length>0) res.data.rooms[i].Path = list[0].url
else res.data.rooms[i].Path = res.data.rooms[i].images.length>0&&res.data.rooms[i].images[0].url?res.data.rooms[i].images[0].url:''
this.RoomList.push(res.data.rooms[i]) this.RoomList.push(res.data.rooms[i])
} }
this.hotelData.hotelid = this.dataList.hotelid; this.hotelData.hotelid = this.dataList.hotelid;
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
</view> --> </view> -->
</view> </view>
<view style="height: 1px;flex: 1;overflow: hidden;"> <view style="height: 1px;flex: 1;overflow: hidden;">
<view class="no-data" v-if="HotelList.length === 0" style="margin-top: 200rpx;"> <view class="no-data" v-if="HotelList.length === 0&&!showLoading" style="margin-top: 200rpx;">
<image src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/CustomizedCar/no-data.png" <image src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/CustomizedCar/no-data.png"
mode="aspectFit" class="no-data-img"></image> mode="aspectFit" class="no-data-img"></image>
<view class="zhanwu"> 暂无数据 </view> <view class="zhanwu"> 暂无数据 </view>
...@@ -196,9 +196,11 @@ ...@@ -196,9 +196,11 @@
}, },
//获取列表数据 //获取列表数据
getList(type) { getList(type) {
if(this.showLoading) return
uni.showLoading({ uni.showLoading({
title: "加载中", title: "加载中",
}); });
this.showLoading = true;
// this.searchObj.QStars = this.tempRateAndPrice.rate.toString(); // this.searchObj.QStars = this.tempRateAndPrice.rate.toString();
if (type == 1) { if (type == 1) {
this.HotelList = []; this.HotelList = [];
...@@ -206,6 +208,7 @@ ...@@ -206,6 +208,7 @@
this.apipost('dmc_post_B2BAndB2CGetDidaHotelPage',this.searchObj, this.apipost('dmc_post_B2BAndB2CGetDidaHotelPage',this.searchObj,
(res) => { (res) => {
if (res.resultCode == 1) { if (res.resultCode == 1) {
this.showLoading = false
uni.hideLoading(); uni.hideLoading();
if (this.searchObj.pageIndex === 1) { if (this.searchObj.pageIndex === 1) {
this.HotelList = res.data.pageData; this.HotelList = res.data.pageData;
...@@ -215,6 +218,7 @@ ...@@ -215,6 +218,7 @@
this.page_count = res.data.pageCount; this.page_count = res.data.pageCount;
} }
},(err)=>{ },(err)=>{
this.showLoading = false
uni.hideLoading(); uni.hideLoading();
uni.showToast({ uni.showToast({
title: err.message, title: err.message,
......
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