index.js 850 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. const app = getApp();
  2. const util = require("../../util/util.js")
  3. Page({
  4. data: {
  5. StatusBar: app.globalData.StatusBar,
  6. CustomBar: app.globalData.CustomBar,
  7. nd:{
  8. year:"2021年",
  9. count:1,
  10. fee:100
  11. },
  12. index: 0,
  13. year:0,
  14. month:0,
  15. picker: {},
  16. },
  17. DateChange: function( e ){
  18. console.log( e)
  19. },
  20. gotoLog(e){
  21. let {month, year} = e.currentTarget.dataset;
  22. let monthStr = month <10?(year+'-0'+month):(year+'-'+month);
  23. wx.navigateTo({
  24. url: `/pages/log/log?month=${monthStr}`,
  25. })
  26. },
  27. onLoad: function (options) {
  28. var date = new Date();
  29. let year=date.getFullYear();
  30. let month=date.getMonth()+1;
  31. let picker ={};
  32. for( let i=1;i<= month;i++){
  33. picker[year+'-'+month+'01'] = year+'年'+i+'月';
  34. }
  35. this.setData({submit:false,picker,year, month})
  36. }
  37. })