Merge pull request '预约课程-时间限制修改' (#214) from lyc-dev into main

This commit is contained in:
lyc 2024-09-18 10:53:27 +08:00
commit 04263cd519
1 changed files with 12 additions and 5 deletions

View File

@ -172,16 +172,23 @@ const disabledHours = ()=>{
}
// -
const disabledMinute = (hour,role) => {
if(form.time == null) return
if(getCurrentTime('YYYY-MM-DD') == form.day){
const arrs = []
if(role == 'start'){
let nowHour = new Date().getHours().toString().padStart(2, '0');
if(nowHour < hour){
return []
}
else{
for (let i = 0; i < 60; i++) {
if (new Date().getMinutes() <= i) continue;
arrs.push(i)
}
return arrs;
}
else{
}
if(role == 'end'){
if(form.time[0]) return []
}
}