沙盘演示系统应用的微信小程序
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// logs.js
const util = require('../../utils/util.js')
 
Page({
  data: {
    logs: []
  },
  onLoad() {
    this.setData({
      logs: (wx.getStorageSync('logs') || []).map(log => {
        return {
          date: util.formatTime(new Date(log)),
          timeStamp: log
        }
      })
    })
  }
})