Commit 705bdff0 by zhangzhen

细节优化

parent 103a5540
......@@ -349,6 +349,8 @@
let orderStartTime = 0;
let continueStatus = false;
console.log(moment(startDateStemp).format("YYYY-MM-DD HH:mm:ss"),"ding单结束的时间")
if(res.data.code ==200 && res.data.data && res.data.data.length){
res.data.data.forEach(item=>{
if(continueStatus) return;
......@@ -359,7 +361,7 @@
})
}else{
let d = moment(item.startHoldTime).valueOf()
if(d - startDateStemp >= 3600*1000){
if(d - orderStartTime >= 3600*1000){
uni.navigateTo({
url:`/pages/order/order?roomId=${this.orderInfo.roomId}&orderNo=${this.orderInfo.orderNo}`
})
......@@ -367,35 +369,19 @@
}else{
uni.showToast({
icon:"none",
title:"此订单已无可续单时段"
title:"此订单已无可续单时段2"
})
continueStatus = true;
return
}
}
}else{
if(item.status == 0){
let d = moment(item.timeHour).valueOf()
if(d > startDateStemp){
orderStartTime = d;
console.log(moment(orderStartTime).format("YYYY-MM-DD HH:mm:ss"),"续单可开始的时间")
}
}else{
if(item.status == 1) {
let d = moment(item.endHoldTime).valueOf();
let s = moment(item.startHoldTime).valueOf()
if(startDateStemp>d){
orderStartTime = d;
if( d >= startDateStemp ){
orderStartTime = d;
console.log(moment(orderStartTime).format("YYYY-MM-DD HH:mm:ss"),"续单可开始的时间2")
}
if(startDateStemp > s && startDateStemp< d){
uni.showToast({
icon:"none",
title:"此订单已无可续单时段"
});
continueStatus = true;
return
}
}
}
......
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