Browse Source

Merge remote-tracking branch 'origin/master'

wangchangsheng 2 years ago
parent
commit
ea068bf778
1 changed files with 1 additions and 4 deletions
  1. 1 4
      exam-06173-vue/src/views/admin/stat/total/archives.vue

+ 1 - 4
exam-06173-vue/src/views/admin/stat/total/archives.vue

@@ -368,7 +368,6 @@ export default {
     resetDate(radio) {
       const date = new Date();
       const days = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
-
       if (radio === "sy") {
         const month = date.getMonth() - 1 < 0 ? 11 : date.getMonth() - 1;
         const day = days[month];
@@ -380,9 +379,7 @@ export default {
             `-${day}`,
         ];
       } else if (radio === "by") {
-        const month = date.getMonth() - 1 < 0 ? 11 : date.getMonth() - 1;
-        const day = days[month + 1];
-
+        const day = days[date.getMonth()];
         this.date = [
           new Date().formatDate("yyyy-MM") +
             "-01",