mirror of
https://gitee.com/huangge1199_admin/vue-pro.git
synced 2024-11-26 01:01:52 +08:00
19 lines
305 B
JavaScript
19 lines
305 B
JavaScript
|
// 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
|
||
|
}
|
||
|
})
|
||
|
})
|
||
|
}
|
||
|
})
|