Commit 87b24924 authored by 罗超's avatar 罗超

1

parent 51a4e774
......@@ -78,6 +78,7 @@
},
methods: {
choiceDate(weeks) {
this.$emit('change', weeks)
}
}
......
......@@ -150,6 +150,7 @@
selected(newVal) {
this.cale.setSelectInfo(this.nowDate.fullDate, newVal)
this.weeks = this.cale.weeks
console.log(this.weeks)
}
},
created() {
......@@ -165,6 +166,7 @@
// this.cale.setDate(this.date)
this.init(this.date)
// this.setDay
console.log(169,this.cale)
},
methods: {
// 取消穿透
......@@ -216,7 +218,6 @@
* 确认按钮
*/
confirm() {
this.setEmit('confirm')
this.close()
},
......
......@@ -90,12 +90,12 @@
</view>
<view class="ticket-navs">
<view class="ticket-nav" :class="{'check-ticket-nav':checkTicketNavIndex===1}"
@click="changeCheckTicketNavIndex(1)">
今日票
@click="changeCheckTicketNavIndex(1)" v-if="haveticket[0]">
{{haveticket[0].date}}
</view>
<view class="ticket-nav" :class="{'check-ticket-nav':checkTicketNavIndex===2}"
@click="changeCheckTicketNavIndex(2)">
明日票
@click="changeCheckTicketNavIndex(2)" v-if="haveticket[1]">
{{haveticket[1].date}}
</view>
<view class="ticket-nav" :class="{'check-ticket-nav':checkTicketNavIndex===3}"
@click="changeCheckTicketNavIndex(3)">
......@@ -286,6 +286,7 @@
Up: 0,
nearbyType: 0,
scenicArr: [], //推荐景点
haveticket:[],//最近3天的票
}
},
onShareTimeline() {
......@@ -378,13 +379,14 @@
this.Date = today
this.calendar.date = today
this.getRecomHotel();
this.getGoodsprice();
},
methods: {
//选择其他日期门票
confirm(e) {
this.Date = e.fulldate
this.calendar[0].date = e.fulldate
// this.calendar[0].date = e.fulldate
this.otherDate = e.fulldate
this.getDetailByDate();
this.$forceUpdate();
......@@ -483,34 +485,36 @@
changeCheckTicketNavIndex(i) {
this.checkTicketNavIndex = i
if (i === 1) {
let d = new Date();
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
// let d = new Date();
// 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=this.haveticket[0].date
this.getDetailByDate()
this.$forceUpdate()
} else if (i === 2) {
let d = new Date();
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
// let d = new Date();
// 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=this.haveticket[1].date
this.getDetailByDate()
this.$forceUpdate()
} else if (i === 3) {
......@@ -525,6 +529,53 @@
changeNearbyType(t) {
this.nearbyType = t
},
getGoodsprice() {
this.request2({
url: '/api/AppletDining/GetMonthTicketList',
data: {
TicketID: 0,
BuyDate: this.Date,
TicketCounponID:this.ID
}
},
res => {
if(res.resultCode===1){
// calendar: [{
// date: "",
// info: ''
// }],
this.calendar=[]
this.haveticket=[]
let now=new Date();
now.setHours(0);//设置小时
now.setMinutes(0);//设置分钟
now.setSeconds(0);//设置秒
now.setMilliseconds(0);//设置毫妙
let today= now.getTime();
res.data.map(i=>{
let resDay=Date.parse(i.Year+'-'+i.Month+'-'+i.Day);
if(i.IsHavePrice===1&&resDay>=today){
let obj={
date:i.Year+'-'+i.Month+'-'+i.Day,
// info:"有票",
}
this.calendar.push(obj)
if(this.haveticket.length<3){
this.haveticket.push({
...obj,...i
})
}
}
})
console.log(571,this.haveticket)
}
}
);
},
//获取推荐景点
getRecomHotel() {
this.request2({
......
......@@ -9,10 +9,10 @@
<view class="officialNotice">
<view class="title" id="notice">
官方公告信息
</view>richtext
</view>
<view class="desc">
<rich-text :nodes="details.TicketNotice" class="policyDetail-richText"></rich-text>
<rich-text :nodes="details.TicketNotice" class="policyDetail-richText" v-if="details.TicketNotice">></rich-text>
<text v-if="!details.TicketNotice">暂无公告</text>
</view>
<view class="title">
......@@ -153,7 +153,7 @@
.policyDetail {
margin-top: 100rpx;
.officialNotice {
padding: 0 45rpx 90rpx;
padding: 0 45rpx 0rpx;
}
......@@ -198,7 +198,7 @@
}
}
}
.policyDetail-richText{
.policyDetail-richText p{
font-size: 26rpx !important;
font-weight: 500 !important;
}
......
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