预约课程-时间限制

This commit is contained in:
lyc 2024-08-30 14:15:15 +08:00
parent b249df2dff
commit 1a6abfaa50
1 changed files with 11 additions and 5 deletions

View File

@ -177,15 +177,20 @@ const disabledHours = ()=>{
} }
} }
// - // -
const disabledMinute = () => { const disabledMinute = (hour,role) => {
if(getCurrentTime('YYYY-MM-DD') == form.day){ if(getCurrentTime('YYYY-MM-DD') == form.day){
const arrs = [] const arrs = []
if(role == 'start'){
for (let i = 0; i < 60; i++) { for (let i = 0; i < 60; i++) {
if (new Date().getMinutes() <= i && form.time[0]) continue; if (new Date().getMinutes() <= i) continue;
arrs.push(i) arrs.push(i)
} }
return arrs; return arrs;
} }
else{
if(form.time[0]) return []
}
}
} }
@ -204,6 +209,7 @@ const openDialog = (data) => {
// //
form.day = getCurrentTime('YYYY-MM-DD') form.day = getCurrentTime('YYYY-MM-DD')
form.time = [getCurrentTime('HH:mm'), getAfterMinutes(45)] form.time = [getCurrentTime('HH:mm'), getAfterMinutes(45)]
console.log(getCurrentTime('HH:mm'), getAfterMinutes(45))
} }
centerDialogVisible.value = true centerDialogVisible.value = true
} }