odc.xiaohui
2023-04-07 f693c859cdaf607c2a146ef89a7a2ce0d9476d1a
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// logs.ts
// const util = require('../../utils/util.js')
import { formatTime } from '../../utils/util'
 
Page({
  data: {
    logs: [],
  },
  onLoad() {
    this.setData({
      logs: (wx.getStorageSync('logs') || []).map((log: string) => {
        return {
          date: formatTime(new Date(log)),
          timeStamp: log
        }
      }),
    })
  },
})