zhangshuling 3 rokov pred
rodič
commit
c9e9445b9a
1 zmenil súbory, kde vykonal 1 pridanie a 3 odobranie
  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();
   },