Commit 202f43a3 authored by youjie's avatar youjie

酒店

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