guhongwei 3 lat temu
rodzic
commit
c47fb9c0a7
1 zmienionych plików z 3 dodań i 2 usunięć
  1. 3 2
      app/service/patent/patentearly.js

+ 3 - 2
app/service/patent/patentearly.js

@@ -83,15 +83,16 @@ class PatentearlyService extends CrudService {
       // 取专利日期
       const month = moment(create_date).format('MM-DD');
       // // 取得当前年份
-      const nowYear = moment('2020').format('YYYY');
+      const nowYear = moment().format('YYYY');
       // // 当前年份+一年
-      const afterYear = moment('2020').add(1, 'year').format('YYYY');
+      const afterYear = moment(nowYear).add(1, 'year').format('YYYY');
       // // 开始时间(先组合日期,减去三个月)
       const nowDate = afterYear + '-' + month;
       const start = moment(nowDate).subtract(3, 'months').format('YYYY-MM-DD');
       // 结束时间
       const end = afterYear + '-' + month;
       const r = moment().isBetween(start, end, null, '[]');
+      console.log(r);
       if (r) {
         total++;
         const { inventor, name } = i;