lrf402788946 4 rokov pred
rodič
commit
9f6c36bc39
1 zmenil súbory, kde vykonal 1 pridanie a 1 odobranie
  1. 1 1
      app/service/lesson.js

+ 1 - 1
app/service/lesson.js

@@ -322,7 +322,7 @@ class LessonService extends CrudService {
       let lydata = await this.getLyTeacherMsg(classInfo);
       // 整理信息
       data = { ...data, ...defaults, termid, classid, planyearid, planid };
-      const dirIsBefore = moment().isBefore(classInfo.startdate); // isSameOrBefore
+      const dirIsBefore = moment(moment().format('YYYY-MM-DD')).isSameOrBefore(classInfo.startdate); // isSameOrBefore
       console.log(`${classInfo.headteacher}-${dirIsBefore}`);
       if (dirIsBefore) {
         noticeList.push(data);