|
@@ -106,7 +106,7 @@ Page({
|
|
|
message: '',
|
|
|
grouponLinkId: 0, //参与的团购
|
|
|
grouponRulesId: 0, //团购规则ID
|
|
|
- nurseId: 0, //安心包认证id
|
|
|
+ nurseId: 0, //安心包认证id
|
|
|
petinfo: null, //宠物保险内容
|
|
|
shareId: 0,
|
|
|
userInfo: {},
|
|
@@ -130,7 +130,7 @@ Page({
|
|
|
userCouponId: that.data.userCouponId,
|
|
|
grouponRulesId: that.data.grouponRulesId,
|
|
|
shareId: that.data.shareId,
|
|
|
-
|
|
|
+
|
|
|
}).then(function (res) {
|
|
|
if (res.errno === 0) {
|
|
|
that.setData({
|
|
@@ -151,7 +151,7 @@ Page({
|
|
|
couponId: res.data.couponId,
|
|
|
userCouponId: res.data.userCouponId,
|
|
|
grouponRulesId: res.data.grouponRulesId,
|
|
|
- isNeedAppoint: appType == "1" ? true : false, //0需要预约 服务类商品,1保险 2中介 3买约分离次卡res.data.checkedGoodsList[0].goods.type === 0 ||
|
|
|
+ isNeedAppoint: appType == "1" ? true : false, //0需要预约 服务类商品,1保险 2中介 3买约分离次卡res.data.checkedGoodsList[0].goods.type === 0 ||
|
|
|
isOneAppoint: res.data.checkedGoodsList[0].product.serviceTimes == 1 ? true : false, //1为单次,其余为多次
|
|
|
popupType: res.data.checkedGoodsList[0].product.serviceTimes == 1 ? 1 : 2,
|
|
|
bookStartDate: res.data.bookStartDate,
|
|
@@ -179,7 +179,7 @@ Page({
|
|
|
|
|
|
|
|
|
}
|
|
|
- if(res.data.addressId==null&&res.data.addressMsg!=null){
|
|
|
+ if(res.data.addressId==null&&res.data.addressMsg!=null){
|
|
|
wx.showToast({
|
|
|
title: res.data.addressMsg,
|
|
|
icon:'none'
|
|
@@ -191,7 +191,7 @@ Page({
|
|
|
wx.hideLoading();
|
|
|
});
|
|
|
},
|
|
|
- LimitCanAppointmentDate() { //特殊商品 如果需要限制可预约的时间范围 在次方法中实现
|
|
|
+ LimitCanAppointmentDate() { //特殊商品 如果需要限制可预约的时间范围 在次方法中实现
|
|
|
if (this.data.checkedGoodsList[0].goodsId == 1190332) {
|
|
|
let dates = [];
|
|
|
this.data.dateList.forEach(item => {
|
|
@@ -231,16 +231,16 @@ Page({
|
|
|
// console.info(" dateIndex:4")
|
|
|
// this.setData({
|
|
|
// dateIndex:4
|
|
|
- // })
|
|
|
+ // })
|
|
|
// }else{
|
|
|
// if(this.data.dateList[2].id==0) {
|
|
|
|
|
|
// console.info(" dateIndex:3")
|
|
|
// this.setData({
|
|
|
// dateIndex:3
|
|
|
- // })
|
|
|
+ // })
|
|
|
// }
|
|
|
- // }
|
|
|
+ // }
|
|
|
},
|
|
|
selectAddress() {
|
|
|
wx.navigateTo({
|
|
@@ -322,7 +322,7 @@ Page({
|
|
|
});
|
|
|
},
|
|
|
onReady: function () {
|
|
|
- // 页面渲染完成
|
|
|
+ // 页面渲染完成
|
|
|
|
|
|
},
|
|
|
onShow: function () {
|
|
@@ -401,7 +401,7 @@ Page({
|
|
|
// 页面关闭
|
|
|
//清空宠物保险的缓存数据
|
|
|
console.info('checkout onload')
|
|
|
- //wx.setStorageSync('petinfo'+this.data.cartId, null);
|
|
|
+ //wx.setStorageSync('petinfo'+this.data.cartId, null);
|
|
|
|
|
|
},
|
|
|
submitOrder: function () {
|
|
@@ -504,7 +504,7 @@ Page({
|
|
|
petinfo: this.data.petinfo,
|
|
|
shareId: this.data.shareId,
|
|
|
recCode: this.data.recCode ? this.data.recCode : this.data.rId, //服务者推荐id(如果填写推荐码 以填写为准)
|
|
|
- fraId: this.data.fraId, //加盟商id
|
|
|
+ fraId: this.data.fraId, //加盟商id
|
|
|
channelId: this.data.channelId, //渠道码
|
|
|
//预约参数信息
|
|
|
orderDate: orderData,
|
|
@@ -547,7 +547,7 @@ Page({
|
|
|
util.redirect('/pages/ucenter/order/order');
|
|
|
return;
|
|
|
}
|
|
|
- // 下单成功,重置couponId
|
|
|
+ // 下单成功,重置couponId
|
|
|
wx.setStorageSync('couponId', 0);
|
|
|
const orderId = res.data.orderId;
|
|
|
this.setData({
|
|
@@ -584,7 +584,7 @@ Page({
|
|
|
},
|
|
|
'fail': res => {
|
|
|
console.log("支付过程失败");
|
|
|
-
|
|
|
+
|
|
|
// wx.redirectTo({
|
|
|
// url: '/pages/checkout/payResult/payResult?status=0&orderId=' + orderId
|
|
|
// });
|
|
@@ -592,7 +592,7 @@ Page({
|
|
|
this.setData({
|
|
|
payFailShow: true,
|
|
|
remarkDisable: true
|
|
|
-
|
|
|
+
|
|
|
});
|
|
|
},
|
|
|
'complete': function (res) {
|
|
@@ -622,7 +622,7 @@ Page({
|
|
|
},
|
|
|
'fail': res => {
|
|
|
console.log("支付过程失败");
|
|
|
-
|
|
|
+
|
|
|
// wx.redirectTo({
|
|
|
// url: '/pages/checkout/payResult/payResult?status=0&orderId=' + orderId
|
|
|
// });
|
|
@@ -630,7 +630,7 @@ Page({
|
|
|
this.setData({
|
|
|
payFailShow: true,
|
|
|
remarkDisable: true
|
|
|
-
|
|
|
+
|
|
|
});
|
|
|
},
|
|
|
'complete': function (res) {
|
|
@@ -638,7 +638,7 @@ Page({
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
} else {
|
|
|
// 弹出支付失败
|
|
|
this.setData({
|
|
@@ -686,7 +686,7 @@ Page({
|
|
|
return monthDatas;
|
|
|
},
|
|
|
|
|
|
- //天数计算
|
|
|
+ //天数计算
|
|
|
surplusDay: function (year, month, day) {
|
|
|
var days = 31;
|
|
|
var dayDatas = [];
|
|
@@ -703,7 +703,7 @@ Page({
|
|
|
case 12:
|
|
|
days = 31;
|
|
|
break;
|
|
|
- //对于2月份需要判断是否为闰年
|
|
|
+ //对于2月份需要判断是否为闰年
|
|
|
case 2:
|
|
|
if ((year % 4 == 0 && year % 100 != 0) || (year % 400 == 0)) {
|
|
|
days = 29;
|
|
@@ -732,7 +732,7 @@ Page({
|
|
|
}
|
|
|
return dayDatas;
|
|
|
},
|
|
|
- //时间计算
|
|
|
+ //时间计算
|
|
|
surplusHour: function (year, month, day, hour) {
|
|
|
var date = new Date();
|
|
|
var year2 = date.getFullYear()
|
|
@@ -747,8 +747,8 @@ Page({
|
|
|
return hours;
|
|
|
},
|
|
|
|
|
|
- /**
|
|
|
- * 生命周期函数--监听页面加载
|
|
|
+ /**
|
|
|
+ * 生命周期函数--监听页面加载
|
|
|
*/
|
|
|
onLoad: function (options) {
|
|
|
this.setData({
|
|
@@ -851,7 +851,7 @@ Page({
|
|
|
})
|
|
|
},
|
|
|
|
|
|
- //某一列的值改变时触发
|
|
|
+ //某一列的值改变时触发
|
|
|
bindMultiPickerColumnChange: function (e) {
|
|
|
var date = new Date();
|
|
|
var year1 = date.getFullYear()
|
|
@@ -957,11 +957,11 @@ Page({
|
|
|
var hour = hourStr.substring(0, hourStr.length - 1);
|
|
|
data.startHour = hour;
|
|
|
console.log('起始时间' + hour + " day1:" + day1);
|
|
|
- /*var endhours2 = [];
|
|
|
- var end = ['09时', '11时', '12时', '13时', '14时', '15时', '16时', '17时', '18时', '19时', '20时', '20时'];
|
|
|
- for (var i = e.detail.value; i < end.length; i++) {
|
|
|
- endhours2.push(end[i]);
|
|
|
- }
|
|
|
+ /*var endhours2 = [];
|
|
|
+ var end = ['09时', '11时', '12时', '13时', '14时', '15时', '16时', '17时', '18时', '19时', '20时', '20时'];
|
|
|
+ for (var i = e.detail.value; i < end.length; i++) {
|
|
|
+ endhours2.push(end[i]);
|
|
|
+ }
|
|
|
data.multiArray[5] = endhours2; */
|
|
|
if (e.detail.value > data.multiIndex[5])
|
|
|
data.multiIndex[5] = e.detail.value;
|
|
@@ -978,7 +978,7 @@ Page({
|
|
|
}
|
|
|
this.setData(data)
|
|
|
},
|
|
|
- //value 改变时触发 change 事件
|
|
|
+ //value 改变时触发 change 事件
|
|
|
bindMultiPickerChange: function (e) {
|
|
|
console.info(e);
|
|
|
console.info(this.data.multiArray);
|
|
@@ -1058,7 +1058,7 @@ Page({
|
|
|
timeList:list
|
|
|
});
|
|
|
|
|
|
-
|
|
|
+
|
|
|
},
|
|
|
timeCheck(e) {
|
|
|
let index = e.currentTarget.dataset.index;
|
|
@@ -1516,12 +1516,11 @@ Page({
|
|
|
});
|
|
|
},
|
|
|
getDayTime() {
|
|
|
-
|
|
|
+
|
|
|
let params = {
|
|
|
- days:30,
|
|
|
+ days:30,
|
|
|
goodsId: this.data.checkedGoodsList[0].goodsId,
|
|
|
- serviceDuration:this.data.serviceDuration,
|
|
|
- productId:this.data.checkedGoodsList[0].product.id,
|
|
|
+ serviceDuration:this.data.serviceDuration
|
|
|
}
|
|
|
wx.showLoading({
|
|
|
title: '加载中',
|
|
@@ -1544,7 +1543,7 @@ Page({
|
|
|
this.setData({
|
|
|
timeList:list
|
|
|
});
|
|
|
-
|
|
|
+
|
|
|
|
|
|
} else {
|
|
|
|
|
@@ -1579,4 +1578,4 @@ Page({
|
|
|
|
|
|
|
|
|
|
|
|
-});
|
|
|
+});
|