Commit 14766622 authored by 罗超's avatar 罗超

1

parent ceff2b75
......@@ -228,7 +228,8 @@
fail: function(err) {
console.log('fail:', err);
uni.showToast({
title: "支付失败"
title: "支付失败",
icon:'none'
})
}
});
......
......@@ -133,7 +133,6 @@
methods:{
headItemTap(index,month){
this.current = index
console.log(month)
this.$emit('changeMonth',momth)
},
getDefaultData(d){ //设置初始值
......@@ -147,6 +146,7 @@
}else{
obj = false
}
return obj;
},
isToday(date){
......@@ -210,7 +210,22 @@
selectDate(data){ //选择日期
//多选模式请在这改造
/* this.$set(this.dayActive,"date",date) */
if(data.price){
console.log(data)
let resDay=Date.parse(data.date);
let now=new Date();
now.setHours(0);//设置小时
now.setMinutes(0);//设置分钟
now.setSeconds(0);//设置秒
now.setMilliseconds(0);//设置毫妙
let today= now.getTime();
if(resDay<today){
uni.showToast({
title: "不能选择今天以前的日期",
icon: "none",
});
return
}
if(data.price||data.price===0){
this.dayActive = {
date:data.date,
price:data.price
......
......@@ -2,6 +2,7 @@
<view class="subscribeTicket">
<view class="title">
选择日期和人数
<u-icon name="cross" size="28" class="close-icon" @click="close"></u-icon>
</view>
<view>
<z-calendar ref="calendar" :datePrice="datePrice" :curryear='curryear' :currmonth='currmonth'
......@@ -86,10 +87,10 @@
},
watch: {
dateStr(val, oldVal) {
this.defaultSelect = val;
let newMonth = val.split('-')[1]
let oldMonth = oldVal.split('-')[1]
if(newMonth!=oldMonth&&oldMonth!=undefined){
console.log(newMonth!=oldMonth)
this.getGoodsDateList(val)
}
......@@ -108,7 +109,7 @@
}
this.curryear= year
this.currmonth= month
this.defaultSelect = this.dateStr;
},
methods: {
valChange(e) {
......@@ -138,6 +139,9 @@
datePrice.push(obj)
})
this.datePrice = datePrice
let list = this.datePrice.filter(item=>item.date==this.dateStr);
this.price=list[0].price
console.log(144,list,this.datePrice,this.dateStr)
}
);
},
......@@ -189,7 +193,9 @@
goback() {
uni.navigateBack()
},
close(){
this.$emit("close")
}
}
}
......@@ -208,6 +214,12 @@
font-weight: 500;
color: #111111;
margin-bottom: 10rpx;
position: relative;
.close-icon{
position: absolute;
right: 30rpx;
top: 0;
}
}
.chooseTicketAndNum{
height: 335rpx;
......
......@@ -185,8 +185,8 @@
</view>
<!-- 填写订单弹出层 -->
<view>
<u-popup v-model="showSubscribeTicketPop" mode="bottom" border-radius="40" :closeable="true">
<subscribeTicket :dateStr="Date" :TicketID="TicketID" :TitekCounponId="ID" :TicketName="TicketName"></subscribeTicket>
<u-popup v-model="showSubscribeTicketPop" mode="bottom" border-radius="40" :closeable="true" >
<subscribeTicket :dateStr="Date" :TicketID="TicketID" :TitekCounponId="ID" :TicketName="TicketName" @close="showSubscribeTicketPop=false"></subscribeTicket>
</u-popup>
</view>
</view>
......@@ -268,7 +268,16 @@
this.mainColor = this.$uiConfig.mainColor;
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.calendar.date = today
},
......
......@@ -91,8 +91,6 @@
this.Final_Price=this.ticketdData.PeopleNumber*this.ticketdData.Unit_Price
},
created() {
uni.setNavigationBarTitle({
title: "订单填写",
......@@ -153,7 +151,6 @@
console.log('订阅失败',err)
},
complete(_res) {
console.log(_res)
that.queren(res.data.OrderId)
}
});
......@@ -162,7 +159,6 @@
},
err=>{
console.log(err)
uni.hideLoading();
}
);
......@@ -189,7 +185,6 @@
},
Pay(){
let that=this;
uni.requestPayment({
provider: 'wxpay',
timeStamp: this.orderInfo.timeStamp,
......@@ -204,7 +199,7 @@
})
setTimeout(()=>{
uni.redirectTo({
url: '/pages/jiuzhai/allorderList'
url: '/pages/jiuzhai/paysuccess?PreferPrice='+that.Final_Price
});
}, 100 )
......@@ -212,8 +207,14 @@
fail: function(err) {
console.log('fail:', err);
uni.showToast({
title: "支付失败"
title: "支付失败",
icon:'none'
})
setTimeout(()=>{
uni.redirectTo({
url: '/pages/jiuzhai/allorderList'
});
}, 100 )
}
});
},
......
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