Commit bc8d444c authored by huangyuanyuan's avatar huangyuanyuan

门票景点

parent 0fb97810
......@@ -374,7 +374,8 @@
color: #333333;
text-align: center;
position: relative;
top: -10px;
top: 0px;
}
.Localtourhome .VeContent{
margin-top: 24px;
......@@ -944,7 +945,7 @@
width: 280px;
border-radius: 0px;
}
.Appointment .form .el-input-number__decrease,.el-input-number__increase{
.Appointment .form .el-input-number__decrease,.Appointment .form .el-input-number__increase{
border-radius: 0px;
background: #4CB960;
color:#fff;
......@@ -1051,12 +1052,10 @@
position: relative;
}
.calendarDiv{
position: absolute;
width:406px;
height:284px;
background:rgba(255,255,255,1);
box-shadow:0px 1px 3px 2px rgba(153, 153, 153, 0.35);
z-index: 100;
border: 1px solid #E1E1E1;
}
.Appointment .formline .calendarSpan{
width: 280px;
......@@ -1064,6 +1063,21 @@
line-height: 32px;
border: 1px solid #dcdfe6;
display: inline-block;
padding-left:10px;
}
.calendarPopover{
padding:0;
}
.calendarDiv .month_circle{
display: inline-block;
width:28px;
height:28px;
background:rgba(227,227,227,1);
color: #fff;
text-align: center;
line-height: 28px;
border-radius: 2px;
cursor: pointer;
}
......
This diff is collapsed.
......@@ -73,7 +73,7 @@
</div>
<div class="basefix dayContent" style="margin-top:17px">
<div class="dayConDiv1">
<div v-if="index<2" v-for="(item,index) in abroadList" :key="index+300">
<div @click="goOneDayDetail(item)" v-if="index<2" v-for="(item,index) in abroadList" :key="index+300">
<img v-if="index==0" :key="img.url" v-for="(img,index) in item.imgCover" :src="img.url" alt="">
<span class="daydes">{{item.lineName}}</span>
<span class="price"><span class="pfR font18">{{item.b2BPrice}}</span></span>
......@@ -81,7 +81,7 @@
</div>
<div class="dayConDiv2">
<ul>
<li v-if="index>1" v-for="(item,index) in abroadList" :key="index+200">
<li @click="goOneDayDetail(item)" v-if="index>1" v-for="(item,index) in abroadList" :key="index+200">
<div class="imgDiv">
<img v-if="index==0" :key="img.url" v-for="(img,index) in item.imgCover" :src="img.url" alt="">
<span class="country">{{item.lineShortName}}</span>
......@@ -103,7 +103,7 @@
<span style="font-size:14px;position: relative;top:-3px;left:5px">/ / / / / / / / / </span>
</div>
<ul class="hottour_ul">
<li v-for="(item,index) in abroadhotList" :key="index+100">
<li @click="goOneDayDetail(item)" v-for="(item,index) in abroadhotList" :key="index+100">
<img v-if="index==0" :key="img.url" v-for="(img,index) in item.imgCover" :src="img.url" alt="">
<div class="hotcontent">
<span class="textHidden font12">{{item.title}}</span>
......@@ -150,7 +150,7 @@
</div> -->
<div class="bottom">
<span>{{item.name}}</span>
<span class="font12">¥<a class="font14">{{item.b2bPrice}}</a>起/人</span>
<span class="font12 textHidden1">¥<a class="font14">{{item.b2bPrice | priceFormat}}</a>起/人</span>
</div>
</li>
</ul>
......@@ -324,6 +324,11 @@ export default {
this.GetCuntryTicket();
},
methods: {
goOneDayDetail(item){
let path = 'OneDayDetailTwo';
path=`${path}/${encodeURIComponent(item.idDes)}/${item.tcid}`;
this.$router.push({ path })
},
GoTicket(item){
this.$router.push({ path:'/TicketDetails',
query:{idDes:encodeURIComponent(item.idDes)} })
......
<template>
<div class="OnedayList">
<ul class="oneList">
<li v-for="item in dataList">
<li v-for="(item,index) in dataList" :key="index+200">
<div>
<img style="width:199px;height:148px;" :src="item.imgCover[0].url" alt="">
</div>
......@@ -35,7 +35,7 @@
</ul>
<ul class="hottour_ul">
<p class="pfR font14" style="margin-bottom:8px">历史浏览</p>
<li v-for="item in Historylist">
<li v-for="(item,index) in Historylist" :key="index+2000">
<img :src="item.imgCover[0].url" alt="">
<div class="hotcontent">
<span class="textHidden font12">{{item.title}}</span>
......
......@@ -28,7 +28,7 @@
<p class="pfR" style="color:#2A5532;font-size:20px;">{{dataDes.name}}</p>
<!-- <p style="margin-top:20px" class="ticketSpan">票类包括:<span>大小同价</span><span>大小价</span></p> -->
<div class="price">
{{dataDes.minPrice}}~¥{{dataDes.maxPrice}}
{{dataDes.minPrice | priceFormat}}~¥{{dataDes.maxPrice | priceFormat}}
</div>
<p>
<span style="color:#666666">景点地址:</span>
......@@ -76,9 +76,9 @@
<!-- <span class="colorG">可订今日</span>
<span class="colorG">可订今日</span> -->
</el-col>
<el-col class="pfR" :span="3" style="color:#FDAC11"><span class="font22">{{item.b2bPrice}}</span></el-col>
<el-col class="pfR" :span="3" style="color:#FDAC11"><span class="font22">{{item.b2bPrice | priceFormat}}</span></el-col>
<el-col :span="2">
<span class="ydBtn">预定</span>
<span @click="YdUrl(dataDes,item)" class="ydBtn">预定</span>
</el-col>
</el-row>
</li>
......@@ -213,6 +213,12 @@ export default {
},
methods: {
YdUrl(dataDes,item){
sessionStorage.dataDes=JSON.stringify(dataDes);
sessionStorage.Ticketinfo=JSON.stringify(item);
this.$router.push({ path:'/Appointment',
query:{idDes:encodeURIComponent(item.idDes)} })
},
LiHover(item,index){
this.imgHover=index;
this.imgHoverSrc=item;
......
......@@ -114,7 +114,7 @@
<i class="iconfont icon-arrowright1"></i>
</div>
<div class="font_12" style="margin-top:20px;color:#FF680B;width:6%;position:relative">
<el-popover
<el-popover popper-class="calendarPopover"
placement="bottom"
trigger="click">
<div ref="otherdate" class="otherdate">
......@@ -561,6 +561,7 @@ export default {
"/api/dmc/airticket/getB2BAirticketForMonthMinPrice",
this.other_date,
res => {
let list = res.data.data;
this.tomonth = moment(list[0].timeStr).format("YYYY-MM");
this.creatCalendar(list);
......@@ -697,6 +698,7 @@ export default {
};
monthArray.push(dateDict);
}
console.log("monthArray",monthArray)
//数组去重,获取有几个月
var hash = {};
monthArray = monthArray.reduce(function(item, next) {
......@@ -892,7 +894,7 @@ li {
border-radius: 50%;
cursor: pointer;
}
.cilcle {
.TicketList .cilcle {
width: 30px;
height: 30px;
line-height: 30px;
......@@ -905,8 +907,11 @@ li {
.TicketList .el-popover {
border: none;
}
.TicketList .calendarPopover{
padding:0;
}
.otherdate {
width: 500px;
width: 406px;
position: absolute;
right: 0;
z-index: 5;
......@@ -916,7 +921,7 @@ li {
box-sizing: border-box;
color: #333;
}
.active_data {
.TicketList .active_data {
margin: 0;
border-top: 6px solid #ee4454;
box-shadow: 0px 2px 6px 3px rgba(149, 149, 149, 0.23);
......
<style>
.LocalTourCalendar .calendar{
width: 100%;
overflow: hidden;
table-layout: fixed;
}
.LocalTourCalendar .calendar th{
height: 20px;
padding: 10px 0;
line-height: 20px;
color: #999999;
text-align: center;
font-size: 14px;
}
.LocalTourCalendar .dayList{
position: relative;
float: left;
width: 58px;
height: 44px;
cursor: pointer;
border: 1px solid transparent;
background-color: #F5F5F5;
font-size: 12px;
border-bottom:1px solid #E1E1E1;
border-right:1px solid #E1E1E1;
box-sizing: border-box;
}
.LocalTourCalendar .dayList:nth-child(7n){
border-right: none;
}
.LocalTourCalendar .dayList.noPrice{
cursor: default;
color: #ccc;
background-color: #FFFFFF;
}
.LocalTourCalendar .dayList.selectDay{
border: 1px solid #ff4646;
background-color: #f9f7f6;
}
.LocalTourCalendar .dayList.yesPrice{
font-weight: bold;
font-family: 'PingFangR';
}
.LocalTourCalendar .dayList p{
float: initial;
width: 100%;
text-align: left;
padding-left:5px;
margin: 2px 0;
box-sizing: border-box;
}
.LocalTourCalendar .dayList p.price{
float: initial;
width: 100%;
text-align: right;
padding:0;
margin: 2px 0;
color: #FF5A00;
font-size: 12px;
padding-right: 5px;
box-sizing: border-box;
}
.LocalTourCalendar .monthDayList{
overflow: auto;
border-top:1px solid #E1E1E1;
}
.LocalTourCalendar .dayList.yesPrice:hover{
background: #FF680B;
color:#fff!important;
}
.LocalTourCalendar .dayList.yesPrice:hover .price{
color:#fff!important;
}
</style>
<template>
<div class="LocalTourCalendar" id='LocalTourCalendar'>
<table class="calendar" cellspacing=0 cellpadding=0>
<thead>
<th style="color:#666666;font-size:12px;" v-for="(i,index) in week" :key="index">{{i}}</th>
</thead>
</table>
<div class="monthDayList">
<div v-for="(item,index) in daysData" class="dayList" :key="index" @click="item.price?selectDate(item):''" :class="{selectDay:isSelect == index,noPrice:!item.price,yesPrice:item.price}">
<p>{{item.day}}</p>
<!-- -->
<p class="price" v-if="item.price!='0.00' && item.price">{{item.price | priceFormat}}</p>
</div>
</div>
</div>
</template>
<script>
import moment from 'moment'
import bus from '../../plugins/event-bus'
export default {
props:{
dateData: Array,
day:String,
},
data(){
return{
week:['周日','周一','周二','周三','周四','周五','周六'],
// priceData:this.dateData[0],
priceData:[],
currentDay: this.day,
DaysInMonth:[],
daysData:[],
isSelect:-1,
mydate:-1,
}
},mounted(){
},created(){
// this.getYearMonthDay();
},methods:{
selectDate(item){
if(item.price=="0.00"){
return;
}else{
this.$emit('SelectChild',item);
}
},
getYearMonthDay(list){
this.priceData=list[0];
let day=this.day;
let currentYear = day.substring(0,4); //当前年份
let currentMonth =day.substring(5,7); //当前月份
// console.log("currentMonth",currentMonth)
let date = new Date();
let strDate = date.getDate();
let strMonth = (date.getMonth()+1).toString();
// alert(typeof strMonth)
//判断是否是闰年
if (this.isleapYears(currentYear)) {
this.$data.DaysInMonth = [31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
}else{
this.$data.DaysInMonth = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
}
let monthDay = this.$data.DaysInMonth[Number(currentMonth)-1];//当前月的天数
let daysData = [];
//给数据源赋值
for (let i = 0 ;i < Number(monthDay) ;i++) {
var priceDict = {'day':String(i+1),'price':0,'dis':false,date_str:''};
daysData.push(priceDict);
}
this.daysData = daysData;
var currentDay = `${currentYear}-${currentMonth}-01`;
var dateObject = new Date(currentDay);
var firstDay = dateObject.getDay();//得到每个月1号是周几
// for (let i in this.priceData) {
let today=moment().format("YYYY-MM-DD");
for (let i=0;i<this.priceData.length;i++) {
let price = this.priceData[i];
let dateStr=moment(price.dateStr).format("YYYY-MM-DD");
var dayIndex = price.dateStr.substring(price.dateStr.length-2,price.dateStr.length);
var dayDict = daysData[Number(dayIndex)-1];
if (moment(dateStr).isBefore(today)){
dayDict.price='';
}else{
dayDict.price = price.price;
}
// dayDict.price = price.price;
dayDict.date_str=price.dateStr;
dayDict.couponsId=price.couponsId;
dayDict.id=price.id;
dayDict.ticketId=price.ticketId;
if(dayIndex<strDate&&strMonth==currentMonth){
dayDict.price='';
}
}
if (firstDay > 0) {
var firstDayData = [];
for (var i=0; i< firstDay;i++) {
var dict = {'day':' ',price:'','dis':true};
firstDayData.push(dict);
}
this.daysData = firstDayData.concat(daysData);
}else{
this.daysData = daysData;
}
},
isleapYears(year){
if (((year % 4)==0) && ((year % 100)!=0) || ((year % 400)==0)) {
return true;
} else{
return false;
}
},
}
}
</script>
......@@ -794,6 +794,7 @@ export default {
let data = (r.data.data);
this.sonData = data;
this.dayList = data.dayList;
// console.log("this.dayList",this.dayList);
this.feature = data.feature;
this.isDirect = data.isDirect;
if (data.videoStr) {
......@@ -826,6 +827,7 @@ export default {
this.clickDate = data.currentPriceInfo && data.currentPriceInfo.startDate ? data.currentPriceInfo.startDate : '';
this.FlightList = data.currentPriceInfo && data.currentPriceInfo.priceFlight ? data.currentPriceInfo.priceFlight : '';
this.dataList = data;
console.log("dataList",this.dataList)
this.toDayObj = this.priceList && this.priceList.length>0?this.priceList[0]:null;
this.imgCover = JSON.parse(this.dataList.imgCover);
this.showType = this.feature.featureType;
......
......@@ -17,7 +17,7 @@
.newcalendar-box .dayList{
position: relative;
float: left;
width: 13.88%;
width: 13.7%;
height: 57px;
cursor: pointer;
border: 1px solid transparent;
......@@ -112,6 +112,7 @@ export default {
getYearMonthDay(list){
this.priceData=list[0];
let day=this.day;
console.log("day",day);
let currentYear = day.substring(0,4); //当前年份
let currentMonth =day.substring(5,7); //当前月份
// console.log("currentMonth",currentMonth)
......
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