feat: redesign onboarding and home UI
This commit is contained in:
+157
-33
@@ -115,8 +115,13 @@
|
||||
|
||||
<!-- 成就风格 -->
|
||||
<view v-if="achievementThemes.length > 0" class="form-section">
|
||||
<text class="section-label">成就称号风格</text>
|
||||
<text class="section-hint">打卡越久,称号越高</text>
|
||||
<view class="theme-section-head">
|
||||
<view>
|
||||
<text class="section-label">成就称号风格</text>
|
||||
<text class="section-hint">选择一套更能激励你的成长称号</text>
|
||||
</view>
|
||||
<text class="theme-section-badge">可更换</text>
|
||||
</view>
|
||||
<view class="theme-list">
|
||||
<view
|
||||
v-for="theme in achievementThemes"
|
||||
@@ -125,16 +130,25 @@
|
||||
:class="{ 'theme-card-active': formData.achievement_theme_id === theme.id }"
|
||||
@tap="formData.achievement_theme_id = theme.id"
|
||||
>
|
||||
<view class="theme-glow"></view>
|
||||
<view class="theme-header">
|
||||
<text class="theme-icon">{{ theme.icon }}</text>
|
||||
<text class="theme-name">{{ theme.name }}</text>
|
||||
<view class="theme-icon-wrap">
|
||||
<text class="theme-icon">{{ theme.icon }}</text>
|
||||
</view>
|
||||
<view class="theme-title-wrap">
|
||||
<text class="theme-name">{{ theme.name }}</text>
|
||||
<text class="theme-desc">打卡进度会逐步解锁称号</text>
|
||||
</view>
|
||||
<view class="theme-check">
|
||||
<text v-if="formData.achievement_theme_id === theme.id">✓</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="theme-levels">
|
||||
<text
|
||||
v-for="(level, idx) in theme.levels"
|
||||
:key="level.id"
|
||||
class="theme-level"
|
||||
>{{ level.name }}<text v-if="idx < theme.levels.length - 1" class="theme-arrow"> → </text></text>
|
||||
>{{ level.name }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -263,10 +277,6 @@ async function handleSubmit() {
|
||||
uni.showLoading({ title: '保存中...' })
|
||||
await profileStore.saveProfile(formData.value)
|
||||
uni.hideLoading()
|
||||
if (!formData.value.mode) {
|
||||
uni.redirectTo({ url: '/pages/mode-select/index' })
|
||||
return
|
||||
}
|
||||
uni.switchTab({ url: '/pages/index/index' })
|
||||
} catch (e) {
|
||||
uni.hideLoading()
|
||||
@@ -539,66 +549,180 @@ onShareAppMessage(() => {
|
||||
margin-bottom: 16rpx;
|
||||
}
|
||||
|
||||
.theme-section-head {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
justify-content: space-between;
|
||||
gap: 20rpx;
|
||||
margin-bottom: 18rpx;
|
||||
}
|
||||
|
||||
.theme-section-head .section-hint {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.theme-section-badge {
|
||||
flex-shrink: 0;
|
||||
padding: 8rpx 16rpx;
|
||||
border-radius: 999rpx;
|
||||
background: rgba(110, 231, 183, 0.16);
|
||||
border: 1rpx solid rgba(16, 185, 129, 0.16);
|
||||
font-size: 20rpx;
|
||||
font-weight: 700;
|
||||
color: #0F766E;
|
||||
}
|
||||
|
||||
.theme-list {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 12rpx;
|
||||
gap: 18rpx;
|
||||
}
|
||||
|
||||
.theme-card {
|
||||
padding: 20rpx;
|
||||
border-radius: 20rpx;
|
||||
background: #F9FBFA;
|
||||
border: 2rpx solid #F0F0F0;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
padding: 24rpx;
|
||||
border-radius: 28rpx;
|
||||
background:
|
||||
linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(248, 250, 252, 0.92));
|
||||
border: 2rpx solid rgba(226, 232, 240, 0.9);
|
||||
box-sizing: border-box;
|
||||
box-shadow: 0 10rpx 28rpx rgba(15, 23, 42, 0.04);
|
||||
}
|
||||
|
||||
.theme-card-active {
|
||||
background: #E8F5F0;
|
||||
border-color: #10B981;
|
||||
background:
|
||||
radial-gradient(circle at top right, rgba(103, 232, 249, 0.28), transparent 34%),
|
||||
linear-gradient(135deg, rgba(236, 253, 245, 0.98), rgba(240, 249, 255, 0.94));
|
||||
border-color: rgba(16, 185, 129, 0.72);
|
||||
box-shadow: 0 18rpx 42rpx rgba(16, 185, 129, 0.13);
|
||||
}
|
||||
|
||||
.theme-glow {
|
||||
position: absolute;
|
||||
top: -70rpx;
|
||||
right: -70rpx;
|
||||
width: 190rpx;
|
||||
height: 190rpx;
|
||||
border-radius: 50%;
|
||||
background: rgba(110, 231, 183, 0.12);
|
||||
}
|
||||
|
||||
.theme-card-active .theme-glow {
|
||||
background: rgba(103, 232, 249, 0.28);
|
||||
}
|
||||
|
||||
.theme-header {
|
||||
position: relative;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 10rpx;
|
||||
margin-bottom: 10rpx;
|
||||
gap: 18rpx;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
|
||||
.theme-icon-wrap {
|
||||
width: 72rpx;
|
||||
height: 72rpx;
|
||||
border-radius: 24rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
background: rgba(241, 245, 249, 0.92);
|
||||
border: 1rpx solid rgba(226, 232, 240, 0.9);
|
||||
box-shadow: inset 0 1rpx 0 rgba(255, 255, 255, 0.7);
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.theme-card-active .theme-icon-wrap {
|
||||
background: linear-gradient(135deg, #6EE7B7, #67E8F9);
|
||||
border-color: rgba(255, 255, 255, 0.9);
|
||||
box-shadow: 0 12rpx 26rpx rgba(20, 184, 166, 0.18);
|
||||
}
|
||||
|
||||
.theme-icon {
|
||||
font-size: 32rpx;
|
||||
font-size: 36rpx;
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
.theme-title-wrap {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 6rpx;
|
||||
}
|
||||
|
||||
.theme-name {
|
||||
font-size: 28rpx;
|
||||
font-weight: 700;
|
||||
color: #1A1A1A;
|
||||
font-size: 29rpx;
|
||||
line-height: 1.25;
|
||||
font-weight: 800;
|
||||
color: #1E293B;
|
||||
}
|
||||
|
||||
.theme-desc {
|
||||
font-size: 21rpx;
|
||||
line-height: 1.4;
|
||||
color: #64748B;
|
||||
}
|
||||
|
||||
.theme-card-active .theme-name {
|
||||
color: #10B981;
|
||||
color: #0F766E;
|
||||
}
|
||||
|
||||
.theme-check {
|
||||
width: 42rpx;
|
||||
height: 42rpx;
|
||||
border-radius: 50%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
border: 2rpx solid rgba(148, 163, 184, 0.34);
|
||||
background: rgba(255, 255, 255, 0.78);
|
||||
color: #FFFFFF;
|
||||
font-size: 24rpx;
|
||||
font-weight: 900;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.theme-card-active .theme-check {
|
||||
border-color: transparent;
|
||||
background: linear-gradient(135deg, #10B981, #06B6D4);
|
||||
box-shadow: 0 8rpx 18rpx rgba(16, 185, 129, 0.2);
|
||||
}
|
||||
|
||||
.theme-levels {
|
||||
font-size: 22rpx;
|
||||
color: #999999;
|
||||
line-height: 1.6;
|
||||
position: relative;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 10rpx;
|
||||
}
|
||||
|
||||
.theme-level {
|
||||
font-size: 22rpx;
|
||||
max-width: 100%;
|
||||
padding: 8rpx 14rpx;
|
||||
border-radius: 999rpx;
|
||||
background: rgba(241, 245, 249, 0.95);
|
||||
border: 1rpx solid rgba(226, 232, 240, 0.9);
|
||||
font-size: 21rpx;
|
||||
line-height: 1.35;
|
||||
font-weight: 700;
|
||||
color: #64748B;
|
||||
}
|
||||
|
||||
.theme-card-active .theme-level {
|
||||
color: #10B981;
|
||||
background: rgba(255, 255, 255, 0.72);
|
||||
border-color: rgba(16, 185, 129, 0.15);
|
||||
color: #0F766E;
|
||||
}
|
||||
|
||||
.theme-card-active .theme-level:first-child {
|
||||
background: rgba(251, 191, 36, 0.18);
|
||||
border-color: rgba(251, 191, 36, 0.22);
|
||||
color: #B45309;
|
||||
}
|
||||
|
||||
.theme-arrow {
|
||||
color: #CCCCCC;
|
||||
}
|
||||
|
||||
.theme-card-active .theme-arrow {
|
||||
color: #6EE7B7;
|
||||
display: none;
|
||||
}
|
||||
|
||||
.bottom-space {
|
||||
|
||||
Reference in New Issue
Block a user