修改页面
CI / Server (Go) (push) Has been cancelled
CI / Web (Next.js) (push) Has been cancelled
CI / Mobile (React Native) (push) Has been cancelled
CI / Admin (React) (push) Has been cancelled
CI / Docker Build (push) Has been cancelled

This commit is contained in:
zeronline
2026-06-25 16:33:32 +08:00
parent c5cccd346b
commit 545329ac40
63 changed files with 2560 additions and 161 deletions
+14
View File
@@ -0,0 +1,14 @@
Component({
properties: {
item: { type: Object, value: {} },
done: { type: Boolean, value: false },
streak: { type: Number, value: undefined },
categoryLabel: { type: String, value: '' },
cycleLabel: { type: String, value: '' },
},
methods: {
onTap() {
this.triggerEvent('tap', { id: this.data.item.id })
}
}
})
@@ -0,0 +1,4 @@
{
"component": true,
"usingComponents": {}
}
@@ -0,0 +1,11 @@
<view class="card {{status}}" data-id="{{item.id}}" bindtap="onTap">
<view class="card-icon">{{item.icon || '📋'}}</view>
<view class="card-body">
<text class="card-name">{{item.name}}</text>
<text class="card-meta">{{categoryLabel}} · {{cycleLabel}}</text>
<text wx:if="{{done}}" class="done-badge">✓ 已打卡</text>
</view>
<view class="card-streak" wx:if="{{streak !== undefined}}">
<text>🔥 {{streak}}天</text>
</view>
</view>
@@ -0,0 +1,26 @@
.card {
display: flex;
align-items: center;
background: white;
border-radius: 12px;
margin: 0 12px 8px;
padding: 14px;
box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.card.paused { opacity: 0.6; }
.card.archived { opacity: 0.4; }
.card-icon {
width: 44px; height: 44px;
border-radius: 12px;
background: #FFF0EB;
display: flex;
align-items: center;
justify-content: center;
font-size: 22px;
margin-right: 14px;
}
.card-body { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.card-name { font-size: 16px; font-weight: 600; }
.card-meta { font-size: 13px; color: #86868B; }
.done-badge { font-size: 12px; color: #34C759; font-weight: 600; margin-top: 2px; }
.card-streak { font-size: 14px; color: #FF6B35; font-weight: 600; }
+18
View File
@@ -0,0 +1,18 @@
Component({
properties: {
active: { type: String, value: 'home' },
tabs: {
type: Array,
value: [
{ key: 'home', label: '打卡', icon: '📋' },
{ key: 'feed', label: '广场', icon: '🌊' },
{ key: 'profile', label: '我的', icon: '👤' },
],
},
},
methods: {
onSwitch(e) {
this.triggerEvent('switch', { key: e.currentTarget.dataset.key })
}
}
})
+4
View File
@@ -0,0 +1,4 @@
{
"component": true,
"usingComponents": {}
}
+6
View File
@@ -0,0 +1,6 @@
<view class="nav-bar">
<view wx:for="{{tabs}}" wx:key="key" class="nav-item" data-key="{{item.key}}" bindtap="onSwitch">
<text class="nav-icon">{{item.icon}}</text>
<text class="nav-label {{active===item.key?'active':''}}">{{item.label}}</text>
</view>
</view>
+24
View File
@@ -0,0 +1,24 @@
.nav-bar {
display: flex;
align-items: center;
justify-content: space-around;
padding: 8px 0 24px;
border-top: 0.5px solid #E5E5EA;
background: rgba(245,245,247,0.95);
position: fixed;
bottom: 0;
left: 0;
right: 0;
z-index: 100;
}
.nav-item {
flex: 1;
display: flex;
flex-direction: column;
align-items: center;
gap: 2px;
padding: 4px;
}
.nav-icon { font-size: 22px; }
.nav-label { font-size: 10px; color: #86868B; }
.nav-label.active { color: #FF6B35; font-weight: 600; }