Commit c8e15322 authored by 罗超's avatar 罗超

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

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