lrf402788946 преди 4 години
родител
ревизия
9f6c36bc39
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  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);