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

1

parent 51a4e774
...@@ -78,6 +78,7 @@ ...@@ -78,6 +78,7 @@
}, },
methods: { methods: {
choiceDate(weeks) { choiceDate(weeks) {
this.$emit('change', weeks) this.$emit('change', weeks)
} }
} }
......
...@@ -150,6 +150,7 @@ ...@@ -150,6 +150,7 @@
selected(newVal) { selected(newVal) {
this.cale.setSelectInfo(this.nowDate.fullDate, newVal) this.cale.setSelectInfo(this.nowDate.fullDate, newVal)
this.weeks = this.cale.weeks this.weeks = this.cale.weeks
console.log(this.weeks)
} }
}, },
created() { created() {
...@@ -165,6 +166,7 @@ ...@@ -165,6 +166,7 @@
// this.cale.setDate(this.date) // this.cale.setDate(this.date)
this.init(this.date) this.init(this.date)
// this.setDay // this.setDay
console.log(169,this.cale)
}, },
methods: { methods: {
// 取消穿透 // 取消穿透
...@@ -216,7 +218,6 @@ ...@@ -216,7 +218,6 @@
* 确认按钮 * 确认按钮
*/ */
confirm() { confirm() {
this.setEmit('confirm') this.setEmit('confirm')
this.close() this.close()
}, },
......
...@@ -90,12 +90,12 @@ ...@@ -90,12 +90,12 @@
</view> </view>
<view class="ticket-navs"> <view class="ticket-navs">
<view class="ticket-nav" :class="{'check-ticket-nav':checkTicketNavIndex===1}" <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>
<view class="ticket-nav" :class="{'check-ticket-nav':checkTicketNavIndex===2}" <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>
<view class="ticket-nav" :class="{'check-ticket-nav':checkTicketNavIndex===3}" <view class="ticket-nav" :class="{'check-ticket-nav':checkTicketNavIndex===3}"
@click="changeCheckTicketNavIndex(3)"> @click="changeCheckTicketNavIndex(3)">
...@@ -286,6 +286,7 @@ ...@@ -286,6 +286,7 @@
Up: 0, Up: 0,
nearbyType: 0, nearbyType: 0,
scenicArr: [], //推荐景点 scenicArr: [], //推荐景点
haveticket:[],//最近3天的票
} }
}, },
onShareTimeline() { onShareTimeline() {
...@@ -378,13 +379,14 @@ ...@@ -378,13 +379,14 @@
this.Date = today this.Date = today
this.calendar.date = today this.calendar.date = today
this.getRecomHotel(); this.getRecomHotel();
this.getGoodsprice();
}, },
methods: { methods: {
//选择其他日期门票 //选择其他日期门票
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.otherDate = e.fulldate this.otherDate = e.fulldate
this.getDetailByDate(); this.getDetailByDate();
this.$forceUpdate(); this.$forceUpdate();
...@@ -483,34 +485,36 @@ ...@@ -483,34 +485,36 @@
changeCheckTicketNavIndex(i) { changeCheckTicketNavIndex(i) {
this.checkTicketNavIndex = i this.checkTicketNavIndex = i
if (i === 1) { if (i === 1) {
let d = new Date(); // let d = new Date();
let year = d.getFullYear(); // let year = d.getFullYear();
let month = d.getMonth() + 1 // let month = d.getMonth() + 1
if (month < 10) { // if (month < 10) {
month = '0' + month // month = '0' + month
} // }
let day = d.getDate() // let day = d.getDate()
if (day < 10) { // if (day < 10) {
day = '0' + day // day = '0' + day
} // }
let today = year + '-' + month + '-' + day // let today = year + '-' + month + '-' + day
this.Date = today // this.Date = today
this.Date=this.haveticket[0].date
this.getDetailByDate() this.getDetailByDate()
this.$forceUpdate() this.$forceUpdate()
} else if (i === 2) { } else if (i === 2) {
let d = new Date(); // let d = new Date();
let nextDate = new Date(d.getTime() + 24 * 60 * 60 * 1000); // let nextDate = new Date(d.getTime() + 24 * 60 * 60 * 1000);
let year = nextDate.getFullYear(); // let year = nextDate.getFullYear();
let month = nextDate.getMonth() + 1 // let month = nextDate.getMonth() + 1
if (month < 10) { // if (month < 10) {
month = '0' + month // month = '0' + month
} // }
let day = nextDate.getDate() // let day = nextDate.getDate()
if (day < 10) { // if (day < 10) {
day = '0' + day // day = '0' + day
} // }
let tomorrow = year + '-' + month + '-' + day // let tomorrow = year + '-' + month + '-' + day
this.Date = tomorrow // this.Date = tomorrow
this.Date=this.haveticket[1].date
this.getDetailByDate() this.getDetailByDate()
this.$forceUpdate() this.$forceUpdate()
} else if (i === 3) { } else if (i === 3) {
...@@ -525,6 +529,53 @@ ...@@ -525,6 +529,53 @@
changeNearbyType(t) { changeNearbyType(t) {
this.nearbyType = 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() { getRecomHotel() {
this.request2({ this.request2({
......
...@@ -9,10 +9,10 @@ ...@@ -9,10 +9,10 @@
<view class="officialNotice"> <view class="officialNotice">
<view class="title" id="notice"> <view class="title" id="notice">
官方公告信息 官方公告信息
</view>richtext </view>
<view class="desc"> <view class="desc">
<rich-text :nodes="details.TicketNotice" class="policyDetail-richText" v-if="details.TicketNotice">></rich-text>
<rich-text :nodes="details.TicketNotice" class="policyDetail-richText"></rich-text> <text v-if="!details.TicketNotice">暂无公告</text>
</view> </view>
<view class="title"> <view class="title">
...@@ -153,7 +153,7 @@ ...@@ -153,7 +153,7 @@
.policyDetail { .policyDetail {
margin-top: 100rpx; margin-top: 100rpx;
.officialNotice { .officialNotice {
padding: 0 45rpx 90rpx; padding: 0 45rpx 0rpx;
} }
...@@ -198,7 +198,7 @@ ...@@ -198,7 +198,7 @@
} }
} }
} }
.policyDetail-richText{ .policyDetail-richText p{
font-size: 26rpx !important; font-size: 26rpx !important;
font-weight: 500 !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