logs.js 359 B

1234567891011121314151617181920
  1. //logs.js
  2. const app = getApp()
  3. const util = require('../../utils/util.js')
  4. Page({
  5. data: {
  6. logs: []
  7. },
  8. onLoad: function () {
  9. this.setData({
  10. logs: (wx.getStorageSync('logs') || []).map(log => {
  11. return util.formatTime(new Date(log))
  12. })
  13. })
  14. let _this = this;
  15. _this.setData({
  16. navH: app.globalData.navHeight
  17. })
  18. }
  19. })