fix: 首页精简——删独立今日知识卡,合并进'继续探索/今日推荐'二合一卡位(无阅读记录时显示每日推荐,有则显示继续上次),消除视觉不一致
This commit is contained in:
@@ -30,14 +30,14 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- 继续探索 -->
|
<!-- 继续探索 / 今日推荐(二合一:有上次阅读显示继续,没有则推荐今日一条) -->
|
||||||
<view class="resume-card" v-if="lastRead" @tap="resumeRead">
|
<view class="resume-card" v-if="lastRead || todayKnowledge" @tap="resumeRead">
|
||||||
<view class="resume-icon">
|
<view class="resume-icon">
|
||||||
<AppIcon name="clock" :size="18" />
|
<AppIcon :name="lastRead ? 'clock' : 'book'" :size="18" />
|
||||||
</view>
|
</view>
|
||||||
<view class="resume-info">
|
<view class="resume-info">
|
||||||
<text class="resume-label">继续探索</text>
|
<text class="resume-label">{{ lastRead ? '继续探索' : '今日推荐' }}</text>
|
||||||
<text class="resume-title">{{ lastRead.title }}</text>
|
<text class="resume-title">{{ (lastRead || todayKnowledge)?.title }}</text>
|
||||||
</view>
|
</view>
|
||||||
<AppIcon name="arrow-gray" :size="14" />
|
<AppIcon name="arrow-gray" :size="14" />
|
||||||
</view>
|
</view>
|
||||||
@@ -81,21 +81,6 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- 今日知识卡:每天一条,读了答对就点亮 -->
|
|
||||||
<view class="kcard" v-if="todayKnowledge" @tap="goTodayKnowledge">
|
|
||||||
<view class="kcard-head">
|
|
||||||
<AppIcon name="book" :size="14" />
|
|
||||||
<text class="kcard-label">今日知识卡</text>
|
|
||||||
<text class="kcard-dim">{{ todayDimName }}</text>
|
|
||||||
</view>
|
|
||||||
<text class="kcard-title">{{ todayKnowledge.title }}</text>
|
|
||||||
<text class="kcard-desc">{{ todayKnowledge.content }}</text>
|
|
||||||
<view class="kcard-foot">
|
|
||||||
<text class="kcard-cta">去读一读 · 答对点亮 →</text>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
|
|
||||||
<!-- 今日快讯 -->
|
<!-- 今日快讯 -->
|
||||||
<view class="section-header">
|
<view class="section-header">
|
||||||
<text class="section-title">今日快讯</text>
|
<text class="section-title">今日快讯</text>
|
||||||
@@ -508,40 +493,4 @@ onShareTimeline(() => ({
|
|||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.kcard {
|
|
||||||
background: linear-gradient(135deg, rgba(91, 95, 248, 0.08), rgba(139, 92, 246, 0.05));
|
|
||||||
border: 1px solid var(--glass-hover-border);
|
|
||||||
border-radius: var(--radius-lg);
|
|
||||||
padding: 14px 16px;
|
|
||||||
margin-bottom: 12px;
|
|
||||||
}
|
|
||||||
.kcard-head { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; }
|
|
||||||
.kcard-label { font-size: 12px; font-weight: 700; color: var(--color-brand); }
|
|
||||||
.kcard-dim {
|
|
||||||
margin-left: auto;
|
|
||||||
font-size: 10px;
|
|
||||||
color: var(--text-tertiary);
|
|
||||||
background: var(--glass-bg);
|
|
||||||
border-radius: 999px;
|
|
||||||
padding: 2px 8px;
|
|
||||||
}
|
|
||||||
.kcard-title {
|
|
||||||
display: block;
|
|
||||||
font-size: 15px;
|
|
||||||
font-weight: 700;
|
|
||||||
color: var(--text-primary);
|
|
||||||
line-height: 1.5;
|
|
||||||
margin-bottom: 6px;
|
|
||||||
}
|
|
||||||
.kcard-desc {
|
|
||||||
display: -webkit-box;
|
|
||||||
-webkit-box-orient: vertical;
|
|
||||||
-webkit-line-clamp: 2;
|
|
||||||
overflow: hidden;
|
|
||||||
font-size: 12px;
|
|
||||||
color: var(--text-tertiary);
|
|
||||||
line-height: 1.6;
|
|
||||||
}
|
|
||||||
.kcard-foot { margin-top: 8px; }
|
|
||||||
.kcard-cta { font-size: 11px; font-weight: 600; color: var(--color-brand); }
|
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
Reference in New Issue
Block a user