init
This commit is contained in:
19
miniprogram/pages/logs/logs.ts
Normal file
19
miniprogram/pages/logs/logs.ts
Normal file
@ -0,0 +1,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
|
||||
}
|
||||
}),
|
||||
})
|
||||
},
|
||||
})
|
Reference in New Issue
Block a user