Commit c8e15322 authored by 罗超's avatar 罗超

Merge branch 'master' of http://gitlab.oytour.com/zk123/jz_travel

parents a06ffcbd ff3907d8
...@@ -9,7 +9,8 @@ ...@@ -9,7 +9,8 @@
<view class="hotel-start"> <view class="hotel-start">
<!-- TODO:判定是否为星级酒店,如果是显示星级,不是,显示另外一种方式 --> <!-- TODO:判定是否为星级酒店,如果是显示星级,不是,显示另外一种方式 -->
<view class="rate" v-if="item.Star>=1&&item.Star<=5"> <view class="rate" v-if="item.Star>=1&&item.Star<=5">
<u-rate active-color="#FEB969" inactive-color="#FFF" :current="item.Star" active-icon="star" inactive-icon="star" disabled></u-rate> <u-rate active-color="#FEB969" inactive-color="#FFF" is-fill="true" :current="item.Star" active-icon="star"
inactive-icon="star" disabled :count="5"></u-rate>
<text style="margin-left: 20rpx;vertical-align: top;">{{item.StarName}}</text> <text style="margin-left: 20rpx;vertical-align: top;">{{item.StarName}}</text>
</view> </view>
<view class="other-rate" v-if="item.Star==9"> <view class="other-rate" v-if="item.Star==9">
...@@ -23,8 +24,8 @@ ...@@ -23,8 +24,8 @@
</view> </view>
<view class="localtion">{{item.Address}}</view> <view class="localtion">{{item.Address}}</view>
<view> <view>
<u-tag v-for="(subItem,subIndex) in item.TagList" :key="subIndex" style="margin-right:10rpx;" :text="subItem" bg-color="#FFF" border-color="#DFBE6E" color="#DFBE6E" <u-tag v-for="(subItem,subIndex) in item.TagList" :key="subIndex" style="margin-right:10rpx;" :text="subItem"
size="mini"></u-tag> bg-color="#FFF" border-color="#DFBE6E" color="#DFBE6E" size="mini"></u-tag>
</view> </view>
<view class="price"> <view class="price">
<text></text> <text></text>
...@@ -43,7 +44,11 @@ ...@@ -43,7 +44,11 @@
type: Array, type: Array,
default: null default: null
}, },
dayObj:{ dayObj: {
type: Object,
default: null
},
searchObj: {
type: Object, type: Object,
default: null default: null
} }
...@@ -56,11 +61,17 @@ ...@@ -56,11 +61,17 @@
created() { created() {
console.log(this.HotelList, 'hotel'); console.log(this.HotelList, 'hotel');
}, },
methods:{ methods: {
goHotelDetail(id){ getStar(num) {
if (num) {
return num.toFixed(1);
}
return 0.0;
},
goHotelDetail(id) {
let myDayObj = JSON.stringify(this.dayObj); let myDayObj = JSON.stringify(this.dayObj);
uni.navigateTo({ uni.navigateTo({
url: "/pages/hotel/detail?id=" + id + '&dayObj=' + myDayObj url: "/pages/hotel/detail?id=" + id + '&dayObj=' + myDayObj + '&searchObj=' + JSON.stringify(this.searchObj)
}); });
} }
} }
......
<template> <template>
<view class="near-good" @click="goDetail"> <view class="near-good" @click="goDetail">
<image :src="goodItem.CoverImg" mode="aspectFill"></image> <image :src="goodItem.CoverImg" mode="aspectFill"></image>
<view class="good-name">{{goodItem.Name}}</view> <view class="good-name">{{goodItem.Name.substring(0,6)+'...'}}</view>
</view> </view>
</template> </template>
......
<template> <template>
<view class="hotel-list-item"> <view>
<view class="img-box"> <view class="hotel-list-item" v-for="(item,index) in HotelArr" :key="index" @click="goHotelDetail(item.HotelId)">
<image src="http://imgfile.oytour.com/Upload/DMC/202105251114114560000000058.png" mode="aspectFill"></image> <view class="img-box">
</view> <image :src="item.CoverImg" mode="aspectFill"></image>
<view class="hotel-info"> </view>
<view class="hotel-name">乐山禅驿·嘉定院子酒店</view> <view class="hotel-info">
<view class="hotel-start"> <view class="hotel-name">{{item.HotelName}}</view>
<!-- TODO:判定是否为星级酒店,如果是显示星级,不是,显示另外一种方式 --> <view class="hotel-start">
<view class="rate" v-if="hotelType==0"> <!-- TODO:判定是否为星级酒店,如果是显示星级,不是,显示另外一种方式 -->
<u-rate active-color="#FEB969" inactive-color="#FFF" current="4" active-icon="star" inactive-icon="star" disabled></u-rate> <view class="rate" v-if="item.Star>=1&&item.Star<=5">
<text style="margin-left: 20rpx;vertical-align: top;">四星</text> <u-rate active-color="#FEB969" inactive-color="#FFF" :current="item.Star" active-icon="star" inactive-icon="star" disabled></u-rate>
<text style="margin-left: 20rpx;vertical-align: top;">{{item.StarName}}</text>
</view>
<view class="other-rate" v-if="item.Star==9">
<text>温泉酒店</text>
<span class="line"></span>
</view>
<view class="other-rate" v-if="item.Star==8">
<text>精选民宿</text>
<span class="line"></span>
</view>
</view> </view>
<view class="other-rate" v-if="hotelType==1"> <view class="localtion">{{item.Address}}</view>
<text>温泉酒店</text> <view>
<span class="line"></span> <u-tag text="亲子设施" bg-color="#FFF" border-color="#DFBE6E" color="#DFBE6E" size="mini"></u-tag>
</view> </view>
<view class="other-rate" v-if="hotelType==2"> <view class="price">
<text>精选民宿</text> <text></text>
<span class="line"></span> <text class="money">{{item.B2BPrice}}</text>
<text></text>
</view> </view>
</view> </view>
<view class="localtion">距该酒店直线4.1公里·近九寨千古情景区·沟口</view>
<view>
<u-tag text="亲子设施" bg-color="#FFF" border-color="#DFBE6E" color="#DFBE6E" size="mini"></u-tag>
</view>
<view class="price">
<text></text>
<text class="money">599</text>
<text></text>
</view>
</view> </view>
</view> </view>
</template> </template>
...@@ -36,9 +38,17 @@ ...@@ -36,9 +38,17 @@
<script> <script>
export default { export default {
props:{ props:{
hotelType:{ HotelArr:{
type:Number, type:Array,
default:0 default:null
},
dayObj:{
type:Object,
default:null
},
searchObj:{
type:Object,
default:null
} }
}, },
data() { data() {
...@@ -46,6 +56,19 @@ ...@@ -46,6 +56,19 @@
key: value key: value
} }
}, },
mounted(){
},
created(){
},
methods:{
goHotelDetail(id){
let myDayObj = JSON.stringify(this.dayObj);
uni.navigateTo({
url: "/pages/hotel/detail?id=" + id +'&dayObj=' + myDayObj+'&searchObj='+JSON.stringify(this.searchObj)
});
}
}
} }
</script> </script>
......
...@@ -2,9 +2,15 @@ ...@@ -2,9 +2,15 @@
<view> <view>
<view class="room-good" v-for="(item,index) in RoomList"> <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"> <template v-if="item.RoomImage&&item.RoomImage.length>0">
</image> <image :src="item.RoomImage[0].Path" mode="aspectFill">
<view class="mark">12</view> </image>
<view class="mark">{{item.RoomImage.length}}</view>
</template>
<template v-else>
<image src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/default_room.jpg" mode="aspectFill">
</image>
</template>
</view> </view>
<view class="rm-right"> <view class="rm-right">
<view class="room-name">{{item.RoomName}}</view> <view class="room-name">{{item.RoomName}}</view>
...@@ -24,7 +30,7 @@ ...@@ -24,7 +30,7 @@
<view class="rm-opera" v-if="item.Inventory>0&&item.Inventory<5"> <view class="rm-opera" v-if="item.Inventory>0&&item.Inventory<5">
<!-- 如果库存少于5显示 --> <!-- 如果库存少于5显示 -->
<view class="warm-count">剩{{item.Inventory}}间</view> <view class="warm-count">剩{{item.Inventory}}间</view>
<view class="buy" @click="previewOrder"> <view class="buy" @click="previewOrder(item)">
<view class="buy-content"></view> <view class="buy-content"></view>
<view class="buy-tips">在线订</view> <view class="buy-tips">在线订</view>
</view> </view>
...@@ -45,12 +51,20 @@ ...@@ -45,12 +51,20 @@
RoomList: { RoomList: {
type: Array, type: Array,
default: null default: null
},
dayObj: {
type: Object,
default: null
},
hotelData: {
type: Object,
default: null
} }
}, },
methods: { methods: {
previewOrder() { previewOrder(item) {
uni.navigateTo({ uni.navigateTo({
url: "/pages/hotel/order" url: "/pages/hotel/order?RoomInfo="+ JSON.stringify(item) + '&dayObj=' + JSON.stringify(this.dayObj) + '&HotelInfo=' + JSON.stringify(this.hotelData)
}) })
}, },
}, },
...@@ -71,6 +85,7 @@ ...@@ -71,6 +85,7 @@
.room-good .f11 { .room-good .f11 {
font-size: 22rpx; font-size: 22rpx;
font-weight: 500; font-weight: 500;
margin-top:10rpx;
} }
.room-good .rm-right { .room-good .rm-right {
......
...@@ -9,34 +9,32 @@ ...@@ -9,34 +9,32 @@
<view class="flex"> <view class="flex">
<image src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1622085515000_731.png" mode="widthFix" <image src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1622085515000_731.png" mode="widthFix"
style="width: 32rpx;"></image> style="width: 32rpx;"></image>
<view class="h-name">九寨沟星宇国际大酒店</view> <view class="h-name">{{hotelObj.HotelName}}</view>
</view> </view>
<view class="base-box flex flex-wrap"> <view class="base-box flex flex-wrap">
<view class="item"> <view class="item">
<view class="val">2014年</view> <view class="val">{{hotelObj.HotelInfo.OpenTime}}</view>
<view class="label">开业时间</view> <view class="label">开业时间</view>
</view> </view>
<view class="item"> <view class="item">
<view class="val">2017年</view> <view class="val">{{hotelObj.HotelInfo.DecorationTime}}</view>
<view class="label">装修时间</view> <view class="label">装修时间</view>
</view> </view>
<view class="item"> <view class="item">
<view class="val">200</view> <view class="val">{{hotelObj.RoomNumber}}</view>
<view class="label">房间数量</view> <view class="label">房间数量</view>
</view> </view>
<view class="item"> <view class="item">
<view class="val">028-86898868</view> <view class="val">{{hotelObj.Tel}}</view>
<view class="label">联系电话</view> <view class="label">联系电话</view>
</view> </view>
<view class="item" style="width:100%"> <view class="item" style="width:100%">
<view class="val">中国,四川,松潘,川主寺镇漳腊磨坎坡路90号</view> <view class="val">{{hotelObj.Address}}</view>
<view class="label">酒店地址</view> <view class="label">酒店地址</view>
</view> </view>
</view> </view>
<view class="desc"> <view class="desc">
<view>九寨沟星宇国际大酒店位于九寨沟风景区沟口,距九寨沟风景区沟口约1.8公里,酒店提供送景区入口摆渡车服务。</view> <view>{{hotelObj.HotelInfo.Into}}</view>
<view>酒店外观独具藏式宫廷建筑特色,内部设计融入浓郁的民族元素,为您呈现藏族歌舞艺术文化底蕴。客房设计主题鲜明又不失时尚舒适,洗浴用品均按高端品质配备,满足所有出行居停的需要。中西餐厅提供豪华自助餐和川、粤、藏等精美菜式,可容300人同时就餐。大型无柱多功能厅,满足您所有的需求:会议、团建、推介、答谢、宴请......</view>
<view>酒店拥有自己的大型剧院---星宇登嘎甘㑇大剧院,让您足不出户就能享受视听盛宴!酒店深耕主题文化特色与内涵,将抽象的当地民族文化更形象、生动的植入到对客服务和体验中。民族服饰的体验、锅庄舞蹈的互动活动以及登嘎甘㑇情景剧节目等都深得当下爱玩、爱拍、爱分享的游客们喜欢,让住客不再局限于食、宿这样单一化的体验。酒店还引进了超人气机器人店导员,主题文化介绍、带人送物对她而言都是驾轻就熟的工作!可爱、有趣的萌娃天地,让您协同孩子尽享欢乐的度假时光,还可提供婴儿床。</view>
</view> </view>
<view class="empty-block"></view> <view class="empty-block"></view>
<view class="flex" style="margin-top: 50rpx;"> <view class="flex" style="margin-top: 50rpx;">
...@@ -47,45 +45,25 @@ ...@@ -47,45 +45,25 @@
<view class="sheshi"> <view class="sheshi">
<view class="she-title">公共服务设施</view> <view class="she-title">公共服务设施</view>
<view class="she-content"> <view class="she-content">
<text>有可无线上网的公共区域</text> <text v-for="subItem in hotelObj.PublicFacilities">
<text>公共音响系统</text> {{subItem}}
<text>公共区域闭路电视监控系统</text> </text>
<text>无烟楼层</text>
<text>电梯</text>
</view> </view>
</view> </view>
<view class="sheshi"> <view class="sheshi">
<view class="she-title">房间设施</view> <view class="she-title">房间设施</view>
<view class="she-content"> <view class="she-content">
<text>房间内高速上网</text> <text v-for="subItem in hotelObj.RoomFacilities">
<text>客房WIFI覆盖</text> {{subItem}}
<text>遮光窗帘</text> </text>
<text>手动窗帘</text>
<text>空调</text>
<text>沙发</text>
<text>书桌</text>
<text>床具:鸭绒被</text>
<text>床具:毯子或被子</text>
<text>多种规格电源插座</text>
<text>110V电压插座</text>
<text>独立淋浴间</text>
<text>液晶电视机</text>
<text>浴衣</text>
<text>吹风机</text>
<text>24小时热水</text>
<text>拖鞋</text>
<text>电热水壶</text>
</view> </view>
</view> </view>
<view class="sheshi" style="margin-bottom: 50rpx;"> <view class="sheshi" style="margin-bottom: 50rpx;">
<view class="she-title">酒店服务</view> <view class="she-title">酒店服务</view>
<view class="she-content"> <view class="she-content">
<text>行李寄存</text> <text v-for="subItem in hotelObj.ServiceItems">
<text>24小时前台服务</text> {{subItem}}
<text>邮政服务</text> </text>
<text>手动窗帘</text>
<text>叫醒服务</text>
<text>一次性账单结算服务</text>
</view> </view>
</view> </view>
<view class="empty-block"></view> <view class="empty-block"></view>
...@@ -95,21 +73,13 @@ ...@@ -95,21 +73,13 @@
<view class="h-name">订房须知</view> <view class="h-name">订房须知</view>
</view> </view>
<ul class="title-style-one"> <ul class="title-style-one">
<li> <li v-for="subItem in hotelObj.Booking" v-if="subItem.Name=='入离时间'">
<view class="item-title king regular">入住时间:14:00以后</view> <view class="item-title king regular">{{subItem.Content[0]}}</view>
<view class="item-title king regular">退房时间:13:00以前</view> <view class="item-title king regular">{{subItem.Content[1]}}</view>
</li> </li>
<li> <li v-for="subItem in hotelObj.Booking" v-if="subItem.Name!='入离时间'">
<view class="item-title">宠物政策</view> <view class="item-title">{{subItem.Name}}</view>
<view class="item-content">允许携带宠物,酒店可能收取额外费用</view> <view class="item-content">{{subItem.Content}}</view>
</li>
<li>
<view class="item-title">酒店提示</view>
<view class="item-content">疫情期间,请佩戴好口罩。住宿提供方支持中国(含港澳台)及外国客人入住</view>
</li>
<li>
<view class="item-title">儿童政策</view>
<view class="item-content">不接受18岁以下客人单独入住。每房间可有1名儿童使用现有床铺。不可加床</view>
</li> </li>
</ul> </ul>
<view class="empty-block"></view> <view class="empty-block"></view>
...@@ -118,27 +88,19 @@ ...@@ -118,27 +88,19 @@
style="width: 32rpx;"></image> style="width: 32rpx;"></image>
<view class="h-name">周边交通</view> <view class="h-name">周边交通</view>
</view> </view>
<view class="sheshi"> <view class="sheshi" v-for="subItem in hotelObj.TrafficList">
<view class="she-title">牛王庙地铁站-D口</view> <view class="she-title">{{subItem.TTitle}}</view>
<view class="she-content"> <view class="she-content">
<text>九寨沟喜来登国际大酒店·中餐厅步行8分钟</text> <text>{{subItem.TSubTitle}}</text>
</view>
</view>
<view class="sheshi">
<view class="she-title">东大门地铁站-A口</view>
<view class="she-content">
<text>距离酒店80米,步行约12分钟</text>
</view> </view>
</view> </view>
</view> </view>
</scroll-view> </scroll-view>
</view> </view>
</template> </template>
<script> <script>
export default { export default {
data() { data() {
return { return {
navs: [{ navs: [{
...@@ -160,10 +122,9 @@ ...@@ -160,10 +122,9 @@
hotelObj: {}, //酒店信息 hotelObj: {}, //酒店信息
} }
}, },
onLoad() { onLoad(options) {
if (options.hotelObj) { if (options.hotelObj) {
this.hotelObj = JSON.parse(options.hotelObj); this.hotelObj = JSON.parse(decodeURIComponent(options.hotelObj));
console.log("this.hotelObj", this.hotelObj)
} }
}, },
created() { created() {
...@@ -174,11 +135,10 @@ ...@@ -174,11 +135,10 @@
methods: { methods: {
scroll(e) { scroll(e) {
this.oldScrollTop = e.detail.scrollTop; this.oldScrollTop = e.detail.scrollTop;
console.log(this.oldScrollTop)
this.changeActive() this.changeActive()
}, },
goToPosition(posi) { goToPosition(posi) {
this.scrollTop = posi; //this.oldScrollTop; this.scrollTop = posi;
this.$nextTick(function() { this.$nextTick(function() {
this.scrollTop = posi; this.scrollTop = posi;
}); });
...@@ -194,7 +154,6 @@ ...@@ -194,7 +154,6 @@
}, },
changeHandler(i) { changeHandler(i) {
this.active = i; this.active = i;
console.log(this.navs[i].position)
this.goToPosition(this.navs[i].position) this.goToPosition(this.navs[i].position)
// this.clickItem={}; // this.clickItem={};
// this.$nextTick(function(){ // this.$nextTick(function(){
......
...@@ -97,13 +97,13 @@ ...@@ -97,13 +97,13 @@
</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>{{roomMsg.StartDate}}</text> <text>{{startDay}}</text>
<text class="date-week">{{startWeek}}</text> <text class="date-week">{{getWeek(roomMsg.StartDate)}}</text>
</view> </view>
<view class="hr-line"></view> <view class="hr-line"></view>
<view class="date"> <view class="date">
<text>{{roomMsg.EndDate}}</text> <text>{{endDay}}</text>
<text class="date-week">{{endWeek}}</text> <text class="date-week">{{getWeek(roomMsg.EndDate)}}</text>
</view> </view>
<view class="ver-line"></view> <view class="ver-line"></view>
<view class="date"> <view class="date">
...@@ -116,8 +116,7 @@ ...@@ -116,8 +116,7 @@
<view v-for="(x,i) in threeLevelList" class="item" @click="changeRoomType(x)" :class="{'active':x.isCheck==1}">{{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 :RoomList="RoomList"></room-good> <room-good :RoomList="RoomList" :dayObj="dayObj" :hotelData="hotelData"></room-good>
<!-- <room-good-test></room-good-test> -->
</view> </view>
</view> </view>
</view> </view>
...@@ -127,13 +126,24 @@ ...@@ -127,13 +126,24 @@
<text>订房须知</text> <text>订房须知</text>
</view> </view>
<ul class="title-style-one"> <ul class="title-style-one">
<li v-for="(sItem,sIndex) in dataList.Booking" :key="sIndex"> <li v-for="(sItem,sIndex) in dataList.Booking" :key="sIndex" v-if="sItem.Name!='入离时间'">
<view class="item-title">{{sItem.Name}}</view> <view class="item-title">{{sItem.Name}}</view>
<view class="item-content"> <view class="item-content">
{{sItem.Content}} {{sItem.Content}}
</view> </view>
</li> </li>
</ul> </ul>
<template v-for="(sItem,sIndex) in dataList.Booking" v-if="sItem.Name=='入离时间'">
<view class="big-title" :key="sIndex">
<text>入离规则</text>
</view>
<ul class="title-style-one">
<li>
<view class="item-title king regular">{{sItem.Content[0]}}</view>
<view class="item-title king regular">{{sItem.Content[1]}}</view>
</li>
</ul>
</template>
<view class="big-title"> <view class="big-title">
<text>设施服务</text> <text>设施服务</text>
</view> </view>
...@@ -174,12 +184,12 @@ ...@@ -174,12 +184,12 @@
<text>精选推荐</text> <text>精选推荐</text>
</view> </view>
<view class="flex" style="margin-left: 64rpx;"> <view class="flex" style="margin-left: 64rpx;">
<view class="nearby-type active">附近满足条件酒店(2)</view> <view class="nearby-type active">附近满足条件酒店({{HotelArr.length}})</view>
</view> </view>
</view> </view>
<view> <view>
<recommed-hotel></recommed-hotel> <recommed-hotel :HotelArr="HotelArr" :dayObj="dayObj" :searchObj="searchObj"></recommed-hotel>
<recommed-hotel :hotelType="1"></recommed-hotel> <!-- <recommed-hotel :hotelType="1"></recommed-hotel> -->
</view> </view>
</view> </view>
</view> </view>
...@@ -192,7 +202,6 @@ ...@@ -192,7 +202,6 @@
<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';
import canlendar from "./components/time/index.vue" import canlendar from "./components/time/index.vue"
...@@ -225,8 +234,6 @@ ...@@ -225,8 +234,6 @@
StartDate: '', StartDate: '',
EndDate: '' EndDate: ''
}, },
startWeek: '',
endWeek: '',
day: 0, day: 0,
threeLevelList: [{ threeLevelList: [{
name: "单人床", name: "单人床",
...@@ -257,11 +264,16 @@ ...@@ -257,11 +264,16 @@
RoomList: [], //可过滤房间 RoomList: [], //可过滤房间
dataList: {}, //数据 dataList: {}, //数据
isShowAll: false, //显示全部 isShowAll: false, //显示全部
HotelArr:[] ,//推荐酒店
searchObj:{},
dayObj:{},
hotelData:{} ,//传递到房间预订组件
startDay:'',
endDay:''
} }
}, },
components: { components: {
roomGood, roomGood,
nearGood, nearGood,
recommedHotel, recommedHotel,
canlendar canlendar
...@@ -270,7 +282,8 @@ ...@@ -270,7 +282,8 @@
}, },
onLoad(options) { onLoad(options) {
this.id = options.id this.id = options.id;
this.roomMsg.HotelId = options.id;
let that = this let that = this
uni.getSystemInfo({ uni.getSystemInfo({
success(res) { success(res) {
...@@ -282,19 +295,46 @@ ...@@ -282,19 +295,46 @@
}, },
}); });
this.mainColor = this.$uiConfig.mainColor; this.mainColor = this.$uiConfig.mainColor;
if (this.id > 0) {
this.getHotelDetail(this.id);
}
if (options.dayObj) { if (options.dayObj) {
console.log(options.dayObj,'options.dayObj');
var tempDay = JSON.parse(options.dayObj); var tempDay = JSON.parse(options.dayObj);
this.roomMsg.StartDate = tempDay.StartDate; this.roomMsg.StartDate = tempDay.start;
this.roomMsg.EndDate = tempDay.EndDate; this.roomMsg.EndDate = tempDay.end;
this.startDay = tempDay.startDay;
this.endDay = tempDay.endDay;
this.day = tempDay.day; this.day = tempDay.day;
this.startWeek = tempDay.startWeek; this.dayObj = tempDay;
this.endWeek = tempDay.endWeek; }
if (this.id > 0) {
this.getHotelDetail(this.id);
}
if(options.searchObj){
this.searchObj = JSON.parse(options.searchObj);
} }
this.getRecomHotel();
}, },
methods: { methods: {
//获取推荐酒店
getRecomHotel() {
this.searchObj.HotelId = this.id
this.request2({
url: '/api/Hotel/AppGetHotelPage',
data: this.searchObj
},
res => {
if (res.resultCode == 1) {
console.log(res, '推荐酒店');
this.HotelArr = [];
let tempHotel = res.data.pageData;
tempHotel.forEach(x => {
if (this.HotelArr.length < 2) {
this.HotelArr.push(x);
}
})
}
}
);
},
goMap(name, lon, lat) { goMap(name, lon, lat) {
wx.openLocation({ wx.openLocation({
latitude: lat, latitude: lat,
...@@ -319,23 +359,33 @@ ...@@ -319,23 +359,33 @@
openDescription() { openDescription() {
let hotelObj = JSON.stringify(this.dataList); let hotelObj = JSON.stringify(this.dataList);
uni.navigateTo({ uni.navigateTo({
url: "/pages/hotel/description?hotelObj="+hotelObj url: "/pages/hotel/description?hotelObj=" + encodeURIComponent(hotelObj)
}) })
}, },
//返回周几
getWeek(date) {
console.log(date, 'date');
var weekArray = new Array("日", "一", "二", "三", "四", "五", "六");
var week = weekArray[new Date(date).getDay()]; //注意此处必须是先new一个Date
return '周' + week;
},
chosenDateResult(obj) { chosenDateResult(obj) {
console.log(obj, 'objjjj'); this.roomMsg.StartDate = obj.start;
obj.startDay = this.formatMonthDay(obj.startDay) this.roomMsg.EndDate = obj.end;
obj.endDay = this.formatMonthDay(obj.endDay) this.startDay = obj.startDay;
this.searchObj.date = obj this.endDay = obj.endDay;
this.day = obj.day;
this.getRoomType();
this.dayObj = obj;
this.showTimePopup = false this.showTimePopup = false
}, },
//切换日期获取房型
getRoomType() {
this.request2({
url: '/api/Hotel/GetHotelRoom',
data: this.roomMsg
},
res => {
if (res.resultCode == 1) {
console.log(res, '房间数据');
this.RoomList = res.data.RoomList;
}
}
);
},
formatMonthDay(str) { formatMonthDay(str) {
let temp = str.split('-') let temp = str.split('-')
temp[0] = temp[0] > 9 ? temp[0] : "0" + temp[0] temp[0] = temp[0] > 9 ? temp[0] : "0" + temp[0]
...@@ -351,23 +401,9 @@ ...@@ -351,23 +401,9 @@
return d > 9 ? d : "0" + d return d > 9 ? d : "0" + d
}, },
getWeek(date) { getWeek(date) {
let day = date.getDay(); var weekArray = new Array("日", "一", "二", "三", "四", "五", "六");
if (day === 1) { var week = weekArray[new Date(date).getDay()];//注意此处必须是先new一个Date
var week = "一"; return '周'+week;
} else if (day === 2) {
week = "二";
} else if (day === 3) {
week = "三";
} else if (day === 4) {
week = "四";
} else if (day === 5) {
week = "五";
} else if (day === 6) {
week = "六";
} else if (day === 7) {
week = "日";
}
return "周" + week
}, },
changeNearbyType(t) { changeNearbyType(t) {
this.nearbyType = t this.nearbyType = t
...@@ -408,10 +444,10 @@ ...@@ -408,10 +444,10 @@
if (x.id == 3 && y.BedType == 3) { if (x.id == 3 && y.BedType == 3) {
this.RoomList.push(y) this.RoomList.push(y)
} }
if (x.id == 3 && y.BedType == 4) { if (x.id == 4 && y.BreakfastType != 4) {
this.RoomList.push(y) this.RoomList.push(y)
} }
if (x.id == 4 && y.IsCancel == 5) { if (x.id == 5 && y.IsCancel == 2) {
this.RoomList.push(y) this.RoomList.push(y)
} }
}) })
...@@ -422,6 +458,9 @@ ...@@ -422,6 +458,9 @@
} else { } else {
this.isShowAll = false; this.isShowAll = false;
} }
if (num == 0) {
this.RoomList = this.dataList.RoomList;
}
}, },
changeLike() { changeLike() {
this.islike = !this.islike this.islike = !this.islike
...@@ -471,7 +510,9 @@ ...@@ -471,7 +510,9 @@
//获取酒店详情 //获取酒店详情
getHotelDetail(id) { getHotelDetail(id) {
let msg = { let msg = {
HotelId: id HotelId: id,
StartDate: this.dayObj.start,
EndDate: this.dayObj.end
} }
this.request2({ this.request2({
url: '/api/Hotel/GetHotelInfo', url: '/api/Hotel/GetHotelInfo',
...@@ -482,6 +523,9 @@ ...@@ -482,6 +523,9 @@
console.log(res, '详情数据'); console.log(res, '详情数据');
this.dataList = res.data; this.dataList = res.data;
this.RoomList = this.dataList.RoomList; this.RoomList = this.dataList.RoomList;
this.hotelData.HotelId = this.dataList.HotelId;
this.hotelData.HotelName = this.dataList.HotelName;
this.hotelData.Booking = this.dataList.Booking;
} }
} }
); );
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
<view class="days">{{day}}</view> <view class="days">{{day}}</view>
<view style="width: 1px; flex: 1;"> <view style="width: 1px; flex: 1;">
<u-search placeholder="关键字/位置/品牌/酒店名" v-model="searchObj.Name" input-align="left" :value="searchObj.Name" <u-search placeholder="关键字/位置/品牌/酒店名" v-model="searchObj.Name" input-align="left" :value="searchObj.Name"
text-color="#111" bg-color="rgba(0,0,0,0)" @change="getList(1)" :show-action="false"></u-search> text-color="#111" bg-color="rgba(0,0,0,0)" @change="research()" :show-action="false"></u-search>
</view> </view>
</view> </view>
<view> <view>
...@@ -55,9 +55,9 @@ ...@@ -55,9 +55,9 @@
</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" :dayObj="dayObj"></hotel-good> <hotel-good :HotelList="HotelList" :dayObj="dayObj" :searchObj="searchObj"></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>
</view> </view>
</template> </template>
...@@ -162,8 +162,8 @@ ...@@ -162,8 +162,8 @@
}, },
showLoading: false, showLoading: false,
status: "loadmore", status: "loadmore",
page_count:0, page_count: 0,
dayObj:{} dayObj: {}
} }
}, },
components: { components: {
...@@ -185,6 +185,7 @@ ...@@ -185,6 +185,7 @@
endDay: `${d2.getMonth()+1}-${d2.getDate()}`, endDay: `${d2.getMonth()+1}-${d2.getDate()}`,
day: 1 day: 1
} }
this.dayObj = obj;
uni.setStorage({ uni.setStorage({
key: 'Time', key: 'Time',
data: JSON.stringify(obj) data: JSON.stringify(obj)
...@@ -207,6 +208,11 @@ ...@@ -207,6 +208,11 @@
this.scrollTop = 0; this.scrollTop = 0;
}); });
}, },
research()
{
this.searchObj.pageIndex=1;
this.getList(1);
},
lower(e) { lower(e) {
// TODO: 滚动到了底部,实现翻页加载 // TODO: 滚动到了底部,实现翻页加载
if (this.searchObj.pageIndex < this.page_count) { if (this.searchObj.pageIndex < this.page_count) {
...@@ -223,18 +229,16 @@ ...@@ -223,18 +229,16 @@
} else { } else {
obj.IsCheck = 0; obj.IsCheck = 0;
} }
this.getList(1); this.research()
}, },
chosenDateResult(obj) { chosenDateResult(obj) {
console.log(obj,'obj');
this.searchObj.QStartDate = obj.start; this.searchObj.QStartDate = obj.start;
this.searchObj.QEndDate = obj.end; this.searchObj.QEndDate = obj.end;
this.startDay = obj.startDay; this.startDay = obj.startDay;
this.endDay = obj.endDay; this.endDay = obj.endDay;
this.day = obj.day; this.day = obj.day;
this.dayObj.startWeek = obj.startWeek; this.dayObj = obj;
this.dayObj.endWeek = obj.endWeek; this.research()
this.getList(1);
this.showTimePopup = false this.showTimePopup = false
}, },
chosenDate() { chosenDate() {
...@@ -266,7 +270,7 @@ ...@@ -266,7 +270,7 @@
this.closeDropdown(); this.closeDropdown();
this.searchObj.StartPrice = 0; this.searchObj.StartPrice = 0;
this.searchObj.EndPrice = 1000; this.searchObj.EndPrice = 1000;
this.getList(1); this.research()
}, },
surePrice() { surePrice() {
let result = "" let result = ""
...@@ -284,7 +288,7 @@ ...@@ -284,7 +288,7 @@
this.optionsTitle[2] = result this.optionsTitle[2] = result
this.$forceUpdate() this.$forceUpdate()
this.closeDropdown(); this.closeDropdown();
this.getList(1); this.research()
}, },
rangechange4(e) { rangechange4(e) {
this.searchObj.StartPrice = e.minValue; this.searchObj.StartPrice = e.minValue;
...@@ -326,7 +330,7 @@ ...@@ -326,7 +330,7 @@
} }
}) })
this.optionsTitle[0] = temp.label this.optionsTitle[0] = temp.label
this.getList(1); this.research()
}, },
change2(index) { change2(index) {
if (index != -1) { if (index != -1) {
...@@ -378,12 +382,8 @@ ...@@ -378,12 +382,8 @@
//获取列表数据 //获取列表数据
getList(type) { getList(type) {
this.searchObj.QStars = this.tempRateAndPrice.rate.toString(); this.searchObj.QStars = this.tempRateAndPrice.rate.toString();
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=[];
} }
this.request2({ this.request2({
url: '/api/Hotel/AppGetHotelPage', url: '/api/Hotel/AppGetHotelPage',
......
This diff is collapsed.
...@@ -242,7 +242,7 @@ ...@@ -242,7 +242,7 @@
<view class="xian"></view> <view class="xian"></view>
<view class="box-c-caritem"> <view class="box-c-caritem">
<view class="box-c-caritem-l">出行时间</view> <view class="box-c-caritem-l">出行时间</view>
<view class="box-c-caritem-r">{{x.Date}}</view> <view class="box-c-caritem-r">{{x.Date}} {{x.DepartureTime}}</view>
</view> </view>
<view class="box-c-caritem" v-if="x.PeopleNumber>0"> <view class="box-c-caritem" v-if="x.PeopleNumber>0">
<view class="box-c-caritem-l">成人</view> <view class="box-c-caritem-l">成人</view>
......
<template> <template>
<view class="package-good"> <view class="package-good">
<view class="rm-left"> <view class="rm-left">
<image src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1622459632000_216.png" mode="aspectFill"> <image :src="data.MealPic" mode="aspectFit">
</image> </image>
</view> </view>
<view class="rm-right"> <view class="rm-right">
<view class="package-name">海鲜团队用餐</view> <view class="package-name">{{data.MealName}}</view>
<view class="f11"> <view class="f11">
<text class="king" style="margin-right: 14rpx;">6人起订</text> <text class="king" style="margin-right: 14rpx;" v-if="data.MinBuyNum>0">{{data.MinBuyNum}}人起订</text>
<text>仅周五、周六可用,节假日可用</text>
<text><text v-for="(item,index) in data.UsageTimeList" :key="index">
{{item.Name}} <text v-if="index!=data.UsageTimeList.length-1"></text>
</text>可用,</text>
<text v-if="data.IsHoliday===1">节假日可用</text>
</view> </view>
<viwe class="give f11"> <viwe class="give f11">
提前1天预约 <text v-if="data.MakeDay===0">可预约当天</text>
<text v-if="data.MakeDay>0">提前{{data.MakeDay}}天预约</text>
</viwe> </viwe>
<view class="price" style="margin-top:30rpx;"> <view class="price" style="margin-top:30rpx;">
<text class="f11" style="margin-right: 10rpx;"></text> <text class="f11" style="margin-right: 10rpx;"></text>
<text>889</text> <text v-if="data.LPriceB">{{data.LPriceB}}</text>
<text v-if="!data.LPriceB">暂无报价</text>
</view> </view>
</view> </view>
<view class="rm-opera"> <view class="rm-opera">
...@@ -23,12 +29,26 @@ ...@@ -23,12 +29,26 @@
<view class="buy-content"></view> <view class="buy-content"></view>
<view class="buy-tips">在线订</view> <view class="buy-tips">在线订</view>
</view> </view>
<!-- <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:{
data:{
type:Object,
dafault:{}
}
},
mounted() {
console.log(this.data)
},
methods: { methods: {
previewOrder(){ previewOrder(){
uni.navigateTo({ uni.navigateTo({
......
<template> <template>
<view class="restaurant-list-item"> <view class="restaurant-list-item" @click="confirm">
<view class="img-box"> <view class="img-box">
<image src="https://dimg04.c-ctrip.com/images/03551120008nt5eb8BB53_C_500_500_Q80.jpg" mode="aspectFill"></image> <image :src="data.CoverImg" mode="aspectFill"></image>
</view> </view>
<view class="restaurant-info"> <view class="restaurant-info">
<view class="restaurant-name">北京街头卤煮火烧</view> <view class="restaurant-name">{{data.Name}}</view>
<view class="restaurant-start"> <view class="restaurant-start">
<view class="other-rate"> <view class="other-rate">
<text>老北京·地道</text> <text>{{data.Feature}}</text>
<span class="line"></span> <span class="line"></span>
</view> </view>
</view> </view>
<view class="localtion">环境内外装修以竹制品体现,夫妻肺片麻辣鲜香,口干嫩滑色泽红亮</view> <view class="localtion">{{data.Address}}</view>
<view> <view style="display: flex;flex-wrap: wrap;">
<u-tag text="川菜 " bg-color="#FFF" border-color="#DFBE6E" color="#DFBE6E" size="mini" style="margin-right: 20rpx;"></u-tag> <view v-for="(item,index) in data.FoodTag" :key="index">
<u-tag text="沟口" bg-color="#FFF" border-color="#DFBE6E" color="#DFBE6E" size="mini"></u-tag> <u-tag :text="item" bg-color="#FFF" border-color="#DFBE6E" color="#DFBE6E" size="mini" style="margin-right: 20rpx;" v-if="item"></u-tag>
</view>
<view v-for="(item,index) in data.GeographicTag" :key="index">
<u-tag :text="item" bg-color="#FFF" border-color="#DFBE6E" color="#DFBE6E" size="mini" style="margin-right: 20rpx;" v-if="item"></u-tag>
</view>
</view> </view>
<view class="price"> <view class="price">
<text></text> <text></text>
<text class="money">200</text> <text class="money">{{data.B2BPrice}}</text>
<text>/起</text> <text>/起</text>
</view> </view>
</view> </view>
...@@ -31,13 +36,25 @@ ...@@ -31,13 +36,25 @@
restaurantType:{ restaurantType:{
type:Number, type:Number,
default:0 default:0
},
data:{
type:Object,
default:{}
} }
}, },
created() {
console.log(this.data)
},
data() { data() {
return { return {
// key: value // key: value
} }
}, },
methods:{
confirm(){
this.$emit("confirm")
}
}
} }
</script> </script>
...@@ -58,6 +75,7 @@ ...@@ -58,6 +75,7 @@
} }
.restaurant-list-item .img-box image{ .restaurant-list-item .img-box image{
width: 100%; width: 100%;
height: 100%;
} }
.restaurant-list-item .restaurant-info{ .restaurant-list-item .restaurant-info{
width: 1px; width: 1px;
......
...@@ -61,12 +61,12 @@ ...@@ -61,12 +61,12 @@
]" :style="{ width: (dayWidth - 10) / 7 + 'px',borderRadius:line == end[0] && index == end[1]?'0px 6px 6px 0px':'',backgroundColor:line == end[0] && index == end[1]?'#111':'',color:line == end[0] && index == end[1]?'#FFFFFF':''}"> ]" :style="{ width: (dayWidth - 10) / 7 + 'px',borderRadius:line == end[0] && index == end[1]?'0px 6px 6px 0px':'',backgroundColor:line == end[0] && index == end[1]?'#111':'',color:line == end[0] && index == end[1]?'#FFFFFF':''}">
<view style="padding-top:2px;padding-bottom:2px;">{{ item }}</view> <view style="padding-top:2px;padding-bottom:2px;">{{ item }}</view>
<view class="select-style" v-if="line == start[0] && index == start[1]">入住</view> <view class="select-style" v-if="line == start[0] && index == start[1]">开始日期</view>
<view class="select-style" v-if="line == end[0] && index == end[1]">离店</view> <view class="select-style" v-if="line == end[0] && index == end[1]">结束日期</view>
<view style="font-size:12px;padding-bottom: 3px;" v-if="priceStauts.length > 0"> <!-- <view style="font-size:12px;padding-bottom: 3px;" v-if="priceStauts.length > 0">
<view v-if="priceStauts[line][index]>0">{{ priceStauts[line][index] }}</view> <view v-if="priceStauts[line][index]>0">{{ priceStauts[line][index] }}</view>
<view v-if="priceStauts[line][index] <0">无房</view> <view v-if="priceStauts[line][index] <0">无房</view>
</view> </view> -->
</view> </view>
</view> </view>
</view> </view>
...@@ -74,7 +74,7 @@ ...@@ -74,7 +74,7 @@
<view class="submit"> <view class="submit">
<button class="sub-btn" :disabled="!isSub" @click="submit"> <button class="sub-btn" :disabled="!isSub" @click="submit">
<text v-if="isSub">确定</text> <text v-if="isSub">确定</text>
<text v-if="!isSub">请选择入住日期</text> <text v-if="!isSub">请选择结束日期</text>
</button> </button>
</view> </view>
</scroll-view> </scroll-view>
......
This diff is collapsed.
...@@ -2,32 +2,30 @@ ...@@ -2,32 +2,30 @@
<view class="hotel-list"> <view class="hotel-list">
<view class="search-box"> <view class="search-box">
<view style="width: 1px; flex: 1;"> <view style="width: 1px; flex: 1;">
<u-search placeholder="美食名称" v-model="searchObj.searchKey" input-align="left" :value="searchObj.searchKey" <u-search placeholder="美食名称" v-model="msg.Name" input-align="left"
text-color="#111" bg-color="rgba(0,0,0,0)" :show-action="false"></u-search> text-color="#111" bg-color="rgba(0,0,0,0)" :show-action="false"></u-search>
</view> </view>
</view> </view>
<view> <view>
<u-dropdown ref="uDropdown" @open="open" @close="close" active-color="#000" inactive-color="#444"> <u-dropdown ref="uDropdown" @open="open" @close="close" active-color="#000" inactive-color="#444">
<u-dropdown-item v-model="searchObj.sort" :title="optionsTitle[0]" :options="options1" @change="change"> <u-dropdown-item v-model="msg.OrderBy" :title="optionsTitle[0]" :options="options1" @change="change">
</u-dropdown-item> </u-dropdown-item>
<u-dropdown-item :title="optionsTitle[1]" @change="change2">
<view class="slot-content"> <u-dropdown-item v-model="msg.FoodTypeIds" :title="optionsTitle[1]" :options="classOptions">
<restaurant-type @sure-type="sureType" :current="currentTypeObj"></restaurant-type>
</view>
</u-dropdown-item> </u-dropdown-item>
<u-dropdown-item :title="optionsTitle[2]"> <u-dropdown-item :title="optionsTitle[2]">
<view class="slot-content" style="padding: 30rpx;background-color: #FFF;"> <view class="slot-content" style="padding: 30rpx;background-color: #FFF;">
<view> <!-- <view>
<text style="font-size: 28rpx;color:#111;font-weight: 800;margin-right: 10rpx;">餐厅类型</text> <text style="font-size: 28rpx;color:#111;font-weight: 800;margin-right: 10rpx;">餐厅类型</text>
</view> </view>
<view class="hotel-rate-box"> <view class="hotel-rate-box">
<view v-for="(x,i) in options2" :key="i" class="hotel-rate" :class="{'active':tempRateAndPrice.types.indexOf(x.value)!=-1}" @click="setRestaurant(x.value)">{{x.label}}</view> <view v-for="(x,i) in options2" :key="i" class="hotel-rate" :class="{'active':tempRateAndPrice.types.indexOf(x.value)!=-1}" @click="setRestaurant(x.value)">{{x.label}}</view>
</view> </view> -->
<view style="margin-top: 20rpx;"> <view style="margin-top: 20rpx;">
<text style="font-size: 28rpx;color:#111;font-weight: 800;">价格</text> <text style="font-size: 28rpx;color:#111;font-weight: 800;">价格</text>
</view> </view>
<view class="hotel-rate-box"> <view class="hotel-rate-box">
<view v-for="(x,i) in rates" class="hotel-rate" :class="{'active':tempRateAndPrice.rate.indexOf(x.value)!=-1}" @click="setRestaurantPrice(x.value)">{{x.label}}</view> <view v-for="(x,i) in rates" class="hotel-rate" :class="{'active':tempRateAndPrice.rate.indexOf(x.ID)!=-1}" @click="setRestaurantPrice(x.ID)">{{x.Name}}</view>
</view> </view>
<view style="box-shadow: 0px -10px 30px 0px rgba(36, 36, 36, 0.06);margin-top:40rpx;display: flex;"> <view style="box-shadow: 0px -10px 30px 0px rgba(36, 36, 36, 0.06);margin-top:40rpx;display: flex;">
<view style="flex:1;margin-right: 30rpx;"> <view style="flex:1;margin-right: 30rpx;">
...@@ -39,18 +37,34 @@ ...@@ -39,18 +37,34 @@
</view> </view>
</view> </view>
</u-dropdown-item> </u-dropdown-item>
<!-- <u-dropdown-item :title="optionsTitle[3]" @change="change2">
<view class="slot-content">
<restaurant-type @sure-type="sureType" :current="currentTypeObj"></restaurant-type>
</view>
</u-dropdown-item> -->
</u-dropdown> </u-dropdown>
</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% - 168rpx); padding-bottom: 0px;"> @scroll="scroll" style="height: calc(100% - 168rpx); padding-bottom: 0px;">
<restaurant-good></restaurant-good> <view v-for="(item,index) in restaurantList" :key="index">
<restaurant-good></restaurant-good> <restaurant-good :data="item" @confirm="confirm(item.ID)"></restaurant-good>
<restaurant-good></restaurant-good> </view>
<restaurant-good></restaurant-good>
<restaurant-good></restaurant-good> <u-loadmore
<u-loadmore v-if="showLoading" :status="status" :load-text="loadText" :font-size="24" :margin-top="20" :status="status"
:margin-bottom="20" bg-color="#F5F5F5" color="#111" /> :load-text="loadText"
:font-size="24"
:margin-top="20"
:margin-bottom="20"
bg-color="#FFF"
/>
</scroll-view> </scroll-view>
<!-- 加载中 -->
<view class="loading" v-if="loading">
<u-loading mode="flower" size="48"></u-loading>
<Text style="color: #fff; margin-top: 10rpx;">加载中...</Text>
</view>
</view> </view>
</template> </template>
...@@ -61,9 +75,20 @@ ...@@ -61,9 +75,20 @@
export default { export default {
data() { data() {
return { return {
msg:{
pageIndex:1,
pageSize:10,
Name:"",
OrderBy:0,
FoodTypeIds:0,
DiningPriceType:-1,
},
page_count:1,
status: "loadmore",
restaurantList:[],//餐厅列表
searchObj:{ searchObj:{
searchKey:"", Name:"",
sort:1, OrderBy:0,
rtype:-1, rtype:-1,
rateAndPrice:{ rateAndPrice:{
types:[-1], types:[-1],
...@@ -77,52 +102,25 @@ ...@@ -77,52 +102,25 @@
}, },
optionsTitle: [ optionsTitle: [
"推荐排序", "推荐排序",
"菜系", "分类",
"筛选" "筛选",
"菜系"
], ],
rates: [ rates: [],//价格列表
{ options1: [
label:"不限",
value:-1
},
{
label:"50以下",
value:1
},
{
label:"50-100",
value:2
},
{
label:"100-150",
value:3
},
{ {
label:"150-200", label: '不限',
value:4 value: 0,
}, },
{ {
label:"200以上", label: '人均最高',
value:5
}
],
options1: [
{
label: '推荐排序',
value: 1, value: 1,
}, },
{ {
label: '好评优先', label: '人均最低',
value: 2, value: 2,
}, },
{
label: '低价优先',
value: 3,
},
{
label: '高价优先',
value: 4,
}
], ],
options2: [ options2: [
{ {
...@@ -150,6 +148,7 @@ ...@@ -150,6 +148,7 @@
value: 5, value: 5,
} }
], ],
classOptions:[],
btnStyle:{ btnStyle:{
borderRadius: '16rpx', borderRadius: '16rpx',
color: '#111', color: '#111',
...@@ -209,6 +208,9 @@ ...@@ -209,6 +208,9 @@
data: JSON.stringify(obj) data: JSON.stringify(obj)
}) })
this.searchObj.date=obj this.searchObj.date=obj
this.getFoodType();
this.getPriceEnum();
this.getFoodList();
}, },
methods: { methods: {
...@@ -222,15 +224,13 @@ ...@@ -222,15 +224,13 @@
}); });
}, },
lower(e) { lower(e) {
// TODO: 滚动到了底部,实现翻页加载 if (this.msg.pageIndex < this.page_count) {
// if (this.msg.pageIndex < this.page_count) { this.msg.pageIndex++;
// this.status = "loading"; this.status = "loading";
// this.msg.pageIndex++; this.getFoodList();
// this.init(); } else {
// } else { this.status = "nomore";
// this.isover = true; }
// this.status = "nomore";
// }
}, },
setRestaurantPrice(rateId){ setRestaurantPrice(rateId){
if(rateId==-1){ if(rateId==-1){
...@@ -246,6 +246,7 @@ ...@@ -246,6 +246,7 @@
this.tempRateAndPrice.rate.splice(temp,1) this.tempRateAndPrice.rate.splice(temp,1)
} }
} }
console.log(this.tempRateAndPrice.rate)
}, },
setRestaurant(typeId){ setRestaurant(typeId){
if(typeId==-1){ if(typeId==-1){
...@@ -340,34 +341,111 @@ ...@@ -340,34 +341,111 @@
this.$refs.uDropdown.highlight(index); this.$refs.uDropdown.highlight(index);
}, },
change(index) { change(index) {
let temp = this.options1.find(x => { // let temp = this.options1.find(x => {
if (x.value == index) { // if (x.ID == index) {
return x // return x
} else { // } else {
return false // return false
} // }
}) // })
this.optionsTitle[0] = temp.label // console.log(index,temp)
// this.optionsTitle[0] = temp.Name
}, },
change2(index){ change2(index){
if(index!=-1){ // if(index!=-1){
let temp = this.options2.find(x => { // let temp = this.options2.find(x => {
if (x.value == index) { // if (x.value == index) {
return x // return x
} else { // } else {
return false // return false
// }
// })
// this.optionsTitle[1] = temp.label
// }else{
// this.optionsTitle[1] = "附近"
// }
},
// 获取餐食类型
getFoodType(){
this.request2({
url: '/api/AppletDining/GetFoodType',
data: {
ClassType:0
}
},
res => {
if(res.resultCode===1){
this.typeList=res.data
this.classOptions=[{
label: "不限",
value: 0,
}]
res.data.map(i=>{
let obj={
label: i.Name,
value: i.ID,
}
this.classOptions.push(obj)
})
} }
})
this.optionsTitle[1] = temp.label }
}else{ );
this.optionsTitle[1] = "附近" },
} // 获取餐食价格枚举
getPriceEnum(){
this.request2({
url: '/api/AppletDining/GetDiningPriceType',
data: {}
},
res => {
if(res.resultCode===1){
this.rates=res.data
}
}
);
},
// 获取餐食列表
getFoodList(){
// this.msg.DiningPriceType=this.searchObj.rateAndPrice.join(",")
this.request2({
url: '/api/AppletDining/GetDiningPage',
data: this.msg
},
res => {
if(res.resultCode===1){
this.page_count = res.data.pageCount;
res.data.pageData.forEach(item=>{
item.FoodTag=item.FoodTag.split(',')
item.GeographicTag=item.GeographicTag.split(',')
})
if(this.msg.pageIndex==1){
this.restaurantList=res.data.pageData;
}else if(this.msg.pageIndex>1){
this.restaurantList=[...this.restaurantList,...res.data.pageData];
}
if (this.page_count == 1) {
this.status = "nomore";
}
}
}
);
},
confirm(id){
uni.navigateTo({
url:"/pages/restaurant/detail?id="+id
})
} }
}, },
} }
</script> </script>
<style> <style scoped>
/deep/.u-flex{
justify-content: center;
}
.hotel-list { .hotel-list {
height: 100vh; height: 100vh;
...@@ -405,7 +483,7 @@ ...@@ -405,7 +483,7 @@
flex-wrap: wrap; flex-wrap: wrap;
} }
.hotel-rate{ .hotel-rate{
width: 159rpx; width: 215rpx;
height: 60rpx; height: 60rpx;
background: #ECF1F4; background: #ECF1F4;
border-radius: 10rpx; border-radius: 10rpx;
......
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
</view> </view>
</view> </view>
<view class="dayBox"> <view class="dayBox">
<view class="day" v-for="(item,index) in space" v-bind:key="index+999"></view> <view class="day" v-for="(item,index) in space" v-bind:key="index"></view>
<view class="day" :class="[getDateStr(item.date)==getDateStr(dayActive.date)?'active':'']" v-for="(item,index) in dayList" v-bind:key="index" @tap="selectDate(item)"> <view class="day" :class="[getDateStr(item.date)==getDateStr(dayActive.date)?'active':'']" v-for="(item,index) in dayList" v-bind:key="index" @tap="selectDate(item)">
<view :class="[isToday(item.date)?'today':'']">{{isToday(item.date) ? "今天" : item.date.getDate()}}</view> <view :class="[isToday(item.date)?'today':'']">{{isToday(item.date) ? "今天" : item.date.getDate()}}</view>
<view class="calen-text-orange">{{item.price?'&yen;'+item.price:''}}</view> <view class="calen-text-orange">{{item.price?'&yen;'+item.price:''}}</view>
......
...@@ -42,14 +42,17 @@ ...@@ -42,14 +42,17 @@
</view> </view>
</view> </view>
</view> </view>
<auth v-if="showAuth" @changeuserinfo="reloadUserinfo" @gbAuth='goback'></auth>
</view> </view>
</template> </template>
<script> <script>
import zCalendar from './njzz-calendar/njzz-calendar.vue' import zCalendar from './njzz-calendar/njzz-calendar.vue'
import auth from "../../../components/auth/index.vue";
export default { export default {
components: { components: {
zCalendar zCalendar,
auth
}, },
props: { props: {
dateStr: { dateStr: {
...@@ -77,6 +80,8 @@ ...@@ -77,6 +80,8 @@
datePrice: [], datePrice: [],
price:"", price:"",
peopleNum:1, peopleNum:1,
showAuth:false,
u:{},
} }
}, },
watch: { watch: {
...@@ -85,7 +90,7 @@ ...@@ -85,7 +90,7 @@
let oldMonth = oldVal.split('-')[1] let oldMonth = oldVal.split('-')[1]
if(newMonth!=oldMonth&&oldMonth!=undefined){ if(newMonth!=oldMonth&&oldMonth!=undefined){
console.log(newMonth!=oldMonth) console.log(newMonth!=oldMonth)
this.getGoodsDateList() this.getGoodsDateList(val)
} }
}, },
...@@ -106,12 +111,10 @@ ...@@ -106,12 +111,10 @@
this.defaultSelect = this.dateStr; this.defaultSelect = this.dateStr;
}, },
methods: { methods: {
valChange(e) {
this.peopleNum=e.value
},
getGoodsDateList(date) { getGoodsDateList(date) {
let d = new Date();
let today = `${d.getFullYear()}-${d.getMonth()+1}-${d.getDate()}`
if(!data){
data=today
}
this.request2({ this.request2({
url: '/api/AppletDining/GetMonthTicketList', url: '/api/AppletDining/GetMonthTicketList',
data: { data: {
...@@ -144,23 +147,47 @@ ...@@ -144,23 +147,47 @@
}, },
changeMonth(nowMonth){ changeMonth(nowMonth){
let Month = nowMonth.year+'-'+nowMonth.month+'-01'; let Month = nowMonth.year+'-'+nowMonth.month+'-01';
this.getGoodsDateList(Month) this.getGoodsDateList(Month)
}, },
nextStep(){ nextStep(){
let data={ this.u = uni.getStorageSync("mall_UserInfo");
TicketId:this.TicketID, if (!this.u) {
TitekCounponId:this.TitekCounponId, this.u = {
Unit_Price:this.price, nickName: "未登录",
Date:this.defaultSelect, avatarUrl: ""
TicketName:this.TicketName, };
PeopleNumber:this.peopleNum, this.showAuth = true;
} else {
if(!this.price){
uni.showToast({
title: "请选择日期",
icon: "none",
});
return
}
let data={
TicketId:this.TicketID,
TitekCounponId:this.TitekCounponId,
Unit_Price:this.price,
Date:this.defaultSelect,
TicketName:this.TicketName,
PeopleNumber:this.peopleNum,
}
uni.navigateTo({
url: "/pages/ticketCoupons/fillOrder?data="+encodeURIComponent(JSON.stringify(data)),
});
} }
uni.navigateTo({
url: "/pages/ticketCoupons/fillOrder?data="+encodeURIComponent(JSON.stringify(data)), },
}); reloadUserinfo() {
} this.u = uni.getStorageSync("mall_UserInfo");
// this.getOrderStatus();
},
goback() {
uni.navigateBack()
},
} }
......
...@@ -24,10 +24,14 @@ ...@@ -24,10 +24,14 @@
<view class="name"> <view class="name">
{{details.Name}} {{details.Name}}
</view> </view>
<view class="score"> <view class="score-bg">
{{details.ScoreNum}} <image src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/CustomizedCar/pingfen-bg.png" mode="aspectFit" class="pf-bg"></image>
<text <view class="score">
v-if="details.ScoreNum===1||details.ScoreNum===2||details.ScoreNum===3||details.ScoreNum===4||details.ScoreNum===5">.0</text> {{details.ScoreNum}}
<text
v-if="details.ScoreNum===1||details.ScoreNum===2||details.ScoreNum===3||details.ScoreNum===4||details.ScoreNum===5">.0</text>
</view>
</view> </view>
</view> </view>
<view class="info2"> <view class="info2">
...@@ -96,8 +100,14 @@ ...@@ -96,8 +100,14 @@
</view> </view>
<view> <view>
<view class="no-data" v-if="details.mealList.length==0">
<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>
</view>
<view v-for="(item,index) in details.mealList" :key="index" class="ticket-list-box" <view v-for="(item,index) in details.mealList" :key="index" class="ticket-list-box"
:class="{'last-item':index==details.mealList.length-1}"> :class="{'last-item':index==details.mealList.length-1}" v-if="details.mealList.length>0">
<view class="ticket-key"> <view class="ticket-key">
{{item.Key}} {{item.Key}}
</view> </view>
...@@ -198,7 +208,9 @@ ...@@ -198,7 +208,9 @@
return { return {
ID: 0, ID: 0,
Date: "", //日期 Date: "", //日期
details: {}, details: {
},
typeList: [{ typeList: [{
Id: 0, Id: 0,
Name: '视频' Name: '视频'
...@@ -264,7 +276,7 @@ ...@@ -264,7 +276,7 @@
confirm(e) { confirm(e) {
this.Date = e.fulldate this.Date = e.fulldate
this.calendar[0].date = e.fulldate this.calendar[0].date = e.fulldate
this.getDetail() this.getDetailByDate();
this.$forceUpdate() this.$forceUpdate()
}, },
openBuyNotice(item) { openBuyNotice(item) {
...@@ -280,15 +292,13 @@ ...@@ -280,15 +292,13 @@
this.showSubscribeTicketPop=true this.showSubscribeTicketPop=true
this.TicketID=item.Id this.TicketID=item.Id
this.TicketName=item.TicketSubName+item.TicketName this.TicketName=item.TicketSubName+item.TicketName
console.log(item)
}, },
//获取详情 //获取详情
getDetail() { getDetail() {
this.request2({ this.request2({
url: '/api/AppletDining/GetTicketCouponsDetails', url: '/api/AppletDining/GetTicketCouponsDetails',
data: { data: {
ID: this.ID, ID: this.ID
BuyDate: this.Date
} }
}, },
res => { res => {
...@@ -300,6 +310,22 @@ ...@@ -300,6 +310,22 @@
} }
); );
}, },
// 根据景点id与指定日期获取门票列表信息
getDetailByDate() {
this.request2({
url: '/api/AppletDining/GetTicketCouponsTicketList',
data: {
ID: this.ID,
BuyDate: this.Date
}
},
res => {
if (res.resultCode == 1) {
this.details.mealList = res.data;
}
}
);
},
changeHandler(i) { changeHandler(i) {
this.active = i; this.active = i;
}, },
...@@ -319,22 +345,6 @@ ...@@ -319,22 +345,6 @@
delta: 1, delta: 1,
}); });
}, },
enlarge(file) {
// 全屏
this.videoContext = uni.createVideoContext('myVideo');
this.videoContext.requestFullScreen({
direction: 0
})
},
videoControl(e) {
if (e.detail.fullScreen == false) {
this.videoContext.stop()
this.controls = false
} else {
this.videoContext.play()
this.controls = true
}
},
goMap(name, lon, lat) { goMap(name, lon, lat) {
console.log(name, lon, lat) console.log(name, lon, lat)
...@@ -359,15 +369,34 @@ ...@@ -359,15 +369,34 @@
this.checkTicketNavIndex = i this.checkTicketNavIndex = i
if (i === 1) { if (i === 1) {
let d = new Date(); let d = new Date();
let today = `${d.getFullYear()}-${d.getMonth()+1}-${d.getDate()}` let year=d.getFullYear();
let month=d.getMonth()+1
if(month<10){
month='0'+month
}
let day=d.getDate()
if(day<10){
day='0'+day
}
let today = year+'-'+month+'-'+day
this.Date = today this.Date = today
this.getDetail() this.getDetailByDate()
this.$forceUpdate() this.$forceUpdate()
} else if (i === 2) { } else if (i === 2) {
let d = new Date(); let d = new Date();
let tomorrow = `${d.getFullYear()}-${d.getMonth()+1}-${d.getDate()+1}` let nextDate = new Date(d.getTime() + 24*60*60*1000);
let year=nextDate.getFullYear();
let month=nextDate.getMonth()+1
if(month<10){
month='0'+month
}
let day=nextDate.getDate()
if(day<10){
day='0'+day
}
let tomorrow = year+'-'+month+'-'+day
this.Date = tomorrow this.Date = tomorrow
this.getDetail() this.getDetailByDate()
this.$forceUpdate() this.$forceUpdate()
} else if (i === 3) { } else if (i === 3) {
this.$refs.calendar.open() this.$refs.calendar.open()
...@@ -499,32 +528,65 @@ ...@@ -499,32 +528,65 @@
text-align: center; text-align: center;
font-size: 12rpx; font-size: 12rpx;
} }
.no-data{
.no-data-img{
width: 180rpx;
height: 240rpx;
margin-left: 50%;
transform: translateX(-50%);
}
.zhanwu{
text-align: center;
font-size: 28rpx;
font-family: PingFang SC;
font-weight: 500;
color: #999999;
margin-top: 20rpx;
}
}
.baseinfo { .baseinfo {
padding: 30rpx 45rpx; padding: 30rpx 45rpx;
.info1 { .info1 {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: flex-end;
.name { .name {
width: 575rpx;
font-size: 36rpx; font-size: 36rpx;
font-family: PingFang SC; font-family: PingFang SC;
font-weight: 800; font-weight: 800;
color: #111111; color: #111111;
line-height: 44rpx; line-height: 44rpx;
} }
.score-bg{
position: relative;
width: 65rpx;
height: 65rpx;
background-color: #FFFFFF;
.pf-bg{
width: 65rpx;
height: 65rpx;
position: absolute;
left: 0;
top: 0;
z-index: 1;
}
}
.score { .score {
width: 64rpx; width: 64rpx;
height: 54rpx; height: 54rpx;
background: linear-gradient(0deg, rgba(228, 177, 53, 0.72), rgba(223, 190, 110, 0)); // background: linear-gradient(0deg, rgba(228, 177, 53, 0.72), rgba(223, 190, 110, 0));
font-size: 32rpx; font-size: 32rpx;
font-family: PingFang SC; font-family: PingFang SC;
font-weight: 800; font-weight: 800;
color: #FFFFFF; color: #FFFFFF;
line-height: 44rpx; line-height: 44rpx;
position: absolute;
left: 8rpx;
top: 4rpx;
z-index: 2;
} }
} }
...@@ -741,7 +803,7 @@ ...@@ -741,7 +803,7 @@
.tag-img { .tag-img {
width: 105rpx; width: 105rpx;
height: 32rpx; height: 32rpx;
background-color: #FFFFFF; // background-color: #FFFFFF;
border-radius: 4rpx; border-radius: 4rpx;
} }
...@@ -827,11 +889,12 @@ ...@@ -827,11 +889,12 @@
.comment-box { .comment-box {
padding: 50rpx 45rpx; padding: 50rpx 45rpx;
.score-box { .score-box {
width: 235rpx; width: 235rpx;
display: flex; display: flex;
.score { .score {
font-size: 60rpx; font-size: 60rpx;
font-family: PingFang SC; font-family: PingFang SC;
......
...@@ -31,14 +31,14 @@ ...@@ -31,14 +31,14 @@
<view class="item-title"> <view class="item-title">
姓名 姓名
</view> </view>
<input class="input" type="text" placeholder="请输入真实姓名" v-model="Consignee" /> <input class="input" type="text" placeholder="请输入联系人姓名" v-model="Consignee" />
</view> </view>
<view class="item-box"> <view class="item-box">
<view class="item-title"> <view class="item-title">
手机号 手机号
</view> </view>
<input class="input" type="text" placeholder="请输入手机号" v-model="ConsigneeMobile" /> <input class="input" type="number" placeholder="请输入手机号" v-model="ConsigneeMobile" />
</view> </view>
<u-popup v-model="showAddGuset" mode="bottom" border-radius="40" :closeable="true"> <u-popup v-model="showAddGuset" mode="bottom" border-radius="40" :closeable="true">
<guest @confirm='changeGuest'></guest> <guest @confirm='changeGuest'></guest>
...@@ -54,7 +54,7 @@ ...@@ -54,7 +54,7 @@
</view> </view>
<view class="right"> <view class="right">
<view class="mx"> <view class="mx">
明细 <!-- 明细 -->
</view> </view>
<view class="btn" @click="submitOrder"> <view class="btn" @click="submitOrder">
去支付 去支付
...@@ -81,13 +81,18 @@ ...@@ -81,13 +81,18 @@
Consignee:"", Consignee:"",
ConsigneeMobile:"", ConsigneeMobile:"",
BuyerMessage:"", BuyerMessage:"",
orderInfo:{}
} }
}, },
onLoad(options) { onLoad(options) {
let obj=JSON.parse(decodeURIComponent(options.data)) let obj=JSON.parse(decodeURIComponent(options.data))
this.ticketdData=obj this.ticketdData=obj
console.log(this.ticketdData)
this.Final_Price=this.ticketdData.PeopleNumber*this.ticketdData.Unit_Price
}, },
created() { created() {
uni.setNavigationBarTitle({ uni.setNavigationBarTitle({
title: "订单填写", title: "订单填写",
...@@ -106,6 +111,23 @@ ...@@ -106,6 +111,23 @@
this.Final_Price=this.ticketdData.PeopleNumber*this.ticketdData.Unit_Price this.Final_Price=this.ticketdData.PeopleNumber*this.ticketdData.Unit_Price
}, },
submitOrder(){ submitOrder(){
if(!this.Consignee){
uni.showToast({
title: "请输入联系人姓名",
icon: "none",
});
return
}
if(!this.ConsigneeMobile){
uni.showToast({
title: "请输入手机号",
icon: "none",
});
return
}
uni.showLoading({
title: '支付中...'
});
this.request2({ this.request2({
url: '/api/AppletDining/SetAppletTicketOrderInfo', url: '/api/AppletDining/SetAppletTicketOrderInfo',
data: { data: {
...@@ -118,10 +140,74 @@ ...@@ -118,10 +140,74 @@
}, },
res => { res => {
console.log(res) uni.hideLoading();
if(res.resultCode===1){
let that=this
uni.requestSubscribeMessage({
tmplIds: res.data.template_message_list,
complete(_res) {
that.queren(res.data.OrderId)
}
});
}
},
err=>{
uni.hideLoading();
} }
); );
} },
queren(OrderId){
let url='/api/WeChatPay/GetDmcPayInfo'
let GoodsName = this.ticketdData.TicketName
GoodsName = GoodsName.slice(0, 10)
this.request2({
url: url,
data: {
OrderId:OrderId,
GoodsName:GoodsName,
OrderPayType:1,
OpenId:uni.getStorageSync('mall_UserInfo').OpenId,
}
},
res => {
this.orderInfo = JSON.parse(res.data);
console.log(171,this.orderInfo)
this.Pay()
}
);
},
Pay(){
let that=this;
uni.requestPayment({
provider: 'wxpay',
timeStamp: this.orderInfo.timeStamp,
nonceStr: this.orderInfo.nonceStr,
package: this.orderInfo.package,
signType: this.orderInfo.signType,
paySign: this.orderInfo.sign,
success: function(res) {
console.log('success', res);
uni.showToast({
title: "支付成功"
})
setTimeout(()=>{
uni.redirectTo({
url: '/pages/jiuzhai/allorderList'
});
}, 100 )
},
fail: function(err) {
console.log('fail:', err);
uni.showToast({
title: "支付失败"
})
}
});
},
}, },
} }
......
...@@ -3,18 +3,18 @@ ...@@ -3,18 +3,18 @@
<view class="search-box"> <view class="search-box">
<view style="width: 1px; flex: 1;"> <view style="width: 1px; flex: 1;">
<u-search placeholder="目的地/景点/主题" v-model="msg.Name" input-align="left" :value="searchObj.searchKey" <u-search placeholder="目的地/景点/主题" v-model="msg.Name" input-align="left" :value="searchObj.searchKey"
text-color="#111" bg-color="rgba(0,0,0,0)" :show-action="false"></u-search> text-color="#111" bg-color="rgba(0,0,0,0)" :show-action="false" @search="searchList" @clear="searchList"></u-search>
</view> </view>
</view> </view>
<view> <view>
<u-dropdown ref="uDropdown" @open="open" @close="close" active-color="#000" inactive-color="#444"> <u-dropdown ref="uDropdown" @open="open" @close="close" active-color="#000" inactive-color="#444">
<!-- 推荐排序 --> <!-- 推荐排序 -->
<u-dropdown-item v-model="msg.OrderBy" :title="optionsTitle[0]" :options="orderOptions" @change="getList"> <u-dropdown-item v-model="msg.OrderBy" :title="optionsTitle[0]" :options="orderOptions" @change="getList" style="justify-content: center;">
</u-dropdown-item> </u-dropdown-item>
<!-- 景点类型 --> <!-- 景点类型 -->
<u-dropdown-item :title="optionsTitle[1]"> <u-dropdown-item :title="optionsTitle[1]" v-model="msg.FoodTypeIds" :options="classOptions" @change="getList">
<Cascade :dataList="typeList"></Cascade> <!-- <Cascade :dataList="typeList"></Cascade> -->
</u-dropdown-item> </u-dropdown-item>
<!-- 筛选 --> <!-- 筛选 -->
...@@ -97,10 +97,6 @@ ...@@ -97,10 +97,6 @@
</template> </template>
<script> <script>
// import rangeSlider from "./components/range-slider.vue"
// import canlendar from "./components/time/index.vue"
// import Cascade from "./components/cascade.vue"
export default { export default {
data() { data() {
...@@ -111,7 +107,7 @@ ...@@ -111,7 +107,7 @@
pageIndex:1, pageIndex:1,
pageSize:10, pageSize:10,
Name:"", Name:"",
FoodTypeIds:"", FoodTypeIds:0,
IsFree:-1, IsFree:-1,
IsSameDayBuy:-1, IsSameDayBuy:-1,
IsWorryFreeRefund:-1, IsWorryFreeRefund:-1,
...@@ -120,7 +116,6 @@ ...@@ -120,7 +116,6 @@
page_count:1, page_count:1,
loading: false, loading: false,
status: "loadmore", status: "loadmore",
// count:0,
loadText: { loadText: {
loadmore: "轻轻上拉,加载更多", loadmore: "轻轻上拉,加载更多",
loading: "努力加载中", loading: "努力加载中",
...@@ -138,6 +133,7 @@ ...@@ -138,6 +133,7 @@
value: 1, value: 1,
}, },
], ],
classOptions:[],
btnStyle:{ btnStyle:{
borderRadius: '16rpx', borderRadius: '16rpx',
color: '#111', color: '#111',
...@@ -155,11 +151,6 @@ ...@@ -155,11 +151,6 @@
} }
} }
}, },
components: {
// rangeSlider,
// canlendar,
// Cascade
},
created() { created() {
uni.setNavigationBarTitle({ uni.setNavigationBarTitle({
title: "门票", title: "门票",
...@@ -168,9 +159,9 @@ ...@@ -168,9 +159,9 @@
this.getList();// 获取景点门票类型 this.getList();// 获取景点门票类型
}, },
methods: { methods: {
openBuyNotice(){ searchList(){
console.log(1,this.$refs.popup) this.msg.pageIndex=1
this.$refs.popup.open() this.getList()
}, },
lower(e) { lower(e) {
if (this.msg.pageIndex < this.page_count) { if (this.msg.pageIndex < this.page_count) {
...@@ -191,9 +182,6 @@ ...@@ -191,9 +182,6 @@
this.showTimePopup=false this.showTimePopup=false
}, },
chosenDate(){ chosenDate(){
// uni.navigateTo({
// url:"/pages/hotel/components/time/index"
// })
this.showTimePopup=true this.showTimePopup=true
}, },
//筛选重置 //筛选重置
...@@ -233,7 +221,21 @@ ...@@ -233,7 +221,21 @@
} }
}, },
res => { res => {
this.typeList=res.data if(res.resultCode===1){
// this.typeList=res.data
this.classOptions=[{
label: "不限",
value: 0,
}]
res.data.map(i=>{
let obj={
label: i.Name,
value: i.ID,
}
this.classOptions.push(obj)
})
}
} }
); );
}, },
...@@ -244,15 +246,23 @@ ...@@ -244,15 +246,23 @@
data: this.msg data: this.msg
}, },
res => { res => {
this.page_count = res.data.pageCount; if(res.resultCode===1){
res.data.pageData.forEach(item=>{ this.page_count = res.data.pageCount;
item.ScenicSpotTag=item.ScenicSpotTag.split(',') res.data.pageData.forEach(item=>{
item.GeographicTag=item.GeographicTag.split(',') item.ScenicSpotTag=item.ScenicSpotTag.split(',')
}) item.GeographicTag=item.GeographicTag.split(',')
this.dataList=res.data.pageData; })
if (this.page_count == 1) { if(this.msg.pageIndex==1){
this.status = "nomore"; this.dataList=res.data.pageData;
}else if(this.msg.pageIndex>1){
this.dataList=[...this.dataList,...res.data.pageData];
}
if (this.page_count == 1) {
this.status = "nomore";
}
} }
} }
); );
}, },
...@@ -262,13 +272,16 @@ ...@@ -262,13 +272,16 @@
}else{ }else{
this.msg[field]=-1 this.msg[field]=-1
} }
console.log(this.msg)
} }
}, },
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
/deep/.u-flex{
justify-content: center;
}
.hotel-list { .hotel-list {
height: 100vh; height: 100vh;
} }
...@@ -370,7 +383,10 @@ ...@@ -370,7 +383,10 @@
width: 440rpx; width: 440rpx;
.ticket-name{ .ticket-name{
height: 70rpx; height: 70rpx;
line-height: 70rpx; line-height: 68rpx;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
// display: flex; // display: flex;
// align-items: center; // align-items: center;
// justify-content: center; // justify-content: 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