lizhuang преди 5 години
родител
ревизия
aecaa9845d
променени са 1 файла, в които са добавени 2 реда и са изтрити 2 реда
  1. 2 2
      src/views/strategy/index.vue

+ 2 - 2
src/views/strategy/index.vue

@@ -79,8 +79,8 @@ export default {
         },
         formatTime() {
             let year = new Date().getFullYear()
-            let month = new Date().getMonth() + 1 > 10 ? new Date().getMonth() + 1 : '0' + (new Date().getMonth() + 1)
-            let date = new Date().getDate() > 10 ? new Date().getDate() : '0' + new Date().getDate()
+            let month = new Date().getMonth() + 1 >= 10 ? new Date().getMonth() + 1 : '0' + (new Date().getMonth() + 1)
+            let date = new Date().getDate() >= 10 ? new Date().getDate() : '0' + new Date().getDate()
             return (this.today = year + '' + month + '' + date)
         },
         getPer5Time() {