Commit 903ea686 authored by youjie's avatar youjie

酒店列表

parent e2263d2f
......@@ -22,14 +22,14 @@
</view>
<view class="autLoginGo"
:class="[!showLogin?'':'active']"
@click="guestInfor.code==0&&guestInfor.IsEnd==0?'':goWebUrl()">
@click="guestInfor.code==0&&guestInfor.IsEnd==0&&guest.length==0?'':goWebUrl()">
<template v-if="guestInfor.code==0&&guestInfor.IsEnd==0">
去填写
</template>
<template v-else>
查看
</template>
<button v-if="guestInfor.code==0&&guestInfor.IsEnd==0"
<button v-if="guestInfor.code==0&&guestInfor.IsEnd==0&&guest.length==0"
class="getPhone"
type="default"
open-type="getPhoneNumber"
......@@ -153,11 +153,13 @@ export default {
}, (res) => {
if (res.resultCode == 1) {
this.guestInfor = res.data;
this.guest = res.data.guest
if(this.guestInfor.guest&&
this.guestInfor.guest.length>0&&
this.guestInfor.guest.length==1){
this.msg.Id = this.guestInfor.guest[0].Id;
this.msg.OrderId = this.guestInfor.guest[0].OrderId;
this.msg.Phone = this.guestInfor.guest[0].MobilePhone;
}
uni.hideLoading();
}}, (error) => {
......
<template>
<view
class="slot-content hotelRegionBox column"
style="background-color: #F3F1EF">
<view class="hotelAddress row justify-center">
<text>目的地</text>
<icon @click="sure" class="hotelClear" type="clear" size="20"/>
</view>
<!-- <view class="internationalBox row-sb-n">
<view class="internationalName"
:class="[interCurrent==item.ID?'active':'']"
v-for="(item,index) in internationals"
:key="index"
@click="setInternational(item)">
<text>{{ item.Name }}</text>
<view class="internationalNABox">
<view v-if="interCurrent==item.ID" class="internationalNA">
<view>1</view>
</view>
</view>
</view>
</view> -->
<view class="internationalSearch" style="position: relative;">
<u-search placeholder="搜索城市/国家中文或拼音"
input-align="left"
:value="parameters.KeyWordsCity"
text-color="#111"
bg-color="rgba(0,0,0,0)"
disabled
:show-action="false"
style="font-size: 22rpx;"></u-search>
<view class="clickSearch" @click="clickSearchCity()">
<view>0</view>
</view>
</view>
<view class="row" style="height: 1px;flex: 1;">
<view class="hotelRegionL">
<scroll-view :scroll-y="true" style="height: 100%;">
<view class="hotelRegionLText row items-center justify-center"
:class="[parameters.GName==item.GName?'active':'']"
v-for="(item,index) in PopularCities" :key="index"
@click="confirmCity(item)">
<!-- <view class="hotelPopular"></view> -->
<text>{{ item.GName }}</text>
</view>
</scroll-view>
</view>
<view class="hotelRegionR">
<scroll-view :scroll-y="true" style="height: 100%;">
<view class="hotelRegionRC">
<view class="hotelRegionRText row items-center justify-center"
:class="[parameters.CityCode2==item.CityCode?'active':'']"
v-for="(item,index) in cityList" :key="index"
@click="changeDistrict(item)">
<view>{{ item.CityName }}</view>
</view>
</view>
</scroll-view>
</view>
</view>
<view style="padding: 0 30rpx;box-shadow: 0rpx 1rpx 8rpx 0rpx rgba(185,152,70,0.25);background: #F3F1EF;">
<view
style="
box-shadow: 0px -10px 30px 0px rgba(36, 36, 36, 0.06);
margin-top: 40rpx;
margin-bottom: 40rpx;
display: flex;
"
>
<!--
<view style="flex: 1; margin-right: 30rpx">
<u-button :custom-style="btnStyle" @click="clear"
>清空</u-button
>
</view>-->
<view style="flex: 1">
<u-button :custom-style="btnStyle2" @click="sure"
>确定</u-button
>
</view>
</view>
</view>
</view>
</template>
<script>
export default {
props:['msg','PopularCities'],
data() {
return {
btnStyle: {
borderRadius: "16rpx",
color: "#111",
fontSize: "30rpx",
width: "100%",
border: "1px solid #111",
background: "#FFF",
},
btnStyle2: {
borderRadius: "16rpx",
color: "#fff",
fontSize: "30rpx",
width: "100%",
background: "#111",
},
// cityListAll: [],
cityList: [],
parameters: {
KeyWordsCity: '',//搜索城市
GName: '', //热门
CityCode2: '',//目的地代码
CityName: '',//目的地
},
DistrictOptions: [],
internationals:[
{Name:'国内(含港澳台)',ID:0},
{Name:'国际',ID:1}
],
interCurrent:0,
}
},
watch:{
msg: {
handler (val, oldval) {
if(val){
this.parameters = {
...val
}
this.interCurrent = val.interCurrent
}
},
deep: true,
},
PopularCities: {
handler (val, oldval) {
if(val){
this.cityList = val[0].CityList
}
},
deep: true,
}
},
created() {
},
methods: {
sure(){
this.$emit('sure',this.parameters)
},
setInternational(val){
this.interCurrent = val.ID
},
confirmCity(val) {
this.parameters.GName = val.GName;
this.cityList = val.CityList
this.parameters.CityCode2 = this.cityList[0].CityCode;
this.parameters.CityName = this.cityList[0].CityName;
},
changeDistrict(item) {
this.parameters.CityCode2 = item.CityCode
this.parameters.CityName = item.CityName;
},
clickSearchCity(){
this.$emit('searchCity','City')
},
}
}
</script>
<style scoped>
@import url("@/asset/css/flex.css");
.hotelRegionBox{
height: 1218rpx;
}
.hotelRegionL{
width: 183rpx;
background: #E9E4E0;
}
.hotelRegionLText{
height: 78rpx;
line-height: 70rpx;
font-weight: bold;
font-size: 28rpx;
color: #080A09 ;
}
.hotelRegionLText.active{
background: #F3F1EF;
color: #B99846;
}
.hotelPopular{
width: 8rpx;
height: 8rpx;
background: #FF3166;
border-radius: 50%;
margin-right: 10rpx;
}
.hotelRegionR{
width: 1px;
flex: 1;
background: #F3F1EF;
padding: 0rpx 10rpx;
}
.hotelRegionRText{
width: 150rpx;
height: 68rpx;
line-height: 60rpx;
background: #fff;
margin: 10rpx 15rpx;
padding: 0 10rpx;
border-radius: 6rpx;
}
.hotelRegionRText view{
font-size: 28rpx;
color: #080A09;
font-weight: 500;
display: block;
text-align: center;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.hotelRegionRText.active{
background: #B99846;
}
.hotelRegionRText.active view{
color: #fff;
}
.hotelAddress{
position: relative;
padding: 25rpx 0;
}
.hotelClear{
position: absolute;
right: 30rpx;
z-index: 1;
}
.hotelAddress text{
font-size: 32rpx;
font-weight: 800;
}
.hotelRegionRC{
display: flex;
flex-wrap: wrap;
}
.internationalBox{
padding: 0 80rpx;
margin-bottom: 30rpx;
}
.internationalName{
flex: 1;
text-align: center;
font-size: 30rpx;
position: relative;
}
.internationalNABox{
position: absolute;
bottom: -15rpx;
left: 0;
right: 0;
}
.internationalName.active .internationalNA{
width: 50rpx;
height: 8rpx;
border-radius: 8rpx;
background: #B99846;
margin: auto;
font-weight: bold;
}
.internationalNA view{
opacity: 0;
}
.internationalSearch{
border-radius: 50rpx;
background: #fff;
margin: 0 30rpx;
margin-bottom: 8rpx;
overflow: hidden;
}
.clickSearch{
position: absolute;
left: 0;
right: 0;
top: 0;
bottom: 0;
z-index: 3;
}
.clickSearch view{
opacity: 0;
}
</style>
\ No newline at end of file
This diff is collapsed.
......@@ -2,25 +2,26 @@
<view class="hotel-list-item"
:class="[isMap?'hotel-mapList':'']" @click="goHotelDetail(item.HotelId)">
<view class="img-box">
<image :src="item.CoverImg" mode="aspectFill"></image>
<image :src="item.coverimg" mode="aspectFill"></image>
</view>
<view class="hotel-info column">
<view class="hotel-name row items-center">
<img v-if="item.Star>=3" class="hotel-SubR" :class="[item.Star==3?'hotel-SubStar3':item.Star==4?'hotel-SubStar4':item.Star==5?'hotel-SubStar5':'']" :src="item.Star==3?StarImgs[0]:item.Star==4?StarImgs[1]:item.Star==5?StarImgs[2]:''"/>
<text v-else class="hotel-Economy">经济型</text>
{{item.HotelName}}
{{item.name}}
</view>
<view class="hotel-Subtitle row">
<view class="hotel-SubText" v-if="item.AddressDes">{{ item.AddressDes }}</view>
<view class="hotel-SubText" v-if="item.areaList.length>0">
<text v-for="(t,i) in item.areaList" :key="i">{{ t }}
<template v-if="i!=item.areaList.length-1"></template>
</text>
</view>
</view>
<view class="hotel-start">
<view class="other-rate" v-if="item.Star==9">
<view class="other-rate" v-for="(t,i) in item.tagList" :key="i">
<text>温泉酒店</text>
</view>
<view class="other-rate" v-if="item.Star==8">
<text>精选民宿</text>
</view>
</view>
<view class="localtion row items-start">
<view class="localtionL">
......@@ -29,7 +30,7 @@
src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Upload/Goods/638759918789658713.png"/>
</view>
<view class="localtionR" style="width:1px;flex:1">
{{item.Address}}
{{item.address}}
</view>
</view>
<!-- <view>
......@@ -39,12 +40,12 @@
<view class="hotel-price">
<view class="hotel-priceL">
<view>
Shangri-La Hotel...
{{ item.brandname }}
</view>
</view>
<view class="price">
<text>CNY</text>
<text class="money">{{$utils.getretailer()==true? item.B2BPrice:item.SalesPrice}}</text>
<text class="money">{{item.unitprice}}</text>
<text></text>
</view>
</view>
......@@ -254,6 +255,7 @@
text-overflow: ellipsis;
position: relative;
top: -3rpx;
text-align: center;
}
.hotel-list-item.hotel-mapList{
margin: 0;
......
......@@ -10,8 +10,8 @@
:class="{ active: isMinActive }"
:style="'width:' + blockSize + 'rpx;height:' + blockSize + 'rpx;margin-left:' + minBlockLeft + 'rpx;'"
@touchstart="_onBlockTouchStart"
@touchmove.stop="_onBlockTouchMove"
@touchend="_onBlockTouchEnd"
@touchmove.stop="(e)=>{_onBlockTouchMove(e,'Left')}"
@touchend="(e)=>{_onBlockTouchEnd(e,'Left')}"
:data-left="minBlockLeft"
data-tag="minBlock"
>
......@@ -22,8 +22,8 @@
:class="{ active: isMaxActive }"
:style="'width:' + blockSize + 'rpx;height:' + blockSize + 'rpx;margin-left:' + maxBlockLeft + 'rpx;'"
@touchstart="_onBlockTouchStart"
@touchmove.stop="_onBlockTouchMove"
@touchend="_onBlockTouchEnd"
@touchmove.stop="(e)=>{_onBlockTouchMove(e,'Right')}"
@touchend="(e)=>{_onBlockTouchEnd(e,'Right')}"
:data-left="maxBlockLeft"
data-tag="maxBlock"
>
......@@ -163,7 +163,6 @@ export default {
values: function(newVal, oldVal, changedPath) {
var that = this;
var values = that.values;
console.log('refresh', newVal, oldVal);
if (that._isValuesValid(newVal) && that._isValuesValid(values)) {
if (values[0] != oldVal[0] || values[1] != oldVal[1]) that._refresh();
}
......@@ -200,7 +199,7 @@ export default {
this._curBlock = e.target.dataset.tag;
}
},
_onBlockTouchMove: function(e) {
_onBlockTouchMove: function(e,type) {
let tag = e.target.dataset.tag;
if (tag == 'minBlock' || tag == 'maxBlock') {
var that = this;
......@@ -222,10 +221,10 @@ export default {
this.originalMaxValue = values[1];
var eventOption = {};
//
if (this.liveMode) that.$emit('rangechange', eventDetail, eventOption);
if (this.liveMode) that.$emit('rangechange', eventDetail, eventOption,type);
}
},
_onBlockTouchEnd: function(e) {
_onBlockTouchEnd: function(e,type) {
let tag = e.target.dataset.tag;
this.isMinActive = false;
this.isMaxActive = false;
......@@ -246,7 +245,7 @@ export default {
this.originalMinValue = values[0];
this.originalMaxValue = values[1];
var eventOption = {};
that.$emit('rangechange', eventDetail, eventOption);
that.$emit('rangechange', eventDetail, eventOption,type);
}
},
_isValuesValid: function(values) {
......
This diff is collapsed.
This diff is collapsed.
......@@ -2,8 +2,8 @@
<view class="hotel-list column" style="background: #F3F1EF;">
<view class="hotel-listHeader">
<hotelHeaders :title="pageTitle"></hotelHeaders>
<hotelSearch :isMap="1" @change="change"></hotelSearch>
<view style="padding: 9rpx 30rpx 19rpx 30rpx;">
<hotelSearch :msg="searchObj" :isMap="1" @change="change"></hotelSearch>
<!-- <view style="padding: 9rpx 30rpx 19rpx 30rpx;">
<scroll-view :scroll-x="true">
<view class="ComprehensiveSortings row">
<view v-for="(item,index) in searchObj.TagList" :key="index"
......@@ -13,10 +13,10 @@
</view>
</view>
</scroll-view>
</view>
</view> -->
</view>
<view style="height: 1px;flex: 1;overflow: hidden;">
<view class="no-data" v-if="HotelList.length === 0">
<view class="no-data" v-if="HotelList.length === 0" 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>
......@@ -54,14 +54,14 @@
searchObj: {
pageIndex: 1,
pageSize: 15,
Name: "", //关键字
KeyWords: "", //关键字
// StartPrice: 0,
// EndPrice: 1000,
QStartDate: "",
QEndDate: "",
// QStartDate: "",//开始日期
// QEndDate: "",//结束日期
// OrderByType: "1", //排序类型
// QStars: "", //星级
TagList: [], //查询标签
// TagList: [], //查询标签
// City: 262, //市
// District: 0, //区
},
......@@ -99,9 +99,9 @@
hotelSearch,
},
onLoad(options) {
this.mc = this.$uiConfig.mainColor;
this.apimc = this.$uiConfig.mainColor;
if (options && options.Name) {
this.searchObj.Name = options.Name;
this.searchObj.KeyWords = options.KeyWords;
}
},
created() {
......@@ -136,13 +136,13 @@
key: "Time",
data: JSON.stringify(obj),
});
this.searchObj.QStartDate = obj.start;
this.searchObj.QEndDate = obj.end;
// this.searchObj.QStartDate = obj.start;
// this.searchObj.QEndDate = obj.end;
this.startDay = obj.startDay;
this.endDay = obj.endDay;
this.day = obj.day;
this.getSearchCondition();
this.getList();
// this.getList();
},
methods: {
scroll(e) {
......@@ -171,7 +171,6 @@
this.research();
},
change(item) {
console.log(item,'-----searchObj');
this.searchObj ={
...this.searchObj,
...item,
......@@ -197,25 +196,30 @@
},
//获取列表数据
getList(type) {
this.searchObj.QStars = this.tempRateAndPrice.rate.toString();
uni.showLoading({
title: "加载中",
});
// this.searchObj.QStars = this.tempRateAndPrice.rate.toString();
if (type == 1) {
this.HotelList = [];
}
this.request2({
url: "/api/Hotel/AppGetHotelPage",
data: this.searchObj,
},
this.apipost('dmc_post_B2BAndB2CGetDidaHotelPage',this.searchObj,
(res) => {
if (res.resultCode == 1) {
uni.hideLoading();
if (this.searchObj.pageIndex === 1) {
this.HotelList = res.data.pageData;
} else {
this.HotelList = this.HotelList.concat(res.data.pageData);
}
this.page_count = res.data.pageCount;
}
},(err)=>{
uni.hideLoading();
uni.showToast({
title: err.message,
icon: 'none',
})
}
);
},
......@@ -242,6 +246,7 @@
.hotel-list {
height: 100vh;
overflow: hidden;
}
.hotel-list .hotel-city {
......@@ -409,5 +414,11 @@
/deep/.hotel-listHeader .u-flex{
justify-content: flex-start;
}
/deep/.u-dropdown__menu__item:first-child{
padding-left: 40rpx;
}
/deep/.u-dropdown__menu__item:last-child{
padding-right: 40rpx;
}
</style>
......@@ -70,7 +70,7 @@
b2b_user_info.contactNumber = param.Moblie
uni.setStorageSync('b2b_user', b2b_user_info);
uni.redirectTo({
url: '/pages/user-center/user-center'
url: '/pages/user-center/userVip-center'
})
} else {
this.loginLoading = false;
......
......@@ -72,7 +72,7 @@
})
setTimeout(()=>{
uni.redirectTo({
url:'/pages/user-center/user-center'
url:'/pages/user-center/userVip-center'
})
},1000)
}
......
......@@ -527,7 +527,7 @@
//返回个人中心
finish() {
uni.navigateTo({
url: "/pages/user-center/user-center"
url: "/pages/user-center/userVip-center"
})
},
//下一步
......
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