Browse Source

配资总览获取当前月份特殊处理

liyuan 1 week ago
parent
commit
e762e19527
1 changed files with 2 additions and 1 deletions
  1. 2 1
      src/views/overviewAllocation/index.vue

+ 2 - 1
src/views/overviewAllocation/index.vue

@@ -80,7 +80,8 @@ export default {
     },
     created() {
         let nowDate = new Date()
-        this.query.yearMonth = nowDate.getFullYear() + '-' + (nowDate.getMonth() + 1)
+        let month = nowDate.getMonth() + 1
+        this.query.yearMonth = nowDate.getFullYear() + '-' + (month < 10 ? '0' + month : month)
         this.getBaseData();
     },
     methods: {