Commit 09727e2d authored by 华国豪's avatar 华国豪 🙄
parents e40a9b46 75a8781e
......@@ -59,7 +59,7 @@ export default {
<style>
@import './assets/global/font.css';
@import '//at.alicdn.com/t/font_863923_pxnr9ox66cp.css';
@import '//at.alicdn.com/t/font_863923_mmwwh61s03g.css';
@import './assets/global/global.css';
body,html{
padding: 0px;
......
This diff is collapsed.
......@@ -147,7 +147,7 @@
</li>
<p style="margin-top:15px;font-size:12px;text-align:center;position:absolute;bottom:40px;right:60px">
<span @click="GetDes" :class="desshow?'desstatus':''" style="color:#666666;cursor:pointer">查看行程详情 <i class="iconfont icon-more"></i></span>
<span v-if="configId!=null" @click="GetDes" :class="desshow?'desstatus':''" style="color:#666666;cursor:pointer">查看行程详情 <i class="iconfont icon-more"></i></span>
</p>
</ul>
<!-- 查看详情 -->
......
<template>
<div class="AdmissionTicket OnedayList">
<div class="basefix">
<ul class="oneList">
<div v-for="(item,index) in dataList" :key="index+5000" style="margin-bottom:20px">
<li>
<div>
<img style="width:143px;height:106px;" :src="item.coverImgs[0]" alt="">
</div>
<div class="secondDiv">
<p style="font-size:16px;color:#2A5532">{{item.name}}</p>
<p style="margin-top:14px;" class="font12">
<i class="iconfont icon-bb-chufadi"></i>
<span>景点地址:{{item.address}}</span>
</p>
<p style="margin-top:14px;" class="font12">
<i class="iconfont icon-shijian-copy"></i>
<span>开放时间:{{item.openingHours}}</span>
</p>
</div>
<div class="threeDiv">
<p><span style="color:#FDAC11;font-size:22px">{{item.b2bPrice | NoDesnum}}</span></p>
</div>
</li>
<ul class="ticketDiv">
<li v-for="ticket in item.ticketList" :key="ticket.id">
<span class="firsrSpan">
<span class="ticketdes">{{item.name}} {{ticket.ticketDesc}}门票></span>
<span class="peopleType">{{ticket.ticketName}}</span></span>
<span class="SecondSpan">
<span class="price">{{ticket.b2bPrice | NoDesnum}}</span>
<!-- <span style="color:#999999;font-size:12px;margin-left:7px;text-decoration: line-through">原价:¥300</span> -->
</span>
<span class="ThreeSpan">
<span @click="GoUrl(item)" class="yd">预定</span>
</span>
</li>
</ul>
</div>
<div v-if="dataList.length==0" style="padding:15px 0;text-align:center">
<div class="empty-data"><i class="iconfont icon-kong"></i>
很抱歉,你想要的信息我们真的找不到了
</div>
</div>
</ul>
<ul class="hottour_ul">
<p class="pfR font14" style="margin-bottom:8px">热门景点</p>
<div class="hotsecn">
<span>日本-急乐园 </span>
<span>日本-急乐园 </span>
<span>日本-豪斯登堡主题乐园</span>
<span>韩国-首尔乱打秀</span>
<span>日本-豪斯登堡主题乐园</span>
</div>
</ul>
</div>
</div>
</template>
<script>
export default {
props:["ticketList"],
data () {
return {
dataList:[],
}
},
mounted() {
},
methods: {
GoUrl(item){
this.$router.push({ path:'/TicketDetails',
query:{idDes:encodeURIComponent(item.idDes)} })
},
},
watch:{
ticketList:{
handler:function(val,oldvalue){
this.dataList=val;
}
}
}
}
</script>
<style scoped>
/* .AdmissionTicket .basefix{
clear: both;
content: '.';
display: block;
height: 0;
overflow: hidden;
} */
.AdmissionTicket .ticketDiv li .ticketdes{
display: inline-block;
max-width: 500px;
white-space: nowrap;
overflow: hidden;
text-overflow:ellipsis;
}
.AdmissionTicket .ticketDiv li .ThreeSpan .yd{
display: inline-block;
text-align: center;
line-height: 24px;
width:60px;
height:24px;
background:rgba(238,68,84,1);
color:#fff;
cursor: pointer;
}
.AdmissionTicket .ticketDiv li .SecondSpan .price{
color: #FDAC11;
font-size: 14px;
font-family: "PingFangR";
}
.AdmissionTicket .ticketDiv li .firsrSpan .peopleType{
padding:1px 4px;
background:rgba(76,185,96,1);
display: inline-block;
text-align: center;
line-height: 20px;
color: #fff;
margin-left: 7px;
position: relative;
top: -15px;
}
.AdmissionTicket .ticketDiv li .ThreeSpan{
width:60px;
float: right;
}
.AdmissionTicket .ticketDiv li .SecondSpan{
width:180px;
position: relative;
top: -15px;
}
.AdmissionTicket .ticketDiv li .firsrSpan{
width:660px;
padding-left:20px;
color:#2A5532;
}
.AdmissionTicket .ticketDiv li>span{
display: inline-block;
box-sizing: border-box;
}
.AdmissionTicket .ticketDiv li{
background: #EDF8EF;
font-size: 12px;
padding-right: 19px;
height: 40px;
line-height: 40px;
border-bottom: 1px solid #D8E7DA;
}
.AdmissionTicket .hotsecn span{
display: inline-block;
padding:5px 14px;
color: #EE4454;
font-size: 12px;
margin-right: 10px;
margin-bottom:14px;
background:rgba(238,68,84,0.2);
}
.OnedayList .hottour_ul{
width: 228px;
float: right;
}
.OnedayList>ul{
float: left;
}
.OnedayList .pfR{
font-family: "PingFangR";
}
.OnedayList .threeDiv{
float: right!important;
text-align: right;
font-size:12px
}
.OnedayList .threeDiv .ckxq{
display: inline-block;
width:80px;
height:28px;
background:rgba(242,242,242,1);
text-align: center;
line-height: 28px;
}
.OnedayList .taglist span{
background:rgba(76,185,96,0.2);
color:#4E9F5D;
font-size: 12px;
margin-right:10px;
padding:4px 10px;
}
.OnedayList .oneList .font12{
font-size: 12px;
}
.OnedayList .oneList li .secondDiv{
margin-left:13px;
width: 535px;
}
.OnedayList .oneList li .secondDiv .iconfont{
color:#B5B5B5;
font-size: 12px;
}
.OnedayList .oneList div>li{
color:#333333;
height:127px;
border:1px solid rgba(229,229,229,1);
padding: 11px 28px 11px 11px;
box-sizing: border-box;
}
.OnedayList .oneList{
width:950px;
float: left;
}
.OnedayList .oneList li>div{
float: left;
}
/* .OnedayList .basefix:after {
clear: both;
content: '.';
display: block;
height: 0;
overflow: hidden;
} */
</style>
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
<template>
<div class="OnedayList">
<ul class="oneList">
<li @click="goOneDayDetail(item)" v-for="(item,index) in dataList" :key="index+200">
<div>
<img style="width:199px;height:148px;" :src="item.imgCover[0].url" alt="">
</div>
<div class="secondDiv">
<p style="font-size:16px;color:#2A5532">{{item.title}}</p>
<p class="taglist" style="margin-top:18px;">
<!-- <span>明日可订</span>
<span>明日可订</span> -->
</p>
<p style="margin-top:14px;" class="font12">
<i class="iconfont icon-bb-chufadi"></i>
<span>出发地:{{item.startCityName}}</span>
</p>
<p style="margin-top:14px;" class="font12 textHidden1">
<i class="iconfont icon-shijian-copy"></i>
<span>团期:
<span v-for="(start,index) in item.startDates" :key="index">{{start | MD}} </span>
</span>
</p>
</div>
<div class="threeDiv">
<p><span style="color:#FDAC11;font-size:22px">{{item.b2BPrice | NoDesnum}}</span></p>
<p style="margin-top:80px"><span class="ckxq" @click="GetDes(item)">查看详情</span></p>
</div>
</li>
<div v-if="dataList.length==0" style="padding:15px 0;text-align:center">
<div class="empty-data"><i class="iconfont icon-kong"></i>
很抱歉,你想要的信息我们真的找不到了
</div>
</div>
</ul>
<ul class="hottour_ul">
<p class="pfR font14" style="margin-bottom:8px">历史浏览</p>
<li @click="goOneDayDetail(item)" 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>
<p class="font12" style="color:#FDAC11;text-align:right;padding-top:4px;padding-right:6px"><span class="pfR font14">{{item.b2BPrice}}</span></p>
</div>
</li>
<img style="width:228px;height:100px;margin-top:25px" src="../../assets/img/localtour/guangg1.png" alt="">
</ul>
</div>
</template>
<script>
export default {
props:["onelist"],
data () {
return {
dataList:[],
Historylist:[],
}
},
mounted() {
let arr=[];
if(localStorage.HistoryBrowse && localStorage.HistoryBrowse!=undefined){
arr=JSON.parse(localStorage.HistoryBrowse);
}
this.Historylist=arr;
},
methods: {
goOneDayDetail(item){
let path = 'OneDayDetailTwo';
path=`${path}/${encodeURIComponent(item.idDes)}/${item.tcid}`;
this.$router.push({ path })
},
GetDes(item){
if(this.Historylist.length>4 || this.Historylist.length==4){
this.Historylist.pop();
}
this.Historylist.forEach(his=>{
if(his.id==item.id){
this.Historylist.splice(his,1);
}
})
this.Historylist.unshift(item);
localStorage.HistoryBrowse=JSON.stringify(this.Historylist);
},
},
watch:{
onelist:{
handler:function(val,oldvalue){
this.dataList=val;
this.dataList.forEach(item=>{
if(item.startDates){
item.startDates= item.startDates.split(",")
}
})
}
}
}
}
</script>
<style scoped>
.OnedayList .textHidden{
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
}
.OnedayList .hotcontent{
padding-left: 79px;
box-sizing: border-box;
padding-top:12px;
}
.OnedayList{
overflow: auto;
}
.OnedayList .hottour_ul li img{
width:60px;
height:60px;
position: absolute;
top: 8px;
left: 10px;
}
.OnedayList .hottour_ul li{
position: relative;
margin-bottom:14px;
cursor: pointer;
}
.OnedayList .hottour_ul{
width: 228px;
float: right;
}
.OnedayList>ul{
float: left;
}
.OnedayList .pfR{
font-family: "PingFangR";
}
.OnedayList .threeDiv{
float: right!important;
text-align: right;
font-size:12px
}
.OnedayList .threeDiv .ckxq{
display: inline-block;
width:80px;
height:28px;
background:rgba(242,242,242,1);
text-align: center;
line-height: 28px;
cursor: pointer;
}
.OnedayList .taglist span{
background:rgba(76,185,96,0.2);
color:#4E9F5D;
font-size: 12px;
margin-right:10px;
padding:4px 10px;
}
.OnedayList .oneList .font12{
font-size: 12px;
}
.OnedayList .oneList li .secondDiv{
margin-left:13px;
width: 535px;
}
.OnedayList .oneList li .secondDiv .iconfont{
color:#B5B5B5;
font-size: 12px;
}
.OnedayList .oneList li{
color:#333333;
height:170px;
border:1px solid rgba(229,229,229,1);
padding: 11px 28px 11px 11px;
box-sizing: border-box;
}
.OnedayList .oneList{
width:950px;
}
.OnedayList .oneList li>div{
float: left;
}
/* .OnedayList .basefix:after {
clear: both;
content: '.';
display: block;
height: 0;
overflow: hidden;
} */
</style>
This diff is collapsed.
......@@ -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.priceId=price.priceId;
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)
......
......@@ -112,12 +112,31 @@ Vue.filter('priceFormat', function (value) {
x1 = x1.replace(rgx, '$1' + ',' + '$2');
}
return x1 + x2;
})
// 不要小数点
Vue.filter('NoDesnum', function (value) {
if (value == null) {
return 0.00;
}
let nStr = value.toFixed(0)
nStr += '';
let x = nStr.split('.');
let x1 = x[0];
let x2 = x.length > 1 ? '.' + x[1] : '';
var rgx = /(\d+)(\d{3})/;
while (rgx.test(x1)) {
x1 = x1.replace(rgx, '$1' + ',' + '$2');
}
return x1 + x2;
})
// 时间格式YYYY-MM-DD
Vue.filter("YMD", function (date) {
return moment(date).format("YYYY-MM-DD");
})
Vue.filter("MD", function (date) {
return moment(date).format("MM月DD日");
})
Vue.prototype.random_string = function (len) {
len = len || 32;
var chars = 'ABCDEFGHJKMNPQRSTWXYZabcdefhijkmnprstwxyz2345678';
......
......@@ -416,6 +416,25 @@ export default new Router({
title: "当地游列表"
}
},
{
path: "/TicketDetails",
name: "TicketDetails",
component: resolve =>
require(["@/components/LocalTour/TicketDetails.vue"], resolve),
meta: {
title: "门票详情"
}
},
{
path: "/Appointment",
name: "Appointment",
component: resolve =>
require(["@/components/LocalTour/Appointment.vue"], resolve),
meta: {
title: "预约"
}
},
]
},
......
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