Files
digital-psychology/apps/user-h5/src/pages/HomePage.vue
T
jackyu66gitandCursor 56f661748a feat(ECR-042): OpsCMS FeedSlot 薄写面
Admin POST/PUT 复用 admin.cms.write;C 端 GET /home/feed-slots;首页无 active 槽隐藏推荐区、失败回退展示;无新 migration。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-13 20:02:01 +08:00

129 lines
3.1 KiB
Vue
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<template>
<!-- 测测同构功能界面 · 愈心谷品牌质感design-system -->
<main class="home">
<span class="atm a1" aria-hidden="true" />
<span class="atm a2" aria-hidden="true" />
<span class="atm a3" aria-hidden="true" />
<HomeArchiveStrip :nickname="profileLabel" :avatar-url="avatarUrl" @add="goPlus('add')" />
<HomeSelfCard
:profile-label="profileLabel"
:tips="tips"
:loading="tipsLoading"
@open-profile="router.push('/profile')"
/>
<div class="sheet reveal" style="--d: 100ms">
<HomeToolGrid :row1="gridRow1" :row2="gridRow2" @track="trackGrid" />
<HomePromoSection />
<HomeFeedSection v-if="feedsVisible" :feeds="feeds" />
</div>
</main>
</template>
<script setup lang="ts">
import HomeArchiveStrip from '../components/home/HomeArchiveStrip.vue'
import HomeFeedSection from '../components/home/HomeFeedSection.vue'
import HomePromoSection from '../components/home/HomePromoSection.vue'
import HomeSelfCard from '../components/home/HomeSelfCard.vue'
import HomeToolGrid from '../components/home/HomeToolGrid.vue'
import { useHomePage } from '../composables/useHomePage'
const {
router,
profileLabel,
avatarUrl,
tips,
tipsLoading,
gridRow1,
gridRow2,
feeds,
feedsVisible,
goPlus,
trackGrid,
} = useHomePage()
</script>
<style scoped>
.home {
position: relative;
overflow-x: hidden;
padding-top: 48px;
padding-bottom: var(--spacing-xs);
min-height: 100%;
background:
radial-gradient(110% 70% at 85% -8%, rgba(255, 190, 170, 0.65) 0%, transparent 52%),
radial-gradient(90% 55% at 8% 6%, rgba(255, 220, 200, 0.75) 0%, transparent 48%),
radial-gradient(60% 40% at 50% 0%, rgba(255, 255, 255, 0.55) 0%, transparent 60%),
linear-gradient(180deg, var(--color-bg-start) 0%, #ffe4d8 28%, #fff4ef 52%, var(--color-bg-sheet) 100%);
}
.atm {
position: absolute;
pointer-events: none;
border-radius: 50%;
z-index: 0;
filter: blur(1px);
}
.atm.a1 {
width: 160px;
height: 160px;
top: 28px;
right: -40px;
background: rgba(255, 255, 255, 0.5);
animation: drift 12s ease-in-out infinite alternate;
}
.atm.a2 {
width: 100px;
height: 100px;
top: 88px;
left: -28px;
background: rgba(255, 200, 180, 0.45);
animation: drift 14s ease-in-out infinite alternate-reverse;
}
.atm.a3 {
width: 70px;
height: 70px;
top: 160px;
right: 40px;
background: rgba(255, 230, 210, 0.5);
opacity: 0.8;
}
@keyframes drift {
from {
transform: translate(0, 0);
}
to {
transform: translate(-8px, 10px);
}
}
.reveal {
animation: rise 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
animation-delay: var(--d, 0ms);
}
@keyframes rise {
from {
opacity: 0;
transform: translateY(10px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
.sheet {
margin-top: 14px;
background: var(--color-surface);
border-radius: var(--radius-sheet) var(--radius-sheet) 0 0;
padding: 8px 0 28px;
box-shadow: var(--shadow-sheet);
position: relative;
z-index: 3;
}
@media (prefers-reduced-motion: reduce) {
.reveal,
.atm {
animation: none !important;
}
}
</style>