Browse Source

代码调整

zhangshuling 3 years ago
parent
commit
c9e9445b9a
1 changed files with 1 additions and 3 deletions
  1. 1 3
      pages/piano/piano.js

+ 1 - 3
pages/piano/piano.js

@@ -49,9 +49,7 @@ Page({
     let bd = util.formatTime(now).substring(0, 10).replace(/\//g, '-')
     let edd = new Date(now.setDate(now.getDate() + 7));
     let ed = util.formatTime(edd).substring(0, 10).replace(/\//g, '-')
-    const date = new Date()
-    let m = date.getMonth() + 1;
-    this.setData({ beginDate: date.getFullYear()+"-"+ (m>9 ? '' +m : '0'+m) +"-01", endDate: ed, list: [] });
+    this.setData({ beginDate: bd, endDate: ed, list: [] });
     this.queryList();
   },