|
...
|
...
|
@@ -16,8 +16,6 @@ Page({ |
|
|
|
types: '',
|
|
|
|
},
|
|
|
|
type: '',
|
|
|
|
time: 300,
|
|
|
|
countdown: '',
|
|
|
|
name: "",
|
|
|
|
date: "",
|
|
|
|
phone: "",
|
|
...
|
...
|
@@ -48,6 +46,7 @@ Page({ |
|
|
|
* 生命周期函数--监听页面加载
|
|
|
|
*/
|
|
|
|
onLoad(options) {
|
|
|
|
console.log('options---',options);
|
|
|
|
this.setData({
|
|
|
|
opt: {
|
|
|
|
detail: options.detail ? JSON.parse(options.detail) : '',
|
|
...
|
...
|
@@ -73,7 +72,6 @@ Page({ |
|
|
|
calendarData: obj.calendarData,
|
|
|
|
})
|
|
|
|
}
|
|
|
|
this.countdown()
|
|
|
|
this.modal = this.selectComponent("#payModal"); //通过给组件所起的id调用组件
|
|
|
|
this.getSellerTemplateConfFun(options.sid)
|
|
|
|
},
|
|
...
|
...
|
@@ -154,7 +152,7 @@ Page({ |
|
|
|
}
|
|
|
|
})
|
|
|
|
},
|
|
|
|
// 支付成功/失败回调 types 1邀请函 2提前点餐 3商家端app分享
|
|
|
|
// 支付成功/失败回调 types 1邀请函 2提前点餐 3商家端app分享 4支付页充值 5我的页面余额充值
|
|
|
|
callbackFun() {
|
|
|
|
let that = this;
|
|
|
|
let url = '/pack-invitation/pages/detail_owner_invitation1?id=' + that.data.opt.detail.oid;
|
|
...
|
...
|
@@ -187,6 +185,9 @@ Page({ |
|
|
|
if (that.data.opt.types == '3') {
|
|
|
|
url = '/pages/reserve/index_new';
|
|
|
|
}
|
|
|
|
if (that.data.opt.types == '4' || this.data.opt.types == '5') {
|
|
|
|
return wx.navigateBack(2)
|
|
|
|
}
|
|
|
|
setTimeout(function () {
|
|
|
|
wx.reLaunch({
|
|
|
|
url
|
|
...
|
...
|
@@ -228,9 +229,6 @@ Page({ |
|
|
|
},
|
|
|
|
// 点击确认支付
|
|
|
|
formSubmit() {
|
|
|
|
if (this.data.time == 0) {
|
|
|
|
return util.toast('当前订单已过期,请重新进入优惠券购买页面下单', 'none');
|
|
|
|
}
|
|
|
|
if (this.data.type == '2') {
|
|
|
|
let data = this.data
|
|
|
|
if (!data.name) {
|
|
...
|
...
|
@@ -343,26 +341,10 @@ Page({ |
|
|
|
onShow() {
|
|
|
|
|
|
|
|
},
|
|
|
|
// 倒计时
|
|
|
|
countdown() {
|
|
|
|
var minute = Math.floor(this.data.time * 1 / 60);
|
|
|
|
var second = this.data.time % 60;
|
|
|
|
second < 10 ? second = '0' + second : '';
|
|
|
|
this.setData({
|
|
|
|
countdown: minute + ':' + second,
|
|
|
|
time: this.data.time - 1
|
|
|
|
})
|
|
|
|
if (this.data.time == 0) {
|
|
|
|
this.setData({
|
|
|
|
countdown: '0:00'
|
|
|
|
})
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
setTimeout(this.countdown, 1000);
|
|
|
|
},
|
|
|
|
// 返回
|
|
|
|
navEvent() {
|
|
|
|
// 1 邀请函 2 提前点餐 3商家端分享
|
|
|
|
console.log('types---------',this.data.opt.types);
|
|
|
|
// 1 邀请函 2 提前点餐 3商家端分享 4支付页充值 5我的页面余额充值
|
|
|
|
if (this.data.opt.types == '1') {
|
|
|
|
let arr = [9, 10, 11, 12, 13, 14, 15, 16, 17];
|
|
|
|
let StyleType = this.data.StyleType
|
|
...
|
...
|
@@ -401,6 +383,9 @@ Page({ |
|
|
|
url: '/pages/reserve/index_new',
|
|
|
|
})
|
|
|
|
}
|
|
|
|
if (this.data.opt.types == '4' || this.data.opt.types == '5') {
|
|
|
|
wx.navigateBack(2)
|
|
|
|
}
|
|
|
|
},
|
|
|
|
/**
|
|
|
|
* 生命周期函数--监听页面隐藏
|
...
|
...
|
|