initial commit

This commit is contained in:
Ling53666
2025-04-28 15:59:21 +08:00
commit 36cc2fe7ba
55 changed files with 2627 additions and 0 deletions

18
pages/logs/logs.js Normal file
View File

@ -0,0 +1,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
}
})
})
}
})

4
pages/logs/logs.json Normal file
View File

@ -0,0 +1,4 @@
{
"usingComponents": {
}
}

6
pages/logs/logs.wxml Normal file
View File

@ -0,0 +1,6 @@
<!--logs.wxml-->
<scroll-view class="scrollarea" scroll-y type="list">
<block wx:for="{{logs}}" wx:key="timeStamp" wx:for-item="log">
<view class="log-item">{{index + 1}}. {{log.date}}</view>
</block>
</scroll-view>

16
pages/logs/logs.wxss Normal file
View File

@ -0,0 +1,16 @@
page {
height: 100vh;
display: flex;
flex-direction: column;
}
.scrollarea {
flex: 1;
overflow-y: hidden;
}
.log-item {
margin-top: 20rpx;
text-align: center;
}
.log-item:last-child {
padding-bottom: env(safe-area-inset-bottom);
}