Commit d4a02383 by zhangzhen

删除console.log

parent 0a2b8eb2
...@@ -584,7 +584,6 @@ ...@@ -584,7 +584,6 @@
} }
}, },
onLoad(option) { onLoad(option) {
console.log(option,"option")
uni.showLoading({ uni.showLoading({
title: "加载中" title: "加载中"
}) })
...@@ -661,7 +660,6 @@ ...@@ -661,7 +660,6 @@
let startDate = moment(moment().format(startStr)).format("YYYY-MM-DD HH:00:00"); let startDate = moment(moment().format(startStr)).format("YYYY-MM-DD HH:00:00");
let endStr = `${this.dateList[this.dateIndex].readDate} ${Number(valData.packaEndPeriod)>= 10 ?valData.packaEndPeriod: '0'+valData.packaEndPeriod}:00:00` let endStr = `${this.dateList[this.dateIndex].readDate} ${Number(valData.packaEndPeriod)>= 10 ?valData.packaEndPeriod: '0'+valData.packaEndPeriod}:00:00`
let endDate = moment(moment().format(endStr)).format("YYYY-MM-DD HH:00:00"); let endDate = moment(moment().format(endStr)).format("YYYY-MM-DD HH:00:00");
console.log(startStr,endStr,6666)
// 如果是续单,则订单的结束时间必须在套餐的开始时间和结束时间内,否则无法续对应的套餐 // 如果是续单,则订单的结束时间必须在套餐的开始时间和结束时间内,否则无法续对应的套餐
// if(this.orderType == 2){ // if(this.orderType == 2){
// if(!(moment(this.orderInfo.endDate).valueOf() >= moment(startDate).valueOf() && moment(this.orderInfo.endDate).valueOf() <= moment(endDate).valueOf())){ // if(!(moment(this.orderInfo.endDate).valueOf() >= moment(startDate).valueOf() && moment(this.orderInfo.endDate).valueOf() <= moment(endDate).valueOf())){
...@@ -675,24 +673,15 @@ ...@@ -675,24 +673,15 @@
if(moment(endDate).valueOf() < moment(pointDateForm).valueOf()){ if(moment(endDate).valueOf() < moment(pointDateForm).valueOf()){
if(this.orderType == 2){ if(this.orderType == 2){
console.log(startDate,endDate,this.orderInfo.endDate,"22222")
let orderEndDate = moment(this.orderInfo.endDate).valueOf() let orderEndDate = moment(this.orderInfo.endDate).valueOf()
console.log(moment(startDate).add(1,'d').format("YYYY-MM-DD HH:mm:ss"),orderEndDate,"224444")
let b1 = orderEndDate >= moment(startDate).valueOf() && orderEndDate <= moment(endDate).valueOf(); let b1 = orderEndDate >= moment(startDate).valueOf() && orderEndDate <= moment(endDate).valueOf();
let b2 = orderEndDate >= moment(moment(startDate).add(1,'d')).valueOf() && orderEndDate <= moment(moment(endDate).add(1,"d")).valueOf(); let b2 = orderEndDate >= moment(moment(startDate).add(1,'d')).valueOf() && orderEndDate <= moment(moment(endDate).add(1,"d")).valueOf();
console.log(b1,b2,"b1b2")
if(!(b1||b2)){ if(!(b1||b2)){
useStatus = false; useStatus = false;
console.log(useStatus,"useStatus1")
return; return;
} }
} }
//通宵套餐
// console.log("通宵套餐")
dateTimeObj = this.onComputeStartDateAndEndDate(startDate,endDate); dateTimeObj = this.onComputeStartDateAndEndDate(startDate,endDate);
// 实际时长小于原时长的60%则选择明天的时间 // 实际时长小于原时长的60%则选择明天的时间
...@@ -701,11 +690,10 @@ ...@@ -701,11 +690,10 @@
// 实际时间 // 实际时间
let actualTime = moment(dateTimeObj.tempEndDate).valueOf() - moment(dateTimeObj.tempStartDate).valueOf() let actualTime = moment(dateTimeObj.tempEndDate).valueOf() - moment(dateTimeObj.tempStartDate).valueOf()
if( actualTime < originTime - 4*60*60*1000 || this.onCheckPackUse(startDate,endDate,4)){ if( actualTime < originTime - 4*60*60*1000 || this.onCheckPackUse(startDate,endDate,4)){
// console.log("实际时长小于原时长的60%则选择明天的时间"); // 实际时长小于原时长的60%则选择明天的时间
// 加一天时间重新计算 // 加一天时间重新计算
if(this.dateIndex != 0){ if(this.dateIndex != 0){
useStatus = false; useStatus = false;
console.log(useStatus,"useStatus2")
return return
} }
...@@ -717,7 +705,6 @@ ...@@ -717,7 +705,6 @@
actualTime = moment(dateTimeObj.tempEndDate).valueOf() - moment(dateTimeObj.tempStartDate).valueOf() actualTime = moment(dateTimeObj.tempEndDate).valueOf() - moment(dateTimeObj.tempStartDate).valueOf()
if( actualTime < originTime - 4*60*60*1000 || this.onCheckPackUse(startDate,endDate,4)){ if( actualTime < originTime - 4*60*60*1000 || this.onCheckPackUse(startDate,endDate,4)){
useStatus = false; useStatus = false;
console.log(useStatus,"useStatus3")
return return
} }
} }
...@@ -729,9 +716,8 @@ ...@@ -729,9 +716,8 @@
} }
} }
// 如果此套餐的结束时间在12点后,则为闲时套餐,仅查看今日日否有合适的套餐 // 如果此套餐的结束时间在12点后,则为闲时套餐,仅查看今日日否有合适的套餐
// console.log("闲时套餐") // 闲时套餐
dateTimeObj = this.onComputeStartDateAndEndDate(startDate,endDate); dateTimeObj = this.onComputeStartDateAndEndDate(startDate,endDate);
console.log(dateTimeObj,"dateTimeObj")
// 原时间 // 原时间
let originTime = moment(endDate).valueOf() - moment(startDate).valueOf() let originTime = moment(endDate).valueOf() - moment(startDate).valueOf()
// 实际时间 // 实际时间
...@@ -761,17 +747,15 @@ ...@@ -761,17 +747,15 @@
let pointDateForm = moment(this.dateList[this.dateIndex].readDate).format("YYYY-MM-DD 11:00:00"); let pointDateForm = moment(this.dateList[this.dateIndex].readDate).format("YYYY-MM-DD 11:00:00");
let dateTimeObj = {}; let dateTimeObj = {};
if(moment(endDate).valueOf() < moment(pointDateForm).valueOf()){ if(moment(endDate).valueOf() < moment(pointDateForm).valueOf()){
// console.log("通宵套餐") // 通宵套餐
dateTimeObj = this.onComputeStartDateAndEndDate(startDate,endDate); dateTimeObj = this.onComputeStartDateAndEndDate(startDate,endDate);
console.log(dateTimeObj,"通宵套餐")
// 原时间 // 原时间
let originTime = moment(endDate).valueOf() - moment(startDate).valueOf() let originTime = moment(endDate).valueOf() - moment(startDate).valueOf()
// 实际时间 // 实际时间
let actualTime = moment(dateTimeObj.tempEndDate).valueOf() - moment(dateTimeObj.tempStartDate).valueOf() let actualTime = moment(dateTimeObj.tempEndDate).valueOf() - moment(dateTimeObj.tempStartDate).valueOf()
// 原时长是9个小时,减去4个小时, 低于5个小时,则时长不足 // 原时长是9个小时,减去4个小时, 低于5个小时,则时长不足
if( actualTime< originTime - 4*60*60*1000 || this.onCheckPackUse(startDate,endDate,4)){ if( actualTime< originTime - 4*60*60*1000 || this.onCheckPackUse(startDate,endDate,4)){
// console.log("实际时长小于原时长的60%则选择明天的时间"); // 实际时长小于原时长的60%则选择明天的时间
// 加一天时间重新计算 // 加一天时间重新计算
if(this.dateIndex != 0){ if(this.dateIndex != 0){
...@@ -785,7 +769,6 @@ ...@@ -785,7 +769,6 @@
startDate = moment(startDate).add(1,"d").format("YYYY-MM-DD HH:00:00"); startDate = moment(startDate).add(1,"d").format("YYYY-MM-DD HH:00:00");
endDate = moment(endDate).add(1,"d").format("YYYY-MM-DD HH:00:00"); endDate = moment(endDate).add(1,"d").format("YYYY-MM-DD HH:00:00");
dateTimeObj = this.onComputeStartDateAndEndDate(startDate,endDate); dateTimeObj = this.onComputeStartDateAndEndDate(startDate,endDate);
console.log(dateTimeObj,"通宵套餐2")
// 实际时间 // 实际时间
actualTime = moment(dateTimeObj.tempEndDate).valueOf() - moment(dateTimeObj.tempStartDate).valueOf() actualTime = moment(dateTimeObj.tempEndDate).valueOf() - moment(dateTimeObj.tempStartDate).valueOf()
...@@ -846,7 +829,6 @@ ...@@ -846,7 +829,6 @@
} else { } else {
// 如果此套餐的结束时间在12点后,则为闲时套餐,仅查看今日日否有合适的套餐 // 如果此套餐的结束时间在12点后,则为闲时套餐,仅查看今日日否有合适的套餐
// console.log("闲时套餐")
dateTimeObj = this.onComputeStartDateAndEndDate(startDate,endDate); dateTimeObj = this.onComputeStartDateAndEndDate(startDate,endDate);
// 原时间 // 原时间
...@@ -931,7 +913,6 @@ ...@@ -931,7 +913,6 @@
}, },
// 通过指定时长在当前时间段内查询合适的时间段 // 通过指定时长在当前时间段内查询合适的时间段
onComputeByDuration(duration,durationType=1){ onComputeByDuration(duration,durationType=1){
//重新设置开始时间和结束时间 //重新设置开始时间和结束时间
let m = Number(duration)*60; let m = Number(duration)*60;
if (durationType === 2) { if (durationType === 2) {
...@@ -1080,7 +1061,6 @@ ...@@ -1080,7 +1061,6 @@
getStoreActivity({ getStoreActivity({
storeId: this.id storeId: this.id
}).then(res=>{ }).then(res=>{
console.log(res)
if(res.data.code ==200 && res.data.data){ if(res.data.code ==200 && res.data.data){
let obj = res.data.data || {} let obj = res.data.data || {}
...@@ -1119,7 +1099,6 @@ ...@@ -1119,7 +1099,6 @@
if (this.roomInfo.packList && this.roomInfo.packList.length) { if (this.roomInfo.packList && this.roomInfo.packList.length) {
this.packageMode = []; this.packageMode = [];
this.packList = this.roomInfo.packList; this.packList = this.roomInfo.packList;
// console.log(this.packageMode,"通宵和闲时套餐")
// this.modeIndex = 0; // this.modeIndex = 0;
} }
if (this.roomInfo.roomLabelList && this.roomInfo.roomLabelList.length) { if (this.roomInfo.roomLabelList && this.roomInfo.roomLabelList.length) {
...@@ -1416,7 +1395,6 @@ ...@@ -1416,7 +1395,6 @@
// } // }
let nowDate = moment().valueOf(); let nowDate = moment().valueOf();
let setDate = moment(this.formatAllData.startDateTime).valueOf(); let setDate = moment(this.formatAllData.startDateTime).valueOf();
console.log(nowDate,setDate,"时间对比")
// 如果当前时间大于开始时间,则不允许下单 // 如果当前时间大于开始时间,则不允许下单
if ( this.orderType == 1 && nowDate > setDate ) { if ( this.orderType == 1 && nowDate > setDate ) {
uni.showToast({ uni.showToast({
...@@ -1436,7 +1414,6 @@ ...@@ -1436,7 +1414,6 @@
this.orderDateDes = moment(this.formatAllData.startDateTime).format("YYYY年MM月DD日") this.orderDateDes = moment(this.formatAllData.startDateTime).format("YYYY年MM月DD日")
this.orderWeekDes = moment(this.formatAllData.startDateTime).days(); this.orderWeekDes = moment(this.formatAllData.startDateTime).days();
console.log(this.orderWeekDes,9999)
this.$refs.confirmPop.open(); this.$refs.confirmPop.open();
}, },
...@@ -1627,35 +1604,30 @@ ...@@ -1627,35 +1604,30 @@
if(this.onCheckHourUse(item.startHoldTime,item.endHoldTime)){ if(this.onCheckHourUse(item.startHoldTime,item.endHoldTime)){
useStatus = true; useStatus = true;
nextStatus = true; nextStatus = true;
console.log("节点1")
}else{ }else{
if(this.orderType == 1){ if(this.orderType == 1){
if( startStemp >= moment(item.startHoldTime).valueOf() && startStemp < moment(item.endHoldTime).valueOf()){ if( startStemp >= moment(item.startHoldTime).valueOf() && startStemp < moment(item.endHoldTime).valueOf()){
useStatus = true; useStatus = true;
nextStatus = true; nextStatus = true;
console.log("节点2")
}else if( endStemp > moment(item.startHoldTime).valueOf() && endStemp <= moment(item.endHoldTime).valueOf()){ }else if( endStemp > moment(item.startHoldTime).valueOf() && endStemp <= moment(item.endHoldTime).valueOf()){
useStatus = true; useStatus = true;
nextStatus = true; nextStatus = true;
console.log("节点3")
}else if(startStemp <= moment(item.endHoldTime).valueOf() && endStemp >= moment(item.startHoldTime).valueOf()){ }else if(startStemp <= moment(item.endHoldTime).valueOf() && endStemp >= moment(item.startHoldTime).valueOf()){
useStatus = true; useStatus = true;
nextStatus = true; nextStatus = true;
console.log("节点4")
} }
} else if(this.orderType == 2){ } else if(this.orderType == 2){
if( startStemp > moment(item.startHoldTime).valueOf() && startStemp < moment(item.endHoldTime).valueOf()){ if( startStemp > moment(item.startHoldTime).valueOf() && startStemp < moment(item.endHoldTime).valueOf()){
useStatus = true; useStatus = true;
nextStatus = true; nextStatus = true;
console.log("节点2")
} else if(startStemp < moment(item.endHoldTime).valueOf() && endStemp >= moment(item.startHoldTime).valueOf()){ } else if(startStemp < moment(item.endHoldTime).valueOf() && endStemp >= moment(item.startHoldTime).valueOf()){
useStatus = true; useStatus = true;
nextStatus = true; nextStatus = true;
console.log("节点4")
} else if( endStemp >= moment(item.startHoldTime).valueOf() && endStemp <= moment(item.endHoldTime).valueOf()){ } else if( endStemp >= moment(item.startHoldTime).valueOf() && endStemp <= moment(item.endHoldTime).valueOf()){
useStatus = true; useStatus = true;
nextStatus = true; nextStatus = true;
console.log("节点3")
} }
} }
...@@ -1679,7 +1651,6 @@ ...@@ -1679,7 +1651,6 @@
//endTime(HH:mm): 结束时间,显示使用 //endTime(HH:mm): 结束时间,显示使用
//duration(Number): 时长,仅分钟 //duration(Number): 时长,仅分钟
onTransiteForDate(params) { onTransiteForDate(params) {
console.log(params, "所有参数")
// 计算出时长,使用分钟计算 // 计算出时长,使用分钟计算
if(!params.duration){ if(!params.duration){
return { return {
...@@ -1702,7 +1673,6 @@ ...@@ -1702,7 +1673,6 @@
startStamp = moment(params.startDateTime).valueOf(); startStamp = moment(params.startDateTime).valueOf();
endStamp = startStamp + m*60000; endStamp = startStamp + m*60000;
dateObj.useStatus = this.onUseByStartAndDuration(params.startDateTime,m,2) dateObj.useStatus = this.onUseByStartAndDuration(params.startDateTime,m,2)
console.log(dateObj.useStatus,999)
} else if(params.duration){ } else if(params.duration){
dateObj = this.onComputeByDuration(m,2); dateObj = this.onComputeByDuration(m,2);
...@@ -1710,7 +1680,6 @@ ...@@ -1710,7 +1680,6 @@
endStamp = moment(dateObj.endDateTime).valueOf(); endStamp = moment(dateObj.endDateTime).valueOf();
} }
// 获取开始时间的当前小时 // 获取开始时间的当前小时
let list = params.list.map((item, index) => { let list = params.list.map((item, index) => {
let startH = moment(moment(item.timeHour).format("YYYY-MM-DD HH:00:00")).valueOf(); let startH = moment(moment(item.timeHour).format("YYYY-MM-DD HH:00:00")).valueOf();
......
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